Exercise 17.21 of The TeXbook asks a question concerning \delcode:

Appendix B defines \delcode‘< so that there is a shorthand notation for angle brackets. Why do you think Appendix B doesn’t go further and define \delcode‘{?

(quotation from that source). The first sentence of the answer reads:

If \delcode‘{ were set to some nonnegative delimiter code, you would get no error message when you wrote something like ‘\left{’.

But this is not true, at least as long as { retains its usual \catcode. Indeed, the syntax rules in Chapter 26 explain that \left must be followed by a <delim>, which may be either

  • <filler>\delimiter<27-bit number>,
  • <filler><letter>, or
  • <filler><otherchar>.

Now, leaving the first alternative alone, <letter> and <otherchar> are described informally in Chapter 24, more precisely on page 283 after the syntax for <horizontal command>, as being “explicit or implicit character tokens of categories 11 and 12” (respectively): thus, certainly not a { of category 1. Actually, if you try the plain TeX code


Text before.
$$f(x)=\left{x+1\over x-1\right}+x$$
Text after.


you do get error messages (and the situation doesn’t change with LaTeX either).

I was reflecting about this inconsistency, which, as you can understand, threw me in bewilderment, all the more so in that the 2014 version of the The TeXbook reproduces the same wording I quoted above. What should I think? An incorrect statement that has incredibly slipped through all revisions and bug reports made so far? A minor, unimportant, and well known issue that the Author decided to ignore? Searching on Google for “TeXbook exercise 17.21” or on this site for “17.21” didn’t lead to anything. Please help.


Some comments suggest that I should not be asking this question at all. But please understand that we are speaking, here, of a conceptual error that would have remained hidden for more than thirty years. It seems to me that, if I were correct, the whole sense of Exercise 17.21 would be in doubt.

The answer I am expecting to get is one of the following:

  1. No, it is not an error in The TeXbook: it’s you who are in error, because…
  2. Yes, strictly speaking it is an error, but it is well known and has been ignored (and therefore, it has not been corrected) because…
  3. Yes, it is an error and I had never heard of it before (and I am pretty sure of what I’m saying).

Second addition

I also intended to mention, but I forgot to do so, the remark made on p. 345, line -13, which is even more curious: it seems indeed that Knuth had in mind { characters of category 12.

Third Addition

Regarding the comment made on line 131 of plain.tex, mentioned by Arthur Reutenauer, that reads

% N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!

the following sample code


\def\test#1{This is the argument: ``#1''.}

Text before, including a test. \test{My argument}
$$f(x)=\left\{\mathtest{x}+1\over \mathtest{x}-1\right\}+x$$
Text after.


confirms that the function of parameter-delimiting of braces of category 1 and 2 is not affected when those character do get \delcodes (not even in math mode).

  • 1
    Whether it has reported or not, you can send a bug report at karl AT freefriends DOT org (as suggested at www-cs-faculty.stanford.edu/~uno/abcde.html).
    – egreg
    Jun 25, 2015 at 17:15
  • 6
    Three is true. Of course, this is bug in TeXbook, no in TeX.
    – wipet
    Jun 25, 2015 at 17:46
  • 1
    @wipet would you write an answer? (Nice to see you around, by the way). Jun 25, 2015 at 19:04
  • 11
    +1 I don't know how many times I've read that and thought "that sounds strange what does he mean there" but never thought to make a test, I guess you are right and it's an error in the book! Jun 25, 2015 at 19:15
  • 4
    @GustavoMezzetti I think your second addition is correct: Knuth simply wrote these remarks with a { of category 12 in mind. That’s what you can read between the lines in the relevant place of plain.tex too (“N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!”). To know why, well, you’ll have to ask him :-) If he remember ... Jun 26, 2015 at 1:19

1 Answer 1


Lacking any evidence of the contrary, and in view of the comments that have been posted, I’ll assume that this is a genuine error that has somehow escaped close scrutiny until now, and I’ll proceed with the bug report. Unfortunately, I cannot think of any correction I could suggest: I repeat that, in my humble opinion, the whole exercise loses its sense.

  • 1
    I think this contribution is part of the answer to exercise 27.5 ;-)
    – jarnosc
    Jul 1, 2015 at 16:31
  • It's qurious if a test case can be devised where { has catcode 12. Did you try it? Will \left{ produce errors then? (suppose that Appendix B is not to be concerned) Sep 17, 2015 at 6:13
  • 2
    What response did you get for your bug report? Sep 18, 2015 at 6:23
  • 2
    @IgorLiferenko: I’ve seen your comment just now. The bug report has been “queued” for examination by Knuth: we must wait until his next review cycle, in… 2019, if I remember correctly.
    – GuM
    Jul 4, 2016 at 23:44
  • @GuM: Where can I find out what Kuth has said in his review cycle?
    – hh93
    Nov 3, 2020 at 12:39

You must log in to answer this question.

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