1 % \iffalse meta-comment
3 % Copyright (C) 1992 by David Carlisle, Frank Mittelbach.
6 % This file is part of the validate package.
10 % You are not allowed to change this file. In case of error
11 % write to the email address mentioned in the file readme.val.
15 % Test file for LaTeX2.09 testing latex.bug (style) entries:
17 % 54. International language support. All fixed strings are removed and
18 % commands are inserted instead. The names are chosen according to the
19 % standard developed in Europe (ILaTeX, german.sty, babel.sty). The default
20 % for these commands is to produce the old string, so there is no change in
21 % behavior. (Changes made 30 Mar 91.)
23 % 69. Added forgotten definitions for \ccname, etc. in letter document
24 % style. (Found by Johannes Braams. Corrected 5 Nov 91.)
26 % 78. Fix no. 59 caused leading blanks in the argument of \begin{letter}
27 % not to be ignored. (Reported by Will Partain. Corrected 21 Feb 92.)
29 % 80. Changed definitions of \labelenum... in the letter document style
30 % to use \theenum... rather than directly \arabic{enumi}, etc.
31 % (Suggested by Johannes Braams. Change made 26 Feb 92.)
34 \documentclass{letter}
38 % Input the test macros for LaTeX2e
41 % Everything before this is ignored by the test system.
46 % Declare the format used on the original run, as printed by
49 \FORMAT{LaTeX2e<1993/12/24>}
51 % Letter document style for this test. We need to have a
52 % minimal font setup, for the last few tests, otherwise we
53 % could have done this with no documentclass.
57 % Optionally declare commands which are (or might be)
58 % defined in this `module' of LaTeX. Each command declared
59 % will be recorded in the .tlg file as Defined, Undefined,
60 % or Relaxed (ie \let to \relax, which LaTeX treats for most
61 % purposes as being undefined)
63 \declare@command\ccname % {cc}
64 \declare@command\enclname % {encl}
65 \declare@command\pagename % {Page}
66 \declare@command\headtoname % {To}
68 % Redefine all the heading strings
74 \newcounter{headtoname}
76 \newcommand{\ChangeName}[2]{#2\typeout{#1 name changed to #2}}
77 \renewcommand{\ccname}{\addtocounter{ccname}{1}\ChangeName{cc}{Xcc}}
78 \renewcommand{\enclname}{\addtocounter{enclname}{1}\ChangeName{encl}{Xencl}}
79 \renewcommand{\pagename}{\addtocounter{pagename}{1}\ChangeName{Page}{XPage}}
80 \renewcommand{\headtoname}{\addtocounter{headtoname}{1}\ChangeName{To}{XTo}}
83 % Make one example of each to check the name has been correctly changed.
85 \address{195 Waterloo Road\\London SE1\quad8XJ}
86 \signature{Dom Casual}
87 \begin{letter}{ Gill Cameo\\203 Waterloo Road\\London SE1\quad8XJ}
91 \renewcommand{\theenumiv}{\arabic{enumiv}}
92 \renewcommand{\theenumiii}{\alph{enumiii}}
93 \renewcommand{\theenumii}{\roman{enumii}}
94 \renewcommand{\theenumi}{\Alph{enumi}}
96 \setcounter{enumi}{11}
97 \setcounter{enumii}{12}
98 \setcounter{enumiii}{13}
99 \setcounter{enumiv}{14}
100 \typeout{\string\labelenumi\ is \labelenumi}
101 \typeout{\string\labelenumii\ is \labelenumii}
102 \typeout{\string\labelenumiii\ is \labelenumiii}
103 \typeout{\string\labelenumiv\ is \labelenumiv}
105 \newcommand\bs{\char '134 } % A backslash character for \tt font
106 \newcommand\lb{\char '173 } % A left brace character for \tt font
107 \newcommand\rb{\char '175 } % A right brace character for \tt font
109 You can now use \LaTeX{} to typeset letters---both personal and
110 bus\-i\-ness---and their mailing labels. The standard page layout and
111 document style to use are both called \hbox{\tt letter}, though there
112 may be additional page layouts and document styles available at your
113 location. Your {\tt .TEX} file starts with the usual commands and
114 ends with the usual \hbox{\verb"\end{document}"}.
116 The {\tt letter} document style is designed to make a number of
117 letters at once. Consequently, the standard parts of a letter, which
118 are likely to be the same in all your letters, are defined with
119 declarations. The following commands are declarations; they take a
123 \item[{\tt \bs name}:] Your name, as it should appear in the
124 return address on the envelope. For example,
126 \name{Leslie Lamport}
130 \item[{\tt \bs address}] The return address, as it should appear
131 on the letter and the envelope. Separate lines of the address
132 should be separated by \verb"\\" commands. For example,
134 \address{2345 Sunnyside Lane \\
135 San Francisco, CA 94123}
137 If you do not make an
138 \hbox{\verb"\address"} declaration, then the letter will
139 be formatted for copying onto your organization's standard
140 letterhead. If you give an \hbox{\verb"\address"} declaration,
141 then the letter will be formatted as a personal letter.
143 \item[{\tt \bs signature}:] Your name, as it should appear at the
144 end of the letter underneath the space for your signature.
145 Items that should go on separate lines should be separated
146 by \verb"\\" commands, as in
148 \signature{ Robert Smith \\ Director of
153 \item[{\tt \bs location}:] This modifies your organization's standard
154 address. For example, it might be a room number.
156 \item[{\tt \bs telephone}:] Your telephone number.
159 These declarations have the usual scoping rules. Hence, you would
160 probably make the ``standard'' declarations at the beginning of your
161 file, with local modifications for the individual letters. Or, you
162 could have all your business letters first, then give an
163 \hbox{\verb"\address"} declaration, followed by your personal letters.
164 Some of these declarations may be ignored by the document style.
166 Each letter is a {\tt letter} environment, whose argument
167 is the name and address of the recipient. For example,
170 \begin{letter}{Mr. John Doe \\ 2345 Jones St.
171 \\ Oakland, CA 91123}
176 Following the \verb"\begin{letter}" comes any declarations
177 local to the letter---for example, if you are using a
178 nonstandard \hbox{\verb"\signature"} for this letter.
180 The letter itself begins with an \hbox{\verb"\opening"}
185 The text of the letter follows. It is typed as ordinary
186 \LaTeX{} input. (Commands that make no sense in a letter,
187 like \hbox{\verb"\chapter"}, don't work.) The letter
188 closes with a \hbox{\verb"\closing"} command, like
190 \closing{Best regards,}
192 which generates the ``Best regards,'' together with the ``signature''.
194 After the closing, you can have additional material. This is typed as
195 usual, except that paragraphs are not indented, regardless of whether
196 or not they are indented in the main body of the letter. The
197 \hbox{\verb"\cc"} command produces the usual \hbox{``cc: $\ldots$''},
200 \cc{J. Tinkers \\ R. Evers \\ C. Chance}
202 There's also a similar \hbox{\verb"\encl"} command for a list of
203 enclosures. \LaTeX{} just puts ordinary interparagraph vertical space
204 between all this end matter, which is usually not enough. Use the
205 \hbox{\verb"\smallskip"}, \hbox{\verb"\medskip"}, and
206 \hbox{\verb"\bigskip"} commands to put in the right amount of space.
208 The \verb"\ps" command resumes normal formatting in case you want to
209 add a postscript. The \verb"\ps" command does not generate any text;
210 you have to type the ``P.S.'' yourself. Page breaking, which is
211 inhibited after the \hbox{\verb"\closing"}, is allowed after the
212 first line of output following the \verb"\ps" command.
214 You can get \LaTeX{} to produce mailing labels by typing a
215 \hbox{\verb"\makelabels"} command before the \hbox{\verb"\begin{document}"}
216 command. \LaTeX{} prints the labels after all the letters, in a
217 format suitable for xerographic copying onto ``peel-off'' labels.
218 (The exact format will depend upon the labels available at your
219 institution.) A null \hbox{\tt letter} environment---i.e., one
220 with nothing between the \hbox{\verb|\begin|} and
221 \hbox{\verb|\end|} commands---will produce nothing but a mailing
222 label. Use such null environments to produce the mailing labels
223 for copies of the letter.
225 \closing{Good vibrations,}
227 \encl{Shelley\\Tiranti\\Van Dijk (Bold)}
231 \typeout{Each counter should have a non-zero value to show that the name has been changed}
232 \typeout{Counter ccname is \theccname}
233 \typeout{Counter enclname is \theenclname}
234 \typeout{Counter pagename is \thepagename}
235 \typeout{Counter headtoname is \theheadtoname}
237 % everything after this will be ignored by the test system.
238 % This line may be omitted, and replaced by \end{document}
239 % If it is necessary to run the \end{document} command, say
240 % to get the .aux files correct.