When using the package breqn I got some compile errors. Without the package this works just fine. (I am using xelatex.)



This does not work: $A_\cat{C} = 0$.

Gives the (not so useful) error:

! Argument of \cat has an extra }.
<inserted text> 
l.7 This does not work: $A_\cat
                               {C} = 0$.

Now it is easily fixed by putting extra curly brackets around \cat{C}.

Since I have a solution, my actual question is: is it wrong (or bad habit) to leave out the curly braces in plain LaTeX in this situation?

And: how can breqn break this?

  • 2
    If you want more than one token in a subscript, use braces A_{\cat{C}}. Sometimes it works without braces, but you shouldn't expect that.
    – Manuel
    Nov 26, 2014 at 14:08
  • 2
    "And: how can breqn break this?" breqn can break more or less anything, it completely redefines more or less every command related to math typesetting. the fact that it takes input that superficially looks like normal tex math input should not lull you into a false sense of security:-) Nov 26, 2014 at 14:21
  • I now see that this is also mentioned in the breqn documentation: texdoc.net/texmf-dist/doc/latex/mh/breqn.pdf section 6.4
    – Jaxan
    Nov 26, 2014 at 14:31

1 Answer 1


It is a bad habit to get in to. The offical (Latex book) syntax always has braces even for x_{2} although everyone sort of knows that x_2 works.

The fact that x_\mathbf{x} works is related to the details of the tex primitive parsing of _ and the fact that it is completely unlike macro argument parsing. If you have a macro \x with one argument then the argument in


is just \mathbf without \mathbf's argument {x} and things will go wrong.

It is often convenient to make _ an active character then define it to by


and perhaps include additional processing.

If you do that and omit the braces you end up with



 x\sb{\mathbf}  {x}

and things go wrong.

tex4ht needs (last time I checked, at least) this to generate html markup, breqn apparanetly needs it to do what it needs to do, many editors will similarly not know where the subscript ends if you do not brace it.

  • Thanks for the nice example of \x\mathbf{x}!
    – Jaxan
    Nov 26, 2014 at 14:31
  • With breqn, _ receives math code "8000 and its definition as active character is _=macro: #1->\mathsub {\protect \subsupstyle #1}. so the reference to \def_#1{\sb{#1}} is a good approximation of what actually happens.
    – egreg
    Nov 26, 2014 at 15:43
  • @egreg I know:-) Nov 26, 2014 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .