Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: texdoc

From   "Airey, David C" <david.airey@Vanderbilt.Edu>
To   "" <>
Subject   st: texdoc
Date   Sun, 16 May 2010 23:14:05 -0500


I just wanted to remind users about Ben Jann's program "texdoc" as one solution for combining Stata results and graphs with documentation, in a "weaving" fashion, similar to R and Sweave. It works well with relatively simple documents one might produce for a course.

In Ben's program, you basically type in your .do file:

texdoc init myfile, replace

and then you enclose blocks of LaTeX in your .do file between


...stuff like LaTeX preamble, graphics, body text, etc.


and enclose blocks of Stata commands with

texdoc stlog


texdoc stlog close

and end with

texdoc close

With that structure in your .do file, you type,

texdoc, replace

to create all the .tex files and include files. Then you LaTeX the .tex file to produce a very pretty PDF.

You also have to download sjlatex and if on a mac, install sjlatex files here:


and also if you are on a mac, a very easy MacTeX installation is available.


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index