[latex3-commits] [git/LaTeX3-latex3-latex2e] gh314: Update classes.dtx to correct the indentation of the code in some cases (04b539d3)

Johannes Braams texniek at braams.xs4all.nl
Fri Apr 10 15:09:31 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh314
Link       : https://github.com/latex3/latex2e/commit/04b539d38dcfcf91de1aa7ca09af1a0d41eab002

>---------------------------------------------------------------

commit 04b539d38dcfcf91de1aa7ca09af1a0d41eab002
Author: Johannes Braams <texniek at braams.xs4all.nl>
Date:   Fri Apr 10 15:09:31 2020 +0200

    Update classes.dtx to correct the indentation of the code in some cases


>---------------------------------------------------------------

04b539d38dcfcf91de1aa7ca09af1a0d41eab002
 base/classes.dtx | 133 ++++++++++++++++++++++++++++---------------------------
 1 file changed, 67 insertions(+), 66 deletions(-)

diff --git a/base/classes.dtx b/base/classes.dtx
index ea3b014c..40b330f3 100644
--- a/base/classes.dtx
+++ b/base/classes.dtx
@@ -53,7 +53,7 @@
 %<*driver>
 \ProvidesFile{classes.drv}
 %</driver>
-              [2019/12/20 v1.4l
+              [2020/04/10 v1.4m
 %<article|report|book> Standard LaTeX document class]
 %<10pt|11pt|12pt>      Standard LaTeX file (size option)]
 %    \end{macrocode}
@@ -214,6 +214,7 @@
 %    options that are new in \LaTeXe.}
 % \changes{v1.3v}{1997/06/16}{Documentation fixes.}
 % \changes{v1.4j}{2019/08/27}{Various commands made robust}
+% \changes{v1.4m}{2020/04/10}{(JLB) prettyprinting the code}
 %
 %
 % \title{Standard Document Classes for \LaTeX{} version 2e\thanks{This
@@ -322,34 +323,34 @@
 % \changes{v1.0g}{1993/12/09}{Removed typo, A4 is not 279 mm high}
 %    \begin{macrocode}
 \if at compatibility\else
-\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}}
+  \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}}
+  \DeclareOption{landscape}
+     {\setlength\@tempdima   {\paperheight}%
+      \setlength\paperheight {\paperwidth}%
+      \setlength\paperwidth  {\@tempdima}}
 \fi
 %    \end{macrocode}
 %
@@ -368,7 +369,7 @@
 \if at compatibility
   \renewcommand\@ptsize{0}
 \else
-\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
+  \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
 \fi
 \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
 \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
@@ -382,7 +383,7 @@
 %    paragraphs into the outside margin.
 %    \begin{macrocode}
 \if at compatibility\else
-\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
+  \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
 \fi
 \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
 %    \end{macrocode}
@@ -395,7 +396,7 @@
 %    \begin{macrocode}
 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
 \if at compatibility\else
-\DeclareOption{final}{\setlength\overfullrule{0pt}}
+  \DeclareOption{final}{\setlength\overfullrule{0pt}}
 \fi
 %    \end{macrocode}
 %
@@ -405,7 +406,7 @@
 %    \begin{macrocode}
 \DeclareOption{titlepage}{\@titlepagetrue}
 \if at compatibility\else
-\DeclareOption{notitlepage}{\@titlepagefalse}
+  \DeclareOption{notitlepage}{\@titlepagefalse}
 \fi
 %    \end{macrocode}
 %
@@ -427,7 +428,7 @@
 %    Two-column and one-column printing is again realized via a switch.
 %    \begin{macrocode}
 \if at compatibility\else
-\DeclareOption{onecolumn}{\@twocolumnfalse}
+  \DeclareOption{onecolumn}{\@twocolumnfalse}
 \fi
 \DeclareOption{twocolumn}{\@twocolumntrue}
 %    \end{macrocode}
@@ -468,7 +469,7 @@
 %    First some hook into the bibliography environment is filled.
 %    \begin{macrocode}
   \AtEndOfPackage{%
-   \renewcommand\@openbib at code{%
+    \renewcommand\@openbib at code{%
       \advance\leftmargin\bibindent
       \itemindent -\bibindent
       \listparindent \itemindent
@@ -477,7 +478,7 @@
 %    \end{macrocode}
 %    In addition the definition of |\newblock| is overwritten.
 %    \begin{macrocode}
-   \renewcommand\newblock{\par}}%
+    \renewcommand\newblock{\par}}%
 }
 %    \end{macrocode}
 %
@@ -950,7 +951,7 @@
 %    |\topskip|.
 %    \begin{macrocode}
 \if at compatibility \setlength\maxdepth{4\p@} \else
-\setlength\maxdepth{.5\topskip} \fi
+  \setlength\maxdepth{.5\topskip} \fi
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1106,7 +1107,7 @@
 %    between two marginal notes is controlled by |\marginparpush|.
 %    \begin{macrocode}
 \if at twocolumn
- \setlength\marginparsep {10\p@}
+  \setlength\marginparsep {10\p@}
 \else
 %<10pt&!bk>  \setlength\marginparsep{11\p@}
 %<11pt&!bk>  \setlength\marginparsep{10\p@}
@@ -1801,7 +1802,7 @@
 % \changes{v1.3o}{1995/11/02}{(CAR) Make \cs{footnote} always work in
 %      title, etc}
 %    \begin{macrocode}
-  \if at titlepage
+\if at titlepage
   \newcommand\maketitle{\begin{titlepage}%
   \let\footnotesize\small
   \let\footnoterule\relax
@@ -1867,7 +1868,7 @@
   \global\let\author\relax
   \global\let\date\relax
   \global\let\and\relax
-}
+  }
 %    \end{macrocode}
 %    When the title is not on a page of its own, the layout of the
 %    title is a little different. We use symbols to mark the footnotes
@@ -1884,12 +1885,12 @@
 %    \cs{@makefntext} to a) work and b) without using math}
 %    \begin{macrocode}
 \else
-\newcommand\maketitle{\par
-  \begingroup
-    \renewcommand\thefootnote{\@fnsymbol\c at footnote}%
-    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
-    \long\def\@makefntext##1{\parindent 1em\noindent
-            \hb at xt@1.8em{%
+  \newcommand\maketitle{\par
+    \begingroup
+      \renewcommand\thefootnote{\@fnsymbol\c at footnote}%
+      \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+      \long\def\@makefntext##1{\parindent 1em\noindent
+              \hb at xt@1.8em{%
                 \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
 %    \end{macrocode}
 %    If this is a twocolumn document we start a new page in twocolumn
@@ -1899,27 +1900,27 @@
 % \changes{v1.2k}{1994/05/06}{Added check on number of columns in use
 %    locally}
 %    \begin{macrocode}
-    \if at twocolumn
-      \ifnum \col at number=\@ne
-        \@maketitle
+      \if at twocolumn
+        \ifnum \col at number=\@ne
+          \@maketitle
+        \else
+          \twocolumn[\@maketitle]%
+        \fi
       \else
-        \twocolumn[\@maketitle]%
-      \fi
-    \else
 %    \end{macrocode}
 %    When this is not a twocolumn document we just start a new page,
 %    prevent floating objects from appearing on the top of this page
 %    and print the title information.
 %    \begin{macrocode}
       \newpage
-      \global\@topnum\z@   % Prevents figures from going at top of page.
-      \@maketitle
-    \fi
+        \global\@topnum\z@   % Prevents figures from going at top of page.
+        \@maketitle
+      \fi
 %    \end{macrocode}
 %    This page gets a \pstyle{plain} layout. We call |\@thanks| to
 %    produce the footnotes.
 %    \begin{macrocode}
-    \thispagestyle{plain}\@thanks
+      \thispagestyle{plain}\@thanks
 %    \end{macrocode}
 %    Now we can close the group, reset the \Lcount{footnote} counter,
 %    disable |\thanks|, |\maketitle| and |\@maketitle| and save some
@@ -1928,20 +1929,20 @@
 % \changes{v1.3k}{1995/08/27}{Disable \cs{title} and similar decls}
 % \changes{v1.3n}{1995/10/29}{Empty \cs{@date} as well}
 %    \begin{macrocode}
-  \endgroup
-  \setcounter{footnote}{0}%
-  \global\let\thanks\relax
-  \global\let\maketitle\relax
-  \global\let\@maketitle\relax
-  \global\let\@thanks\@empty
-  \global\let\@author\@empty
-  \global\let\@date\@empty
-  \global\let\@title\@empty
-  \global\let\title\relax
-  \global\let\author\relax
-  \global\let\date\relax
-  \global\let\and\relax
-}
+    \endgroup
+    \setcounter{footnote}{0}%
+    \global\let\thanks\relax
+    \global\let\maketitle\relax
+    \global\let\@maketitle\relax
+    \global\let\@thanks\@empty
+    \global\let\@author\@empty
+    \global\let\@date\@empty
+    \global\let\@title\@empty
+    \global\let\title\relax
+    \global\let\author\relax
+    \global\let\date\relax
+    \global\let\and\relax
+  }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3144,7 +3145,7 @@
 %    First we do give the definition for compatibility mode.
 %    \begin{macrocode}
 \if at compatibility
-\newenvironment{titlepage}
+  \newenvironment{titlepage}
     {%
 %<book>      \cleardoublepage
       \if at twocolumn
@@ -3162,7 +3163,7 @@
 %    And here is the one for native \LaTeXe{}.
 %    \begin{macrocode}
 \else
-\newenvironment{titlepage}
+  \newenvironment{titlepage}
     {%
 %<book>      \cleardoublepage
       \if at twocolumn





More information about the latex3-commits mailing list.