Transcription of Standard Document Classes for LaTeX version 2e
1 Standard Document Classes for LaTeX version 2e Copyright (C) 1992 by Leslie LamportCopyright (C) 1994-2021 by Frank Mittelbach,Johannes Braams and the LaTeX Project Team2021/10/04 This file is maintained by the LaTeX Project reports can be opened (categorylatex) Thedocstripmodules32 Initial Code33 Declaration of Setting Paper Sizes .. Choosing the type size .. Two-side or one-side printing .. Draft option .. Titlepage option .. openright option .. Two-column printing .. Equation numbering on the left .. Flush left displays .. Open bibliography ..64 Executing Options65 Loading Packages76 Document Fonts.
2 Paragraphing .. Page Layout .. spacing .. dimension of text ..14 This file has version number , last revised 2021/10 .. placement parameters .. Page Styles .. conventions .. the page styles ..207 Document The title .. Chapters and Sections .. blocks .. commands .. Counters .. Matter, Main Matter, and Back Matter .. level headings .. Lists .. List Parameters .. Defining new environments .. Setting parameters for existing environments .. and tabular .. boxes .. and eqnarray .. Floating objects .. Font changing ..448 Cross Table of Contents, etc.
3 Of Contents .. of figures .. of tables .. Bibliography .. The index .. Footnotes ..5229 Words .. Date .. Two-column mode .. The page style .. Single or double sided printing ..541 ThedocstripmodulesThe following modules are used in the implementation to directdocstripingenerating the external files:articleproduce the documentclass articlereportproduce the documentclass reportsize10produce the class option for 10ptsize11produce the class option for 11ptsize12produce the class option for 12ptbookproduce the documentclass bookbk10produce the book class option for 10ptbk11produce the book class option for 11ptbk12produce the book class option for 12ptdriverproduce a documentation driver file2 Initial CodeIn this part we define a few commands that are used later on.
4 \@ptsizeThis control sequence is used to store the second digit of the pointsize we aretypesetting in. So, normally, it s value is one of 0, 1 or *article|report|book 2\newcommand\@ptsize{}\if@restonecolWhen the Document has to be printed in two columns, we sometimes have totemporarily switch to one column. This switch is used to remember to \newif\if@restonecol\if@titlepageA switch to indicate if a titlepage has to be produced. For the article documentclass the default is not to make a separate \newif\if@titlepage5 article \@titlepagefalse6 !article \@titlepagetrue\if@openrightA switch to indicate if chapters must start on a right-hand page.
5 The default forthe report class is no; for the book class it s !article \newif\if@openright\if@mainmatterThe switch\if@mainmatter, only available in the Document class book, indicateswhether we are processing the main material in the book \newif\if@mainmatter \@mainmattertrue33 Declaration of Setting Paper SizesThe variables\paperwidthand\paperheightshoul d reflect the physical papersize after trimming. For desk printer output this is usually the real paper sizesince there is no post-processing. Classes for real book production will probablyadd other paper sizes and additionally the production of crop marks for compatibility mode, these (and some of the subsequent)
6 Options are disabled,as they were not present in \if@compatibility\else10\DeclareOption{a 4paper}11{\setlength\paperheight {297mm}%12\setlength\paperwidth {210mm}}13\DeclareOption{a5paper}14{\set length\paperheight {210mm}%15\setlength\paperwidth {148mm}}16\DeclareOption{b5paper}17{\set length\paperheight {250mm}%18\setlength\paperwidth {176mm}}19\DeclareOption{letterpaper}20{ \setlength\paperheight {11in}%21\setlength\paperwidth { }}22\DeclareOption{legalpaper}23{\setlen gth\paperheight {14in}%24\setlength\paperwidth { }}25\DeclareOption{executivepaper}26{\se tlength\paperheight { }%27\setlength\paperwidth { }}The
7 Optionlandscapeswitches the values of\paperheightand\paperwidth,assuming the dimensions were given for portrait \DeclareOption{landscape}29{\setlength\@ tempdima {\paperheight}%30\setlength\paperheight {\paperwidth}%31\setlength\paperwidth Choosing the type sizeThe type size options are handled by defining\@ptsizeto contain the last digitof the size in question and branching on\ifcasestatements. This is done forhistorical reasons to stay compatible with other packages that use the\@ptsizevariable to select special actions. It makes the declarations of size options lessthan 10pt difficult.}
8 Although one can probably use9and8assuming that a classwont define \if@compatibility34\renewcommand\@ptsize {0}35\else36\DeclareOption{10pt}{\renewc ommand\@ptsize{0}}37\fi38\DeclareOption{ 11pt}{\renewcommand\@ Two-side or one-side printingFor two-sided printing we use the In addition we have to setthe\if@mparswitchto get any margin paragraphs into the outside \if@compatibility\else41\DeclareOption{o neside}{\@twosidefalse \@mparswitchfalse}42\fi43\DeclareOption{ twoside}{\@twosidetrue Draft optionIf the user requestsdraftwe show any overfull boxes. We could probably add somemore interesting stuff to this Titlepage optionAn article usually has no separate titlepage, but the user can request \DeclareOption{titlepage}{\@titlepagetru e}49\if@ openright optionThis option determines whether or not a chapter must start on a right-hand pagerequest !}}
9 Article \if@compatibility53 book \@openrighttrue54 !article \else55 !article \DeclareOption{openright}{\@openrighttru e}56 !article \DeclareOption{openany}{\@openrightfalse }57 !article \ Two-column printingTwo-column and one-column printing is again realized via a \if@compatibility\else59\DeclareOption{o necolumn}{\@ Equation numbering on the leftThe optionleqnocan be used to get the equation numbers on the left side of theequation. It loads code which is generated automatically from the kernel fileswhen the format is built. If the equation number does get a special formatting5then instead of using the kernel file the class would need to provide the \DeclareOption{leqno}{\input{ }} Flush left displaysThe optionfleqnredefines the displayed math environments in such a way thatthey come out flush left, with an indentation of\mathindentfrom the prevailingleft margin.}
10 It loads code which is generated automatically from the kernel fileswhen the format is \DeclareOption{fleqn}{\input{ }} Open bibliographyThe optionopenbibproduces the open bibliography style, in which each blockstarts on a new line, and succeeding lines in a block are indented by\ \DeclareOption{openbib}{%First some hook into the bibliography environment is \AtEndOfPackage{%66\renewcommand\@openbi b@code{%67\advance\leftmargin\bibindent6 8\itemindent -\bibindent69\listparindent \itemindent70\parsep \z@71}%In addition the definition of\newblockis \renewcommand\newblock{\par}}%73}4 Executing OptionsHere we execute the default options to initialize certain variables.