Statalist


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

Re: st: estout - translating a dollar sign for use in a latex file (Stata 10)


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: estout - translating a dollar sign for use in a latex file (Stata 10)
Date   Thu, 12 Nov 2009 18:31:20 -0500

Does this fix it?
....
substitute(_ \_  $  \\$  %  \% ) ///
....
Regards, Sergiy Radyakin


On Thu, Nov 12, 2009 at 3:47 PM, Devra Golbe <dgolbe@gmail.com> wrote:
> The following code using Ben Jann's wonderful -estout- (SJ) produces a
> summary statistics table in latex format.  The -substitute- option lets me
> substitute "\%" for the "%" which appears in a variable label.  I have not
> been able to figure out what combination of compound quotes, etc. is
> necessary to turn a "$" into a "\$".  I suspect that Stata reads the dollar
> sign in the -substitute- option as indicating an empty macro, but neither
> that suspicion nor a search of the help files or web has turned up a
> solution.
>
> Thanks,
> Devra
>
> ********************************
> sysuse auto
> label var price "Price ($), not (%)"
> estpost summ price weight mpg
> estimates store sum
> estout sum, ///
> title (Summary Statistics) ///
> mlabels(, none) ///
> cells ("mean (fmt(%9.2fc))  sd (fmt(%9.2fc )) count (fmt(%9.0f))")label  ///
> style(tex) ///
> substitute(_ \_  $  \$  %  \% ) ///
> prehead(\begin{tabular}{ll*{3}{r}}) ///
> posthead("\hline") prefoot("\hline") ///
> postfoot(\hline\end{tabular})
>
> ******************
> Devra Golbe
> Professor of Economics
> Hunter College /CUNY
> 695 Park Ave, NY, NY
>
>
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index