[tex-k] How extra space in log may be fixed after \batchmode

Wolfgang Helbig helbig at mailbox.org
Sun Nov 1 20:14:41 CET 2020


Hi Igor,

may I suggest another fix?

In module 86, TeX sets the selector to log-only when the user entered Q.
It prints the ellipses and then starts a new line into log file but not 
on the terminal.

The file offset is set to zero, the terminal offset is still at the end of
"batchmode" since that is the last thing that was printed on the terminal.
Finally, the ship out routine prints the space, because the terminal 
offset not zero.

The fix is evident: set the selector to log-only after every ellipses 
and nl is printed.
Then both file offset and terminal offset will be zero, and the last 
thing that is
printed on the terminal is a new line character, so the Unix prompt will 
start at the
beginning of a new line.

Of course, the same has to be done for METAFONT.

[86] spurious space in log and missing last line terminator on terminal
@x
"Q":begin print_esc("batchmode"); decr(selector);
   end;
@y
"Q":print_esc("batchmode");
@z

[86] continued
@x
print("..."); print_ln; update_terminal; return;
@y
print("..."); print_ln; update_terminal;
if c="Q" then decr(selector);  return;
@z

Happy weaving,

-- 
Wolfgang Helbig



More information about the tex-k mailing list.