Skip to content
Permalink
Browse files
Modify to work as a submodule
  • Loading branch information
aa9863 committed Sep 14, 2018
1 parent fc3351c commit 6fbf1378efea361acca41a0d82bb7e70c49ad24e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 41 deletions.
@@ -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)


@@ -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"
---
@@ -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"
---

0 comments on commit 6fbf137

Please sign in to comment.