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]

AW: st: Table Export of suffix / index


From   "Meulemann Max" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   AW: st: Table Export of suffix / index
Date   Fri, 11 Jan 2013 14:10:44 +0000

Though it is not the most important problem in the world, maybe someone else will have it. My solution was to use the \fixltx2e package in latex and then adjust the labels to include a \textsubscript{2} so I could label my variables into
label var CO2 "CO\textsubscript{2} 

that works fine for the regression tables but not suxtex, but you cant ask for the world.

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Lovisa Persson
Gesendet: Freitag, 11. Januar 2013 10:57
An: [email protected]
Betreff: RE: st: Table Export of suffix / index

Hello,

Yes you are right, symbols and greek letters work but apparently, any mathematical solution does not.
Sorry, I don't know the solution!

Lovisa

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Meulemann Max
Sent: den 10 januari 2013 18:47
To: [email protected]
Subject: AW: st: Table Export of suffix / index

Thx for the tip, but it is somehow strange. 

If I was looking for filling in a greek lamdba it would work when I add coeflabels(CO2capita "$\lambda$")

but when I try

coeflabels(CO2capita "$CO_2$")

he only exports one $

Nobody else ever had that problem?


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Lovisa Persson
Gesendet: Donnerstag, 10. Januar 2013 15:47
An: [email protected]
Betreff: RE: st: Table Export of suffix / index

Hello,

In esttab I write:   coeflabels(income "$\lambda$") and then the latex table
shows the greek lamba letter nicely.

In estout I write:   label varlabels(income "$\lambda$") and it also works
nicely!

Lovisa

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Aljar Meesters
Sent: den 10 januari 2013 15:32
To: [email protected]
Subject: Re: st: Table Export of suffix / index

Since Stata treats $ as a global macro reference, you have to escape it with \.
This should work (at least in Stata 11.2) label var x "\$CO_2\$"
Best,

Aljar


2013/1/10 Meulemann  Max <[email protected]>:
> That is what I am trying to label my variable so that Latex would 
> understand it as a math environment input
>
> Therefore I tried label var x $CO_2$ which would give the proper 
> chemical
notation and not an italic CO, I just checked.
>
> I will consider the manual -estout- way, but it would just be nice to 
> find way to solve it directly with labelling, so that I don't have to 
> adapt every -estout command individually
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Nick Cox
> Gesendet: Donnerstag, 10. Januar 2013 15:19
> An: [email protected]
> Betreff: Re: st: Table Export of suffix / index
>
> You have to use Stata to write LaTeX code, which is then interpreted
externally. Stata does not interpret LaTeX mark-up internally. Note in particular that the $ sign is used in Stata in global macro references (when it is not taken literally as a dollar sign). So using $ $ or $$ $$ to indicate math[s] would be difficult at best in Stata.
>
> By the way, $CO_2$ in LaTeX gives you italic "CO", which is not 
> standard
for chemical notation.
>
> Nick
>
> On Thu, Jan 10, 2013 at 2:07 PM, Meulemann  Max <[email protected]>
wrote:
>> Im using Stata 12. I d like to directly export variables label names 
>> like
CO_2 or x^2 so that Latex will display them properly when I tell tabout, sutex or estout to use labels.
>>
>> I tried several version like
>>
>> label var x "$CO_2$"
>> or
>> label var x "\[CO_2\]
>>
>> but I either just get a $ or $\backslash$
>>
>> Is there a way to label the variable properly that latex understands it.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index