emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Conditionally formatting org-html-postamble-format
@ 2016-01-26 21:46 Kaushal Modi
  2016-01-27 18:26 ` Robert H. Klein
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2016-01-26 21:46 UTC (permalink / raw)
  To: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

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 <http://www.gnu.org/software/emacs/> 25.0.50.1 (Org
<http://orgmode.org/> mode 8.3.3)
 by . —
Jan 26 2016, Tue

[-- Attachment #2: Type: text/html, Size: 2188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-28  4:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 21:46 Conditionally formatting org-html-postamble-format Kaushal Modi
2016-01-27 18:26 ` Robert H. Klein
2016-01-27 18:35   ` Kaushal Modi
2016-01-27 19:51     ` Nick Dokos
2016-01-27 19:55     ` Robert H. Klein
2016-01-28  4:36       ` Kaushal Modi

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).