Ben Jann
I discuss the use of texdoc for creating LaTeX documents from within Stata. Specifically, texdoc provides a way to embed LaTeX code directly in a do-file and to automate the integration of results from Stata in the final document. One can use the command, for example, to assemble automatic reports, write a Stata Journal article, prepare slides for classes, or put together solutions for homework assignments.