-
Notifications
You must be signed in to change notification settings - Fork 16
/
chapter17.tex
executable file
·2403 lines (2294 loc) · 124 KB
/
chapter17.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 -*-
\input macros
%\beginchapter Chapter 17. More about Math
\beginchapter Chapter 17. 数学排版进阶
\origpageno=139
%Another thing mathematicians like to do is make fractions---and they
%like to build symbols up on top of each other in a variety of different ways:
%\begindisplay
%$\displaystyle
%{1\over2}\qquad{\rm and}\qquad{n+1\over3}\qquad{\rm and}\qquad
%{n+1\choose3}\qquad{\rm and}\qquad\sum_{n=1}^3 Z_n^2\,.$
%\enddisplay
%You can get these four formulas as displayed equations by typing
%`|$$1\over2$$|' and
%`|$$n+1\over3$$|' and
%`|$$n+1\choose3$$|' and
%`|$$\sum_{n=1}^3 Z_n^2$$|';
%we shall study the simple rules for such constructions in this chapter.
%^^|\sum|^^|\choose|
\1数学家爱做的另一件事就是构造分数——并且喜欢把用各种各样的方法%
把符号放在其它符号上面:
\begindisplay
$\displaystyle
{1\over2}\qquad{\hbox{\ST{10}和}}\qquad{n+1\over3}\qquad{\hbox{\ST{10}和}}\qquad
{n+1\choose3}\qquad{\hbox{\ST{10}和}}\qquad\sum_{n=1}^3 Z_n^2\,.$
\enddisplay
要把它们变成陈列方程,你可以输入 `|$$1\over2$$|' 和 `|$$n+1\over3$$|'
和 `|$$n+1\choose3$$|' 和 `|$$\sum_{n=1}^3 Z_n^2$$|';
本章我们将讨论这些构造的简单规则。
%First let's look at ^{fractions}, which use the `^|\over|' notation. The
%control sequence |\over| applies to everything in the formula unless you
%use braces to enclose it in a specific subformula; in the latter
%^^{stacked fractions, see over}
%case, |\over| applies to everything in that subformula.
%\begindisplaymathdemo
%\it Input&\it Output\cr
%\noalign{\vskip-3pt}
%|$$x+y^2\over k+1$$|&x+y^2\over k+1\cr
%\noalign{\vskip2pt}
%|$${x+y^2\over k}+1$$|&{x+y^2\over k}+1\cr
%\noalign{\vskip-1pt}
%|$$x+{y^2\over k}+1$$|&x+{y^2\over k}+1\cr
%\noalign{\vskip-1pt}
%|$$x+{y^2\over k+1}$$|&x+{y^2\over k+1}\cr
%\noalign{\vskip-3pt}
%|$$x+y^{2\over k+1}$$|&x+y^{2\over k+1}\cr
%\endmathdemo
%You aren't allowed to use |\over| twice in the same subformula; instead of
%typing something like
%`|a \over b \over 2|', you must specify what goes over what:
%\begindisplaymathdemo
%\noalign{\vskip3pt}
%|$${a\over b}\over 2$$|&{a\over b}\over 2\cr
%|$$a\over{b\over 2}$$|&a\over{b\over 2}\cr
%\endmathdemo
%Unfortunately, both of these alternatives look pretty awful. Mathematicians
%tend to ``overuse'' |\over| when they first begin to typeset their own work
%on a system like \TeX. A good typist or copy editor will convert fractions
%to a ``^{slashed form},'' whenever a built-up construction would be too
%small or too crowded. For example, the last two cases should be treated
%as follows:
%\begindisplaymathdemo
%\noalign{\vskip3pt}
%|$$a/b \over 2$$|&a/b \over 2\cr
%|$$a \over b/2$$|&a \over b/2\cr
%\endmathdemo
%Conversion to slashed form takes a little bit of mathematical knowhow, since
%^{parentheses} sometimes need to be inserted in order to preserve the meaning
%of the formula. Besides substituting `|/|' for~`|\over|', the two parts
%of the fraction should be put in parentheses unless they are single
%symbols; for example, $a\over b$~becomes simply~$a/b$, but
%$a+1\over b$ becomes $(a+1)/b$, and $a+1\over b+1$ becomes
%${(a+1)/(b+1)}$. Furthermore, the entire fraction should generally
%be enclosed in parentheses if it appears next to something else;
%for example, ${a\over b}x$ becomes $(a/b)x$. If you are a typist without
%mathematical training, it's best to ask the author of the manuscript
%for help, in doubtful cases; you might also tactfully suggest that
%unsightly fractions be avoided altogether in future manuscripts.
首先我们讨论分数,它用到命令`|\over|'。%
控制系列 |\over| 要作用到公式中的所有内容,除非你把它用大括号封装在一个规定%
的子公式中;
在后一种情况下,|\over| 只作用于那个子公式的所有内容。
\begindisplaymathdemo
{\KT{10}输入}&{\hbox{\KT{10}输出}}\cr
\noalign{\vskip-3pt}
|$$x+y^2\over k+1$$|&x+y^2\over k+1\cr
\noalign{\vskip2pt}
|$${x+y^2\over k}+1$$|&{x+y^2\over k}+1\cr
\noalign{\vskip-1pt}
|$$x+{y^2\over k}+1$$|&x+{y^2\over k}+1\cr
\noalign{\vskip-1pt}
|$$x+{y^2\over k+1}$$|&x+{y^2\over k+1}\cr
\noalign{\vskip-3pt}
|$$x+y^{2\over k+1}$$|&x+y^{2\over k+1}\cr
\endmathdemo
不允许在同一子公式中使用两次 |\over|;
不能输入象`|a \over b \over 2|'这样的内容,必须给出 over 作用的范围:
\begindisplaymathdemo
\noalign{\vskip3pt}
|$${a\over b}\over 2$$|&{a\over b}\over 2\cr
|$$a\over{b\over 2}$$|&a\over{b\over 2}\cr
\endmathdemo
不幸的是,这两种方法看起来都很别扭。%
在数学家开始用 \TeX\ 排版时,总爱``过度使用''~|over|。%
只要当所构建的东西太小或太拥挤时,好的排版者或编辑就把分数变成``除式''。%
例如,最后两种情况可以写作:
\begindisplaymathdemo
\noalign{\vskip3pt}
|$$a/b \over 2$$|&a/b \over 2\cr
|$$a \over b/2$$|&a \over b/2\cr
\endmathdemo
转换到除式需要一点数学常识,
因为为了不改变公式的意思,有时候要插入圆括号。%
\1除了用`|/|'代替`|\over|'外,分数的分子和分母应该放在括号中,除非它们是单个字符;
例如,~$a\over b$ 就直接变成 $a/b$,
但是 $a+1\over b$ 要变成 $(a+1)/b$, $a+1\over b+1$ 要变成 ${(a+1)/(b+1)}$。%
还有,如果分数的前面有东西,那么整个分数应放在括号中;
例如,${a\over b}x$ 变成 $(a/b)x$。%
作为没有数学常识的排版者,在不清楚时应该询问作者;
也可以巧妙地建议在以后的文稿中尽量不出现不好看的分数。
%\exercise What's a better way to render the formula $x+y^{2\over k+1}$?
%\answer $x+y^{2/(k+1)}$\quad(|$x+y^{2/(k+1)}$|).
\exercise 怎样更好地排版出公式$x+y^{2\over k+1}$?
\answer $x+y^{2/(k+1)}$(|$x+y^{2/(k+1)}$|)。
%\exercise Convert `${a+1\over b+1}x$' to slashed form.
%\answer $((a+1)/(b+1))x$\quad(|$((a+1)/(b+1))x$|).
\exercise 把`${a+1\over b+1}x$'转换为除式。
\answer $((a+1)/(b+1))x$(|$((a+1)/(b+1))x$|)。
%\exercise What surprise did B. L. ^{User} get when he typed `|$$x = (y^2\over
%k+1)$$|'\thinspace?
%\answer He got the displayed formula$$x=(y^2\over k+1)$$ because he forgot
%that an unconfined |\over| applies to everything. \ (He should probably
%have typed `|$$x=\left(y^2\over k+1\right)$$|', using ideas that will be
%presented later in this chapter; this not only makes the parentheses
%larger, it keeps the `$x=$' out of the fraction, because |\left| and
%|\right| introduce subformulas.)
\exercise 当^{用户笨笨}输入`|$$x = (y^2\over k+1)$$|'时,他将得到什么?
\answer 因为忘记了无约束的 |\over| 将应用到整个公式,
他将得到陈列公式 $$x=(y^2\over k+1)$$
(利用本章后面将介绍的思想,
他也许应该键入 `|$$x=\left(y^2\over k+1\right)$$|';这不仅让圆括号变大,
而且也让 `$x=$' 离开该分式,因为 |\left| 和 |\right| 引入一个子公式。)
%\def\cents{\hbox{\rm\rlap/c}}
%\exercise How can you make `$7{1\over2}\cents$'? \ (Assume that
%the control sequence |\cents| yields~`$\cents$'.)^^{money}^^{cents}
%\answer `|$7{1\over2}\cents$|' or `|7$1\over2$\cents|'. \ (Incidentally,
%the definition used here was |\def\cents{\hbox{\rm\rlap/c}}|.)
%^^|\rlap|^^|\cents|
\def\cents{\hbox{\rm\rlap/c}}
\exercise 怎样得到`$7{1\over2}\cents$'?%
(假定控制系列 |\cents| 得到的就是`$\cents$'。)
\answer `|$7{1\over2}\cents$|' 或 `|7$1\over2$\cents|'。%
(顺便说一下,这里用到的定义是 |\def\cents{\hbox{\rm\rlap/c}}|。)
^^|\rlap|^^|\cents|
%The examples above show that letters and other symbols sometimes get
%smaller when they appear in fractions, just as they get smaller when they
%are used as exponents. It's about time that we studied \TeX's method for
%choosing the sizes of things. \TeX\ actually has eight different
%^{styles} in which it can treat formulas, namely
%$$\halign{\indent#\hfil\quad&#\hfil\cr
%display style&(for formulas displayed on lines by themselves)\cr
%text style&(for formulas embedded in the text)\cr
%script style&(for formulas used as superscripts or subscripts)\cr
%scriptscript style&(for second-order superscripts or subscripts)\cr}$$
%^^{display style}^^{text style}^^{script style}^^{scriptscript style}
%and four other ``^{cramped}'' styles that are almost the same except that
%exponents aren't raised quite so much. For brevity we shall refer to the
%eight styles as
%\begindisplay
%$\displaystyle D,\ D',\ T,\ T',\ S,\ S',\ \SS,\ \SS',$
%\enddisplay
%where $D$ is display style, $D'$ is cramped display style, $T$~is text style,
%etc. \TeX\ also uses three different ^{sizes of type for mathematics};
%they are called ^{text size}, ^{script size}, and ^{scriptscript size}.
上面的例子表明,当字母和其它符号出现在分数中时,有时候会变得更小,
就象把它们放在指数上那么小。%
现在我们应该讨论一下 \TeX\ 怎样来选择符号的大小。%
当处理公式时, \TeX\ 实际上有八种不同的样式,即,
$$\halign{\indent#\hfil\quad&#\hfil\cr
陈列样式&(用在行中单独的陈列公式中)\cr
文本样式&(用在嵌入文本的公式中)\cr
标号样式&(用于公式的上下标)\cr
小标号样式&(用于公式的二阶上下标)\cr}$$
以及四种其它的``近似''样式,它们与上面四种几乎一样,只是指数升高得不那么多。%
为了简化,我们用
\begindisplay
$\displaystyle D,\ D',\ T,\ T',\ S,\ S',\ \SS,\ \SS',$
\enddisplay
来表示这八种样式,
其中 $D$ 是陈列样式,~$D'$ 是近似的陈列样式,
~$T$ 是文本样式等等。%
\TeX\ 还使用数学字体的三种不同大小,分别叫做文本尺寸,标号尺寸,小标号尺寸。
%The normal way to typeset a formula with \TeX\ is to enclose it in dollar
%signs |$|$\,\ldots\,$|$|; this yields the formula in text style
%(style~$T$). Or you can enclose it in double dollar signs |$$|$\,\ldots\,$|$$|;
%this displays the formula in display style (style~$D$). The subformulas of
%a formula might, of course, be in different styles. Once you know
%the style, you can determine the size of type that \TeX\ will use:
%$$\everycr{\noalign{\penalty10000}}
%\halign{\indent#\hfil\qquad&#\hfil&\quad#\llap(like this)\hfil\cr
%If a letter is in style&then it will be set in\cr
%\noalign{\vskip 2pt}
%$D,D',T,T'$&text size&\cr
%$S,S'$&script size&\sevenrm\cr
%$\SS,\SS'$&scriptscript size&\fiverm\cr}$$
%There is no ``$\it SSS$'' style or ``scriptscriptscript'' size; such tiny
%symbols would be even less readable than the scriptscript ones. Therefore
%\TeX\ stays with scriptscript size as the minimum:
%$$\halign{\indent\hbox to 1.3in{#\hfil}&\hbox to 1.2in{#\hfil}&#\hfil\cr
%In a formula&the superscript&and the subscript\cr
%of style&style is&style is\cr
%\noalign{\vskip 2pt}
%$D,T$&$S$&$S'$\cr
%$D',T'$&$S'$&$S'$\cr
%$S,\SS$&$\SS$&$\SS'$\cr
%$S',\SS'$&$\SS'$&$\SS'$\cr}$$
%For example, if |x^{a_b}| is to be typeset in style $D$, then |a_b| will
%be set in style~$S$, and {\tt b}~in style~$\SS'$; the result is
%`$\displaystyle x^{a_b}$'.
用 \TeX\ 排版公式的正常方法是把它封装在符号 |$|$\,\ldots\,$|$| 中;
这样得到的是文本样式(样式 $T$)。或者封装在符号 |$$|$\,\ldots\,$|$$| 中,
这样得到的是陈列样式(样式 $D$)。当然公式的子公式使用的可能是不同的样式。
一旦知道了样式,就可以确定 \TeX\ 要用的字体的大小:
$$\everycr{\noalign{\penalty10000}}
\halign{\indent#\hfil\qquad&#\hfil&\quad#\llap(like this)\hfil\cr
如果字母的样式是&那么设定的大小为\cr
\noalign{\vskip 2pt}
$D,D',T,T'$&文本尺寸&\cr
$S,S'$&标号尺寸&\sevenrm\cr
$\SS,\SS'$&小标号尺寸&\fiverm\cr}$$
\1没有 ``$\it SSS$'' 样式或者``小小标号''尺寸;
这样小的符号比小标号样式更难看清。因此 \TeX\ 把小标号尺寸作为最小的:
$$\halign{\indent\hbox to 1.3in{#\hfil}&\hbox to 1.2in{#\hfil}&#\hfil\cr
公式的样式&上标的样式&下标的样式\cr
\noalign{\vskip 2pt}
$D,T$&$S$&$S'$\cr
$D',T'$&$S'$&$S'$\cr
$S,\SS$&$\SS$&$\SS'$\cr
$S',\SS'$&$\SS'$&$\SS'$\cr}$$
例如,如果 |x^{a_b}| 用样式 $D$ 排版,那么 |a_b| 就用样式 $S$,
而 {\tt b} 就用样式 $\SS'$;结果为:
`$\displaystyle x^{a_b}$'。
%So far we haven't seen any difference between styles $D$ and $T$. Actually
%there is a slight difference in the positioning of exponents, although
%script size is used in each case: You get
%$\displaystyle x^2$~in $D$~style and $x^2$~in $T$~style and \vbox to 0pt{
%\vss\hbox{$\displaystyle{\atop x^2}$}\kern0pt}~in $D'$ or $T'$~style---do
%you see the difference? But there is a big distinction between $D$ style and
%$T$ style when it comes to fractions:
%$$\halign{\indent\hbox to 1.3in{#\hfil}&\hbox to 1.2in{#\hfil}&#\hfil\cr
%In a formula&the style of the&and the style of the\cr
%$\alpha$|\over|$\,\beta$ of style&numerator $\alpha$ is&denominator
%$\beta$ is\cr
%\noalign{\vskip 2pt}
%$D$&$T$&$T'$\cr
%$D'$&$T'$&$T'$\cr
%$T$&$S$&$S'$\cr
%$T'$&$S'$&$S'$\cr
%$S,\SS$&$\SS$&$\SS'$\cr
%$S',\SS'$&$\SS'$&$\SS'$\cr}$$
%^^{numerator}^^{denominator}
%Thus if you type `|$1\over2$|' (in a text) you get $1\over2$, namely style
%$S$ over style~$S'$; but if you type
%`|$$1\over2$$|' you get $$1\over2$$ (a displayed formula), which is style
%$T$ over style $T'$.
现在我们还没发现样式 $D$ 和样式 $T$ 之间的区别。
实际上,虽然两种情况下指数都用标号尺寸,但是其位置有点不同:
看看样式 $D$ 中的 $\displaystyle x^2$ 和 $T$ 中的 $x^2$ 以及
$D'$ 或 $T'$ 中的 \vbox to 0pt{
\vss\hbox{$\displaystyle{\atop x^2}$}\kern0pt} 就明白了。
但是当处理分数时,样式 $D$ 和样式 $T$ 之间有一个明显的差别:
$$\halign{\indent\hbox to 1.8in{#\hfil}&\hbox to 1.2in{#\hfil}&#\hfil\cr
公式 $\alpha$|\over|$\,\beta$ 的样式&分子的样式&分母的样式\cr
\noalign{\vskip 2pt}
$D$&$T$&$T'$\cr
$D'$&$T'$&$T'$\cr
$T$&$S$&$S'$\cr
$T'$&$S'$&$S'$\cr
$S,\SS$&$\SS$&$\SS'$\cr
$S',\SS'$&$\SS'$&$\SS'$\cr}$$
因此,如果在文本中输入 `|$1\over2$|' 那么得到的是 $1\over2$,
即样式 $S$ 在样式 $S'$ 之上;但是如果输入 `|$$1\over2$$|' 就得到陈列公式
$$1\over2$$
其中样式 $T$ 在样式 $T'$ 之上。
%\danger While we're at it, we might as well finish the style rules:
%^|\underline| does not change the style. ^{Math accents}, and the operations
%^|\sqrt| and ^|\overline|, change uncramped styles to their cramped
%counterparts; for example, $D$ changes to $D'$, but $D'$ stays as it was.
\danger 在这里我们最好还是给出全部的样式规则:
|\underline| 不改变样式。数学重音和 |\sqrt| 运算与 |\overline|
把非近似的样式变成相应的近似样式;例如,$D$ 变成 $D'$,但是 $D'$ 保持不变。
%\dangerexercise State the style and size of each part of the formula
%$\displaystyle \sqrt{p_2^{e'}}$, assuming that the formula itself is in
%style~$D$.
%\answer Style $D'$ is used for the subformula $p_2^{e'}$, hence style~$S'$
%is used for the superscript~$e'$ and the subscript~2, and style~$\SS'$
%is used for the supersuperscript prime. The square root sign and the $p$
%appear in text size; the 2 and the~$e$ appear in script size; and the
%$\prime$ is in scriptscript size.
\dangerexercise 假定公式 $\displaystyle \sqrt{p_2^{e'}}$ 的样式是 $D$,
给出其每一部分的样式和大小。
\answer 子公式 $p_2^{e'}$ 的样式为 $D'$,从而上标 $e'$ 和下标 2 的样式为 $S'$,
而上上标撇号的样式为 $\SS'$。平方根符号和 $p$ 以文本尺寸出现,
2 和 $e$ 以标号尺寸出现,而 $\prime$ 以小标号尺寸出现。
%Suppose you don't like the style that \TeX\ selects by its automatic style
%rules. Then you can specify the style you want by typing ^|\displaystyle|
%or ^|\textstyle| or ^|\scriptstyle| or ^|\scriptscriptstyle|; the style
%that you select will apply until the end of the formula or subformula, or
%until you select another style. For example,
%`|$$n+\scriptstyle n+\scriptscriptstyle n.$$|' produces the display
%$$n+\scriptstyle n+\scriptscriptstyle n.$$
%This is a rather silly example, but it does show
%that the plus signs get smaller too, as the style changes. \TeX\ puts no
%space around + signs in script styles.
如果不喜欢 \TeX\ 自动选择的样式,那么可规定你所要的样式,只要输入
|\displaystyle|、|\textstyle|、|\scriptstyle| 或者 |\scriptscriptstyle|;
所选定的样式将应用到公式或子公式结束,或者直到你给出另一种样式。
\1例如,`|$$n+\scriptstyle n+\scriptscriptstyle n.$$|' 得到陈列公式
$$n+\scriptstyle n+\scriptscriptstyle n.$$
这个例子比较蠢,但是可以看到,随着样式的改变,加号也变得更小了。
在标号样式中,\TeX\ 不在 + 号两边添加间距。
%Here's a more useful example of style changes: Sometimes you need to
%typeset a ``^{continued fraction}'' made up of many other fractions,
%all of which are supposed to be in display style:
%$$a_0+{1\over\displaystyle a_1+
% {\strut 1\over\displaystyle a_2+
% {\strut 1\over\displaystyle a_3+
% {\strut 1\over a_4}}}}$$
%In order to get this effect, the idea is to type
%\begintt
%$$a_0+{1\over\displaystyle a_1+
% {\strut 1\over\displaystyle a_2+
% {\strut 1\over\displaystyle a_3+
% {\strut 1\over a_4}}}}$$
%\endtt
%(The control sequence ^|\strut| has been used to make the denominators
%taller; this is a refinement that will be discussed in
%Chapter~18. Our concern now is with the style commands.) \
%Without the appearances of\/ |\strut| and |\displaystyle| in this formula,
%the result would be completely different:
%$$a_0+{1\over a_1+{1\over
% a_2+{1\over a_3+{1\over a_4}}}}$$
下面是利用样式变化的一个更好的例子:
有时候需要输入``连分数'', 由许多其它分数组成,
所有的都被假定用陈列样式:
$$a_0+{1\over\displaystyle a_1+
{\strut 1\over\displaystyle a_2+
{\strut 1\over\displaystyle a_3+
{\strut 1\over a_4}}}}$$
为了得到这种效果,要输入的是:
\begintt
$$a_0+{1\over\displaystyle a_1+
{\strut 1\over\displaystyle a_2+
{\strut 1\over\displaystyle a_3+
{\strut 1\over a_4}}}}$$
\endtt
控制系列 |\strut| 被用来使分母更高;这是第十八章要讨论的微调。%
我们现在关心的是样式命令。)
如果在此公式中不出现 |\strut| 和 |\displaystyle|, 那么结果将完全不同:
$$a_0+{1\over a_1+{1\over
a_2+{1\over a_3+{1\over a_4}}}}$$
%\danger These examples show that the numerator and denominator of a fraction
%are generally centered with respect to each other. If you prefer to have
%the numerator or denominator appear ^{flush left}, put `^|\hfill|' after
%it; or if you prefer ^{flush right}, put `|\hfill|' at the left. For
%example, if the first three appearances of `|1\over|' in the previous
%example are replaced by `|1\hfill\over|', you get the display
%$$a_0+{1\hfill\over\displaystyle a_1+
% {\strut1\hfill\over\displaystyle a_2+
% {\strut1\hfill\over\displaystyle a_3+
% {\strut1\over a_4}}}}$$
%(a format for continued fractions that many authors prefer). This works
%because |\hfill| stretches at a faster rate than the glue that is
%actually used internally by \TeX\ when it centers the numerators
%and denominators.
\danger 这些例子表明,分数中的分子和分母一般都相对居中。%
如果要分子或分母左对齐,就在其后加上`|\hfill|';
如果要右对齐,就在左边加上`|\hfill|'。%
例如,如果前一个例子中前三个`|1\over|'用`|1\hfill\over|'代替,
得到的陈列公式为:
$$a_0+{1\hfill\over\displaystyle a_1+
{\strut1\hfill\over\displaystyle a_2+
{\strut1\hfill\over\displaystyle a_3+
{\strut1\over a_4}}}}$$
(这种连分数的格式可能是许多作者想要的)。
之所以能这样的原因是,|\hfill| 的伸长能力比分子和分母居中时在内部实际%
所使用的粘连更大。
%\TeX\ has another operation `^|\atop|', which is like |\over| except that
%it leaves out the fraction line:
%\begindisplaymathdemo
%|$$x\atop y+2$$|&x\atop y+2\cr
%\endmathdemo
%The plain \TeX\ format in Appendix B also defines `^|\choose|', which is
%like |\atop| but it encloses the result in parentheses:
%\begindisplaymathdemo
%|$$n\choose k$$|&n\choose k\cr
%\endmathdemo
%It is called |\choose| because it's
%a common notation for the so-called ^{binomial coefficient}
%that tells how many ways there are to choose $k$~things out of $n$~things.
\1\TeX\ 有另外一个命令`|\atop|', 它象 |\over|, 但是没有分数中的横线:
\begindisplaymathdemo
|$$x\atop y+2$$|&x\atop y+2\cr
\endmathdemo
在附录 B 的 plain \TeX\ 格式中还定义了`|\choose|',
它象 |\atop|, 但是把结果封装在括号中了:
\begindisplaymathdemo
|$$n\choose k$$|&n\choose k\cr
\endmathdemo
之所以叫做 |\choose| 是因为它就是所谓二项式系数的通用符号,
给出了从 $n$ 个中间取 $k$ 个有多少种方法。
%You can't mix |\over| and |\atop| and |\choose| with each other.
%For example, `|$$n \choose k \over 2$$|' is illegal; you must use
%grouping, to get either `|$${n\choose k}\over2$$|' or
%`|$$n\choose{k\over2}$$|', i.e.,
%\begindisplay
%$\displaystyle{{n\choose k}\over2}\qquad{\rm or}\qquad {n\choose{k\over2}}.$
%\enddisplay
%The latter formula, incidentally, would look better as
%`|$$n\choose k/2$$|' or `|$$n\choose{1\over2}k$$|', yielding
%\begindisplay
%$\displaystyle{n\choose k/2}\qquad{\rm or}\qquad{n\choose{1\over2}k}.$
%\enddisplay
不要把 |\over| 和 |\atop| 和 |\choose| 混合使用。%
例如,`|$$n \choose k \over 2$$|'是不对的;
你必须使用编组,输入`|$${n\choose k}\over2$$|'或者`|$$n\choose{k\over2}$$|',
即,
\begindisplay
$\displaystyle{{n\choose k}\over2}\qquad{\hbox{\ST{10}或}}\qquad {n\choose{k\over2}}.$
\enddisplay
顺便说一下,要让后一个公式看来更美观,你可以写成 `|$$n\choose k/2$$|' 或
`|$$n\choose{1\over2}k$$|',此时结果是
\begindisplay
$\displaystyle{n\choose k/2}\qquad{\rm or}\qquad{n\choose{1\over2}k}.$
\enddisplay
%\medskip
%\exercise As alternatives to $\displaystyle{{n\choose k}\over2}$,
%discuss how you could obtain the two displays
%\begindisplay\abovedisplayskip=0pt\belowdisplayskip=0pt
%$\displaystyle
%{1\over2}{n\choose k}
%\qquad{\rm and}\qquad
%{\displaystyle{n\choose k}\over2}.$
%\enddisplay
%\answer |$${1\over2}{n\choose k}$$|;
%|$$\displaystyle{n\choose k}\over2$$|.
%All of these braces are necessary.
\medskip
\exercise 作为 $\displaystyle{{n\choose k}\over2}$ 的另外写法,
看看怎样才能得到两个陈列公式
\begindisplay\abovedisplayskip=0pt\belowdisplayskip=0pt
$\displaystyle
{1\over2}{n\choose k}
\qquad\hbox{和}\qquad
{\displaystyle{n\choose k}\over2}.$
\enddisplay
\answer |$${1\over2}{n\choose k}$$|;
|$$\displaystyle{n\choose k}\over2$$|。
所有这些花括号都是必需的。
%\bigbreak
%\exercise Explain how to specify the displayed formula
%$${p \choose 2}x^2 y^{p-2} - {1 \over 1-x}{1 \over 1-x^2}.$$
%\answer |$${p \choose 2} x^2 y^{p-2} - {1 \over 1-x}{1 \over 1-x^2}.$$|
\bigbreak
\exercise 看看怎样得到陈列公式
$${p \choose 2}x^2 y^{p-2} - {1 \over 1-x}{1 \over 1-x^2}.$$
\answer |$${p \choose 2} x^2 y^{p-2} - {1 \over 1-x}{1 \over 1-x^2}.$$|
%\danger \TeX\ has a generalized version of\/ |\over| and |\atop| in which you
%specify the exact thickness of the line rule by typing
%`^|\above|\<dimen>'. For example,
%\begintt
%$$\displaystyle{a\over b}\above1pt\displaystyle{c\over d}$$
%\endtt
%will produce a ^{compound fraction} with a heavier ($1\pt$ thick) rule as
%its main bar:
%$${\displaystyle{a\over b}\above 1pt\displaystyle{c\over d}}.$$
%This sort of thing occurs primarily in textbooks on elementary mathematics.
\danger \TeX\ 还有一个比的 |\over| 和 |\atop| 更灵活命令,
用它可以准确地给出横线的粗细,只要输入`|\above|\<dimen>'即可。%
例如,
\begintt
$$\displaystyle{a\over b}\above1pt\displaystyle{c\over d}$$
\endtt
将得到一个复合分数,其主横线更粗($1\pt$):
$${\displaystyle{a\over b}\above 1pt\displaystyle{c\over d}}.$$
这种东西主要出现在初等数学的教科书中。
%\goodbreak
%Mathematicians often use the sign $\sum$ to stand for ``^{summation}''
%and the sign $\int$ to stand for ``^{integration}.'' If you're a typist but not
%a mathematician, all you need to remember is that ^|\sum| stands for
%$\sum$ and ^|\int| for $\int$; these abbreviations appear in Appendix~F
%together with all the other symbols, in case you forget. Symbols like
%$\sum$ and $\int$ (and a few others like $\bigcup$ and $\prod$ and $\oint$
%and~$\bigotimes$, all listed in Appendix~F) are called {\sl ^{large operators}},
%^^{collective signs, see large operators} ^^{sigma signs, see sum}
%and you type them just as you type ordinary symbols or letters. The
%difference is that \TeX\ will choose a {\sl larger\/} large operator in
%display style than it will in text style. For example,
%$$\halign{\indent#\hfil\qquad yields\qquad&$#\hfil$\qquad&#\hfil\cr
%|$\sum x_n$|&\sum x_n&($T$ style)\cr
%\noalign{\vskip3pt}
%|$$\sum x_n$$|&\displaystyle\sum x_n&($D$ style).\cr}$$
\goodbreak
\1数学家通常用符号 $\sum$ 来表示``求和'',
用符号 $\int$ 表示``积分''。%
如果你只是一个排版者而不是数学家,就只需要记住 |\sum| 表示 $\sum$ 和%
~|\int| 表示 $\int$; 如果你忘记了,这些简写与其它所有符号都在附录 F 中。%
象 $\sum$ 和 $\int$ 这样的符号(以及列在附录 F 中的象 $\bigcup$, $\prod$,
$\oint$ 和 $\bigotimes$ 这样的其它符号)称为{\KT{10}巨算符},
在输入时象输入普通符号或字母一样。%
差别在于, \TeX\ 在陈列样式中选择的巨算符比文本样式中要{\KT{10}更大}。%
例如,
$$\halign{\indent#\hfil\qquad 得到的是\qquad&$#\hfil$\qquad&#\hfil\cr
|$\sum x_n$|&\sum x_n&(样式 $T$)\cr
\noalign{\vskip3pt}
|$$\sum x_n$$|&\displaystyle\sum x_n&(样式 $D$)。\cr}$$
%A displayed |\sum| usually occurs with ``^{limits},'' i.e., with
%subformulas that are to appear above and below it. You type limits just
%as if they were superscripts and subscripts; for example, if you want
%$$\sum_{n=1}^m$$
%you type either `|$$\sum_{n=1}^m$$|' or `|$$\sum^m_{n=1}$$|'. According
%to the normal conventions of mathematical typesetting, \TeX\ will change
%this to `$\sum_{n=1}^m$' (i.e., without limits) if it occurs in text
%style rather than in display style.
陈列公式的 |\sum| 通常伴有``上下限'', 即在它上面和下面有子公式。%
输入上下限就象输入上下标一样;
例如,如果要得到
$$\sum_{n=1}^m$$
可以输入`|$$\sum_{n=1}^m$$|'或`|$$\sum^m_{n=1}$$|'。%
按照数学排版的正常约定,
如果出现在文本样式而不是陈列样式中, \TeX\ 就把它变成`$\sum_{n=1}^m$'%
(即没有上下限了)。
%Integrations are slightly different from summations, in that the superscripts
%and subscripts are not set as limits even in display style:
%$$\halign{\indent\hbox to2.3in{#\hfil}\hbox to.6in{yields\hfil}&
% $#\hfil$\qquad&#\hfil\cr
%|$\int_{-\infty}^{+\infty}$|&\int_{-\infty}^{+\infty}&($T$ style)\cr
%\noalign{\vskip3pt}
%|$$\int_{-\infty}^{+\infty}$$|&\displaystyle\int_{-\infty}^{+\infty}&
% ($D$ style).\cr}$$
积分与求和略有不同,即使在陈列样式中,上下标也不变成上下限:
$$\halign{\indent\hbox to2.3in{#\hfil}\hbox to.6in{得到的是\hfil}&
$#\hfil$\qquad&#\hfil\cr
|$\int_{-\infty}^{+\infty}$|&\int_{-\infty}^{+\infty}&(样式 $T$)\cr
\noalign{\vskip3pt}
|$$\int_{-\infty}^{+\infty}$$|&\displaystyle\int_{-\infty}^{+\infty}&
(样式 $D$)。\cr}$$
%\danger Some printers prefer to set limits above and below $\int$ signs;
%this takes more space on the page, but it
%gives a better appearance if the subformulas are complex, because it
%keeps them out of the way of the rest of the formula. Similarly, limits
%are occasionally desirable in text style or script style; but some
%printers prefer not to set limits on displayed $\sum$ signs. You can change
%\TeX's convention by simply typing `^|\limits|' or `^|\nolimits|' immediately
%after the large operator.
%For example,
%$$\halign{\indent\hbox to2.3in{#\hfil}\hbox to.6in{yields\hfil}&
% $\displaystyle{#}$\hfil\cr
%|$$\int\limits_0^{\pi\over2}$$|&\int\limits_0^{\pi\over2}\cr
%\noalign{\vskip 4pt}
%|$$\sum\nolimits_{n=1}^m$$|&\sum\nolimits_{n=1}^m\cr}$$
\danger 有些排版者希望在 $\int$ 上有上下限;
这要占用更多的页面,但是如果子公式很复杂时,这样做效果很好,
因为它把上下限从公式的其它内容区分开了。%
类似地,有时候希望在文本样式或标号样式中使用上下限;
但是某些用户不要在陈列公式的 $\sum$ 上出现上下限。%
直接在巨算符后面输入`|\limits|'或`|\nolimits|', 就可以改变 \TeX\ 的约定。
例如:
$$\halign{\indent\hbox to2.3in{#\hfil}\hbox to.6in{得到的是\hfil}&
$\displaystyle{#}$\hfil\cr
|$$\int\limits_0^{\pi\over2}$$|&\int\limits_0^{\pi\over2}\cr
\noalign{\vskip 4pt}
|$$\sum\nolimits_{n=1}^m$$|&\sum\nolimits_{n=1}^m\cr}$$
%\ddanger If you say `|\nolimits\limits|' (presumably because some macro
%like |\int| specifies |\nolimits|, but you do want them), the last word
%takes precedence. There's also a command `^|\displaylimits|' that can be
%used to restore \TeX's normal conventions; i.e., the limits will be
%displayed only in styles $D$ and $D'$.
\ddanger 如果输入的是`|\nolimits\limits|'(大概是象 |\int| 这样的某些宏已经%
给出了 |\nolimits|, 但是你又想要上下限),
那么最后一个优先。%
还有一个命令`|\displaylimits|', 用它来恢复 \TeX\ 的正常约定;
即上下限只在样式 $D$ 和 $D'$ 中出现。
%\danger Sometimes you need to put two or more rows of limits under a large
%operator; you can do this with `^|\atop|'. For example, if you want
%the displayed formula
%$$\sum_{\scriptstyle0\le i\le m\atop\scriptstyle0<j<n}P(i,j)$$
%the correct way to type it is
%\begintt
%$$\sum_{\scriptstyle0\le i\le m\atop\scriptstyle0<j<n}P(i,j)$$
%\endtt
%(perhaps with a few more spaces to make it look nicer in the manuscript
%file). The instruction `^|\scriptstyle|' was necessary here,
%twice---otherwise the lines `$0\le i\le m$' and `$0<j<n$' would have been in
%scriptscript size, which is too small. This is another instance of a rare
%case where \TeX's automatic style rules need to be overruled.
\danger \1有时候可能要在巨算符下面放两行或多行极限;
可以用`|\atop|'来实现。%
例如,如果要得到陈列公式
$$\sum_{\scriptstyle0\le i\le m\atop\scriptstyle0<j<n}P(i,j)$$
应该输入
\begintt
$$\sum_{\scriptstyle0\le i\le m\atop\scriptstyle0<j<n}P(i,j)$$
\endtt
(在文稿中可以用几个间距把它调整得更好看)。
命令`|\scriptstyle|'必须在这里出现两次——否则`$0\le i\le m$'和%
`$0<j<n$'就使用小标号尺寸,那太小了。%
这是另一个 \TeX\ 的自动规则应该改变的少见的例子。
%\exercise How would you type the displayed formula $\displaystyle
%\sum_{i=1}^p\sum_{j=1}^q\sum_{k=1}^ra_{ij}b_{jk}c_{ki}$\enspace?
%\answer |$$\sum_{i=1}^p\sum_{j=1}^q\sum_{k=1}^ra_{ij}b_{jk}c_{ki}$$|.
\exercise 怎样输入陈列公式
~$\displaystyle
\sum_{i=1}^p\sum_{j=1}^q\sum_{k=1}^ra_{ij}b_{jk}c_{ki}$\enspace ?
\answer |$$\sum_{i=1}^p\sum_{j=1}^q\sum_{k=1}^ra_{ij}b_{jk}c_{ki}$$|。
%\dangerexercise And how would you handle $\displaystyle
%\sum_{{\scriptstyle1\le i\le p\atop\scriptstyle1\le j\le q}
% \atop\scriptstyle1\le k\le r}a_{ij}b_{jk}c_{ki}$\enspace?
%\answer |$$\sum_{{\scriptstyle 1\le i\le p \atop \scriptstyle 1\le j\le q}
% \atop \scriptstyle 1\le k\le r} a_{ij} b_{jk} c_{ki}$$|.
\dangerexercise 怎样得到 $\displaystyle
\sum_{{\scriptstyle1\le i\le p\atop\scriptstyle1\le j\le q}
\atop\scriptstyle1\le k\le r}a_{ij}b_{jk}c_{ki}$\enspace ?
\answer |$$\sum_{{\scriptstyle 1\le i\le p \atop \scriptstyle 1\le j\le q}
\atop \scriptstyle 1\le k\le r} a_{ij} b_{jk} c_{ki}$$|。
%Since mathematical formulas can get horribly large, \TeX\ has to have some
%way to make ever-larger symbols. For example, if you type
%\begintt
%$$\sqrt{1+\sqrt{1+\sqrt{1+
% \sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}}$$
%\endtt
%the result shows a variety of available ^{square-root signs}:
%\begindisplay
%$\displaystyle\sqrt{1+\sqrt{1+\sqrt{1+
% \sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}}$
%\enddisplay
%The three largest signs here are all essentially the same, except for a
%vertical segment `\vbox{\hbox{\tenex\char'165}\vss}' that gets repeated as
%often as necessary to reach the desired size; but the smaller signs are
%distinct characters found in \TeX's math fonts.
因为数学公式可以大得惊人,所以 \TeX\ 必须可以生成不断增大的符号。%
例如,如果输入
\begintt
$$\sqrt{1+\sqrt{1+\sqrt{1+
\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}}$$
\endtt
就在结果中出现了各种用到的根号:
\begindisplay
$\displaystyle\sqrt{1+\sqrt{1+\sqrt{1+
\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}}$
\enddisplay
在这里,最大的三个符号基本上是一样的,除了垂直线段%
`\vbox{\hbox{\tenex\char'165}\vss}'必要地重复到所要求的尺寸外;
但是更小的符号是 \TeX\ 的数学字体中的不同字符。
%A similar thing happens with parentheses and other so-called
%``^{delimiter}'' symbols. For example, here are some of the different sizes of
%^^{fences, see delimiters}
%^{parentheses} and ^{braces} that plain \TeX\ might use in formulas:
%\begindisplay
%$\displaystyle
%\left(\vbox to 27pt{}\left(\vbox to 24pt{}\left(\vbox to 21pt{}
%\Biggl(\biggl(\Bigl(\bigl(({\scriptstyle({\scriptscriptstyle(\hskip3pt
%)})})\bigr)\Bigr)\biggr)\Biggr)\right)\right)\right)
%\left\{\vbox to 27pt{}\left\{\vbox to 24pt{}\left\{\vbox to 21pt{}
%\Biggl\{\biggl\{\Bigl\{\bigl\{\{{\scriptstyle\{{\scriptscriptstyle\{\hskip3pt
%\}}\}}\}\bigr\}\Bigr\}\biggr\}\Biggr\}\right\}\right\}\right\}$
%\enddisplay
%The three largest pairs in each case are made with repeatable extensions,
%so they can become as large as necessary.
%^^{pieces of symbols}
类似情况还出现在括号和其它所谓是``分界符''上。%
例如,下面是 plain \TeX\ 在公式中使用的各种尺寸的圆括号和大括号:
\begindisplay
$\displaystyle
\left(\vbox to 27pt{}\left(\vbox to 24pt{}\left(\vbox to 21pt{}
\Biggl(\biggl(\Bigl(\bigl(({\scriptstyle({\scriptscriptstyle(\hskip3pt
)})})\bigr)\Bigr)\biggr)\Biggr)\right)\right)\right)
\left\{\vbox to 27pt{}\left\{\vbox to 24pt{}\left\{\vbox to 21pt{}
\Biggl\{\biggl\{\Bigl\{\bigl\{\{{\scriptstyle\{{\scriptscriptstyle\{\hskip3pt
\}}\}}\}\bigr\}\Bigr\}\biggr\}\Biggr\}\right\}\right\}\right\}$
\enddisplay
在每种情况下,最大的三对都是通过重复扩展而得到的,
所以它们可以变得如所需要的那样大。
%Delimiters are important to mathematicians, because they provide good
%visual clues to the underlying structure of complex expressions; they delimit
%the boundaries of individual subformulas. Here is a list of the 22~basic
%delimiters provided by plain \TeX:
%\begindisplay
%\it Input&\it Delimiter\cr
%\noalign{\vskip2pt}
%|(|&left parenthesis: $($\cr
%|)|&right parenthesis: $)$\cr
%|[| or ^|\lbrack|&left bracket: $[$\cr
%|]| or ^|\rbrack|&right bracket: $]$\cr
%|\{| or ^|\lbrace|&left curly brace: $\{$\cr
%|\}| or ^|\rbrace|&right curly brace: $\}$\cr
%^|\lfloor|&left floor bracket: $\lfloor$\cr
%^|\rfloor|&right floor bracket: $\rfloor$\cr
%^|\lceil|&left ceiling bracket: $\lceil$\cr
%^|\rceil|&right ceiling bracket: $\rceil$\cr
%^|\langle|&left angle bracket: $\langle$\cr
%^|\rangle|&right angle bracket: $\rangle$\cr
%|/|&slash: $/$\cr
%^|\backslash|&reverse slash: $\backslash$\cr
%\| or ^|\vert|&vertical bar: $\vert$\cr
%|\|\| or ^|\Vert|&double vertical bar: $\Vert$\cr
%^|\uparrow|&upward arrow: $\uparrow$\cr
%^|\Uparrow|&double upward arrow: $\Uparrow$\cr
%^|\downarrow|&downward arrow: $\downarrow$\cr
%^|\Downarrow|&double downward arrow: $\Downarrow$\cr
%^|\updownarrow|&up-and-down arrow: $\updownarrow$\cr
%^|\Updownarrow|&double up-and-down arrow: $\Updownarrow$\cr
%\enddisplay
%^^{bent bars, see langle, rangle} ^^{curly braces, see lbrace, rbrace}
%^^{leftbracket}^^{rightbracket}^^{leftbrace}^^{rightbrace}^^{/}
%In some cases, there are two ways to get the same delimiter; for example,
%you can specify a left bracket by typing either `|[|' or `|\lbrack|'. The
%latter alternative has been provided because the symbol `|[|' is not
%readily available on all computer keyboards. Remember, however,
%that you should never try to specify a left brace or right brace simply by
%typing `|{|' or `|}|'; the |{| and |}| symbols are reserved for grouping.
%The right way is to type `|\{|' or `|\}|' or `|\lbrace|' or `|\rbrace|'.
\1对数学家而言,分界符很重要,因为它们从外观上把复杂的公式的内在结构给理顺了;
它们把各个不同的子公式分开。%
下面给出 plain \TeX\ 的 22 个基本分界符:
\begindisplay
{\KT{10}输入}&{\hbox{\KT{10}分界符}}\cr
\noalign{\vskip2pt}
|(|&left parenthesis: $($\cr
|)|&right parenthesis: $)$\cr
|[| or |\lbrack|&left bracket: $[$\cr
|]| or |\rbrack|&right bracket: $]$\cr
|\{| or |\lbrace|&left curly brace: $\{$\cr
|\}| or |\rbrace|&right curly brace: $\}$\cr
|\lfloor|&left floor bracket: $\lfloor$\cr
|\rfloor|&right floor bracket: $\rfloor$\cr
|\lceil|&left ceiling bracket: $\lceil$\cr
|\rceil|&right ceiling bracket: $\rceil$\cr
|\langle|&left angle bracket: $\langle$\cr
|\rangle|&right angle bracket: $\rangle$\cr
|/|&slash: $/$\cr
|\backslash|&reverse slash: $\backslash$\cr
\| or |\vert|&vertical bar: $\vert$\cr
|\|\| or |\Vert|&double vertical bar: $\Vert$\cr
|\uparrow|&upward arrow: $\uparrow$\cr
|\Uparrow|&double upward arrow: $\Uparrow$\cr
|\downarrow|&downward arrow: $\downarrow$\cr
|\Downarrow|&double downward arrow: $\Downarrow$\cr
|\updownarrow|&up-and-down arrow: $\updownarrow$\cr
|\Updownarrow|&double up-and-down arrow: $\Updownarrow$\cr
\enddisplay
在某些情况下,可以通过两种方法得到同一个分界符;
例如,可以通过`|[|'或`|\lbrack|'得到左方括号。%
给出后一种方法是因为不是在所有的键盘上,符号`|[|'都那样好用。%
但是要记住,不要直接输入`|{|'或`|}|'来得到左或右大括号;
符号 |{| 和 |}| 已经保留给编组使用了。%
正确的方法是输入`|\{|'或`|\}|'或`|\lbrace|'或`|\rbrace|'。
%In order to get a slightly larger version of any of these symbols, just
%precede them by `^|\bigl|' (for opening delimiters) or `^|\bigr|' (for
%closing ones). This makes it easier to read formulas that contain
%delimiters inside delimiters:
%\beginlongmathdemo
%\it Input&\it Output\cr
%\noalign{\vskip2pt}
%|$\bigl(x-s(x)\bigr)\bigl(y-s(y)\bigr)$|&
% \bigl(x-s(x)\bigr)\bigl(y-s(y)\bigr)\cr
%|$\bigl[x-s[x]\bigr]\bigl[y-s[y]\bigr]$|&
% \bigl[x-s[x]\bigr]\bigl[y-s[y]\bigr]\cr
%|$\bigl|\|| |\||x|\||-|\||y|\|| \bigr|\||$|&
% \bigl\vert\vert x\vert-\vert y\vert\bigr\vert\cr
%|$\bigl\lfloor\sqrt A\bigr\rfloor$|&
% \bigl\lfloor\sqrt A\bigr\rfloor\cr
%\endmathdemo
%The |\big| delimiters are just enough bigger than ordinary ones so that
%the difference can be perceived, yet small enough to be used in the text
%of a paragraph. Here are all~22 of them, in the ordinary size and in
%the |\big| size:
%\begindisplay
%$(\,)\,[\,]\,\{\,\}\,\lfloor\,\rfloor\,\lceil\,\rceil\,\langle\,\rangle
% \,/\,\backslash\,\vert\,\Vert\,\uparrow\,\Uparrow\,\downarrow\,\Downarrow
% \,\updownarrow\,\Updownarrow$\cr
%\noalign{\smallskip}
%$\bigl(\,\bigr)\,\bigl[\,\bigr]\,\bigl\{\,\bigr\}\,\bigl\lfloor
% \,\bigr\rfloor\,\bigl\lceil\,\bigr\rceil\,\bigl\langle\,\bigr\rangle
% \,\big/\,\big\backslash\,\big\vert\,\big\Vert\,\bigm\uparrow\,\bigm\Uparrow
% \,\bigm\downarrow\,\bigm\Downarrow\,\bigm\updownarrow\,\bigm\Updownarrow$\cr
%\enddisplay
%You can also type ^|\Bigl| and ^|\Bigr| to get larger symbols suitable for
%displays:
%\begindisplay
%$\Bigl(\,\Bigr)\,\Bigl[\,\Bigr]\,\Bigl\{\,\Bigr\}\,\Bigl\lfloor
% \,\Bigr\rfloor\,\Bigl\lceil\,\Bigr\rceil\,\Bigl\langle\,\Bigr\rangle
% \,\Big/\,\Big\backslash\,\Big\vert\,\Big\Vert\,\Bigm\uparrow\,\Bigm\Uparrow
% \,\Bigm\downarrow\,\Bigm\Downarrow\,\Bigm\updownarrow\,\Bigm\Updownarrow$
%\enddisplay
%These are 50\% taller than their |\big| counterparts. Displayed formulas
%most often use delimiters that are even taller (twice the size of\/ |\big|);
%such delimiters are constructed by ^|\biggl| and ^|\biggr|, and they
%look like this:
%\begindisplay
%$\biggl(\,\biggr)\,\biggl[\,\biggr]\,\biggl\{\,\biggr\}\,\biggl\lfloor
% \,\biggr\rfloor\,\biggl\lceil\,\biggr\rceil\,\biggl\langle\,\biggr\rangle
% \,\bigg/\,\bigg\backslash\,\bigg\vert\,\bigg\Vert\,\biggm\uparrow
% \,\biggm\Uparrow\,\biggm\downarrow\,\biggm\Downarrow\,\biggm\updownarrow
% \,\biggm\Updownarrow$
%\enddisplay
%Finally, there are ^|\Biggl| and ^|\Biggr| versions, 2.5 times as tall
%as the |\bigl| and |\bigr| delimiters:
%\begindisplay
%$\Biggl(\,\Biggr)\,\Biggl[\,\Biggr]\,\Biggl\{\,\Biggr\}\,\Biggl\lfloor
% \,\Biggr\rfloor\,\Biggl\lceil\,\Biggr\rceil\,\Biggl\langle\,\Biggr\rangle
% \,\Bigg/\,\Bigg\backslash\,\Bigg\vert\,\Bigg\Vert\,\Biggm\uparrow
% \,\Biggm\Uparrow\,\Biggm\downarrow\,\Biggm\Downarrow\,\Biggm\updownarrow
% \,\Biggm\Updownarrow$
%\enddisplay
要得到略大的任何这些符号,只需要在它们前面加上`|\bigl|'(对开分界符)或%
`|\bigr|'(对闭分界符)。%
这使得包含多层分界符的公式容易阅读:
\beginlongmathdemo
{\KT{10}输入}&{\hbox{\KT{10}输出}}\cr
\noalign{\vskip2pt}
|$\bigl(x-s(x)\bigr)\bigl(y-s(y)\bigr)$|&
\bigl(x-s(x)\bigr)\bigl(y-s(y)\bigr)\cr
|$\bigl[x-s[x]\bigr]\bigl[y-s[y]\bigr]$|&
\bigl[x-s[x]\bigr]\bigl[y-s[y]\bigr]\cr
|$\bigl|\|| |\||x|\||+|\||y|\|| \bigr|\||$|&
\bigl\vert\vert x\vert+\vert y\vert\bigr\vert\cr
|$\bigl\lfloor\sqrt A\bigr\rfloor$|&
\bigl\lfloor\sqrt A\bigr\rfloor\cr
\endmathdemo
\1|\big| 分界符只比普通的要大得足以感觉到不同,
但是还是足够小得可在段落的文本中使用。%
这里是它们 22 个的全部,为普通尺寸和 |\big| 尺寸:
\begindisplay
$(\,)\,[\,]\,\{\,\}\,\lfloor\,\rfloor\,\lceil\,\rceil\,\langle\,\rangle
\,/\,\backslash\,\vert\,\Vert\,\uparrow\,\Uparrow\,\downarrow\,\Downarrow
\,\updownarrow\,\Updownarrow$\cr
\noalign{\smallskip}
$\bigl(\,\bigr)\,\bigl[\,\bigr]\,\bigl\{\,\bigr\}\,\bigl\lfloor
\,\bigr\rfloor\,\bigl\lceil\,\bigr\rceil\,\bigl\langle\,\bigr\rangle
\,\big/\,\big\backslash\,\big\vert\,\big\Vert\,\bigm\uparrow\,\bigm\Uparrow
\,\bigm\downarrow\,\bigm\Downarrow\,\bigm\updownarrow\,\bigm\Updownarrow$\cr
\enddisplay
还可以通过 |\Bigl| 和 |\Bigr| 来得到陈列公式中的适当大小的符号:
\begindisplay
$\Bigl(\,\Bigr)\,\Bigl[\,\Bigr]\,\Bigl\{\,\Bigr\}\,\Bigl\lfloor
\,\Bigr\rfloor\,\Bigl\lceil\,\Bigr\rceil\,\Bigl\langle\,\Bigr\rangle
\,\Big/\,\Big\backslash\,\Big\vert\,\Big\Vert\,\Bigm\uparrow\,\Bigm\Uparrow
\,\Bigm\downarrow\,\Bigm\Downarrow\,\Bigm\updownarrow\,\Bigm\Updownarrow$
\enddisplay
它们比 |\big| 符号大50\%。%
陈列公式中最经常使用的分界符甚至更高(|\big| 尺寸的两倍);
这样的分界符由 |\biggl| 和 |\biggr| 构造,它们看起来象:
\begindisplay
$\biggl(\,\biggr)\,\biggl[\,\biggr]\,\biggl\{\,\biggr\}\,\biggl\lfloor
\,\biggr\rfloor\,\biggl\lceil\,\biggr\rceil\,\biggl\langle\,\biggr\rangle
\,\bigg/\,\bigg\backslash\,\bigg\vert\,\bigg\Vert\,\biggm\uparrow
\,\biggm\Uparrow\,\biggm\downarrow\,\biggm\Downarrow\,\biggm\updownarrow
\,\biggm\Updownarrow$
\enddisplay
最后,~|\Biggl| 和 |\Biggr| 的分界符是 |\bigl| 和 |\bigr| 的 2.5 倍:
\begindisplay
$\Biggl(\,\Biggr)\,\Biggl[\,\Biggr]\,\Biggl\{\,\Biggr\}\,\Biggl\lfloor
\,\Biggr\rfloor\,\Biggl\lceil\,\Biggr\rceil\,\Biggl\langle\,\Biggr\rangle
\,\Bigg/\,\Bigg\backslash\,\Bigg\vert\,\Bigg\Vert\,\Biggm\uparrow
\,\Biggm\Uparrow\,\Biggm\downarrow\,\Biggm\Downarrow\,\Biggm\updownarrow
\,\Biggm\Updownarrow$
\enddisplay
%\medskip
%\exercise Guess how to type the formula $\displaystyle
%\biggl({\partial^2\over\partial x^2}+{\partial^2\over\partial y^2}
% \biggr)\bigl\vert\varphi(x+iy)\bigr\vert^2=0$, in display style,
%using |\bigg| delimiters for the large parentheses. \ (The symbols $\partial$
%and $\varphi$ that appear here are called ^|\partial| and ^|\varphi|.)
%\answer |$\displaystyle\biggl({\partial^2\over\partial x^2}+|\hfil\break
%|{\partial^2\over\partial y^2}\biggr)\bigl|\||\varphi(x+iy)\bigr|\||^2=0$|.
\medskip
\exercise 看看怎样用陈列样式输入公式 $\displaystyle
\biggl({\partial^2\over\partial x^2}+{\partial^2\over\partial y^2}
\biggr)\bigl\vert\varphi(x+iy)\bigr\vert^2=0$,
使用 |\bigg| 分界符来得到大的括号。%
(符号 $\partial$ 和 $\varphi$ 分别叫做 |\partial| 和 |\varphi|。)
\answer |$\displaystyle\biggl({\partial^2\over\partial x^2}+|\hfil\break
|{\partial^2\over\partial y^2}\biggr)\bigl|\||\varphi(x+iy)\bigr|\||^2=0$|。
%\dangerexercise In practice, |\big| and |\bigg| delimiters are used much
%more often than |\Big| and |\Bigg| ones. Why do you think this is true?
%\answer Formulas that are more than one line tall are usually two lines tall,
%not 1$1\over2$ or 2$1\over2$ lines tall.
\dangerexercise 在实际使用中,|\big| 和 |\bigg| 分界符比 |\Big| 和 |\Bigg|
分界符更常用。想想为什么?
\answer 多于一行的公式通常为两行高,而非 1$1\over2$ 或 2$1\over2$ 行高。
%\danger A |\bigl| or |\Bigl| or |\biggl| or |\Biggl| delimiter is an
%^{opening}, like a left parenthesis;
%a |\bigr| or |\Bigr| or |\biggr| or |\Biggr| delimiter is a
%^{closing}, like a right parenthesis. Plain \TeX\ also provides
%^|\bigm| and ^|\Bigm| and ^|\biggm| and ^|\Biggm| delimiters, for use
%in the middle of formulas; such a delimiter plays the r\^ole of a ^{relation},
%like an equals sign, so \TeX\ puts a bit of space on either side of it.
%\beginlongmathdemo
%|$\bigl(x\in A(n)\bigm|\||x\in B(n)\bigr)$|&
% \tenmath\bigl(x\in A(n)\bigm\vert x\in B(n)\bigr)\cr
%\noalign{\vskip2pt}
%|$\bigcup_n X_n\bigm\|\||\bigcap_n Y_n$|&
% \tenmath\bigcup_n X_n\bigm\Vert\bigcap_n Y_n\cr
%\endmathdemo
%^^|\bigcup|^^|\bigcap|^^|\verticalline|^^|\in|
%You can also say just ^|\big| or ^|\Big| or ^|\bigg| or ^|\Bigg|; this produces
%a delimiter that acts as an ordinary variable. It is used primarily with
%slashes and backslashes, as in the following example.
%\beginlongmathdemo
%\noalign{\vskip-2pt}
%|$${a+1\over b}\bigg/{c+1\over d}$$|&
% \tenmath\displaystyle{a+1\over b}\bigg/{c+1\over d}\cr
%\endmathdemo
\danger |\bigl|, |\Bigl|, |\biggl| 或 |\Biggl| 分界符是开符号,象左圆括号一样;
|\bigr|, |\Bigr|, |\biggr| 或 |\Biggr| 分界符是闭符号,象右圆括号一样。%
Plain \TeX\ 还给出了|\bigm|, |\Bigm|, |\biggm| 和 |\Biggm| 分界符,
它们用在公式中央;这样的分界符起着表示关系的作用,就象等号一样,
所以 \TeX\ 在它两边都添加一点间距。
\beginlongmathdemo
|$\bigl(x\in A(n)\bigm|\||x\in B(n)\bigr)$|&
\tenmath\bigl(x\in A(n)\bigm\vert x\in B(n)\bigr)\cr
\noalign{\vskip2pt}
|$\bigcup_n X_n\bigm\|\||\bigcap_n Y_n$|&
\tenmath\bigcup_n X_n\bigm\Vert\bigcap_n Y_n\cr
\endmathdemo
也可以只用 |\big|, |\Big|, |\bigg| 或 |\Bigg|;
它得到的分界符就一个普通变量一样。%
它主要用于斜线和反斜线,就象下面的例子一样。
\beginlongmathdemo
\noalign{\vskip-2pt}
|$${a+1\over b}\bigg/{c+1\over d}$$|&
\tenmath\displaystyle{a+1\over b}\bigg/{c+1\over d}\cr
\endmathdemo
%\dangerexercise What's the professional way to type
%$\tenmath\bigl(x+f(x)\bigr)\big/\bigl(x-f(x)\bigr)$? \ (Look closely.)
%\answer |$\bigl(x+f(x)\bigr) \big/ \bigl(x-f(x)\bigr)$|. \ Notice especially
%the `|\big/|'; an ordinary ^{slash} would look too small between the
%|\big| parentheses.
\dangerexercise 用专业的方法输入
$\tenmath\bigl(x+f(x)\bigr)\big/\bigl(x-f(x)\bigr)$?(看仔细点。)
\answer |$\bigl(x+f(x)\bigr) \big/ \bigl(x-f(x)\bigr)$|。
特别注意 `|\big/|';普通的^{斜线}放在 |\big| 括号之间看起来太小。
%\TeX\ has a built-in mechanism that figures out how tall a pair of delimiters
%needs to be, in order to enclose a given subformula; so you can use this
%method, instead of deciding whether a delimiter should be |\big| or
%|\bigg| or whatever. All you do is say
%\begindisplay
%^|\left|\<delim$_1$>\<subformula>^|\right|\<delim$_2$>
%\enddisplay
%and \TeX\ will typeset the subformula, putting the specified delimiters at
%the left and the right. The size of the delimiters will be just big enough
%to cover the subformula. For example, in the display
%\beginlongdisplaymathdemo
%|$$1+\left(1\over1-x^2\right)^3$$|&1+\left(1\over1-x^2\right)^3\cr
%\endmathdemo
%\TeX\ has chosen |\biggl(| and |\biggr)|, because smaller delimiters
%would be too small for this particular fraction. A simple formula like
%`|$\left(x\right)$|' yields just `$\left(x\right)$'; thus, |\left| and
%|\right| sometimes choose delimiters that are smaller than |\bigl| and |\bigr|.
\1\TeX\ 有一个内置的机制,能确定要封装住给定公式所需要的这对分界符的高度;