1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
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 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
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
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.
29 % Filename: ltxguide.cls
30 % Author: Alan Jeffrey
31 % Version: 0.14 1999/03/06
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.
37 % Copyright 1994 1999 Alan Jeffrey and the LaTeX3 project.
39 % This is a LaTeX2e document class.
41 \NeedsTeXFormat{LaTeX2e
}[1994/
12/
01]
42 \ProvidesClass{ltxguide
}[2001/
05/
28 Standard LaTeX class
]
44 % Input any local configuration file.
46 \InputIfFileExists{ltxguide.cfg
}
47 {\typeout {**********************************************^^J
%
48 * Local configuration file ltxguide.cfg used *^^J
%
49 **********************************************
}}
50 {\ClassInfo{ltxguide
}{Local configuration file not found
}}
52 % All options are passed to the article class.
54 \DeclareOption*
{\PassOptionsToClass{\CurrentOption}{article
}}
58 % No paragraph indentation, space between paragraphs.
60 \setlength{\parindent}{0pt
}
61 \setlength{\parskip}{\medskipamount}
63 % The names of some documents:
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
}
77 \newcommand{\babel}{\textsf{babel
}}
78 \newcommand{\ctan}{\textsc{ctan
}}
80 \newcommand{\eg}{e.g.,~
}
81 \newcommand{\ie}{i.e.,~
}
85 \newcommand{\SLiTeX}{\textsc{Sli
}\TeX}
87 % A declaration of a command, in a box, set out into the margin.
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.
94 \newenvironment{decl
}[1][]%
95 {\par\small\addvspace{4.5ex plus
1ex
}%
100 \def\@decl@date
{\NEWfeature{#1}}%
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}
107 % Run the toc tighter:
109 \def\@starttoc
#1{\begingroup
111 \parskip\z@\@plus
\p@
\relax % <----
112 \@input
{\jobname.
#1}\if@filesw
113 \expandafter\newwrite\csname tf@
#1\endcsname
115 \csname tf@
#1\endcsname \jobname.
#1\relax
116 \fi \global\@nobreakfalse
\endgroup}
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
122 \let\o@verbatim
\verbatim
124 \ifhmode\unskip\par\fi
125 % \nopagebreak % Overridden by list penalty
126 \ifx\@currsize
\normalsize
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
140 % Make |...| a synonym for \verb|...|.
141 \RequirePackage{shortvrb
}
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.
152 \gdef<
{\@ifnextchar<\@lt\@meta
}
153 \gdef>
{\@ifnextchar>\@gt\@gtr@err
}
154 \gdef\@meta
#1>
{\m{#1}}
159 \ClassError{ltxguide
}{%
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>?
168 \def\verbatim@nolig@list
{\do\`
\do\,
\do\'
\do\-
}
170 % Various forms of argument:
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]}}
178 \newcommand{\NFSS}{\textsf{NFSS
}}
180 \newcommand{\AmS}{$$
{\protect\the\textfont2 A
}\kern-
.1667em
\lower
181 .5ex
\hbox{\protect\the\textfont2 M
}\kern
182 -
.125em
{\protect\the\textfont2 S
}}
184 \newcommand{\AmSLaTeX}{\mbox{\AmS-
\LaTeX}}
186 % Table of contents is two deep.
188 \setcounter{tocdepth}{2}
190 % Allow more flexibility about bad paragraphs.
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
200 \newcommand{\NEWdescription}[1]{%
201 \hskip 1sp
\marginpar{\small\sffamily\raggedright
202 New description\\
#1}}
204 \newcommand{\URL}[1]{\texttt{#1}}
212 % 24 May 1994, ASAJ: Turned the collection of macros used by
213 % usrguide and clsguide into a class.
215 % 27 May 1994, ASAJ: Added the SliTeX logo.
217 % 28 May 1994, ASAJ: Made << and >> produce < and > inside verbatim.
218 % Added ltxguide.cfg.
220 % 29 May 1994, ASAJ: Added italic correction to <...>.
223 % 1 Jun 1994, ASAJ: Made toc run tighter, corrected bug with verbatim.
225 % 28 Jun 1994, CAR: Restricted active <> to verb(atim).
226 % Removed ineffective \nopagebreak
228 % 23 Sep 1994, ASAJ: Replaced \PassOptionsToPackage{article} with
229 % \PassOptionsToClass{article}.
231 % 30 Oct 1994, ASAJ: Added environments NEWfeature and NEWdescription.
233 % 20 Nov 1994, CAR: Changed NEWfeature and NEWdescription to improve
234 % alignment: pagebreaking still not working.
236 % 14 Dec 1994, DPC: Add \par to verbatim redefinition.
237 % Reported by Ulrik Vieth.
238 % 24 July 1995, CAR: Changed cfg messages.
240 % 21 Sept 1995, \RequirePackage{shortvrb} for latex/1875
242 % 22 Nov 1995, CAR: Corrected cfg loading.
244 % 28 Nov 1995, CAR: Added \cfgguide and \modguide.
246 % 29 Nov 1995, DPC: Make \small in verbatim conditional on \normalsize.
248 % 28 Feb 1999, CAR: Added some shorthand commands.
250 % 06 Mar 1999, RmS: Added \URL.
252 % 28 May 2001, CAR: Added some more shorthand commands (for books).