IDEAS home Printed from
   My bibliography  Save this paper

Creating LaTeX documents from within Stata using texdoc


  • Ben Jann



This paper discusses 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. The command can be used, for example, to assemble automatic reports, write a Stata Journal article or a Stata Press book, prepare slides for classes, or put together solutions for homework assignments. An earlier version of this paper has been published in The Stata Journal 16(2): 245-263 (see:

Suggested Citation

  • Ben Jann, 2015. "Creating LaTeX documents from within Stata using texdoc," University of Bern Social Sciences Working Papers 14, University of Bern, Department of Social Sciences, revised 27 Nov 2016.
  • Handle: RePEc:bss:wpaper:14

    Download full text from publisher

    File URL:
    File Function: Revised version, 2016
    Download Restriction: no

    File URL:
    File Function: Published version, 2016
    Download Restriction: no

    Other versions of this item:

    References listed on IDEAS

    1. Ben Jann, 2007. "Making regression tables simplified," Stata Journal, StataCorp LP, vol. 7(2), pages 227-244, June.
    Full references (including those not matched with items on IDEAS)


    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.

    Cited by:

    1. Orozco, Valérie & Bontemps, Christophe & Maigné, Elise & Piguet, V. & Hofstetter, A. & Lacroix, Anne & Levert, F. & Rousselle, J.M, 2018. "How To Make A Pie: Reproducible Research for Empirical Economics & Econometrics," TSE Working Papers 18-933, Toulouse School of Economics (TSE).

    More about this item


    Stata; texdoc; LaTeX; weaving; Stata output; Stata log; reproducible research;

    JEL classification:

    • C87 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Econometric Software
    • C88 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Other Computer Software

    NEP fields

    This paper has been announced in the following NEP Reports:


    Access and download statistics


    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:bss:wpaper:14. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Ben Jann). General contact details of provider: .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.