Letters are still rarely written in Latex, even though its so simple and straight forward. With this post we hope to convince at least some people to write letters using Latex. The advantages are obvious, you get a standard layout (which can be changed if necessary), the output is in PDF-format and last but not least, Latex is fun!
The following is a sample code, which can be used for writing a letter in Latex.
\documentclass{letter} \signature{Your name} \address{Street \\ City \\ Country} \begin{document} \begin{letter}{Company name \\ Street\\ City\\ Country} \opening{Dear Sir or Madam:} \dots \closing{Yours Faithfully,} \ps{P.S. Here goes your ps.} \encl{Enclosures.} \end{letter} \end{document}
Example output
For more space before or after paragraphs, openings or closings use \vspace{1cm}
.
For a complete list of available commands or if you need to change margins, have a look at the letter style file (letter.sty)
arbitblogs
Dude whoever u are u are doing a great help here…i was recently initiated into the world of TeX… Never turned to Word again.
I have always been wanting to know how to write letters in LaTeX…
Thanks for the tip…i really didnt know it was this damn simple…
Simon Tyrberg
Thanks for the tip – one question though: is it possible to somehow include pictures in letters? It seems when I’m trying that the “figure” environment isn’t defined when you use the “letter” documentclass.
aalderinkg
There are a lot of different styles out there to help with writing letters.
I’m from the Netherlands and the dutch TUG (TeX User Group) provides a style for dutch letters.
It is the only way for me now to write letters. It looks very professional.
It also supplies info like a reference number and a “in response to” field.
tom
@Simon
You can include figures in letters, but it seems indeed that the floating environment is not working.
Try this:
1.
2.
without the floating environment “figure”. It works fine for me, you can center the image, but not add caption and label.
Hope this helps,
Tom
vicky
Hi simon,
This site has always helped. Ur comment did help dis tym!
Regards
Vicky
pastcounts
You could also try the letter format in KOMA-script bundle; it provides replacement for all the basic document classes, with nice additional formatting options. The letter class is especially powerful, and I guess its full potential could only be realised in business environments, but it has served well for my personal needs, also. KOMA-script classes are present at least in MixTex, TeX-Live and teTeX.
dicktaid
I tried to use the letter-class but couldn’t get it working. This simple guide whoever solved my problems. I didn’t know it was this simple! Thanks!
Gilberto
I’m also new to TeX and LaTeX (as well as to Aquamacs) and I’m loving it. I’m two weeks into this and I’m really looking forward to not using Word or even Pages and OpenOffice again. Thanks for the instructions on how to make letters!!!
Lorenzo
Thanks!
I needed a quick template for writing a letter in Latex and the one you provided really helped 🙂
Paul
I’m can’t get the telephone number to display using \telephone{2342}. I’ve tried adding the command \pagestyle{firstpage} but that dosen’t work. Any ideas?
Also, I would like the closing text eg “Yours faithfully” flushed left – not centered. How do I do that? Cheers.
tom
Hi Paul,
When I define the \telephone{}, it displays in the bottom right corner. If you would like it to be part of your address, just use an additional line in the address command.
Now for your second question, I tried to flush it left. You can actually do it without a major effort, by simply using \name{…} instead of \address{…}. The trade-off is that your address is no more located above the date, but below your signature. Up to you to decide what suits you the better.
Cheers,
Tom.
Summa
You get both the phone number and the closing flushed left when the letter is formatted for use with a letterhead. You get this when you don’t use the \address command. When you use \address the letter is formatted as a personal letter, without a phone number.
Seamus
You can left-align the closing by using \longindentation=0pt before your \begin{document}.
Konstantin Tolstikhin
Thanks!!!
Pablo
Thanks for this blog. VERY USEFUL.
I just finished writing my thesis in LaTeX, a 267 page document with lots of figures and tables, but I needed to write a letter and I was totally blocked. I never went back to WORD and I wasn’t about to succumb. Your letter example got me going again with a simple but elegant letter, thanks.
christie
do bibliographies work in letters? can’t seem to get it working.
Writing a letter in LaTeX « The Daily Information Struggle
[…] not going to copy any details, this blog post says all that is needed […]
Maggie
I am trying include a .jpg picture of my signature between the closing and my name in the standard \documentclass{letter} and cannot get any figure to load in at all. Any ideas? I tried what was described before with \usepackage{graphicx} and then just put in \includegraphics{largesignature.jpg} but it has not worked.
tom
Hi there,
It would be helpful to see a minimal example of the relevant Latex code. I tried in my code and it worked, no problem.
Take a look at my post on how to add your signature as an image to a letter.
Latex letter signature as image « Blog on Latex Matters
[…] the signature{Your name} declaration (see this sample letter) and just replace the closing{Yours Faithfully,} […]
Anil Duggirala
Thanks for that. I have found a template for writing cover letters and cvs, here http://www.math.uic.edu/~hurder/math589/vita.html download the .zip and take a look at the letter template .tex.
CB
To add to Seamus’ left-align signature comment, you can also left align the address and date using: http://stackoverflow.com/questions/1809882/latex-letter-from-address-left-aligned
sarvesh
I am trying to make the first letter capital for encl. used in letter latex as By using \encl{Certificates} output appear as encl. Certificates. Is there any way to display “Encl. Certificates” instead of “encl. Certificates” in letter? Please help me.
tom
Hi Sarvesh,
You can redefine it using:
\renewcommand{\enclname}{Encl}
.Cheers, Tom.
mrtumtum
Nice job,
hth another user
I’m using auctex
got rid of the first three lines in the buffer when starting emacs and your code compiled right away.
Demis
I was busy looking around this page for the *.tex template bundle, or whatever package I need – Until I realized i was already looking at it in your few lines of code!
Awesome! Thanks!!!
Kai Hendry
Hi there, I have a letter template for Xetex which supports unicode fairly well here:
https://github.com/kaihendry/letterly
Enjoy,
Santosh
Hi Tom,
Thanks for the post. It is indeed very convenient to use latex for writing letters.
It seems that the letter environment inserts the date by default. How can I tell it not to include the date.
My preamble is bare minimum and it only contains: \documentclass{letter}
tom
Hey Santosh,
Thanks for your questions. Adding
\date{}
as the first line within the letter environment will prevent the date from being shown.Best, Tom.
Santosh
Thanks, It worked.
kuanghan
Thanks a lot! This is really useful.
Gregory Nash
I’m using latex instead of email because I want to be able to refer to my figures within text instead of attaching them and hoping my reader knows which one I’m talking about. i want to keep things informal, so i’d prefer to write a letter, but i’m going to have to use the report class or something in order to have figures. can’t some latex guru just copy and paste some code so that i can have my cake and eat it too?
tom
Hmmm, not sure I understand what you need exactly. You may find my code samples on figures and standard classes useful. Cheers, Tom.
Larry Dickson
Hi,
Is there any way (other than inserting artificial spaces in the address) to make the address line up with the closing?
tom
Hi Larry,
I can’t help you with that, sorry. I’d suggest you use an alternative package. See here for some options, e.g. newlfm.
Since the letter class is old and not very popular, I’ll try to write a post on one of the newer packages…
Cheers, Tom
Sam
Someone asked long ago but it has not been answered: How can a citations and a bibliograohy be added to a letter?
tom
Hi Sam,
You might find the answer to a similar question on tex.SX useful.
Best, Tom
Clément
I have a 403 on the file new.pdf
tom
Thanks! This should be fixed now.
Apurba Paul
How to add subject before the opening?
tom
Hi there,
A possible solution, although not ideal, is to include the subject in the opening:
Alternatively, you might use the more flexible KOMA script letter class: scrlttr2.
HTH,
Tom
Reinhard Neuwirth
How can I control the date of the letter? Today’s date seems to be inserted automatically.
tom
Hi Reinhard,
Use the
date
macro in the preamble:Cheers,
Tom
Reinhard Neuwirth
Thanks Tom.
Reinhard Neuwirth
While we are on the subject, do you know if there is a way to override \today in document classes other than letter. The trick you suggested seems to work for the letter class only.
tom
Which class do you use? It works for the standard document classes:
article
,report
, andbook
. Here’s an example:Russell Horwood
Why is the closing and the signature centre aligned? I’ve never seen that on any letter ever before.
tom
Hi Russell,
Thanks for your comment. The positioning of
signature
is done through indentation rather alignment. Not sure what the reason is, perhaps an outdated style. To change it, set\longindentation
to zero:Best, Tom
tejasshettyblog
How does one include a subject line?
tom
A possible solution is to use one of the standard macros. For example: