Small doc improvement about HTML pre/postamble.

* org-html.el (org-export-html-preamble-format)
(org-export-html-postamble-format): Improve the docstring.

* org.texi (HTML preamble and postamble): Small doc improvement.

Thanks to Zachary Jones who asked for this.
This commit is contained in:
Bastien Guerry 2012-04-02 23:28:52 +02:00
parent 11a4749353
commit 3b04635542
2 changed files with 21 additions and 9 deletions

View File

@ -9929,11 +9929,11 @@ creates two levels of headings and does the rest as items.
The HTML exporter lets you define a preamble and a postamble.
The default value for @code{org-export-html-preamble} is @code{t}, which
means that the preamble is inserted depending on the relevant formatting
string in @code{org-export-html-preamble-format}.
means that the preamble is inserted depending on the relevant format string
in @code{org-export-html-preamble-format}.
Setting @code{org-export-html-preamble} to a string will override the default
formatting string. Setting it to a function, will insert the output of the
format string. Setting it to a function, will insert the output of the
function, which must be a string; such a function takes no argument but you
can check against the value of @code{opt-plist}, which contains the list of
publishing properties for the current file. Setting to @code{nil} will not
@ -9945,7 +9945,7 @@ means that the HTML exporter will look for the value of
@code{org-export-creator-info} and @code{org-export-time-stamp-file},
@code{org-export-html-validation-link} and build the postamble from these
values. Setting @code{org-export-html-postamble} to @code{t} will insert the
postamble from the relevant formatting string found in
postamble from the relevant format string found in
@code{org-export-html-postamble-format}. Setting it to @code{nil} will not
insert any postamble.

View File

@ -382,11 +382,17 @@ 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")
(string :tag "Custom format string")
(function :tag "Function (must return a string)")))
(defcustom org-export-html-preamble-format '(("en" ""))
"The format for the HTML preamble.
"Alist of languages and format strings for the HTML preamble.
The first element of each list is the language code, as used for
the #+LANGUAGE keyword.
The second element of each list is a format string to format the
preamble itself. This format string can contain these elements:
%t stands for the title.
%a stands for the author's name.
@ -416,8 +422,8 @@ precedence over this variable."
:group 'org-export-html
:type '(choice (const :tag "No postamble" nil)
(const :tag "Auto preamble" 'auto)
(const :tag "Default formatting string" t)
(string :tag "Custom formatting string")
(const :tag "Default format string" t)
(string :tag "Custom format string")
(function :tag "Function (must return a string)")))
(defcustom org-export-html-postamble-format
@ -426,7 +432,13 @@ precedence over this variable."
<p class=\"creator\">Generated by %c</p>
<p class=\"xhtml-validation\">%v</p>
"))
"The format for the HTML postamble.
"Alist of languages and format strings for the HTML postamble.
The first element of each list is the language code, as used for
the #+LANGUAGE keyword.
The second element of each list is a format string to format the
postamble itself. This format string can contain these elements:
%a stands for the author's name.
%e stands for the author's email.