Browse Source

Update KOMA-letter documentation and example

Rasmus 3 years ago
parent
commit
57f10ce154

+ 20 - 16
exporters/koma-letter-export.org

@@ -316,6 +316,7 @@ lines. In general, they correspond to a LaTeX command such as:
 | =#+TITLE:=        |                                     | =title=              | The  title of the letter.                |
 | =#+SUBJECT:=      |                                     | =subject=            | The subject of the letter                |
 | =#+DATE:=         |                                     | =date=               | The time-stamp of the letter.            |
+| =#+LOCATION:=     | =org-koma-letter-location=          |                      | The space opposite the to address        |
 | =#+PLACE:=        | =org-koma-letter-place=             | =place=              | The place of the letter.                 |
 | =#+AUTHOR:=       | =org-koma-letter-sender=            | =fromname=           | The sender's name.                       |
 | =#+FROM_ADDRESS:= | =org-koma-letter-from-address=      | =fromaddress=        | The sender's address.[fn:3]              |
@@ -356,23 +357,26 @@ general, they correspond to a LaTeX command such as:
 :END:
 Special headings may be used to input metadata in =ox-koma-letter=
 documents.  A special heading is simply a heading with a recognized
-tag.  Their usages were illustrated in the [[*A simple letter
-example][example]] above.  Special headings tags are defined in the
-variables =org-koma-letter-special-tags-in-letter=,
+tag.  Their usages were illustrated in the [[*A simple letter example][example]] above.  Special
+headings tags are defined in the variables
+=org-koma-letter-special-tags-in-letter=,
 =org-koma-letter-special-tags-after-closing=, and
-=org-koma-letter-special-tags-after-letter=.  Currently the following
-special headings are recognized.
-
-| Tag            | KOMA-Script               | Description                                                                   |
-|----------------+---------------------------+-------------------------------------------------------------------------------|
-| =to=           | =\begin{letter}{to}=      | To-address. Alternative to =#+TO_ADDRESS:=.                                   |
-| =from=         | =fromaddress=             | From-address.  Alternative to =+FROM_ADDRESS:=.                               |
-| =closing=      | =closing= and =signature= | headings title and signature.  Alternative to =#+CLOSING:= and =#+SIGNATURE:= |
-| =ps=           | =\ps{}=                   | Wrap content in a =ps=-macro.                                                 |
-| =cc=           | =\cc{}=                   | Wrap content in a =cc=-macro.                                                 |
-| =encl=         | =\encl{}=                 | Wrap content in a =encl= macro.                                               |
-| =after_letter= |                           | Content is inserted after =\end{letter}=.                                     |
-
+=org-koma-letter-special-tags-after-letter=.  Note that these can also
+be dynamically set via the options =after-closing-order= and
+=after-letter-order=.
+Currently the following special headings are recognized.
+ 
+| Tag             | KOMA-Script               | Description                                                                   |
+|-----------------+---------------------------+-------------------------------------------------------------------------------|
+| =to=            | =\begin{letter}{to}=      | To-address. Alternative to =#+TO_ADDRESS:=.                                   |
+| =from=          | =fromaddress=             | From-address.  Alternative to =+FROM_ADDRESS:=.                               |
+| =closing=       | =closing= and =signature= | headings title and signature.  Alternative to =#+CLOSING:= and =#+SIGNATURE:= |
+| =after_closing= |                           | Content is inserted after =\closing{.}=.                                      |
+| =ps=            | =\ps{}=                   | Wrap content in a =ps=-macro.                                                 |
+| =cc=            | =\cc{}=                   | Wrap content in a =cc=-macro.                                                 |
+| =encl=          | =\encl{}=                 | Wrap content in a =encl= macro.                                               |
+| =after_letter=  |                           | Content is inserted after =\end{letter}=.                                     |
+|-----------------+---------------------------+-------------------------------------------------------------------------------|
 
 
 * Footnotes

+ 24 - 12
exporters/koma-letter-new-example.org

@@ -1,11 +1,7 @@
-# -*- org-export-allow-bind-keywords: t -*-
 * Preamble							   :noexport:
 #+TITLE:  Mis-shapen chaos of well-seeming forms!
-#+SUBJECT: Or: Org-mode and KOMA-Script Letters
-#+DATE: <1580-07-03 Thu>
-# NOTE: Check the variable `org-export-date-timestamp-format' for
-# formatting.
-#+BIND: org-export-date-timestamp-format "%Y"
+#+SUBJECT: Or: org-mode and KOMA-Script letters
+#+DATE: 1580
 
 #+AUTHOR: Romeo
 #+PLACE: Verona, Italy
@@ -14,15 +10,16 @@
 # NOTE: Check the KOMA-Script manual to find a LCO that fits the
 #       envelope standards of your country.
 
-#+OPTIONS: after-closing-order:(ps cc encl) ':t backaddress:t subject:centered
 # NOTE: Change the order of the backletter, use smart quotes and
 #       include backaddress
+#+OPTIONS: after-closing-order:(my_after_signature ps cc encl)
+#+options: ':t backaddress:t subject:centered
 
 # Remove the first header
 #+LATEX_HEADER: \setkomavar{firsthead}{}
 
 * To-address of the lovely Juliet 					 :to:
-# NOTE: New lines are not necessary in TO and FROM
+# NOTE: Explicit newlines are not necessary in TO and FROM
 Juliet
 House of Capulet
 Verona
@@ -30,6 +27,18 @@ Verona
 * From 								       :from:
 House of Montague
 Verona
+* Location							   :location:
+#+LATEX_HEADER: \usepackage{tikz}
+#+BEGIN_CENTER
+*Montague*
+#+BEGIN_EXPORT latex
+\tikz \draw (0,0) --+ (0,-1)
+       arc [radius=1, start angle=-180, end angle=0]
+       --+ (0,1) -- cycle
+       node [below=1.5em,midway] {\bfseries M};
+#+END_EXPORT
+#+END_CENTER
+
 * Dear Juliet,
 # NOTE: Your letter is the first non-special heading.  The title of
 # this heading may used as an opening.
@@ -47,16 +56,19 @@ That thou consent to marry us to-day.
 
 * Yours truly,							    :closing:
 Romeo of House Montague
+* some arbitrary LaTeX code				 :my_after_signature:
+#+BEGIN_EXPORT latex
+% this special heading was added dynamically.
+#+END_EXPORT
 * PS									 :ps:
 PS: "PS" is not typeset automatically by KOMA-Script
 
-
 @@latex:\noindent@@ PPS: This is a feature!
 * CC									 :cc:
 Paris and Lawrence.
 * ENCL								       :encl:
 See also [[https://en.wikisource.org/wiki/The_Tragedy_of_Romeo_and_Juliet][The Tragedy of Romeo and Juliet]]
-* some arbitrary LaTeX code 				       :after_letter:
-#+BEGIN_LaTeX
+* some more arbitrary LaTeX code 			       :after_letter:
+#+BEGIN_EXPORT latex
 % here we can place random LaTeX code, e.g. including PDFs via the pdfpages package.
-#+END_LaTeX
+#+END_EXPORT

BIN
exporters/koma-letter-new-example.pdf