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
Maarten buis <[email protected]>
To
[email protected]
Subject
Re: st: sjlog with variable names containing underscores
Date
Sun, 14 Nov 2010 17:12:30 +0000 (GMT)
--- 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/