emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Scott Randby <srandby@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: html preamble
Date: Tue, 24 Mar 2015 11:19:06 -0400	[thread overview]
Message-ID: <5511806A.9080907@gmail.com> (raw)
In-Reply-To: <loom.20150323T204804-379@post.gmane.org>

On 03/23/2015 04:12 PM, hymie! wrote:
> So my next task is to learn about the HTML preamble.
>From reading the docs, it looks like all of my org files have to share a
> single HTML preamble, which is set in my .emacs file through either the
> org-html-preamble variable, the org-html-preamble-format variable, or the
> org-publish-project-alist variable.  There is no way to tell a specific Org
> file "This is your HTML preamble."  Is that correct?
> Why are there two different variables org-html-preamble-format and
> org-html-preamble if the org-html-preamble variable can perform all of the
> tasks of org-html-preamble-format and more?
> Finally, how do I get the current date into the preamble?  I see that I can
> specifically set a date, and I see the current date in a comment at the top
> of my exported HTML, but I can't figure out how to get the current date out
> of the comment and into my preamble.

I don't know if this helps, but I have postamble requirements in each 
file that I export. I believe you can do the same for the preamble. 
Below is an example from one of my files.

* COMMENT Postamble Settings

#+BEGIN_SRC emacs-lisp

;; Turn off postamble creation
(setq org-html-postamble nil)

;; Turn on postamble creation (default)
(setq org-html-postamble t)

;; Postamble format for lessons
(setq org-html-postamble-format (quote (("en" "<p 
class=\"author\">Author: %a </p>
<p class=\"email\">Email: %e</p>
<p class=\"creator\">%c</p>"))))

;; Postamble format for non-lesson pages (default)
(setq org-html-postamble-format (quote (("en" "<p 
class=\"author\">Author: %a </p>
<p class=\"email\">Email: %e</p>
<p class=\"date\">Date: %T</p>
<p class=\"creator\">%c</p>"))))


Scott Randby

      parent reply	other threads:[~2015-03-24 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 20:12 html preamble hymie!
2015-03-23 20:28 ` Rasmus
2015-03-24 15:19 ` Scott Randby [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5511806A.9080907@gmail.com \
    --to=srandby@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).