From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: html preamble Date: Tue, 24 Mar 2015 11:19:06 -0400 Message-ID: <5511806A.9080907@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaQbr-00018u-Nb for emacs-orgmode@gnu.org; Tue, 24 Mar 2015 11:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaQbn-0001CS-Jd for emacs-orgmode@gnu.org; Tue, 24 Mar 2015 11:19:15 -0400 Received: from mail-ig0-x232.google.com ([2607:f8b0:4001:c05::232]:38891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaQbn-0001CD-8P for emacs-orgmode@gnu.org; Tue, 24 Mar 2015 11:19:11 -0400 Received: by igbqf9 with SMTP id qf9so69485494igb.1 for ; Tue, 24 Mar 2015 08:19:10 -0700 (PDT) Received: from [192.168.1.100] (cpe-184-56-99-2.neo.res.rr.com. [184.56.99.2]) by mx.google.com with ESMTPSA id o196sm2820004ioe.26.2015.03.24.08.19.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 08:19:08 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.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" "

Author: %a

Email: %e

%c

")))) ;; Postamble format for non-lesson pages (default) (setq org-html-postamble-format (quote (("en" "

Author: %a

Email: %e

Date: %T

%c

")))) #+END_SRC ---- Scott Randby