# Miskatonic University Press

## LaTeX letters in Org

When I need to send a formal (or at least not handwritten) letter, I want to do it in LaTeX, and if I do something in LaTeX, I want to do it in Org and then export it. LaTeX’s letter class is made for this purpose (see also this), but making it work in Org takes a small bit of configuration and some attention to how the letter is set up. Here’s how I made it work.

First, you need to tell Org about the letter class, because it’s not one of the defaults. Letters don’t have chapters or sections so you just specify the document class.

Here’s the Org file with the sample letter I used. It’s from chapter five of Dracula by Bram Stoker. I removed some of the content of the letter to keep things shorter. It looks very plain here because there’s no syntax highlighting in this web page to fancy it up.

# #+title: Comment out, or do not use
#+date: Wednesday

#+options: toc:nil

#+latex_class: letter

#+latex: \begin{letter}{[s.l.]}
#+latex: \opening{My dearest Mina,---}

I must say you tax me very unfairly with being a bad correspondent.
I wrote to you /twice/ since we parted, and your last letter was only your /second/.
Besides, I have nothing to tell you.  There is really nothing to interest you.
Town is very pleasant just now, and we go a good deal to picture-galleries
and for walks and rides in the park.  As to the tall, curly-haired man,
I suppose it was the one who was with me at the last Pop.  Some one has evidently
been telling tales.  That was Mr. Holmwood.  He often comes to see us, and he and
mamma get on very well together; they have so many things to talk about in common.
We met some time ago a man that would just /do for you/, if you were not already
engaged to Jonathan.  He is an excellent /parti/, being handsome, well off, and
of good birth.  He is a doctor and really clever.  Just fancy!
He is only nine-and-twenty, and he has an immense lunatic asylum all under his own care.

#+latex: \closing{Sincerely,}
#+latex: \ps{P.S.  I need not tell you this is a secret.  Good-night again.}
#+latex: \end{letter}


It looks like this in Emacs (the image is linked to a larger one).

Some notes:

• Don’t use a title. If you want one for your own reference, comment it out.
• I found it safest to use the #+latex: way of including LaTeX fragments. It doesn’t mess up the syntax highlight or the exporting.
The only extra thing I’ve added is the Baskervald X typeface, which is LaTeX’s Baskerville. I really like it. The [osf] option turns on text figures: notice how the 7 in “17” descends below the 1.
When exported (C-c C-e l o, the command for “export to PDF and open the file;” C-c C-e is “export,” l is “to LaTeX,” o is “then open the PDF”) the letter looks like this.