About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Latest news 2024-10-15: New blog post: Tales for Our Times Book Launch.


3.3 Writing a Letter Using the newlfm Class

The newlfm class [107] provides the newlfm environment

\begin{newlfm}
text
\end{newlfm}

where ⟨text⟩ is the body of the letter. The salutation text and recipient's name and address all need to be specified before this environment.

The date of the letter defaults to the current date (via \today) but can be set using:

\dateset{date}

The salutation text is specified via:

\greetto{text}

For example

\greetto{Dear Mrs Canary}

The closing text is specified via:

\closeline{text}

For example

\closeline{Yours sincerely}

The recipient's name is specified via:

\nameto{name}

For example:

\nameto{Mrs Mabel Canary}

The recipient's address is specified via:

\addrto{address}

For example:

\addrto{24 The Street\\
Some Village\\
Some Town\\
Noshire\\
AB1 2YZ
}

The sender's name is specified via:

\namefrom{name}

For example:

\namefrom{Mr Big Head}

The sender's address is specified via:

\addrfrom{address}

For example

\addrfrom{University of Somewhere\\
Some City\\
AB3 4YZ}

The sender's phone number is specified via:

\phonefrom{number}

For example

\phonefrom{0123456789}

The sender's email address is specified via:

\emailfrom{address}

For example

\emailfrom{big.head@somewhere.ac.uk}

The subject text is specified via:

\regarding{text}

For example:

\regarding{sample letter}

The postscript is specified via:

\psitem{text}

For example:

\psitem{Don't forget to bring some cake!}

The post-postscript is specified via:

\ppsitem{text}

For example:

\ppsitem{And the ice cream!}

The “CC” list is specified via:

\cclist{text}

For example:

\cclist{Prof Important Person}

The list of enclosures is specified via:

\encllist{text}

For example:

\encllist{Photograph of a hat}

There are other commands as well. See the newlfm documentation [107] for further details.

The newlfm class comes with a number of predefined letter styles, which can be set via the class options: busletter, busletternofrom, stdletter, stdletterfrom. The “nofrom” styles don't display the sender's address. The business letter “busletter” styles use a different alignment to the standard “stdletter” styles.

Alternatively, the letter style can be set via:

\newlfmP{option list}

Other letter-related options that can be set using \newlfmP (or in the class option list) are listed in Table 3.3.


Table 3.3: Letter Options for the newlfm Class
Option Description
noaddrfrom Omit sender's address.
addrfromphone Include sender's phone.
addrfromemail Include sender's email.
addrfromfax Include sender's fax.
printallfrom Print all of the sender's details.
addrfromright Right-align sender's block.
addrfromleft Left-align sender's block.
printallto Print all of recipient's details.
addrtoright Right-align recipient's block.
addrtoleft Left-align recipient's block.
addrtophone Include recipient's phone.
addrtoemail Include recipient's email.
addrtofax Include recipient's fax.
dateright Right-align date.
dateleft Left-align date.
datecenter Centre date.
dateyes Include date.
dateno Don't include date.
orderdatefromto Display order: date, sender, recipient.
orderfromtodate Display order: sender, recipient, date.
orderfromdateto Display order: sender, date, recipient.
sigright Right-align signature.
sigleft Left-align signature.
sigcenter Centre signature.
   

Example 15. A Simple Letter (newlfm class)

Here's a simple letter using the newlfm class:

\documentclass[stdletter]{newlfm}

\usepackage[british]{babel}

\newlfmP{orderfromtodate,sigcenter,addrfromphone,addrfromemail}

\nameto{Mrs Mabel Canary}
\addrto{24 The Street\\
Some Village\\Some Town\\
Noshire\\AB1 2YZ}

\namefrom{Mr Big Head}
\addrfrom{University of Somewhere\\Some City\\AB3 4YZ} 
\emailfrom{big.head@somewhere.ac.uk}
\phonefrom{0123456789}

\regarding{A sample letter}

\greetto{Dear Mrs Canary}
\closeline{Yours sincerely}
\cclist{Prof Important Person\\Dr Bor Ing}
\encllist{Photocopy of something interesting\\
   Photocopy of something rather dull}
\psitem{this is a postscript}

\begin{document}

\begin{newlfm}
  This is an imaginary letter.

  This is the second paragraph of the letter.
\end{newlfm}

\end{document}

(You can download or view this example.) The resulting document is shown in Figure 3.4.

Figure 3.4: A Simple Letter Using the newlfm Class
 

University of Somewhere
Some City
AB3 4YZ
Telephone: 0123456789
E-mail: big.head@somewhere.ac.uk

Mrs Mabel Canary
24 The Street
Some Village
Some Town
Noshire
AB1 2YZ

25th February 2014

Regarding: A sample letter

Dear Mrs Canary

This is an imaginary letter.

This is the second paragraph of the letter.

Yours sincerely

Mr Big Head

PS: this is a postscript.

encl: Photocopy of something interesting
  Photocopy of something rather dull

cc: Prof Important Person
  Dr Bor Ing
End of Image.

Exercise 9. Writing a Letter (newlfm class)

Create the document from Example 15 and try adjusting some of the options given in Table 3.3.

For the More Adventurous

As with Exercise 8, use one of the commands described in §2.8 Fetching Data From a Given Row to fetch the recipient's details from the sample people.csv file or the people SQL table rather than explicitly typing them into the document. You can download or view a solution.


This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-07-4).

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs