为什么重新定义 \par 会禁用 \nopagenumbers?

为什么重新定义 \par 会禁用 \nopagenumbers?

让我们禁用页码:

\nopagenumbers
Hello world.
\bye

如果我们重新定义最近的,则会出现页码\par

\begingroup\def\par{\endgraf\endgroup}
\nopagenumbers
Hello world.
\bye

如果我们重新定义所有的\pars( \def\par{\endgraf}),一切就都正常了。

为什么会发生这种情况?

答案1

TeX 是一种宏扩展语言;这意味着它将使用当前的宏的含义和当前的进行扩展和执行命令时变量的值。

的含义\nopagenumbers\footline{\hfil}\footline是一个令牌寄存器,用 定义\newtoks,因此当\nopagenumbers展开时,当地的执行分配给\footline,它将覆盖(在当前组中)它之前的值(在启动时为)\hss\tenrm\folio\hss

的值\footline用于输出例程,TeX 将使用 current 值当调用输出例程时

例如,比较以下两段代码:

\begingroup\def\par{\endgraf\endgroup}
\nopagenumbers
Hello world.\vadjust{\vfill\penalty-10000 }\par

\begingroup\def\par{\endgraf\endgroup}
\nopagenumbers
Hello world.\par

你得到两页,第一页没有页码,第二页有页码。为什么?

因为在第一种情况下\endgraf会导致页面构建器开始行动,并且“最近的贡献”被推入主垂直列表;惩罚-10000会导致输出例程在\endgroup尚未执行时采取行动。

同样在第二种情况下,最近的贡献(这里是刚刚完成的段落)作为操作的一部分被推送到主垂直列表\endgraf(它包含的原始含义\par),但不应输出任何页面,因此\endgroup被执行并\footline获取其启动值,因为为其分配了不同值的组已经结束。

这是一张图片(我以前\vsize=2cm只是为了在显示脚注时保持图片较小)

在此处输入图片描述

您的代码发生的情况与上面的第二个示例相对应,因为的扩展\bye以 开头\par

答案2

仅对\nopagenumbers当前组有效,当前组在当前段落末尾结束。但页面随后会发出,因此页码再次有效。

如果您在跨页的段落中执行相同操作,则该段落开始的页面上不会显示页码:

As any dedicated reader can clearly see, the Ideal of practical reason is a
representation of, as far as I know, the things in themselves; as I have shown
elsewhere, the phenomena should only be used as a canon for our understanding.
The paralogisms of practical reason are what first give rise to the architectonic
of practical reason. As will easily be shown in the next section, reason would
thereby be made to contradict, in view of these considerations, the Ideal of prac-
tical reason, yet the manifold depends on the phenomena. Necessity depends
on, when thus treated as the practical employment of the never-ending regress
in the series of empirical conditions, time. Human reason depends on our sense
perceptions, by means of analytic unity. There can be no doubt that the objects
in space and time are what first give rise to human reason.

Let us suppose that the noumena have nothing to do with necessity, since
knowledge of the Categories is a posteriori. Hume tells us that the transcen-
dental unity of apperception can not take account of the discipline of natural
reason, by means of analytic unity. As is proven in the ontological manuals, it is
obvious that the transcendental unity of apperception proves the validity of the
Antinomies; what we have alone been able to show is that, our understanding
depends on the Categories. It remains a mystery why the Ideal stands in need
of reason. It must not be supposed that our faculties have lying before them, in
the case of the Ideal, the Antinomies; so, the transcendental aesthetic is just as
necessary as our experience. By means of the Ideal, our sense perceptions are
by their very nature contradictory.

As is shown in the writings of Aristotle, the things in themselves (and it re-
mains a mystery why this is the case) are a representation of time. Our concepts
have lying before them the paralogisms of natural reason, but our a posteriori
concepts have lying before them the practical employment of our experience.
Because of our necessary ignorance of the conditions, the paralogisms would
thereby be made to contradict, indeed, space; for these reasons, the Transcen-
dental Deduction has lying before it our sense perceptions. (Our a posteriori
knowledge can never furnish a true and demonstrated science, because, like
time, it depends on analytic principles.) So, it must not be supposed that our
experience depends on, so, our sense perceptions, by means of analysis. Space
constitutes the whole content for our sense perceptions, and time occupies part
of the sphere of the Ideal concerning the existence of the objects in space and
time in general.

As we have already seen, what we have alone been able to show is that
the objects in space and time would be falsified; what we have alone been able
to show is that, our judgements are what first give rise to metaphysics. As I
have shown elsewhere, Aristotle tells us that the objects in space and time, in
the full sense of these terms, would be falsified. Let us suppose that, indeed,
our problematic judgements, indeed, can be treated like our concepts. As any
dedicated reader can clearly see, our knowledge can be treated like the tran-
scendental unity of apperception, but the phenomena occupy part of the sphere
of the manifold concerning the existence of natural causes in general. Whence
comes the architectonic of natural reason, the solution of which involves the
relation between necessity and the Categories? Natural causes (and it is not
at all certain that this is the case) constitute the whole content for the paral-
ogisms. This could not be passed over in a complete system of transcendental
philosophy, but in a merely critical essay the simple mention of the fact may
suffice.

Therefore, we can deduce that the objects in space and time (and I assert,
however, that this is the case) have lying before them the objects in space and
time. Because of our necessary ignorance of the conditions, it must not be
supposed that, then, formal logic (and what we have alone been able to show is
that this is true) is a representation of the never-ending regress in the series of
empirical conditions, but the discipline of pure reason, in so far as this expounds
the contradictory rules of metaphysics, depends on the Antinomies. By means of
analytic unity, our faculties, therefore, can never, as a whole, furnish a true and
demonstrated science, because, like the transcendental unity of apperception,
they constitute the whole content for a priori principles; for these reasons, our
experience is just as necessary as, in accordance with the principles of our a
priori knowledge, philosophy. The objects in space and time abstract from all
content of knowledge. Has it ever been suggested that it remains a mystery why
there is no relation between the Antinomies and the phenomena? It must not be
supposed that the Antinomies (and it is not at all certain that this is the case)
are the clue to the discovery of philosophy, because of our necessary ignorance
of the conditions. As I have shown elsewhere, to avoid all misapprehension, it
is necessary to explain that our understanding (and it must not be supposed
that this is true) is what first gives rise to the architectonic of pure reason, as
is evident upon close examination.

\begingroup\def\par{\endgraf\endgroup}
\nopagenumbers
The things in themselves are what first give rise to reason, as is proven in
the ontological manuals. By virtue of natural reason, let us suppose that the
transcendental unity of apperception abstracts from all content of knowledge;
in view of these considerations, the Ideal of human reason, on the contrary,
is the key to understanding pure logic. Let us suppose that, irrespective of
all empirical conditions, our understanding stands in need of our disjunctive
judgements. As is shown in the writings of Aristotle, pure logic, in the case of
the discipline of natural reason, abstracts from all content of knowledge. Our
understanding is a representation of, in accordance with the principles of the
employment of the paralogisms, time. I assert, as I have shown elsewhere, that
our concepts can be treated like metaphysics. By means of the Ideal, it must
not be supposed that the objects in space and time are what first give rise to
the employment of pure reason.

As is evident upon close examination, to avoid all misapprehension, it is
necessary to explain that, on the contrary, the never-ending regress in the series
of empirical conditions is a representation of our inductive judgements, yet the
things in themselves prove the validity of, on the contrary, the Categories. It
remains a mystery why, indeed, the never-ending regress in the series of empir-
ical conditions exists in philosophy, but the employment of the Antinomies, in
respect of the intelligible character, can never furnish a true and demonstrated
science, because, like the architectonic of pure reason, it is just as necessary as
problematic principles. The practical employment of the objects in space and
time is by its very nature contradictory, and the thing in itself would thereby
be made to contradict the Ideal of practical reason. On the other hand, natural
causes can not take account of, consequently, the Antinomies, as will easily be
shown in the next section. Consequently, the Ideal of practical reason (and I
assert that this is true) excludes the possibility of our sense perceptions. Our
experience would thereby be made to contradict, for example, our ideas,
\bye

空 - 编号

可以看出,页码编号在下一页恢复,因为当组结束时,页码编号会在段落末尾重新激活。

相关内容