[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] writing letters using the latex letters class?
From: |
Stig Brautaset |
Subject: |
[O] writing letters using the latex letters class? |
Date: |
Thu, 08 Dec 2016 00:46:23 +0000 |
User-agent: |
mu4e 0.9.17; emacs 25.1.1 |
I've tried to get a simple letter to export to PDF using the latex
letters
class, but I can't get it to work in any satisfactory way. I want
to get
something like the following generated:
,----
| \documentclass{letter}
| \signature{Sender McSenderface}
|
| \address{My address \\ My town \\ My country}
|
| \begin{document}
| \begin{letter}{Recipient name \\ Recipient address \\ Recipient
country}
|
| \opening{Dear Sir or Madam:}
|
| Aliquam erat volutpat. Nunc eleifend leo vitae magna. In id erat
non orci
| commodo lobortis. Proin neque massa, cursus ut, gravida ut,
lobortis eget,
| lacus. Sed diam.
|
| \closing{Yours Sincerely,}
|
| \end{letter}
| \end{document}
`----
I was hoping I could generate that from (something like) the
following org
document:
,----
| #+latex_class: letter
| #+signature: Sender McSenderface
| #+address: My address \\ My town \\ My country
| #+recipient: Recipient name \\ Recipient address \\ Recipient
country
| #+opening: Dear Sir or Madam
| #+closing: Yours Sincerely,
|
| Aliquam erat volutpat. Nunc eleifend leo vitae magna. In id erat
non orci
| commodo lobortis. Proin neque massa, cursus ut, gravida ut,
lobortis eget,
| lacus. Sed diam.
`----
Is this a pipe dream? I tried mucking about with
org-latex-classes, and got as
far as this:
,----
| (add-to-list 'org-latex-classes
| '("letter"
| "\\documentclass{letter}
| \\usepackage{hyperref}
| [NO-DEFAULT-PACKAGES]
| [NO-PACKAGES]"
| ("\\section{%s}" . "\\section*{%s}")
| ("\\subsection{%s}" . "\\subsection*{%s}")
| ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
| ("\\paragraph{%s}" . "\\paragraph*{%s}")
| ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
`----
That at least got me past the "Unknow LaTeX class 'letter'" error,
but it
doesn't produce a nice letter. I only get my lorem ipsum text. I
can't figure
out how to get the \begin{letter}{...} stuff inside the
\begin{document} part
automatically, nor how to inject text from #+recipient: into the
second block
of the \begin{letter}{...} macro.
Any help appreciated.
Stig
- [O] writing letters using the latex letters class?,
Stig Brautaset <=