summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/letters/mvletter.sty
blob: d4fb0cbe5199d19efa0523828ca79f822b768da1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
% - kleinere Korrekturen, Martin Wunderli, 25.4.1991, 20.7.1991
% - an schweizer Sichtumschlge und eigene Bedfrnisse angepat, Martin
%   Wunderli, 29. Mrz 1991. Es wird die Benutzung des DINA4-Style
%   vorausgesetzt.
% - die Namensangaben gegen meine eigenen ausgetauscht, Stefan Lindner 16-Jun-89
% - modifiziert fuer eigene Beduerfnisse, Lutz Birkhahn 06-Apr-89
%   Ideen kommen von H. Kopka (LaTeX -- Eine Einfuehrung), vielen durch-
%   gesehenen Briefen und von meinem Kopf...
%   HINWEIS: Dieser Style war urspruenglich nur fuer meinen privaten
%   Gebrauch bestimmt, deshalb ist die Dokumentation und Kommentierung
%   auch recht spaerlich. Es war mal geplant, eine Style-Option "private"
%   zu unterstuetzen, bisher wird jedoch nur ein \if-Makro definiert
%   (\if@private), aber nirgends abgefragt... Wer das Buch von Kopka hat,
%   kann dort eine wesentlich ausfhrlichere Beschreibung lesen.
% - letter.sty 20-Jan-88

% Fr Leute, die DINA4.STY nicht haben:
% DINA4-Format
%\oddsidemargin 6pt\evensidemargin 6pt\marginparwidth 48pt\marginparsep 10pt 
%\topmargin -18pt\headheight 12pt\headsep 25pt\footheight 12pt\footskip 30pt 
%\textheight 625pt\textwidth 431pt\columnsep 10pt\columnseprule 0pt 

\typeout{Document Style `mwletter' <20 Juli 91>.}
\typeout{Bearbeitung fuer: Martin Wunderli}

\def\@ptsize{0} \@namedef{ds@11pt}{\def\@ptsize{1}}
\@namedef{ds@12pt}{\def\@ptsize{2}}
\@twosidefalse
\def\ds@draft{\overfullrule 5pt}
\newif\if@german \@germanfalse
\def\ds@german{\@germantrue}
\newif\if@private \@privatefalse
\def\ds@private{\@privatetrue}
\@options

\if@german\input german.sty \relax\fi

\lineskip 1pt \normallineskip 1pt
\def\baselinestretch{1}

\ifcase \@ptsize\relax
\def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6pt plus3pt
minus3pt\let\@listi\@listI}
\def\small{\@setsize\small{11pt}\ixpt\@ixpt
\abovedisplayskip 8.5pt plus 3pt minus 4pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2pt\belowdisplayshortskip 4pt plus2pt minus
2pt\def\@listi{\leftmargin\leftmargini \topsep 4pt plus 2pt minus 2pt\parsep
2pt plus 1pt minus 1pt
\itemsep \parsep}}
\def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
\abovedisplayskip 6pt plus 2pt minus 4pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus 1pt\belowdisplayshortskip 3pt plus 1pt minus
2pt\def\@listi{\leftmargin\leftmargini \topsep 3pt plus 1pt minus 1pt\parsep
2pt plus 1pt minus 1pt
\itemsep \parsep}}
\def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
\def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
\or
\def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
\abovedisplayskip 11pt plus3pt minus6pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt
minus3pt\let\@listi\@listI}
\def\small{\@setsize\small{12pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6pt plus3pt
minus3pt\def\@listi{\leftmargin\leftmargini \topsep 6pt plus 2pt minus
2pt\parsep 3pt plus 2pt minus 1pt
\itemsep \parsep}}
\def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
\abovedisplayskip 8pt plus 2pt minus 4pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus 1pt\belowdisplayshortskip 4pt plus 2pt minus
2pt\def\@listi{\leftmargin\leftmargini \topsep 4pt plus 2pt minus 2pt\parsep
2pt plus 1pt minus 1pt
\itemsep \parsep}}
\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
\or
\def\@normalsize{\@setsize\normalsize{15pt}\xiipt\@xiipt
\abovedisplayskip 12pt plus3pt minus7pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt
minus3pt\let\@listi\@listI}
\def\small{\@setsize\small{13.6pt}\xipt\@xipt
\abovedisplayskip 11pt plus3pt minus6pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt
minus3pt\def\@listi{\leftmargin\leftmargini \parsep 4.5pt plus 2pt minus 1pt
 \itemsep \parsep
 \topsep 9pt plus 3pt minus 5pt}}
\def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6pt plus3pt
minus3pt\def\@listi{\leftmargin\leftmargini \topsep 6pt plus 2pt minus
2pt\parsep 3pt plus 2pt minus 1pt
\itemsep \parsep}}
\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
\def\large{\@setsize\large{18pt}\xivpt\@xivpt}
\def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
\def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
\def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}
\let\Huge=\huge
\fi
\normalsize

\oddsidemargin 5mm \evensidemargin 5mm
\marginparwidth 90pt \marginparsep 11pt \marginparpush 5pt
\topmargin -14mm \headheight 30pt \headsep 20pt \footheight 12pt \footskip 20pt
\textheight 21cm \textwidth 14.8cm \columnsep 10pt \columnseprule 0pt
\raggedbottom
\footnotesep 12pt \skip\footins 10pt plus 2pt minus 4pt
\floatsep 12pt plus 2pt minus 2pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 12pt plus 2pt minus 2pt
\dblfloatsep 12pt plus 2pt minus 2pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@maxsep 20pt
\@dblmaxsep 20pt
\@fptop 0pt plus 1fil
\@fpsep 8pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 8pt plus 2fil
\@dblfpbot 0pt plus 1fil


% \newdimen\longindentation
% \longindentation=.5\textwidth
% \newdimen\indentedwidth
% \indentedwidth=\textwidth
% \advance\indentedwidth -\longindentation

\newlength{\rightfield}  \rightfield=63mm
\newlength{\leftfield}   \leftfield=\textwidth
                         \advance\leftfield by -\rightfield
\newlength{\hackleftfield} \hackleftfield=\leftfield
                           \advance\hackleftfield by -1.5mm

\newsavebox{\firm}      \newsavebox{\firmaddress}
\newsavebox{\firmreturn}

\sbox{\firm}{\normalsize\rm Martin Wunderli}

\sbox{\firmaddress}{
  \footnotesize
    \begin{minipage}{\hackleftfield}
      \sc
      Martin Wunderli\\
      Eschenweg 7\\
      CH--8057 Z\"urich
    \end{minipage}
    \begin{minipage}{\rightfield}
      \begin{tabbing}
        Internet: \= \kill
        Telefon:  \> 01/311 89 03\\
        Internet: \> martin.wunderli@dp.ethz.ch\\
        Fidonet:  \> 2:302/815.25
      \end{tabbing}
    \end{minipage}
}

\sbox{\firmreturn}
  {\underline{\viipt\rm Martin Wunderli $\cdot$ Eschenweg 7 $\cdot$ CH--8057 Z\"urich}}

\def\to@label#1#2{\setbox0\vbox{\xiipt\rm\parbox{\leftfield}{#1}\\{#2}}
   \vbox to 3cm{\vss \box0 \vss}}

%In diesem Absatz sind Aenderungen vorzunehmen:
\def\opening#1{
   \thispagestyle{firstpage}
 
   \makebox[\leftfield][l]{}
   \parbox[t]{\rightfield}{\usebox{\firmreturn}\\
      \to@label{\ifx\@specialmail\@empty \toname
                \else\underline{{\bf\@specialmail}}\\[1ex]\toname\fi}
               {\toaddress}}
         
   \vspace{1cm}
   \parbox[t]{\leftfield}{
      \ifx\@ymail\@empty
        \ifx\@yref\@empty
          \ifx\@subject\@empty
            \makebox[\leftfield][l]{}
          \else
            \makebox[\leftfield][l]{}\\[7mm]
          \fi
        \else
          \makebox[\leftfield][l]{\@yref}\\[7mm]
        \fi
      \else
        \makebox[\leftfield][l]{\@ymail \hfill \@yref \hfill}\\[7mm]
      \fi
                                                                      %\makebox[0pt][r]{---\hspace{1.6cm}}
      \ifx\@subject\@empty
        \makebox[\leftfield][l]{}
      \else
        \makebox[\leftfield][l]{\@subject}
      \fi}
   \@date\par
   \vspace{4\parskip}
   #1\par\nobreak
}

\long\def\closing#1{\par\nobreak\vspace{\parskip}
 \stopbreaks
 \noindent
 {\raggedright
 \ignorespaces #1\\[6\medskipamount] \ifx\@empty\fromsig
 \fromname
 \else \fromsig \fi\strut}
 \par}

\def\ps{\par\startbreaks}
\def\cc#1{\par\noindent
   \parbox[t]{\textwidth}{\@hangfrom
      {\rm\if@german Verteiler: \else cc: \fi}\ignorespaces #1\strut}\par}
\def\encl#1{\par\noindent
   \parbox[t]{\textwidth}{\@hangfrom
      {\rm\if@german Anlagen: \else encl: \fi}\ignorespaces #1\strut}\par}
\def\stopletter{}

\if@german
   \def\yref#1{\def\@yref{\parbox[t]{.5\leftfield}
      {\scriptsize Ihre Zeichen:\\ \normalsize #1}}}
   \def\ymail#1{\def\@ymail{\parbox[t]{.5\leftfield}
      {\scriptsize Ihre Nachricht vom:\\ \normalsize #1}}}
   \def\subject#1{\def\@subject{{\bf #1}}}
\else
   \def\yref#1{\def\@yref{\parbox[t]{.5\leftfield}
      {\scriptsize Your Ref.:\\ \normalsize #1}}}
   \def\ymail#1{\def\@ymail{\parbox[t]{.5\leftfield}
      {\scriptsize Your Mail's Date:\\ \normalsize #1}}}
   \def\subject#1{\def\@subject{{\sl Subject\/}: #1}}
\fi
\def\@yref{} \def\@ymail{} \def\@myref{} \def\@subject{}

\def\specialmail#1{\def\@specialmail{#1}}
\def\@specialmail{}
\def\email#1{\def\@email{#1}}
\def\@email{}
\def\mailbox#1{\def\@mailbox{#1}}
\def\@mailbox{}

\def\returnaddress{}
\newcount\labelcount

\def\startlabels{\labelcount=0 \baselineskip=0pt \lineskip=0pt
\pagestyle{empty}
\let\@texttop=\relax
\topmargin -50pt
\headsep 0pt
\oddsidemargin -35pt
\evensidemargin -35pt
\textheight 10in
\@colht\textheight \@colroom\textheight \vsize\textheight
\textwidth 550pt
\columnsep 25pt
\xpt
\baselineskip=0pt
\lineskip=0pt
\boxmaxdepth=0pt
\parindent=0pt \twocolumn\relax}
\def\mlabel#1#2{\setbox0\vbox{\parbox[b]{3.6in}{\strut\ignorespaces #2}}
 \vbox to 2in{\vss \box0 \vss}}


\long\def\letter#1{\newpage
 \c@page\@ne
 \interlinepenalty=200 \@processto{#1}}
\def\endletter{\stopletter\@@par\pagebreak\@@par
 \if@filesw
 \begingroup
 \def\protect{\string}
 \let\\=\relax
 \def\protect##1{\string##1\space}
 \immediate\write\@auxout{\string\mlabel{\returnaddress}{\toname
 \\\toaddress}}
 \endgroup
 \fi}
\long\def\@processto#1{\@xproc #1\\@@@\ifx\toaddress\@empty
 \else \@yproc #1@@@\fi}
\long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
\long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
\def\stopbreaks{\interlinepenalty \@M
 \def\par{\@@par\nobreak}\let\\=\@nobreakcr
 \let\vspace\@nobreakvspace}
\def\@nobreakvspace{\@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}
\def\@nobreakvspacex#1{\ifvmode\nobreak\vskip #1\relax\else
 \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}
\def\@nobreakcr{\vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}}
\def\startbreaks{\let\\=\@normalcr
 \interlinepenalty 200\def\par{\@@par\penalty 200}}
\def\name#1{\def\fromname{#1}}
\def\fromname{}
\def\signature#1{\def\fromsig{#1}}
\def\fromsig{}
\long\def\address#1{\def\fromaddress{#1}}
\def\fromaddress{}
\def\location#1{\def\fromlocation{#1}}
\def\fromlocation{}
\def\telephone#1{\def\telephonenum{#1}}
\def\telephonenum{}
\def\document{\endgroup
 \@colht\textheight \@colroom\textheight \vsize\textheight
 \columnwidth\textwidth \@clubpenalty\clubpenalty
 \if@twocolumn \advance\columnwidth -\columnsep
 \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
 \fi
 \hsize\columnwidth \linewidth\hsize
 \begingroup\@floatplacement\@dblfloatplacement\endgroup
 \if@filesw \immediate\openout\@mainaux=\jobname.aux
 \immediate\write\@mainaux{\string\startlabels\string\@startlabels}\fi
 \def\do##1{\let ##1\@notprerr}
 \@preamblecmds
 \let\do\noexpand
 \@normalsize\everypar{}}
\def\enddocument{\@checkend{document}\newpage\begingroup
\if@filesw \immediate\closeout\@mainaux
\makeatletter\input \jobname.aux\clearpage
\fi\endgroup\deadcycles\z@\@@end}

\def\makelabels{\@fileswtrue}
\def\@startlabels{}

\def\ps@headings{\headheight25pt
   \def\@oddhead{\usebox{\firm} \hrulefill\ \@date\ \hrulefill\ 
      \if@german Seite \else Page \fi\thepage}
   \def\@oddfoot{}}
\def\ps@empty{\def\@oddhead{}\def\@oddfoot{}\def\@evenhead{}\def\@evenfoot{}}

\def\ps@firstpage{\headheight36pt
  \def\@oddhead{\parbox{\textwidth}{\usebox{\firmaddress}\par}}
  \def\@oddfoot{}\def\@evenhead{}\def\@evenfoot{}}
\def\ps@plain{\def\@oddhead{}\def\@oddfoot{\rm\hfil\thepage
 \hfil}\def\@evenhead{}\let\@evenfoot\@oddfoot}

\parskip .7em \parindent 0pt \topsep .4em \partopsep 0pt \itemsep .4em
\@lowpenalty 51 \@medpenalty 151 \@highpenalty 301
\@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty
-\@lowpenalty

\leftmargini 2.5em
\leftmarginii 2.2em \leftmarginiii 1.87em \leftmarginiv 1.7em \leftmarginv 1em
\leftmarginvi 1em
\leftmargin\leftmargini
\labelwidth\leftmargini\advance\labelwidth-\labelsep
\labelsep 5pt
\parsep 0pt
\let\@listi\relax
\def\@listii{\leftmargin\leftmarginii
 \labelwidth\leftmarginii\advance\labelwidth-\labelsep}
\def\@listiii{\leftmargin\leftmarginiii
 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
 \topsep .2em
 \itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
 \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}

\def\labelenumi{\arabic{enumi}.}
\def\theenumi{\arabic{enumi}}
\def\labelenumii{(\alph{enumii})}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}
\def\labelenumiii{\roman{enumiii}.}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}
\def\labelenumiv{\Alph{enumiv}.}
\def\theenumiv{\Alph{enumiv}}
\def\p@enumiv{\p@enumiii\theenumiii}

\def\labelitemi{$\bullet$}
\def\labelitemii{\bf --}
\def\labelitemiii{$\ast$}
\def\labelitemiv{$\cdot$}
\def\verse{\let\\=\@centercr
 \list{}{\itemsep\z@ \itemindent -15pt\listparindent \itemindent
 \rightmargin\leftmargin\advance\leftmargin 15pt}\item[]}
\let\endverse\endlist
\def\quotation{\list{}{\listparindent 1.5em
 \itemindent\listparindent
 \rightmargin\leftmargin}\item[]}
\let\endquotation=\endlist
\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

\def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
 \let\makelabel\descriptionlabel}}
\let\enddescription\endlist

\def\theequation{\arabic{equation}}

\arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt
\tabbingsep \labelsep
\skip\@mpfootins = \skip\footins
\fboxsep = 3pt \fboxrule = .4pt

\def\footnoterule{\kern-1\p@
 \hrule width .4\columnwidth
 \kern .6\p@}

\long\def\@makefntext#1{\noindent \hangindent 5pt\hbox
 to 5pt{\hss $^{\@thefnmark}$}#1}

\c@topnumber=2
\def\topfraction{.7}
\c@bottomnumber=1
\def\bottomfraction{.3}
\c@totalnumber=3
\def\textfraction{.2}
\def\floatpagefraction{.5}
\c@dbltopnumber= 2
\def\dbltopfraction{.7}
\def\dblfloatpagefraction{.5}

\if@german \else
   \def\today{\ifcase\month\or
      January\or February\or March\or April\or May\or June\or
      July\or August\or September\or October\or November\or December\fi
      \space\number\day, \number\year}
\fi

\smallskipamount=.5\parskip \medskipamount=\parskip
\bigskipamount=2\parskip
\ps@plain \pagenumbering{arabic} \onecolumn \@fileswfalse