Feb 10

Letter writing in Latex

Latex is widely known in technical writer’s society. As an engineering, I am also fond of latex specially while writing complicated equations. However, I’ve found later that latex isn’t only good in technical writing but also normal day to day writing can be done with it. Currently for any writing I use latex: from my CV, letter writing to very good looking presentation. This post is about writing letter in latex. Later I’ll try to add some post about preparing presentation using latex.

I was using latex letter class for a long time (please take a look at the link if you want to know details about letter writing), however, I was not satisfied with the layout. Later, I’ve found at least 5 more classes to write letter using latex.

  1. akletter: This is a class file for business letters specially in German format. Moreover, I’ve found it difficult to customize. You can take a look at the document to know more about it.
  2. newlfm: This class file can be used to write letters, faxes and memos. You can write business letter as well as standard letters. Very flexible.
  3. dinbrief: Very good for German letter writing format. I use it often since I’m located in Germany.
  4. brief: I didn’t try it. Bundled with Dutch ntgclass.
  5. scrlttr2: Most flexible of all. It is bundled with Koma-Script.

Since I use dinbrief and scrlttr2, I’ll give a little bit details about each of them.


I took this example from the documentation of dinbrief:

address{R”udiger Kurz\
Am See 1\
76133 Karlsruhe}
backaddress{R. Kurz, Am See 1, 76133 Karslruhe}
signature{R”udiger Kurz}
begin{letter}{Deutsche Bundespost\
Fernmeldeamt Karlsruhe\
Postfach 7300\[medskipamount]
{bf 76131 Karlsruhe}}
subject{Betrieb eines Mikrowellensenders}
opening{Sehr geehrte Damen und Herren,}
anbei sende ich Ihnen eine Kopie der bisherigen Genehmigung f”ur
unseren Mikrowellenherd…
… Ihre Bem”uhungen im voraus vielen Dank.
closing{Mit freundlichen Gr”u”sen,}
ps{Wir bitten um schnelle Erledigung.}
cc{Deutsche Bundespost\
Karlsruher Privatfunk \
S”uddeutscher Rundfunk}
encl{Abschrift der Urkunde}

Most of the commands are self explanatory. Specials are:

  • backaddress: A single line address that is shown through the windowed envelope.
  • yourmail, sign: These are the reference of the letter.

Please take a look at the output of this akletter (Don’t be angry since it is in German ;).

Pdf output: letter_dinbrief


First take a look at this example:

KOMAoptions{fromalign=left, fromlogo=false, addrfield=true,
backaddress=on, subject=titled, subject=left,foldmarks=on,
setkomavar{fromname}{Thomas Mustermann}
setkomavar{signature}{Thomas Mustermann}
setkomavar{fromaddress}{Some street 23\Postcode City}
setkomavar{subject}{Here goes the subject of the letter}
begin{letter}{Some firm\some area\some postcode\some country}
opening{Dear Ladies and Gentlemen,}
this is the main text
closing{yours sincerely\ mbox{}}
Take care. this is postscript.
cc{additional addressees}

You should read the document (scrguien.pdf) of Koma-script to write this most flexible letter. There are thousand of options you can customize. I explain the KOMAoptions used in this letter.

  • fromalign: alignment of from address. Can be on the left or right.
  • fromlogo: you can put the company logo. true or false.
  • addrfield: whether an address field would be there or not.
  • backaddress: just like dinbrief class, for windowed envelope.
  • subject: whether the word subject is written on the subject field or not, position of the subject and locate before or after opening.
  • foldmark: to put a letter into an envelope, need to fold it. Whether the foldmark would be there or not.
  • fromphone, frommail: phone number and mail address would be included in the from address or not.

Then you setup all the koma-variable in the letter. The output of this code is here: letter_scrlttr2

Please give some time to read the document of scrlttr2 to optimize the letter for your purpose.


1 ping

  1. Alan Shields

    By the way, for printing out great envelopes in LaTeX you should take a look at envlab — it’s included in most distributions. I had to look a long time to find it. All sorts of people asking questions on the web, no mention of envlab!

  2. Dean

    EnvLab is now compatible with scrlttr2

    See here: http://www.komascript.de/mlabel.lco
    and here: http://www.komascript.de/node/1121

    Coupled with the person package from datatool, this combination is a very powerful mail merge system that prints both letters and mailing labels

  3. Jessica

    Thanks for the info.but you didnt make provision for those of that do not understand German in any way. Mayb try translate the words in between the curly brackets in English 4further clarification. Please reply me via my mailbo. you have done well. Thank u.

  1. Weekly Roundup and Thoughts on LaTeX and Google Docs « kRistens.blog

    […] ¬†However, I haven’t quite figured out how to get a letter formatted to my liking. ¬†Using scrlttr2 helps, but there comes a point when it is just faster and easier to write the document in Word or Google […]

Leave a Reply to Jessica Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>