emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Koma-letter bug: backaddress option not included in latex export


From: James Harkins
Subject: [O] Koma-letter bug: backaddress option not included in latex export
Date: Sun, 24 Nov 2013 17:44:52 +0800
User-agent: Trojita/v0.3.96-git; Qt/4.8.1; X11; Linux; Ubuntu 12.04.3 LTS

I believe I've found a bug in ox-koma-letter.el. Org-mode version 8.2 (release_8.2-2-g18c7c4 @ /home/dlm/share/org-mode.git/lisp/)

Accepted values for the "backaddress" option are "t" or "nil."

If the option is "t," then the export contains a line "\KOMAoption{backaddress}{true}."

If the option is nil, I would expect a line "\KOMAoption{backaddress}{false}" but *the line is omitted*. So, LaTeX prints the back address anyway, even though the option is explicitly set to disable the back address.

I think the problem is here:

  (let ((with-backaddress (plist-get info :with-backaddress))
(with-backaddress-set (plist-get info :with-backaddress-changed-in-buffer-p))
..
     (when with-backaddress-set
(format "\\KOMAoption{backaddress}{%s}\n" (if with-backaddress "true" "false")))

Somehow, when backaddress is nil, with-backaddress-set must be false, causing the line not to be generated.

**Update**: Same problem with #+OPTIONS: foldmarks. Possibly all the options are broken.

ECM (the simple example at [1], with one #+OPTIONS line added):

[1] http://orgmode.org/worg/exporters/koma-letter-export.html

#+LATEX_CLASS: my-letter
#+TITLE: A simple letter
#+DATE: April 22, 2013
#+AUTHOR: Jane Doe
#+OPTIONS: backaddress:nil
#+FROM_ADDRESS: Some Street 1\\
#+FROM_ADDRESS: 12345 Some City
#+TO_ADDRESS: John Doe\\
#+TO_ADDRESS: Other Street 1\\
#+TO_ADDRESS: 54321 Other City
#+OPENING: Dear John,
#+CLOSING: Yours truly,
#+SIGNATURE: Jane
#+LANGUAGE: en

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

-->

% Created 2013-11-24 Sun 17:27
\documentclass{scrlttr2}
\usepackage[english]{babel}
address@hidden
\LoadLetterOption{NF}
\setkomavar{fromname}{Jane Doe}
\setkomavar{fromaddress}{Some Street 1\\\\
12345 Some City}
\setkomavar{signature}{Jane}
\date{April 22, 2013}
\begin{document}

\setkomavar{subject}{A simple letter}

\begin{letter}{%
John Doe\\\\
Other Street 1\\\\
54321 Other City}

\opening{Dear John,}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

\closing{Yours truly,}

\end{letter}

\end{document}

~~~

Change it to backaddress:t and you'll see the difference.

hjh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]