My choice would be the document class scrlttr2
. It can be customized in many ways.
A very quick way to get the address field to the right is using the document class option SN:
\documentclass[a4paper,SN]{scrlttr2}
This option decides that the file SN.lco
has to be used which sets the address to the right side. If you look into this file, which is located in the same folder like the scrlttr2 class, you would see the used lenghts. They are set by the command \@setplength
. Those lengths are called pseudolengths, they are described in the KOMA-Script manual. Have a look at Figure 6.1.: Schematic of the pseudo-lengths for a letter. It's a drawing visualing the lenghts. Here are useful for instance toaddrhpos
, toaddrvpos
, toaddrwidth
and toaddrheight
, toaddrindent
and toaddrindent
. You could adjust those lengths in your preamble according to your needs.
It may be done linke this, in your preamble:
\makeatletter
\@setplength{toaddrvpos}{40mm}
\@setplength{toaddrhpos}{110mm}
\makeatother
You could vary these values until they fit well, or calculate it from the paper size and the other dimensions.
Taking the definition from the article
class, I get good results with
\begin{filecontents}{letter.bib}
@article{First,
author = "Other, A. N.",
title = "Some things {I} did",
journal = "J. Irreproducible Results",
year = "2011"
}
@article{Second,
author = "Aaa, S{\o}mebloke",
title = "Tigers",
journal = "Ann. Improbable Res.",
year = "2011"
}
\end{filecontents}
\documentclass{letter}
\makeatletter
\newenvironment{thebibliography}[1]
{\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
\makeatother
\begin{document}
\begin{letter}{Some person}
\opening{Hello}
Some text \cite{First}, more text \cite{Second}.
\bibliographystyle{unsrt}
\bibliography{letter}
\end{letter}
\end{document}
I've used the unsrt
style here, as plain
would put the references in alphabetical rather than citation order. I've also modified the definition of thebiliography
a little, removing the section-related stuff as this does not really seem relevant to a letter. (I also took out the code related to the openbib
option for the article
class, again as it does not seem relevant.)
The second edit to the question asks about natbib
. For me, this works if I load natbib
after defining thebiliography
and if I make \bibsection
'safe':
\begin{filecontents}{letter.bib}
@article{First,
author = "Other, A. N.",
title = "Some things {I} did",
journal = "J. Irreproducible Results",
year = "2011"
}
@article{Second,
author = "Aaa, S{\o}mebloke",
title = "Tigers",
journal = "Ann. Improbable Res.",
year = "2011"
}
\end{filecontents}
\documentclass{letter}
\makeatletter
\newenvironment{thebibliography}[1]
{\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
\makeatother
\usepackage[numbers]{natbib}
\let\bibsection\relax
\begin{document}
\begin{letter}{Some person}
\opening{Hello}
Some text \cite{First}, more text \cite{Second}.
\bibliographystyle{unsrtnat}
\bibliography{letter}
\end{letter}
\end{document}
Best Answer
I recommend using the scrlttr2 class.
\section
,\subsection
,\subsubsection
,\paragraph
and\minisec
: the KOMA-Script author provides the option filesections.lco
for it, with an examplescrpage2
with it for header and footerfloat
and thecaption
packageOriginally, the KOMA-Script manual, including the sclttr2 documentation, has been written in German, also published as a book. There's an english translation, which could be a bit behind the most current features (currently 2011-05-30).
As a general remark: I expect a letter class to provide letter functionality, a book class to offer book features etc. - not a class to do all. There are many classes for different purposes and even if one uses two classes, the results can be merged.