strayman.dtx: Switch to an article structure for the documentation.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 7 Sep 2020 13:33:17 +0000 (14:33 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 7 Sep 2020 16:47:49 +0000 (17:47 +0100)
strayman.dtx

index 0ba5069..8796d2c 100644 (file)
@@ -46,7 +46,7 @@
 % \begin{meta-comment} <driver>
 %
 %<*driver>
-\documentclass[10pt,a4paper,book]{strayman}
+\documentclass[10pt,a4paper,article]{strayman}
 \input{mdwtools}
 \usepackage{mdwlist}
 \describesclass{strayman}
@@ -62,7 +62,7 @@
 %
 % \end{meta-comment}
 %
-% \chapter{About the \strayman\ document class}
+% \section{About the \strayman\ document class}
 %
 % The standard \LaTeX\ document classes are all very well for simple
 % documents, but the style isn't appropriate for works like manuals.
@@ -74,7 +74,7 @@
 % than I can describe it.
 %
 %
-% \section{Document class options}
+% \subsection{Document class options}
 %
 % The document class provides many options, most of which are taken from
 % the standard \LaTeX\ classes.
 % \end{description}
 %
 %
-% \section{The \texttt{text} option}
+% \subsection{The \texttt{text} option}
 %
 % In order to facilitate creation of attractively formatted text files
 % from \LaTeX\ documents, \strayman\ provides a |text| option.  This will
 % otherwise.
 %
 %
-% \section{That's it}
+% \subsection{That's it}
 %
 % That's all I'm writing for now.  It's a document class.  It defines the
 % style.  What more do you expect?
 %
 % \implementation
 %
-% \chapter{Implementation}
+% \section{Implementation}
 %
-% \section{Options handling}
+% \subsection{Options handling}
 %
 % From here on, a lot of the code is shamelessly borrowed from
 % \file{book.cls} and other places.  This is what code re-use is for.
 % altering our own internal arguments, or loading other packages as
 % appropriate.
 %
-% \subsection{Set up some defaults}
+% \subsubsection{Set up some defaults}
 %
 % We create some variables to hold the settings, and initialise them to
 % sensible values.
 }
 %    \end{macrocode}
 %
-% \subsection{Declare the options we support}
+% \subsubsection{Declare the options we support}
 %
 % This is just a tedious list of all the options.
 %
 \DeclareOption{nohyperref}{\@hyperreffalse}
 %    \end{macrocode}
 %
-% \subsection{Set up the options}
+% \subsubsection{Set up the options}
 %
 % We set up some default options, and then read the user's.
 %
 \fi
 %    \end{macrocode}
 %
-% \subsection{Read in the text size option}
+% \subsubsection{Read in the text size option}
 %
 % The text sizing is rather messy.  We store this in a separate file.  To
 % keep this stuff away from other classes, we use the file \emph{extension}
 %</strayman>
 %    \end{macrocode}
 %
-% \section{Package loading}
+% \subsection{Package loading}
 %
 %    \begin{macrocode}
 %<*strayman>
 %</strayman>
 %    \end{macrocode}
 %
-% \section{Page layout}
+% \subsection{Page layout}
 %
 % This is largely the domain of the size option files.
 %
 %<+text>\ProvidesFile{strayman.text}
 %    \end{macrocode}
 %
-% \subsection{Font sizes}
+% \subsubsection{Font sizes}
 %
 % These are fairly standard, and mainly copied from the original size
 % options.
 %</8pt|9pt|10pt|11pt|12pt|text>
 %    \end{macrocode}
 %
-% \subsection{Paragraph layout}
+% \subsubsection{Paragraph layout}
 %
 % Here we define various paragraph layout parameters.
 %
 %</strayman>
 %    \end{macrocode}
 %
-% \subsection{Page layout}
+% \subsubsection{Page layout}
 %
 % Our layout is a bit different to the standard \LaTeX\ ones: we leave a lot
 % of space down the left hand side: this is reserved for headings and
 %</8pt|9pt|10pt|11pt|12pt|text>
 %    \end{macrocode}
 %
-% \subsection{Float placement}
+% \subsubsection{Float placement}
 %
 % First, we determine how we position the floats on the page.
 %
 %</8pt|9pt|10pt|11pt|12pt>
 %    \end{macrocode}
 %
-% \section{Headers and footers}
+% \subsection{Headers and footers}
 %
 % This part defines the standard page styles.  By default, \strayman\
 % imports \package{fancyheadings} and uses them, although this section is
 }
 %    \end{macrocode}
 %
-% \section{Titles}
+% \subsection{Titles}
 %
 % \begin{macro}{\maketitle}
 % This is a bit of a thorny issue at the moment.  Really, these titles need
 %    \end{macrocode}
 % \end{macro}
 %
-% \section{Sectioning commands}
+% \subsection{Sectioning commands}
 %
 % In \strayman, quite a lot of the sectioning is different.  We
 % don't tend to number sections much.  Also, the chapter heading style has
 % been completely rewritten (several times).
 %
-% \subsection{Setting up the counters}
+% \subsubsection{Setting up the counters}
 %
 % This is pretty simple stuff.
 %
 \renewcommand\thesubparagraph  {\theparagraph.\arabic{subparagraph}}
 %    \end{macrocode}
 %
-% \subsection{Frontmatter, mainmatter and backmatter}
+% \subsubsection{Frontmatter, mainmatter and backmatter}
 %
 % We start off thinking we're in the main matter.  The user ought to put a
 % |\frontmatter| command at the beginning of the document if this is not
 \fi
 %    \end{macrocode}
 %
-% \subsection{Abstracts}
+% \subsubsection{Abstracts}
 %
 % \begin{environment}{abstract}
 %
 %    \end{macrocode}
 % \end{environment}
 %
-% \subsection{Appendices}
+% \subsubsection{Appendices}
 %
 % \begin{macro}{\appendix}
 %
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Parts}
+% \subsubsection{Parts}
 %
 % Part headings are typeset on completely unadorned sheets, devoid of page
 % numbers and suchlike.  Because of the strange page layout, we have to
 % \end{macro}
 % \end{macro}
 %
-% \subsection{Chapters}
+% \subsubsection{Chapters}
 %
 % The chapter typesetting has been more-or-less rewritten.  We'll follow this
 % in a reasonable amount of detail.
 % \end{macro}
 % \end{macro}
 %
-% \subsection{The other sectioning commands}
+% \subsubsection{The other sectioning commands}
 %
 % These are all defined through |\@startsection|.  They've been modified
 % to typeset sections and subsections hanging into the left margin, and to
 \fi
 %    \end{macrocode}
 %
-% \subsection{Section number formatting}
+% \subsubsection{Section number formatting}
 %
 % \begin{macro}{\@seccntformat}
 %
   \llap{\csname the#1\endcsname{\normalsize\quad}\hfil}%
 }
 %
-% \subsection{Top level sectioning}
+% \subsubsection{Top level sectioning}
 %
 % \begin{macro}{\@topsect}
 %
 % \end{macro}
 %
 %
-% \section{List handling}
+% \subsection{List handling}
 %
 % A surprising number of \LaTeX's environments are defined in terms of
 % lists, many of which hide the fact by putting the entire text in one big
 % This is largely the same as the standard classes, altered slightly to cope
 % with the different paragraph spacing.
 %
-% \subsection{General list parameters}
+% \subsubsection{General list parameters}
 %
 % Default left margins for lists:
 %
 }
 %    \end{macrocode}
 %
-% \subsection{Numbering things}
+% \subsubsection{Numbering things}
 %
 % \begin{macro}{\numberwithin}
 %
 %
 % \end{macro}
 %
-% \subsection{Enumerated lists}
+% \subsubsection{Enumerated lists}
 %
 % We busily redefine all the counters for enumerated lists, and how to
 % typeset them.
 \renewcommand\p@enumiv{\p@enumiii\theenumiii}
 %    \end{macrocode}
 %
-% \subsection{Itemized lists}
+% \subsubsection{Itemized lists}
 %
 % We set up the various bullet shapes for the itemized lists.
 %
 \newcommand\labelitemiv{$\m@th\cdot$}
 %    \end{macrocode}
 %
-% \subsection{Description lists}
+% \subsubsection{Description lists}
 %
 % This has been redefined a little to make it more sensible.  The old version
 % had a weird |\hspace\labelsep| in the labelling macro.  This has now been
 % \end{macro}
 % \end{environment}
 %
-% \subsection{Other list-based environments}
+% \subsubsection{Other list-based environments}
 %
 % Several other standard environments are defined in terms of lists.  These
 % are all dealt with here.
 %
 % And some quick hacking of the theorem environment.
 %
-% \section{Other parameters}
+% \subsection{Other parameters}
 %
 % We define some miscellaneous parameters for standard environments.
 %
 \fi
 %    \end{macrocode}
 %
-% \section{Floats}
+% \subsection{Floats}
 %
 % Since raw \LaTeX\ doesn't actually define any floating objects, we have
 % to do some of the work here.  This isn't actually terribly arduous.  For
 % We must also define |\@makecaption|, which typesets a float caption in
 % an appropriate way, and an environment for each type of float.
 %
-% \subsection{Figures}
+% \subsubsection{Figures}
 %
 % This is all fairly straightforward stuff.  First, we create a counter for
 % figures:
 % \end{environment}
 % \end{environment}
 %
-% \subsection{Tables}
+% \subsubsection{Tables}
 %
 % This is pretty similar to the figure handling.
 %
 \newenvironment{table*}{\@dblfloat{table}}{\end@dblfloat}
 %    \end{macrocode}
 %
-% \subsection{Other float parameters}
+% \subsubsection{Other float parameters}
 %
 % \begin{macro}{\@makecaption}
 %
 %    \end{macrocode}
 % \end{macro}
 %
-% \section{Font commands}
+% \subsection{Font commands}
 %
 % We allow the `old' font commands to do sensible \textsf{NFSS} things, since
 % we don't have any legacy documents.  This means that we have proper
 \DeclareRobustCommand\pmit{\@fontswitch{\relax}{\mathnormal}}
 %    \end{macrocode}
 %
-% \section{Tables of contents}
+% \subsection{Tables of contents}
 %
 % This section deals with tables of contents, and lists of figures.
 %
-% \subsection{Contents}
+% \subsubsection{Contents}
 %
 % First, we have to define some parameters.
 %
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Lists of figures and tables}
+% \subsubsection{Lists of figures and tables}
 %
 % These macros are terribly similar to the other ones.
 %
 \let\l@table\l@figure
 %    \end{macrocode}
 %
-% \section{Bibliography}
+% \subsection{Bibliography}
 %
 % This isn't actually terribly interesting.
 %
 %    \end{macrocode}
 % \end{environment}
 %
-% \section{Index}
+% \subsection{Index}
 %
 % Defines the \env{theindex} environment.
 %
 \def\Index#1{#1\index{#1}}
 %    \end{macrocode}
 %
-% \section{Footnotes}
+% \subsection{Footnotes}
 %
 % \begin{macro}{\footnoterule}
 %
 %    \end{macrocode}
 % \end{macro}
 %
-% \section{Tidying up}
+% \subsection{Tidying up}
 %
 % This section gathers together various other useful bits of standard
 % document class setting.
 %
-% \subsection{Item names}
+% \subsubsection{Item names}
 %
 % These commands typeset bits of text.  They can then be redefined by
 % \package{babel} and suchlike.
   \space\number\year}
 %    \end{macrocode}
 %
-% \subsection{Final fiddling for two columns}
+% \subsubsection{Final fiddling for two columns}
 %
 %    \begin{macrocode}
 \columnsep10\p@
 \fi
 %    \end{macrocode}
 %
-% \section{The \protect\env{central} environment}
+% \subsection{The \protect\env{central} environment}
 %
 % Because of the strange layout of the pages, text which is centred using
 % normal \LaTeX\ commands is centred in the text area, not on the page,
 %    \end{macrocode}
 % \end{environment}
 %
-% \section{Headers and footers}
+% \subsection{Headers and footers}
 %
 % The \strayman\ class uses \package{fancyheadings} for its headers
 % and footers.  This has already been included in the preamble.  We now
 \pagestyle{headings}
 %    \end{macrocode}
 %
-% \section{Parbox alteration}
+% \subsection{Parbox alteration}
 %
 % The standard \LaTeX\ |\parbox| command, and the \env{minipage} environment,
 % reset |\parskip| to zero, which is inconsistent with the document style.
 %    \end{macrocode}
 %
 %
-% \section{Other features}
+% \subsection{Other features}
 %
 % At the end is a miscellany of useful features.
 %
-% \subsection{Other typesetting conventions}
+% \subsubsection{Other typesetting conventions}
 %
 % Some items need typesetting in particular ways.
 %
 \def\file#1{\mbox{\itshape #1\/}}
 %    \end{macrocode}
 %
-% \subsection{And finally}
+% \subsubsection{And finally}
 %
 %    \begin{macrocode}
 \sloppy