Debian Codegraph @

texmf-dist/tex/latex/base/letter.cls

raw
1 %%
2 %% This is file `letter.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% letter.dtx (with options: `letter')
8 %%
9 %% This is a generated file.
10 %%
11 %% The source is maintained by the LaTeX Project team and bug
12 %% reports for it can be opened at https://latex-project.org/bugs.html
13 %% (but please observe conditions on bug reports sent to that address!)
14 %%
15 %%
16 %% Copyright (C) 1993-2025
17 %% The LaTeX Project and any individual authors listed elsewhere
18 %% in this file.
19 %%
20 %% This file was generated from file(s) of the LaTeX base system.
21 %% --------------------------------------------------------------
22 %%
23 %% It may be distributed and/or modified under the
24 %% conditions of the LaTeX Project Public License, either version 1.3c
25 %% of this license or (at your option) any later version.
26 %% The latest version of this license is in
27 %% https://www.latex-project.org/lppl.txt
28 %% and version 1.3c or later is part of all distributions of LaTeX
29 %% version 2008 or later.
30 %%
31 %% This file has the LPPL maintenance status "maintained".
32 %%
33 %% This file may only be distributed together with a copy of the LaTeX
34 %% base system. You may however distribute the LaTeX base system without
35 %% such generated files.
36 %%
37 %% The list of all files belonging to the LaTeX base distribution is
38 %% given in the file `manifest.txt'. See also `legal.txt' for additional
39 %% information.
40 %%
41 %% The list of derived (unpacked) files belonging to the distribution
42 %% and covered by LPPL is defined by the unpacking scripts (with
43 %% extension .ins) which are part of the distribution.
44 \NeedsTeXFormat{LaTeX2e}[1996/06/01]
45 \ProvidesClass{letter}
46 [2024/08/12 v1.3c
47 Standard LaTeX document class]
48 \newcommand\@ptsize{}
49 \DeclareOption{a4paper}
50 {\setlength\paperheight {297mm}%
51 \setlength\paperwidth {210mm}}
52 \DeclareOption{a5paper}
53 {\setlength\paperheight {210mm}%
54 \setlength\paperwidth {148mm}}
55 \DeclareOption{b5paper}
56 {\setlength\paperheight {250mm}%
57 \setlength\paperwidth {176mm}}
58 \DeclareOption{letterpaper}
59 {\setlength\paperheight {11in}%
60 \setlength\paperwidth {8.5in}}
61 \DeclareOption{legalpaper}
62 {\setlength\paperheight {14in}%
63 \setlength\paperwidth {8.5in}}
64 \DeclareOption{executivepaper}
65 {\setlength\paperheight {10.5in}%
66 \setlength\paperwidth {7.25in}}
67 \DeclareOption{landscape}
68 {\setlength\@tempdima {\paperheight}%
69 \setlength\paperheight {\paperwidth}%
70 \setlength\paperwidth {\@tempdima}}
71 \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
72 \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
73 \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
74 \if@compatibility
75 \DeclareOption{twoside}{\@latexerr{No `twoside' layout for letters}%
76 \@eha}
77 \else
78 \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
79 \fi
80 \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
81 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
82 \DeclareOption{final}{\setlength\overfullrule{0pt}}
83 \DeclareOption{leqno}{\input{leqno.clo}}
84 \DeclareOption{fleqn}{\input{fleqn.clo}}
85 \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final}
86 \ProcessOptions
87 \input{size1\@ptsize.clo}
88 \setlength\lineskip{1\p@}
89 \setlength\normallineskip{1\p@}
90 \renewcommand\baselinestretch{}
91 \setlength\parskip{0.7em}
92 \setlength\parindent{0\p@}
93 \@lowpenalty 51
94 \@medpenalty 151
95 \@highpenalty 301
96 \setlength\headheight{12\p@}
97 \setlength\headsep {45\p@}
98 \setlength\footskip{25\p@}
99 \if@compatibility
100 \setlength\textwidth{365\p@}
101 \setlength\textheight{505\p@}
102 \fi
103 \if@compatibility
104 \setlength\oddsidemargin{53pt}
105 \setlength\evensidemargin{53pt}
106 \setlength\marginparwidth{90pt}
107 \else
108 \setlength\@tempdima{\paperwidth}
109 \addtolength\@tempdima{-2in}
110 \addtolength\@tempdima{-\textwidth}
111 \setlength\oddsidemargin {.5\@tempdima}
112 \setlength\evensidemargin {\oddsidemargin}
113 \setlength\marginparwidth {90\p@}
114 \fi
115 \setlength\marginparsep {11\p@}
116 \setlength\marginparpush{5\p@}
117 \setlength\topmargin{27pt}
118 \setlength\footnotesep{12\p@}
119 \setlength{\skip\footins}{10\p@ \@plus 2\p@ \@minus 4\p@}
120 \if@twoside
121 \def\ps@headings{%
122 \let\@oddfoot\@empty\let\@evenfoot\@empty
123 \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
124 \hfil \@date
125 \hfil \pagename{} \thepage}%
126 \let\@evenhead\@oddhead}
127 \else
128 \def\ps@headings{%
129 \let\@oddfoot\@empty
130 \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
131 \hfil \@date
132 \hfil \pagename{} \thepage}}
133 \fi
134 \def\ps@empty{%
135 \let\@oddfoot\@empty\let\@oddhead\@empty
136 \let\@evenfoot\@empty\let\@evenhead\@empty}
137 \def\ps@firstpage{%
138 \let\@oddhead\@empty
139 \def\@oddfoot{\raisebox{-45\p@}[\z@]{%
140 \hb@xt@\textwidth{\hspace*{100\p@}%
141 \ifcase \@ptsize\relax
142 \normalsize
143 \or
144 \small
145 \or
146 \footnotesize
147 \fi
148 \fromlocation \hfill \telephonenum}}\hss}}
149 \def\ps@plain{%
150 \let\@oddhead\@empty
151 \def\@oddfoot{\normalfont\hfil\thepage\hfil}%
152 \def\@evenfoot{\normalfont\hfil\thepage\hfil}}
153 \newcommand*\name[1]{\def\fromname{#1}}
154 \newcommand*\signature[1]{\def\fromsig{#1}}
155 \newcommand*\address[1]{\def\fromaddress{#1}}
156 \newcommand*\location[1]{\def\fromlocation{#1}}
157 \newcommand*\telephone[1]{\def\telephonenum{#1}}
158 \name{}
159 \signature{}
160 \address{}
161 \location{}
162 \telephone{}
163 \newcommand*\makelabels{%
164 \AtBeginDocument{%
165 \let\@startlabels\startlabels
166 \let\@mlabel\mlabel
167 \if@filesw
168 \immediate\write\@mainaux{\string\@startlabels}\fi}%
169 \AtEndDocument{%
170 \if@filesw\immediate\write\@mainaux{\string\clearpage}\fi}}
171 \@onlypreamble\makelabels
172 \newenvironment{letter}[1]
173 {\newpage
174 \if@twoside \ifodd\c@page
175 \else\thispagestyle{empty}\null\newpage\fi
176 \fi
177 \c@page \@ne
178 \c@footnote \z@
179 \interlinepenalty=200 % smaller than the TeXbook value
180 \@processto{\leavevmode\ignorespaces #1}}
181 {\stopletter\@@par\pagebreak\@@par
182 \if@filesw
183 \begingroup
184 \let\\=\relax
185 \let\protect\@unexpandable@protect
186 \immediate\write\@auxout{%
187 \string\@mlabel{\returnaddress}{\toname\\\toaddress}}%
188 \endgroup
189 \fi}
190 \long\def\@processto#1{%
191 \@xproc #1\\@@@%
192 \ifx\toaddress\@empty
193 \else
194 \@yproc #1@@@%
195 \fi}
196 \long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
197 \long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
198 \newcommand*\stopbreaks{%
199 \interlinepenalty\@M
200 \def\par{\@@par\nobreak}%
201 \let\\\@nobreakcr
202 \let\vspace\@nobreakvspace}
203 \DeclareRobustCommand\@nobreakvspace
204 {\@ifstar\@nobreakvspacex\@nobreakvspacex}
205 \def\@nobreakvspacex#1{%
206 \ifvmode
207 \nobreak\vskip #1\relax
208 \else
209 \@bsphack\vadjust{\nobreak\vskip #1}\@esphack
210 \fi}
211 \def\@nobreakcr{\@ifstar{\@normalcr*}{\@normalcr*}}
212 \newcommand*\startbreaks{%
213 \let\\\@normalcr
214 \interlinepenalty 200%
215 \def\par{\@@par\penalty 200\relax}}
216 \newdimen\longindentation
217 \longindentation=.5\textwidth
218 \newdimen\indentedwidth
219 \indentedwidth=\textwidth
220 \advance\indentedwidth -\longindentation
221 \newcommand*\opening[1]{\ifx\@empty\fromaddress
222 \thispagestyle{firstpage}%
223 {\raggedleft\@date\par}%
224 \else % home address
225 \thispagestyle{empty}%
226 {\raggedleft\begin{tabular}{l@{}}\ignorespaces
227 \fromaddress \\*[2\parskip]%
228 \@date \end{tabular}\par}%
229 \fi
230 \vspace{2\parskip}%
231 {\raggedright \toname \expandafter\\\toaddress \par}%
232 \vspace{2\parskip}%
233 #1\par\nobreak}
234 \newcommand\closing[1]{\par\nobreak\vspace{\parskip}%
235 \stopbreaks
236 \noindent
237 \ifx\@empty\fromaddress\else
238 \hspace*{\longindentation}\fi
239 \parbox{\indentedwidth}{\raggedright
240 \ignorespaces #1\\[6\medskipamount]%
241 \ifx\@empty\fromsig
242 \fromname
243 \else \fromsig \fi\strut}%
244 \par}
245 \medskipamount=\parskip
246 \newcommand*\cc[1]{%
247 \par\noindent
248 \parbox[t]{\textwidth}{%
249 \@hangfrom{\normalfont\ccname: }%
250 \ignorespaces #1\strut}\par}
251 \newcommand*\encl[1]{%
252 \par\noindent
253 \parbox[t]{\textwidth}{%
254 \@hangfrom{\normalfont\enclname: }%
255 \ignorespaces #1\strut}\par}
256 \newcommand*\ps{\par\startbreaks}
257 \newcommand*\stopletter{}
258 \newcommand*\returnaddress{}
259 \newcount\labelcount
260 \newcommand*\startlabels{\labelcount\z@
261 \pagestyle{empty}%
262 \let\@texttop\relax
263 \topmargin -50\p@
264 \headsep \z@
265 \oddsidemargin -35\p@
266 \evensidemargin -35\p@
267 \textheight 10in
268 \@colht\textheight \@colroom\textheight \vsize\textheight
269 \textwidth 550\p@
270 \columnsep 26\p@
271 \ifcase \@ptsize\relax
272 \normalsize
273 \or
274 \small
275 \or
276 \footnotesize
277 \fi
278 \baselineskip \z@
279 \lineskip \z@
280 \boxmaxdepth \z@
281 \parindent \z@
282 \twocolumn\relax}
283 \let\@startlabels=\relax
284 \newcommand*\mlabel[2]{%
285 \parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}%
286 }
287 \let\@mlabel=\@gobbletwo
288 \setlength\leftmargini {2.5em}
289 \setlength\leftmarginii {2.2em}
290 \setlength\leftmarginiii {1.87em}
291 \setlength\leftmarginiv {1.7em}
292 \setlength\leftmarginv {1em}
293 \setlength\leftmarginvi {1em}
294 \setlength\leftmargin {\leftmargini}
295 \setlength \labelsep {5\p@}
296 \setlength \labelwidth{\leftmargini}
297 \addtolength\labelwidth{-\labelsep}
298 \setlength\partopsep{0\p@}
299 \@beginparpenalty -\@lowpenalty
300 \@endparpenalty -\@lowpenalty
301 \@itempenalty -\@lowpenalty
302 \def\@listI{\setlength\leftmargin{\leftmargini}%
303 \setlength\parsep {0\p@}%
304 \setlength\topsep {.4em}%
305 \setlength\itemsep{.4em}}
306 \let\@listi\@listI
307 \@listi
308 \def\@listii {\setlength \leftmargin{\leftmarginii}%
309 \setlength \labelwidth{\leftmarginii}%
310 \addtolength\labelwidth{-\labelsep}}
311 \def\@listiii{\setlength \leftmargin{\leftmarginiii}%
312 \setlength \labelwidth{\leftmarginiii}%
313 \addtolength\labelwidth{-\labelsep}%
314 \setlength \topsep {.2em}%
315 \setlength \itemsep {\topsep}}
316 \def\@listiv {\setlength \leftmargin{\leftmarginiv}%
317 \setlength \labelwidth{\leftmarginiv}%
318 \addtolength\labelwidth{-\labelsep}}
319 \def\@listv {\setlength \leftmargin{\leftmarginv}%
320 \setlength \labelwidth{\leftmarginv}%
321 \addtolength\labelwidth{-\labelsep}}
322 \def\@listvi {\setlength \leftmargin{\leftmarginvi}%
323 \setlength \labelwidth{\leftmarginvi}%
324 \addtolength\labelwidth{-\labelsep}}
325 \renewcommand\theenumi{\@arabic\c@enumi}
326 \renewcommand\theenumii{\@alph\c@enumii}
327 \renewcommand\theenumiii{\@roman\c@enumiii}
328 \renewcommand\theenumiv{\@Alph\c@enumiv}
329 \newcommand\labelenumi{\theenumi.}
330 \newcommand\labelenumii{(\theenumii)}
331 \newcommand\labelenumiii{\theenumiii.}
332 \newcommand\labelenumiv{\theenumiv.}
333 \renewcommand\p@enumii{\theenumi}
334 \renewcommand\p@enumiii{\theenumi(\theenumii)}
335 \renewcommand\p@enumiv{\p@enumiii\theenumiii}
336 \newcommand\labelitemi {\labelitemfont \textbullet}
337 \newcommand\labelitemii {\labelitemfont \bfseries \textendash}
338 \newcommand\labelitemiii{\labelitemfont \textasteriskcentered}
339 \newcommand\labelitemiv {\labelitemfont \textperiodcentered}
340 \newcommand\labelitemfont{\normalfont}
341 \newenvironment{description}
342 {\list{}{\labelwidth\z@ \itemindent-\leftmargin
343 \let\makelabel\descriptionlabel}}
344 {\endlist}
345 \newcommand*\descriptionlabel[1]{\hspace\labelsep
346 \normalfont\bfseries #1}
347 \newenvironment{verse}
348 {\let\\=\@centercr
349 \list{}{\setlength\itemsep{\z@}%
350 \setlength\itemindent{-15\p@}%
351 \setlength\listparindent{\itemindent}%
352 \setlength\rightmargin{\leftmargin}%
353 \addtolength\leftmargin{15\p@}}%
354 \item[]}
355 {\endlist}
356 \newenvironment{quotation}
357 {\list{}{\setlength\listparindent{1.5em}%
358 \setlength\itemindent{\listparindent}%
359 \setlength\rightmargin{\leftmargin}}%
360 \item[]}
361 {\endlist}
362 \newenvironment{quote}
363 {\list{}{\setlength\rightmargin{\leftmargin}}%
364 \item[]}
365 {\endlist}
366 \setlength\arraycolsep{5\p@}
367 \setlength\tabcolsep{6\p@}
368 \setlength\arrayrulewidth{.4\p@}
369 \setlength\doublerulesep{2\p@}
370 \setlength\tabbingsep{\labelsep}
371 \skip\@mpfootins = \skip\footins
372 \setlength\fboxsep{3\p@}
373 \setlength\fboxrule{.4\p@}
374 \renewcommand\theequation{\@arabic\c@equation}
375 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
376 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
377 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
378 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
379 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
380 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
381 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
382 \DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
383 \DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
384 \renewcommand\footnoterule{%
385 \kern-\p@
386 \hrule \@width .4\columnwidth
387 \kern .6\p@}
388 \newcommand\@makefntext[1]{%
389 \noindent
390 \hangindent 5\p@
391 \hb@xt@5\p@{\hss\@makefnmark}#1}
392 \newcommand*\ccname{cc}
393 \newcommand*\enclname{encl}
394 \newcommand*\pagename{Page}
395 \newcommand*\headtoname{To}
396 \newcommand*\today{\ifcase\month\or
397 January\or February\or March\or April\or May\or June\or
398 July\or August\or September\or October\or November\or December\fi
399 \space\number\day, \number\year}
400 \setlength\columnsep{10\p@}
401 \setlength\columnseprule{0\p@}
402 \pagestyle{plain}
403 \pagenumbering{arabic}
404 \raggedbottom
405 \def\@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
406 \onecolumn
407 \endinput
408 %%
409 %% End of file `letter.cls'.