소스 검색

minimum viable MNRAS template. fixes #1

George C. Privon 7 년 전
부모
커밋
c5e1bc333f
5개의 변경된 파일211개의 추가작업 그리고 0개의 파일을 삭제
  1. 29 0
      mnras/README.md
  2. 71 0
      mnras/demo.bib
  3. 28 0
      mnras/demo.md
  4. 4 0
      mnras/macros.tex
  5. 79 0
      mnras/mnras_template.tex

+ 29 - 0
mnras/README.md

@@ -0,0 +1,29 @@
+# MNRAS Pandoc Template
+
+Generate a `tex` file with:
+
+```
+pandoc demo.md -s --template mnras_template.tex -o demo.tex -F pandoc-crossref -F pandoc-citeproc
+```
+
+Go straight to the pdf with:
+
+```
+pandoc demo.md -s --template mnras_template.tex -o demo.pdf -F pandoc-crossref -F pandoc-citeproc --pdf-engine=xelatex
+```
+
+The `demo.md` file contains a sample article describing the use of this template in generating MNRAS output via pandoc.
+
+## 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 MNRAS 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.
+* MNRAS 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 MNRAS 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/).

+ 71 - 0
mnras/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}
+}
+
+

+ 28 - 0
mnras/demo.md

@@ -0,0 +1,28 @@
+---
+preambleinput: ["macros.tex"]
+texpackages:
+- name: xspace
+#  opts:
+- name: amsmath
+#  opts:
+bibliography: demo.bib
+title: "Preparation of MNRAS Articles using Markdown and Pandoc"
+shorttitle: "MNRAS Markdown Template"
+shortauthors: Privon
+pubyear: 2018
+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 a MNRAS version of the Markdown template. It is functionally very similar to the aastex62 template but has a reduced numbers of options, reflecting the reduced complexity/flexibility compared to \aastex.
+---
+
+# Description {#sec:intro}
+
+This is a MNRAS Markdown template.
+It is similar to the aastex62 template, but modified to match 
+See the aastex demonstration for a description of how to use `pandoc` and Markdown together.

+ 4 - 0
mnras/macros.tex

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

+ 79 - 0
mnras/mnras_template.tex

@@ -0,0 +1,79 @@
+\documentclass[a4paper,fleqn,usenatbib]{mnras}
+
+\usepackage{newtxtext,newtxmath}
+
+\usepackage[T1]{fontenc}
+\usepackage{ae,aecompl}
+
+$if(texpackages)$
+$for(texpackages)$
+\usepackage
+$if(opts)$
+[
+$for(opts)$
+$opts$,
+$endfor$
+]
+$endif$
+{$texpackages.name$}
+$endfor$
+$endif$
+
+$if(preambleinput)$
+$for(preambleinput)$
+\input{$preambleinput$}
+$endfor$
+$endif$
+
+\title[$shorttitle$]{$title$}
+
+\author[$shortauthors$]{
+$for(author)$
+$author.name$,
+$if(author.affiliation)$
+$for(author.affiliation)$
+$$^{a}$$
+$endfor$
+$endif$
+$if(author.email)$
+\thanks{E-mail: $author.email$}
+$endif$
+$endfor$
+\\
+$for(author)$
+$if(author.affiliation)$
+$for(author.affiliation)$
+$$^{a}$$ $author.affiliation$\\
+$endfor$
+$endif$
+$endfor$
+}
+
+\date{$date$}
+
+$if(pubyear)$
+\pubyear{$pubyear$}
+$endif$
+
+\begin{document}
+\label{firstpage}
+\pagerange{\pageref{firstpage}--\pageref{lastpage}}
+\maketitle
+
+$if(abstract)$
+\begin{abstract}
+$abstract$
+\end{abstract}
+$endif$
+
+$if(keywords)$
+\begin{keywords}
+$for(keywords)$
+    $keywords$ --- 
+$endfor$
+\end{keywords}
+$endif$
+
+$body$
+
+\end{document}