Home  >>  Archives  >>  Volume 16 Number 4  >>  pr0064

The Stata Journal
Volume 16 Number 4: pp. 964-988

Subscribe to the Stata Journal

markdoc: Literate programming in Stata

E. F. Haghish
Center for Medical Biometry and Medical Informatics
University of Freiburg
Freiburg, Germany
Department of Mathematics and Computer Science
University of Odense
Odense, Denmark
Abstract.  Rigorous documentation of the analysis plan, procedure, and computer codes enhances the comprehensibility and transparency of data analysis. Documentation is particularly critical when the codes and data are meant to be publicly shared and examined by the scientific community to evaluate the analysis or adapt the results. The popular approach for documenting computer codes is known as literate programming, which requires preparing a trilingual script file that includes a programming language for running the data analysis, a human language for documentation, and a markup language for typesetting the document. In this article, I introduce markdoc, a software package for interactive literate programming and generating dynamic-analysis documents in Stata. markdoc recognizes Markdown, LATEX, and HTML markup languages and can export documents in several formats, such as PDF, Microsoft Office .docx, OpenOffice and LibreOffice .odt, LATEX, HTML, ePub, and Markdown.
Terms of use     View this article (PDF)

View all articles by this author: E. F. Haghish

View all articles with these keywords: markdoc, Markdown, HTML, LaTeX, literate programming, dynamic documents, reproducible research, log file, translator

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS