-
Notifications
You must be signed in to change notification settings - Fork 8
/
concepts.tex
6638 lines (6080 loc) · 294 KB
/
concepts.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, 2014 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry.
% See file fdl.tex for copying conditions.
\input macros
%\chapter{Concepts}
\chapter{概念}
\chapterdef{concepts}
%This part of the book contains definitions and explanations of
%the concepts that we use in describing \TeX.
%The concepts include both
%technical terms that we use in explaining the commands and
%important topics that don't fit elsewhere in the book.
本书的这部分包含了使用 \TeX\ 时所需要了解的概念。
它包括我们在解释命令时所使用的技术词汇以及重点内容,
这些内容并不适合放在本书的其它地方。
%The concepts are arranged alphabetically.
%The inside back cover of the book contains a complete list of
%concepts and the pages on which they are explained.
%We suggest that you make a copy of the inside back cover and keep it nearby
%so that you'll be able to identify and look up an unfamiliar
%concept immediately.
%As far as possible, we've kept our terminology consistent with that of
%\texbook.\idxref{\texbook}
这些概念使用英文字母顺序进行排列,
书背内页包含了一份详细的在此提及的概念列表,以及他们被提及时所在的页数。
我们建议你把书背内页复印下来,放在旁边,
这样你就能在遇到不熟悉的概念时马上查找到它们。
我们尽可能地使用和 \texbook\ 相一致的术语。\mcidxref{texbook}
\beginconcepts
\bookmark{2}{以A开头}
%\conceptindex{active characters}
%\concept {active character}
\conceptindex{活动字符}
\concept {活动字符}
%An \defterm{active character} is a \refterm{character}
%that has a definition, e.g., a macro definition, associated with it.
%^^{macros//named by active characters}
%You can think of an active character as a special kind of control sequence.
%When \TeX\ encounters an active character, it
%executes the definition associated with the character.
%If \TeX\ encounters an active character that does not have
%an associated definition, it will complain about an
%undefined control sequence.
\defterm{活动字符}(active character)是一个有定义的\refterm{字符}。
比如一个活动字符可能表示着一个宏定义。
^^{宏//由活动字符命名}
你可以把活动字符理解为一种控制序列。
当 \TeX\ 碰到了一个活动字符,它就执行这个字符所表示的定义。
如果 \TeX\ 碰到的活动字符并没有表示一个定义,
则它会报错说这是一个没有定义的控制序列。
%An active character has a \refterm{category code} of $13$ (the value
%of ^|\active|).
%To define an active character, you should first
%use the ^|\catcode| command
%\ctsref{\catcode} to make it active
%and then provide the definition of the character, using
%a command such as |\def|, |\let|, or |\chardef|.
%The definition of an active character has the same form as
%the definition of a \refterm{control sequence}.
%^^{category codes//of active characters}
%If you try to define the macro for an active character
%before you make the character active, \TeX\ will complain about a
%missing control sequence.
一个活动字符的\refterm{类别码}为 $13$ (^|\active|的值)。
当你定义一个活动字符时,
你必须先使用 ^|\catcode| 命令 \ctsref{\catcode} 来使这个字符活动,
然后再使用类似 |\def|,|\let| 或者 |\chardef| 之类的命令指定这个字符的定义。
定义活动字符和定义\refterm{控制序列}所使用的方法是相同的。
^^{类别码//活动字符的类别码}
如因你尝试先对字符指定定义后把它设置成活动的,
\TeX\ 会报错说这是一个不明的控制序列。
%For example, the tilde character (|~|) is defined as an active character
%in \plainTeX. It
%produces a space between two words but links those words so that
%\TeX\ will not turn the space into a \refterm{line break}.
%\refterm{\PlainTeX:\plainTeX} defines `|~|' by the commands:
比如,在 \PlainTeX\ 中,波浪号 (|~|) 被定义成一个活动字符。
它可以在所连接的两个单词当中产生一个空格,并且不让 \TeX\ 把这个空格转为 \refterm{断行}。
\refterm{\PlainTeX:\plainTeX} 通过以下方式来定义 `|~|':
\csdisplay
\catcode `~ = \active \def~{\penalty10000\!visiblespace}
|
%(The |\penalty| inhibits a line break and the `|\!visiblespace|'
%inserts a space.)
(这里的 |\penalty| 可以阻止断行,`|\!visiblespace|' 可以插入一个空格。)
\endconcept
%\conceptindex{alignments}
%\concept alignment
\conceptindex{阵列}
\concept 阵列
%\bix^^{tables}
%An \defterm{alignment} is a construct for aligning material, such as a
%table, in columns or rows. To form an alignment you need to
%(a)~describe the layout of the columns or rows and (b)~tell \TeX\ what
%material goes into the columns or rows. A tabbing alignment or a
%horizontal alignment is organized as a sequence of rows; a vertical
%alignment is organized as a sequence of columns. We first describe
%tabbing and horizontal alignments and then more briefly describe
%vertical alignments.
\bix^^{表格}
\defterm{阵列}(alignment)是一个把素材有序排印的结构,
就如一张有行有列的表格。当你需要构造一个阵列时,
你要 (a)~描述行和列的布局,并且 (b)~告诉 \TeX\ 各行或各列中的内容。
制表阵列和水平阵列是由一系列的行组成;竖直阵列则由一系列的列组成。
我们首先讲述制表阵列和水平阵列,然后简要地介绍一下竖直阵列。
%Tabbing alignments are defined by \plainTeX. They are simpler but less
%flexible than horizontal alignments. Tabbing and horizontal alignments
%differ principally in how you describe their layouts.
制表阵列是在 \PlainTeX\ 中定义的。它很简单,因此不如水平阵列那样灵活。
制表阵列和水平阵列的主要区别在于你如何定义它们的布局。
\bix^^|\settabs|
\bix\bix{\let\+\relax\syidxref{\+}}
\bix\ctsidxref{cr}
%To construct a tabbing alignment you first issue a |\settabs| command
%\ctsref{\settabs} that specifies how \TeX\ should divide the available
%horizontal space into columns. Then you provide a sequence of rows for
%the table. Each row consists of a |\+| control sequence \ctsref{\@plus}
%followed by a list of ``entries'', i.e., row\slash column intersections.
%^^{entry (column or row)}
%Adjacent entries in a row are separated by an ampersand (|&|).
%\xrdef{@and}
%\ttidxref{&}
%The end of a row is indicated by ^|\cr| after its
%last entry.
%If a row has fewer entries than there are columns in the alignment,
%\TeX\ effectively fills out the row with blank entries.
要构造一个制表阵列,你首先需要用 |\settabs| 命令
\ctsref{\settabs} 确定 \TeX\ 如何将可用空白水平地分为多列。
然后你就可以逐行地填充表格的各行。
每行由控制序列|\+|\ctsref{\@plus}及其后的一排用 |&| 隔开的“条目”组成%
^^{条目(在行或列中)}
\xrdef{@and}
\chidxref{\&}
(条目是行和列的交叉部分),并以 ^|\cr| 结束。
如果某行的条目数目比该阵列的列数少,\TeX\ 就用空白条目填充它们。
%As long as it's preceded by a |\settabs| command, you can put a row of a
%tabbing alignment anywhere in your document. In particular, you can put
%other things between the rows of a tabbing alignment or describe several
%tabbing alignments with a single |\settabs|. Here's an example of a
%tabbing alignment:
你可以将制表阵列的行放在文档的任何地方,只要前面有 |\settabs| 命令。
特别地,你可以在制表阵列的各行之间添加其他内容,
或者用同一个 |\settabs| 描述多个制表阵列。
这里有一个制表阵列的例子:
%\xrdef{tabbedexample}\csdisplay
%{\hsize = 1.7 in \settabs 2 \columns
%\+cattle&herd\cr
%\+fish&school\cr
%\+lions&pride\cr}
%|
%The |\settabs 2 \columns| command in this example \ctsref{\settabs}
%tells \TeX\ to produce two equally wide columns.
%The line length is $1.7$ inches.
%The typeset alignment looks like this:
\xrdef{tabbedexample}\csdisplay
{\hsize = 1.7 in \settabs 2 \columns
\+cattle&herd\cr
\+fish&school\cr
\+lions&pride\cr}
|
这个例子中的 |\settabs 2 \columns| 命令\ctsref{\settabs}%
让 \TeX\ 生成总宽度为 $1.7$ 英寸的等宽两列。
所排版出的阵列如下:
%{\def\+{\tabalign}% so it isn't \outer.
%\vdisplay{%
%\hsize 1.7 in \settabs 2 \columns
%\+cattle&herd\cr
%\+fish&school\cr
%\+lions&pride\cr}
%}%
{\def\+{\tabalign}% so it isn't \outer.
\vdisplay{%
\hsize 1.7 in \settabs 2 \columns
\+cattle&herd\cr
\+fish&school\cr
\+lions&pride\cr}
}%
%\margin{Missing explanation added here.}
%There's another form of tabbing alignment in which you specify the column
%widths with a template. The column widths in the template
%determine the column widths in the rest of the alignment:
%\csdisplay
%{\settabs\+cattle\quad&school\cr
%\+cattle&herd\cr
%\+fish&school\cr
%\+lions&pride\cr}
%|
%Here's the result:
%{\def\+{\tabalign}% so it isn't \outer.
%\vdisplay{%
%\settabs\+cattle\quad&school\cr
%\+cattle&herd\cr
%\+fish&school\cr
%\+lions&pride\cr}
%}%
\margin{Missing explanation added here.}
制表阵列还有另一种用模板指明各列宽度的用法。
模板的各列宽度决定了该阵列其后的各列宽度:
\csdisplay
{\settabs\+cattle\quad&school\cr
\+cattle&herd\cr
\+fish&school\cr
\+lions&pride\cr}
|
这是上面例子生成的结果:
{\def\+{\tabalign}% so it isn't \outer.
\vdisplay{%
\settabs\+cattle\quad&school\cr
\+cattle&herd\cr
\+fish&school\cr
\+lions&pride\cr}
}%
\eix^^|\settabs|
\eix{\let\+\relax\syidxref{\+}}
\bix^^|\halign|
%Horizontal alignments are constructed with |\halign| \ctsref\halign.
%\TeX\ adjusts the column widths of a horizontal alignment according to
%what is in the columns. When \TeX\ encounters the |\halign| command
%that begins a horizontal alignment, it first examines all the rows of
%the alignment to see how wide the entries are. It then sets each column
%width to accommodate the widest entry in that column.
水平阵列用 |\halign| \ctsref\halign 命令构造。
\TeX\ 将根据各列内容调整水平阵列的列宽。
当 \TeX\ 碰到 |\halign| 命令要开始一个水平阵列时,
它首先检查该阵列的各行,看看各条目都有多宽。
然后设定各列宽度以容纳该列中最宽的条目。
%A horizontal alignment governed by |\halign| consists of a
%``\pix^{preamble}'' that indicates the row layout followed by the rows
%themselves.
%\ulist
%\li The preamble consists of a sequence of \pix^{template}s, one for each
%column. The template for a column specifies how the text for that
%column should be typeset. Each template must include a single |#|
%character
%\ttidxref{#}\xrdef{@asharp}
%to indicate where \TeX\ should substitute the text of an entry into the
%template. The templates are separated by ampersands (|&|), \ttidxref{&}
%and the end of the preamble is indicated by |\cr|. By providing an
%appropriate template you can obtain effects such as centering a column,
%left or right justifying a column, or setting a column in a particular
%\refterm{font}.
由 |\halign| 命令构造的水平阵列包含一个“\pix^{导言}”,
该导言说明了随后各行的布局。
\ulist
\li 导言由一系列\pix^{模板}组成,一个模板对应一列,
指明该列的文本应该如何排版。
每个模板中都必须包含一个|#|字符,
\chidxref{\#}\xrdef{@asharp}
用于给出 \TeX\ 将条目的文本放入模板的位置。
各个模板之间用 |&| 分隔,\chidxref{\&} 并以 |\cr| 结束该导言。
利用合适的模板你可以让某列居中,左对齐或右对齐,
或者使用某个特定的\refterm{字体}。
%\li The rows have the same form as in a tabbing alignment, except that
%you omit the |\+| at the beginning of each row.
%As before, entries are separated by |&| and the end of the row
%is indicated by |\cr|.
%\TeX\ treats each entry as a
%\refterm{group}, so any
%font-setting command or other \refterm{assignment}
%in a column template is in effect only for the entries in that column.
%\endulist
%\noindent The preamble and the rows must all be enclosed in the braces
%that follow |\halign|. Each |\halign| alignment must include
%its own preamble.
\li 除了要省略各行开头的 |\+|,各行的写法都和制表阵列一样:
一行的各条目之间用 |&| 分隔,并以 |\cr| 结束该行。
\TeX\ 将各个条目都看作一个\refterm{编组},
因此对某列模板的字体设定或其他\refterm{赋值}都只对该列各个条目有效。
\endulist
\noindent 导言和各行都必须放在 |\halign| 后的花括号里面。
每个 |\halign| 阵列都必须包含各自的导言。
%For example, the horizontal alignment:
%\csdisplay
%\tabskip=2pc
%\halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr
% &&\it Table\cr
%\noalign{\kern -2pt}
% \it Creature&\it Victual&\it Position\cr
%\noalign{\kern 2pt}
% Alice&crumpet&left\cr
% Dormouse&muffin&middle\cr
% Hatter&tea&right\cr}
%|
例如,下面这个水平阵列:
\csdisplay
\tabskip=2pc
\halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr
&&\it Table\cr
\noalign{\kern -2pt}
\it Creature&\it Victual&\it Position\cr
\noalign{\kern 2pt}
Alice&crumpet&left\cr
Dormouse&muffin&middle\cr
Hatter&tea&right\cr}
|
%\noindent produces the result:
\noindent 生成下面的结果:
%\xrdef{halignexample}
%\vdisplay{%
%\tabskip=2pc \halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr
% &&\it Table\cr
%\noalign{\kern -2pt}
% \it Creature&\it Victual&\it Position\cr
%\noalign{\kern 2pt}
% Alice&crumpet&left\cr
% Dormouse&muffin&middle\cr
% Hatter&tea&right\cr}
%}%
%\noindent The ^|\tabskip| \ctsref{\tabskip} in this example
%tells \TeX\ to insert |2pc| of
%\refterm{glue} between the columns.
%The ^|\noalign| \ctsref{\noalign} commands tell \TeX\ to insert
%\refterm{vertical mode} material between two rows.
%In this example we've
%used |\noalign| to produce some extra space between the title rows and
%the data rows, and also to bring ``Table'' and ``Position'' closer together.
%(You can also use |\noalign| before the first row or after the
%last row.)
%\eix^^|\halign|
\xrdef{halignexample}
\vdisplay{%
\tabskip=2pc \halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr
&&\it Table\cr
\noalign{\kern -2pt}
\it Creature&\it Victual&\it Position\cr
\noalign{\kern 2pt}
Alice&crumpet&left\cr
Dormouse&muffin&middle\cr
Hatter&tea&right\cr}
}%
\noindent 这个例子中的 ^|\tabskip| \ctsref{\tabskip}
命令让 \TeX\ 在各列间插入 |2pc| 的\refterm{粘连}。
^|\noalign| \ctsref{\noalign} 命令%
让 \TeX\ 在两行间插入\refterm{竖直模式}素材。
在此例子中我们用 |\noalign| 生成标题行和数据行之间的额外间距,
还让“Table”和“Position”紧挨在一起。%
(在首行之前或者末行之后你同样可以使用 |\noalign| 命令。)
\eix^^|\halign|
%You can construct a vertical alignment with the ^|\valign| command
%\ctsref{\valign}. A vertical alignment is organized as a series of
%columns rather than as a series of rows. A vertical alignment follows
%the same rules as a horizontal alignment except that the roles of rows
%and columns are interchanged. For example, the vertical alignment:
用 ^|\valign| 命令
\ctsref{\valign}可以构造一个竖直阵列。
竖直阵列按照列而不按照行组织。
它遵循和水平阵列相同的法则,
只是此时行和列的地位交换了。
例如,下面的竖直阵列:
%\csdisplay
%{\hsize=0.6in \parindent=0pt
%\valign{#\strut&#\strut&#\strut\cr
% one&two&three\cr
% four&five&six\cr
% seven&eight&nine\cr
% ten&eleven\cr}}
%|
%\noindent yields:
%\vdisplay{%
%{\hsize=0.6in \parindent=\listleftindent % Because lists and displays
% % are not indented just by \parindent.
%\valign{#\strut&#\strut&#\strut\cr
% one&two&three\cr
% four&five&six\cr
% seven&eight&nine\cr
% ten&eleven\cr}}
%}
%The ^|\strut| commands \ctsref{\strut}
%in the template are necessary to get the entries in each row
%to line up properly, i.e., to have a common \refterm{baseline},
%and to keep the distance between baselines uniform.
%\eix\ctsidxref{cr}
%\eix^^{tables}
\csdisplay
{\hsize=0.6in \parindent=0pt
\valign{#\strut&#\strut&#\strut\cr
one&two&three\cr
four&five&six\cr
seven&eight&nine\cr
ten&eleven\cr}}
|
\noindent 得到的结果为:
\vdisplay{%
{\hsize=0.6in \parindent=\listleftindent % Because lists and displays
% are not indented just by \parindent.
\valign{#\strut&#\strut&#\strut\cr
one&two&three\cr
four&five&six\cr
seven&eight&nine\cr
ten&eleven\cr}}
}
模板中的 ^|\strut| 命令 \ctsref{\strut} 是必不可少的,
因为它让一行的各条目合适地排成一行,
即让它们有共同的\refterm{基线},并让基线间的距离保持一致。
\eix\ctsidxref{cr}
\eix^^{表格}
\endconcept
\def\conceptindexsort{texpouxi}
\concept{\texpouxi}
%\texbook\ describes the way that {\TeX} processes its input in terms of \TeX's
%``digestive tract''---its ``^{eyes}'', ``^{mouth}'',
%``^{gullet}'', ``^{stomach}'', and ``^{intestines}''. Knowing how this
%processing works can be helpful when you're trying to understand subtle
%aspects of \TeX's behavior as it's digesting a document.
\texbook\ 将 {\TeX} 处理输入的过程用 \TeX\ 的“消化道”来描述,
包括“^{眼睛}”,“^{嘴巴}”,“^{食道}”,“^{胃}” 和“^{肠道}”。
知道这个处理过程如何运转,将有助于你理解\TeX\ 消化文档时的行为细节。
\ulist
%\li Using its ``\pix^{eyes}'', \TeX\ reads \refterm{characters:character} from
%^{input files} and passes them to its mouth. Since an input file
%can contain ^|\input| commands \ctsref{\input},
%\TeX\ can in effect ``shift its gaze'' from one file to another.
\li 使用“\pix^{眼睛}”,\TeX\ 从^{输入文件}中读取\refterm{字符}并传给它的嘴巴。
由于输入文件中可能包含 ^|\input| 命令\ctsref{\input},
\TeX\ 实际上能够从一个文件“转移视线”到另一个文件。
%\li Using its ``\pix^{mouth}'', {\TeX} assembles the characters into
%\refterm{tokens:token} and passes them to its gullet.
%Each token is either a \refterm{control sequence} or a single
%character. A control sequence always starts with an \refterm{escape
%character}. Note that spaces and ends-of-line are characters in their
%own right, although \TeX\ compresses a sequence of input spaces into a single
%space token. See \knuth{pages~46--47} for the rules by which \TeX\ assembles
%characters into tokens.
%^^{tokens//assembled from characters}
\li 使用“\pix^{嘴巴}”,{\TeX} 将字符组合为\refterm{记号}并传给它的食道。
每个记号要么是一个\refterm{控制序列}要么是单个字符,
其中控制序列总是以\refterm{转义符}开始。
注意空格符以及行尾符自身也是字符,
只是 \TeX\ 将输入中的多个空格合并为一个空格记号。
在\knuth{第~46--47~页}
中介绍了 \TeX\ 将字符组合为记号的规则。
^^{记号//将字符组合为记号}
%\li Using its ``\pix^{gullet}'', {\TeX} expands any macros, conditionals, and
%^^{macros//expanded in \TeX's stomach}
%^^{tokens//passed to \TeX's stomach}
%similar constructs that it finds (see \knuth{pages~212--216}) and passes
%the resulting sequence of \refterm{tokens:token}
%to \TeX's stomach. Expanding one token
%may yield other tokens that in turn need to be expanded. {\TeX} carries
%out this expansion from left to right unless the order is modified by
%a command such as |\expandafter| \ctsref{\expandafter}.
%In other words, \TeX's gullet always expands the leftmost un\-ex\-panded
%token that it has not yet sent to \TeX's stomach.
\li 使用“\pix^{食道}”,{\TeX} 展开任何宏、条件句,
^^{宏//在 \TeX\ 的胃展开}
^^{记号//传给 \TeX\ 的胃}
以及它找到的类似结构(见\knuth{第~212--216~页},
并将得到的一系列\refterm{记号}传给 \TeX\ 的胃。
展开一个记号也许会得到本身也需要展开的其他记号。
{\TeX} 按照从左到右的顺序执行记号展开,
除非你用类似 |\expandafter| \ctsref{\expandafter} 的命令改变其顺序。
换言之,\TeX\ 的食道总是展开未送入胃中的记号中最左边的未展开记号。
%\li Using its ``\pix^{stomach}'', {\TeX} processes the tokens in
%groups.
%Each group contains a primitive command followed by its arguments, if any.
%Most of the commands are of the ``typeset this character'' variety,
%so their groups consist of just one token.
%Obeying the instructions given by the commands,
%\TeX's stomach assembles larger and larger
%units, starting with
%characters and ending with pages,
%and passes the pages to \TeX's intestines.
%^^{pages//assembled in \TeX's stomach}
%\TeX's stomach handles the tasks of \refterm{line break}ing---%
%^^{line breaking}
%i.e., breaking each paragraph into a sequence of lines---%
%and of \refterm{page break}ing---i.e., breaking a continuous sequence of lines
%and other vertical mode material
%into pages.
\li 使用“\pix^{胃}”,{\TeX} 一组一组地处理记号。
每个分组里面包含一个原始命令及可能跟随着的命令参量。
大多数命令属于“排版此字符”这种,因此它们的分组中仅包含一个记号。
按照命令的指示,
\TeX\ 的胃从字符到页面逐步组装出越来越大的部件,
并将生成的页面传给 \TeX\ 的肠道。
^^{页面//在 \TeX\ 的胃中组装}
\TeX\ 的胃执行\refterm{断行}任务%
^^{断行}
——即将每个段落分为若干行,
以及\refterm{分页}任务%
——即将连续若干行和其他竖直模式素材分为多个页面。
%\li Using its ``\pix^{intestines}'', \TeX\ transforms the pages produced by its
%stomach into a form intended for processing
%by other programs. It then sends the transformed output to the
%\dvifile.
%^^{\dvifile//created by \TeX's intestines}
\li 使用“\pix^{肠道}”,\TeX\ 将它的胃生成的页面转换为适合其他程序处理的形式,
并将转换出的结果送到 \dvifile 。
\fnidxref{dvi//created by \TeX's intestines}
\endulist
%Most of the time you can think of the processes that take place in \TeX's
%eyes, mouth, gullet, stomach, and intestines
%as happening one after the other. But the
%truth of the matter is that commands executed in \TeX's stomach can
%influence the earlier stages of digestion. For instance, when \TeX's stomach
%encounters the |\input| command \ctsref{\input},
%its eyes start reading from a different
%file; when \TeX's stomach encounters a |\catcode| command
% \ctsref{\catcode} specifying a category code
%for a character $c$, the interpretation of $c$ by \TeX's mouth is affected.
%And when
%\TeX's stomach encounters a \refterm{macro} definition, the expansions carried
%out in \TeX's gullet are affected.
多数时候你都可以认为在 \TeX\ 的眼睛,嘴巴,食道,
胃和肠道中的操作是一个接一个进行的。
但事实真相是,在 \TeX\ 的胃中执行的命令可能会影响前面步骤的消化过程。
举例来说,当 \TeX\ 的胃碰到 |\input| 命令\ctsref{\input}时,
它的眼睛将开始读取另一个文件;
当 \TeX\ 的胃碰到指定字符$c$的类别码的 |\catcode| 命令\ctsref{\catcode}时,
\TeX\ 的嘴巴对 $c$ 的解释就会受影响;
而当 \TeX\ 的胃碰到\refterm{宏}定义时,
在 \TeX\ 的食道进行的宏展开也会受到影响。
%You can understand how the processes interact by imagining that each
%process eagerly gobbles up the output of its predecessor as soon as it
%becomes available. For instance, once \TeX's stomach has seen
%the last character of the filename in an |\input| command, \TeX's gaze
%immediately shifts to the first character of the specified input file.
%\endconcept
为更好地理解各个器官的相互影响,你可以把各个器官都想象为急性子,
前任器官一有输出,后面的器官就急切地吞食该输出。
比如,\TeX\ 的胃一看到 |\input| 命令的文件名的最后一个字符,
它的眼睛就立即转移视线到所指定输入文件的第一个字符。
\endconcept
%\pagebreak
%\conceptindex{arguments}
%\concept argument
\conceptindex{参量}
\concept 参量
%^^{commands//arguments of}
%An \defterm{argument} contains text that is passed to a
%\refterm{command}.
%The arguments of a command complete the description of what
%the command is supposed to do.
%The command can either be a \refterm{primitive} command or a
%\refterm{macro}.
^^{命令//命令的参量}
命令的\defterm{参量}(argument)包含传递给\refterm{命令}的文本,
它补全了该命令正常运行所需的信息。
这里的命令可以是\refterm{原始命令}或者\refterm{宏}.
%Each primitive command ^^{primitive//command}
%has its own convention about the form of its
%arguments. For instance, the sequence of \refterm{tokens:token}:
原始命令^^{原始的//原始命令}的参量有各自规定的形式。
例如,下面的一系列\refterm{记号}:
%\csdisplay
%\hskip 3pc plus 1em
%|
%consists of the command `|\hskip|' and the arguments
%`|3pc plus 1em|'. But if you were to write:
\csdisplay
\hskip 3pc plus 1em
|
由 `|\hskip|' 命令及其参量 `|3pc plus 1em|' 组成。
但若你这样写:
%\csdisplay
%\count11 3pc plus 1em
%|
%you'd get an entirely different effect.
%\TeX\ would treat `|\count11|' as a command with argument `|3|',
%followed by the ordinary text tokens `|pc plus 1em|'
%(because count registers expect a number to be assigned to them)%
%---probably not what
%you intended. The effect of the command, by the way, would be to
%assign $3$ to count register $11$ (see the discussion of ^|\count|,
%\xref\count).
\csdisplay
\count11 3pc plus 1em
|
你将得到完全不同的结果。
\TeX\ 将认为 `|\count11|' 为命令,其参量为`|3|',
而后面的 `|pc plus 1em|' 是普通的文本记号%
(因为计数寄存器要求一个整数值作为参量)——这多半不是你想要的。
顺便说一下,该命令将给第$11$号计数寄存器赋值$3$
(见 ^|\count| 这里的讨论,\xref\count )。
%Macros, on the other hand, all follow the same convention
%for their arguments.
%^^{macros//arguments of}
%Each argument passed to a macro
%corresponds to a \refterm{parameter}
%^^{parameters//and arguments}
%in the definition of that
%macro. ^^{macros//parameters of}
%A macro parameter is either ``delimited'' or ``undelimited''.
%The macro definition determines the number and nature of the macro parameters
%and therefore the number and nature of the macro arguments.
另一方面,所有宏都遵循相同的参量约定。
^^{宏//宏的参量}
传递给宏的每个参量都对应宏定义中的一个\refterm{参数}。
^^{参数//与参量对应}^^{宏//宏的参数}
宏的参数可以是“定界的”或是“非定界的”。
在宏的定义中确定了宏参数的个数和类型,
从而确定了宏参量的个数和类型。
%The difference between a delimited argument and an undelimited argument
%lies in the way that \TeX\ decides where the argument ends.
%^^{delimited arguments}
%^^{undelimited arguments}
%\ulist
%\li A delimited argument consists of the tokens
%from the start of the argument up to, but not including, the
%particular sequence of tokens that serves as the delimiter for that argument.
%The delimiter is specified in the macro definition. Thus you
%supply a delimited argument to a macro by writing the argument itself
%followed by the delimiter. A delimited argument can be empty, i.e., have
%no text at all in it. Any braces in a delimited argument must be paired
%properly, i.e., every left brace must have a corresponding right brace
%and vice versa.
定界参量和非定界参量的区别在于,
\TeX\ 用不同方式确定该参量的结束位置。
^^{定界参量}
^^{非定界参量}
\ulist
\li 定界参量由该参量开始处和作为该参量定界子的特定记号序列之间的所有记号组成,
但不包含该定界子序列。其中的定界子是在宏的定义中规定的。
因此要给出定界参量,你需要写上该参量并在其后加上定界子。
定界参量也可以是空的,即不包含任何文本。
定界参量里面的任何花括号都必须配好对,
即每个左花括号必须有对应的右花括号,反之亦然。
%\li An undelimited argument consists of a single token or a sequence of
%tokens enclosed in braces, like this:
%`|{Here is {the} text.}|'. Despite appearances, the outer braces don't
%form a \refterm{group}---\TeX\ uses them only to determine what the
%argument is. Any inner braces, such as the ones around `|the|', must be
%paired properly. If you make a mistake and put in too many right
%braces, \TeX\ will complain about an unexpected right brace. \TeX\ will
%also complain if you put in too many left braces, but you'll probably
%get \emph{that} complaint long after the place where you intended to
%end the argument (see \xref{mismatched}).
%\endulist
%\noindent
%See \conceptcit{macro} for more information
%about parameters and arguments. You'll find the precise rules pertaining
%to delimited and undelimited arguments in \knuth{pages~203--204}.
%\endconcept
\li 非定界参量由单个记号或者包含在花括号的一系列记号组成,
比如`|{Here is {the} text.}|'。
外面的一对花括号,虽然看起来像,实际上并不组成一个\refterm{编组}%
——\TeX\ 只是用它们确定参量的范围。
而参量内部的花括号,比如`|the|'两边的,必须正确配对。
若你误将太多右花括号放在里面,
\TeX\ 将报错说有多余的右花括号。
若左花括号太多,\TeX\ 同样会报错;
但\emph{这个错误}可能出现在该参量所期望的结束位置之后很远的地方
(见 \xref{mismatched})。
\endulist
\noindent
请参阅\conceptcit{宏}这里的更多关于参数和参量的内容。
在\knuth{第~203--204~页}你能找到定界参量和非定界参量的精确规则。
\endconcept
\concept{ASCII}
%\defterm{\ascii} is the abbreviation of ``American Standard Code for
%Information Interchange''. There are $256$ \ascii\
%^{characters}, each with its own code number, but
%the meanings of only the first~$128$ have been standardized. You can
%find these meanings in an \ascii\ ``code table'' such as the one on
%\knuth{page~367}. Characters $32$--$126$ are ``printable characters'',
%^^{printable characters} such as letters, numbers, and punctuation
%marks. The remaining characters are ``^{control characters}'' that are
%typically used (in the computer industry, not in \TeX) to control
%input\slash output and data communications devices. For instance,
%\ascii\ code $84$ corresponds to the letter `T', while \ascii\
%code~$12$ corresponds to the ``form feed'' function (interpreted by most
%printers as ``start a new page''). Although the \ascii\ standard
%specifies meanings for the control characters, many manufacturers of
%equipment such as modems and printers have used the control characters
%for purposes other than the standard ones.
\defterm{\ascii} 是“美国信息交换标准编码”(American Standard Code for
Information Interchange)的缩写。总共有 $256$ 个 \ascii\ ^{字符},
每个都有自己的编码,但只有前面 $128$ 个是标准编码。
在 \ascii\ “编码表”,比如\knuth{第~367~页}里面,你可以找到这些编码的含义。
编码在 $32$--$126$ 之间的字符为“可打印字符^^{可打印字符}”,
比如字母,数字和标点符号。
其余字符为“^{控制字符}”,通常用于(在计算机工业中,而不是 \TeX\ 中)
控制输入\slash 输出和数据交换设备。
比如,\ascii\ 码 $84$ 对应于字符`T',
而 \ascii\ 码 $12$ 对应于“换页”功能(大多数打印机都将它解释为“开始新页”)。
虽然 \ascii\ 标准指定了控制字符的含义,
但很多设备,比如调制解调器和打印机,都将控制字符用于标准规定之外的目的。
%The meaning of a
%character in \TeX\ is usually consistent with its meaning in standard \ascii,
%and \refterm{fonts:font} that contain \ascii\
%printable characters usually have those characters in the same positions as
%their \ascii\ counterparts.
%But some fonts, notably those used for math, replace the \ascii\
%printable characters by other characters unrelated to the \ascii\ characters.
%For instance, the Computer Modern math font
%^^{Computer Modern fonts}
%|cmsy10| has the math symbol
%`{$\forall$}' in place of the \ascii\ digit `8'.
\TeX\ 中字符的含义通常和标准 \ascii 中的含义一致。
而且在包含 \ascii\ 可打印字符的\refterm{字体}中,
这些字符所在的位置也和 \ascii\ 中的一样。
但有些字体,特别是数学字体,
将 \ascii\ 可打印字符替换为与 \ascii\ 无关的字符。
比如,计算机现代数学字体 ^^{计算机现代字体} |cmsy10|
在 \ascii\ 数字 `8' 的位置上是数学符号 `{$\forall$}'。
\endconcept
%\conceptindex{assignments}
%\concept assignment
\conceptindex{赋值}
\concept 赋值
%An \defterm{assignment} is a construct that tells \TeX\ to assign a
%value to a register,
%^^{registers//assignment to}
%to one of its internal
%\refterm{parameters:parameter},
%^^{parameters//assignments to}
%to an entry in one of its internal tables,
%or to a \refterm{control sequence}. Some examples of assignments are:
\defterm{赋值}(assignment)是一种为 \TeX\ 的寄存器,
内部\refterm{参数},内部表格项,或者\refterm{控制序列}分配值的结构。
^^{寄存器//给寄存器赋值}^^{参数//给参数赋值}
赋值的一些例子如下:
\csdisplay
\tolerance = 2000
\advance\count12 by 17
\lineskip = 4pt plus 2pt
\everycr = {\hskip 3pt \relax}
\catcode\`@ = 11
\let\graf = \par
\font\myfont = cmbx12
|
%The first assignment indicates that \TeX\ should assign the numeric value
%|2000| to the numeric parameter |\tolerance|, i.e., make the value of
%|\tolerance| be $2000$. The other assignments are similar. The `|=|'
%and the spaces are optional, so you could also write the first
%assignment more tersely as:
第一个赋值要求 \TeX\ 分配数值 |2000| 给数值参数 |\tolerance|,
即让 |\tolerance| 的值等于 $2000$。其他赋值类似。
赋值中的 `|=|' 和空格是可省略的,
因此你也可以把第一个赋值改写为下面更紧凑的形式:
\csdisplay
\tolerance2000
|
%See \knuth{pages~276--277} for the detailed syntax of assignments.
%\endconcept
在 \knuth{第~276--277~页}中对赋值语法有详细介绍。
\endconcept
\bookmark{2}{以B开头}
%\concept badness
\concept 劣度
%The \defterm{badness} of a line is a measure of how far the interword
%spaces ^^{interword spacing}
%in the line deviate from their natural values,
%i.e., the values specified in the \refterm{fonts:font} used in the line.
%The greater the
%deviation, the greater the badness. Similarly, the badness of a page is
%a measure of how far the spaces between the boxes that
%make up the page deviate from their ideal values. (Ordinarily, most of these
%boxes are single lines of paragraphs.)
文本行的\defterm{劣度}(badness)值测量该行的字间隔偏离它们的自然值多远,
^^{单词间距}
其中自然值就是文本行所用\refterm{字体}中指定的值。
偏离越大,劣度就越大。类似地,页面的劣度测量页面盒子的间隔偏离它们的理想值多远。%
(一般地,这些盒子大多数是段落的文本行。)
%More precisely, the badness
%is a measure of how much the \refterm{glue} associated with these spaces needs
%to stretch or shrink to fill the line or page exactly.
%\TeX\ computes the badness as approximately $100$
%times the cube of the ratio by which it must stretch or shrink the glue
%in order to compose a line or a page of the required size.
%^^{line breaks//badness for}^^{page breaks//badness for}
%For example, stretching the glue by twice its stated stretch yields a ratio of
%$2$ and a badness of $800$; stretching it by half its stated stretch yields
%a ratio of $.5$ and a badness of $13$.
%\TeX\ treats a badness greater than $10000$ as
%equal to $10000$.
更准确地说,劣度测量这些间隔对应的\refterm{粘连}要伸缩多少才能正好填满文本行或页面。
\TeX\ 让劣度近似等于,为组成所需尺寸的行或页,粘连必须伸缩的比例的立方的 $100$ 倍。
^^{断行//断行的劣度}^^{分页//分页的劣度}
例如,粘连伸长了给定伸长量的两倍得到的比例为 $2$ 而劣度为 $800$;
粘连伸长了给定伸长量的一半得到的比例为 $.5$ 而劣度为 $13$。
\TeX\ 将超过 $10000$ 的劣度视为等于 $10000$。
%\TeX\ uses the badness of a line when it's breaking a paragraph into lines
%\seeconcept{line break}. It uses this information in two stages:
\TeX\ 分段为行时使用行劣度\seeconcept{断行点}。
它在下面两个步骤中使用行劣度:
%\olist
%\li When \TeX\ is choosing line breaks,
%it will eventually accept lines whose badness is less than or equal to
%the value of |\tolerance| (\xref \tolerance). If \TeX\ cannot avoid setting
%a line whose badness exceeds this
%value, it will set it as an underfull or overfull \refterm{hbox}.
%\TeX\ will set
%an overfull or underfull hbox only as a last resort, i.e., only if there's no
%other way to break the paragraph into lines.
%\li Assuming that all lines are tolerably bad, \TeX\ uses the badness of lines
%in order to evaluate the different ways of breaking the paragraph into lines.
%During this evaluation it associates ``demerits'' with each potential line.
%The badness increases the number of \refterm{demerits}.
%\TeX\ then
%breaks the paragraph into lines in a way that minimizes the
%total demerits for the paragraph.
%Most
%often \TeX\ arranges the paragraph in a way that minimizes the badness of the
%worst line. See \knuth{pages~97--98} for the details of how \TeX\
%breaks a paragraph into lines.
%\endolist
\olist
\li 在选择断行点时,\TeX\ 要求各行劣度小于或等于 |\tolerance| 值(\xref \tolerance )。
如果不得不放置一个劣度超过此值的行,\TeX\ 将把它设定为未满或过满\refterm{水平盒子}。
\TeX\ 仅在万不得已时才会放置未满或过满水平盒子,即仅在没有其他方法分段为行时。
\li 假设各行都相当糟糕,\TeX\ 用行劣度评价不同的分段为行方式。
在评价过程中它对每个可能的行结合一个``缺陷''。劣度会增加\refterm{缺陷}值。
然后 \TeX\ 选择让段落总缺陷最小的方式来分段为行。
在多数情况下,\TeX\ 使用让最糟糕行的劣度最小的方式安排段落。
请参阅\knuth{第~97--98~页}中 \TeX\ 如何分段为行的细节。
\endolist
%\TeX's procedure for assembling a sequence of lines and other vertical
%mode material into pages is similar to its procedure for line breaking.
%However, assembling pages is
%not as complicated because \TeX\ only considers one page at a time
%when it looks for page breaks.
%Thus the only decision it must make is where to end the current page.
%In contrast, when \TeX\ is choosing line breaks it
%considers several of them simultaneously.
%(Most word processors choose line breaks one at a time,
%and thus don't do as good a job at it as \TeX\ does.)
%See \knuth{pages~111--113} for the details of how \TeX\ chooses its
%page breaks.
%\endconcept
\TeX 将一系列文本行和其他竖直模式素材组装为页面的过程与断行的过程类似。
但是组装页面没那么复杂,这是由于 \TeX\ 寻找分页点时每次只考虑一个页面,
因此只需要决定在哪里结束当前页面。
与此相反,当选择断行点时 \TeX\ 要同时考虑多行。%
(大多数文字处理器每次只选择一个断行点,因而断行做得不如 \TeX\ 。)%
请参阅\knuth{第~111--113~页}中 \TeX\ 如何选择分页点的细节。
\endconcept
%\conceptindex{baselines}
%\concept baseline
\concept 基线
%The \defterm{baseline} of a \refterm{box} is an imaginary line that runs
%across the box.
%^^{boxes//baselines of}
%When \TeX\ is
%assembling the boxes of a \refterm{horizontal list} into a larger box,
%it lines up the boxes in the list so that their baselines coincide.
%As an analogy, think of writing on a pad of ruled paper. Each letter
%that you write has
%an implicit baseline.
%In order to line up the letters horizontally,
%you place them on the pad so that their baselines
%agree with the light guidelines that are printed on the pad.
盒子的\defterm{基线}(baseline)是一条想象中的横穿盒子的线。
^^{盒子//盒子的基线}
在将\refterm{水平列表}的盒子组装为更大的盒子时,
\TeX\ 将列表中各盒子对齐,以让它们的基线重合。
打个比方,想象你在标线本上写字,你所写的每个字母都有一条隐含基线。
为让各字母水平对齐,你会让它们的基线和本子上印刷的浅色提示线重合。
%A box can and often does extend below its baseline.
%For instance, the letter `g' extends below the baseline of its box because
%it has a descender (the bottom loop of the `g').
%\endconcept
盒子可以而且也经常会延伸到基线下边。
比如,字母 `g' 就延伸到其盒子的基线下边,因为它有一个降部(`g' 底部弯曲部分)。
\endconcept
%\conceptindex{boxes}
%\concept box
\concept 盒子
%A \defterm{box} is a rectangle of material to be typeset. A single
%\refterm{character} is a box by itself,
%and an entire page is also a box.
%\TeX\ forms a page as a nest of boxes within boxes within boxes. The
%outermost box is the page itself, the innermost boxes are mostly
%single characters, and single lines are boxes that are
%somewhere in the middle.
\defterm{盒子}(box)是要排版的矩阵素材。
单个\refterm{字符}自身就是一个盒子,整个页面同样也是一个盒子。
\TeX\ 用盒子套盒子套盒子以形成页面。最外层盒子就是页面自身,
最内层盒子多半是单个字符,而单个文本行的盒子在中间某个地方。
%\TeX\ carries out most of its box-building activities implicitly as it
%constructs paragraphs and pages.
%You can construct boxes explicitly
%using a number of \TeX\ \refterm{commands}, notably
%^|\hbox| \ctsref{\hbox},
%^|\vbox| \ctsref{\vbox}, and
%^|\vtop| \ctsref{\vtop}.
%The ^|\hbox| command
%constructs a box by appending smaller boxes horizontally from left to right;
%it operates on a \refterm{horizontal list} and yields
%an \refterm{hbox} ^^{hboxes} (horizontal box).
%^^{horizontal lists}
%The ^|\vbox| and |\vtop| commands
%construct a box by appending smaller boxes vertically from top to bottom;
%^^{vboxes}
%they operate on a \refterm{vertical list}
%and yield a \refterm{vbox} ^^{vboxes} (vertical box).
%^^{vertical lists}
%These horizontal and vertical lists can include not just smaller boxes but
%several other kinds of entities as well, e.g., \refterm{glue} and
%kerns.
%^^{kerns//as list items}
\TeX\ 在构造段落和页面时隐式执行大多数盒子构建活动。
利用一些 \TeX\ \refterm{命令},比如 ^|\hbox|\ctsref{\hbox}、
^|\vbox|\ctsref{\vbox}和 ^|\vtop|\ctsref{\vtop},你可以显式构造盒子。
^|\hbox| 命令通过从左到右水平添加较小的盒子构造一个盒子;
它对一个\refterm{水平列表}进行操作以生成一个\refterm{水平盒子}^^{水平盒子}(horizontal box)。
^^{水平列表}
^|\vbox| 和 |\vtop| 命令通过从上到下竖直添加较小的盒子构造一个盒子;
它们对一个\refterm{竖直列表}进行操作以生成一个\refterm{竖直盒子}^^{竖直盒子}(vertical box)。
^^{竖直列表}
这些水平列表和竖直列表不仅可以包含较小的盒子,
还可以包含其他几种实体,比如\refterm{粘连}和紧排。
^^{紧排//作为列表项目}
%A box has \refterm{height}, \refterm{depth}, and \refterm{width},
%^^{height} ^^{depth} ^^{width}
%like this:
%\vdisplay{\offinterlineskip\sevenrm
% \halign{#&#&\kern3pt \hfil#\hfil\cr
% &\hrulefill\cr
% &\vrule
% \vtop to .7in{\vss \hbox to .9in{\hss baseline\hss}\vskip4pt}%
% \vrule
% &\labelledheight{.7in}{height}\cr
% %
% \vbox to 0pt{
% \vss
% \hbox{reference point \hbox to 15pt{\rightarrowfill}%
% \hskip3pt}%
% \kern-4.5pt}&{\box\refpoint}\hrulefill\cr
% %
% \omit
% &\vrule\hfil\vrule
% &\labelledheight{.4in}{depth}\cr