Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | William Buchanan <william@williambuchanan.net> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: LaTeX in variable labels for esttab |
Date | Fri, 25 May 2012 09:15:21 -0700 |
Hi Bert, If you use some of the other options (e.g., to denote the end of a line, delimiting columns, headers/footers, etc...) you could export as tab delimited and avoid any of the LaTeX protections. It isn't a direct solution but it can at least get you a working solution for the moment. - Billy Sent from my iPhone On May 25, 2012, at 9:06, Bert Lloyd <bert.lloyd.89@gmail.com> wrote: > Dear Statalist, > > I have a question about creating LaTeX tables using esttab (version > 2.0.5 09mar2009, downloaded by -net install estout.pkg-). > > I would like to include LaTeX markup in the variable labels. For > example, suppose I have a variable rho_1 and I would like it to appear > in the table as a rho symbol with a 1 subscript. > > In stata, I create the label as follows" > label variable rho_1 "$\rho_{1}$" > > and call esttab using the label option. > > However, esttab protects the underscore character by adding a > backslash, so the LaTeX code that is created is: > $\rho\_{1}$ > and what appears in the compiled pdf is a rho symbol, followed by an > underscore, followed by a 1 (not as a subscript). > > Is there a way to turn off this protection? (Which, of course, makes a > great deal of sense in many contexts.) > > Best, > > BL > > PS - Stata 11.2 SE on Windows 7 64 bit, with the same phenomenon > observed on Stata 12. > * > * 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/