The article introducing the
markstat command, "Literate Data Analysis using Stata and Markdown", is forthcoming in the Stata Journal (submitted October 2016, accepted March 2017, currently in production).
The article was written using Stata and Markdown with
markstat. Here are links to the source code, as well as HTML and PDF versions of the output (using the same script)
The article source was updated to use
bibliography option to handle all references, thanks again to the power of Pandoc. This option is described here.
In a nutshell, I use a separate bibliographic database in BibTeX format, markstat.bib (as did my journal submission). The paper uses a YAML metadata block to refer to the bibliographic database, and in the paper I cite Knuth by writing
[@knuth84]. The references section is generated automatically from the database, and includes the entry
Knuth, Donald. 1984. “Literate Programming.” The Computer Journal 27 (2): 97—111.
For the record, this is the paper's YAML metadata block:
--- title: Literate Data Analysis with Stata and Markdown author: Germán Rodríguez, Princeton University date: 3 March 2017 abstract: | I introduce `markstat`, a command for combining Stata code and output with comments and annotations written in Markdown into a beautiful web page or PDF file, thus encouraging literate programming and reproducible research. The command tangles the input separating Stata and Markdown code, runs the Stata code, relies on Pandoc to process the Markdown code, and then weaves the outputs into a single file. HTML documents may include inline and display math using MathJax. Generating PDF output requires access to LaTeX and a style file from Stata, but works with the same input file. keywords: | markdown, pandoc, latex, literate programming, dynamic documents, reproducible research. bibliography: markstat.bib ---
As you can see, it includes an abstract as well as the link to the bibliography.
Describing Markdown notation in Markdown can be tricky, and sometimes leads to a profusion of backticks; but don't be alarmed, as this will not be the case with dynamic documents on other subjects.