From UCB Math Wiki
Jump to: navigation, search

Writing Letters in TeX: The ucbletter Document Class

The ucbletter class is a subclass of the standard LaTeX letter class that incorporates the University of California letterhead.

The Letter Environment

The letter environment is used to create a standard business letter.

The following declarations, shown with examples, give information about the sender. See the sample files for placement.

\name{Dr. L. User} To be used for the return address on the envelope.
\signature{Larry User} Goes after the closing.
\address{3245 Foo St.\\Gnu York} Used as the return address in the letter and on the envelope. If not declared, then an institutional standard address is used. If declared, then is suppressed unless \letterheadanyway is used.
\letterheadanyway Causes the letterhead to appear even if the \address macro is used.
\location{Room 374} Acts as modifier to the standard institutional address.
\telephone{(510) 123-4567} Put into the letterhead.
\email{dave@hal.jupiter.mil} Put into the letterhead.
\sigspace=36pt Amount of space to allow for the signature. The default value is 36 points, which is equivalent to four typewriter line spaces. This is the standard for business letters. I've seen more space used, but not less, and recommend against decreasing it, but requests to change it seem to refer to decreasing it. I should put in a nasty warning if people put in too little space.

In all of the above, the \sfcode for "." is set to 1000, so one never needs to say "Mr.\ User".

The following modify the letterhead; default values are declared at the end of the file:

\upperaddress{1234 CHANNING WAY}

N.B.: \department erases whatever \mailcode is in effect, so the \mailcode must come after the \department.

In this installation, the letterhead appears as:

  --------------------------------- <logo, etc.> ----------------
\department                           \upperaddress
\location                             BERKELEY, CALIFORNIA  94720-\mailcode
\email *                              \telephone
                                      \email *

&ast; By default, the \email appears on the right; this can be overridden by specifying \emailatleft or \emailatright.

The macro \adjustmargins can be used to make the margins wider--for example, \adjustmargins{.5in}. This affects top and bottom margins as well, but not the placement of the letterhead. This should be done before the macro \begin{document}.

Another option is to set \textwidth and \textheight directly. Again, this should be done before \begin{document}; you should also adjust \oddsidemargin, \evensidemargin, and \indentedwidth if you change \textwidth, and \topmargin, \headsep, and \footskip if you change \textheight. An alternative is to use the center option on the \documentclass line; it will then center the letter automatically.

The signature will appear on the right, aligned with the address, if one is given; otherwise it will appear on the left. This can be overridden with \closingatright or \closingatleft.

The \makelabels declaration causes mailing labels to be made. It must go before the \begin{document} command.

The letter environment creates a new letter, starting from page 1. (The first page is unnumbered.) It has a single argument, giving the addressee and his/her address, as in:

\begin{letter}{Sam Jones\\Institute for Study\\Princeton, N.J.}

Local declarations, such as \address, can follow the \begin{letter}. For informal letters, the address of the recipient can be left out:


Text is begun with the \opening command, whose argument generates the salutation, as in

\opening{Dear Henry,}

The body of the letter follows, ended by a \closing command, as in

\closing{Yours truly,}

The "signature" is provided automatically.

After the \closing you can put arbitrary stuff, which is typeset with \parindent=0 and no page breaking. Commands designed for use after the closing are:

  • \cc{Tinker\\Evers\\Chance} -- which produces:
cc: Tinker
  • \encl{Foo(2)\\Bar} -- which produces:
encl: Foo(2)

The Memo Environment

The ucbletter class also implements the UC interdepartmental memo format as a memo environment. The use is much the same as for the letter environment; we will give here only the differences.

The \begin{memo} macro has one argument giving the recipient(s); for example,

\begin{memo}{Sam Jones\\Nicolas Bourbaki}

To declare the subject of the memo, the \begin may be followed immediately by a \subject or \re macro:

\re{Our recent discussion}

The text of the memo follows; the \opening macro, if present, is ignored. After the memo, one can invoke the \closing macro (whose argument, in this case, is ignored; the macro merely serves the purpose of preventing further page breaks). The usual \cc and \encl options may follow this; if they are not used, then there is no point in using the \closing macro, either. The reason for keeping the \opening and \closing macros is so that a letter can be converted to a memo merely by changing the name of the environment. The converse works as well: the \subject or \re macros are ignored in the letter environment.

However, there is an option allowing the end of the memo to be treated as a signed letter. To specify this option, just include signed as one of the options in the \documentstyle line. In that case the \closing macro functions just as it does for a letter.

The format of the top of the memo is:

                                 BERKELEY:  \department


Sample Documents

Sample documents using the ucbletter class are available.