Main HTML style has moved into a constant.
The variable `org-export-html-style' now only specified deviations from this default style.
This commit is contained in:
parent
5f39979bbe
commit
507700505a
|
@ -472,19 +472,16 @@ Org-mode file."
|
||||||
:group 'org-export-html
|
:group 'org-export-html
|
||||||
:type '(string :tag "File or URL"))
|
:type '(string :tag "File or URL"))
|
||||||
|
|
||||||
(defcustom org-export-html-style
|
(defconst org-export-html-style-default
|
||||||
"<style type=\"text/css\">
|
"<style type=\"text/css\">
|
||||||
html {
|
html { font-family: Times, serif; font-size: 12pt; }
|
||||||
font-family: Times, serif;
|
|
||||||
font-size: 12pt;
|
|
||||||
}
|
|
||||||
.title { text-align: center; }
|
.title { text-align: center; }
|
||||||
.todo { color: red; }
|
.todo { color: red; }
|
||||||
.done { color: green; }
|
.done { color: green; }
|
||||||
.timestamp { color: grey }
|
|
||||||
.timestamp-kwd { color: CadetBlue }
|
|
||||||
.tag { background-color:lightblue; font-weight:normal }
|
.tag { background-color:lightblue; font-weight:normal }
|
||||||
.target { }
|
.target { }
|
||||||
|
.timestamp { color: grey }
|
||||||
|
.timestamp-kwd { color: CadetBlue }
|
||||||
pre {
|
pre {
|
||||||
border: 1pt solid #AEBDCC;
|
border: 1pt solid #AEBDCC;
|
||||||
background-color: #F3F5F7;
|
background-color: #F3F5F7;
|
||||||
|
@ -493,28 +490,32 @@ Org-mode file."
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
table { border-collapse: collapse; }
|
table { border-collapse: collapse; }
|
||||||
td, th {
|
td, th { vertical-align: top; }
|
||||||
vertical-align: top;
|
|
||||||
<!--border: 1pt solid #ADB9CC;-->
|
|
||||||
}
|
|
||||||
dt { font-weight: bold; }
|
dt { font-weight: bold; }
|
||||||
</style>"
|
</style>"
|
||||||
"The default style specification for exported HTML files.
|
"The default style specification for exported HTML files.
|
||||||
Since there are different ways of setting style information, this variable
|
Please use the variables `org-export-html-stye' and
|
||||||
needs to contain the full HTML structure to provide a style, including the
|
`org-export-html-style-extra' to add to this style.")
|
||||||
surrounding HTML tags. The style specifications should include definitions
|
|
||||||
for new classes todo, done, title, and deadline. For example, valid values
|
(defcustom org-export-html-style ""
|
||||||
would be:
|
"Org-wide style definitions for exported HTML files.
|
||||||
|
|
||||||
|
This variable needs to contain the full HTML structure to provide a style,
|
||||||
|
including the surrounding HTML tags. If you set the value of this variable,
|
||||||
|
you should consider to include definitions for the following classes:
|
||||||
|
title, todo, done, timestamp, timestamp-kwd, tag, target.
|
||||||
|
|
||||||
|
For example, a valid value would be:
|
||||||
|
|
||||||
<style type=\"text/css\">
|
<style type=\"text/css\">
|
||||||
p { font-weight: normal; color: gray; }
|
p { font-weight: normal; color: gray; }
|
||||||
h1 { color: black; }
|
h1 { color: black; }
|
||||||
.title { text-align: center; }
|
.title { text-align: center; }
|
||||||
.todo, .deadline { color: red; }
|
.todo, .timestamp-kwd { color: red; }
|
||||||
.done { color: green; }
|
.done { color: green; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
or, if you want to keep the style in a file,
|
If you'd like to refer to en external style file, use something like
|
||||||
|
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"mystyles.css\">
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"mystyles.css\">
|
||||||
|
|
||||||
|
@ -525,14 +526,11 @@ See also the variable `org-export-html-style-extra'."
|
||||||
:type 'string)
|
:type 'string)
|
||||||
|
|
||||||
(defcustom org-export-html-style-extra ""
|
(defcustom org-export-html-style-extra ""
|
||||||
"Additional style information that is spliced into `org-export-html-style'.
|
"Additional style information for HTML export.
|
||||||
This can be used to add or overwrite information given in the variable
|
The value of this variable is inserted into the HTML buffer right after
|
||||||
`org-export-html-style'. Use this if you are satisfied with the default
|
the value of `org-export-html-style'. Use this variable for per-file
|
||||||
style but would like to add to it instead of completely overwriting it.
|
settings of style information, and do not forget to surround the style
|
||||||
The value of this variable is spliced into `org-export-html-style', directly
|
settings with <style>...</style> tags."
|
||||||
before the </style> tag. Note that this will only work if the default
|
|
||||||
style does indeed contain this tag. In particular, if the default is to
|
|
||||||
refer to a CSS style file, this option will be completely ignored."
|
|
||||||
:group 'org-export-html
|
:group 'org-export-html
|
||||||
:type 'string)
|
:type 'string)
|
||||||
|
|
||||||
|
@ -2630,7 +2628,8 @@ PUB-DIR is set, use this as the publishing directory."
|
||||||
ext-plist
|
ext-plist
|
||||||
(org-infile-export-plist))))
|
(org-infile-export-plist))))
|
||||||
|
|
||||||
(style (org-export-splice-style (plist-get opt-plist :style)
|
(style (concat org-export-html-style-default
|
||||||
|
(plist-get opt-plist :style)
|
||||||
(plist-get opt-plist :style-extra)))
|
(plist-get opt-plist :style-extra)))
|
||||||
(html-extension (plist-get opt-plist :html-extension))
|
(html-extension (plist-get opt-plist :html-extension))
|
||||||
(link-validate (plist-get opt-plist :link-validation-function))
|
(link-validate (plist-get opt-plist :link-validation-function))
|
||||||
|
|
Loading…
Reference in New Issue