Added support for after closing and after document entities in ox-koma-letter.
commit3571a852a0e4a14b44d9fb29771ea1f6da2188b3
authorrasmus.pank <rasmus.pank@gmail.com>
Sun, 26 May 2013 14:14:51 +0000 (26 16:14 +0200)
committerAlan Schmitt <alan.schmitt@polytechnique.org>
Mon, 27 May 2013 06:33:12 +0000 (27 08:33 +0200)
treed431d190c705d7351d8f5fdcb58776432f5720d5
parentba7a2cc8da01c0c2ffaa5e1f76f68ce313f567c7
Added support for after closing and after document entities in ox-koma-letter.

* ox-koma-letter.el (org-koma-letter-special-tags-after-closing):
  specials tags inserted after =\end{closing}=.
* ox-koma-letter.el (org-koma-letter-special-tags): collect
  the special lists.
* ox-koma-letter.el (org-koma-letter-headline): stores content
  in of headline if the first tag is special.  Otherwise return content.
* ox-koma-letter.el (org-koma-letter-special-content): holds special
  content temporarily.
* ox-koma-letter.el (org-koma-letter--format-string-as-macro): format a string as
  a macro or don't.
* ox-koma-letter.el (org-koma-letter-template): added support
  for the headings with special tags.

The following example will now export a sensible manner.

* my letter
  here's a letter
* PS :ps:
  it's requires this patch
* CC :cc:
  Nicolas, Viktor and Alan
* ENCL :encl:
  many patches
  1. this patch
  2. another patch.
* include patches :after_letter:
  \myspecialmacro

  \includepdf{pdf}

Namely, content of ps, encl and cc headings will be exported after
\closing{.}  in the order prescribed by
=`org-koma-letter-special-tags-after-closing'= as a (LaTeX) macro
removing trailing and leading newlines.  The macro is the same as the
tag, althogh the case is determined by the special list.

The concents of the =after_letter= heading will be inserted after
=\end{letter}= and newlines are preserved.

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
contrib/lisp/ox-koma-letter.el