<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 22/07/2024 22:25, Hanson Char wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BA4FB612-CB14-4672-9A57-0FA61DC69433@gmail.com">
<pre class="moz-quote-pre" wrap="">Hi,
I think I may have found an error in the answer of exercise 8.6 on page 305 of the TeXbook.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">EXERCISE 8.6
Assume that the category codes of plain TEX are in force, except that the characters
^^A, ^^B, ^^C, ^^M belong respectively to categories 0, 7, 10, and 11. What tokens are produced from the (rather ridiculous) input line ‘^^B^^BM^^A^^B^^C^^M^^@\M␣’?
(Remember that this line is followed by ⟨return⟩, which is ^^M; and recall that ^^@ denotes the ⟨null⟩ character, which has category 9 when INITEX begins.)
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
The current answer says the result is seven tokens as follows:
^^B_7 ^^B_7 M_11 ^^B ␣_10 ^^M_11 M^^M
But shouldn't it rather be:
^^B_7 ^^B_7 M_11 ^^B ^^C_10 ^^M_11 M^^M
? Only the category code of ^^C is changed to 10, but the character code remains the same (ie 3).
Thoughts?
</pre>
</blockquote>
<br>
<br>
According to the 4th-from-last paragraph on page 47,<br>
<br>
\begin{quote}<br>
If \TeX\ sees a character of category 10 (space) [...] the
character is converted to<br>
a token of category 10 whose character code is 32, [...].<br>
The character code in a space token is always 32.<br>
\end{quote}<br>
<br>
So the current answer looks correct to me.<br>
<br>
(There can also be ``funny space'' tokens---see page 377---but that
doesn't apply here.)<br>
<br>
JK<br>
<br>
</body>
</html>