mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 03:19:16 +00:00
ox-html.el: Use HTML_HEAD instead of HTML_STYLE and fix some variable names
* ox-html.el (org-html-style-default): Update docstring. (org-html-infojs-install-script, org-html--build-style): Update property names. (org-html-head-include-scripts) (org-html-head-include-default-style, org-html-head): Respectively rename from `org-html-style-include-scripts', `org-html-style-include-default' and `org-html-style', now obsolete. (org-html-style-extra): Delete. Thanks to those who pointed at this problem on the mailing list.
This commit is contained in:
parent
aa3091580d
commit
2752ef1c4b
|
@ -118,10 +118,9 @@
|
||||||
(:html-mathjax "HTML_MATHJAX" nil "" space)
|
(:html-mathjax "HTML_MATHJAX" nil "" space)
|
||||||
(:html-postamble nil "html-postamble" org-html-postamble)
|
(:html-postamble nil "html-postamble" org-html-postamble)
|
||||||
(:html-preamble nil "html-preamble" org-html-preamble)
|
(:html-preamble nil "html-preamble" org-html-preamble)
|
||||||
(:html-style nil nil org-html-style)
|
(:html-head "HTML_HEAD" nil org-html-head newline)
|
||||||
(:html-style-extra "HTML_STYLE" nil org-html-style-extra newline)
|
(:html-style-include-default nil nil org-html-head-include-default-style)
|
||||||
(:html-style-include-default nil nil org-html-style-include-default)
|
(:html-head-include-scripts nil nil org-html-head-include-scripts)
|
||||||
(:html-style-include-scripts nil nil org-html-style-include-scripts)
|
|
||||||
(:html-table-tag nil nil org-html-table-tag)
|
(:html-table-tag nil nil org-html-table-tag)
|
||||||
(:html-htmlized-css-url "HTML_HTMLIZED_CSS_URL" nil org-html-htmlized-org-css-url)
|
(:html-htmlized-css-url "HTML_HTMLIZED_CSS_URL" nil org-html-htmlized-org-css-url)
|
||||||
;; Redefine regular options.
|
;; Redefine regular options.
|
||||||
|
@ -244,10 +243,9 @@ for the JavaScript code in this tag.
|
||||||
/*]]>*/-->
|
/*]]>*/-->
|
||||||
</style>"
|
</style>"
|
||||||
"The default style specification for exported HTML files.
|
"The default style specification for exported HTML files.
|
||||||
Please use the variables `org-html-style' and
|
You can use `org-html-head' and `org-html-head-extra' to add to
|
||||||
`org-html-style-extra' to add to this style. If you wish to not
|
this style. If you don't want to include this default style,
|
||||||
have the default style included, customize the variable
|
customize `org-html-head-include-default-style'.")
|
||||||
`org-html-style-include-default'.")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -452,8 +450,8 @@ export back-end currently used."
|
||||||
(setq style (replace-match style t t template))
|
(setq style (replace-match style t t template))
|
||||||
(setq exp-plist
|
(setq exp-plist
|
||||||
(plist-put
|
(plist-put
|
||||||
exp-plist :html-style-extra
|
exp-plist :html-head-extra
|
||||||
(concat (or (plist-get exp-plist :html-style-extra) "")
|
(concat (or (plist-get exp-plist :html-head-extra) "")
|
||||||
"\n"
|
"\n"
|
||||||
style)))))
|
style)))))
|
||||||
;; This script absolutely needs the table of contents, so we
|
;; This script absolutely needs the table of contents, so we
|
||||||
|
@ -1069,33 +1067,42 @@ ignored."
|
||||||
|
|
||||||
;;;; Template :: Scripts
|
;;;; Template :: Scripts
|
||||||
|
|
||||||
(defcustom org-html-style-include-scripts t
|
(define-obsolete-variable-alias
|
||||||
|
'org-html-style-include-scripts 'org-html-head-include-scripts "24.4")
|
||||||
|
(defcustom org-html-head-include-scripts t
|
||||||
"Non-nil means include the JavaScript snippets in exported HTML files.
|
"Non-nil means include the JavaScript snippets in exported HTML files.
|
||||||
The actual script is defined in `org-html-scripts' and should
|
The actual script is defined in `org-html-scripts' and should
|
||||||
not be modified."
|
not be modified."
|
||||||
:group 'org-export-html
|
:group 'org-export-html
|
||||||
|
:version "24.4"
|
||||||
|
:package-version '(Org . "8.0")
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
|
||||||
;;;; Template :: Styles
|
;;;; Template :: Styles
|
||||||
|
|
||||||
(defcustom org-html-style-include-default t
|
(define-obsolete-variable-alias
|
||||||
|
'org-html-style-include-default 'org-html-head-include-default-style "24.4")
|
||||||
|
(defcustom org-html-head-include-default-style t
|
||||||
"Non-nil means include the default style in exported HTML files.
|
"Non-nil means include the default style in exported HTML files.
|
||||||
The actual style is defined in `org-html-style-default' and should
|
The actual style is defined in `org-html-style-default' and
|
||||||
not be modified. Use the variables `org-html-style' to add
|
should not be modified. Use `org-html-head' to add your own
|
||||||
your own style information."
|
style information."
|
||||||
:group 'org-export-html
|
:group 'org-export-html
|
||||||
|
:version "24.4"
|
||||||
|
:package-version '(Org . "8.0")
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(put 'org-html-style-include-default 'safe-local-variable 'booleanp)
|
(put 'org-html-head-include-default-style 'safe-local-variable 'booleanp)
|
||||||
|
|
||||||
(defcustom org-html-style ""
|
(define-obsolete-variable-alias 'org-html-style 'org-html-head "24.4")
|
||||||
"Org-wide style definitions for exported HTML files.
|
(defcustom org-html-head ""
|
||||||
|
"Org-wide head definitions for exported HTML files.
|
||||||
|
|
||||||
This variable needs to contain the full HTML structure to provide a style,
|
This variable can contain the full HTML structure to provide a
|
||||||
including the surrounding HTML tags. If you set the value of this variable,
|
style, including the surrounding HTML tags. You can consider
|
||||||
you should consider to include definitions for the following classes:
|
including definitions for the following classes: title, todo,
|
||||||
title, todo, done, timestamp, timestamp-kwd, tag, target.
|
done, timestamp, timestamp-kwd, tag, target.
|
||||||
|
|
||||||
For example, a valid value would be:
|
For example, a valid value would be:
|
||||||
|
|
||||||
|
@ -1109,29 +1116,19 @@ For example, a valid value would be:
|
||||||
]]>
|
]]>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
If you'd like to refer to an external style file, use something like
|
If you want to refer to an external style, use something like
|
||||||
|
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"mystyles.css\">
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"mystyles.css\" />
|
||||||
|
|
||||||
As the value of this option simply gets inserted into the HTML <head> header,
|
As the value of this option simply gets inserted into the HTML
|
||||||
you can \"misuse\" it to add arbitrary text to the header.
|
<head> header, you can use it to add any arbitrary text to the
|
||||||
See also the variable `org-html-style-extra'."
|
header."
|
||||||
:group 'org-export-html
|
:group 'org-export-html
|
||||||
|
:version "24.4"
|
||||||
|
:package-version '(Org . "8.0")
|
||||||
:type 'string)
|
:type 'string)
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(put 'org-html-style 'safe-local-variable 'stringp)
|
(put 'org-html-head 'safe-local-variable 'stringp)
|
||||||
|
|
||||||
(defcustom org-html-style-extra ""
|
|
||||||
"Additional style information for HTML export.
|
|
||||||
The value of this variable is inserted into the HTML buffer right after
|
|
||||||
the value of `org-html-style'. Use this variable for per-file
|
|
||||||
settings of style information, and do not forget to surround the style
|
|
||||||
settings with <style>...</style> tags."
|
|
||||||
:group 'org-export-html
|
|
||||||
:type 'string)
|
|
||||||
;;;###autoload
|
|
||||||
(put 'org-html-style-extra 'safe-local-variable 'stringp)
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Todos
|
;;;; Todos
|
||||||
|
|
||||||
|
@ -1383,8 +1380,7 @@ INFO is a plist used as a communication channel."
|
||||||
(eq org-html-htmlize-output-type 'css))
|
(eq org-html-htmlize-output-type 'css))
|
||||||
(format "<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\" />\n"
|
(format "<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\" />\n"
|
||||||
(plist-get info :html-htmlized-css-url)))
|
(plist-get info :html-htmlized-css-url)))
|
||||||
(org-element-normalize-string (plist-get info :html-style-extra))
|
(when (plist-get info :html-head-include-scripts) org-html-scripts))))
|
||||||
(when (plist-get info :html-style-include-scripts) org-html-scripts))))
|
|
||||||
|
|
||||||
(defun org-html--build-mathjax-config (info)
|
(defun org-html--build-mathjax-config (info)
|
||||||
"Insert the user setup into the mathjax template.
|
"Insert the user setup into the mathjax template.
|
||||||
|
|
Loading…
Reference in a new issue