Просмотр исходного кода

note that this works for other journals too, make sure spaces exist after Tex

George C. Privon 7 лет назад
Родитель
Сommit
01b6d2d2f5
1 измененных файлов с 18 добавлено и 13 удалено
  1. 18 13
      aastex62/demo.md

+ 18 - 13
aastex62/demo.md

@@ -19,10 +19,10 @@ author:
   affiliation: ["Wesleyan University, Middletown, CT", "Brown University: Providence, RI"]
   collaboration: "(ORCID Demonstration)"
 keywords: [miscellaneous]
-software: ["[pandoc](http://pandoc.org)"]
+software: ["[`pandoc`](http://pandoc.org)"]
 facility: ["VLT"]
 abstract: |
-  Markdown provides a straightforward way to create articles and documentation in a form where the underlying text is easily readable, while also facilitating the generation of various other formats. This includes \TeX, HTML, docx, and PDF (via \TeX) files. This article and the associated code describe a template which can be used to write articles in Markdown and use the pandoc software to convert the markdown text into an \aastex-compatible tex file for submission to the AAS Journals. The advantage of this approach is ease of readability for the source files and flexibility in output formats.
+  Markdown provides a straightforward way to create articles and documentation in a form where the underlying text is easily readable, while also facilitating the generation of various other formats. This includes \TeX\, HTML, docx, and PDF (via \TeX) files. This article and the associated code describe a template which can be used to write articles in Markdown and use the `pandoc` software to convert the markdown text into an \aastex-compatible tex file for submission to the AAS Journals. The advantage of this approach is ease of readability for the source files and flexibility in output formats. We note that this approach can be applied to \TeX\ submissions for other journals and only requires the creation of an appropriate \TeX\ template file and modification of the YAML header of this demonstration document.
 ---
 
 # Introduction {#sec:intro}
@@ -31,7 +31,7 @@ abstract: |
 
 The Markdown specification was released by John Gruber in 2004^[<https://daringfireball.net/projects/markdown/>].
 Markdown was originally intended to specify a plain text format which could be converted to `html` but in which the source could easily be read.
-Since its release Markdown (and its various flavors) have been extended and become widely used, and additional output formats have become supported (Section [@sec:pandoc]).
+Since its release Markdown (and its various flavors) have been extended and become widely used, and additional output formats have become supported ([@sec:pandoc]).
 
 ## Pandoc {#sec:pandoc}
 
@@ -40,21 +40,21 @@ At present it supports 25 input formats and 47 output formats (including variati
 Pandoc is written in the Haskell programming language and supports extensions written as filters.
 This template
 
-Note that the author can write \TeX into the markdown file and `pandoc` will happily pass it through to the finished product.
+Note that the author can write \TeX\ into the markdown file and `pandoc` will happily pass it through to the finished product.
 However, this may compromise alternate (non-\TeX) output formats.
-For example, the \aastex `deluxetable` environment can be used, but will not properly render in non-\TeX formats.
+For example, the \aastex `deluxetable` environment can be used, but will not properly render in non-\TeX\ formats.
 Pandoc filers^[<https://pandoc.org/filters.html>] may be crafted to convert simple `pandoc` tables into `deluxetable`s on the fly, if desired.
 
 ## Paper Organization
 
-We broadly divide this article into demonstrations of how to prepare a manuscript in Markdown such that it generates nearly-submittable \TeX (Section [@sec:prep]).
+We broadly divide this article into demonstrations of how to prepare a manuscript in Markdown such that it generates nearly-submittable \TeX\ ([@sec:prep]).
 This includes how to specify the article style via the YAML header of the markdown file ([@sec:style]).
-We then demonstrate how to include images (Section [Images]), tables (Section [Tables]), and citations ([Citations]).
+We then demonstrate how to include images ([@sec:images]), tables ([@sec:tables]), and citations ([@sec:citations]).
 We the conclude by discussing some practical considerations for this paper writing process ([@sec:notes]).
 
-We remind the reader that this approach can be extended to the templates of other journals by modifying the YAML header in the markdown file and the \TeX template file.
+We remind the reader that this approach can be extended to the templates of other journals by modifying the YAML header in the markdown file and the \TeX\ template file.
 
-The Markdown file, `pandoc` invocation, and associated filters used to create the \TeX for this document are available at: <https://github.com/privong/papers-in-markdown>.
+The Markdown file, `pandoc` invocation, and associated filters used to create the \TeX\ for this document are available at: <https://github.com/privong/papers-in-markdown>.
 
 # Manuscript Preparation in Markdown {#sec:prep}
 
@@ -64,9 +64,9 @@ The Markdown file, `pandoc` invocation, and associated filters used to create th
 
 ## Tables {#sec:tables}
 
-This tool will pass \latex tables through pandoc to the chosen \latex parser.
+This tool will pass \latex tables through `pandoc` to the chosen \latex parser.
 Thus, any tables which are part of \aastex will work for producing pdfs.
-However, those will not propagate through to other output formats with which pandoc is compatible.
+However, those will not propagate through to other output formats with which `pandoc` is compatible.
 
 This is an example of a "simple table"^[<https://pandoc.org/MANUAL.html#tables>]:
 
@@ -110,7 +110,7 @@ These citations take the form of: `[@Astropy2018]` to correspond to [@Astropy201
 Naively `pandoc` does not presently support internal reference to figures or equations and does not support numbered section references.
 However the `pandoc-crossref`^[<https://github.com/lierdakil/pandoc-crossref>] filter adds support for this (and has been used in the preparation of this document).
 Note that `pandoc-crossref` uses the same syntax as `pandoc-citeproc`, the former filter must be invoked before the latter.
-For example the \TeX for this document was generated with:
+For example the \TeX\ for this document was generated with:
 
     pandoc demo.md -s --template aastex62_template.tex -o demo.tex \
                    -F pandoc-crossref -F pandoc-citeproc
@@ -122,7 +122,12 @@ We have already seen two filters, `pandoc-citeproc` and `pandoc-crossref`.
 These filters enable customizable processing of documents during conversion and can be written in Haskell, lua, or python^[Using either the `panflute` or `pandocfilters` modules.].
 
 With output formats besides \aastex\ in mind, the acknowledgements portion of the document has been delineated in the markdown file as a top-level section.
-However, is desirable to automatically convert this to a `\acknowledgements` macros when creating a \TeX file.
+However, is desirable to automatically convert this to a `\acknowledgements` macros when creating a \TeX\ file.
+As a filter demonstration, the following lua code performs this translation:
+
+
+
+If can be invoked by adding `--lua-filter=filters/acknowledgments.lua` to the `pandoc` invocation.
 
 # Acknowledgments