-
Notifications
You must be signed in to change notification settings - Fork 18
/
chapter23.tex
1517 lines (1381 loc) · 58.8 KB
/
chapter23.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 -*-
\documentclass{book}
\input{preamble}
\setcounter{chapter}{22}
\begin{document}
%\chapter{Mathematics Typesetting}\label{math}
\chapter{Mathematics Typesetting}\label{math}
%\TeX\ has two math modes, display and non-display, and
%four styles, display, text, script, and scriptscript style, and
%\altt
%every object in math mode belongs to one of eight classes.
%This chapter treats these concepts.
\TeX\ has two math modes, display and non-display, and
four styles, display, text, script, and scriptscript style, and
\altt
every object in math mode belongs to one of eight classes.
This chapter treats these concepts.
%\label{cschap:everymath}\label{cschap:displaystyle}\label{cschap:textstyle}\label{cschap:scriptstyle}\label{cschap:scriptscriptstyle}\label{cschap:mathchoice}\label{cschap:mathord}\label{cschap:mathop}\label{cschap:mathbin}\label{cschap:mathrel}\label{cschap:mathopen}\label{cschap:mathclose}\label{cschap:mathpunct}\label{cschap:mathinner}\label{cschap:mathaccent2}\label{cschap:vcenter}\label{cschap:limits}\label{cschap:nolimits}\label{cschap:displaylimits}\label{cschap:scriptspace}\label{cschap:nonscript}\label{cschap:mkern}\label{cschap:mskip}\label{cschap:muskip}\label{cschap:muskipdef}\label{cschap:newmuskip}\label{cschap:thinmuskip}\label{cschap:medmuskip}\label{cschap:thickmuskip}\label{cschap:mathsurround}\label{cschap:over}\label{cschap:atop}\label{cschap:above}\label{cschap:overwithdelims}\label{cschap:atopwithdelims}\label{cschap:abovewithdelims}\label{cschap:underline}\label{cschap:overline}\label{cschap:relpenalty}\label{cschap:binoppenalty}
%\begin{inventory}
%\item [\cs{everymath}]
% Token list inserted at the start of a non-display formula.
\label{cschap:everymath}\label{cschap:displaystyle}\label{cschap:textstyle}\label{cschap:scriptstyle}\label{cschap:scriptscriptstyle}\label{cschap:mathchoice}\label{cschap:mathord}\label{cschap:mathop}\label{cschap:mathbin}\label{cschap:mathrel}\label{cschap:mathopen}\label{cschap:mathclose}\label{cschap:mathpunct}\label{cschap:mathinner}\label{cschap:mathaccent2}\label{cschap:vcenter}\label{cschap:limits}\label{cschap:nolimits}\label{cschap:displaylimits}\label{cschap:scriptspace}\label{cschap:nonscript}\label{cschap:mkern}\label{cschap:mskip}\label{cschap:muskip}\label{cschap:muskipdef}\label{cschap:newmuskip}\label{cschap:thinmuskip}\label{cschap:medmuskip}\label{cschap:thickmuskip}\label{cschap:mathsurround}\label{cschap:over}\label{cschap:atop}\label{cschap:above}\label{cschap:overwithdelims}\label{cschap:atopwithdelims}\label{cschap:abovewithdelims}\label{cschap:underline}\label{cschap:overline}\label{cschap:relpenalty}\label{cschap:binoppenalty}
\begin{inventory}
\item [\cs{everymath}]
Token list inserted at the start of a non-display formula.
%\item [\cs{everydisplay}]
% Token list inserted at the start of a display formula.
\item [\cs{everydisplay}]
Token list inserted at the start of a display formula.
%\item [\cs{displaystyle}]
% Select the display style of mathematics typesetting.
\item [\cs{displaystyle}]
Select the display style of mathematics typesetting.
%\item [\cs{textstyle}]
% Select the text style of mathematics typesetting.
\item [\cs{textstyle}]
Select the text style of mathematics typesetting.
%\item [\cs{scriptstyle}]
% Select the script style of mathematics typesetting.
\item [\cs{scriptstyle}]
Select the script style of mathematics typesetting.
%\item [\cs{scriptscriptstyle}]
% Select the scriptscript style of mathematics typesetting.
\item [\cs{scriptscriptstyle}]
Select the scriptscript style of mathematics typesetting.
%\item [\cs{mathchoice}]
% Give four variants of a formula for the four styles
% of mathematics typesetting.
\item [\cs{mathchoice}]
Give four variants of a formula for the four styles
of mathematics typesetting.
%\item [\cs{mathord}]
% Let the following character or subformula function
% as an ordinary object.
\item [\cs{mathord}]
Let the following character or subformula function
as an ordinary object.
%\item [\cs{mathop}]
% Let the following character or subformula function
% as a large operator.
\item [\cs{mathop}]
Let the following character or subformula function
as a large operator.
%\item [\cs{mathbin}]
% Let the following character or subformula function
% as a binary operation.
\item [\cs{mathbin}]
Let the following character or subformula function
as a binary operation.
%\item [\cs{mathrel}]
% Let the following character or subformula function as a relation.
\item [\cs{mathrel}]
Let the following character or subformula function as a relation.
%\item [\cs{mathopen}]
% Let the following character or subformula function
% as a opening symbol.
\item [\cs{mathopen}]
Let the following character or subformula function
as a opening symbol.
%\item [\cs{mathclose}]
% Let the following character or subformula function
% as a closing symbol.
\item [\cs{mathclose}]
Let the following character or subformula function
as a closing symbol.
%\item [\cs{mathpunct}]
% Let the following character or subformula function
% as a punctuation symbol.
\item [\cs{mathpunct}]
Let the following character or subformula function
as a punctuation symbol.
%\item [\cs{mathinner}]
% Let the following character or subformula function
% as an inner formula.
\item [\cs{mathinner}]
Let the following character or subformula function
as an inner formula.
%\item [\cs{mathaccent}]
% Place an accent in math mode.
\item [\cs{mathaccent}]
Place an accent in math mode.
%\item [\cs{vcenter}]
% Construct a vertical box, vertically centred
% on the math axis.
\item [\cs{vcenter}]
Construct a vertical box, vertically centred
on the math axis.
%\item [\cs{limits}]
% Place limits over and under a large operator.
\item [\cs{limits}]
Place limits over and under a large operator.
%\item [\cs{nolimits}]
% Place limits of a large operator as subscript and
% superscript expressions.
\item [\cs{nolimits}]
Place limits of a large operator as subscript and
superscript expressions.
%\item [\cs{displaylimits}]
% Restore default placement for limits.
\item [\cs{displaylimits}]
Restore default placement for limits.
%\item [\cs{scriptspace}]
% Extra space after subscripts and superscripts.
% Plain \TeX\ default:~\n{0.5pt}
\item [\cs{scriptspace}]
Extra space after subscripts and superscripts.
Plain \TeX\ default:~\n{0.5pt}
%\item [\cs{nonscript}]
% Cancel the next glue item if it occurs in
% scriptstyle or scriptscriptstyle.
\item [\cs{nonscript}]
Cancel the next glue item if it occurs in
scriptstyle or scriptscriptstyle.
%\item [\cs{mkern}]
% Insert a kern measured in mu units.
\item [\cs{mkern}]
Insert a kern measured in mu units.
%\item [\cs{mskip}]
% Insert glue measured in mu units.
\item [\cs{mskip}]
Insert glue measured in mu units.
%\item [\cs{muskip}]
% Prefix for skips measured in mu units.
\item [\cs{muskip}]
Prefix for skips measured in mu units.
%\item [\cs{muskipdef}]
% Define a control sequence to be a synonym for
% a~\cs{muskip} register.
\item [\cs{muskipdef}]
Define a control sequence to be a synonym for
a~\cs{muskip} register.
%\item [\cs{newmuskip}]
% Allocate a new muskip register.
\item [\cs{newmuskip}]
Allocate a new muskip register.
%\item [\cs{thinmuskip}]
% Small amount of mu glue.
\item [\cs{thinmuskip}]
Small amount of mu glue.
%\item [\cs{medmuskip}]
% Medium amount of mu glue.
\item [\cs{medmuskip}]
Medium amount of mu glue.
%\item [\cs{thickmuskip}]
% Large amount of mu glue.
\item [\cs{thickmuskip}]
Large amount of mu glue.
%\item [\cs{mathsurround}]
% Kern amount placed before and after in-line formulas.
\item [\cs{mathsurround}]
Kern amount placed before and after in-line formulas.
%\item [\cs{over}]
% Fraction.
\item [\cs{over}]
Fraction.
%\item [\cs{atop}]
% Place objects over one another.
\item [\cs{atop}]
Place objects over one another.
%\item [\cs{above}]
% Fraction with specified bar width.
\item [\cs{above}]
Fraction with specified bar width.
%\item [\cs{overwithdelims}]
% Fraction with delimiters.
\item [\cs{overwithdelims}]
Fraction with delimiters.
%\item [\cs{atopwithdelims}]
% Place objects over one another with delimiters.
\item [\cs{atopwithdelims}]
Place objects over one another with delimiters.
%\item [\cs{abovewithdelims}]
% Generalized fraction with delimiters.
\item [\cs{abovewithdelims}]
Generalized fraction with delimiters.
%\item [\cs{underline}]
% Underline the following \gr{math symbol} or group.
\item [\cs{underline}]
Underline the following \gr{math symbol} or group.
%\item [\cs{overline}]
% Overline the following \gr{math symbol} or group.
\item [\cs{overline}]
Overline the following \gr{math symbol} or group.
%\item [\cs{relpenalty}]
% Penalty for breaking after a binary relation
% not enclosed in a subformula.
% Plain \TeX\ default:~\n{500}
\item [\cs{relpenalty}]
Penalty for breaking after a binary relation
not enclosed in a subformula.
Plain \TeX\ default:~\n{500}
%\item [\cs{binoppenalty}]
% Penalty for breaking after a binary operator not enclosed in
% a subformula.
% Plain \TeX\ default:~\n{700}
\item [\cs{binoppenalty}]
Penalty for breaking after a binary operator not enclosed in
a subformula.
Plain \TeX\ default:~\n{700}
%\item [\cs{allowbreak}]
% Macro for creating a breakpoint.
\item [\cs{allowbreak}]
Macro for creating a breakpoint.
%\end{inventory}
\end{inventory}
%%\point[math:modes] Math modes
%\section{Math modes}
%\label{math:modes}
%\point[math:modes] Math modes
\section{Math modes}
\label{math:modes}
%\TeX\ changes to \indexterm{math mode} when it encounters a
%\indexterm{math shift character}, category~3\index{category!3},
%in the input. After such
%an opening math shift it investigates (without expansion) the next
%token to see whether this is another math shift. In the latter case
%\TeX\ starts processing in \indextermbus{display}{math mode} until a
%closing double math shift is encountered:
%\begin{disp}\verb> .. $$ >{\italic displayed formula}\verb> $$ ..>\end{disp}
%Otherwise it starts processing an in-line formula in
%\indextermbus{non-display}{math mode}:
%\begin{disp}\verb> .. $ >{\italic in-line formula}\verb> $ ..>\end{disp}
%The single math shift character is a \gr{horizontal command}.
\TeX\ changes to \indexterm{math mode} when it encounters a
\indexterm{math shift character}, category~3\index{category!3},
in the input. After such
an opening math shift it investigates (without expansion) the next
token to see whether this is another math shift. In the latter case
\TeX\ starts processing in \indextermbus{display}{math mode} until a
closing double math shift is encountered:
\begin{disp}\verb> .. $$ >{\italic displayed formula}\verb> $$ ..>\end{disp}
Otherwise it starts processing an in-line formula in
\indextermbus{non-display}{math mode}:
\begin{disp}\verb> .. $ >{\italic in-line formula}\verb> $ ..>\end{disp}
The single math shift character is a \gr{horizontal command}.
%Exception: displays are not possible in restricted horizontal
%mode, so inside an \cs{hbox} the sequence
%\verb>$$> is an empty math formula and
%not the start of a displayed formula.
Exception: displays are not possible in restricted horizontal
mode, so inside an \cs{hbox} the sequence
\verb>$$> is an empty math formula and
not the start of a displayed formula.
%Associated with the two math modes are two \gr{token parameter}
%registers (see also Chapter~\ref{token}):
%at the start of an in-line formula the \csidx{everymath} tokens
%are inserted; at the start of a displayed formula the
%\cs{everydisplay} tokens are inserted.
%Display math is treated further in the next chapter.
Associated with the two math modes are two \gr{token parameter}
registers (see also Chapter~\ref{token}):
at the start of an in-line formula the \csidx{everymath} tokens
are inserted; at the start of a displayed formula the
\cs{everydisplay} tokens are inserted.
Display math is treated further in the next chapter.
%Math modes can be tested for: \cs{ifmmode} is true
%in display and non-display math mode, and \cs{ifinner}
%is true in non-display mode, but not in display mode.
Math modes can be tested for: \cs{ifmmode} is true
in display and non-display math mode, and \cs{ifinner}
is true in non-display mode, but not in display mode.
%%\point[math:styles] Styles in math mode
%\section{Styles in math mode}
%\label{math:styles}
%\point[math:styles] Styles in math mode
\section{Styles in math mode}
\label{math:styles}
%Math formulas are set in any of eight
%\indexterm{math styles}:
%\begin{description}
%\item [D] display style,
%\item [T] text style,
%\item [S] script style,
%\item [SS] scriptscript style,
%\end{description}
%and the four \emph{cramped}\indexterm{cramped styles}
%variants $D'$, $T'$, $S'$, $SS'$ of
%these. The cramped styles differ mainly in the
%fact that superscripts are not raised as far as in
%the original styles.
Math formulas are set in any of eight
\indexterm{math styles}:
\begin{description}
\item [D] display style,
\item [T] text style,
\item [S] script style,
\item [SS] scriptscript style,
\end{description}
and the four \emph{cramped}\indexterm{cramped styles}
variants $D'$, $T'$, $S'$, $SS'$ of
these. The cramped styles differ mainly in the
fact that superscripts are not raised as far as in
the original styles.
%%\spoint Superscripts and subscripts
%\subsection{Superscripts and subscripts}
%\index{superscript|(}\index{subscript|(}
%\spoint Superscripts and subscripts
\subsection{Superscripts and subscripts}
\index{superscript|(}\index{subscript|(}
%\TeX\ can typeset a symbol or group
%as a superscript (or subscript) to the preceding
%symbol or group, if that preceding item
%does not already have a superscript
%(subscript). Superscripts (subscripts) are specified by
%the syntax
%\begin{disp}\gr{superscript}\gr{math field}\end{disp}
%or
%\begin{disp}\gr{subscript}\gr{math field}\end{disp}
%where a \gr{superscript} (\gr{subscript}) is either a character
%of category~7\index{category!7} (8\index{category!8}),
%or a control sequence \cs{let} to such
%a character.
%The plain format has the control
%\cstoidx\char94\par\cstoidx\char95\par
%sequences
%\begin{verbatim}
%\let\sp=^ \let\sb=_
%\end{verbatim}
%as implicit superscript
%and subscript characters.
\TeX\ can typeset a symbol or group
as a superscript (or subscript) to the preceding
symbol or group, if that preceding item
does not already have a superscript
(subscript). Superscripts (subscripts) are specified by
the syntax
\begin{disp}\gr{superscript}\gr{math field}\end{disp}
or
\begin{disp}\gr{subscript}\gr{math field}\end{disp}
where a \gr{superscript} (\gr{subscript}) is either a character
of category~7\index{category!7} (8\index{category!8}),
or a control sequence \cs{let} to such
a character.
The plain format has the control
\cstoidx\char94\par\cstoidx\char95\par
sequences
\begin{verbatim}
\let\sp=^ \let\sb=_
\end{verbatim}
as implicit superscript
and subscript characters.
%Specifying a superscript (subscript) expression as the first
%item in an empty math list is equivalent to specifying
%it as the superscript (subscript) of an empty expression.
%For instance,
%\begin{disp}
%\verb>$^{...}>\quad is equivalent to\quad \verb>${}^{...}>\end{disp}
Specifying a superscript (subscript) expression as the first
item in an empty math list is equivalent to specifying
it as the superscript (subscript) of an empty expression.
For instance,
\begin{disp}
\verb>$^{...}>\quad is equivalent to\quad \verb>${}^{...}>\end{disp}
%For \TeX's internal calculations, superscript and subscript
%expressions are made wider by \csidx{scriptspace};
%the value of this in plain \TeX\ is~\n{0.5pt}.
For \TeX's internal calculations, superscript and subscript
expressions are made wider by \csidx{scriptspace};
the value of this in plain \TeX\ is~\n{0.5pt}.
%\index{superscript|)}\index{subscript|)}
\index{superscript|)}\index{subscript|)}
%\subsection{Choice of styles}
\subsection{Choice of styles}
%Ordering the four styles $D$, $T$, $S$, and~$SS$, and
%considering the other four as mere variants, the
%style rules for math mode are as follows:
%\begin{itemize}\item In any style superscripts and subscripts
%are taken from the next smaller style. Exception:
%in display style they are taken in script style.
%\item Subscripts are always in the cramped variant of
%the style; superscripts are only cramped if the original
%style was cramped.
%\item In an \verb-{..\over..}- formula in any style
%the numerator and denominator are taken from the next
%smaller style.
%\item The denominator is always in cramped style;
%the numerator is only in cramped style if the original
%style was cramped.
%\item Formulas under a \cs{sqrt} or \cs{overline}
%are in cramped style.\end{itemize}
Ordering the four styles $D$, $T$, $S$, and~$SS$, and
considering the other four as mere variants, the
style rules for math mode are as follows:
\begin{itemize}\item In any style superscripts and subscripts
are taken from the next smaller style. Exception:
in display style they are taken in script style.
\item Subscripts are always in the cramped variant of
the style; superscripts are only cramped if the original
style was cramped.
\item In an \verb-{..\over..}- formula in any style
the numerator and denominator are taken from the next
smaller style.
\item The denominator is always in cramped style;
the numerator is only in cramped style if the original
style was cramped.
\item Formulas under a \cs{sqrt} or \cs{overline}
are in cramped style.\end{itemize}
%Styles can be forced by the explicit commands
%\alt
%\cstoidx displaystyle\par\cstoidx textstyle\par
%\cstoidx scriptstyle\par\cstoidx scriptscriptstyle\par
%\cs{displaystyle}, \cs{textstyle}, \cs{scriptstyle},
%and \cs{scriptscriptstyle}.
Styles can be forced by the explicit commands
\alt
\cstoidx displaystyle\par\cstoidx textstyle\par
\cstoidx scriptstyle\par\cstoidx scriptscriptstyle\par
\cs{displaystyle}, \cs{textstyle}, \cs{scriptstyle},
and \cs{scriptscriptstyle}.
%In display style and text style the \cs{textfont} of the
%current family is used,
%in scriptstyle the \cs{scriptfont} is used, and in
%\alt
%scriptscriptstyle the \cs{scriptscriptfont} is used.
In display style and text style the \cs{textfont} of the
current family is used,
in scriptstyle the \cs{scriptfont} is used, and in
\alt
scriptscriptstyle the \cs{scriptscriptfont} is used.
%The primitive command
%\cstoidx mathchoice\par
%\begin{disp}\cs{mathchoice}\lb {\it D\/\rb\lb T\/\rb\lb S\/\rb\lb SS\/}\rb
%\end{disp}
%lets the user specify four variants of a formula for the
%four styles.
%\TeX\ constructs all four and inserts the appropriate one.
The primitive command
\cstoidx mathchoice\par
\begin{disp}\cs{mathchoice}\lb {\it D\/\rb\lb T\/\rb\lb S\/\rb\lb SS\/}\rb
\end{disp}
lets the user specify four variants of a formula for the
four styles.
\TeX\ constructs all four and inserts the appropriate one.
%%\point[math:class] Classes of mathematical objects
%\section{Classes of mathematical objects}
%\label{math:class}
%\point[math:class] Classes of mathematical objects
\section{Classes of mathematical objects}
\label{math:class}
%Objects in math mode belong to one of eight \indexterm{math
% classes}. Depending on the class the object may be surrounded by
%some amount of white space, or treated specially in some way. Commands
%exist to force symbols, or sequences of symbols, to act as belonging
%to a certain class. In the hexadecimal representation \verb>"xyzz>
%the class is the \gr{3-bit number}~\n x.
Objects in math mode belong to one of eight \indexterm{math
classes}. Depending on the class the object may be surrounded by
some amount of white space, or treated specially in some way. Commands
exist to force symbols, or sequences of symbols, to act as belonging
to a certain class. In the hexadecimal representation \verb>"xyzz>
the class is the \gr{3-bit number}~\n x.
%This is the list of classes and commands that force those
%classes. The examples are from the plain format
%(see the tables starting at page~\pageref{math:sym:tables}).
%\begin{enumerate} \message{set a counter here!}%\SetCounter:item=-1
%\item {\em ordinary\/}: lowercase Greek characters and those symbols
% that are `just symbols';
% the command \csidx{mathord} forces this class.
%\item {\em large operator\/}: integral and sum signs,
% and `big' objects such as \cs{bigcap} or\handbreak \cs{bigotimes};
% the command \csidx{mathop} forces this class.
% Characters that are
% large operators are centred vertically, and they
% may behave differently in display style from in the
% other styles; see below.
%\item {\em binary operation\/}: plus and minus,
% and things such as \cs{cap} or \cs{otimes};
% the command \csidx{mathbin} forces this class.
%\item {\em relation\/} (also called {\em binary relation\/}):
% equals, less than, and greater than signs, subset and
% superset, perpendicular, parallel;
% the command \csidx{mathrel} forces this class.
%\item {\em opening symbol\/}: opening brace, bracket, parenthesis, angle,
% \altt
% floor, ceiling;
% the command \csidx{mathopen} forces this class.
%\item {\em closing symbol\/}: closing brace, bracket, parenthesis, angle,
% \altt
% floor, ceiling;
% the command \csidx{mathclose} forces this class.
%\item {\em punctuation\/}: most punctuation marks, but
% \n:~is a relation, the \cs{colon} is a punctuation colon;
% the command \csidx{mathpunct} forces this class.
%\item {\em variable family\/}: symbols in this class change font
% with the \cs{fam} parameter; in plain \TeX\ uppercase
% Greek letters and ordinary letters and digits are
% in this class.
%\end{enumerate}
This is the list of classes and commands that force those
classes. The examples are from the plain format
(see the tables starting at page~\pageref{math:sym:tables}).
\begin{enumerate} \message{set a counter here!}%\SetCounter:item=-1
\item {\em ordinary\/}: lowercase Greek characters and those symbols
that are `just symbols';
the command \csidx{mathord} forces this class.
\item {\em large operator\/}: integral and sum signs,
and `big' objects such as \cs{bigcap} or\handbreak \cs{bigotimes};
the command \csidx{mathop} forces this class.
Characters that are
large operators are centred vertically, and they
may behave differently in display style from in the
other styles; see below.
\item {\em binary operation\/}: plus and minus,
and things such as \cs{cap} or \cs{otimes};
the command \csidx{mathbin} forces this class.
\item {\em relation\/} (also called {\em binary relation\/}):
equals, less than, and greater than signs, subset and
superset, perpendicular, parallel;
the command \csidx{mathrel} forces this class.
\item {\em opening symbol\/}: opening brace, bracket, parenthesis, angle,
\altt
floor, ceiling;
the command \csidx{mathopen} forces this class.
\item {\em closing symbol\/}: closing brace, bracket, parenthesis, angle,
\altt
floor, ceiling;
the command \csidx{mathclose} forces this class.
\item {\em punctuation\/}: most punctuation marks, but
\n:~is a relation, the \cs{colon} is a punctuation colon;
the command \csidx{mathpunct} forces this class.
\item {\em variable family\/}: symbols in this class change font
with the \cs{fam} parameter; in plain \TeX\ uppercase
Greek letters and ordinary letters and digits are
in this class.
\end{enumerate}
%There is one further class: the {\em inner\/} subformulas.
%No characters can be assigned to this class, but characters and
%subformulas can be forced into it by \csidx{mathinner}.
%The \gr{generalized fraction}s and \verb-\left...\right- groups
%are inner formulas. Inner formulas are surrounded
%by some white space; see the table below.
There is one further class: the {\em inner\/} subformulas.
No characters can be assigned to this class, but characters and
subformulas can be forced into it by \csidx{mathinner}.
The \gr{generalized fraction}s and \verb-\left...\right- groups
are inner formulas. Inner formulas are surrounded
by some white space; see the table below.
%Other subformulas than those that are inner are treated as
%ordinary symbols. In particular, subformulas enclosed in
%braces are ordinary: \verb-$a+b$- looks like `$a\mathop+b$', but
%\message{Check a+b look}%
%\verb-$a{+}b$- looks like~`$a{+}b$'. Note, however, that
%in \verb-${a+b}$- the whole subformula is treated as an
%ordinary symbol, not its components;
%therefore the result is~`${a+b}$'.
Other subformulas than those that are inner are treated as
ordinary symbols. In particular, subformulas enclosed in
braces are ordinary: \verb-$a+b$- looks like `$a\mathop+b$', but
\message{Check a+b look}%
\verb-$a{+}b$- looks like~`$a{+}b$'. Note, however, that
in \verb-${a+b}$- the whole subformula is treated as an
ordinary symbol, not its components;
therefore the result is~`${a+b}$'.
%%\point Large operators and their limits
%\section{Large operators and their limits}
%\point Large operators and their limits
\section{Large operators and their limits}
%The large operators in the Computer Modern fonts come in
%two sizes: one for text style and one for display style.
%Control sequences such as \cs{sum} are simply defined by
%\cs{mathchardef} to correspond to a position in a font:
%\begin{verbatim}
%\mathchardef\sum="1350
%\end{verbatim}
%but if the
%current style is display style, \TeX\ looks to see whether
%that character has a successor in the font.
The large operators in the Computer Modern fonts come in
two sizes: one for text style and one for display style.
Control sequences such as \cs{sum} are simply defined by
\cs{mathchardef} to correspond to a position in a font:
\begin{verbatim}
\mathchardef\sum="1350
\end{verbatim}
but if the
current style is display style, \TeX\ looks to see whether
that character has a successor in the font.
%Large operators in text style behave as if they are followed
%\cstoidx limits\par\cstoidx nolimits\par
%by \cs{nolimits}, which places the limits as sub/superscript
%expressions after the
%operator:
%\begin{disp}$\sum_{k=1}^\infty$\end{disp}
%In display style they behave as if they are followed by
%\cs{limits}, which places the limits over and under
%the operator:
%\begin{disp}$\displaystyle\sum_{k=1}^\infty$\end{disp}
%The successor mechanism (see page~\pageref{successor})
%\alt
%lets \TeX\ take a larger variant
%of the delimiter here.
Large operators in text style behave as if they are followed
\cstoidx limits\par\cstoidx nolimits\par
by \cs{nolimits}, which places the limits as sub/superscript
expressions after the
operator:
\begin{disp}$\sum_{k=1}^\infty$\end{disp}
In display style they behave as if they are followed by
\cs{limits}, which places the limits over and under
the operator:
\begin{disp}$\displaystyle\sum_{k=1}^\infty$\end{disp}
The successor mechanism (see page~\pageref{successor})
\alt
lets \TeX\ take a larger variant
of the delimiter here.
%The integral sign has been defined in plain \TeX\ as
%\begin{verbatim}
%\mathchardef\intop="1352 \def\int{\intop\nolimits}
%\end{verbatim}
%which places the limits after the operator, even in display style:
%\begin{disp}$\displaystyle\int_0^\infty e^{-x^2}\,dx=\sqrt{\pi}/2$
%\end{disp}
The integral sign has been defined in plain \TeX\ as
\begin{verbatim}
\mathchardef\intop="1352 \def\int{\intop\nolimits}
\end{verbatim}
which places the limits after the operator, even in display style:
\begin{disp}$\displaystyle\int_0^\infty e^{-x^2}\,dx=\sqrt{\pi}/2$
\end{disp}
%With \verb-\limits\nolimits- or \verb-\nolimits\limits- the
%last specification has precedence; the default placement
%can be restored by \csidx{displaylimits}. For instance,
%\begin{verbatim}
%$ ... \sum\limits\displaylimits ... $
%\end{verbatim}
%is equivalent to
%\begin{verbatim}
%$ ... \sum ... $
%\end{verbatim}
%and
%\begin{verbatim}
%$$ ... \sum\nolimits\displaylimits ... $$
%\end{verbatim}
%is equivalent to
%\begin{verbatim}
%$$ ... \sum ... $$
%\end{verbatim}
With \verb-\limits\nolimits- or \verb-\nolimits\limits- the
last specification has precedence; the default placement
can be restored by \csidx{displaylimits}. For instance,
\begin{verbatim}
$ ... \sum\limits\displaylimits ... $
\end{verbatim}
is equivalent to
\begin{verbatim}
$ ... \sum ... $
\end{verbatim}
and
\begin{verbatim}
$$ ... \sum\nolimits\displaylimits ... $$
\end{verbatim}
is equivalent to
\begin{verbatim}
$$ ... \sum ... $$
\end{verbatim}
%%\point Vertical centering: \cs{vcenter}
%\section{Vertical centring: \protect\cs{vcenter}}
%\point Vertical centering: \cs{vcenter}
\section{Vertical centring: \protect\cs{vcenter}}
%Each formula has an \emph{axis}\index{formula!axis
% of}\index{formula!centring of}, which is for an in-line formula
%about half the x-height of the surrounding text; the exact value is
%the \cs{fontdimen22} of the font in family~2, the symbol font, in the
%current style.
Each formula has an \emph{axis}\index{formula!axis
of}\index{formula!centring of}, which is for an in-line formula
about half the x-height of the surrounding text; the exact value is
the \cs{fontdimen22} of the font in family~2, the symbol font, in the
current style.
%The bar line in fractions is placed on the axis; large
%operators, delimiters and \cs{vcenter} boxes are centred on it.
The bar line in fractions is placed on the axis; large
operators, delimiters and \cs{vcenter} boxes are centred on it.
%A \csidx{vcenter}\label{vcenter}
%box is a vertical box that is arranged
%so that it is centred on the math axis.
%It is possible to give a \n{spread} or \n{to}
%specification with a \cs{vcenter} box.
A \csidx{vcenter}\label{vcenter}
box is a vertical box that is arranged
so that it is centred on the math axis.
It is possible to give a \n{spread} or \n{to}
specification with a \cs{vcenter} box.
%The \cs{vcenter} box is allowed only in math mode, and
%it does not behave like other boxes; for instance, it can
%not be stored in a box register. It does not qualify as
%a~\gr{box}. See page~\pageref{tvcenter} for a macro that
%repairs this.
The \cs{vcenter} box is allowed only in math mode, and
it does not behave like other boxes; for instance, it can
not be stored in a box register. It does not qualify as
a~\gr{box}. See page~\pageref{tvcenter} for a macro that
repairs this.
%%\point[muglue] Mathematical spacing: \n{mu} glue
%\section{Mathematical spacing: \n{mu} glue}
%\label{muglue}
%\index{math spacing|(}
%\point[muglue] Mathematical spacing: \n{mu} glue
\section{Mathematical spacing: \n{mu} glue}
\label{muglue}
\index{math spacing|(}
%Spacing around mathematical objects is measured in \indexterm{math units}:
%multiples of a~\n{mu}. A~\n{mu} is $1/18$th part of \cs{fontdimen6} of
%the font in family~2 in the current style, the \indexterm{quad} value of the
%symbol font.
Spacing around mathematical objects is measured in \indexterm{math units}:
multiples of a~\n{mu}. A~\n{mu} is $1/18$th part of \cs{fontdimen6} of
the font in family~2 in the current style, the \indexterm{quad} value of the
symbol font.
%%\spoint Classification of \n{mu} glue
%\subsection{Classification of \n{mu} glue}
%\spoint Classification of \n{mu} glue
\subsection{Classification of \n{mu} glue}
%The user can specify \n{mu} spacing by \cs{mkern} or~\cs{mskip},
%\cstoidx mkern\par\cstoidx mskip\par
%but most \indexterm{mu glue} is inserted automatically by \TeX,
%based on the classes to which objects belong (see above).
%First, here are some rules of thumb describing the global
%behaviour.
The user can specify \n{mu} spacing by \cs{mkern} or~\cs{mskip},
\cstoidx mkern\par\cstoidx mskip\par
but most \indexterm{mu glue} is inserted automatically by \TeX,
based on the classes to which objects belong (see above).
First, here are some rules of thumb describing the global
behaviour.
%\begin{itemize} \item A \cs{thickmuskip} (default value in plain
%\TeX: \n{5mu plus 5mu})
%\cstoidx thickmuskip\par
%is inserted around (binary) relations, except where these are
%preceded or followed by other relations or punctuation, and
%except if they follow an open, or precede a close symbol.
%\item A \csidx{medmuskip} (default value in plain
%\TeX: \n{4mu plus 2mu minus 4mu})
%is put around binary operators.
%\item A \csidx{thinmuskip}
%(default value in plain \TeX: \n{3mu}) follows after
%punctuation, and is put around inner objects, except where these
%are followed by a close or preceded by an open symbol, and
%except if the other object is a large operator or a
%binary relation.
%\item No \n{mu} glue is inserted after an open or before a close
%symbol except where the latter is preceded by punctuation;
%no \n{mu} glue is inserted also before punctuation, except where
%the preceding object is punctuation or an inner object.
%\end{itemize}
\begin{itemize} \item A \cs{thickmuskip} (default value in plain
\TeX: \n{5mu plus 5mu})
\cstoidx thickmuskip\par
is inserted around (binary) relations, except where these are
preceded or followed by other relations or punctuation, and
except if they follow an open, or precede a close symbol.
\item A \csidx{medmuskip} (default value in plain
\TeX: \n{4mu plus 2mu minus 4mu})
is put around binary operators.
\item A \csidx{thinmuskip}
(default value in plain \TeX: \n{3mu}) follows after
punctuation, and is put around inner objects, except where these
are followed by a close or preceded by an open symbol, and
except if the other object is a large operator or a
binary relation.
\item No \n{mu} glue is inserted after an open or before a close
symbol except where the latter is preceded by punctuation;
no \n{mu} glue is inserted also before punctuation, except where
the preceding object is punctuation or an inner object.
\end{itemize}
%The following table gives the complete definition of mu glue
%between math objects.
%\begin{disp}\leavevmode
%\vbox{\offinterlineskip
% \halign{#\enspace\hfil&#\enspace\hfil\vrule
% &&\hfil\enspace#\hfil\strut\cr
% \omit\hfil&\omit\hfil& 0:& 1:& 2:& 3:& 4:& 5:& 6:\cr
% \omit\hfil&\omit\hfil&\hfill Ord&\hfill Op&\hfill Bin&\hfill Rel&
% \hfill Open&\hfill Close&\hfill Punct&\hfill Inner\cr
% \omit\hfil&\omit\hfil&\multispan8\hrulefill\cr
% 0:&Ord& 0& 1&(2)&(3)& 0& 0& 0&(1)\cr
% 1:&Op& 1& 1& *&(3)& 0& 0& 0&(1)\cr
% 2:&Bin& (2)&(2)& *& *&(2)& *& *&(2)\cr
% 3:&Rel& (3)&(3)& *& 0&(2)& *& *&(2)\cr
% 4:&Open& 0& 0& *& 0& 0& 0& 0& 0\cr
% 5:&Close& 0& 1&(2)&(3)& 0& 0& 0&(1)\cr
% 6:&Punct&(1)&(1)& *&(1)&(1)&(1)&(1)&(1)\cr
% &Inner&(1)& 1&(2)&(3)&(1)& 0&(1)&(1)\cr
%% \omit\hfil&\omit\hfil&\multispan8\hrulefil\cr
%}}
%\end{disp}
The following table gives the complete definition of mu glue
between math objects.
\begin{disp}\leavevmode
\vbox{\offinterlineskip
\halign{#\enspace\hfil&#\enspace\hfil\vrule
&&\hfil\enspace#\hfil\strut\cr
\omit\hfil&\omit\hfil& 0:& 1:& 2:& 3:& 4:& 5:& 6:\cr
\omit\hfil&\omit\hfil&\hfill Ord&\hfill Op&\hfill Bin&\hfill Rel&
\hfill Open&\hfill Close&\hfill Punct&\hfill Inner\cr
\omit\hfil&\omit\hfil&\multispan8\hrulefill\cr
0:&Ord& 0& 1&(2)&(3)& 0& 0& 0&(1)\cr
1:&Op& 1& 1& *&(3)& 0& 0& 0&(1)\cr
2:&Bin& (2)&(2)& *& *&(2)& *& *&(2)\cr
3:&Rel& (3)&(3)& *& 0&(2)& *& *&(2)\cr
4:&Open& 0& 0& *& 0& 0& 0& 0& 0\cr
5:&Close& 0& 1&(2)&(3)& 0& 0& 0&(1)\cr
6:&Punct&(1)&(1)& *&(1)&(1)&(1)&(1)&(1)\cr
&Inner&(1)& 1&(2)&(3)&(1)& 0&(1)&(1)\cr
% \omit\hfil&\omit\hfil&\multispan8\hrulefil\cr
}}
\end{disp}
%where the symbols have the following meanings:
%\begin{itemize}\item 0, no space; 1, thin space; 2, medium space;
% 3, thick space;
%\item $(\cdot)$, insert only in text and display
% mode, not in script or scriptscript mode;
%\item cases * cannot occur, because a Bin object is converted
% to Ord if it is the first in the list, preceded by
% Bin, Op, Open, Punct, Rel, or followed by Close,
% Punct, and Rel; also, a Rel is converted to Ord when
% \alt
% it is followed by Close or Punct.
%\end{itemize}
where the symbols have the following meanings:
\begin{itemize}\item 0, no space; 1, thin space; 2, medium space;
3, thick space;
\item $(\cdot)$, insert only in text and display
mode, not in script or scriptscript mode;
\item cases * cannot occur, because a Bin object is converted
to Ord if it is the first in the list, preceded by
Bin, Op, Open, Punct, Rel, or followed by Close,
Punct, and Rel; also, a Rel is converted to Ord when
\alt
it is followed by Close or Punct.
\end{itemize}
%Stretchable \n{mu} glue is set according to the same rules that
%govern ordinary glue. However, only \n{mu} glue on the outer
%level can be stretched or shrunk; any \n{mu} glue enclosed
%in a~group is set at natural width.
Stretchable \n{mu} glue is set according to the same rules that
govern ordinary glue. However, only \n{mu} glue on the outer
level can be stretched or shrunk; any \n{mu} glue enclosed
in a~group is set at natural width.
%%\spoint Muskip registers
%\subsection{Muskip registers}
%\spoint Muskip registers
\subsection{Muskip registers}
%Like ordinary glue, \n{mu} glue can be stored in registers,
%\cstoidx muskip\par\cstoidx muskipdef\par\cstoidx newmuskip\par
%the \cs{muskip} registers,
%of which there are 256 in \TeX.
%The registers are denoted by
%\begin{disp}\cs{muskip}\gr{8-bit number}\end{disp}
%and they can be assigned to a control sequence by
%\begin{disp}\cs{muskipdef}\gr{control sequence}\gr{equals}\gr{8-bit number}
%\end{disp}
%and there is a macro that allocates unused registers:
%\begin{disp}\cs{newmuskip}\gr{control sequence}\end{disp}
%Arithmetic for mu glue exists as for glue; see
%Chapter~\ref{glue}.
Like ordinary glue, \n{mu} glue can be stored in registers,
\cstoidx muskip\par\cstoidx muskipdef\par\cstoidx newmuskip\par
the \cs{muskip} registers,
of which there are 256 in \TeX.
The registers are denoted by
\begin{disp}\cs{muskip}\gr{8-bit number}\end{disp}
and they can be assigned to a control sequence by
\begin{disp}\cs{muskipdef}\gr{control sequence}\gr{equals}\gr{8-bit number}
\end{disp}
and there is a macro that allocates unused registers:
\begin{disp}\cs{newmuskip}\gr{control sequence}\end{disp}
Arithmetic for mu glue exists as for glue; see
Chapter~\ref{glue}.
%%\spoint Other spaces in math mode
%\subsection{Other spaces in math mode}
%\spoint Other spaces in math mode
\subsection{Other spaces in math mode}
%In math mode space tokens are ignored; however,
%the math code of the space character is \verb-"8000-
%in plain \TeX,
%so if its category is made `letter' or `other character', it
%will behave like an active character in math mode.
%See also page~\pageref{mcode:8000}.
In math mode space tokens are ignored; however,
the math code of the space character is \verb-"8000-
in plain \TeX,
so if its category is made `letter' or `other character', it
will behave like an active character in math mode.
See also page~\pageref{mcode:8000}.