I'd like to know how to tag questions regarding the TeXbook contents (i.e. lessons, exercises ...).

Going by the description of :

Questions about texbook.tex, the source of The TeXbook.

it does not seem sensible to misappropriate that tag.

Minor details, like me being unable to create a new tag on my own accord (due to low reputation), aside: what would be the appropriate tag here? Simply use ?

Here is an example question that I'd like to pose on the main page soon, but I refrained from it for now, because of the tagging "issue":

Exercise 5.6 of the TeXbook by Knuth reads:

If you think you understand local and global definitions, here's a little test to make sure: Suppose \c stands for \count1=, \g stands for \global\count1=, and \s stands for \showthe\count1. What values will be shown?


When I tried to follow this in my mind and enter the "expanded" form, I came up with:


But this gives me an error. In fact this MWE does as well:


What's going on here?

btw: my guess was 1 2 3 4 5 4 6 4, but I cannot verify. I know this is rated two dangerous bends, but I found it intriguing and so decided to give it a try.

(example question ended at the horizontal rule)

| |
  • 3
    I think tex-core is a pretty appropriate tag for this. – Alan Munn Apr 9 at 4:06
  • I agree with @AlanMunn. But aside from that, it's important which engine you use to test. The only one that can be guaranteed to work exactly as described in the TeXbook in all cases is tex, the Knuthian, unextended version. pdftex and all others now incorporate e-tex, which has effects at least on the number of internal registers, so may not give the same results in some edge cases. – barbara beeton Apr 9 at 13:28
  • @barbarabeeton well, I have to admit that I was using just tex and even though it reports This is TeX, Version 3.14159265 (TeX Live 2017/Debian) (preloaded format=tex) it may be modified in some way. – 0xC0000022L Apr 9 at 13:34
  • By the way, please write that as an answer. Or does it work differently from other meta sites? Typically someone answers with a suggestion and that gets up-/downvoted. Is it handled differently here? – 0xC0000022L Apr 9 at 13:37
  • 2
    We often write things in comments and then convert to answers here. For some context see Why do people answer in comments? – Alan Munn Apr 9 at 14:41
  • Has the substantive question been posted yet on the main site? (I might just have spaced past it.) Anyhow, I think the reason your code isn't getting interpreted as you expect is that TeX, when reading a number, keeps going until a definitive non-number is detected. So usually, to be sure, a space would be inserted after a "terminal" digit. (I'd have to go back and study the relevant passages in TB before committing myself to a detailed answer.) – barbara beeton Apr 9 at 16:59
  • @barbarabeeton it has – 0xC0000022L Apr 9 at 19:13

Since the TeXbook is the core reference to TeX itself, then the tex-core tag is entirely appropriate. As barbara mentions in her comment, it's possible that doing examples in the TeXbook using a modern engine such as pdfTeX as opposed to the original TeX (which is still part of the major distributions, but not the engine that you would typically use) may yield different results in certain cases.

| |

You must log in to answer this question.

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