Sunteți pe pagina 1din 3

LaTeX/Letters

Sometimes the mundane things are the most painful.


However, it doesn't have to be that way because of
evolved, user-friendly templates. Thankfully, LaTeX allows for very quick letter writing, with little hassle.

The letter class

To write letters use the standard document class letter.


You can write multiple letters in one LaTeX le - start
each one with \begin{letter}{''recipient''} and end with
\end{letter}. You can leave recipient blank. Each letter
consists of four parts.
1. Opening (like \opening{Dear Sir or Madam,} or
\opening{Dear Kate,}).
2. Main body (written as usual in LaTeX). If you want
the same body in all the letters, you may want to consider putting the entire body in a new command like
\newcommand{\BODY}{actual body} and then using \BODY in all the letters.
A sample letter.

3. Closing (like \closing{Yours sincerely,}).


LaTeX will leave some space after closing for your hand-written signature; then
it will put your name and surname, if you
have declared them.

2.1 Using the envlab package

The envlab package provides customization to the \make4. Additional elements: post scripta, carbon copy and labels command, allowing the user to print on any of an
assortment of labels or envelope sizes. For example, belist of enclosures.
ginning your LaTeX le the following way produces a
If you want your name, address and telephone number to document which includes the letter and a business-size
appear in the letter, you have to declare them rst signa- (#10) envelope on the following page.
ture, address and telephone.

Refer to the envlab user guide for more information about


this capable package. Note that the envlab package has
issues displaying characters outside the base ASCII character set, see this bug report for more information.

The output letter will look like this:


Here is the examples code:
To move the closing and signature parts to the left, insert
the following before \begin{document}:
\longindentation=0pt

The amount of space to the left can be adjusted by in- 2.2


creasing the 0pt.

Using the geometry package

Here is a relatively simple envelope which uses the geometry package which is used because it vastly simplies
the task of rearranging things on the page (and the page
itself).

Envelopes
1

5 SOURCES

A sample envelope to be printed in landscape mode.

2.3

Printing

The above will certainly take care of the spacing but the
actual printing is between you and your printer. One user
reports that printing envelopes created with envlab is relatively painless. If you use the geometry package, you
may nd the following commands useful for printing the
envelope.
$ pdatex envelope.tex $ pdf2ps envelope.pdf $ lpr -o
landscape envelope.ps
Alternatively, you can use the latex dvi output driver.
In the rst line, dvips command converts the .dvi le produced by latex into a .ps (PostScript) le. In the second
A sample letter with folding marks ready for standardized winline, the PostScript le is sent to the printer.
dowed envelopes.
$ latex envelope.tex && dvips -t unknown -T
9.5in,4.125in envelope.dvi $ lpr -o landscape envelope.ps
It is reported that pdatex creates the right page size but
not dvips despite what it says in the geometry manual.
It will never work though unless your printer settings are
adjusted to the correct page style. These settings depend
on the printer lter you are using and in CUPS might be
available on the lpr command line.

Windowed envelopes

An alternative to separately printing addresses on envelopes is to use the letter class from the KOMA package.
It supports additional features like folding marks and the
correct address placement for windowed envelopes. Using the scrlttr2 document class from the KOMA package
the example letter code is:
The output is generated via
$ pdatex koma_env Folding the print of the resulting
le koma_env.pdf according the folding marks it can be
placed into standardized windowed envelopes DIN C6/5,
DL, C4, C5 or C6.
In addition to the default, the KOMA-package includes
predened format denitions for dierent standardized
Swiss and Japanese letter formats.

4 Reference: letter.cls commands


5 Sources
KOMA-Script - The Guide

Text and image sources, contributors, and licenses

6.1

Text

LaTeX/Letters Source: http://en.wikibooks.org/wiki/LaTeX/Letters?oldid=2766656 Contributors: Derbeth, Edudobay, Mwtoews, Xania,


Jld, Garoth, Pi zero, Neoptolemus, CarsracBot, Gms, ChrisHodgesUK, QuiteUnusual, Ambrevar, GavinMcGimpsey, Tomato86, E.lewis1,
SamuelLB, Empirical bayesian, TheAnarcat and Anonymous: 27

6.2

Images

File:Clipboard.svg Source: http://upload.wikimedia.org/wikipedia/commons/1/1f/Clipboard.svg License: GPL Contributors: Self-made.


Based on Image:Evolution-tasks-old.png, which was released into the public domain by its creator AzaToth. Original artist: Tkgd2007
File:Envelope.jpg Source: http://upload.wikimedia.org/wikibooks/en/e/ef/Envelope.jpg License: Public domain Contributors: ? Original
artist: ?
File:Koma_env.png Source: http://upload.wikimedia.org/wikibooks/en/0/05/Koma_env.png License: Cc-by-sa-3.0 Contributors:
own work, basing on Formal - Another proposition from Wikipedia:Example requests for permission under GFDL license
Original artist:
gms
File:LaTeX-letter.png Source: http://upload.wikimedia.org/wikibooks/en/f/f0/LaTeX-letter.png License: GFDL Contributors:
own work, basing on Formal - Another proposition from Wikipedia:Example requests for permission under GFDL license Original artist:
Derbeth
File:LaTeX_logo.svg Source: http://upload.wikimedia.org/wikipedia/commons/9/92/LaTeX_logo.svg License: Public domain Contributors: ? Original artist: ?

6.3

Content license

Creative Commons Attribution-Share Alike 3.0

S-ar putea să vă placă și