% If you don't have datetime.sty, omit "datetime" option.
\documentclass[personal,confidential,11pt,datetime,notheaded]{uealettr}

\usepackage{times}   % Times roman font
\usepackage{helvet}  % Helvetica sans-serif font
\usepackage{courier} % Courier typewriter font
%\usepackage{graphicx}

%\logo{\includegraphics[height=3.3cm,angle=-90]{uealogo.ps}}
\logo{\em insert logo here}

\signature{Dr Nicola Talbot\\
           Honarary Lecturer}

\location{School of Computing Sciences}
\division{\LaTeX\ Support Group}

\telephone{01603 456161}
\directdial{01603 592847}
\fax{01603 593345}
\email{sample@cmp.uea.ac.uk}

\myref{latex/uealettr}
\yourref{a/query}
\subject{Sample Letter}

\begin{document}

\begin{letter}{Prof. Some One\\1 The Street\\
               The Town\\
               The County\\
               AB1 2XY}

\opening{Dear Sir/Madam}

This is a sample letter using the \textsf{uealettr} class file.
It is recommended that the Times (Roman), Helvetica or Avant Garde (Sans Serif) 
and Courier (Typewriter) fonts
are used instead of the Computer Modern fonts, as they look a bit
better.  These fonts can be obtained by using the \textsf{times},
\textsf{helvet} or \textsf{avant} and \textsf{courier} packages.

All options that can be passed to \textsf{letter} class file, can also
be passed to \textsf{uealettr} (except for the paper size which is fixed at A4).  
In addition, the following options can also be passed to \textsf{uealettr}:

\begin{description}
\item[headed] This option assumes the letter will be printed on headed
paper, and so the sender details are omitted. (Default)

\item[notheaded] This option assumes the letter will be printed on blank
paper, and so the sender details are placed at the top of the letter.

\item[personal] This option indicates that the letter is personal, 
and the word \textbf{PERSONAL} is typeset above the recipients address.

\item[notpersonal] This option indicates that the letter is not personal. (Default)

\item[confidential] This option indicates that the letter is confidential,
and the word \textbf{CONFIDENTIAL} is typeset above the recipients address.

\item[notconfidential] This option indicates that the letter is not confidential. (Default)

\item[datetime] Use the \textsf{datetime} package to display the date in full
on the first page, and abbrieviated in the header of subsequent pages.

\item[nodatetime] Don't use \textsf{datetime} package. (Default)

\end{description}

Each letter should be enclosed in a \textsf{letter} environment.  Multiple letters may be
enclosed in one document using multiple \textsf{letter} environments.  
The \textsf{letter} environment takes one argument that should
be the recipient's name and address.  The \verb|\\| command may be used to provide line 
breaks within the recipient's address.  The first line is taken to be the recipient's name.
For example:
\begin{verbatim}
\begin{letter}{Prof. Some One\\1 The Street\\
               The Town\\
               The County\\
               AB1 2XY}
\end{verbatim}
``Prof. Some One'' is the recipient, the remainder is the address.

Within the letter environment, the following commands may be used:

\begin{description}

\item[\textbackslash opening] This command takes one argument, and indicates the
opening salutation.\newline (e.g.\ \verb|\opening{Dear Sir}|)

\item[\textbackslash closing] This command takes one argument, and indicates the
closing text.\newline  (e.g.\ \verb|\closing{Yours Faithfully}|)

\item[\textbackslash cc] This command takes one argument, and indicates who the letter
should be copied to.  This command should come after the \verb|\closing| command.

\item[\textbackslash encl] This command takes one argument, and indicates 
any enclosures with the letter.  This command should come after the \verb|\closing| command.

\item[\textbackslash ps]  This command takes no argument.  All text from this point until the
end of the \textsf{letter} environment is treated as a postscript.
\end{description}

The \textsf{uealettr} class file is based on the \textsf{letter} class file.  The following 
commands are provided:

\begin{description}
\item[\textbackslash signature] This command takes one argument, and indicates who
the letter is from.

\item[\textbackslash location] This command takes one argument, and indicates the
school.  The argument will appear at the top left of the first page, provided the
\texttt{notheaded} option is used.

\item[\textbackslash division] This command takes one argument, and indicates the group
within the school that the letter is from.

\item[\textbackslash telephone] This command takes one argument, and indicates the main 
telephone number.

\item[\textbackslash directdial] This command takes one argument, and indicates the direct
dial number of the sender.

\item[\textbackslash fax] This command takes one argument, and indicates the fax number.

\item[\textbackslash email]  This command takes one argument, and indicates the e-mail
address of the sender if required.

\item[\textbackslash myref] This command takes one argument, and indicates the sender's reference
if required.

\item[\textbackslash yourref] This command takes one argument, and indicates the recipient's
reference if required.

\item[\textbackslash subject] This command takes one argument, and indicates the subject of
the correspondence if required.

\item[\textbackslash logo] This command takes one argument, which is the logo to appear
at the top right corner of the first page.  For example
\begin{verbatim}
\logo{\includegraphics[height=3.3cm]{uealogo.ps}}
\end{verbatim}
By default, this is an empty box of width 4cm and height 3.3cm.
The UEA logo is not supplied with this class file.

\end{description}

The default page styles are \textsf{firstpage} for the first page of the letter and
\textsf{uealettr} for subsequent pages.  If the letter is more than one page long,
the text \emph{Continued / \ldots} appears at the foot of all but the last page.
The \textsf{uealettr} page style places the recipient's name, the date and the
page number out of total page number in the header.  Other page available page
styles are: \textsf{empty}, \textsf{plain} and \textsf{headings}.  The latter is
similar to \textsf{uealettr} but does not give the total number of pages.
Since \LaTeX\ needs to know the total number of pages in the letter for the \textsf{uealettr}
page style, the document will need to be re-run to get it up-to-date.

The date is taken to be the current date given by \verb|\today|.  By default, the
date is formatted in the US style, but can be changed using packages such as
\textsf{ukdate} or \textsf{datetime}.  Alternatively the date can be specified
explicitly using the \verb|\date| command.  (e.g.\ \verb|\date{17 Dec, 2003}|)
The \verb|\date| command has an optional argument that specifies an abbreviated version
to put at the head of subsequent pages.  For example, using the \textsf{datetime}
package, the command
\begin{verbatim}
\date[\shortdate\today]{\longdate\today}
\end{verbatim}
will result in the full date
appearing at the start of the letter, but a short date at the head of page~2 onwards.
(Passing the option \textsf{datetime} to \textsf{uealettr} achieves the same effect.)

The package \textsf{csvtools} is available for mail merging.  See the \textsf{csvtools}
documentation on how to do this.

\closing{Yours Faithfully}

\cc{Dr G. Cawley\\
    Dr A. N. Other}

\encl{printout of source code\\
      floppy disk}

\ps

P.S. A postscript to this letter.

\end{letter}

\end{document}
