| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 1993-2025 |
| 4 |
% The LaTeX Project and any individual authors listed elsewhere |
| 5 |
% in this file. |
| 6 |
% |
| 7 |
% This file is part of the LaTeX base system. |
| 8 |
% ------------------------------------------- |
| 9 |
% |
| 10 |
% It may be distributed and/or modified under the |
| 11 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 12 |
% of this license or (at your option) any later version. |
| 13 |
% The latest version of this license is in |
| 14 |
% https://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 16 |
% version 2008 or later. |
| 17 |
% |
| 18 |
% This file has the LPPL maintenance status "maintained". |
| 19 |
% |
| 20 |
% The list of all files belonging to the LaTeX base distribution is |
| 21 |
% given in the file `manifest.txt'. See also `legal.txt' for additional |
| 22 |
% information. |
| 23 |
% |
| 24 |
% The list of derived (unpacked) files belonging to the distribution |
| 25 |
% and covered by LPPL is defined by the unpacking scripts (with |
| 26 |
% extension .ins) which are part of the distribution. |
| 27 |
% |
| 28 |
% \fi |
| 29 |
% Filename: ltxguide.cls |
| 30 |
% Author: Alan Jeffrey |
| 31 |
% Version: 0.14 1999/03/06 |
| 32 |
|
| 33 |
% This is the document class for the LaTeX guides `LaTeX2e for authors' |
| 34 |
% and `LaTeX2e for class and package writers'. The changes log is at |
| 35 |
% the end of the file. |
| 36 |
|
| 37 |
% Copyright 1994-1999 Alan Jeffrey and the LaTeX Project. |
| 38 |
|
| 39 |
% This is a LaTeX2e document class. |
| 40 |
|
| 41 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 42 |
\ProvidesClass{ltxguide}[2001/05/28 Standard LaTeX class] |
| 43 |
|
| 44 |
% Input any local configuration file. |
| 45 |
|
| 46 |
\InputIfFileExists{ltxguide.cfg} |
| 47 |
{\typeout {**********************************************^^J% |
| 48 |
* Local configuration file ltxguide.cfg used *^^J% |
| 49 |
**********************************************}} |
| 50 |
{\ClassInfo{ltxguide}{Local configuration file not found}} |
| 51 |
|
| 52 |
% All options are passed to the article class. |
| 53 |
|
| 54 |
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} |
| 55 |
\ProcessOptions |
| 56 |
\LoadClass{article} |
| 57 |
|
| 58 |
% No paragraph indentation, space between paragraphs. |
| 59 |
|
| 60 |
\setlength{\parindent}{0pt} |
| 61 |
\setlength{\parskip}{\medskipamount} |
| 62 |
|
| 63 |
% The names of some documents: |
| 64 |
|
| 65 |
\newcommand{\clsguide}{\LaTeXe{} for Class and Package Writers} |
| 66 |
\newcommand{\usrguide}{\LaTeXe{} for Authors} |
| 67 |
\newcommand{\fntguide}{\LaTeXe{} Font Selection} |
| 68 |
\newcommand{\cfgguide}{Configuration options for \LaTeXe} |
| 69 |
\newcommand{\cyrguide}{Cyrillic languages support in \LaTeX} |
| 70 |
\newcommand{\modguide}{Modifying \LaTeX} |
| 71 |
\newcommand{\sourcecode}{\LaTeX: the program} |
| 72 |
\newcommand{\LaTeXbook}{\LaTeX: A Document Preparation System} |
| 73 |
\newcommand{\LaTeXcomp}{The \LaTeX{} Companion} |
| 74 |
\newcommand\LaTeXGcomp{The \LaTeX{} Graphics Companion} |
| 75 |
\newcommand\LaTeXWcomp{The \LaTeX{} Web Companion} |
| 76 |
|
| 77 |
\newcommand{\babel}{\textsf{babel}} |
| 78 |
\newcommand{\ctan}{\textsc{ctan}} |
| 79 |
|
| 80 |
\newcommand{\eg}{e.g.,~} |
| 81 |
\newcommand{\ie}{i.e.,~} |
| 82 |
|
| 83 |
% The SliTeX logo: |
| 84 |
|
| 85 |
\newcommand{\SLiTeX}{\textsc{Sli}\TeX} |
| 86 |
|
| 87 |
% A declaration of a command, in a box, set out into the margin. |
| 88 |
% |
| 89 |
% Unfortunately, there is a bug with this command, which allows page |
| 90 |
% breaks to happen after a \begin{decl}[DATE]: it is a bug with TeX that |
| 91 |
% makes it very difficult to get page-breaks correct near marginals, |
| 92 |
% especially at the end of a paragraph. |
| 93 |
|
| 94 |
\newenvironment{decl}[1][]% |
| 95 |
{\par\small\addvspace{4.5ex plus 1ex}% |
| 96 |
\vskip -\parskip |
| 97 |
\ifx\relax#1\relax |
| 98 |
\def\@decl@date{}% |
| 99 |
\else |
| 100 |
\def\@decl@date{\NEWfeature{#1}}% |
| 101 |
\fi |
| 102 |
\noindent\hspace{-\leftmargini}% |
| 103 |
\begin{tabular}{|l|}\hline\ignorespaces}% |
| 104 |
{\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak |
| 105 |
\vspace{2.3ex}\vskip -\parskip} |
| 106 |
|
| 107 |
% Run the toc tighter: |
| 108 |
|
| 109 |
\def\@starttoc#1{\begingroup |
| 110 |
\makeatletter |
| 111 |
\parskip\z@\@plus\p@\relax % <---- |
| 112 |
\@input{\jobname.#1}\if@filesw |
| 113 |
\expandafter\newwrite\csname tf@#1\endcsname |
| 114 |
\immediate\openout |
| 115 |
\csname tf@#1\endcsname \jobname.#1\relax |
| 116 |
\fi \global\@nobreakfalse \endgroup} |
| 117 |
|
| 118 |
% Some hacks with verbatim... NB: this would be better done with the |
| 119 |
% verbatim package, but this document has to run on any LaTeX |
| 120 |
% installation. |
| 121 |
|
| 122 |
\let\o@verbatim\verbatim |
| 123 |
\def\verbatim{% |
| 124 |
\ifhmode\unskip\par\fi |
| 125 |
% \nopagebreak % Overridden by list penalty |
| 126 |
\ifx\@currsize\normalsize |
| 127 |
\small |
| 128 |
\fi |
| 129 |
\o@verbatim |
| 130 |
} |
| 131 |
|
| 132 |
% Here we extend the font-setting command to include making <> active |
| 133 |
% (ie adjusting the input encoding). |
| 134 |
\renewcommand \verbatim@font {% |
| 135 |
\normalfont \ttfamily |
| 136 |
\catcode`\<=\active |
| 137 |
\catcode`\>=\active |
| 138 |
} |
| 139 |
|
| 140 |
% Make |...| a synonym for \verb|...|. |
| 141 |
\RequirePackage{shortvrb} |
| 142 |
\MakeShortVerb{\|} |
| 143 |
|
| 144 |
|
| 145 |
% Make active <...> produce italics surrounded by angle brackets |
| 146 |
% (used in verbatim and \verb). |
| 147 |
% << produces a less-than, and >> produces a greater-than. |
| 148 |
|
| 149 |
\begingroup |
| 150 |
\catcode`\<=\active |
| 151 |
\catcode`\>=\active |
| 152 |
\gdef<{\@ifnextchar<\@lt\@meta} |
| 153 |
\gdef>{\@ifnextchar>\@gt\@gtr@err} |
| 154 |
\gdef\@meta#1>{\m{#1}} |
| 155 |
\gdef\@lt<{\char`\<} |
| 156 |
\gdef\@gt>{\char`\>} |
| 157 |
\endgroup |
| 158 |
\def\@gtr@err{% |
| 159 |
\ClassError{ltxguide}{% |
| 160 |
Isolated \protect>% |
| 161 |
}{% |
| 162 |
In this document class, \protect<...\protect> |
| 163 |
is used to indicate a parameter.\MessageBreak |
| 164 |
I've just found a \protect> on its own. |
| 165 |
Perhaps you meant to type \protect>\protect>? |
| 166 |
}% |
| 167 |
} |
| 168 |
\def\verbatim@nolig@list{\do\`\do\,\do\'\do\-} |
| 169 |
|
| 170 |
% Various forms of argument: |
| 171 |
|
| 172 |
\newcommand{\m}[1]{\mbox{$\langle$\it #1\/$\rangle$}} |
| 173 |
\renewcommand{\arg}[1]{{\tt\string{}\m{#1}{\tt\string}}} |
| 174 |
\newcommand{\oarg}[1]{{\tt[}\m{#1}{\tt]}} |
| 175 |
|
| 176 |
% Logos. |
| 177 |
|
| 178 |
\newcommand{\NFSS}{\textsf{NFSS}} |
| 179 |
|
| 180 |
\newcommand{\AmS}{$${\protect\the\textfont2 A}\kern-.1667em\lower |
| 181 |
.5ex\hbox{\protect\the\textfont2 M}\kern |
| 182 |
-.125em{\protect\the\textfont2 S}} |
| 183 |
|
| 184 |
\newcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}} |
| 185 |
|
| 186 |
% Table of contents is two deep. |
| 187 |
|
| 188 |
\setcounter{tocdepth}{2} |
| 189 |
|
| 190 |
% Allow more flexibility about bad paragraphs. |
| 191 |
|
| 192 |
\tolerance500 |
| 193 |
|
| 194 |
% Marginal notes for new features and description: |
| 195 |
% Changed to command and hacked by Chris to get better positioning and |
| 196 |
% a better chance of printing: |
| 197 |
\newcommand{\NEWfeature}[1]{% |
| 198 |
\hskip 1sp \marginpar{\small\sffamily\raggedright |
| 199 |
New feature\\#1}} |
| 200 |
\newcommand{\NEWdescription}[1]{% |
| 201 |
\hskip 1sp \marginpar{\small\sffamily\raggedright |
| 202 |
New description\\#1}} |
| 203 |
|
| 204 |
\newcommand{\URL}[1]{\texttt{#1}} |
| 205 |
|
| 206 |
% That's it! |
| 207 |
|
| 208 |
\endinput |
| 209 |
|
| 210 |
% CHANGELOG |
| 211 |
% |
| 212 |
% 24 May 1994, ASAJ: Turned the collection of macros used by |
| 213 |
% usrguide and clsguide into a class. |
| 214 |
% |
| 215 |
% 27 May 1994, ASAJ: Added the SliTeX logo. |
| 216 |
% |
| 217 |
% 28 May 1994, ASAJ: Made << and >> produce < and > inside verbatim. |
| 218 |
% Added ltxguide.cfg. |
| 219 |
% |
| 220 |
% 29 May 1994, ASAJ: Added italic correction to <...>. |
| 221 |
% Added \sourcecode. |
| 222 |
% |
| 223 |
% 1 Jun 1994, ASAJ: Made toc run tighter, corrected bug with verbatim. |
| 224 |
% |
| 225 |
% 28 Jun 1994, CAR: Restricted active <> to verb(atim). |
| 226 |
% Removed ineffective \nopagebreak |
| 227 |
% |
| 228 |
% 23 Sep 1994, ASAJ: Replaced \PassOptionsToPackage{article} with |
| 229 |
% \PassOptionsToClass{article}. |
| 230 |
% |
| 231 |
% 30 Oct 1994, ASAJ: Added environments NEWfeature and NEWdescription. |
| 232 |
% |
| 233 |
% 20 Nov 1994, CAR: Changed NEWfeature and NEWdescription to improve |
| 234 |
% alignment: pagebreaking still not working. |
| 235 |
% |
| 236 |
% 14 Dec 1994, DPC: Add \par to verbatim redefinition. |
| 237 |
% Reported by Ulrik Vieth. |
| 238 |
% 24 July 1995, CAR: Changed cfg messages. |
| 239 |
% |
| 240 |
% 21 Sept 1995, \RequirePackage{shortvrb} for latex/1875 |
| 241 |
% |
| 242 |
% 22 Nov 1995, CAR: Corrected cfg loading. |
| 243 |
% |
| 244 |
% 28 Nov 1995, CAR: Added \cfgguide and \modguide. |
| 245 |
% |
| 246 |
% 29 Nov 1995, DPC: Make \small in verbatim conditional on \normalsize. |
| 247 |
% |
| 248 |
% 28 Feb 1999, CAR: Added some shorthand commands. |
| 249 |
% |
| 250 |
% 06 Mar 1999, RmS: Added \URL. |
| 251 |
% |
| 252 |
% 28 May 2001, CAR: Added some more shorthand commands (for books). |