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]

Re: st: sjlog with variable names containing underscores


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: sjlog with variable names containing underscores
Date   Mon, 15 Nov 2010 09:13:38 +0100

Note also that the problem does not arise if you place 

\begin{stlog}

\end{stlog}

around the tex-file created with -sjlog-.

Example: Thise tex-file 


----------------------------------------x.tex
\documentclass{article}
\usepackage{stata}

\begin{document}
\begin{stlog}
  \input{y.log.tex}
\end{stlog}
\end{document}
...............................................


compiles without any problems (despite "gear_ration") if you create
"y.log.tex" with


sysuse auto
sjlog using y, replace
describe
sjlog close, replace


Am Sonntag, den 14.11.2010, 17:12 +0000 schrieb Maarten buis:
> --- On Sun, 14/11/10, Venablewrote:
> > I really like the sjlog command for creating
> > latex-compatible log files.
> > 
> > However, I am having a small problem:
> > 
> > I frequently use underscore characters in variable names,
> > and LaTeX interprets underscore as "start doing math and
> > begin a subscript."
> 
> You can replace all these occurances of _ in Stata using
> the -filefilter- command, like so:
> 
> *--------------------- begin example -------------------
> cd c:\temp
> use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear
> clonevar race_clone = race
> sjlog using desc_hsb2, replace
> describe
> sjlog close, replace
> 
> filefilter desc_hsb2.log.tex desc_hsb2_.log.tex, ///
>     from("_") to("\BS_") replace
> *---------------------- end example ---------------------
> 
> Hope this helps,
> Maarten
> 
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> 
> http://www.maartenbuis.nl
> --------------------------	
> 
> 
> 
>       
> 
> *
> *   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/


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