[tex-k] In TeX: The Program, section 313, extra space after <insert>

tttex at mailbox.org tttex at mailbox.org
Sat Feb 10 22:43:54 CET 2024


Hi,

When TeX prints the context after an error message there is a superfluous space
after "<insert>" as compared to other input stack types such as "<*>". 
See for example the following run:

  This is TeX, Version 3.141592653
  **\show\a
  > \a=undefined.
  <*> \show\a
             
  ? I\a
  ! Undefined control sequence.
  <insert>   \a
               
  <*> \show\a
             
  ? I
  insert>\a
  ! Undefined control sequence.
  <insert>  \a
              
  <*> \show\a
             
  ? 

Depending on whether the insert has been created by typing "I" concatenated
with the insert content, or by typing a single "I", followed by entering the
insert content in the appearing prompt, there are either three or two spaces
printed after "<insert>" and before the actual content.

While the extra third space in the first case is evidently an accepted
byproduct of the implementation that reads in the insert (see section 87 in
"TeX: The Program"), this is not clear with respect to the second space.
This extra space is produced in section 313 by the line:

  else print_nl("<insert> ")

It prints an extra space as compared to how "<*>" or or "<read *>" are
printed.

I could not find a reason for this difference and was thus wondering, whether
this is intended.

Best,
Tyge


More information about the tex-k mailing list.