请考虑以下两个摘录tex.web
:
interaction:=scroll_mode; jump_out;
"X":begin interaction:=scroll_mode; jump_out;
我无法理解背后的原因interaction:=scroll_mode
。
作为参考,以下是的值interaction
:
batch_mode 0
nonstop_mode 1
scroll_mode 2
error_stop_mode 3
(*)的值interaction
始终error_stop_mode
在执行上述代码之前,因为 中的以下代码tex.web
:
if interaction=error_stop_mode then @<Get user's advice and |return|@>;
答案1
它(人们可能会猜测)在那里是为了确保您之后不会再出现进一步的错误交互x
。
但此时如何得到 tex 错误并不明显。幸运的是,tex.web 给出了线索...
@ Here we do whatever is needed to complete \TeX's job gracefully on the
local operating system. The code here might come into play after a fatal
error; it must therefore consist entirely of ``safe'' operations that
cannot produce error messages. For example, it would be a mistake to call
|str_room| or |make_string| at this time, because a call on |overflow|
might lead to an infinite loop.
@^system dependencies@>
Actually there's one way to get error messages, via |prepare_mag|;
but that can't cause infinite recursion.
@^recursion@>
事实上,如果你在默认错误停止模式下处理这个纯文本文档
\mag=2000
aaa
\break
\mag=3000 aaaa\zzzz
\bye
x
并使用然后在日志中响应未知命令错误,您将看到
? x
! Incompatible magnification (3000);
the previous value will be retained (2000).
不兼容的磁力误差在滚动模式下处理,没有正常的交互