-
Notifications
You must be signed in to change notification settings - Fork 0
/
texinfo.tex
3350 lines (2838 loc) · 106 KB
/
texinfo.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
%% TeX macros to handle texinfo files
% Copyright (C) 1985, 1986, 1988, 1990, 1991 Free Software Foundation, Inc.
%This texinfo.tex file is free software; you can redistribute it and/or
%modify it under the terms of the GNU General Public License as
%published by the Free Software Foundation; either version 2, or (at
%your option) any later version.
%This texinfo.tex file is distributed in the hope that it will be
%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%General Public License for more details.
%You should have received a copy of the GNU General Public License
%along with this texinfo.tex file; see the file COPYING. If not, write
%to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
%USA.
%In other words, you are welcome to use, share and improve this program.
%You are forbidden to forbid anyone else to use, share and improve
%what you give them. Help stamp out software-hoarding!
\def\texinfoversion{2.73}
\message{Loading texinfo package [Version \texinfoversion]:}
\message{}
% Print the version number if in a .fmt file.
\everyjob{\message{[Texinfo version \texinfoversion]}\message{}}
% Save some parts of plain tex whose names we will redefine.
\let\ptexlbrace=\{
\let\ptexrbrace=\}
\let\ptexdots=\dots
\let\ptexdot=\.
\let\ptexstar=\*
\let\ptexend=\end
\let\ptexbullet=\bullet
\let\ptexb=\b
\let\ptexc=\c
\let\ptexi=\i
\let\ptext=\t
\let\ptexl=\l
\let\ptexL=\L
\def\tie{\penalty 10000\ } % Save plain tex definition of ~.
\message{Basics,}
\chardef\other=12
% If this character appears in an error message or help string, it
% starts a new line in the output.
\newlinechar = `^^J
\hyphenation{ap-pen-dix}
\hyphenation{mini-buf-fer mini-buf-fers}
\hyphenation{eshell}
% Margin to add to right of even pages, to left of odd pages.
\newdimen \bindingoffset \bindingoffset=0pt
\newdimen \normaloffset \normaloffset=\hoffset
\newdimen\pagewidth \newdimen\pageheight
\pagewidth=\hsize \pageheight=\vsize
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal.
%
\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
\def\loggingall{\tracingcommands2 \tracingstats2
\tracingpages1 \tracingoutput1 \tracinglostchars1
\tracingmacros2 \tracingparagraphs1 \tracingrestores1
\showboxbreadth\maxdimen\showboxdepth\maxdimen
}%
%---------------------Begin change-----------------------
%
%%%% For @cropmarks command.
% Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986
%
\newdimen\cornerlong \newdimen\cornerthick
\newdimen \topandbottommargin
\newdimen \outerhsize \newdimen \outervsize
\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks
\outerhsize=7in
%\outervsize=9.5in
% Alternative @smallbook page size is 9.25in
\outervsize=9.25in
\topandbottommargin=.75in
%
%---------------------End change-----------------------
% \onepageout takes a vbox as an argument. Note that \pagecontents
% does insertions itself, but you have to call it yourself.
\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}}
\def\onepageout#1{\hoffset=\normaloffset
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
{\escapechar=`\\\relax % makes sure backslash is used in output files.
\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}%
{\let\hsize=\pagewidth \makefootline}}}%
\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
%%%% For @cropmarks command %%%%
% Here is a modification of the main output routine for Near East Publications
% This provides right-angle cropmarks at all four corners.
% The contents of the page are centerlined into the cropmarks,
% and any desired binding offset is added as an \hskip on either
% site of the centerlined box. (P. A. MacKay, 12 November, 1986)
%
\def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up
\shipout
\vbox to \outervsize{\hsize=\outerhsize
\vbox{\line{\ewtop\hfill\ewtop}}
\nointerlineskip
\line{\vbox{\moveleft\cornerthick\nstop}
\hfill
\vbox{\moveright\cornerthick\nstop}}
\vskip \topandbottommargin
\centerline{\ifodd\pageno\hskip\bindingoffset\fi
\vbox{
{\let\hsize=\pagewidth \makeheadline}
\pagebody{#1}
{\let\hsize=\pagewidth \makefootline}}
\ifodd\pageno\else\hskip\bindingoffset\fi}
\vskip \topandbottommargin plus1fill minus1fill
\boxmaxdepth\cornerthick
\line{\vbox{\moveleft\cornerthick\nsbot}
\hfill
\vbox{\moveright\cornerthick\nsbot}}
\nointerlineskip
\vbox{\line{\ewbot\hfill\ewbot}}
}
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi}
%
% Do @cropmarks to get crop marks
\def\cropmarks{\let\onepageout=\croppageout }
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
\dimen@=\dp#1 \unvbox#1
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
}
%
% Here are the rules for the cropmarks. Note that they are
% offset so that the space between them is truly \outerhsize or \outervsize
% (P. A. MacKay, 12 November, 1986)
%
\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
\def\nstop{\vbox
{\hrule height\cornerthick depth\cornerlong width\cornerthick}}
\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
\def\nsbot{\vbox
{\hrule height\cornerlong depth\cornerthick width\cornerthick}}
% Parse an argument, then pass it to #1.
% The argument can be delimited with [...] or with "..." or braces
% or it can be a whole line.
% #1 should be a macro which expects
% an ordinary undelimited TeX argument.
\def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx}
\def\parseargx{%
\ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else%
\aftergroup \parseargline %
\fi \endgroup}
{\obeyspaces %
\gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}}
\gdef\obeyedspace{\ }
\def\parseargline{\begingroup \obeylines \parsearglinex}
{\obeylines %
\gdef\parsearglinex #1^^M{\endgroup \next {#1}}}
\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
%% These are used to keep @begin/@end levels from running away
%% Call \inENV within environments (after a \begingroup)
\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
\def\ENVcheck{%
\ifENV\errmessage{Still within an environment. Type Return to continue.}
\endgroup\fi} % This is not perfect, but it should reduce lossage
% @begin foo is the same as @foo, for now.
\newhelp\EMsimple{Type <Return> to continue}
\outer\def\begin{\parsearg\beginxxx}
\def\beginxxx #1{%
\expandafter\ifx\csname #1\endcsname\relax
{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
\csname #1\endcsname\fi}
%% @end foo executes the definition of \Efoo.
%% foo can be delimited by doublequotes or brackets.
\def\end{\parsearg\endxxx}
\def\endxxx #1{%
\expandafter\ifx\csname E#1\endcsname\relax
\expandafter\ifx\csname #1\endcsname\relax
\errmessage{Undefined command @end #1}\else
\errorE{#1}\fi\fi
\csname E#1\endcsname}
\def\errorE#1{
{\errhelp=\EMsimple \errmessage{@end #1 not within #1 environment}}}
% Single-spacing is done by various environments.
\newskip\singlespaceskip \singlespaceskip = \baselineskip
\def\singlespace{%
{\advance \baselineskip by -\singlespaceskip
\kern \baselineskip}%
\baselineskip=\singlespaceskip
}
%% Simple single-character @ commands
% @@ prints an @
% Kludge this until the fonts are right (grr).
\def\@{{\tt \char '100}}
% Define @` and @' to be the same as ` and '
% but suppressing ligatures.
\def\`{{`}}
\def\'{{'}}
% Used to generate quoted braces.
\def\mylbrace {{\tt \char '173}}
\def\myrbrace {{\tt \char '175}}
\let\{=\mylbrace
\let\}=\myrbrace
% @: forces normal size whitespace following.
\def\:{\spacefactor=1000 }
% @* forces a line break.
\def\*{\hfil\break\hbox{}\ignorespaces}
% @. is an end-of-sentence period.
\def\.{.\spacefactor=3000 }
% @w prevents a word break. Without the \leavevmode, @w at the
% beginning of a paragraph, when TeX is still in vertical mode, would
% produce a whole line of output instead of starting the paragraph.
\def\w#1{\leavevmode\hbox{#1}}
% @group ... @end group forces ... to be all on one page, by enclosing
% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
% to keep its height that of a normal line. According to the rules for
% \topskip (p.114 of the TeXbook), the glue inserted is
% max (\topskip - \ht (first item), 0). If that height is large,
% therefore, no glue is inserted, and the space between the headline and
% the text is small, which looks bad.
%
\def\group{\begingroup
\ifnum\catcode13=\active \else
\errhelp = \groupinvalidhelp
\errmessage{@group invalid in context where filling is enabled}%
\fi
\def\Egroup{\egroup\endgroup}%
\vtop\bgroup
}
%
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
% message, so this ends up printing `@group can only ...'.
%
\newhelp\groupinvalidhelp{%
group can only be used in environments such as @example,^^J%
where each line of input produces a line of output.}
% @need space-in-mils
% forces a page break if there is not space-in-mils remaining.
\newdimen\mil \mil=0.001in
\def\need{\parsearg\needx}
% Old definition--didn't work.
%\def\needx #1{\par %
%% This method tries to make TeX break the page naturally
%% if the depth of the box does not fit.
%{\baselineskip=0pt%
%\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
%\prevdepth=-1000pt
%}}
\def\needx#1{%
% Go into vertical mode, so we don't make a big box in the middle of a
% paragraph.
\par
%
% Don't add any leading before our big empty box, but allow a page
% break, since the best break might be right here.
\allowbreak
\nointerlineskip
\vtop to #1\mil{\vfil}%
%
% TeX does not even consider page breaks if a penalty added to the
% main vertical list is 10000 or more. But in order to see if the
% empty box we just added fits on the page, we must make it consider
% page breaks. On the other hand, we don't want to actually break the
% page after the empty box. So we use a penalty of 9999.
%
% There is an extremely small chance that TeX will actually break the
% page at this \penalty, if there are no other feasible breakpoints in
% sight. (If the user is using lots of big @group commands, which
% almost-but-not-quite fill up a page, TeX will have a hard time doing
% good page breaking, for example.) However, I could not construct an
% example where a page broke at this \penalty; if it happens in a real
% document, then we can reconsider our strategy.
\penalty9999
%
% Back up by the size of the box, whether we did a page break or not.
\kern -#1\mil
%
% Do not allow a page break right after this kern.
\nobreak
}
% @br forces paragraph break
\let\br = \par
% @dots{} output some dots
\def\dots{$\ldots$}
% @page forces the start of a new page
\def\page{\par\vfill\supereject}
% @exdent text....
% outputs text on separate line in roman font, starting at standard page margin
% This records the amount of indent in the innermost environment.
% That's how much \exdent should take out.
\newskip\exdentamount
% This defn is used inside fill environments such as @defun.
\def\exdent{\parsearg\exdentyyy}
\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
% This defn is used inside nofill environments such as @example.
\def\nofillexdent{\parsearg\nofillexdentyyy}
\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
\leftline{\hskip\leftskip{\rm#1}}}}
%\hbox{{\rm#1}}\hfil\break}}
% @include file insert text of that file as input.
\def\include{\parsearg\includezzz}
\def\includezzz #1{{\def\thisfile{#1}\input #1
}}
\def\thisfile{}
% @center line outputs that line, centered
\def\center{\parsearg\centerzzz}
\def\centerzzz #1{{\advance\hsize by -\leftskip
\advance\hsize by -\rightskip
\centerline{#1}}}
% @sp n outputs n lines of vertical space
\def\sp{\parsearg\spxxx}
\def\spxxx #1{\par \vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
\def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other%
\parsearg \commentxxx}
\def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 }
\let\c=\comment
% Prevent errors for section commands.
% Used in @ignore and in failing conditionals.
\def\ignoresections{%
\let\chapter=\relax
\let\unnumbered=\relax
\let\top=\relax
\let\unnumberedsec=\relax
\let\unnumberedsection=\relax
\let\unnumberedsubsec=\relax
\let\unnumberedsubsection=\relax
\let\unnumberedsubsubsec=\relax
\let\unnumberedsubsubsection=\relax
\let\section=\relax
\let\subsec=\relax
\let\subsubsec=\relax
\let\subsection=\relax
\let\subsubsection=\relax
\let\appendix=\relax
\let\appendixsec=\relax
\let\appendixsection=\relax
\let\appendixsubsec=\relax
\let\appendixsubsection=\relax
\let\appendixsubsubsec=\relax
\let\appendixsubsubsection=\relax
\let\contents=\relax
\let\smallbook=\relax
\let\titlepage=\relax
}
\def\ignore{\begingroup\ignoresections
% Make sure that spaces turn into tokens that match what \ignorexxx wants.
\catcode32=10
\ignorexxx}
\long\def\ignorexxx #1\end ignore{\endgroup\ignorespaces}
\def\direntry{\begingroup\direntryxxx}
\long\def\direntryxxx #1\end direntry{\endgroup\ignorespaces}
% Conditionals to test whether a flag is set.
\def\ifset{\begingroup\ignoresections\parsearg\ifsetxxx}
\def\ifsetxxx #1{\endgroup
\expandafter\ifx\csname IF#1\endcsname\relax \let\temp=\ifsetfail
\else \let\temp=\relax \fi
\temp}
\def\Eifset{}
\def\ifsetfail{\begingroup\ignoresections\ifsetfailxxx}
\long\def\ifsetfailxxx #1\end ifset{\endgroup\ignorespaces}
\def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx}
\def\ifclearxxx #1{\endgroup
\expandafter\ifx\csname IF#1\endcsname\relax \let\temp=\relax
\else \let\temp=\ifclearfail \fi
\temp}
\def\Eifclear{}
\def\ifclearfail{\begingroup\ignoresections\ifclearfailxxx}
\long\def\ifclearfailxxx #1\end ifclear{\endgroup\ignorespaces}
% @set foo to set the flag named foo.
% @clear foo to clear the flag named foo.
\def\set{\parsearg\setxxx}
\def\setxxx #1{
\expandafter\let\csname IF#1\endcsname=\set}
\def\clear{\parsearg\clearxxx}
\def\clearxxx #1{
\expandafter\let\csname IF#1\endcsname=\relax}
% Some texinfo constructs that are trivial in tex
\def\iftex{}
\def\Eiftex{}
\def\ifinfo{\begingroup\ignoresections\ifinfoxxx}
\long\def\ifinfoxxx #1\end ifinfo{\endgroup\ignorespaces}
\long\def\menu #1\end menu{}
\def\asis#1{#1}
% @math means output in math mode.
% We don't use $'s directly in the definition of \math because control
% sequences like \math are expanded when the toc file is written. Then,
% we read the toc file back, the $'s will be normal characters (as they
% should be, according to the definition of Texinfo). So we must use a
% control sequence to switch into and out of math mode.
%
% This isn't quite enough for @math to work properly in indices, but it
% seems unlikely it will ever be needed there.
%
\let\implicitmath = $
\def\math#1{\implicitmath #1\implicitmath}
\def\node{\ENVcheck\parsearg\nodezzz}
\def\nodezzz#1{\nodexxx [#1,]}
\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
\let\lastnode=\relax
\def\donoderef{\ifx\lastnode\relax\else
\expandafter\expandafter\expandafter\setref{\lastnode}\fi
\let\lastnode=\relax}
\def\unnumbnoderef{\ifx\lastnode\relax\else
\expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi
\let\lastnode=\relax}
\def\appendixnoderef{\ifx\lastnode\relax\else
\expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi
\let\lastnode=\relax}
\let\refill=\relax
% @setfilename is done at the beginning of every texinfo file.
% So open here the files we need to have open while reading the input.
% This makes it possible to make a .fmt file for texinfo.
\def\setfilename{%
\readauxfile
\opencontents
\openindices
\fixbackslash % Turn off hack to swallow `\input texinfo'.
\global\let\setfilename=\comment % Ignore extra @setfilename cmds.
\comment % Ignore the actual filename.
}
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
\def\inforef #1{\inforefzzz #1,,,,**}
\def\inforefzzz #1,#2,#3,#4**{See Info file \file{\losespace#3{}},
node \samp{\losespace#1{}}}
\def\losespace #1{#1}
\message{fonts,}
% Font-change commands.
% Texinfo supports the sans serif font style, which plain TeX does not.
% So we set up a \sf analogous to plain's \rm, etc.
\newfam\sffam
\def\sf{\fam=\sffam \tensf}
\let\li = \sf % Sometimes we call it \li, not \sf.
%% Try out Computer Modern fonts at \magstephalf
\let\mainmagstep=\magstephalf
\ifx\bigger\relax
\let\mainmagstep=\magstep1
\font\textrm=cmr12
\font\texttt=cmtt12
\else
\font\textrm=cmr10 scaled \mainmagstep
\font\texttt=cmtt10 scaled \mainmagstep
\fi
% Instead of cmb10, you many want to use cmbx10.
% cmbx10 is a prettier font on its own, but cmb10
% looks better when embedded in a line with cmr10.
\font\textbf=cmb10 scaled \mainmagstep
\font\textit=cmti10 scaled \mainmagstep
\font\textsl=cmsl10 scaled \mainmagstep
\font\textsf=cmss10 scaled \mainmagstep
\font\textsc=cmcsc10 scaled \mainmagstep
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
% A few fonts for @defun, etc.
\font\defbf=cmbx10 scaled \magstep1 %was 1314
\font\deftt=cmtt10 scaled \magstep1
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
% Fonts for indices and small examples.
% We actually use the slanted font rather than the italic,
% because texinfo normally uses the slanted fonts for that.
% Do not make many font distinctions in general in the index, since they
% aren't very useful.
\font\ninett=cmtt9
\font\indrm=cmr9
\font\indit=cmsl9
\let\indsl=\indit
\let\indtt=\ninett
\let\indsf=\indrm
\let\indbf=\indrm
\let\indsc=\indrm
\font\indi=cmmi9
\font\indsy=cmsy9
% Fonts for headings
\font\chaprm=cmbx12 scaled \magstep2
\font\chapit=cmti12 scaled \magstep2
\font\chapsl=cmsl12 scaled \magstep2
\font\chaptt=cmtt12 scaled \magstep2
\font\chapsf=cmss12 scaled \magstep2
\let\chapbf=\chaprm
\font\chapsc=cmcsc10 scaled\magstep3
\font\chapi=cmmi12 scaled \magstep2
\font\chapsy=cmsy10 scaled \magstep3
\font\secrm=cmbx12 scaled \magstep1
\font\secit=cmti12 scaled \magstep1
\font\secsl=cmsl12 scaled \magstep1
\font\sectt=cmtt12 scaled \magstep1
\font\secsf=cmss12 scaled \magstep1
\font\secbf=cmbx12 scaled \magstep1
\font\secsc=cmcsc10 scaled\magstep2
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
% \font\ssecrm=cmbx10 scaled \magstep1 % This size an font looked bad.
% \font\ssecit=cmti10 scaled \magstep1 % The letters were too crowded.
% \font\ssecsl=cmsl10 scaled \magstep1
% \font\ssectt=cmtt10 scaled \magstep1
% \font\ssecsf=cmss10 scaled \magstep1
%\font\ssecrm=cmb10 scaled 1315 % Note the use of cmb rather than cmbx.
%\font\ssecit=cmti10 scaled 1315 % Also, the size is a little larger than
%\font\ssecsl=cmsl10 scaled 1315 % being scaled magstep1.
%\font\ssectt=cmtt10 scaled 1315
%\font\ssecsf=cmss10 scaled 1315
%\let\ssecbf=\ssecrm
\font\ssecrm=cmbx12 scaled \magstephalf
\font\ssecit=cmti12 scaled \magstephalf
\font\ssecsl=cmsl12 scaled \magstephalf
\font\ssectt=cmtt12 scaled \magstephalf
\font\ssecsf=cmss12 scaled \magstephalf
\font\ssecbf=cmbx12 scaled \magstephalf
\font\ssecsc=cmcsc10 scaled \magstep1
\font\sseci=cmmi12 scaled \magstephalf
\font\ssecsy=cmsy10 scaled \magstep1
% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
% but that is not a standard magnification.
% Fonts for title page:
\font\titlerm = cmbx12 scaled \magstep3
\let\authorrm = \secrm
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts, we
% don't bother to reset \scriptfont and \scriptscriptfont (which would
% also require loading a lot more fonts).
%
\def\resetmathfonts{%
\textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
\textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
\textfont\ttfam = \tentt \textfont\sffam = \tensf
}
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this so that font changes will continue to work
% in math mode, where it is the current \fam that is relevant in most
% cases, not the current. Plain TeX does, for example,
% \def\bf{\fam=\bffam \tenbf} By redefining \tenbf, we obviate the need
% to redefine \bf itself.
\def\textfonts{%
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
\resetmathfonts}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
\let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
\resetmathfonts}
\def\secfonts{%
\let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
\let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
\let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
\resetmathfonts}
\def\subsecfonts{%
\let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
\resetmathfonts}
\def\indexfonts{%
\let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
\let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
\let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy
\resetmathfonts}
% Set up the default fonts, so we can use them for creating boxes.
%
\textfonts
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
% Fonts for short table of contents.
\font\shortcontrm=cmr12
\font\shortcontbf=cmbx12
\font\shortcontsl=cmsl12
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
% unless the following character is such as not to need one.
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
\def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
\let\var=\smartitalic
\let\dfn=\smartitalic
\let\emph=\smartitalic
\let\cite=\smartitalic
\def\b#1{{\bf #1}}
\let\strong=\b
\def\t#1{{\tt \exhyphenpenalty=10000\rawbackslash \frenchspacing #1}\null}
\let\ttfont = \t
%\def\samp #1{`{\tt \rawbackslash \frenchspacing #1}'\null}
\def\samp #1{`\tclose{#1}'\null}
\def\key #1{{\tt \exhyphenpenalty=10000\uppercase{#1}}\null}
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
\let\file=\samp
% @code is a modification of @t,
% which makes spaces the same size as normal in the surrounding text.
\newdimen\tclosesave
\newdimen\tcloserm
\def\tclose#1{{\rm \tcloserm=\fontdimen2\font \tt \tclosesave=\fontdimen2\font
\fontdimen2\font=\tcloserm
% prevent breaking lines at hyphens.
\exhyphenpenalty=10000
\def\ {{\fontdimen2\font=\tclosesave{} }}%
\rawbackslash \frenchspacing #1\fontdimen2\font=\tclosesave}\null}
\let\code=\tclose
%\let\exp=\tclose %Was temporary
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
\else\tclose{\look}\fi
\else\tclose{\look}\fi}
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of
% @dmn{}pt.
%
\def\dmn#1{\thinspace #1}
\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
\def\l#1{{\li #1}\null} %
\def\r#1{{\rm #1}} % roman font
% Use of \lowercase was suggested.
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
\message{page headings,}
\newskip\titlepagetopglue \titlepagetopglue = 1.5in
\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
% First the title page. Must do @settitle before @titlepage.
\def\titlefont#1{{\titlerm #1}}
\newtoks\realeverypar
\newif\ifseenauthor
\newif\iffinishedtitlepage
\def\titlepage{\begingroup \parindent=0pt \textfonts
\let\subtitlerm=\tenrm
% I deinstalled the following change because \cmr12 is undefined.
% This change was not in the ChangeLog anyway. --rms.
% \let\subtitlerm=\cmr12
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
%
\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
%
% Leave some space at the very top of the page.
\vglue\titlepagetopglue
%
% Now you can print the title using @title.
\def\title{\parsearg\titlezzz}%
\def\titlezzz##1{\leftline{\titlefont{##1}}
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt \vskip4pt}%
% No rule at page bottom unless we print one at the top with @title.
\finishedtitlepagetrue
%
% Now you can put text using @subtitle.
\def\subtitle{\parsearg\subtitlezzz}%
\def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
%
% @author should come last, but may come many times.
\def\author{\parsearg\authorzzz}%
\def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
{\authorfont \leftline{##1}}}%
%
% Most title ``pages'' are actually two pages long, with space
% at the top of the second. We don't want the ragged left on the second.
\let\oldpage = \page
\def\page{%
\iffinishedtitlepage\else
\finishtitlepage
\fi
\oldpage
\let\page = \oldpage
\hbox{}}%
% \def\page{\oldpage \hbox{}}
}
\def\Etitlepage{%
\iffinishedtitlepage\else
\finishtitlepage
\fi
% It is important to do the page break before ending the group,
% because the headline and footline are only empty inside the group.
% If we use the new definition of \page, we always get a blank page
% after the title page, which we certainly don't want.
\oldpage
\endgroup
\HEADINGSon
}
\def\finishtitlepage{%
\vskip4pt \hrule height 2pt
\vskip\titlepagebottomglue
\finishedtitlepagetrue
}
%%% Set up page headings and footings.
\let\thispage=\folio
\newtoks \evenheadline % Token sequence for heading line of even pages
\newtoks \oddheadline % Token sequence for heading line of odd pages
\newtoks \evenfootline % Token sequence for footing line of even pages
\newtoks \oddfootline % Token sequence for footing line of odd pages
% Now make Tex use those variables
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
\else \the\evenheadline \fi}}
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
\else \the\evenfootline \fi}\HEADINGShook}
\let\HEADINGShook=\relax
% Commands to set those variables.
% For example, this is what @headings on does
% @evenheading @thistitle|@thispage|@thischapter
% @oddheading @thischapter|@thispage|@thistitle
% @evenfooting @thisfile||
% @oddfooting ||@thisfile
\def\evenheading{\parsearg\evenheadingxxx}
\def\oddheading{\parsearg\oddheadingxxx}
\def\everyheading{\parsearg\everyheadingxxx}
\def\evenfooting{\parsearg\evenfootingxxx}
\def\oddfooting{\parsearg\oddfootingxxx}
\def\everyfooting{\parsearg\everyfootingxxx}
{\catcode`\@=0 %
\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish}
\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{%
\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish}
\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{%
\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
%
}% unbind the catcode of @.
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
% @headings off turns them off.
% @headings on same as @headings double, retained for compatibility.
% @headings after turns on double-sided headings after this page.
% @headings doubleafter turns on double-sided headings after this page.
% @headings singleafter turns on single-sided headings after this page.
% By default, they are off.
\def\headings #1 {\csname HEADINGS#1\endcsname}
\def\HEADINGSoff{
\global\evenheadline={\hfil} \global\evenfootline={\hfil}
\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
\HEADINGSoff
% When we turn headings on, set the page number to 1.
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
\def\HEADINGSdouble{
%\pagealignmacro
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
}
% For single-sided printing, chapter title goes across top left of page,
% page number on top right.
\def\HEADINGSsingle{
%\pagealignmacro
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
}
\def\HEADINGSon{\HEADINGSdouble}
\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
\let\HEADINGSdoubleafter=\HEADINGSafter
\def\HEADINGSdoublex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
}
\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
\def\HEADINGSsinglex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
}
% Subroutines used in generating headings
% Produces Day Month Year style of output.
\def\today{\number\day\space
\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\year}
% Use this if you want the Month Day, Year style of output.
%\def\today{\ifcase\month\or
%January\or February\or March\or April\or May\or June\or
%July\or August\or September\or October\or November\or December\fi
%\space\number\day, \number\year}
% @settitle line... specifies the title of the document, for headings
% It generates no output of its own
\def\thistitle{No Title}
\def\settitle{\parsearg\settitlezzz}
\def\settitlezzz #1{\gdef\thistitle{#1}}
\message{tables,}
% @tabs -- simple alignment
% These don't work. For one thing, \+ is defined as outer.
% So these macros cannot even be defined.
%\def\tabs{\parsearg\tabszzz}
%\def\tabszzz #1{\settabs\+#1\cr}
%\def\tabline{\parsearg\tablinezzz}
%\def\tablinezzz #1{\+#1\cr}
%\def\&{&}
% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
% default indentation of table text
\newdimen\tableindent \tableindent=.8in
% default indentation of @itemize and @enumerate text
\newdimen\itemindent \itemindent=.3in
% margin between end of table item and start of table text.
\newdimen\itemmargin \itemmargin=.1in
% used internally for \itemindent minus \itemmargin
\newdimen\itemmax
% Note @table, @vtable, and @vtable define @item, @itemx, etc., with
% these defs.
% They also define \itemindex
% to index the item name in whatever manner is desired (perhaps none).
\def\internalBitem{\smallbreak \parsearg\itemzzz}
\def\internalBitemx{\par \parsearg\itemzzz}
\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \par \parsearg\xitemzzz}
\def\internalBkitem{\smallbreak \parsearg\kitemzzz}
\def\internalBkitemx{\par \parsearg\kitemzzz}
\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%