By "bind more tightly" I refer to the order in which operations are carried out by default.

Experimenting shows that if \ab is ab and \cd is cd then \ab^\cd is ab^cd. I would like it to be {ab}^{cd}. Of course, I can do this by defining \ab to {ab} and \cd to {cd} but that's not always an acceptable solution; for example, if \cd is actually c^d then \cd_2 is c^d_2 but if \cd is {c^d} then \cd_2 is {c^d}_2. Indeed, if \cd is c^d then with the current precedence, \ab^\cd produces a complaint about double superscripts but changing the precedence would make it {ab}^{c^d} which is fine.

(NB I've tried to present the simplest case that I can; the actual macros that I'm using are considerably more complicated and introducing braces into these macros is much more problematic than in the simplistic case above. In particular, they are recursively defined and so introducing new braces at the outside actually introduces new braces at several inconvenient spots inside as well.)

2 Answers 2


You can't change this behaviour directly, no. However, the breqn package makes ^ and _ active characters that behave as macros that take arguments ‘like normal’, which then has the effect you're looking for. So if you're happy to load breqn, that should fix your problem:

  • Perfect! I notice that the actual bit that I want is handled by the mathstyle package; but the whole mh package looks like one that I'd consider loading by default. (Bizarrely, on Ubuntu I had to install a package called "texlive-latex3" to get this lot.) Jul 28, 2010 at 11:37

Another option is to add an extra group in the definition of the macros. For example


However, depending on the actual usage, an additional group may not be desirable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.