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

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

 From "Airey, David C" To "statalist@hsphsun2.harvard.edu" Subject re: st: ---texdoc--- Problem with the /*tex...tex*/ feature Date Thu, 26 Jan 2012 18:57:05 -0600

.

It is still working for me under Stata 12 using version 11.2 version control. I use texdoc in non-interactive mode. I can send you an example off-list that works for me, for you to see if they work for you.

You might try putting your /*tex ... tex*/ on different lines, like,

/*tex

\end{document}

tex*/

-Dave

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