MarkDoc is a general-purpose literate programming package for Stata. MarkDoc is very simple and intuitive to use, yet a powerful software for creating dynamic documents interactively in a variety of formats such as sthlp, pdf, docx, tex, html, odt, epub, and markdown. The software has a considerable focus on making literate programming easy-to-learn and practice for newbies. Therefore, it can be taught to undergraduate students in introductory courses to document code and practice statistical reporting. Continue to MarkDoc documentation...
NEWS: markdoc
has a new option - mini
- that allows Generating HTML, Docx, and PDF documents without requiring Pandoc and wkhtmltopdf. It also offers a new GUI for the engine (type db mini
). The mini
option allows markdoc to run without checking Pandoc or wkhtmltopdf and produce the document within Stata 15. Read more about the mini
mode...
MarkDoc package vignette (PDF)
Need help? Ask your questions on statalist.org
Need more help? Contact the author to plan a workshop in your department or company
MarkDoc requires a few other Stata packages. The github package
can be used to install MarkDoc and all of its dependencies as shown below. Using github
package is highly recommended.
github install haghish/markdoc
NEWS: MarkDoc v. 4.1.0 introduced the
mini
option to make MarkDoc independent of third-party software that are mentioned below. If you do not wish to install the binaries, Read more about the mini
mode...
MarkDoc - if not executed in mini
mode - requires 3 third-party software, which are:
The pdfLaTeX is optional, but required for generating PDF slides and typesetting documents written in LaTeX. The wkhtmltopdf is only required for generating stylish PDF documents (you can create PDF documents in the mini
mode as well). MarkDoc provides optional automatic installation of pandoc and wkhtmltopdf if the install
argument is specified. You can read more about the installation in the manual...
To further facilitate using MarkDoc for beginners, a dialog box was written for Stata, which covers all features and most of the important options of MarkDoc. The dialog box supports all three engines of MarkDoc for creating dynamic document, dynamic presentation slides, and package vignette (e.g. Stata help files, package manual, etc).
To use the dialog box, type:
db markdoc
The dialog box is documented in details in the manual. Stata users that are new to MarkDoc are encouraged to have a look at the dialog box to get an idea of what they can do with MarkDoc.
The dialog box mentioned above is for the fully installed MarkDoc, that generates dynamic documents, presentation slides, and package vignettes in various document formats, which require installation of Pandoc and wkhtmltopdf. However, as said earlier, MarkDoc also has a light weight mini
mode that allows generating dynamic documents without requiring third-party software. This mode also has its own GUI that makes learning MarkDoc much easier. To run the GUI, type:
db mini
As you see, the mini
mode supports producing most of the formats, yet it is all written within Stata!
Wish to develop handouts or presentation slides within Stata? MarkDoc has a built-in syntax highlighter for Stata code in HTML, LaTeX, and PDF formats, including presentation slides! You can also add the syntax highlighter to your blog! Read how...
Much effort was put to develop a syntax highlighter for Stata, which was not available before. This just shows how caring MarkDoc is, when it comes to teaching statistics! MarkDoc was intended to be used in daily routine, as early as introductory statistics courses to help students document their code and read it with more care.
E. F. Haghish, Ph.D.
Department of Medical Psychology and Medical Sociology,
University of Göttingen, Germany