From 8047d65b9bdd0377235a9444be9aff9c58c31393 Mon Sep 17 00:00:00 2001 From: EvanPutnam Date: Mon, 2 Sep 2019 19:15:17 -0400 Subject: [PATCH 01/12] Made markdown_compile.py fairly generic for whatever docs the user wants --- .../{ => Templates}/markdown_template.md | 27 +++--- .../{ => Templates}/spex_template.tex | 14 +-- Portable_PDD/markdown_compile.py | 87 ++++++++----------- 3 files changed, 59 insertions(+), 69 deletions(-) rename Portable_PDD/{ => Templates}/markdown_template.md (91%) rename Portable_PDD/{ => Templates}/spex_template.tex (97%) diff --git a/Portable_PDD/markdown_template.md b/Portable_PDD/Templates/markdown_template.md similarity index 91% rename from Portable_PDD/markdown_template.md rename to Portable_PDD/Templates/markdown_template.md index d65a4dd..6621f9e 100644 --- a/Portable_PDD/markdown_template.md +++ b/Portable_PDD/Templates/markdown_template.md @@ -1,7 +1,8 @@ --- -title: 50\$ Satellite PDD -authors: Evan Putnam, Another Student -emails: emp9173@rit.edu, someOtherEmail@spex.com +TITLE_TAG: 50\$ Satellite PDD +AUTHORS_TAG: Evan Putnam, Another Student +EMAIL_TAG: emp9173@rit.edu, someOtherEmail@spex.com +TEMP_TAG: Hello World --- -# ABSTRACT -This is where you should put your abstract text. This is very important for detailing how your document is about and every document is required to have one. + +# ABSTRACT +HERE BE A BIG HONKING ABSTRACT! # Section 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.s @@ -63,16 +65,17 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i #Section 4 ## LaTeX Tables + -\autoref{tab:timeline} +This is a table \autoref{table:somechart} \begin{table} - \caption{Estimated Timeline} \centering + \caption{Estimated Timeline} \begin{tabularx}{\columnwidth}{@{}cXl@{}} \toprule Phase & Task & Duration \\ \midrule 1 & Review existing \$50SAT designs and materials & 2 weeks or less \\ @@ -85,8 +88,10 @@ Here is LaTeX code to create a table. 5 & Generate documentation and delivery to SPEX & 1 week \\ \bottomrule \end{tabularx} -\label{tab:timeline} -\end{table} +\label{table:somechart} +\end{table} \\ + + anywhere in your markdown document that you do not expect a comment.") + error_message = "Malformed comments. Can not parse the document. Please fix you comments to have a starting and ending tag.\n" + error_message += "In addition do NOT have anywhere in your markdown document that you do not expect a comment." + print("***** ERROR: " + error_message) + logging.error(error_message) sys.exit(1) #Return markdown document text without markdown comments @@ -142,6 +146,7 @@ def _parse(self): if current_section == None: print("***** Error: Subsection before section") print(line) + logging.error("Subsection before section: "+line) sys.exit(1) #Else handle section else: @@ -165,6 +170,7 @@ def _parse(self): elif line.strip() != "": print("***** Error: Malformed sections/subsections") print(line) + logging.error("Malformed sections/subsections") sys.exit(1) if self.verbose: #Print out wonderful information. @@ -182,12 +188,15 @@ def _latex_string(self, sections): #If no sections are detected then errors out. if len(sections) == 0: print("***** Error: No sections detected in your markdown file.") + logging.error("No sections detected in your markdown file.") sys.exit(1) #If no abstract it errors out. Shame on you... if "ABSTRACT" not in sections: print("----- Warning: No abstract in markdown. Most documents should have an abstract.") + logging.warning("No abstract in markdown. Most documents should have an abstract.") if self.verbose: + logging.debug(str(sections)) print(sections) #Storage for latex formatted strings for abstract and sections. @@ -229,6 +238,8 @@ def _latex_string(self, sections): print(abstract_str) print("") print(sections_str) + logging.debug(str(abstract_str)) + logging.debug(str(sections_str)) return abstract_str, sections_str @@ -245,7 +256,7 @@ def _latex_string(self, sections): # there is opportunity to post process more if need be. The following features would be good. # - TODO: Include bold and italics # - TODO: Include basic bullited lists. - # For now users can default back to LaTeX tho and code has been provided in test.md for it. + # For now users can default back to LaTeX though and code has been provided in test.md for it. #--------------------------------------------------------------------- def convert(self): #Get information needed for document @@ -273,6 +284,7 @@ def convert(self): #Output complete LaTeX document. print("") print(tex_contents) + logging.debug(tex_contents) #Get rid of directory so we can regenerate the new .tex file. @@ -302,6 +314,11 @@ def compile(self, tex_path): if __name__ == "__main__": + #Initialize logging. + if os.path.exists(LOG_FILE_NAME): + os.remove(LOG_FILE_NAME) + logging.basicConfig(filename=LOG_FILE_NAME) + #Create the parser. parser = argparse.ArgumentParser( description="converts basic markdown to TeX and PDF") parser.add_argument( From d1678ef24fa8f7e8efedbf9776f8909929e7278d Mon Sep 17 00:00:00 2001 From: EvanPutnam Date: Mon, 2 Sep 2019 19:38:03 -0400 Subject: [PATCH 05/12] Removing log files and updating docs --- Portable_PDD/markdown_compile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Portable_PDD/markdown_compile.py b/Portable_PDD/markdown_compile.py index 10b9dea..e86a344 100644 --- a/Portable_PDD/markdown_compile.py +++ b/Portable_PDD/markdown_compile.py @@ -5,8 +5,7 @@ TODO: Integrate some additional features. See LatexMarkdownCompiler.compile() function. The logic is not anything special and is just a state machine handling basic conditions. - -SPEX Members are free to improve upon it as they see fit. +SPEX Members are free to improve upon it as they see fit with the pull request system on Github. """ import os From 508e9a8ae4b95ab02d56f2264171ad19a23694e4 Mon Sep 17 00:00:00 2001 From: runphilrun Date: Thu, 5 Sep 2019 22:25:21 -0700 Subject: [PATCH 06/12] minor formatting tweaks --- Portable_PDD/Templates/markdown_template.md | 26 +++++++++------------ 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/Portable_PDD/Templates/markdown_template.md b/Portable_PDD/Templates/markdown_template.md index 6621f9e..6195d7a 100644 --- a/Portable_PDD/Templates/markdown_template.md +++ b/Portable_PDD/Templates/markdown_template.md @@ -23,47 +23,45 @@ TEMP_TAG: Hello World Important notes and potential gotchas: Comments. New lines. - - ---> - - - +---> # ABSTRACT HERE BE A BIG HONKING ABSTRACT! # Section 1 -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.s +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + ## Subsection 1.1 Hey how is it going? - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ## Subsection 1.2 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -#Section 2 +# Section 2 Here is another section! ## Subsection 2.1 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -#Section 3 +# Section 3 ## Subsection 3.1 You can also include subsections where the section does not include text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -#Section 4 +# Section 4 ## LaTeX Tables @@ -91,8 +89,6 @@ Here is LaTeX code to create a table. \label{table:somechart} \end{table} \\ - - + This is a template you can use for markdown with the SPEX PDD LaTeX documents. + Specify a title, authors, and emails. + + Current Features: + Sections + Subsections + Text and newlines. + Basic LaTeX syntax (as long as no LaTeX or regular comments are inside a statement). + + Commenting: + Multiline comments are only supported if you have a single start and + end on a separate line. For example you can not start a new comment on + the same line as an ending tag for a multiline comment. + + There can only be one single line comment per line. + Nested comments are not supported. + + Important notes and potential gotchas: + Comments. + New lines. + ---> +This is text for your abstract and should appear before other sections. This +CAN NOT have sub-sections and MUST have the # ABSTRACT syntax. + ---> # ABSTRACT HERE BE A BIG HONKING ABSTRACT! # Section 1 -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. ## Subsection 1.1 -Hey how is it going? +Hey how is it going? -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. -Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut +aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in +voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint +occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim +id est laborum. ## Subsection 1.2 -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. # Section 2 Here is another section! ## Subsection 2.1 -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. # Section 3 ## Subsection 3.1 You can also include subsections where the section does not include text. -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in +culpa qui officia deserunt mollit anim id est laborum. # Section 4 ## LaTeX Tables From d71eb67628a24950c7d3c96d3ac866849338e6e3 Mon Sep 17 00:00:00 2001 From: runphilrun Date: Thu, 5 Sep 2019 23:50:56 -0700 Subject: [PATCH 09/12] add markdown to tex compiler instructions to readme --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 278dcde..5343951 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ This repository contains scripts for turning TeX into beautiful documents. * [MikTeX](#MikTeX) * [TeX Live](#TeX-Live) * [Use a Docker container instead](#Use-a-Docker-container-instead) +* [Compiling Markdown to LaTeX with a Template](#Compiling-Markdown-to-LaTeX-with-a-Template) + * [Supported syntax](#Supported-syntax) + * [Special tags](#Special-tags) + * [Comments](#Comments) + * [Run the Markdown-to-TeX compiler](#Run-the-Markdown-to-TeX-compiler) + # Prerequisite Software These tools assume the user has the following software installed on their @@ -22,7 +28,7 @@ software. **Note:** Documentation for this repository assumes that a Windows user is using Windows Powershell. While most of the Linux instructions should work within the Windows Subsystem for Linux (WSL) environment on a Windows machine, -proceed at your own risk. +proceed at your own risk. # Install a LaTeX compiler on your machine Use the following instructions to install a LaTeX compiler on your local @@ -72,4 +78,63 @@ run virtual environments on your machine's turbo encabulators. Compile a TeX project with Tectonic with a docker container with ```shell ./compile_scripts/compile_with_tectonic.sh -``` \ No newline at end of file +``` + +# Compile Markdown to TeX with a Template +The Python script `Portable_PDD/markdown_compile.py` is used to convert a +Markdown (`.md`) text file into a LaTeX (`.tex`) file following a given TeX +template. This script also allows mixed Markdown and TeX formatting in the same +file. + +The Markdown to LaTeX compiler makes writing content faster, easier, and more +readable by beginning in Markdown and formatting to TeX automatically. A TeX +template is used to format the resultant `.tex` file, including titles, author +blocks, section formatting, and so on. + +## Supported syntax +| Syntax | Markdown | LaTeX | +| ------ | -------- | ----- | +| Sections | `# my section` | `\section{my section}` | +| Subsections | `## my subsection` | `\subsection{my subsection}` | +| Paragraph text | as is | as is | +| Line breaks | (empty line between paragraphs) | (empty line between paragraphs) | +| Basic LaTeX syntax | typed as normal text | as is | + +### Special tags +The `.tex` template defines the names of special tags and dictates where they +are used. At very start of the Markdown file, define tags and their values. The +values are injected directly into the `.tex` template exactly as they are +entered here. + +```markdown +--- +TITLE_TAG: 50\$ Satellite PDD +AUTHORS_TAG: Evan Putnam, Another Student +EMAIL_TAG: emp9173@rit.edu, someOtherEmail@spex.com +TEMP_TAG: Hello World +--- +``` + +### Comments +Comments are allowed in the Markdown file, but they are ignored by the compiler +will not appear in the resultant TeX file. + +There can only be one single line comment per line. Nested comments are not +supported. Multiline comments are only supported if you have a single start and +end on a separate line. + +``` + +``` +``` + +``` + +## Run the Markdown-to-TeX compiler +instructions on how to actually run the compiler From 5611a761bfeb06e9f06ea461109fb449a121715a Mon Sep 17 00:00:00 2001 From: runphilrun Date: Thu, 5 Sep 2019 23:51:27 -0700 Subject: [PATCH 10/12] rename directory for markdown to tex compiler --- {Portable_PDD => Markdown_to_TeX}/Compile.bat | 0 .../Templates/PDD_Template.tex | 0 .../Templates/markdown_template.md | 0 .../markdown_compile.py | 0 {Portable_PDD => Markdown_to_TeX}/spex.png | Bin 5 files changed, 0 insertions(+), 0 deletions(-) rename {Portable_PDD => Markdown_to_TeX}/Compile.bat (100%) rename {Portable_PDD => Markdown_to_TeX}/Templates/PDD_Template.tex (100%) rename {Portable_PDD => Markdown_to_TeX}/Templates/markdown_template.md (100%) rename {Portable_PDD => Markdown_to_TeX}/markdown_compile.py (100%) rename {Portable_PDD => Markdown_to_TeX}/spex.png (100%) diff --git a/Portable_PDD/Compile.bat b/Markdown_to_TeX/Compile.bat similarity index 100% rename from Portable_PDD/Compile.bat rename to Markdown_to_TeX/Compile.bat diff --git a/Portable_PDD/Templates/PDD_Template.tex b/Markdown_to_TeX/Templates/PDD_Template.tex similarity index 100% rename from Portable_PDD/Templates/PDD_Template.tex rename to Markdown_to_TeX/Templates/PDD_Template.tex diff --git a/Portable_PDD/Templates/markdown_template.md b/Markdown_to_TeX/Templates/markdown_template.md similarity index 100% rename from Portable_PDD/Templates/markdown_template.md rename to Markdown_to_TeX/Templates/markdown_template.md diff --git a/Portable_PDD/markdown_compile.py b/Markdown_to_TeX/markdown_compile.py similarity index 100% rename from Portable_PDD/markdown_compile.py rename to Markdown_to_TeX/markdown_compile.py diff --git a/Portable_PDD/spex.png b/Markdown_to_TeX/spex.png similarity index 100% rename from Portable_PDD/spex.png rename to Markdown_to_TeX/spex.png From 82e524d4898c1d27ca71705e3f8264da6c07ad15 Mon Sep 17 00:00:00 2001 From: runphilrun Date: Sun, 8 Sep 2019 11:11:05 -0700 Subject: [PATCH 11/12] log debug statements even if not verbrose --- Markdown_to_TeX/markdown_compile.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Markdown_to_TeX/markdown_compile.py b/Markdown_to_TeX/markdown_compile.py index e86a344..8859df2 100644 --- a/Markdown_to_TeX/markdown_compile.py +++ b/Markdown_to_TeX/markdown_compile.py @@ -194,8 +194,9 @@ def _latex_string(self, sections): if "ABSTRACT" not in sections: print("----- Warning: No abstract in markdown. Most documents should have an abstract.") logging.warning("No abstract in markdown. Most documents should have an abstract.") + + logging.debug(str(sections)) if self.verbose: - logging.debug(str(sections)) print(sections) #Storage for latex formatted strings for abstract and sections. @@ -231,14 +232,14 @@ def _latex_string(self, sections): continue sections_str += txt sections_str += (r"\\") + ("\n") - + + logging.debug(str(abstract_str)) + logging.debug(str(sections_str)) if self.verbose: #Prints out latex formatted strings. print(abstract_str) print("") print(sections_str) - logging.debug(str(abstract_str)) - logging.debug(str(sections_str)) return abstract_str, sections_str @@ -254,7 +255,7 @@ def _latex_string(self, sections): # Somewhere between or after the self._parse() call and the self._latex_string call # there is opportunity to post process more if need be. The following features would be good. # - TODO: Include bold and italics - # - TODO: Include basic bullited lists. + # - TODO: Include basic bulleted lists. # For now users can default back to LaTeX though and code has been provided in test.md for it. #--------------------------------------------------------------------- def convert(self): @@ -279,11 +280,11 @@ def convert(self): for i in range(0, times_to_replace): tex_contents = tex_contents.replace(key, tag_key_values[key]) + logging.debug(tex_contents) if self.verbose: #Output complete LaTeX document. print("") print(tex_contents) - logging.debug(tex_contents) #Get rid of directory so we can regenerate the new .tex file. From fa16d3ab38fae986443b6b14e6a468d8bfe365b2 Mon Sep 17 00:00:00 2001 From: runphilrun Date: Sun, 8 Sep 2019 11:33:06 -0700 Subject: [PATCH 12/12] make relative path --- Markdown_to_TeX/markdown_compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Markdown_to_TeX/markdown_compile.py b/Markdown_to_TeX/markdown_compile.py index 8859df2..8b18445 100644 --- a/Markdown_to_TeX/markdown_compile.py +++ b/Markdown_to_TeX/markdown_compile.py @@ -16,7 +16,7 @@ import argparse #Possible regex for removing comments. -TEMPLATE_FILE = "Templates\\PDD_Template.tex" +TEMPLATE_FILE = ".\\Templates\\PDD_Template.tex" COMPILER = ".\\Compile_Scripts\\MikTexCompiler.bat" #Name of log file