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}
Here is a play-by-play of how one can do it using potrace
. It is similar to autotrace
and provides a command line functionality/interface.
- Download
potrace
. It is available for virtually every distribution out there.
- Unpack it.
Provide a signature in (say) BMP high resolution format (click to enlarge and see the quality):
Store this file signature.bmp
in your potrace
folder.
Execute from the command line:
>potrace signature.bmp -b PDF -o signature.pdf
to create a PDF of signature.bmp
. Alternatively, just executing
>potrace signature.bmp
would yield signature.eps
that can be converted using epstopdf
signature.eps
. This uses the default potrace
settings/options and produces as output (click to enlarge and see the quality):
Other tracing options are also available. See the potrace
usage page for details on the type of options you can specify.
Include it in your document...
\documentclass{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\setlength{\parindent}{0pt}% Remove paragraph indent
\begin{document}
\hspace*{0.5\linewidth}
\begin{minipage}{0.4\linewidth}
Random Institute \par
Random City 1000 \par
Randomia \par
\today
\end{minipage}
To whom it may concern: \par \bigskip
Hire me, it'll be worth your while. \par \bigskip
Sincerely, \par \medskip
\includegraphics[height=1.5\baselineskip]{signature} \par
Random Randofsky \par
Randomville
\end{document}
potrace
also forms part of Inkscape's trace bitmap functionality, allowing you to use it in a GUI environment as well.
Best Answer
There's a list of resources in CTAN that could be useful: Writing invoices