This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on replace_chars(this_text, search_string, replacement_string) | |
if this_text contains the search_string then | |
set AppleScript's text item delimiters to the search_string | |
set the item_list to every text item of this_text | |
set AppleScript's text item delimiters to the replacement_string | |
set this_text to the item_list as string | |
set AppleScript's text item delimiters to "" | |
end if | |
return this_text | |
end replace_chars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
markdown_name = sys.argv[1] | |
name = markdown_name.split(".")[0] | |
latex_name = name + ".tex" | |
os.system("pandoc -f markdown -t latex %s -o %s" % (markdown_name, latex_name)) | |
with open(latex_name, "r") as latex_file: | |
latex_content = latex_file.read() |