emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Conditionally formatting org-html-postamble-format


From: Kaushal Modi
Subject: [O] Conditionally formatting org-html-postamble-format
Date: Tue, 26 Jan 2016 21:46:38 +0000

Hi,

I have the org-html-postamble-format set to the below:

(setq org-html-postamble-format
                  `(("en"
                     ,(concat "Exported using "
                              ;; "%c" is replaced with `org-html-creator-string'
                              ;; Emacs <VERSION> (Org mode <VERSION>)
                              "<div style=\"display: inline\" class=\"creator\">"
                              "%c</div> "
                              "by %a. — "
                              "<div style=\"display: inline\" class=\"date\">"
                              "%d</div>"))))


It works great except for the cases where I have set a document author to nothing using 

#+AUTHOR:

What would be the best way to set the postamble so that the "by %a" portion does not get printed if the %a value is "".

Right now, if the author is nil, the postamble gets exported as:

Exported using 
Emacs 25.0.50.1 (Org mode 8.3.3)
 by . — 
Jan 26 2016, Tue


reply via email to

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