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--- Problem with the /*tex...tex*/ feature

From   "Fagg, Jamie" <>
To   "Statalist (" <>
Subject   st: ---texdoc--- Problem with the /*tex...tex*/ feature
Date   Thu, 26 Jan 2012 18:27:50 +0000

Dear list,

I have been learning to use Ben Jann's program -texdoc- to weave results into a latex document. While generally it's been a great way to start using Latex and very rewarding I have had one problem so far.

David Airey ( suggests (as does texdoc help) that 

"you enclose blocks of LaTeX in your .do file between


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


This Is obviously a nice, clean way to write the code. However, when I try to do this using Stata 11.2 on Windows with the Stata do file editor, it comments everything out and doesn't send anything to the .tex file.

I tried the example from the help (see code fragment from the do file below). When I opened it in TeXnicCenter it doesn't seem to work. I'm sure that texdoc does work with TeXnicCenter as the second fragment with the tex prefix before every line does work. Could you give me pointers as to what's going wrong with my code / setup? 

---code fragment 1 (example which doesn't work) begins---
        texdoc init example2, replace

        An example:

        /*tex \end{document} tex*/
        texdoc close
---code ends---

---code fragment 2 (example which does work) begins--- texdoc init example2, replace tex \documentclass{article} tex  \usepackage{stata} tex  \begin{document} An example:
tex  \end{document}
texdoc close
---code ends---

Best wishes


*   For searches and help try:

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