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 \documentstyle{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{LaTeX Version 2.09 <18 March 1992>}
51 % Article 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 documentstyle.
55 \STYLE{letter <25 Mar 92>}
57 % no document style options for this test
59 \STYLEOPTIONS{headings}
61 % We are using a format based on basefont.tex possible values
62 % here are: original oldlfont newlfont basefont
64 \FONTSELECTION{basefont}
66 % Optionally declare commands which are (or might be)
67 % defined in this `module' of LaTeX. Each command declared
68 % will be recorded in the .tlg file as Defined, Undefined,
69 % or Relaxed (ie \let to \relax, which LaTeX treats for most
70 % purposes as being undefined)
72 \declare@command\ccname % {cc}
73 \declare@command\enclname % {encl}
74 \declare@command\pagename % {Page}
75 \declare@command\headtoname % {To}
77 % Redefine all the heading strings
82 \newcounter{headtoname}
83 \newcommand{\ChangeName}[2]{#2\typeout{#1 name changed to #2}}
84 \renewcommand{\ccname}{\addtocounter{ccname}{1}\ChangeName{cc}{Xcc}}
85 \renewcommand{\enclname}{\addtocounter{enclname}{1}\ChangeName{encl}{Xencl}}
86 \renewcommand{\pagename}{\addtocounter{pagename}{1}\ChangeName{Page}{XPage}}
87 \renewcommand{\headtoname}{\addtocounter{headtoname}{1}\ChangeName{To}{XTo}}
90 % Make one example of each to check the name has been correctly changed.
92 \address{195 Waterloo Road\\London SE1\quad8XJ}
93 \signature{Dom Casual}
94 \begin{letter}{ Gill Cameo\\203 Waterloo Road\\London SE1\quad8XJ}
98 \renewcommand{\theenumiv}{\arabic{enumiv}}
99 \renewcommand{\theenumiii}{\alph{enumiii}}
100 \renewcommand{\theenumii}{\roman{enumii}}
101 \renewcommand{\theenumi}{\Alph{enumi}}
103 \setcounter{enumi}{11}
104 \setcounter{enumii}{12}
105 \setcounter{enumiii}{13}
106 \setcounter{enumiv}{14}
107 \typeout{\string\labelenumi\ is \labelenumi}
108 \typeout{\string\labelenumii\ is \labelenumii}
109 \typeout{\string\labelenumiii\ is \labelenumiii}
110 \typeout{\string\labelenumiv\ is \labelenumiv}
112 \newcommand\bs{\char '134 } % A backslash character for \tt font
113 \newcommand\lb{\char '173 } % A left brace character for \tt font
114 \newcommand\rb{\char '175 } % A right brace character for \tt font
116 You can now use \LaTeX{} to typeset letters---both personal and
117 bus\-i\-ness---and their mailing labels. The standard page layout and
118 document style to use are both called \hbox{\tt letter}, though there
119 may be additional page layouts and document styles available at your
120 location. Your {\tt .TEX} file starts with the usual commands and
121 ends with the usual \hbox{\verb"\end{document}"}.
123 The {\tt letter} document style is designed to make a number of
124 letters at once. Consequently, the standard parts of a letter, which
125 are likely to be the same in all your letters, are defined with
126 declarations. The following commands are declarations; they take a
130 \item[{\tt \bs name}:] Your name, as it should appear in the
131 return address on the envelope. For example,
133 \name{Leslie Lamport}
137 \item[{\tt \bs address}] The return address, as it should appear
138 on the letter and the envelope. Separate lines of the address
139 should be separated by \verb"\\" commands. For example,
141 \address{2345 Sunnyside Lane \\
142 San Francisco, CA 94123}
144 If you do not make an
145 \hbox{\verb"\address"} declaration, then the letter will
146 be formatted for copying onto your organization's standard
147 letterhead. If you give an \hbox{\verb"\address"} declaration,
148 then the letter will be formatted as a personal letter.
150 \item[{\tt \bs signature}:] Your name, as it should appear at the
151 end of the letter underneath the space for your signature.
152 Items that should go on separate lines should be separated
153 by \verb"\\" commands, as in
155 \signature{ Robert Smith \\ Director of
160 \item[{\tt \bs location}:] This modifies your organization's standard
161 address. For example, it might be a room number.
163 \item[{\tt \bs telephone}:] Your telephone number.
166 These declarations have the usual scoping rules. Hence, you would
167 probably make the ``standard'' declarations at the beginning of your
168 file, with local modifications for the individual letters. Or, you
169 could have all your business letters first, then give an
170 \hbox{\verb"\address"} declaration, followed by your personal letters.
171 Some of these declarations may be ignored by the document style.
173 Each letter is a {\tt letter} environment, whose argument
174 is the name and address of the recipient. For example,
177 \begin{letter}{Mr. John Doe \\ 2345 Jones St.
178 \\ Oakland, CA 91123}
183 Following the \verb"\begin{letter}" comes any declarations
184 local to the letter---for example, if you are using a
185 nonstandard \hbox{\verb"\signature"} for this letter.
187 The letter itself begins with an \hbox{\verb"\opening"}
192 The text of the letter follows. It is typed as ordinary
193 \LaTeX{} input. (Commands that make no sense in a letter,
194 like \hbox{\verb"\chapter"}, don't work.) The letter
195 closes with a \hbox{\verb"\closing"} command, like
197 \closing{Best regards,}
199 which generates the ``Best regards,'' together with the ``signature''.
201 After the closing, you can have additional material. This is typed as
202 usual, except that paragraphs are not indented, regardless of whether
203 or not they are indented in the main body of the letter. The
204 \hbox{\verb"\cc"} command produces the usual \hbox{``cc: $\ldots$''},
207 \cc{J. Tinkers \\ R. Evers \\ C. Chance}
209 There's also a similar \hbox{\verb"\encl"} command for a list of
210 enclosures. \LaTeX{} just puts ordinary interparagraph vertical space
211 between all this end matter, which is usually not enough. Use the
212 \hbox{\verb"\smallskip"}, \hbox{\verb"\medskip"}, and
213 \hbox{\verb"\bigskip"} commands to put in the right amount of space.
215 The \verb"\ps" command resumes normal formatting in case you want to
216 add a postscript. The \verb"\ps" command does not generate any text;
217 you have to type the ``P.S.'' yourself. Page breaking, which is
218 inhibited after the \hbox{\verb"\closing"}, is allowed after the
219 first line of output following the \verb"\ps" command.
221 You can get \LaTeX{} to produce mailing labels by typing a
222 \hbox{\verb"\makelabels"} command before the \hbox{\verb"\begin{document}"}
223 command. \LaTeX{} prints the labels after all the letters, in a
224 format suitable for xerographic copying onto ``peel-off'' labels.
225 (The exact format will depend upon the labels available at your
226 institution.) A null \hbox{\tt letter} environment---i.e., one
227 with nothing between the \hbox{\verb|\begin|} and
228 \hbox{\verb|\end|} commands---will produce nothing but a mailing
229 label. Use such null environments to produce the mailing labels
230 for copies of the letter.
232 \closing{Good vibrations,}
234 \encl{Shelley\\Tiranti\\Van Dijk (Bold)}
238 \typeout{Each counter should have a non-zero value to show that the name has been changed}
239 \typeout{Counter ccname is \theccname}
240 \typeout{Counter enclname is \theenclname}
241 \typeout{Counter pagename is \thepagename}
242 \typeout{Counter headtoname is \theheadtoname}
244 % everything after this will be ignored by the test system.
245 % This line may be omitted, and replaced by \end{document}
246 % If it is necessary to run the \end{document} command, say
247 % to get the .aux files correct.