-
Notifications
You must be signed in to change notification settings - Fork 8
/
pages.tex
1646 lines (1519 loc) · 66 KB
/
pages.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% -*- coding: utf-8 -*-
% This is part of the book TeX for the Impatient.
% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry.
% See file fdl.tex for copying conditions.
\input macros
%\chapter {Commands for \linebreak composing pages}
\chapter {组页命令}
\chapterdef{pages}
这个章节介绍了与页,页的组成部分以及输出程序相关的命令。
本章写作惯例的说明可以在\headcit{命令描述}{cmddesc}中找到。
\begindescriptions
%==========================================================================
%\section {Interline and interparagraph spaces}
\section {行间距和段间距}
\begindesc
\cts baselineskip {\param{glue}}
\cts lineskiplimit {\param{dimen}}
\cts lineskip {\param{glue}}
\explain
%^^{line spacing}
%\bix^^{interline glue}
%\bix^^|\baselineskip|
%\bix^^|\lineskip|
%\bix^^|\lineskiplimit|
%These three parameters jointly determine how much space \TeX\ leaves between
%consecutive \minref{box}es of an ordinary \minref{vertical list},
%e.g., the lines of a paragraph.
%This space is called ``\minref{interline glue}''.
%It is also inserted between the component boxes of a vbox constructed in
%internal vertical mode.
%^^{vboxes//interline glue for}
%
%In the usual case, when the boxes aren't abnormally high or deep, \TeX\
%makes the distance from the baseline of one box to the baseline of the
%next one equal to |\baselineskip|. It does this by inserting interline
%glue equal to |\baselineskip| minus the depth of the upper box (as given
%by ^|\prevdepth|) and the height of the lower box. But if this
%interline glue would be less than |\lineskiplimit|, indicating that the
%two boxes are too close together, \TeX\ inserts the |\lineskip| glue
%instead.\footnote
%{\TeX\ actually accounts for the beginning of a
%vertical list by setting |\prevdepth| to $-1000$\pt\ and testing
%|\prevdepth| before \emph{every} box. If |\prevdepth|$\>\le-1000$\pt\
%it does not insert any interline glue.} See \knuth{pages~79--80} for a
%precise description.
%
%Note that |\baselineskip| and |\lineskip| measure \emph{different
%things}: the distance between baselines on the one hand and the distance
%between the bottom of one box and the top of the next box on the other
%hand. See \knuth{page~78} for further details. The first example below
%shows the effects of |\lineskiplimit|.
%
%You can obtain the effect of ^{double spacing} by doubling the value
%of |\baselineskip| as illustrated in the second example below.
%A change to |\baselineskip| at any point before the end of a paragraph affects
%the entire paragraph.
^^{行间距}
\bix^^{行间粘连}
\bix^^|\baselineskip|
\bix^^|\lineskip|
\bix^^|\lineskiplimit|
在一个普通\minref{竖直列}(例如段落各行)中,
这三个参数共同确定了 \TeX\ 在相邻两个\minref{盒子}间插入的间隔。
这个间隔称为“\minref{行间粘连}”。
对于内部竖直模式中构造的竖直盒子,其中的组成盒子间同样会有此间隔。
^^{竖直盒子//竖直盒子的行间粘连}
在通常情况下,盒子的高度和深度不会太大,
此时 \TeX\ 让相邻盒子的两基线距离等于 |\baselineskip|。
为此可以让行间粘连等于 |\baselineskip| 减去上盒子深度(由 ^|\prevdepth| 给出)%
和下盒子高度。
但如果两个盒子靠得太近,即行间粘连小于 |\lineskiplimit|,
\TeX\ 将改为插入 |\lineskip| 大小的间距。\negthinspace\footnote
{\TeX\ 实际上在竖直列开头设定 |\prevdepth| 为 $-1000$\pt ,
从而可以测定\emph{每个}盒子的 |\prevdepth|。
若 |\prevdepth|$\>\le-1000$\pt ,
它就不会插入任何行间粘连。}详情可见 \knuth{第~79--80~页}。
注意 |\baselineskip| 和 |\lineskip| 测量\emph{不同的东西}:
前者为两盒子基线之间的距离,
而后者为上盒子底部和下盒子顶部的距离。
详情可看 \knuth{第~78~页}。
下面第一个例子展示了|\lineskiplimit| 的作用。
如下面第二个例子所示,将 |\baselineskip| 加倍,
就能得到^{双倍行距}的效果。
在段落结束前任何位置改变 |\baselineskip|,都会影响整个段落。
\example
\baselineskip = 11pt \lineskiplimit = 1pt
\lineskip = 2pt plus .5pt
Sometimes you'll need to typeset a paragraph that has
tall material, such as a mathematical formula, embedded
within it. An example of such a formula is $n \choose k$.
Note the extra space above and below this line as
compared with the other lines.
(If the formula didn't project below the line,
we'd only get extra space above the line.)
|
\produces
\baselineskip = 11pt \lineskiplimit = 1pt
\lineskip = 2pt plus .5pt
Sometimes you'll need to typeset a paragraph that has
tall material, such as a mathematical formula, embedded
within it. An example of such a formula is $n \choose k$.
Note the extra space above and below this line as
compared with the other lines.
(If the formula didn't project below the line,
we'd only get extra space above the line.)
\endexample
\example
\baselineskip = 2\baselineskip % Start double spacing.
|
\endexample
%\eix^^{interline glue}
%\eix^^|\baselineskip|
%\eix^^|\lineskip|
%\eix^^|\lineskiplimit|
%\enddesc
\eix^^{行间粘连}
\eix^^|\baselineskip|
\eix^^|\lineskip|
\eix^^|\lineskiplimit|
\enddesc
\begindesc
\cts prevdepth {\param{dimen}}
\explain
%When \TeX\ adds a box to a vertical list, it sets |\prevdepth| to the
%depth of that box. \TeX\ sets |\prevdepth| to $-1000$\pt\ at the start
%of a vertical list, indicating that the usual interline glue should be
%suppressed.
当 \TeX\ 将盒子添加到竖直列时,它设定 |\prevdepth| 为该盒子的深度。
在竖直列的开始, \TeX\ 设定 |\prevdepth| 为 $-1000$\pt\ ,这表示不添加行间粘连。
\enddesc
\begindesc
\cts normalbaselineskip {\param{glue}}
\cts normallineskiplimit {\param{dimen}}
\cts normallineskip {\param{glue}}
\cts normalbaselines {}
\explain
%The three parameters contain values for |\base!-line!-skip|,
%|\line!-skip|, and |\line!-skip!-limit| respectively.
%^^|\baselineskip| ^^|\lineskip| ^^|\lineskiplimit|
%The |\normalbaselines| command sets |\base!-line!-skip|,
%|\line!-skip|, and |\line!-skip!-limit| to the values contained in the
%three parameters.
前三个参数分别包含 |\base!-line!-skip|,|\line!-skip| 和 |\line!-skip!-limit| 的值。
^^|\baselineskip| ^^|\lineskip| ^^|\lineskiplimit|
而 |\normalbaselines| 命令将 |\base!-line!-skip|,|\line!-skip| 和 |\line!-skip!-limit|
分别设定为这三个参数的值。
\enddesc
\begindesc
\cts offinterlineskip {}
\explain
%This command tells \TeX\ to stop inserting interline glue from
%now on. Unless you want it to be in effect for the rest of the document
%(which you probably don't), you should enclose it in a group
%together with the text you want it to affect.
%Its main purpose is to let you do interline spacing yourself,
%e.g., using ^{struts},
%without interference from \TeX's normal interline glue.
%|\offinterlineskip| is often useful when
%you're constructing a horizontal \minref{alignment}.
%^^{alignments//using \b\tt\\offinterlineskip\e\ in}
此命令让 \TeX\ 从此之后停止插入行间粘连。除非你希望对文档的剩余部分都生效(你多半不希望),
你应该将此命令和你希望生效的文本放在一个编组中。
它的主要用处在于可以让你自己处理行间空隙,比如用^{支架}(struts),
而不影响 \TeX\ 的正常行间粘连。在构造水平\minref{阵列}时经常会用到|\offinterlineskip|。
^^{阵列//在其中使用 \b\tt\\offinterlineskip\e}
\example
\def\entry#1:#2 {\strut\quad#1\quad&\quad#2\quad\cr}
\offinterlineskip \tabskip = 0pt \halign{%
\vrule\quad\hfil#\hfil\quad\vrule&
\quad\hfil#\hfil\quad\vrule\cr
\noalign{\hrule}
\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}
\entry \it Opera:\it Composer
\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}
\vphantom{\vrule height 2pt}&\cr
\entry Fidelio:Beethoven
\entry Peter Grimes:Britten
\entry Don Giovanni:Mozart
\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}}
|
\produces
\medskip
\def\entry#1:#2 {\strut\quad#1\quad&\quad#2\quad\cr}
\offinterlineskip \tabskip = 0pt \halign{%
\vrule\quad\hfil#\hfil\quad\vrule&
\quad\hfil#\hfil\quad\vrule\cr
\noalign{\hrule}
\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}
\entry \it Opera:\it Composer
\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}
\vphantom{\vrule height 2pt}&\cr
\entry Fidelio:Beethoven
\entry Peter Grimes:Britten
\entry Don Giovanni:Mozart
\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}}
\endexample
\enddesc
\begindesc
\cts nointerlineskip {}
\explain
%This command tells \TeX\ not to insert interline glue in front of the
%next line.
%It has no effect on subsequent lines.
此命令让 \TeX\ 停止在下一行插入行间粘连。它不影响后续其他行。
\enddesc
\begindesc
\cts openup {\<dimen>}
\explain
%This command increases ^|\baselineskip| by \<dimen>.
%An |\openup| command before the end of a paragraph affects
%the entire paragraph, so you shouldn't use |\openup| to
%change |\baseline!-skip| within a paragraph. |\openup| is
%most useful for typesetting tables and math displays---a
%little extra space between rows often makes them more readable.
%^^{alignments//space between rows of}
此命令让 ^|\baselineskip| 增加 \<dimen>。
在段尾之前的 |\openup| 命令将影响整个段落,
因此想在段落中间改变 |\baseline!-skip| 时不要用 |\openup| 命令。
在排版表格和陈列公式时 |\openup| 非常有用——多点间隔将会增加它们的可读性。
^^{阵列//各行之间的间隔}
\example
Alice picked up the White King very gently, and lifted him
across more slowly than she had lifted the Queen; but before
she put him on the table, she thought she might well dust
him a little, he was so covered with ashes.
\openup .5\baselineskip % 1.5 linespacing.
|
\produces
Alice picked up the White King very gently, and lifted him
across more slowly than she had lifted the Queen; but before
she put him on the table, she thought she might well dust
him a little, he was so covered with ashes.
\openup .5\baselineskip %1.5 linespacing
\endexample\enddesc
%==========================================================================
\section{分页} %\section {Page breaks}
%==========================================================================
%\subsection {Encouraging or discouraging page breaks}
\subsection{鼓励或阻碍分页}
%\begindesc
%\bix^^{page breaks}
%\bix^^{page breaks//encouraging or discouraging}
%\ctspecial break {} \xrdef{vbreak}
%\explain
\begindesc
\bix^^{分页}
\bix^^{分页//鼓励或阻碍分页}
\ctspecial break {} \xrdef{vbreak}
\explain
%
\margin{Four commands identical to ones for line breaks (\xref{hbreak})
have been added to correct an omission. The descriptions are exactly parallel.}
%
%This command forces a page break.
%Unless you do something to fill out the page, you're likely to
%get an underfull vbox.
%|\break| can also be used in horizontal mode.
此命令强制在此处分页。除非用某种方式填满该页,你将得到一个松散的 vbox。
|\break| 也能用在水平模式中。
\enddesc
\begindesc
\ctspecial nobreak {} \xrdef{vnobreak}
\explain
%This command prevents a page break where it
%otherwise might occur.
%|\nobreak| can also be used in horizontal mode.
此命令阻止在此处分页。
|\nobreak| 也能用在水平模式中。
\enddesc
\begindesc
\ctspecial allowbreak {} \xrdef{vallowbreak}
\explain
%This command tells \TeX\ to
%allow a page break where one could not ordinarily occur.
%|\allowbreak| can also be used in horizontal mode.
在通常不分页的地方允许 \TeX\ 分页。
|\allowbreak| 也能用在水平模式中。
\enddesc
\begindesc
\ctspecial penalty {\<number>} \xrdef{vpenalty}
\explain
%This command produces a \minref{penalty} item.
%The penalty item makes \TeX\ more or less willing to break a page
%at the point where that item occurs.
%A negative penalty, i.e., a bonus, encourages a page break;
%a positive penalty discourages a page break.
%A penalty of $10000$ or more prevents a break altogether,
%while a penalty of $-10000$ or less forces a break.
%|\penalty| can also be used in horizontal mode.
此命令生成一个惩罚(\minref{penalty})项。
惩罚项使得 \TeX\ 或多或少愿意在此处分页。
负惩罚值,实际上是奖励值,鼓励分页;正惩罚值阻碍分页。
大于或等于 $10000$ 的惩罚值彻底阻止分页,
而小于或等于 $-10000$ 的惩罚值强制分页。
此命令也能用于水平模式。
\example
\def\break{\penalty-10000 } % as in plain TeX
\def\nobreak{\penalty10000 } % as in plain TeX
\def\allowbreak{\penalty0 } % as in plain TeX
|
\endexample
\enddesc
\begindesc
\cts goodbreak {}
\explain
%This command ends a paragraph and also indicates to \TeX\ that
%this is a good place to break the page.
此命令结束当前段落,并告诉 \TeX\ 这里是一个合适的分页位置。
\enddesc
\begindesc
\cts smallbreak {}
\cts medbreak {}
\cts bigbreak {}
\explain
%These commands indicate increasingly desirable places for \TeX\ to
%break a page. They also cause \TeX\ to
%insert a ^|\smallskip|, ^|\medskip|, or
%^|\bigskip| (\xref \smallskip) if the page break doesn't actually
%happen. \TeX\ suppresses this skip if it occurs just after an
%equal or larger skip.
这些命令指明了越来越合适的分页位置。如果实际上没在此处分页,\TeX\ 将分别
插入大小为 ^|\smallskip|,^|\medskip| 或 ^|\bigskip| 的间距(\xref \smallskip )。
但如果此位置之前已经有大于或等于此值的间距,\TeX\ 就不会再插入间距。
\enddesc
\begindesc
\easy\cts eject {}
\cts supereject {}
\explain
%These commands force a page break at the current position
%and end the current paragraph.
%If you don't precede them with |\vfil| (\xref \vfil),
%^^|\vfil//needed with {\tt\\eject}|
%\TeX\ will try to stretch out the page contents
%(and will probably complain about an underfull vbox).
%The |\supereject| command, in addition,
%instructs the \plainTeX\ output routine to
%force out any leftover insertions,
%^^{insertions//forced out by \b\tt\\supereject\e}
%such as long footnotes,
%so that they are produced before any more input
%is processed. Thus |\supereject| is a good command to use at the end of each
%chapter or other major unit of your document.
这两个命令将结束当前段落并强制在当前位置分页。如果你不在前面加上
|\vfil| (\xref \vfil),^^|\vfil//在 {\tt\\eject} 时需要|
\TeX\ 将试着将伸展页面内容(很可能会警告有松散的竖直盒子)。
|\supereject| 命令还让 \plainTeX\ 输出例行程序处理剩下的插入项,
^^{插入项//用 \b\tt\\supereject\e 强制排版}例如长脚注,
在处理其他输入之前生成它们。因而,
|\supereject| 更适合在文档各章或主要单元结束时使用。
\enddesc
\begindesc
\cts filbreak {}
\explain
%This command provides a kind of conditional page break.
%It tells \TeX\ to
%break the page---but not if the text up to a later |\filbreak| also
%fits on the same page.
%By enclosing a paragraph in a pair of |\filbreak|s,
%you can ensure that \TeX\ will keep a paragraph on a single page if it can.
%You should not use |\filbreak| within a paragraph, since it
%forces \TeX\ into vertical mode and thus ends the paragraph.
%See \xrefpg{filbreak} for more advice on this subject.
此命令规定了有条件的分页。它告诉 \TeX\ ,如果后面的 |\filbreak| 不能放在同一页,就在此处分页。
用一对 |\filbreak| 将一个段落围起来,就可以确保 \TeX\ 尽量将该段落放在同一页。
不要在段落中间使用 |\filbreak|,因为这将让 \TeX\ 进入竖直模式,从而结束该段落。
在 \xrefpg{filbreak} 中有此主题的更多建议。
\enddesc
\begindesc
\cts raggedbottom {}
\cts normalbottom {}
\explain
%Normally \TeX\ tries hard to ensure that all pages have the same depth,
%i.e., that their bottom margins are equal.
%The |\raggedbottom| command tells \TeX\ to
%allow some variability among the bottom margins on different pages.
%It's often appropriate to use |\raggedbottom| when you have material that
%contains large blocks of material that should not be split across pages.
%The |\normalbottom| command cancels the effect of |\raggedbottom|.
%\eix^^{page breaks//encouraging or discouraging}
通常 \TeX\ 会尽全力让每页都一样高,即让它们的下边距相等。
|\raggedbottom| 命令允许 \TeX\ 给不同页面的下边距一些差别。
如果文档中有些不能跨页的大型内容,用 |\raggedbottom| 就比较合适。
用 |\normalbottom| 命令可以取消 |\raggedbottom| 的效果。
\eix^^{分页//鼓励或阻碍分页}
\enddesc
%==========================================================================
%\subsection {Page breaking parameters}
\subsection{分页参数}
%\bix^^{page breaks//parameters for}
%\begindesc
%\cts interlinepenalty {\param{number}}
%\explain
%This parameter specifies the \minref{penalty} for
%breaking a page between the lines of a paragraph.
%By setting it to $10000$ you can force all page breaks to occur
%between paragraphs, provided that the pages have enough stretch so
%that \TeX\ can still compose them decently.
%\PlainTeX\ leaves |\inter!-linepenalty| at~$0$.
\bix^^{分页//分页参数}
\begindesc
\cts interlinepenalty {\param{number}}
\explain
此参数设定在段落内部各行间分页时的\minref{惩罚}值。
将它设为 $10000$ 将强制在段落之间分页,
只要页面中有足够的伸展值让 \TeX\ 排版。
\PlainTeX\ 设定 |\inter!-linepenalty| 为 ~$0$。
\enddesc
\begindesc
\cts clubpenalty {\param{number}}
\explain
%^^{club line}
%This parameter specifies the \minref{penalty} for
%breaking a page just after the first line of a paragraph.
%A line by itself at the bottom of a page is called a ``club line''.
%\PlainTeX\ sets |\clubpenalty| to $150$.
^^{孤行}
此参数设定在段落首行之后分页的\minref{惩罚}值。
页面底部的单独一行称为``孤行''。
\PlainTeX\ 设定 |\clubpenalty| 为 $150$。
\enddesc
\begindesc
\cts widowpenalty {\param{number}}
\explain
%^^{widow line}
%This parameter specifies the \minref{penalty} for
%breaking a page just before the last line of a paragraph.
%A line by itself at the top of a page is called a ``widow line''.
%\PlainTeX\ sets |\widowpenalty| to $150$.
^^{寡行}
此参数设定在段落尾行之前分页的\minref{惩罚}值。
页面顶部的单独一行称为``寡行''。
\PlainTeX\ 设定 |\widowpenalty| 为 $150$。
\enddesc
\begindesc
\cts displaywidowpenalty {\param{number}}
\explain
%^^{widow line}^^{math display}
%This parameter specifies the \minref{penalty} for
%breaking a page just before the last line of a partial paragraph
%that immediately precedes a math display.
%\PlainTeX\ sets |\displaywidowpenalty| to $50$.
^^{寡行}^^{陈列公式}
此参数设定在陈列公式上一行同时也是段落尾行之前分页的\minref{惩罚}值。
\PlainTeX\ 设定 |\displaywidowpenalty| 为 $50$.
\enddesc
\begindesc
\cts predisplaypenalty {\param{number}}
\explain
%^^{math display}
%This parameter specifies the \minref{penalty} for
%breaking a page just before a math display.
%\PlainTeX\ sets |\predisplaypenalty| to $10000$.
^^{陈列公式}
此参数设定在陈列公式之前分页的\minref{惩罚}值。
\PlainTeX\ 设定\break |\pre!-display!-penalty| 为 $10000$。
\enddesc
\begindesc
\cts postdisplaypenalty {\param{number}}
\explain
%^^{math display}
%This parameter specifies the \minref{penalty} for
%breaking a page just after a math display.
%\PlainTeX\ leaves |\postdisplaypenalty| at $0$.
^^{陈列公式}
此参数设定在陈列公式之后分页的\minref{惩罚}值。
\PlainTeX\ 设定\break |\postdisplaypenalty| 为 $0$。
\enddesc
\begindesc
\cts brokenpenalty {\param{number}}
\explain
%This parameter specifies the \minref{penalty} for
%breaking a page just after a line that ends in
%a discretionary item (usually a hyphen).
%^^{hyphenation}
%|\brokenpenalty| applies to page breaking, while
%^|\hyphenpenalty| \ctsref{\hyphenpenalty} applies to line breaking.
%\PlainTeX\ sets |\brokenpenalty| to $100$.
此参数设定在以自定连字项(通常是一个连字符)结尾的一行之后分页的\minref{惩罚}值。
^^{连字}
|\brokenpenalty| 用于分页,而 ^|\hyphenpenalty| \ctsref{\hyphenpenalty} 用于断行。
\PlainTeX\ 设定 |\brokenpenalty| 为 $100$.
\enddesc
\begindesc
\cts insertpenalties {\param{number}}
\explain
%\bix^^{insertions//penalties for}
%\bix^^{floating material}
%This parameter contains the sum of certain penalties \minrefs{penalty}
%that \TeX\ accumulates as it is placing insertions onto the
%current page.
%These penalties are incurred when \TeX\ is processing an |\insert|
%command
%and discovers that a previous insertion of the same kind on this page has
%been split, leaving part of it for subsequent pages.
%See \knuth{pages~123--125} for the details of this
%calculation.
%
%\margin{Material moved from a footnote to the main text.}
%|\insertpenalties| has an entirely different meaning during an
%^^{output routine//meaning of \b\tt\\insertpenalties\e\ in}
%output routine---it's the number of insertions that have been seen
%but that don't fit on the current page (see \knuth{page~125}).
\bix^^{插入项//插入项的惩罚}
\bix^^{浮动体}
此参数包含 \TeX\ 放置插入项到当前页面时所累积的某些\minref{惩罚}值之和。
在 \TeX\ 处理 |\insert| 命令时,
如果发现前面有同类型插入项被分开,留下一部分到之后的页面,
就会算上这些惩罚值。
详细的计算过程可以见 \knuth{第~123--125~页}。
\margin{Material moved from a footnote to the main text.}
在输出例行程序中,
^^{输出例行程序//\b\tt\\insertpenalties\e\ 的意义}
|\insertpenalties| 有完全不同的意义——
它表示已经见到但未能放入当前页的插入项的总数(见 \knuth{第~125~页})。
\enddesc
\begindesc
\cts floatingpenalty {\param{number}}
\explain
%This parameter specifies the \minref{penalty} that
%\TeX\ adds to |\insertpenalties|
%^^|\insertpenalties|
%when the page builder is adding an insertion to the current page
%and discovers that a previous insertion of the same kind on this page has
%been split, leaving part of it for subsequent pages.
%\PlainTeX\ leaves |\floatingpenalty| at~$0$.
%\eix^^{insertions//penalties for}
%\eix^^{floating material}
在 \TeX\ 处理插入项时,
如果发现前面有同类型插入项被分开,留下一部分到之后的页面,
就会添加 |\floatingpenalty| \minref{惩罚}值到|\insertpenalties|
^^|\insertpenalties|。
\PlainTeX\ 设定 |\floatingpenalty| 为 $0$。
\eix^^{插入项//插入项的惩罚}
\eix^^{浮动体}
\enddesc
\begindesc
\cts pagegoal {\param{dimen}}
\explain
%This parameter specifies the
%desired height for the current page.
%\TeX\ sets
%|\pagegoal| to the current value of |\vsize|
%when it first puts a box or an insertion on the current page.
%You can shorten a page while \TeX\ is working on it by
%changing the value of |\pagegoal|---even if the new value is
%less than the height of the material already on that page.
%\TeX\ will just put the extra material on the next page.
%But remember---|\pagegoal| is reset to |\vsize| again when \TeX\
%starts the next page.
此参数设定当前页面所需的高度。
当放入第一个盒子或者插入项到当前页面时,
\TeX\ 设定 |\pagegoal| 等于 |\vsize| 的当前值。
改变 |\pagegoal| 的值可以让 \TeX\ 排版时缩短该页面的高度。
即使新的值比页面已有内容的高度还小也可以,
此时 \TeX\ 将把多余的内容放在下一页。
但记住——在下一页 \TeX\ 还是会重置 |\pagegoal| 为 |\vsize|。
\enddesc
\begindesc
\cts pagetotal {\param{dimen}}
\explain
%This parameter specifies the
%accumulated natural height of the current page.
%\TeX\ updates |\pagetotal| as it adds
%items to the main \minref{vertical list}.
此参数表示当前页面累积的自然高度。
\TeX\ 添加内容到\minref{竖直列}时会更新 |\pagetotal| 的值。
\enddesc
\begindesc
\cts pagedepth {\param{dimen}}
\explain
%This parameter specifies the depth of the current page.
%\TeX\ updates |\pagedepth| as it adds
%items to the main \minref{vertical list}.
此参数表示当前页面的深度。
\TeX\ 添加内容到\minref{竖直列}时会更新 |\pagedepth| 的值。
\enddesc
\begindesc
\cts pageshrink {\param{dimen}}
\explain
%This parameter specifies the amount of \minref{shrink}
%in the accumulated \minref{glue} on the current page.
%\TeX\ updates |\pageshrink| as it adds
%items to the main \minref{vertical list}.
此参数表示当前页面累积的粘连的可收缩量。
\TeX\ 添加内容到\minref{竖直列}时会更新 |\pageshrink| 的值。
\enddesc
\begindesc
\cts pagestretch {\param{dimen}}
\cts pagefilstretch {\param{dimen}}
\cts pagefillstretch {\param{dimen}}
\cts pagefilllstretch {\param{dimen}}
\explain
%These four parameters together specify the amount of \minref{stretch}
%in the \minref{glue} on the current page. The amount of stretch has
%the form
%{\def\f#1{\hbox{\tt fi#1}}%
%$n_0 + n_1\f{l} + n_2\f{ll} + n_3\f{lll}$}, with the four parameters
%giving the values of the four $n_i$.
%\TeX\ updates these parameters as it adds
%items to the main \minref{vertical list}.
%
%\eix^^{page breaks//parameters for}
%\eix^^{page breaks}
这四个参数合起来表示当前页面累积的粘连的可伸长量。可伸长量总共等于
{\def\f#1{\hbox{\tt fi#1}}
$n_0 + n_1\f{l} + n_2\f{ll} + n_3\f{lll}$},
其中四个参数给出四个$n_i$的值。
\TeX\ 添加内容到\minref{竖直列}时会更新这些参数的值。
\eix^^{分页//分页参数}
\eix^^{分页}
\enddesc
%==========================================================================
%\section{Page layout}
\section{页面布局}
%\subsection {Page description parameters}
\subsection {页面描述参数}
\begindesc
\bix^^{页面尺寸}
\margin{This command was also described in the `Paragraphs' section.
The combined description now appears there.}
\aux\cts hsize {\param{dimen}}
\explain
%This parameter specifies the current line length.
%See \xrefpg{\hsize} for a more complete explanation.
此参数指定当前行的长度。\PlainTeX\ 设定 |\hsize| 为 |6.5in|。
在\xrefpg{\hsize} 有完整的解释。
\enddesc
\begindesc
\cts vsize {\param{dimen}}
\explain
%This parameter specifies the current vertical extent of a page.
%\TeX\ examines it only when it is starting a page. Thus if you change
%|\vsize| in the
%middle of a page, your change won't affect anything until the following page.
%If you want to change the vertical extent of a page when
%you're in the middle of it, you should assign the new
%height to ^|\pagegoal| (\xref \pagegoal) instead. (If you
%want the change to affect the following pages too, you should
%change \emph{both} |\vsize| and |\pagegoal|.)
%\PlainTeX\ sets |\vsize| to |8.9in|.
%\eix^^{page dimensions}
此参数指定页面的竖直长度。
\TeX\ 仅在页面开始时检查此值。
因此,在页面中间改变 |\vsize| 到下一页才会生效。
若要在页面中间改变其竖直长度,应该修改 ^|\pagegoal|(\xref \pagegoal )的值。%
(若要改变当前页面开始的所有页面,你需要\emph{同时}修改 |\vsize| 和 |\pagegoal|。)
\PlainTeX\ 设定 |\vsize| 为 |8.9in|。
\eix^^{页面尺寸}
\enddesc
%\begindesc
%\cts hoffset {\param{dimen}}
%\cts voffset {\param{dimen}}
%\margin{These commands were moved up from later in the subsection.}
%^^{page origin}
%\idxsee{origin}{page origin}
%\explain
%\TeX\ normally takes the ``origin'' of a page, that is, the point where
%it starts printing, as being one inch down from the top of the page and one
%inch to the right of the left end of the page.\footnote{
%\TeX\ itself is indifferent to where the origin of the page is,
%but this information has to be built into the device drivers
%^^{device drivers//page origin known to}
%that convert \dvifile s into printable form so that different devices
%will yield the same results.}
%The values of |\hoffset| and
%|\voffset| give the horizontal and vertical offset of the actual origin
%from this point. Thus if |\hoffset| and |\voffset| are both
%zero, \TeX\ uses its normal origin.
\begindesc
\cts hoffset {\param{dimen}}
\cts voffset {\param{dimen}}
\margin{These commands were moved up from later in the subsection.}
^^{页面起点}
\idxsee{起点}{页面起点}
\explain
\TeX\ 通常设定页面的“起点”——即它开始打印的地方——在离上页边和左页边均为一英寸的地方。\footnote{
\TeX\ 本身并不关心页面起点的位置,
但设备驱动程序将 \dvifile 转换为可打印形式时要用到,
此位置信息使得在不同的设备中能得到相同的结果。
^^{设备驱动//它所知的页面起点}}
|\hoffset| 和 |\voffset| 的值分别给出实际起点相对该点的水平和竖直偏移量。
因此,若 |\hoffset| 和 |\voffset| 均为零,\TeX\ 就使用正常起点。
\example
\hoffset = -.3in
% Start printing .7 inches from left edge of paper.
\voffset = 1in
% Start printing 2 inches from top edge of paper.
|
\endexample
\enddesc
\begindesc
\cts topskip {\param{glue}}
\explain
%\TeX\ inserts glue at the top of each
%page in order to ensure that the baseline of the first box on the page
%always is the same distance $d$ from the top of the page.
%|\topskip| determines the amount of that glue,
%called the ``|\topskip| glue'', by specifying
%what $d$ should be (provided that the first box
%on the page isn't too tall).
%$d$ is given by the natural size of the |\topskip| glue.
%If the height of the first box on the page exceeds $d$,
%so that the glue would be negative, \TeX\ simply inserts no
%|\topskip| glue at all on that page.
为确保页面第一个盒子的基线到上页边的距离总是 $d$,
\TeX\ 在每个页面顶部都插入粘连。
|\topskip| 给出了 $d$ 的值,以此确定该粘连大小
(只要页面第一个盒子不会太高)。
$d$ 等于 |\topskip| 粘连的自然大小。
如果页面第一个盒子的高度超过 $d$,
计算出的粘连将为负值,此时在该页顶部 \TeX\ 不插入|\topskip|粘连。
%To understand better the effect of these rules, assume that |\topskip|
%has no stretch or shrink and that the first item on the page is indeed a box.
%Then if the height of that box is no greater than |\topskip|,
%its baseline will be |\topskip|
%from the top of the page independently of its height. On the other hand,
%if the height of the box is $e$ greater than |\topskip|, its baseline will be
%|\topskip|\tplus$e$ from the top of the page.
%See \knuth{pages~113--114} for the remaining details of how
%|\topskip| works.
%\PlainTeX\ sets |\topskip| to |10pt|.
为更好地理解这些规则,我们假设 |\topskip| 无伸长量也无收缩量,且页面第一项就是个盒子。
如果该盒子的高度不大于 |\topskip|,不管高度为多少,
它的基线和上页边的距离就始终等于 |\topskip|。
反过来,如果该盒子的高度比 |\topskip| 大 $e$,
它的基线和上页边的距离就是 |\topskip|\tplus$e$。
在 \knuth{第~113--114~页} 中详细解释了 |\topskip| 的作用。
\PlainTeX\ 设定 |\topskip| 为 |10pt|。
\enddesc
\begindesc
\cts parskip {\param{glue}}
\explain
%This parameter specifies the ``^{paragraph skip}'', i.e., the
%vertical glue that \TeX\ inserts at the start of a paragraph.
%^^{paragraphs//glue between}
%See |\par| (\xref{\@par}) for more information about what happens
%when \TeX\ starts a paragraph.
%\PlainTeX\ sets |\parskip| to |0pt plus 0.1pt|.
此参数设定“^{段落间距}”,即 \TeX\ 在段落开头插入的竖直粘连。
^^{段落//段落间的粘连}
在 |\par| (\xref{\@par}) 那里介绍了 \TeX\ 开始新段落时所作的事情。
\PlainTeX\ 设定 |\parskip| 为 |0pt plus 0.1pt|。
\enddesc
\begindesc
\cts maxdepth {\param{dimen}}
\explain
%This parameter specifies the maximum depth of the bottom \minref{box} on
%a page. It is related to |\boxmaxdepth| (\xref \boxmaxdepth). If the
%depth of the bottom box on a page exceeds |\maxdepth|, \TeX\ moves the
%box's reference point down so that it's
%|\maxdepth| from the bottom of that box.
%Without this adjustment, the bottom box on
%a page could extend well into the bottom margin or even off
%the page entirely. \PlainTeX\ sets |\maxdepth| to |4pt|.
此参数设定页面底部\minref{盒子}的最大深度。
它和 |\boxmaxdepth| 参数(\xref \boxmaxdepth )也有关系。
如果底部盒子的深度超过 |\maxdepth|,
\TeX\ 下移该盒子的基准点,让深度就等于 |\maxdepth|。
若不作此调整,页面底部盒子可能大大超出下边距,甚至超出页面,
PlainTeX\ 设定 |\maxdepth| 为 |4pt|。
\enddesc
%==========================================================================
%\subsection{Page numbers}
\subsection{页码}
%\begindesc
%\bix^^{page numbering}
%\cts pageno {\param{number}}
%\explain
%This parameter contains the current page number as an integer. The page
%number is normally negative for front-matter pages that are numbered
%with small roman numerals instead of arabic numerals. If you change the
%page number within a page,
%the changed number will be used in any headers or footers that
%appear on that page.
%The actual
%printing of page numbers is handled by \TeX's \minref{output routine},
%which you can modify.
\begindesc
\bix^^{页码}
\cts pageno {\param{number}}
\explain
此参数以整数值记录当前页码。
在前页(front matter)中页码通常是负数,我们用小写罗马数字而不用阿拉伯数字编号。
在页面中间对页码的改动,会在该页的页眉和页脚中用到。
页码事实上由 \TeX\ 的\minref{输出例行程序}打印,你可以修改它们。
%\PlainTeX\ keeps the page number in the \minref{register} ^|\count0|.
%(|\pageno| is, in fact, a synonym for |\count0|.)
%Whenever it ships out a page to the \dvifile,
%^^|\shipout//{\tt\\count} registers displayed at|
%\TeX\ displays the current value of |\count0| on your
%terminal so that you can tell which page it is working on.
%It's possible to use registers |\count1|--|\count9| for nested
%levels of page numbers (you must program this yourself).
%If any of these registers are nonzero, \TeX\ displays them on your
%terminal also.\footnote{
%More precisely, it displays all registers in sequence from
%|\count0| to |\count9|, but omits trailing zero registers.
%For instance, if the values of |\count0|--|\count3|
%are $(17, 0 , 0, 7)$ and the others are $0$,
%\TeX\ displays the page number as {\tt [17.0.0.7]}.}
\PlainTeX\ 将页码记录在\minref{寄存器} ^|\count0| 中。%
(|\pageno| 实际上就是|\count0|的别名。)
当它输出一个页面到 \dvifile 时,
^^|\shipout//此时显示 {\tt\\count} 寄存器的值|
\TeX\ 在终端中显示 |\count0| 的值,让你知道它在排版哪一页。
也可以把寄存器 |\count1|--|\count9| 用于嵌套的多级页码
(但你必须自己编程)。
如果这些寄存器的值非零,\TeX\ 在终端中也显示它们的值。\footnote{
更准确来说,它从 |\count0| 到 |\count9| 依次显示各寄存器的值,但忽略末尾的零值。
比如,若 |\count0| 到 |\count3| 为 $(17, 0 , 0, 7)$ 而其他值都为 $0$,
则 \TeX\ 显示页码为 {\tt [17.0.0.7]}。}
\example
This explanation appears on page \number\pageno\
of our book.
|
\produces
This explanation appears on page \number\pageno\
of our book.
\nextexample
\pageno = 30 % Number the next page as 30.
Don't look for this explanation on page \number\pageno.
|
\produces
Don't look for this explanation on page 30.
\endexample
\enddesc
\begindesc
\cts advancepageno {}
\explain
%This command adds $1$ to the page number
%$n$ in |\pageno| if $n\ge0$
%and subtracts $1$ from it if $n<0$.
如果页码 $n\ge0$,此命令给 $n$ 加上 $1$;
如果 $n<0$ 则给 $n$ 减去 $1$。
\enddesc
\begindesc
\easy\cts nopagenumbers {}
\explain
%By default, \plainTeX\ produces a footer containing a centered page number.
%This command tells \TeX\ to produce a blank footer instead.
默认情况下,\plainTeX\ 会在页面的页脚生成居中的页码。
此命令让 \TeX\ 生成空的页脚。
\enddesc
\begindesc
\cts folio {}
\explain
%This command produces the current page number, whose value is the number
%$n$ contained in ^|\pageno|.
%If $n\ge0$,
%\TeX\ produces $n$ as a decimal number,
%while if $n<0$,
%\TeX\ produces $-n$ in lowercase roman numerals.
此命令生成当前页码,它的值等于记录在 ^|\pageno| 中的 $n$。
若 $n\ge0$,\TeX\ 用十进制数形式生成 $n$;
若 $n<0$,\TeX\ 用小写罗马数字形式生成 $-n$。
\example
This explanation appears on page \folio\ of the book.
|
\produces
This explanation appears on page \folio\ of the book.
\endexample
%\eix^^{page numbering}
%\enddesc
\eix^^{页码}
\enddesc
%==========================================================================
%\subsection{Header and footer lines}
\subsection{页眉和页脚}
\begindesc\secondprinting{\vglue-.75\baselineskip\vskip0pt}
\cts headline {\param{token list}}
\cts footline {\param{token list}}
\explain
%These parameters
%contain, respectively, the current headline (header) and the current
%footline (footer).
%The \plainTeX\ output routine
%places the headline at the top of each page and the footline
%at the bottom of each page.
%The default headline is empty and the default footline is a centered
%page number.
这两个参数分别指定当前的页眉和页脚。
\PlainTeX\ 输出例行程序将把页眉放在各页顶部,页脚放在各页底部。
默认的页眉为空,而默认的页脚为居中的页码。
%The headline and footline should both
%be as wide as |\hsize| (use |\hfil|, \xref{\hfil}, for this
%if necessary).
%You should always include a font-setting command in these lines, since
%the current font is unpredictable when \TeX\ is calling the
%output routine. If you don't set the font explicitly,
%you'll get whatever font \TeX\ was using when it broke the page.
页眉和页脚的宽度应该和 |\hsize| 相等(必要时可以用 |\hfil|,\xref{\hfil})。
在页眉和页脚中你永远应该加上字体设定命令,
因为你无法预知 \TeX\ 调用输出例行程序时的当前字体。
如果你不明确指明字体,\TeX\ 将使用分页时所用的字体。
%You shouldn't try to use |\headline| or |\footline|
%to produce multiline headers or footers.
%Although \TeX\ won't complain, it will give you something that's very ugly.
%See \xrefpg{bighead} for a method of creating multiline headers or
%footers.
不要试图用 |\headline| 或 |\footline| 生成多行的页眉或页脚。
即使 \TeX\ 不会报错,它也只会出很难看的结果。
在\xrefpg{bighead}中有生成多行页眉或页脚的方法。
\example
\headline = {\tenrm My First Reader\hfil Page \folio}
|
\produces
\pageno = 10
\line{\tenrm \noindent My First Reader\hfil Page \folio}
\par ({\it at the top of page \folio}\/)
\nextexample
\footline = {\tenit\ifodd\pageno\hfil\folio
\else\folio\hfil\fi}
% Produce the page number in ten-point italic at
% the outside bottom corner of each page.
|
\endexample\enddesc
%\secondprinting{\vfill\eject}
%==========================================================================
%\subsection {Marks}
\subsection {标记}
\begindesc
\cts mark {\rqbraces{\<text>}}
\explain
%\bix^^{marks}
%This command causes \TeX\ to append a mark
%containing \<mark text>
%to whatever list it is currently constructing.
%Generally you shouldn't use |\mark| within an
%``inner'' construct such as a math formula or a \minref{box}
%you've built with an |\hbox|, |\vbox|, or |\vtop| command, because
%\TeX\ won't see the mark when it's constructing the main box of the page. But
%if you use |\mark| in ordinary horizontal \minref{mode}