This question already has an answer here:

In some packages like tabularx, I find the following syntax in many places


or even


But I can't figure out why this can be useful for? Is ` a register of some kind? Or is it a TeX-hack to generate error on specific occasion ?

marked as duplicate by Manuel, Andrew Swann, user31729, Werner, zeroth Jul 9 '14 at 14:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Ah the \ifnum funky brace groups beloved of TeX\halign programmers:-)


is part of the syntax for a number in TeX.


is a decimal


is hex and


is the character code of the specified character (which is also 125 as it happens).



the inner \ifnum is testing if 0=125 which is false so when expanded this is equivalent to { so starts a brace group. However if the tokens are not being expanded and TeX is just looking for matching {} pairs then it sees that as a matching pair so you can go

\def\foo{  {\ifnum0=`}\fi }


\def\foo{  {  }

is an error (or at least does not stop at that }.

Usually you can use implicit brace groups \bgroup and \egroup to use an unmatched { but some constructs demand an explicit { token and so this trick (explained by Knuth in the TeXBook comes in useful).

Usually if you find that an environment that uses & to separate alignment cells does not work in a nested alignment it is because the author forgot to use these groups in the definition.

  • I suppose than the second version I provided is for getting the }. "Funky brace groups" you said? :) – M'vy Jul 9 '14 at 13:23
  • @M'vy Yes, the second one is the 'matching pair' here – Joseph Wright Jul 9 '14 at 13:26

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