From 390d93afc95f6151e1bde43ef91b4e31f91ecd01 Mon Sep 17 00:00:00 2001 From: Daniele Pizzolli Date: Sat, 2 Jan 2016 11:48:24 +0100 Subject: [PATCH] ox-koma-letter.el: Add support for section * contrib/lisp/ox-koma-letter.el (org-koma-letter-headline): Add support for section using the text of headline. TINYCHANGE --- contrib/lisp/ox-koma-letter.el | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index 3231d34..aea5a9c 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -569,10 +569,34 @@ holding contextual information. Note that if a headline is tagged with a tag from `org-koma-letter-special-tags' it will not be exported, but stored in `org-koma-letter-special-contents' and included at the -appropriate place." +appropriate place. + +If the headline level is greater than one include the headline as +section. This allow to write letter with sections by using +section.lco available at: +. + +Add [sections] to LATEX_CLASS_OPTIONS with: + +#+LATEX_CLASS_OPTIONS: [sections] + +If section.lco is unavaliable the section are exported in the tex +source but not rendered in the final pdf. + +- TODO: add test +- TODO: level n should become n-1, because there is no real + level 1 section +- TODO: check if section are allowed inside other letter keywords +" (let ((special-tag (org-koma-letter--special-tag headline info))) (if (not special-tag) - contents + (progn + (if (= 1 (org-element-property :level headline)) + contents + (progn + ;; TODO find out how to decrease the level by one! + (org-latex-headline headline contents info) + ))) (push (cons special-tag contents) org-koma-letter-special-contents) ""))) -- 2.1.4