Bookmark and Share

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


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

st: ---texdoc--- Problem with the /*tex...tex*/ feature


From   "Fagg, Jamie" <j.fagg@ucl.ac.uk>
To   "Statalist (statalist@hsphsun2.harvard.edu)" <statalist@hsphsun2.harvard.edu>
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 (http://www.stata.com/statalist/archive/2010-05/msg00882.html) suggests (as does texdoc help) that 

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

/*tex

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

tex*/"

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

        /*tex
        \documentclass{article}
        \begin{document}
        An example:
        tex*/

        /*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

Jamie


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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