Closed NilsEnevoldsen closed 9 years ago
I think this is the minimum necessary to fix this particular issue, but it might be worthwhile to bump the other programs as well.
(I would prefer to retain support for version 8.2.) The reason why \ gets stripped is that Stata thinks one of the \ is an escape character to delay macro expansion. In estout.ado I tried to be consistent and always work with macval() to prevent such problems. A similar approach could be followed in estpost.ado.
If the desired output is LaTeX, maybe simple use \newline instead of .
Oh, interesting, markdown also kills the double backslash.
Ah. But other programs, like estpost_stci, are already version 9.2.
Would you accept a pull request that uses macval()
s instead?
You can wrap code in backticks: \\
.
\newline
doesn't work in this particular instance (\shortstack{}
), unfortunately.
Some of the estpost subroutines require Stata 9 (indicated in the helpfile, but not very prominently) as they are based on stuff that's not available in Stata 8. But in general, estpost still supports Stata 8.
Got it.
Would you accept a pull request that uses macval()
s instead?
Sure. But note: I'm not using github in the way you're supposed to. I keep my own master version of estout that is not connected to github. When I change stuff, I change it on my computer. Once in a while, when I send an estout update to SSC, I push the new version to github. So it doesn't really matter whether I accept a pull request on github because it will get lost with the next update anyway. (Why is it called "pull request" by the way, I find the github slang quite confusing.) If a suggestion makes sense to me, however, I will add it to my private version of estout so that it will appear in the next update. I'll also try to accept the pull request on github so that you know I saw your suggestion and made changes to estout accordingly (although the changes I actually do might not be identical to the suggested changes).
I see. No problem. A pull request is still probably the easiest way to show you the suggested changes, so I'll continue to do that.
A note about terminology. In order to suggest a change to estout, I:
We're all still a bit confused by this, but the reason is probably:
Pushing to a remote means pushing code changes from your local code repository (your computer) to a remote repository. But I can't push code to your repo, so instead I request you to pull those changes.
Edit: Nils beat me to it.
I see, makes sense.
Here's a version that uses -macval()- instead. I kept the scope narrow. I don't know if eqnames needs similar treatment to eqlabels, for example. The single change to estpost_tabulate_twoway should probably also be made to estpost_tabulate_oneway.
I now uploaded an update that implements the macval()
approach. It also affects estpost svy:tablulate
and estpost stci
. The commands estpost tabstat
, estpost tabulate
, estpost svy:tabulate
, and estpost stci
now also have a new elabel
option to enforce saving labels in e()
. By default these programs use the labels as names in the stored vectors unless the labels are too long or contain certain special characters.
Made some more changes to improve support of labeled by()
variables in estpost tabstat
.
:+1:
Input:
Expected result:
Actual result:
Possible fix:
Bump version of
_estpost_eqnamesandlabels
andestpost_tabulate*
from 8.2 to >=9.0. There might be analogous problems with subroutines other than tabulate or with_estpost_namesandlabels
that would also be fixed by this bump, but I haven't checked them.