emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Org-Mode Homepage error


From: Sebastien Vauban
Subject: Re: [O] Org-Mode Homepage error
Date: Tue, 26 Jul 2011 23:19:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Achim and Bastien,

Achim Gratz wrote:
> Bastien <address@hidden> writes:
>> I fail to understand why an additional <div id="preamble">
>> should break Sebastian's tool.
>> </mode lazybum>
>
> For starters, the title now resides in the preamble, but the script
> looks for it in content.

Good catch!

FYI, the title has always been in the preamble. See lines 354--381 in
org-html.el:

#+begin_src emacs-lisp
(defcustom org-export-html-preamble t
  "Non-nil means insert a preamble in HTML export.

When `t', insert a string as defined by one of the formatting
strings in `org-export-html-preamble-format'.  When set to a
string, this string overrides `org-export-html-preamble-format'.
When set to a function, apply this function and insert the
returned string.  The function takes the property list of export
options as its only argument.

Setting :html-preamble in publishing projects will take
precedence over this variable."
  :group 'org-export-html
  :type '(choice (const :tag "No preamble" nil)
                 (const :tag "Default preamble" t)
                 (string :tag "Custom formatting string")
                 (function :tag "Function (must return a string)")))

(defcustom org-export-html-preamble-format
  '(("en" "<h1 class=\"title\">%t</h1>"))
  "The format for the HTML preamble.

%t stands for the title.

If you need to use a \"%\" character, you need to escape it
like that: \"%%\"."
  :group 'org-export-html
  :type 'string)
#+end_src

The difference I introduced is that -- when present -- the preamble (whatever
its contents) is wrapped inside a "preamble" DIV.

I did not change the fact that the title was part of the preamble.

Though, we can wonder if it makes sense to put the title as part of the
preamble. But I guess there is a good reason for it(TM).

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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