Skip to content

Installation

E. F. Haghish edited this page Jun 11, 2019 · 11 revisions

MarkDoc package can ONLY be installed from Github and is not hosted on SSC any longer. The Stata github package can be used to install MarkDoc or any other Stata package hosted on Github. If you don't have the github command installed, type:

net install github, from("https://haghish.github.io/github/")

Next, to install MarkDoc along with its dependencies from GitHub, type:

github install haghish/markdoc, stable 

Dependencies

The command above installs MarkDoc and its dependencies (other Stata packages), which are:

github installs the dependencies by executing dependency.do file in the Github repository after installing MarkDoc. This file includes the commands needed for installing the package dependencies.

Required third-party software

MarkDoc also requires 3 third-party software, which are:

Having Pandoc installed on your system is rather necessary because many features of MarkDoc rely on Pandoc. The pdfLaTeX is optional, but required for generating PDF slides and typesetting documents written in LaTeX. If you write your document using Markdown and do not intend to generate dynamic PDF slides within Stata, you don't need to install pdfLaTeX. The wkhtmltopdf is only required for generating PDF documents from Markdown. Luckily, Pandoc and wkhtmltopdf can be installed automatically (see below).

Automatic installation of third-party software

The markdoc command includes the install option, which downloads the Pandoc and wkhtmltopdf software automatically if they are not already installed or cannot be accessed by markdoc. The automatic installation was successfully tested on Mac OS X (10.9 and 10.10); 32-bit and 64-bit versions of Microsoft Windows (XP, 7, 8); Microsoft Windows 10 (64-bit); and Linux Ubuntu 14.04 (64-bit), Mint 17 (32-bit and 64-bit), and CentOS 7 (64-bit). However, manual installation is generally recommended because it ensures the installation of the latest version of the software.

markdoc installs the required software in a directory named Weaver inside the plus directory, where Stata expects to find user-written ado-files. The path to the \ado\plus\ directory can be found using the sysdir command, which lists Stata’s system directories. For Stata 13 and 14, the default Weaver directory paths are shown below based on the operating system.

Windows: C:\ado\plus\Weaver
Mac OS X: ~/Library/Application Support/Stata/ado/plus/Weaver
Linux: /home/username/ado/plus/Weaver

Manual installation

Users can also download and install these software manually and define the paths to executable software in MarkDoc. For example, if you wish to create a dynamic document

The users can also permanently define the paths to these software using the weave setup command which memorizes the paths to the executable Pandoc and wkhtmltopdf permanently, even if MarkDoc package gets updated. The path information is stored in an ado file named weaversetup.ado, which can be found in /PLUS/w/weaversetup.ado.

Continue reading about weave setup in its separate page...