From: Stig Brautaset <stig@brautaset.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: writing letters using the latex letters class?
Date: Thu, 08 Dec 2016 00:46:23 +0000 [thread overview]
Message-ID: <m2y3zrnt7k.fsf@Margil.home> (raw)
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
next reply other threads:[~2016-12-08 0:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 0:46 Stig Brautaset [this message]
2016-12-08 8:48 ` writing letters using the latex letters class? Sebastian Christ
2016-12-08 11:40 ` Stig Brautaset
2016-12-08 15:05 ` Sebastian Christ
2016-12-08 22:21 ` Stig Brautaset
[not found] ` <70bd40970c2d4f6eaf23a514dfc6028f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-08 13:56 ` Eric S Fraga
2016-12-08 22:28 ` Stig Brautaset
[not found] <3b807265b1934b80b3aff51a383e8af0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-08 7:14 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y3zrnt7k.fsf@Margil.home \
--to=stig@brautaset.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.