I am trying to label variables in Stata for a table in Latex. I have tried several different ways and have run into different issues. The labels as they appear in the Stata variables window are correct, but when I actually run the esttab command, the labels in the tex file either contain additional backslashes or have dropped characters. I suspect this has something to do with needing to escape the characters, but I haven't figured out precisely what is causing the issue.
When I label the variables in the following way:
The output in the text file is:
which causes issues with the subscript when I try to compile the table since it is treating the underscore as a character.
I have also tried
which results in
I would really appreciate any help in understanding what is happening here. Most of what I was finding pertained to intentionally adding backslashes, so I am pretty confused about what I need to change to get rid of them.
Thanks!
When I label the variables in the following way:
Code:
la var temp "$\textnormal{Temperature}_{it}$" la var tempdev "$\textnormal{u}_{it}$"
Code:
$\textnormal{Temperature}\_{it}$ $\textnormal{u}\_{it}$
I have also tried
Code:
la var temp "Temperature$_{it}$" la var tempdev "u$_{it}$"
Code:
Temperature{it}$ u{it}$
Thanks!
Comment