IDEAS home Printed from
   My bibliography  Save this article

Creating LaTeX documents from within Stata using texdoc


  • Ben Jann

    () (University of Bern)


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. Copyright 2016 by StataCorp LP.

Suggested Citation

  • Ben Jann, 2016. "Creating LaTeX documents from within Stata using texdoc," Stata Journal, StataCorp LP, vol. 16(2), pages 245-263, June.
  • Handle: RePEc:tsj:stataj:y:16:y:2016:i:2:p:245-263

    Download full text from publisher

    File URL:
    File Function: link to article purchase
    Download Restriction: no

    File URL:
    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)

    More about this item


    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


    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:tsj:stataj:y:16:y:2016:i:2:p:245-263. 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: (Christopher F. Baum) or (Lisa Gilmore). 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.