diff --git a/Build-Example.py b/Build-Example.py index ba6b520..5f158fd 100644 --- a/Build-Example.py +++ b/Build-Example.py @@ -5,16 +5,21 @@ TODO: Options? """ import subprocess - +import os # --------------- CHANGE THESE TWO LINES ------------------------- OUTPUT_FILE = "Disso.pdf" +#If you Reame the Header file let me know +STU_HEADER_FILE = "Dissertation.md" #Students Header File + #ENTER ALL THE SOURCE FILES THAT YOU HAVE IN THE DISSERTAION HERE. SOURCE_FILES = ["Example/Intro.md", "Example/Use.md"] +#SOURCE_FILES = ["markdown_dissertation/Example/Intro.md", +# "markdown_dissertation/Example/Use.md"] #Are you using the Submodule Approach -SUBMODULE = True +SUBMODULE = False #Is it the Default Path SUBMODULE_PATH="markdown_dissertation" @@ -23,12 +28,20 @@ SUBMODULE_PATH="markdown_dissertation" def buildCommand(): """Build the list that we send to pandoc""" - STU_HEADER_FILE = "Dissertation.md" HEADER_FILE = "Header.md" - FOOTER_FILE = "References.md" #Needed otherwise refs come on the same page + #Needed otherwise refs come on the same page + FOOTER_FILE = "References.md" + # Pandoc Template + LATEX_TEMPLATE = "Template/disso.latex" + + if SUBMODULE: + HEADER_FILE = os.path.join(SUBMODULE_PATH, HEADER_FILE) + FOOTER_FILE = os.path.join(SUBMODULE_PATH, FOOTER_FILE) + LATEX_TEMPLATE = os.path.join(SUBMODULE_PATH, LATEX_TEMPLATE) + PANDOC_OPTS = ["--filter=pandoc-citeproc", - "--template=Template/disso.latex", + "--template={0}".format(LATEX_TEMPLATE), "--top-level-division=chapter"] #Actually Build the list @@ -41,6 +54,8 @@ def buildCommand(): commandList.append("-o") commandList.append(OUTPUT_FILE) print (commandList) + for item in commandList: + print (item) subprocess.run(commandList) diff --git a/Dissertation.md b/Dissertation.md index e1b92c8..cd1b508 100644 --- a/Dissertation.md +++ b/Dissertation.md @@ -22,39 +22,3 @@ fontfamily: helvet # -------- LEAVE THE THINGS BELOW HERE ALONE ---- --- - ---- -documentclass: Template/Classes/CUPhDThesis -classoption: - - a4paper - - 10pt - - numbered - - print - - index - - oneside - -toc: true -toc-depth: 2 -lof: true -lot: false - -header-includes: - - \renewcommand{\familydefault}{\sfdefault} - - \renewcommand{\chaptername}{} - - \renewcommand{\thechapter}{} - - -dept: 'Faculty of Enginnering and Computing' -university: 'Coventry University' -crest: 'Template/Figs/CULogo.pdf' - -#Bibliograpy Style -csl: Template/harvard-coventry-university.csl - -#OR Nates, awesome Markdown one -#TEX-declaration: Supporting/OriginallityStatement.tex - -#If we are using biblatex instead -biblatexoptions: backend=biber, style=authoryear, sorting=nty, natbib=true -biblio-title: "References" ---- diff --git a/SubHeader.md b/SubHeader.md new file mode 100644 index 0000000..18ecd72 --- /dev/null +++ b/SubHeader.md @@ -0,0 +1,35 @@ +--- +documentclass: markdown_dissertation/Template/Classes/CUPhDThesis +classoption: + - a4paper + - 10pt + - numbered + - print + - index + - oneside + +toc: true +toc-depth: 2 +lof: true +lot: false + +header-includes: + - \renewcommand{\familydefault}{\sfdefault} + - \renewcommand{\chaptername}{} + - \renewcommand{\thechapter}{} + + +dept: 'Faculty of Enginnering and Computing' +university: 'Coventry University' +crest: 'markdown_dissertation/Template/Figs/CULogo.pdf' + +#Bibliograpy Style +csl: markdown_dissertation/Template/harvard-coventry-university.csl + +#OR Nates, awesome Markdown one +#TEX-declaration: Supporting/OriginallityStatement.tex + +#If we are using biblatex instead +biblatexoptions: backend=biber, style=authoryear, sorting=nty, natbib=true +biblio-title: "References" +---