From 417069c4c80f4d925b6872441f184a008bd4ad35 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Mon, 12 Oct 2015 12:58:17 -0400 Subject: [PATCH 1/4] Updated .gitignore. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) 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 From 67e73a6104cffe4d7c04f045a81795db4272b3f4 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Mon, 12 Oct 2015 13:42:55 -0400 Subject: [PATCH 2/4] Remove abstract stuff. --- local_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local_build.py b/local_build.py index 58ae7b3..d0ac39e 100755 --- a/local_build.py +++ b/local_build.py @@ -178,7 +178,7 @@ def build_authorea_latex(localdir, builddir, latex_exec, bibtex_exec, outname, 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}') + titlecontent.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'): From e730c4e577f302eb272ee003b2d47a2aa9bee77b Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Mon, 12 Oct 2015 14:13:58 -0400 Subject: [PATCH 3/4] Add content from separate author file. --- local_build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/local_build.py b/local_build.py index d0ac39e..760518f 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: From 29757fbc80c8a263a8277597649e3d67616d4c28 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Mon, 12 Oct 2015 14:14:34 -0400 Subject: [PATCH 4/4] Treat abstract as a section. --- local_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local_build.py b/local_build.py index 760518f..107f168 100755 --- a/local_build.py +++ b/local_build.py @@ -183,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(get_input_string('abstract', get_in_path(localdir, builddir, pathtype))) + # 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'):