diff --git a/.gitignore b/.gitignore index ba74660..8f67f31 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ docs/_build/ # PyBuilder target/ + +# Ignore vim swap files +*.swp diff --git a/local_build.py b/local_build.py index 58ae7b3..107f168 100755 --- a/local_build.py +++ b/local_build.py @@ -35,6 +35,8 @@ \begin{{document}} +{authorcontent} + {titlecontent} {sectioninputs} @@ -168,6 +170,10 @@ def build_authorea_latex(localdir, builddir, latex_exec, bibtex_exec, outname, titlestr = f.read() titlecontent.append(r'\title{' + titlestr + '}') + authorcontent = "" + with open(os.path.join(localdir, 'authors.tex')) as f: + authorcontent = r'\author{' + get_input_string('authors', get_in_path(localdir, builddir, pathtype)) + '}' + sectioninputs = [] with open(os.path.join(localdir, 'layout.md')) as f: for l in f: @@ -177,8 +183,8 @@ def build_authorea_latex(localdir, builddir, latex_exec, bibtex_exec, outname, elif ls in ('posttitle.tex', 'title.tex', 'preamble.tex', 'header.tex'): pass # skip any that have been processed above elif ls in ('abstract.tex'): - # add abstract to title content - titlecontent.append(r'\begin{abstract}' + get_input_string('abstract', get_in_path(localdir, builddir, pathtype)) + '\end{abstract}') + # add abstract to section input + sectioninputs.append(get_input_string('abstract', get_in_path(localdir, builddir, pathtype))) elif ls.endswith('.html') or ls.endswith('.htm'): pass # html files aren't latex-able elif ls.startswith('figures'):