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]
Antwort: st: -eststo- -esttab- and $ in LaTex code
From
Johannes Geyer <[email protected]>
To
[email protected]
Subject
Antwort: st: -eststo- -esttab- and $ in LaTex code
Date
Thu, 24 Feb 2011 15:23:14 +0100
or you can do the following:
***************************
#d;
sysuse auto;
lab var price "Total assets = \\\$10M";
logit foreign price rep78 weight;
esttab using c:\temp\test.tex, title(Test for different effects at \\$2M,
\\$10M, and \\$43M) replace label;
***************************
Stata uses the Dollar-sign for globals and you need to escape the
baskslash:
http://www.stata.com/support/faqs/lang/backslash.html
Johannes
[email protected] schrieb am 24/02/2011 10:55:43:
> ...
> you can circumvent this issue with \textdollar.
>
> ***
> sysuse auto
> logit foreign price rep78 weight
> esttab, title(Test for different effects at \textdollar 2M, \textdollar
> 10M, and \textdollar 43M)
> ***
>
> best,
> richard
>
> [email protected] schrieb am 23.02.2011 23:17:07:
>
> > I am using Ben Jann's -estout- and, more specifically, its -esttab-
> command
> > to create regression tables in LaTex format.
> >
> > I haven't found a way within -esttab- to control dollar signs that are
> > part of my table captions and variable label names so that the
> > command produces
> > LaTex code with a backslash (\) preceding each $. Consequently, I am
> having
> > to manually type backslashes into the Tex code to get LaTex to
compile.
> > Doing this once or twice is not burdensome but when I need to rerun
the
> > Tex code several times as I tweak the -esttab- settings, it takes
time.
> >
> > For instance, in -esttab- I have a table caption of:
> > title(Test for different effects at \$2M, \$10M, and \$43M)
> >
> > The Tex code produced by -esttab- does not have the backslashes in
> > this caption and, thus, LaTex will not run unless I manually type them
> into
> > the code.
> >
> > In addition to captions, the same thing happens for variable label
> names.
> > For instance, I name a variable label "Total assets = \\$10M".
> > -esttab- does not produce a backslash before the dollar sign. Thus, I
> > am forced to manually type a backslash in front of that dollar sign
> > to get LaTex to compile.
> >
> > Is there a way to get the backslashes before the dollar signs into
> > the Tex code for table captions and variable label names using
-esttab-?
> >
> >
> >
> > *
> > * 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/
*
* 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/