/MarkDoc

A literate programming package for Stata which develops dynamic documents, slides, and help files in various formats

Primary LanguageStata

MarkDoc : a general-purpose literate programming package for Stata

SILLY LITTLE change

A general-purpose literate programming package for Stata that produces dynamic analysis documents or package documentation in various formats (pdf, docx, html, odt, epub, markdown), dynamic presentation slides (pdf, slidy, dzslide), as well as dynamic Stata help files (sthlp, smcl). MarkDoc is very simple and intuitive to use and can be simply applied even in introductory statistics courses and workshops. This is a useful tool for teaching statistics, practicing statistics, data analysis, and also developing new packages.

Author

E. F. Haghish
Center for Medical Biometry and Medical Informatics University of Freiburg, Germany
haghish@imbi.uni-freiburg.de
http://www.haghish.com/markdoc
@Haghish

Installation

The MarkDoc releases are also hosted on SSC server. So you can download the latest release as follows:

ssc install markdoc

You can also directly download MarkDoc from GitHub which includes the latest beta version (unreleased). The force option ensures that you reinstall the package, even if the release date is not yet changed, and thus, must be specified.

net install markdoc, force  from("https://raw.githubusercontent.com/haghish/markdoc/master/")

MarkDoc also requires two additional Stata packages which are weaver and statax, both hosted on SSC.

ssc install weaver
ssc install statax

Finally, in order to use a document conversion (i.e. exporting Microsoft Word, PDF, HTML, LaTeX, ePub, etc,...) MarkDoc requires two additional third-party software which are Pandoc and wkhtmltopdf. Furthermore, for Typesetting LaTeX documents, a complete distribution of LaTeX is required. The complete guide for installing them is provided in the MarkDoc help file and also, MarkDoc Homepage

Additional script files

MarkDoc requires 3 other script files from Weaver package which are img, txt, and tbl. These files are required for dynamically inserting image, writing dynamic text/markup, and creating dynamic tables. For updating these files see the Weaver package

Package Structure

The main engine of MarkDoc is markdoc.ado. For producing Stata help files and SMCL files, you should read sthlp.ado, markup.ado, and markdown.ado. Here is a description of other script files:

markdocversion.ado checks the new updates available for MarkDoc, if there is any
markdoccheck.ado checks the required third-party software on the machine and if the install option is specified, it install the required software
markdocpandoc.ado installs Pandoc automatically, if the install option is specified and the software is not found markdocwkhtmltopdf.ado installs wkhtmltopdf automatically, if the install option is specified and the software is not found