Home  >>  Archives  >>  Volume 17 Number 3  >>  pr0067

The Stata Journal
Volume 17 Number 3: pp. 600-618



Subscribe to the Stata Journal
cover

Literate data analysis with Stata and Markdown

Germán Rodríguez
Princeton University
Princeton, NJ
[email protected]
Abstract.  In this article, I introduce markstat, a command for combining Stata code and output with comments and annotations written in Markdown into a beautiful webpage 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.
Terms of use     View this article (PDF)

View all articles by this author: Germán Rodríguez

View all articles with these keywords: markstat, Markdown, Pandoc, LaTeX, literate programming, dynamic documents, reproducible research

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS