4 ms·
If I understand you correctly, you can in LaTeX. \newcommand can be used before \begin{document}, sure, but it really can be used everywhere. The only catch is
by tomsmeding 9y ago
If I understand you correctly, you can in LaTeX. \newcommand can be used before \begin{document}, sure, but it really can be used everywhere. The only catch is that the resulting definitions are global, and I know (as a programmer and mathematician) that this is all sorts of bad, but it's workable. It's definitely not an excuse to repeat yourself everywhere. ;)
- kxyvr 9y agoHa! I actually didn't know they could be defined locally, so that does help. Thanks! There really are a bunch of little things like this, like looping over subscripts, that would be nice as well. LuaTeX may make these easy, but, again, I've not had experience with it, so I'm not sure.
- jimhefferon 9y agoMacros in TeX and LaTeX certainly can loop over subscripts.