# LaTeX/Letters

* LaTeX
* Getting Started
* Introduction
* Installation
* Installing Extra Packages
* Basics
* How to get help
* Common Elements
* Document Structure
* Text Formatting
* Paragraph Formatting
* Colors
* Fonts
* List Structures
* Special Characters
* Internationalization
* Rotations
* Tables
* Title creation
* Page Layout
* Customizing Page Headers and Footers‎
* Importing Graphics
* Floats, Figures and Captions
* Footnotes and Margin Notes
* Hyperlinks
* Labels and Cross-referencing
* Initials
* Mechanics
* Errors and Warnings
* Lengths
* Counters
* Boxes
* Rules and Struts
* Technical Text
* Mathematics
* Advanced Mathematics
* Theorems
* Chemical Graphics
* Algorithms
* Source Code Listings
* Linguistics
* Special Pages
* Indexing
* Glossary
* Bibliography Management
* More Bibliographies
* Special Documents
* Scientific Reports (Bachelor Report, Master Thesis, Dissertation)
* Letters
* Presentations
* Teacher's Corner
* Curriculum Vitae
* Academic Journals (MLA, APA, etc.)
* Creating Graphics
* Introducing Procedural Graphics
* MetaPost
* Picture
* PGF/TikZ
* PSTricks
* Xy-pic
* Creating 3D graphics
* Programming
* Macros
* Plain TeX
* Creating Packages
* Creating Package Documentation
* Themes
* Miscellaneous
* Modular Documents
* Collaborative Writing of LaTeX Documents
* Export To Other Formats
* Help and Recommendations
* FAQ
* Tips and Tricks
* Appendices
* Authors
* Links
* Package Reference
* Sample LaTeX documents
* Index
* Command Glossary
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 file - start each one with \begin{letter}{''recipient''} and end with \end{letter}. You can leave recipient blank. Each letter consists of four parts.
* Opening (like \opening{Dear Sir or Madam,} or \opening{Dear Kate,}).
* 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.
* 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.
* Additional elements: post scripta, carbon copy and list of enclosures.
If you want your name, address and telephone number to appear in the letter, you have to declare them first signature, address and telephone.
The output letter will look like this:
Here is the example's 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 increasing the 0pt.

## Envelopes
### Using the envlab package

The envlab package provides customization to the \makelabels command, allowing the user to print on any of an assortment of labels or envelope sizes. For example, beginning your LaTeX file the following way produces a document which includes the letter and a business-size (#10) envelope on the following page.
* \documentclass{letter}
* \usepackage[businessenvelope]{envlab}
* \makelabels
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.

### Using the geometry package

Here is a relatively simple envelope which uses the geometry package which is used because it vastly simplifies the task of rearranging things on the page (and the page itself).
* % envelope.tex
* \documentclass{letter}
* \usepackage[left=1in,top=0.15in,papersize={4.125in,9.5in},landscape,twoside=false]{geometry}
* \setlength\parskip{0pt}
* \pagestyle{empty}
* \begin{document}
* FROM-NAME
* FROM-STREET ADDRESS
* FROM-CITY, STATE, \ ZIP
* \vspace{1.0in}\large
* \setlength\parindent{3.6in}
* TO-NAME
* TO-STREET ADDRESS
* TO-CITY, STATE, \ ZIP
* \end{document}

### 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 find the following commands useful for printing the envelope.
Alternatively, you can use the latex dvi output driver.
In the first line, dvips command converts the .dvi file produced by latex into a .ps (PostScript) file. In the second line, the PostScript file is sent to the printer.
It is reported that pdflatex 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 filter 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
Folding the print of the resulting file 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 predefined format definitions for different standardized Swiss and Japanese letter formats.

## Reference: letter.cls commands

| command | description |
| \name | |
| \signature | |
| \address | |
| \location | |
| \telephone | |
| \makelabels | |
| \stopbreaks | |
| \startbreaks | |
| \opening | |
| \closing | |
| \cc | Start a parbox introduced with \ccname: |
| \encl | Start a parbox introduced with \enclname: |
| \ps | Begins a new paragraph, normally at the close of the letter |
| \stopletter | (empty) |
| \returnaddress | (empty) |
| \startlabels | |
| \mlabel | |
| \descriptionlabel | |
| \ccname | "cc" |
| \enclname | "encl" |
| \pagename | "Page" |
| \headtoname | "To" |
| \date | Alter the date. See datetime package for alternative formattings. |
| \today | Long form date |
| environment | Description |
| letter | See main article |
| description | |
| verse | |
| quotation | |
| quote | |

## Sources

* koma-script – A bundle of versatile classes and packages