-
-
Notifications
You must be signed in to change notification settings - Fork 275
/
Copy pathslides.dtx
2740 lines (2684 loc) · 87.6 KB
/
slides.dtx
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
% \iffalse meta-comment
%
% Copyright (C) 1993-2025
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
% -------------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%
% This file has the LPPL maintenance status "maintained".
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
%
% \fi
%
% \iffalse
% Copyright (C) 1994-97 LaTeX Project, Frank Mittelbach
% and Rainer Sch\"opf, all rights reserved.
%
% \begin{macrocode}
%<+class>\NeedsTeXFormat{LaTeX2e}[1997/06/01]
% \end{macrocode}
%
% Announce the Class name and its version:
% \changes{v2.3b}{1994/05/01}{Removed the use of \cs{fileversion}
% c.s.}
% \changes{v2.3b}{1994/05/01}{Added \cs{ProvidesFile} to slides.def.}
% \changes{v2.3o}{1995/05/17}{Replaced all \cs{hbox to} with
% \cs{hb@xt@}.}
% \changes{v2.3o}{1995/05/17}{Cleaned up the \cs{changes} entries.}
% \changes{v2.3p}{1995/05/23}{Corrected some brace mismatches.}
% \changes{v2.3q}{1995/09/20}{Replaced \cs{@tempa} by \cs{reserved@a}.}
% \changes{v2.3r}{1995/09/27}{Globally replaced scale factor 19.91 by
% 19.907 in \cs{DeclareFontShape}, as this gives better
% rounded font sizes at 600dpi (suggested by Denis Roegel).}
% \begin{macrocode}
%<+class>\ProvidesClass{slides}
%<+cmd>\ProvidesFile{slides.def}
%<*driver>
\ProvidesFile{slides.drv}
%</driver>
[2022/05/18 v2.4b
%<+class> Standard LaTeX document class]
%<+cmd> SLiTeX definitions]
% \end{macrocode}
%
% \section{A driver for this document}
%
% \changes{v2.3f}{1994/05/26}{Moved the driver to the front of the
% file; it doesn't print any longer}
%
% The next bit of code contains the documentation driver file for
% \TeX{}, i.e., the file that will produce the documentation you are
% currently reading. It can be extracted from this file by the
% \dst{} program.
% \begin{macrocode}
%<*driver>
]
\documentclass{ltxdoc}
% \end{macrocode}
% The following command retrieves the date and version information
% from the file.
% \begin{macrocode}
\GetFileInfo{slides.drv}
% \end{macrocode}
% Some commonly used abbreviations:
% \changes{v2.3h}{1994/06/01}{Added definition of \cs{SLiTeX}.}
% \begin{macrocode}
\DeclareRobustCommand{\SLiTeX}{{%
\normalfont S\kern -.06em
{\scshape l\kern -.035emi}\kern -.06em
\TeX
}}
\newcommand*{\Lopt}[1]{\textsf {#1}}
\newcommand*{\file}[1]{\texttt {#1}}
\newcommand*{\Lcount}[1]{\textsl {\small#1}}
\newcommand*{\pstyle}[1]{\textsl {#1}}
\newcommand*{\dst}{{\normalfont\scshape docstrip}}
%
% \end{macrocode}
% Now start the document and input this file.
% \changes{v2.3d}{1994/05/12}{Added a missing \cs{begin\{macrocode\}}}
% \begin{macrocode}
\begin{document}
\DocInput{slides.dtx}
\end{document}
%</driver>
% \end{macrocode}
%\fi
%
%
% \changes{v2.1b}{1993/12/13}{Removed \cs{CodelineIndex} from the
% driver code.}
% \changes{v2.1e}{1993/12/16}{Removed again different definitions for
% font commands font commands in non-compatibility mode.}
%
% \changes{v2.2}{1993/12/18}{Changes to make it work with
% compatibility mode.}
% \changes{v2.2a}{1993/12/19}{Removed float parms}
% \changes{v2.2d}{1994/01/31}{Removed \cs{@normalsize definition}}
% \changes{v2.2g}{1994/03/01}{Removed option makeidx.}
% \changes{v2.2g}{1994/03/01}{Moved driver up front.}
% \changes{v2.2g}{1994/03/01}{Renamed files \file{slides.ltx} and
% \file{sfontdef.ltx} to \file{slides.def} and \file{sfonts.def}.}
% \changes{v2.2l}{1994/03/16}{Removed \cs{typeouts}}
% \changes{v2.3}{1994/03/16}{Removed root/slide-file structure except
% for compatibility mode. (LL)}
% \changes{v2.3}{1994/03/16}{Added clock option (LL)}
% \changes{v2.3}{1994/03/16}{Modified slide, overlay, note
% environments. (LL)}
% \changes{v2.3}{1994/03/16}{Added titlepage option and
% \cs{maketitle}. (LL)}
% \changes{v2.3c}{1994/05/06}{Changed documentation to use
% `environment' instead of `macro' environment for environments}
% \changes{v2.3f}{1994/05/26}{Wrapped two long lines}
% \changes{v2.3l}{1994/12/16}{Use \cs{newcommand*} to define commands
% with an argument}
% \changes{v2.3n}{1995/04/02}{a slight documentation fix (PR 1517)}
%
% \title{Producing slides with \LaTeXe{}}
% \author{Frank Mittelbach}
% \date{\filedate}
%
% \maketitle
% \MaintainedByLaTeXTeam{latex}
%
% \section{Introduction}
%
% With \LaTeXe{} it is now no longer necessary to maintain a special
% format for producing overhead slides. Instead the standard format
% may be used and internally only different font definition files come
% into play.
%
% \section{Usage}
%
% For producing slides you have to use |slides| as the
% document class. This class is very similar to the |slides| style
% that came with \SliTeX{}, in fact it is basically a copy changed to
% work under \LaTeXe{}.\footnote{Therefore you should compare the
% new class with old \SliTeX{} styles
% in case you have local slide classes to see what you have to change
% in order to use them with \LaTeXe{}.} Thus you have to say something
% like
% \begin{verbatim}
% \documentclass[...]{slides}
% \end{verbatim}
% and process this with \LaTeXe.
%
% \section{Fonts}
%
% Note, that with NFSS you can easily produce slides with special
% fonts just by calling an appropriate style file (like |times|) in a
% |\usepackage| command. This works, for example, with all
% fonts that are defined to be scaleable (e.g., PostScript fonts) since
% they can be used at any size by NFSS.
%
% However, packages like |pandora| won't work because the standard
% |.fd| files shipped with NFSS only contain small sizes. You can, of
% course, produce additional sizes and change the |.fd| files
% accordingly so that they would be useable for slides as well.
%
% \section{Invisible text and color separation}
%
% In the original \SliTeX{} it was possible to produce invisible text
% using the |\invisible| command, so that one was able to put several
% slides on top of each other (with each slides showing additional
% details, etc.). It was also possible to produce `color' slides. This
% was done by producing individual slides one for each color and
% placing them on top of each other.
%
% The availability of color printers and the |color| package make
% color separation obsolete, so it has been removed. Although the
% |color| has also made |\invisible| obsolete, the command is
% retained in the \LaTeXe{} implementation, but there
% are a few restrictions. Invisible fonts are implemented as special
% shapes where the shape names are build by prefixing the normal shape
% name with an uppercase |I|. For example, the `normal invisible
% shape' would be |In|. When \LaTeX{} is requested to typeset
% invisible it will thus change the current shape attribute in this
% manner. To make this work it is necessary that the resulting font
% shape group is defined. If not, the normal font substitution
% mechanism of \LaTeXe{} will change the attribute until it finds a
% usable font shape group with the result that the text may become
% visible.
%
% As long as you use the standard fonts for slides this is not a
% problem because all the visible font shape groups have invisible
% counterparts. However, if you decide on using special fonts, e.g.,
% PostScript fonts, your |\DeclareFontShape| settings may not contain
% invisible font shape groups and thus you may be unable to use these
% features without adding additional |\DeclareFontShape| commands to
% your |.fd| files or the preamble of your document.
%
% \MaybeStop{}
%
%
% \section{The Implementation}
%
% \begin{quote}
% \textbf{Warning:} The implementation is still very experimental and
% may change internally very much. It currently basically consists of a
% slightly modified copy of |slides.sty| (which then forms
% |slides.cls|) followed by a slightly changed copy of |slitex.tex|.
% Documentation is practically
% non-existing. Everybody is invited to help changing this!
% \end{quote}
%
% The code is divided into two parts, we first implement the class
% related functions and declarations and then define low level stuff
% that is necessary within every class. By placing such commands into
% a separate file it will be possible to share it with other slide
% classes.
%
% \subsection{The class code}
%
% At this point we input the redefinitions that are necessary for
% \SLiTeX.
% \changes{v2.3g}{1994/05/26}{Use \cs{input} instead of \cs{@@input}}
% \begin{macrocode}
%<*class>
\input{slides.def}
% \end{macrocode}
%
%
% Now we are ready for setting up the font tables. As usual, we first
% look for a local configuration file |sfonts.cfg|. If there isn't
% one, we fall back to the default one (|sfonts.def|).
% \changes{v2.2i}{1994/03/08}{Corrected first argument of
% \cs{IfFileExists}: \file{sfonts.def} to \file{sfonts.cfg}.}
% \changes{v2.3g}{1994/05/26}{Use \cs{InputIfFileExists} instead of
% \cs{IfFileExists} and \cs{input} instead of \cs{@@input}}
% \begin{macrocode}
\InputIfFileExists{sfonts.cfg}
{\typeout{**************************************^^J%
*^^J%
* Local config file sfonts.cfg used^^J%
*^^J%
**************************************}}%
{\input{sfonts.def}}
% \end{macrocode}
%
% \section{Declaration of Options}
%
% We declare a few options as illegal.
%
%
% \subsection{Setting Paper Sizes}
%
% The variables |\paperwidth| and |\paperheight| should reflect the
% physical paper size after trimming. For desk printer output this
% is usually the real paper size since there is no post-processing.
% Classes for real book production will probably add other paper
% sizes and additionally the production of crop marks for trimming.
% \changes{v2.1d}{1993/12/14}{Corrected typo, A4 is not 279 mm high}
% \begin{macrocode}
\DeclareOption{a4paper}
{\setlength\paperheight {297mm}%
\setlength\paperwidth {210mm}}
\DeclareOption{a5paper}
{\setlength\paperheight {210mm}%
\setlength\paperwidth {148mm}}
\DeclareOption{b5paper}
{\setlength\paperheight {250mm}%
\setlength\paperwidth {176mm}}
\DeclareOption{letterpaper}
{\setlength\paperheight {11in}%
\setlength\paperwidth {8.5in}}
\DeclareOption{legalpaper}
{\setlength\paperheight {14in}%
\setlength\paperwidth {8.5in}}
\DeclareOption{executivepaper}
{\setlength\paperheight {10.5in}%
\setlength\paperwidth {7.25in}}
% \end{macrocode}
%
% The option \Lopt{landscape} switches the values of |\paperheight|
% and |\paperwidth|, assuming the dimensions were given for portrait
% paper.
% \begin{macrocode}
\DeclareOption{landscape}
{\setlength\@tempdima {\paperheight}%
\setlength\paperheight {\paperwidth}%
\setlength\paperwidth {\@tempdima}}
% \end{macrocode}
%
% \subsection{The clock option}
% The option \Lopt{clock} prints the time at the bottom of each note.
% We also define here the commands and counters used to keep track of
% time.
% \begin{macrocode}
\newif\if@clock \@clockfalse
\DeclareOption{clock}{\@clocktrue
\AtEndDocument{\typeout{\@arabic\c@minutes\space minutes}}
}%
\newcounter{minutes}%
\newcounter{seconds}%
\newcommand*{\settime}[1]{\setcounter{seconds}{0}\addtime{#1}}%
\newcommand*{\addtime}[1]{\addtocounter{seconds}{#1}%
\setcounter{minutes}{\value{seconds}}%
\global \divide \value{minutes} by 60\relax}
% \end{macrocode}
%
% \subsection{Two-side or one-side printing}
%
% Two-sided printing is not allowed, so don't declare an option.
% But it is necessary to initialize the switch.
% \changes{v2.2h}{1994/03/07}{Removed declared option twoside.}
% \begin{macrocode}
\@twosidefalse
% \end{macrocode}
%
%
% \subsection{Draft option}
%
% If the user requests \Lopt{draft} we show any overfull boxes.
% We could probably add some more interesting stuff to this option.
% \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
% \end{macrocode}
%
% \subsection{Titlepage option}
% The default is for a |\maketitle| command to make a new page.
% \begin{macrocode}
\newif\if@titlepage
\@titlepagetrue
\DeclareOption{titlepage}{\@titlepagetrue}
\DeclareOption{notitlepage}{\@titlepagefalse}
% \end{macrocode}
%
% \subsection{Twocolumn printing}
%
% Two-column printing is again forbidden.
% \changes{v2.3e}{1994/05/22}{twocolumn produces only a warning}
% \begin{macrocode}
\DeclareOption{onecolumn}{}
\DeclareOption{twocolumn}{%
\ClassWarning{slides}{No 'twocolumn' layout for slides}}
% \end{macrocode}
%
% \subsection{Equation numbering on the left}
%
% The option \Lopt{leqno} can be used to get the equation numbers
% on the left side of the equation.
% \changes{v2.2g}{1994/03/01}{Option leqno loads \file{leqno.clo}
% file.}
% \begin{macrocode}
\DeclareOption{leqno}{\input{leqno.clo}}
% \end{macrocode}
%
% \subsection{Flush left displays}
%
% The option \Lopt{fleqn} redefines the displayed math environments
% in such a way that they come out flush left, with an indentation
% of |\mathindent| from the prevailing left margin.
% \changes{v2.2g}{1994/03/01}{Added fleqn option.}
% \begin{macrocode}
\DeclareOption{fleqn}{\input{fleqn.clo}}
% \end{macrocode}
%
%
% \section{Executing Options}
%
% Here we execute the default options to initialize certain
% variables.
% \begin{macrocode}
\ExecuteOptions{letterpaper,final}
% \end{macrocode}
%
% The |\ProcessOptions| command causes the execution of the code
% for every option \Lopt{FOO}
% which is declared and for which the user typed
% the \Lopt{FOO} option in his
% |\documentclass| command. For every option \Lopt{BAR} he typed,
% which is not declared, the option is assumed to be a global option.
% All options will be passed as document options to any
% |\usepackage| command in the document preamble.
% \begin{macrocode}
\ProcessOptions
% \end{macrocode}
%
% \section{Loading Packages}
%
% The standard class files do not load additional packages.
%
%
% \section{Document Layout}
%
%
% In this section we are finally dealing with the nasty typographical
% details.
%
%
%
% \subsection{Fonts}
%
% \begin{macrocode}
% FMi:
\def\rmdefault{lcmss} % no roman
\def\sfdefault{lcmss}
\def\ttdefault{lcmtt}
\def\itdefault{sl}
\def\sldefault{sl}
\def\bfdefault{bx}
% \end{macrocode}
% As |\fontshape| gets redefined we need to make sure that the default
% for |\upshape| is no longer \texttt{up} but again \texttt{n}.
% \changes{v2.4b}{2019/11/04}{Explicitly set \cs{updefault}}
% \begin{macrocode}
\def\updefault{n}
% \end{macrocode}
%
%
% Since the number of parameters to set are very large it seems
% reasonable to set up one command |\@setfontsize@parms| which will
% do the work for us.
%
% \LaTeX\ offers the user commands to change the size of the font,
% relative to the `main' size. Each relative size changing command
% |\size| executes the command
% |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where:
%
% \begin{description}
% \item[\meta{font-size}] The absolute size of the font to use from
% now on.
%
% \item[\meta{baselineskip}] The normal value of |\baselineskip|
% for the size of the font selected. (The actual value will be
% |\baselinestretch| * \meta{baselineskip}.)
% \end{description}
%
% A number of commands, defined in the \LaTeX{} kernel, shorten the
% following definitions and are used throughout. They are:
% \begin{center}
% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
% \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
% \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
% \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
% ...
% \end{tabular}
% \end{center}
%
% \begin{macro}{\ifourteenpt}
% \begin{macro}{\iseventeenpt}
% \begin{macro}{\itwentypt}
% \begin{macro}{\itwentyfourpt}
% \begin{macro}{\itwentyninept}
% \begin{macro}{\ithirtyfourpt}
% \begin{macro}{\ifortyonept}
% For \SLiTeX{}, however, these are not sufficient, and we therefore
% need to add a few extra, larger, sizes.
% \begin{macrocode}
\def\ifourteenpt{13.82}
\def\iseventeenpt{16.59}
\def\itwentypt{19.907}
\def\itwentyfourpt{23.89}
\def\itwentyninept{28.66}
\def\ithirtyfourpt{34.4}
\def\ifortyonept{41.28}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@setfontsize@parms}
% This routine is used in \SliTeX{} to interface font size setting
% it is modeled after the settings I found in \texttt{slides.sty}, so
% it probably needs an update. But any class is free to redefine
% it, as it is used only as an abbreviation.
% It's syntax is:
% \begin{quote}
% |\@setfontsize@parms| \\
% | |\meta{lineskip} \\
% | |\meta{parskip} \\
% | |\meta{abovedisplayskip} \\
% | |\meta{belowdisplayskip} \\
% | |\meta{abovedisplayshortskip} \\
% | |\meta{belowdisplayshortskip} \\
% | |\meta{strut ht} \meta{strut dp} (without pt)
% \end{quote}
%
% For NFSS1 a similar style existed which did run both with a
% \SliTeX{} with old font selection or with NFSS1. But when no
% separate format is made this doesn't make much sense.
% So the following note is history and would only be true if all NFSS
% stuff would be removed from the file and placed into the format.
% \begin{quote}\small
% Note: To interface the old \texttt{sfonts.tex} the \meta{size} must be
% hidden in commands denoting the size by its name prefixed with
% `i', i.e.\ 20pt size is called |\itwentypt| at this point. The
% NFSS interface will define those sizes to expand to the internal
% size, e.g.\ 20 but for the old sfonts the command name, e.g.
% |\itwentypt|, will be used to construct the name |\twentypt| etc.
%
% This is a crude interface to the old \texttt{sfonts.tex}. It will
% be a bit slower than the old one because it must define |\@tiny|
% etc.\ every time a size changes.
% \end{quote}
%
% If classes are set up that are only for use with NFSS then the second
% argument may be an ordinary font size!
% \changes{v2.0d}{1993/11/12}{Replaced all pt by \cs{p@}, corrected
% definition for \cs{tiny}.}
%
% \begin{macrocode}
\def\@setfontsize@parms#1#2#3#4#5#6#7#8{%
\lineskip #1\relax%
\parskip #2\relax
\abovedisplayskip #3\relax
\belowdisplayskip #4\relax
\abovedisplayshortskip #5\relax
\belowdisplayshortskip #6\relax
%
% \end{macrocode}
% I don't see a reason why the |\strutbox| has a dim different from
% |\baselineskip| but we will leave it for the moment
% \begin{macrocode}
\setbox\strutbox=\hbox{\vrule \@height#7\p@\@depth#8\p@\@width\z@}%
\baselineskip\baselinestretch\baselineskip
\normalbaselineskip\baselineskip}
% \end{macrocode}
% \end{macro}
%
% Setting size relations for math scripts:
% \changes{v2.2e}{1994/02/07}{Corrected entry for size 23.89.}
% \begin{macrocode}
\DeclareMathSizes{13.82}{13.82}{10}{7}
\DeclareMathSizes{16.59}{16.59}{12}{7}
\DeclareMathSizes{19.907}{19.907}{16.59}{13.82}
\DeclareMathSizes{23.89}{23.89}{19.907}{16.59}
\DeclareMathSizes{28.66}{28.66}{23.89}{19.907}
\DeclareMathSizes{34.4}{34.4}{28.66}{23.89}
\DeclareMathSizes{41.28}{41.28}{34.4}{28.66}
% \end{macrocode}
%
% \begin{macro}{\normalsize}
% \begin{macrocode}
\def\normalsize{%
\@setfontsize\normalsize\itwentypt{28\p@ plus3\p@ minus4\p@}%
% {20}{30\p@ plus3\p@ minus3\p@}% made a bit shorter
\@setfontsize@parms
{2pt}%
{30\p@ plus18\p@ minus9\p@}%
{15\p@ plus3\p@ minus3\p@}%
{10\p@ plus3\p@ minus3\p@}%
{10\p@ plus3\p@}
\abovedisplayshortskip
{17}{7}}
% \end{macrocode}
% \end{macro}
%
%
% We initially choose the normalsize font.
% \begin{macrocode}
\normalsize
% \end{macrocode}
%
% \begin{macro}{\small}
% \begin{macrocode}
\def\small{\@setfontsize\small\iseventeenpt{19\p@ plus3\p@ minus\p@}%
\@setfontsize@parms
{2\p@}%
{15\p@ plus15\p@ minus7\p@}%
{12\p@ plus3\p@ minus3\p@}%
{9\p@ plus3\p@ minus3\p@}%
{6\p@ plus3\p@}%
\abovedisplayshortskip
{13.5}{5.6}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footnotesize}
% \begin{macro}{\scriptsize}
% \begin{macrocode}
\let\footnotesize=\small
\let\scriptsize=\small
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\tiny}
% \begin{macrocode}
\def\tiny{\@setfontsize\tiny\ifourteenpt{16\p@ plus2\p@ minus\p@}%
\@setfontsize@parms
{2pt}%
{14\p@ plus3\p@ minus10\p@}%
{11\p@ plus3\p@ minus10\p@}%
\abovedisplayskip
{8\p@ plus3\p@ minus5\p@}%
{\z@ plus3\p@}%
{10}{4}}
% \end{macrocode}
% \end{macro}
%
% Actually copying the code above would be better because this would
% correct the error message. Maybe one should remove the first
% argument of |\set@font@size@parms|.
%
% \begin{macro}{\large}
% \begin{macro}{\Large}
% \begin{macro}{\LARGE}
% \begin{macro}{\huge}
% \begin{macro}{\Huge}
% \begin{macrocode}
\def\large{\@setfontsize\large\itwentyfourpt{42\p@ plus8\p@ minus5\p@}%
\@setfontsize@parms
{2\p@}%
{40\p@ plus20\p@ minus4\p@}%
{20\p@ plus8\p@ minus3\p@}%
\abovedisplayskip
{10\p@ plus5\p@}%
\abovedisplayshortskip
{20}{8.5}}
\def\Large{\@setfontsize\Large\itwentyninept{48\p@ plus10\p@ minus6\p@}%
\@setfontsize@parms
{2\p@}%
{48\p@ plus30\p@ minus6\p@}%
{24\p@ plus10\p@ minus6\p@}%
\abovedisplayskip
{12\p@ plus8\p@}%
\abovedisplayshortskip
{27}{11}}
\def\LARGE{\@setfontsize\LARGE\ithirtyfourpt{52\p@ plus10\p@ minus6\p@}%
\@setfontsize@parms
{2\p@}%
{52\p@ plus30\p@ minus6\p@}%
{24\p@ plus10\p@ minus6\p@}%
\abovedisplayskip
{12\p@ plus8\p@}%
\abovedisplayshortskip
{27}{11}}
\def\huge{\@setfontsize\huge\ifortyonept{60\p@ plus10\p@ minus6\p@}%
\@setfontsize@parms
{2\p@}%
{60\p@ plus30\p@ minus6\p@}%
{24\p@ plus10\p@ minus6\p@}%
\abovedisplayskip
{12\p@ plus8\p@}%
\abovedisplayshortskip
{27}{11}}
\let\Huge\huge
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Paragraphing}
%
% \begin{macro}{\baselinestretch}
% This is used as a multiplier for |\baselineskip|. The default is
% to {\em not\/} stretch the baselines.
% \begin{macrocode}
\renewcommand\baselinestretch{}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\parindent}
% |\parindent| is the width of the paragraph indentation.
% \begin{macrocode}
\setlength\parindent{\z@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@lowpenalty}
% \begin{macro}{\@medpenalty}
% \begin{macro}{\@highpenalty}%
% The commands |\nopagebreak| and |\nolinebreak| put in penalties
% to discourage these breaks at the point they are put in.
% They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
% dependent on their argument.
% \begin{macrocode}
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\clubpenalty}
% \begin{macro}{\widowpenalty}
% These penalties are use to discourage club and widow lines.
% Because we use their default values we only show them here,
% commented out.
% \begin{macrocode}
% \clubpenalty 150
% \widowpenalty 150
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\displaywidowpenalty}
% \begin{macro}{\predisplaypenalty}
% \begin{macro}{\postdisplaypenalty}
% Discourage (but not so much) widows in front of a math display
% and forbid breaking directly in front of a display. Allow break
% after a display without a penalty. Again the default values are
% used, therefore we only show them here.
% \begin{macrocode}
% \displaywidowpenalty 50
% \predisplaypenalty 10000
% \postdisplaypenalty 0
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\interlinepenalty}
% Allow the breaking of a page in the middle of a paragraph.
% \begin{macrocode}
% \interlinepenalty 0
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\brokenpenalty}
% We allow the breaking of a page after a hyphenated line.
% \begin{macrocode}
% \brokenpenalty 0
% \end{macrocode}
% \end{macro}
%
%
% \subsection{Page Layout}
%
% All margin dimensions are measured from a point one inch from the
% top and lefthand side of the page.
%
% \subsubsection{Vertical spacing}
%
% \begin{macro}{\headheight}
% \begin{macro}{\headsep}
% \begin{macro}{\topskip}
% The |\headheight| is the height of the box that will contain the
% running head. The |\headsep| is the distance between the bottom
% of the running head and the top of the text. |\topskip| is the
% |\baselineskip| for the first line on a page.
% \begin{macrocode}
\setlength\headheight{14\p@}
\setlength\headsep {15\p@}
\setlength\topskip {30\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\footskip}
% The distance from the baseline of the box which contains the
% running footer to the baseline of last line of text is controlled
% by the |\footskip|.
% Bottom of page:
% \begin{macrocode}
\setlength\footskip{25\p@} %
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\maxdepth}
% \begin{macro}{\@maxdepth}
% \changes{v2.3c}{1994/05/06}{Added setting of \cs{maxdepth} and
% \cs{@maxdepth}}
% The \TeX\ primitive register |\maxdepth| has a function that is
% similar to that of |\topskip|. The register |\@maxdepth| should
% always contain a copy of |\maxdepth|. In both plain \TeX\ and
% \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in
% native \LaTeX2e\ mode we let the value depend on the typesize. We
% set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times
% 1.5$. As it happens, in these classes |\topskip| is equal to the
% typesize, therefor we set |\maxdepth| to half the value of
% |\topskip|.
% \begin{macrocode}
\if@compatibility
\setlength\maxdepth{4\p@}
\else
\setlength\maxdepth{.5\topskip}
\fi
\setlength\@maxdepth\maxdepth
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{The dimension of text}
%
% \begin{macro}{\textwidth}
% When we are in compatibility mode we have to make sure that the
% dimensions of the printed area are not different from what the
% user was used to see.
%
% \begin{macrocode}
\if@compatibility
\setlength\textwidth{460\p@}
% \end{macrocode}
% When we are not in compatibility mode we can set some of the
% dimensions differently, taking into account the paper size for
% instance.
% \begin{macrocode}
\else
% \end{macrocode}
% First, we calculate the maximum textwidth, which depends on the
% papersize. Then we calculate the approximate length of 65
% characters, which should be the maximum length of a line of text.
% The calculated values are stored in |\@tempdima| and |\@tempdimb|.
% \begin{macrocode}
\setlength\@tempdima{\paperwidth}
\addtolength\@tempdima{-2in}
\setbox\@tempboxa\hbox{\rmfamily im}
\setlength\@tempdimb{.5\wd\@tempboxa}
\setlength\@tempdimb{65\@tempdimb}
% \end{macrocode}
%
% Now we can set the |\textwidth|, depending on whether we will be
% setting one or two columns.
%
% The text should not be wider than the minimum
% of the paperwidth (minus 2 inches for the margins) and the
% maximum length of a line as defined by the number of characters.
% \begin{macrocode}
\ifdim\@tempdima>\@tempdimb\relax
\setlength\textwidth{\@tempdimb}
\else
\setlength\textwidth{\@tempdima}
\fi
\fi
% \end{macrocode}
%
% Here we modify the width of the text a little to be a whole
% number of points.
% \begin{macrocode}
\@settopoint\textwidth
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\columnwidth}
% \begin{macro}{\columnsep}
% \begin{macro}{\columnseprule}
% \begin{macrocode}
\columnwidth \textwidth
\columnsep 10pt
\columnseprule \z@
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\textheight}
% Now that we have computed the width of the text, we have to take
% care of the height. The |\textheight| is the height of text
% (including footnotes and figures, excluding running head and
% foot).
%
% First make sure that the compatibility mode gets the same
% dimensions as we had with \LaTeX2.09. The number of lines was
% calculated as the floor of the old |\textheight| minus
% |\topskip|, divided by |\baselineskip| for |\normalsize|. The
% old value of |\textheight| was 528pt.
%
% \begin{macrocode}
\if@compatibility
\setlength\textheight{600\p@}
% \end{macrocode}
%
% Again we compute this, depending on the papersize and depending
% on the baselineskip that is used, in order to have a whole number
% of lines on the page.
% \begin{macrocode}
\else
\setlength\@tempdima{\paperheight}
% \end{macrocode}
%
% We leave at least a 1 inch margin on the top and the bottom of
% the page.
% \begin{macrocode}
\addtolength\@tempdima{-2in}
% \end{macrocode}
%
% We also have to leave room for the running headers and footers.
% \begin{macrocode}
\addtolength\@tempdima{-1in}
% \end{macrocode}
%
% Then we divide the result by the current |\baselineskip| and
% store this in the count register |\@tempcnta|, which then
% contains the number of lines that fit on this page.
% \begin{macrocode}
\divide\@tempdima\baselineskip
\@tempcnta=\@tempdima
% \end{macrocode}
%
% From this we can calculate the height of the text.
% \begin{macrocode}
\setlength\textheight{\@tempcnta\baselineskip}
\fi
% \end{macrocode}
%
% The first line on the page has a height of |\topskip|.
% \begin{macrocode}
\advance\textheight by \topskip
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Margins}
%
% \begin{macro}{\oddsidemargin}
% \begin{macro}{\evensidemargin}
% \begin{macro}{\marginparwidth}
% First we give the values for the compatibility mode.
%
% Values for two-sided printing:
% \begin{macrocode}
\if@compatibility
\setlength\oddsidemargin {17\p@}
\setlength\evensidemargin {17\p@}
\setlength\marginparwidth {20\p@}
\else
% \end{macrocode}
%
% When we are not in compatibility mode we can take the dimensions
% of the selected paper into account.
%
% We center the text on the page, by
% calculating the difference between |textwidth| and
% |\paperwidth|$-$|2in|. Half of that difference is then used for
% the margin. The amount of space that can be used for marginal
% notes is at least 0.8~inch, to which we add any `leftover' space.
% \begin{macrocode}
\setlength\@tempdima {\paperwidth}
\addtolength\@tempdima {-2in}
\addtolength\@tempdima {-\textwidth}
\setlength\oddsidemargin {.5\@tempdima}
\setlength\marginparwidth {.8in}
\addtolength\marginparwidth {.5\@tempdima}
% \end{macrocode}
%
% The |\evensidemargin| can now be computed from the values set
% above.
% \begin{macrocode}
\setlength\evensidemargin {\paperwidth}
\addtolength\evensidemargin{-2in}
\addtolength\evensidemargin{-\textwidth}
\addtolength\evensidemargin{-\oddsidemargin}
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\marginparsep}
% \begin{macro}{\marginparpush}
% The horizontal space between the main text and marginal notes is
% determined by |\marginparsep|, the minimum vertical separation
% between two marginal notes is controlled by |\marginparpush|.
% \begin{macrocode}
\setlength\marginparsep {5\p@}
\setlength\marginparpush{5\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\topmargin}
% The |\topmargin| is the distance between the top of `the
% printable area' --which is 1 inch below the top of the paper--
% and the top of the box which contains the running head.
%
% It can now be computed from the values set above.
% \begin{macrocode}
\if@compatibility
\setlength\topmargin{-10pt}
\else
\setlength\topmargin{\paperheight}
\addtolength\topmargin{-2in}
\addtolength\topmargin{-\headheight}
\addtolength\topmargin{-\headsep}
\addtolength\topmargin{-\textheight}
\addtolength\topmargin{-\footskip} % this might be wrong!
% \end{macrocode}
% By changing the factor in the next line the complete page