Răsfoiți Sursa

partially working A&A template

George C. Privon 7 ani în urmă
părinte
comite
c652be0ce9
6 a modificat fișierele cu 275 adăugiri și 0 ștergeri
  1. 32 0
      aa/README.md
  2. 93 0
      aa/aa_template.tex
  3. 40 0
      aa/demo-structured_abstract.md
  4. 35 0
      aa/demo-traditional_abstract.md
  5. 71 0
      aa/demo.bib
  6. 4 0
      aa/macros.tex

+ 32 - 0
aa/README.md

@@ -0,0 +1,32 @@
+# Astronomy & Astrophysics Pandoc Template
+
+Generate a `tex` file with:
+
+```
+pandoc demo-structured_abstract.md -s --template aa_template.tex -o demo-structured_abstract.tex -F pandoc-crossref -F pandoc-citeproc --lua-filter=filters/acknowledgments.lua
+```
+
+Go straight to the pdf with:
+
+```
+pandoc demo-structured_abstract.md -s --template aa_template.tex -o demo-structured_abstract.pdf -F pandoc-crossref -F pandoc-citeproc --lua-filter=filters/acknowledgments.lua --pdf-engine=xelatex
+```
+
+There are two demonstration files containing sample articles:
+
+* [`demo-structured_abstract.md`](demo-structured_abstract.md): A&A structured abstract
+* [`demo-traditional_abstract.md`](demo-traditional_abstract.md): A&A traditional abstract
+
+## Usage Notes
+
+* If you want to include macros in anything contained within the YAML header, those must be put in a separate macro file that is incorporated via `\include{}` or `\input{}` *above* the title. This is demonstrated in [demo.md](demo.md).
+
+### Collaborations
+
+* For collaborations, authors will be grouped until there is a `collaboration: ` entry in the YAML header. If a co-author that is not part of a listed collaboration is listed before co-authors that are part of collaborations, put `nocollaboration: 1` in the YAML header to signify as such and avoid them being grouped with the later batch. See [demo.md](demo.md) for an example.
+
+## Known Issues
+
+* The A&A template requires manual enumeration and de-duplication of affilations but this likely requires construction of a pandoc filter to properly handle. For now, all affilations are given the same superscript code and the user must manually adjust to suit.
+* A&A table environments pass through to LaTeX without trouble. But note that these will not translate to other outputs (HTML, epub, etc.). So consider what your desired outputs will be before you put lots of effort into tables. Or write a [pandoc filter](https://pandoc.org/filters.html) to handle tables.
+* The A&A bibliography format is not part of the [Zotero (citation) Style Repository](https://www.zotero.org/styles) so `pandoc-citeproc` does not have access to the correct citation style. Dealing with this is beyond the scope of this particular repository, but hopefully that spec will eventually be translated into [Citation style language](https://citationstyles.org/).

+ 93 - 0
aa/aa_template.tex

@@ -0,0 +1,93 @@
+\documentclass{aa}
+
+\usepackage{booktabs}
+\usepackage{graphicx}
+\usepackage{txfonts}
+
+$if(texpackages)$
+$for(texpackages)$
+\usepackage
+$if(opts)$
+[
+$for(opts)$
+$opts$,
+$endfor$
+]
+$endif$
+{$texpackages.name$}
+$endfor$
+$endif$
+
+$if(preambleinput)$
+$for(preambleinput)$
+\input{$preambleinput$}
+$endfor$
+$endif$
+
+\begin{document}
+
+\title{$title$}
+
+\author{
+$for(author)$
+$author.name$,
+$if(author.affiliation)$
+$for(author.affiliation)$
+\inst{1}
+$endfor$
+$endif$
+\and
+$endfor$
+}
+\institute{
+$for(author)$
+$if(author.affiliation)$
+$for(author.affiliation)$
+$author.affiliation$\\
+$endfor$
+\and
+$endif$
+$endfor$
+}
+
+
+\date{
+Received
+$if(received)$
+$received$
+$else$
+YYY
+$endif$
+/ 
+Accepted 
+$if(accepted)$
+$accepted$
+$else$
+XXX
+$endif$
+}
+
+$if(abstract.context)$
+\abstract
+{$abstract.context$}
+{$abstract.aim$}
+{$abstract.methods$}
+{$abstract.results$}
+{$abstract.conclusions$}
+$else$
+\abstract{$abstract$}
+$endif$
+
+$if(keywords)$
+\keywords{
+$for(keywords)$
+    $keywords$ -- 
+$endfor$
+}
+$endif$
+
+\maketitle
+
+$body$
+
+\end{document}

+ 40 - 0
aa/demo-structured_abstract.md

@@ -0,0 +1,40 @@
+---
+preambleinput: ["macros.tex"]
+texpackages:
+- name: xspace
+#  opts:
+- name: amsmath
+#  opts:
+bibliography: demo.bib
+title: "Preparation of A and A Articles using Markdown and Pandoc"
+shorttitle: "A and A Markdown Template"
+shortauthors: Privon
+pubyear: 2018
+#accepted:
+#received:
+#originalform:
+author:
+- name: George C. Privon
+  affiliation: ["Department of Astronomy, University of Florida, 211 Bryant Space Sciences Center, Gainesville, 32611 FL, USA"]
+  email: george.privon@ufl.edu
+#- name: Josiah Carberry
+#  affiliation: ["Department of Psychoceramics, Wesleyan University, Middletown, CT", "Department of Psychoceramics, Brown University: Providence, RI"]
+keywords: [miscellaneous]
+abstract:
+  context: "This is a Markdown template for paper submissions to A&A."
+  aim: "I intend to make manuscript preparation easier while also enabling more flexibility."
+  methods: "I created a `pandoc` document template to enable preparation of astronomy manuscripts in Markdown with easy conversion to journal-defined formats."
+  results: "These templates and `pandoc` invocations can be used to submit papers to Astronomy and Astrophysics."
+  conclusions: "`pandoc` is a handy tool to know."
+---
+
+# Description {#sec:intro}
+
+This is a template for the Astronomy and Astrophysics journal.
+It is similar to the aastex62 template, but modified to match 
+See the aastex demonstration^[<https://github.com/privong/papers-in-markdown/tree/master/aastex62>] for a description of how to use `pandoc` and Markdown together.
+
+{{acknowledgments}}
+
+G.C.P. acknowledges support from the University of Florida.
+This work makes us of the `pandoc` universal document convertor^[<https://pandoc.org/>].

+ 35 - 0
aa/demo-traditional_abstract.md

@@ -0,0 +1,35 @@
+---
+preambleinput: ["macros.tex"]
+texpackages:
+- name: xspace
+#  opts:
+- name: amsmath
+#  opts:
+bibliography: demo.bib
+title: "Preparation of A and A Articles using Markdown and Pandoc"
+shorttitle: "A and A Markdown Template"
+shortauthors: Privon
+pubyear: 2018
+#accepted:
+#received:
+author:
+- name: George C. Privon
+  affiliation: ["Department of Astronomy, University of Florida, 211 Bryant Space Sciences Center, Gainesville, 32611 FL, USA"]
+  email: george.privon@ufl.edu
+#- name: Josiah Carberry
+#  affiliation: ["Department of Psychoceramics, Wesleyan University, Middletown, CT", "Department of Psychoceramics, Brown University: Providence, RI"]
+keywords: [miscellaneous]
+abstract: |
+  This is an A and A version of the Markdown template. It is functionally very similar to the aastex62 template. This is the "traditional abstract" format.
+---
+
+# Description {#sec:intro}
+
+This is a A\&A Markdown template.
+It is similar to the aastex62 template, but modified to match the A\&A template.
+See the aastex demonstration^[<https://github.com/privong/papers-in-markdown/tree/master/aastex62>] for a description of how to use `pandoc` and Markdown together.
+
+{{acknowledgments}}
+
+G.C.P. acknowledges support from the University of Florida.
+This work makes us of the `pandoc` universal document convertor^[<https://pandoc.org/>].

+ 71 - 0
aa/demo.bib

@@ -0,0 +1,71 @@
+@ARTICLE{Astropy2018,
+   author = {{The Astropy Collaboration} and {Price-Whelan}, A.~M. and {Sip{\H o}cz}, B.~M. and 
+	{G{\"u}nther}, H.~M. and {Lim}, P.~L. and {Crawford}, S.~M. and 
+	{Conseil}, S. and {Shupe}, D.~L. and {Craig}, M.~W. and {Dencheva}, N. and 
+	{Ginsburg}, A. and {VanderPlas}, J.~T. and {Bradley}, L.~D. and 
+	{P{\'e}rez-Su{\'a}rez}, D. and {de Val-Borro}, M. and {Aldcroft}, T.~L. and 
+	{Cruz}, K.~L. and {Robitaille}, T.~P. and {Tollerud}, E.~J. and 
+	{Ardelean}, C. and {Babej}, T. and {Bachetti}, M. and {Bakanov}, A.~V. and 
+	{Bamford}, S.~P. and {Barentsen}, G. and {Barmby}, P. and {Baumbach}, A. and 
+	{Berry}, K.~L. and {Biscani}, F. and {Boquien}, M. and {Bostroem}, K.~A. and 
+	{Bouma}, L.~G. and {Brammer}, G.~B. and {Bray}, E.~M. and {Breytenbach}, H. and 
+	{Buddelmeijer}, H. and {Burke}, D.~J. and {Calderone}, G. and 
+	{Cano Rodr{\'{\i}}guez}, J.~L. and {Cara}, M. and {Cardoso}, J.~V.~M. and 
+	{Cheedella}, S. and {Copin}, Y. and {Crichton}, D. and {D{\'A}vella}, D. and 
+	{Deil}, C. and {Depagne}, {\'E}. and {Dietrich}, J.~P. and {Donath}, A. and 
+	{Droettboom}, M. and {Earl}, N. and {Erben}, T. and {Fabbro}, S. and 
+	{Ferreira}, L.~A. and {Finethy}, T. and {Fox}, R.~T. and {Garrison}, L.~H. and 
+	{Gibbons}, S.~L.~J. and {Goldstein}, D.~A. and {Gommers}, R. and 
+	{Greco}, J.~P. and {Greenfield}, P. and {Groener}, A.~M. and 
+	{Grollier}, F. and {Hagen}, A. and {Hirst}, P. and {Homeier}, D. and 
+	{Horton}, A.~J. and {Hosseinzadeh}, G. and {Hu}, L. and {Hunkeler}, J.~S. and 
+	{Ivezi{\'c}}, {\v Z}. and {Jain}, A. and {Jenness}, T. and {Kanarek}, G. and 
+	{Kendrew}, S. and {Kern}, N.~S. and {Kerzendorf}, W.~E. and 
+	{Khvalko}, A. and {King}, J. and {Kirkby}, D. and {Kulkarni}, A.~M. and 
+	{Kumar}, A. and {Lee}, A. and {Lenz}, D. and {Littlefair}, S.~P. and 
+	{Ma}, Z. and {Macleod}, D.~M. and {Mastropietro}, M. and {McCully}, C. and 
+	{Montagnac}, S. and {Morris}, B.~M. and {Mueller}, M. and {Mumford}, S.~J. and 
+	{Muna}, D. and {Murphy}, N.~A. and {Nelson}, S. and {Nguyen}, G.~H. and 
+	{Ninan}, J.~P. and {N{\"o}the}, M. and {Ogaz}, S. and {Oh}, S. and 
+	{Parejko}, J.~K. and {Parley}, N. and {Pascual}, S. and {Patil}, R. and 
+	{Patil}, A.~A. and {Plunkett}, A.~L. and {Prochaska}, J.~X. and 
+	{Rastogi}, T. and {Reddy Janga}, V. and {Sabater}, J. and {Sakurikar}, P. and 
+	{Seifert}, M. and {Sherbert}, L.~E. and {Sherwood-Taylor}, H. and 
+	{Shih}, A.~Y. and {Sick}, J. and {Silbiger}, M.~T. and {Singanamalla}, S. and 
+	{Singer}, L.~P. and {Sladen}, P.~H. and {Sooley}, K.~A. and 
+	{Sornarajah}, S. and {Streicher}, O. and {Teuben}, P. and {Thomas}, S.~W. and 
+	{Tremblay}, G.~R. and {Turner}, J.~E.~H. and {Terr{\'o}n}, V. and 
+	{van Kerkwijk}, M.~H. and {de la Vega}, A. and {Watkins}, L.~L. and 
+	{Weaver}, B.~A. and {Whitmore}, J.~B. and {Woillez}, J. and 
+	{Zabalza}, V.},
+    title = "{The Astropy Project: Building an inclusive, open-science project and status of the v2.0 core package}",
+  journal = {ArXiv e-prints},
+archivePrefix = "arXiv",
+   eprint = {1801.02634},
+ primaryClass = "astro-ph.IM",
+ keywords = {Astrophysics - Instrumentation and Methods for Astrophysics},
+     year = 2018,
+    month = jan,
+   adsurl = {http://adsabs.harvard.edu/abs/2018arXiv180102634T},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+@ARTICLE{Privon2017b,
+   author = {{Privon}, G.~C. and {Stierwalt}, S. and {Patton}, D.~R. and 
+	{Besla}, G. and {Pearson}, S. and {Putman}, M. and {Johnson}, K.~E. and 
+	{Kallivayalil}, N. and {Liss}, S. and {Titans}, T.},
+    title = "{A Widespread, Clumpy Starburst in the Isolated Ongoing Dwarf Galaxy Merger dm1647+21}",
+  journal = {\apj},
+archivePrefix = "arXiv",
+   eprint = {1708.02587},
+ keywords = {galaxies: dwarf, galaxies: individual: SDSS J164710.66+210514.5, SDSS J164711.12+210514.8, galaxies: interactions, galaxies: ISM, galaxies: starburst},
+     year = 2017,
+    month = sep,
+   volume = 846,
+      eid = {74},
+    pages = {74},
+      doi = {10.3847/1538-4357/aa8560},
+   adsurl = {http://adsabs.harvard.edu/abs/2017ApJ...846...74P},
+  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
+}
+
+

+ 4 - 0
aa/macros.tex

@@ -0,0 +1,4 @@
+\newcommand{\vdag}{(v)^\dagger}
+\newcommand\aastex{AAS\TeX}
+\newcommand\latex{La\TeX}
+