Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:HTML Export   [Contents][Index]


13.9.13 CSS support

You can modify the CSS style definitions for the exported file. TheHTML exporter assigns the following special CSS classes136 to appropriate parts of the document—your stylespecifications may change these, in addition to any of the standardclasses like for headlines, tables, etc.

p.authorauthor information, including email
p.datepublishing date
p.creatorcreator info, about org mode version
.titledocument title
.subtitledocument subtitle
.todoTODO keywords, all not-done states
.donethe DONE keywords, all states that count as done
.WAITINGeach TODO keyword also uses a class named after itself
.timestamptimestamp
.timestamp-kwdkeyword associated with a timestamp, like ‘SCHEDULED
.timestamp-wrapperspan around keyword plus timestamp
.tagtag in a headline
._HOMEeach tag uses itself as a class, “@” replaced by “_”
.targettarget for links
.linenrthe line number in a code example
.code-highlightedfor highlighting referenced code lines
div.outline-Ndiv for outline level N (headline plus text)
div.outline-text-Nextra div for text at outline level N
.section-number-Nsection number in headlines, different for each level
.figure-numberlabel like “Figure 1:”
.table-numberlabel like “Table 1:”
.listing-numberlabel like “Listing 1:”
div.figurehow to format an in-lined image
pre.srcformatted source code
pre.examplenormal example
p.verseverse paragraph
div.footnotesfootnote section headline
p.footnotefootnote definition paragraph, containing a footnote
.footrefa footnote reference number (always a <sup>)
.footnumfootnote number in footnote definition (always <sup>)
.org-svgdefault class for a linked ‘.svg’ image

The HTML export backend includes a compact default style in eachexported HTML file. To override the default style with another style,use these keywords in the Org file. They will replace the globaldefaults the HTML exporter uses.

#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style1.css" />#+HTML_HEAD_EXTRA: <link rel="alternate stylesheet" type="text/css" href="style2.css" />

To just turn off the default style, customizeorg-html-head-include-default-style variable, or use this optionline in the Org file.

#+OPTIONS: html-style:nil

For longer style definitions, either use several ‘HTML_HEAD’ and‘HTML_HEAD_EXTRA’ keywords, or use<style> ... </style> blocksaround them. Both of these approaches can avoid referring to anexternal file.

In order to add styles to a subtree, use the ‘HTML_CONTAINER_CLASS’property to assign a class to the tree. In order to specify CSSstyles for a particular headline, you can use the ID specified ina ‘CUSTOM_ID’ property. You can also assign a specific class toa headline with the ‘HTML_HEADLINE_CLASS’ property.

Never change theorg-html-style-default constant. Instead use othersimpler ways of customizing as described above.


Footnotes

(136)

If theclasses on TODO keywords and tags lead to conflicts, use the variablesorg-html-todo-kwd-class-prefix andorg-html-tag-class-prefix tomake them unique.


Next:JavaScript supported display of web pages, Previous:Text areas in HTML export, Up:HTML Export   [Contents][Index]


[8]ページ先頭

©2009-2025 Movatter.jp