3.3 Writing a Letter Using the newlfm Class

The newlfm class [107] provides the newlfm environment


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:


The salutation text is specified via:


For example

\greetto{Dear Mrs Canary}

The closing text is specified via:


For example

\closeline{Yours sincerely}

The recipient's name is specified via:


For example:

\nameto{Mrs Mabel Canary}

The recipient's address is specified via:


For example:

\addrto{24 The Street\\
Some Village\\
Some Town\\

The sender's name is specified via:


For example:

\namefrom{Mr Big Head}

The sender's address is specified via:


For example

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

The sender's phone number is specified via:


For example


The sender's email address is specified via:


For example


The subject text is specified via:


For example:

\regarding{sample letter}

The postscript is specified via:


For example:

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

The post-postscript is specified via:


For example:

\ppsitem{And the ice cream!}

The “CC” list is specified via:


For example:

\cclist{Prof Important Person}

The list of enclosures is specified via:


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:




\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} 

\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}


  This is an imaginary letter.

  This is the second paragraph of the letter.


(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
Telephone: 0123456789
E-mail: big.head@somewhere.ac.uk

Mrs Mabel Canary
24 The Street
Some Village
Some Town

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