|
From: <mi...@us...> - 2015-03-06 15:43:27
|
Revision: 7809
http://sourceforge.net/p/docutils/code/7809
Author: milde
Date: 2015-03-06 15:43:11 +0000 (Fri, 06 Mar 2015)
Log Message:
-----------
New CSS 2.1 style-sheet for xhtml11 writer.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/docutils/writers/xhtml11/__init__.py
trunk/docutils/docutils/writers/xhtml11/xhtml11.css
trunk/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml
trunk/docutils/test/functional/input/data/svg_images.txt
trunk/docutils/test/functional/input/standalone_rst_xhtml11.txt
trunk/docutils/test/functional/tests/standalone_rst_xhtml11.py
Added Paths:
-----------
trunk/docutils/docs/user/rst/images/biohazard-bitmap.svg
trunk/docutils/docutils/writers/xhtml11/html-base.css
trunk/docutils/test/functional/input/data/html-base.css
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2015-02-27 17:03:32 UTC (rev 7808)
+++ trunk/docutils/HISTORY.txt 2015-03-06 15:43:11 UTC (rev 7809)
@@ -43,14 +43,9 @@
* docutils/writers/xhtml11/
- - New HTML writer generating `XHTML1.1`_ styled with CSS2.
+ - New HTML writer generating `XHTML1.1`_ styled with CSS2.1
Moved to the docutils core from sandbox/html4strict.
- - Wrap SVG images in <img> tags not <object>.
- Addresses bug [ 247 ], but rendering problems remain
- (see test/functional/expected/standalone_rst_xhtml11.xhtml),
- so we might need a config setting.
-
.. _XHTML1.1: http://www.w3.org/TR/xhtml11/
* docutils/writers/latex2e/__init__.py
Added: trunk/docutils/docs/user/rst/images/biohazard-bitmap.svg
===================================================================
--- trunk/docutils/docs/user/rst/images/biohazard-bitmap.svg (rev 0)
+++ trunk/docutils/docs/user/rst/images/biohazard-bitmap.svg 2015-03-06 15:43:11 UTC (rev 7809)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="16"
+ height="16"
+ id="svg2">
+ <metadata
+ id="metadata8">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs6" />
+ <image
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAIRJREFU
+OI2lUkEOwCAIa83+/+XusGCQIWOxF1GhUICSEEFSkvj1BgCjEwwAkkjylW0hyByyBP5+dR2zqrYE
+ux5kvq8e/AVtCh39HlbhqIIlcafdx+jxFezs2BY3fDkxO0lVezElnGA2MWrzmxftkiASxZIjjiWk
+BNlYd6NeJCyzLVbZ/92om331AFqcoAAAAABJRU5ErkJggg==
+"
+ x="4.9541664"
+ y="-5.2426963"
+ width="11.322034"
+ height="9.3559322"
+ transform="matrix(0.77695327,0.62955828,-0.62955828,0.77695327,0,0)"
+ id="image10" />
+ <text
+ x="0.40677962"
+ y="15.186441"
+ id="text2987"
+ xml:space="preserve"
+ style="font-size:4px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"><tspan
+ x="0.40677962"
+ y="15.186441"
+ id="tspan2989">turned</tspan></text>
+</svg>
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2015-02-27 17:03:32 UTC (rev 7808)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2015-03-06 15:43:11 UTC (rev 7809)
@@ -305,7 +305,8 @@
# A heterogenous stack used in conjunction with the tree traversal.
# Make sure that the pops correspond to the pushes:
self.context = []
- self.topic_classes = []
+
+ self.topic_classes = [] # TODO: replace with self_in_contents
self.colspecs = []
self.compact_p = True
self.compact_simple = False
@@ -568,6 +569,7 @@
and 'open' not in node['classes']
and (self.compact_simple
or self.topic_classes == ['contents']
+ # TODO: self.in_contents
or self.check_simple_list(node))))
def visit_bullet_list(self, node):
@@ -964,11 +966,10 @@
self.context.append('<a class="fn-backref" href="#%s">'
% backrefs[0])
else:
- i = 1
- for backref in backrefs:
+ # Python 2.4 fails with enumerate(backrefs, 1)
+ for (i, backref) in enumerate(backrefs):
backlinks.append('<a class="fn-backref" href="#%s">%s</a>'
- % (backref, i))
- i += 1
+ % (backref, i+1))
self.context.append('<em>(%s)</em> ' % ', '.join(backlinks))
self.context += ['', '']
else:
@@ -1676,10 +1677,13 @@
def visit_topic(self, node):
self.body.append(self.starttag(node, 'div', CLASS='topic'))
self.topic_classes = node['classes']
+ # TODO: replace with ::
+ # self.in_contents = 'contents' in node['classes']
def depart_topic(self, node):
self.body.append('</div>\n')
self.topic_classes = []
+ # TODO self.in_contents = False
def visit_transition(self, node):
self.body.append(self.emptytag(node, 'hr', CLASS='docutils'))
Modified: trunk/docutils/docutils/writers/xhtml11/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/xhtml11/__init__.py 2015-02-27 17:03:32 UTC (rev 7808)
+++ trunk/docutils/docutils/writers/xhtml11/__init__.py 2015-03-06 15:43:11 UTC (rev 7809)
@@ -40,12 +40,13 @@
'xhtml11', 'xhtml1css2')
"""Formats this writer supports."""
- default_stylesheets = ['html4css1.css', 'xhtml11.css']
+ default_stylesheets = ['html-base.css', 'xhtml11.css']
default_stylesheet_dirs = ['.',
os.path.abspath(os.path.dirname(__file__)),
+ # for math.css:
os.path.abspath(os.path.join(
os.path.dirname(os.path.dirname(__file__)), 'html4css1'))
- ]
+ ]
config_section = 'xhtml11 writer'
config_section_dependencies = ('writers', 'html4css1 writer')
@@ -97,6 +98,9 @@
' xml:lang="%(lang)s">\n<head>\n')
lang_attribute = 'xml:lang' # changed from 'lang' in XHTML 1.0
+ def __init__(self, document):
+ html4css1.HTMLTranslator.__init__(self, document)
+ self.in_footnote_list = False
# Do not mark the first child with 'class="first"' and the last
# child with 'class="last"' in definitions, table cells, field
@@ -108,9 +112,10 @@
# Compact lists
# ------------
- # Include field lists (in addition to ordered and unordered lists)
- # in the test if a list is "simple" (cf. the html4css1.HTMLTranslator
- # docstring and the SimpleListChecker class at the end of this file).
+ # Include definition lists and field lists (in addition to ordered
+ # and unordered lists) in the test if a list is "simple" (cf. the
+ # html4css1.HTMLTranslator docstring and the SimpleListChecker class at
+ # the end of this file).
def is_compactable(self, node):
# print "is_compactable %s ?" % node.__class__,
@@ -122,8 +127,9 @@
# print "explicitely open"
return False
# check config setting:
- if (isinstance(node, nodes.field_list) and
- not self.settings.compact_field_lists):
+ if (isinstance(node, nodes.field_list) or
+ isinstance(node, nodes.definition_list)
+ ) and not self.settings.compact_field_lists:
# print "`compact-field-lists` is False"
return False
if (isinstance(node, nodes.enumerated_list) or
@@ -132,8 +138,7 @@
# print "`compact-lists` is False"
return False
# more special cases:
- if (self.compact_simple or self.topic_classes == ['contents']):
- # print "self.compact_simple is True"
+ if (self.topic_classes == ['contents']): # TODO: self.in_contents
return True
# check the list items:
visitor = SimpleListChecker(self.document)
@@ -146,26 +151,75 @@
# print "simple list"
return True
+ # address, literal block, and doctest block: no newline after <pre> tag
+ # (leads to blank line in XHTML1.1)
+ def visit_address(self, node):
+ self.visit_docinfo_item(node, 'address', meta=False)
+ self.body.append(self.starttag(node, 'pre',suffix='',
+ CLASS='address'))
+
+ # author, authors
+ # ---------------
+ # Use paragraphs instead of hard-coded linebreaks.
+
+ def visit_author(self, node):
+ if not(isinstance(node.parent, nodes.authors)):
+ self.visit_docinfo_item(node, 'author')
+ self.body.append('<p>')
+
+ def depart_author(self, node):
+ self.body.append('</p>')
+ if isinstance(node.parent, nodes.authors):
+ self.body.append('\n')
+ else:
+ self.depart_docinfo_item()
+
+ def visit_authors(self, node):
+ self.visit_docinfo_item(node, 'authors')
+
+ def depart_authors(self, node):
+ self.depart_docinfo_item()
+
# citations
# ---------
# Use definition list instead of table for bibliographic references.
# Join adjacent citation entries.
def visit_citation(self, node):
- if self.body[-1] == '<-- next citation -->':
- del(self.body[-1])
- else:
- self.body.append('<dl class="citation">')
- self.context.append(self.starttag(node, 'dd'))
- self.footnote_backrefs(node)
+ if not self.in_footnote_list:
+ self.body.append('<dl class="citation">\n')
+ self.in_footnote_list = True
def depart_citation(self, node):
self.body.append('</dd>\n')
- if isinstance(node.next_node(), nodes.citation):
- self.body.append('<-- next citation -->')
- else:
+ if not isinstance(node.next_node(descend=False, siblings=True),
+ nodes.citation):
self.body.append('</dl>\n')
+ self.in_footnote_list = False
+ # classifier
+ # ----------
+ # don't insert classifier-delimiter here (done by CSS)
+
+ def visit_classifier(self, node):
+ self.body.append(self.starttag(node, 'span', '', CLASS='classifier'))
+
+ def depart_classifier(self, node):
+ self.body.append('</span>')
+
+ # definition list
+ # ---------------
+ # check for simple/complex list and set class attribute
+
+ def visit_definition_list(self, node):
+ classes = node.setdefault('classes', [])
+ if self.is_compactable(node):
+ classes.append('simple')
+ self.body.append(self.starttag(node, 'dl'))
+
+ def depart_definition_list(self, node):
+ self.body.append('</dl>\n')
+
# docinfo
# -------
# use definition list instead of table
@@ -178,7 +232,7 @@
def depart_docinfo(self, node):
self.body.append('</dl>\n')
-
+
def visit_docinfo_item(self, node, name, meta=True):
if meta:
meta_tag = '<meta name="%s" content="%s" />\n' \
@@ -191,6 +245,14 @@
def depart_docinfo_item(self):
self.body.append('</dd>\n')
+ # doctest-block
+ # -------------
+ # no line-break
+ # TODO: RSt-parser should treat this as code-block with class "pycon".
+
+ def visit_doctest_block(self, node):
+ self.body.append(self.starttag(node, 'pre', suffix='',
+ CLASS='code pycon doctest-block'))
# enumerated lists
# ----------------
@@ -200,18 +262,17 @@
def visit_enumerated_list(self, node):
atts = {}
if 'start' in node:
- atts['style'] = 'counter-reset: item %d;' % (
- node['start'] - 1)
+ atts['style'] = 'counter-reset: item %d;' % (node['start'] - 1)
classes = node.setdefault('classes', [])
if 'enumtype' in node:
classes.append(node['enumtype'])
- if self.is_compactable(node) and not self.compact_simple:
+ if self.is_compactable(node):
classes.append('simple')
- # @@@ To do: prefix, suffix. (?)
- self.context.append((self.compact_simple, self.compact_p))
- self.compact_p = False
self.body.append(self.starttag(node, 'ol', **atts))
+ def depart_enumerated_list(self, node):
+ self.body.append('</ol>\n')
+
# field-list
# ----------
# set as definition list, styled with CSS
@@ -219,16 +280,12 @@
def visit_field_list(self, node):
# Keep simple paragraphs in the field_body to enable CSS
# rule to start body on new line if the label is too long
- self.context.append((self.compact_field_list, self.compact_p))
- self.compact_field_list, self.compact_p = False, False
- #
classes = 'field-list'
if (self.is_compactable(node)):
classes += ' simple'
self.body.append(self.starttag(node, 'dl', CLASS=classes))
def depart_field_list(self, node):
- self.compact_field_list, self.compact_p = self.context.pop()
self.body.append('</dl>\n')
def visit_field(self, node):
@@ -254,22 +311,16 @@
# use definition list instead of table for footnote text
def visit_footnote(self, node):
- if self.body[-1] == '<-- next footnote -->':
- del(self.body[-1])
- else:
- self.body.append('<dl class="footnote">')
- self.context.append(self.starttag(node, 'dd'))
- self.footnote_backrefs(node)
+ if not self.in_footnote_list:
+ self.body.append('<dl class="footnote">\n')
+ self.in_footnote_list = True
def depart_footnote(self, node):
self.body.append('</dd>\n')
- next_siblings = node.traverse(descend=False, siblings=True,
- include_self=False)
- next = next_siblings and next_siblings[0]
- if isinstance(next, nodes.footnote):
- self.body.append('<-- next footnote -->')
- else:
+ if not isinstance(node.next_node(descend=False, siblings=True),
+ nodes.footnote):
self.body.append('</dl>\n')
+ self.in_footnote_list = False
# footnote and citation label
def label_delim(self, node, bracket, superscript):
@@ -279,26 +330,34 @@
return bracket
else:
return superscript
- else:
- assert isinstance(node.parent, nodes.citation)
- return bracket
+ assert isinstance(node.parent, nodes.citation)
+ return bracket
def visit_label(self, node):
- # Context added in footnote_backrefs.
- suffix = '%s%s' % (self.context.pop(),
- self.label_delim(node, '[', ''))
- self.body.append(self.starttag(node, 'dt', suffix, CLASS='label'))
+ # pass parent node to get id into starttag:
+ self.body.append(self.starttag(node.parent, 'dt', '', CLASS='label'))
+ # footnote/citation backrefs:
+ if self.settings.footnote_backlinks:
+ backrefs = node.parent['backrefs']
+ if len(backrefs) == 1:
+ self.body.append('<a class="fn-backref" href="#%s">'
+ % backrefs[0])
+ self.body.append(self.label_delim(node, '[', ''))
def depart_label(self, node):
- delim = self.label_delim(node, ']', '')
- # Context added in footnote_backrefs.
- backref = self.context.pop()
- text = self.context.pop()
- # <dd> starttag added in visit_footnote() / visit_citation()
- starttag = self.context.pop()
- self.body.append('%s%s</dt>\n%s%s' % (delim, backref, starttag, text))
+ self.body.append(self.label_delim(node, ']', ''))
+ if self.settings.footnote_backlinks:
+ backrefs = node.parent['backrefs']
+ if len(backrefs) == 1:
+ self.body.append('</a>')
+ elif len(backrefs) > 1:
+ # Python 2.4 fails with enumerate(backrefs, 1)
+ backlinks = ['<a href="#%s">%s</a>' % (ref, i+1)
+ for (i, ref) in enumerate(backrefs)]
+ self.body.append('<span class="fn-backref">(%s)</span>'
+ % ','.join(backlinks))
+ self.body.append('</dt>\n<dd>')
-
def visit_generated(self, node):
if 'sectnum' in node['classes']:
# get section number (strip trailing no-break-spaces)
@@ -315,7 +374,7 @@
# Image types to place in an <object> element
# SVG as <img> supported since IE version 9
# (but rendering problems remain (see standalonge_rst2xhtml11.xhtml test output)
- object_image_types = {'.swf': 'application/x-shockwave-flash'}
+ # object_image_types = {'.swf': 'application/x-shockwave-flash'}
# Do not mark the first child with 'class="first"'
def visit_list_item(self, node):
@@ -352,16 +411,10 @@
# skipped unless literal element is from "code" role:
self.body.append('</code>')
- # literal block and doctest block: no newline after <pre> tag
- # (leads to blank line in XHTML1.1)
def visit_literal_block(self, node,):
self.body.append(self.starttag(node, 'pre', suffix='',
CLASS='literal-block'))
- def visit_doctest_block(self, node):
- self.body.append(self.starttag(node, 'pre', suffix='',
- CLASS='doctest-block'))
-
# Meta tags: 'lang' attribute replaced by 'xml:lang' in XHTML 1.1
def visit_meta(self, node):
if node.hasattr('lang'):
@@ -419,10 +472,10 @@
# * In XHTML 1.1, e.g. a <blockquote> element may not contain
# character data, so you cannot drop the <p> tags.
# * Keeping simple paragraphs in the field_body enables a CSS
- # rule to start the field-body on new line if the label is too long
+ # rule to start the field-body on a new line if the label is too long
# * it makes the code simpler.
#
- # TODO: omit paragraph tags in simple table cells.
+ # TODO: omit paragraph tags in simple table cells?
def visit_paragraph(self, node):
self.body.append(self.starttag(node, 'p', ''))
@@ -430,7 +483,6 @@
def depart_paragraph(self, node):
self.body.append('</p>')
if not (isinstance(node.parent, (nodes.list_item, nodes.entry)) and
- # (node is node.parent[-1])
(len(node.parent) == 1)
):
self.body.append('\n')
@@ -480,10 +532,8 @@
def visit_list_item(self, node):
# print "visiting list item", node.__class__
- children = []
- for child in node.children:
- if not isinstance(child, nodes.Invisible):
- children.append(child)
+ children = [child for child in node.children
+ if not isinstance(child, nodes.Invisible)]
# print "has %s visible children" % len(children)
if (children and isinstance(children[0], nodes.paragraph)
and (isinstance(children[-1], nodes.bullet_list) or
@@ -509,11 +559,17 @@
visit_status = _simple_node
visit_version = visit_list_item
- # Field list items
+ # Definition list:
+ visit_definition_list = _pass_node
+ visit_definition_list_item = _pass_node
+ visit_term = _pass_node
+ visit_classifier = _pass_node
+ visit_definition = visit_list_item
+
+ # Field list:
visit_field_list = _pass_node
visit_field = _pass_node
# the field body corresponds to a list item
- # visit_field_body = html4css1.SimpleListChecker.visit_list_item
visit_field_body = visit_list_item
visit_field_name = html4css1.SimpleListChecker.invisible_visit
Added: trunk/docutils/docutils/writers/xhtml11/html-base.css
===================================================================
--- trunk/docutils/docutils/writers/xhtml11/html-base.css (rev 0)
+++ trunk/docutils/docutils/writers/xhtml11/html-base.css 2015-03-06 15:43:11 UTC (rev 7809)
@@ -0,0 +1,492 @@
+/* Basic style sheet for the HTML output of Docutils. */
+/* */
+/* :Author: Günter Milde, based on html4css1.css by David Goodger */
+/* :Id: $Id$ */
+/* :Copyright: © 2015 Günter Milde. */
+/* :License: Released under the terms of the `2-Clause BSD license`_, */
+/* in short: */
+/* */
+/* Copying and distribution of this file, with or without modification, */
+/* are permitted in any medium without royalty provided the copyright */
+/* notice and this notice are preserved. */
+/* */
+/* This file is offered as-is, without any warranty. */
+/* */
+/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
+
+
+/* This stylesheet contains basic rules for the output of the */
+/* Docutils HTML writers. It validates_ as CSS2.1_ */
+/* */
+/* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
+/* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
+
+
+/* Document Structure */
+/* ****************** */
+
+/* Document */
+
+body {
+ padding: 0 5%;
+ margin: 8px 0;
+}
+
+div.document {
+ line-height:1.3;
+ counter-reset: table;
+ /* counter-reset: figure; */
+ /* avoid long lines --> better reading */
+ /* OTOH: lines should not be too short because of missing hyphenation, */
+ max-width: 50em;
+ margin: auto;
+}
+
+.align-left { text-align: left; }
+.align-right { text-align: right; }
+.align-center {
+ clear: both;
+ text-align: center;
+}
+
+/* Sections */
+
+h1.title, h2.subtitle {
+ text-align: center;
+}
+h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
+h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
+ margin-top: -0.25em;
+}
+span.section-subtitle {
+ /* font-size relative to parent (h1..h6 element) */
+ font-size: 75%;
+}
+
+a.toc-backref {
+ color: black;
+ text-decoration: none;
+}
+
+/* Stop floating sidebars, images and figures at section level 1,2,3 */
+h1, h2, h3 { clear: both; }
+
+/* Transitions */
+
+hr.docutils {
+ width: 80%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+/* Paragraphs */
+/* ========== */
+
+/* vertical space (parskip) */
+p, ol, ul, dl,
+div.line-block,
+table{
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+h1, h2, h3, h4, h5, h6,
+dl > dd {
+ margin-bottom: 0.5em;
+}
+
+/* titles */
+p.admonition-title,
+p.topic-title,
+p.sidebar-title,
+p.sidebar-subtitle,
+p.system-message-title {
+ font-weight: bold;
+}
+
+/* Warnings, Errors */
+div.caution p.admonition-title,
+div.attention p.admonition-title,
+div.danger p.admonition-title,
+div.error p.admonition-title,
+div.warning p.admonition-title,
+div.system-messages h1,
+div.error,
+span.problematic,
+p.system-message-title {
+ color: red;
+}
+
+/* Lists */
+/* ========== */
+
+/* compact and simple lists: no margin between items */
+dl.simple > dd, dl.compact > dd,
+.compact li, .compact ul, .compact ol
+.simple li, .simple ul, .simple ol,
+.simple > li p, .compact > li p {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+/* Enumerated Lists */
+
+ol.arabic { list-style: decimal }
+ol.loweralpha { list-style: lower-alpha }
+ol.upperalpha { list-style: upper-alpha }
+ol.lowerroman { list-style: lower-roman }
+ol.upperroman { list-style: upper-roman }
+
+/* Definition Lists */
+
+dl > dd p:first-child { margin-top: 0; }
+/* :last-child is not part of CSS 2.1 (introduced in CSS 3) */
+/* dl > dd p:last-child { margin-bottom: 0; } */
+
+/* lists nested in definition lists */
+dd > ul, dd > ol { padding-left: 0pt; }
+
+dt span.classifier { font-style: italic }
+dt span.classifier:before {
+ font-style: normal;
+ margin: 0.5em;
+ content: ":";
+}
+
+/* Field Lists */
+
+/* bold field name, content starts on the same line */
+dl.field-list > dt,
+dl.option-list > dt,
+dl.docinfo > dt,
+dl.footnote > dt,
+dl.citation > dt,
+dl.description > dt {
+ font-weight: bold;
+ clear: left;
+ float: left;
+ margin: 0;
+ padding: 0;
+ padding-right: 0.5em;
+}
+/* Offset for field content (corresponds to the --field-name-limit option) */
+dl.field-list > dd,
+dl.option-list > dd,
+dl.docinfo > dd {
+ margin-left: 9em; /* ca. 14 chars in the test examples */
+/* padding-left: 0.5em; */
+}
+/* start field-body on a new line after long field names */
+dl.field-list > dd > *:first-child,
+dl.option-list > dd > *:first-child,
+dl.docinfo > dd > *:first-child {
+ display: inline-block;
+ width: 100%;
+ margin: 0;
+}
+/* field names followed by a colon */
+dl.field-list > dt:after,
+dl.docinfo > dt:after {
+ content: ":";
+}
+
+/* Bibliographic Fields */
+
+/* use special field-list dl.docinfo */
+
+pre.address {
+ margin-bottom: 0;
+ margin-top: 0;
+ font: inherit;
+}
+dd.authors > p { margin: 0; }
+
+div.abstract p.topic-title {
+ text-align: center;
+}
+
+div.dedication {
+ margin: 2em 5em;
+ text-align: center;
+ font-style: italic;
+}
+div.dedication p.topic-title {
+ font-style: normal;
+}
+
+/* Option Lists */
+
+dl.option-list {
+ margin-left: 1em;
+}
+dl.option-list > dt {
+ font-weight: normal;
+}
+span.option {
+ white-space: nowrap;
+}
+
+/* Text Blocks */
+/* ============ */
+
+/* Line Blocks */
+
+div.line-block {
+ display: block;
+}
+div.line-block div.line-block {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-left: 1.5em;
+}
+
+/* Literal Blocks */
+
+pre.literal-block, pre.doctest-block,
+pre.math, pre.code {
+ margin-left: 1.5em;
+ margin-right: 1.5em
+}
+
+/* Block Quotes */
+
+blockquote,
+div.topic {
+ margin-left: 1.5em;
+ margin-right: 1.5em
+}
+blockquote > table,
+div.topic > table {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+blockquote p.attribution,
+div.topic p.attribution {
+ text-align: right;
+ margin-left: 20%;
+}
+
+/* Tables */
+/* ====== */
+
+/* margins and borders for "normal" tables */
+table {
+ border-collapse: collapse;
+}
+
+td, th {
+ border-style: solid;
+ border-color: silver;
+ padding: 0 1ex;
+/* some borders missing at some magnifications
+/* in Firefox 31.5.0 and opera 10.63 */
+ border-width: thin;
+}
+
+td > p:first-child, th > p:first-child {
+ margin-top: 0;
+}
+td > p, th > p {
+ margin-bottom: 0;
+}
+
+table > caption {
+ text-align: left;
+ margin-bottom: 0.25em
+}
+
+table.borderless td, table.borderless th {
+ border: 0;
+ padding: 0;
+ padding-right: 0.5em /* separate table cells */
+}
+
+/* "booktabs" style (no vertical lines) */
+table.booktabs {
+ border: 0;
+ border-top: 2px solid;
+ border-bottom: 2px solid;
+ border-collapse: collapse;
+}
+
+table.booktabs * {
+ border: 0;
+}
+table.booktabs th {
+ border-bottom: thin solid;
+ text-align: left;
+}
+
+/* numbered tables (counter defined in div.document) */
+table.numbered > caption:before {
+ counter-increment: table;
+ content: "Table " counter(table) ": ";
+ font-weight: bold;
+}
+
+/* Explicit Markup Blocks */
+/* ====================== */
+
+/* Footnotes and Citations */
+/* ----------------------- */
+
+/* line on the left */
+dl.footnote {
+ padding-left: 1ex;
+ border-left: solid;
+ border-left-width: thin;
+}
+
+dl > dt.label {
+ font-weight: normal;
+}
+dt.label > span.fn-backref {
+ margin: 0.2em;
+}
+dt.label > span.fn-backref > a {
+ font-style: italic;
+}
+
+/* Directives */
+/* ---------- */
+
+/* Admonitions */
+/* System Messages */
+
+div.admonition,
+div.system-message {
+ margin: 2em;
+ border: medium outset;
+ padding-right: 1em;
+ padding-left: 1em;
+}
+
+/* Body Elements */
+/* ~~~~~~~~~~~~~ */
+
+/* Image and Figure */
+
+img.align-left,
+.figure.align-left,
+object.align-left {
+ clear: left;
+ float: left;
+ margin-right: 1em
+}
+img.align-right,
+.figure.align-right,
+object.align-right {
+ clear: right;
+ float: right;
+ margin-left: 1em
+}
+img.align-center,
+.figure.align-center,
+object.align-center {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+/* reset inner alignment in figures */
+div.align-right {
+ text-align: inherit }
+
+/* Topic */
+
+div.topic { margin: 2em }
+
+/* Sidebar */
+
+/* in a layout with fixed margins, */
+/* the sidebar can be moved into the margin completely */
+div.sidebar {
+ border: medium outset;
+ padding-right: 1em;
+ padding-left: 1em;
+ width: 30%;
+ max-width: 26em;
+ float: right;
+ clear: right;
+ margin-left: 1em;
+ margin-right: -5.5%;
+ background-color: #ffffee ;
+}
+p.sidebar-title { font-size: larger; }
+
+/* Code */
+
+pre.code, code { background-color: #eeeeee }
+pre.code .ln { color: gray; } /* line numbers */
+/* basic highlighting: for a complete scheme, see */
+/* http://docutils.sourceforge.net/sandbox/stylesheets/ */
+pre.code .comment, code .comment { color: #5C6576 }
+pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
+pre.code .literal.string, code .literal.string { color: #0C5404 }
+pre.code .name.builtin, code .name.builtin { color: #352B84 }
+pre.code .deleted, code .deleted { background-color: #DEB0A1}
+pre.code .inserted, code .inserted { background-color: #A3D289}
+
+/* Math */
+/* styled separately (see math.css for math-output=HTML) */
+
+/* Rubric */
+
+p.rubric {
+ font-weight: bold;
+ font-size: larger;
+ color: maroon;
+}
+
+/* Epigraph */
+/* Highlights */
+/* Pull-Quote */
+/* Compound Paragraph */
+/* Container */
+
+/* can be styled in a custom stylesheet */
+
+/* Document Header & Footer */
+
+div.footer, div.header {
+ clear: both;
+ font-size: smaller;
+}
+
+/* Contents */
+
+div.topic.contents {
+ margin: 0; /* don't indent like a topic */
+}
+ul.auto-toc {
+ list-style-type: none;
+}
+
+/* Inline Markup */
+/* ============= */
+
+/* Emphasis */
+/* em */
+/* Strong Emphasis */
+/* strong */
+/* Interpreted Text */
+/* span.interpreted */
+/* Title Reference */
+/* cite */
+/* Inline Literals */
+
+/* possible values: normal, nowrap, pre, pre-wrap, pre-line */
+tt.literal, span.literal { white-space: pre-wrap; }
+/* do not wraph a hyphens and similar: */
+.literal > span.pre { white-space: nowrap; }
+
+/* Hyperlink References */
+
+a { text-decoration: none; }
+
+/* External Targets */
+/* span.target.external */
+/* Internal Targets */
+/* span.target.internal */
+/* Footnote References */
+/* a.footnote-reference */
+/* Citation References */
+/* a.citation-reference */
Property changes on: trunk/docutils/docutils/writers/xhtml11/html-base.css
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/docutils/docutils/writers/xhtml11/xhtml11.css
===================================================================
--- trunk/docutils/docutils/writers/xhtml11/xhtml11.css 2015-02-27 17:03:32 UTC (rev 7808)
+++ trunk/docutils/docutils/writers/xhtml11/xhtml11.css 2015-03-06 15:43:11 UTC (rev 7809)
@@ -1,191 +1,35 @@
-/* html4css2.css: Cascading style sheet for Docutils' html4strict writer. */
-/* */
-/* :Author: Günter Milde */
-/* :Copyright: © 2009 Günter Milde. */
-/* Released without warranties or conditions of any kind */
-/* under the terms of the Apache License, Version 2.0 */
-/* http://www.apache.org/licenses/LICENSE-2.0 */
-/* */
-/* This stylesheet supplements the Docutils standard style 'html4css1.css'. */
-/* It uses CSS 2.1 elements (supported by up-to-date versions of popular */
-/* browsers). */
+/* xhtml11.css: Cascading style sheet for Docutils' xhtml11 writer. */
+/* */
+/* :Author: Günter Milde */
+/* :Copyright: © 2009, 2014 Günter Milde. */
+/* :License: Released under the terms of the `2-Clause BSD license`_, */
+/* in short: */
+/* */
+/* Copying and distribution of this file, with or without modification, */
+/* are permitted in any medium without royalty provided the copyright */
+/* notice and this notice are preserved. */
+/* This file is offered as-is, without any warranty. */
+/* */
+/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause */
-/* General rules */
-/* ============= */
+/* This stylesheet contains rules specific to the output of the */
+/* XHTML 1.1 writer. It supplements the "html-base.css" stylesheet. */
+/* It validates_ as CSS2.1_ */
+/* */
+/* .. _CSS2.1: http://www.w3.org/TR/CSS2 */
+/* .. _validates: http://jigsaw.w3.org/css-validator/validator$link */
-body {
- padding: 0 5%;
- margin: 8px 0;
- line-height:1.3;
- /* http://ilovetypography.com/2008/02/28/a-guide-to-web-typography/
- recommends "line-spacing that’s at least 140% of your text size" */
- counter-reset: table;
- /* counter-reset: figure; */
-}
-/* avoid long lines --> better reading */
-/* OTOH: lines should not be too short because of missing hyphenation, */
-div.document {
- max-width: 45em;
- margin: auto;
-}
+/* Ordered List (Enumeration) */
+/* -------------------------- */
-/* separate items except for compact lists */
-dl > dd {
- margin-bottom: 1em;
-}
-.compact li, .compact p, .compact ul, .compact ol
-dl.simple > dd, .simple li, .simple p, .simple ul, .simple ol {
- margin-top: 0;
- margin-bottom: 0;
-/* background: magenta; */
-}
-dl.simple, dl.compact, dl.simple > dd, dl.compact > dd {
- margin-top: 0;
- margin-bottom: 0;
-/* background: lightgreen; */
-}
+/* XHTML 1.1 removed the "start" argument form ordered lists (It */
+/* resurfaces in HTML5). */
+/* */
+/* Use custom counters to replace the deprecated start attribute. Make */
+/* sure the resulting list resembles the list-style 'outside' with a */
+/* hanging indent. */
-/* space around paragraphs */
-dl > dd p:first-child, td > p {
- margin: 0;
-}
-
-/* Sidebar */
-/* ------- */
-
-div.sidebar {
- margin-right: -5%;
-}
-
-/* Special definition lists */
-/* ======================== */
-
-/* bold definition term on the same line as the label */
-dl.field-list > dt, dl.option-list > dt, dl.docinfo > dt,
-dl.footnote > dt, dl.citation > dt, dl.description > dt {
- clear: left;
- float: left;
- margin: 0;
- padding: 0;
- padding-right: 0.5em;
- font-weight: bold;
-}
-/* except for these */
-dl.option-list > dt, dl.footnote > dt {
- font-weight: normal;
-}
-
-
-
-/* Field Lists */
-/* ----------- */
-
-/* field names followed by a colon */
-dl.field-list > dt:after, dl.docinfo > dt:after {
- content: ":";
-}
-
-/* Offset for field content (corresponds to the --field-name-limit option) */
-dl.field-list > dd {
- margin-left: 9em; /* ca. 14 chars in the test examples */
- padding-left: 0.5em;
-}
-
-/* start field-body on a new line after long field names */
-dl.field-list > dd p {
- width: 100%;
-/* display: inline-block; */
-/* background: yellow; */
-}
-
-dl.field-list > dd > p:first-child,
-/* dl.field-list > dd > ol:first-child, */
-/* dl.field-list > dd > ul:first-child, */
-dl.field-list > dd > dl:first-child {
- display: inline-block;
-}
-
-/* field-list variants:: */
-
-/* example for custom field-name width */
-dl.field-list.narrow > dd {
- margin-left: 5em;
-}
-
-/* start field-body on same line after long field names */
-dl.field-list.run-in > dd p {
- display: block;
-}
-
-/* wrap or truncate long field names */
-dl.field-list.fix-labelwidth > dt {
- width: 8em; /* set to dl.field-list > dd margin-left - padding-left */
- overflow: hidden;
-}
-dl.field-list.fix-labelwidth > dd:after {
- /* a "stopper" to prevent next dd floating up too far */
- content: '';
- display: block;
- clear: left;
-}
-
-/* docinfo */
-
-dl.docinfo > dd {
- margin-left: 8em;
-/* margin-bottom: 0.5em; */
-}
-
-
-/* option list */
-
-dl.option-list {
- margin-left: 1em;
- padding-left: 0;
-}
-
-dl.option-list > dd {
- margin-left: 8em;
- /* margin-bottom: 0.5em; */
-}
-
-/* start description on a new line after long options */
-dl.option-list > dd p {
- width: 100%;
- display: inline-block;
-}
-
-/* footnotes */
-
-a.footnote-reference, a.fn-backref {
- text-decoration: inherit; /* do not underline footnote links */
-}
-
-dl.footnote {
- /* line on the left */
- padding-left: 1ex;
- border-left: solid;
- border-left-width: thin;
- /* border-color: black; */
-}
-
-/* paragraph on same line as backrefs */
-dd > em {
-/* background: green; */
- float: left;
- margin-right: 1ex
-}
-
-
-/*
-Ordered List (Enumeration)
---------------------------
-
-Use counters to replace the deprecated start attribute. Make sure the
-resulting list resembles the list-style 'outside' with a hanging indent.
-*/
-
/* New ordered list: reset counter, suppress the default label */
ol, ol.arabic, ol.loweralpha, ol.upperalpha,
ol.lowerroman, ol.upperroman {
@@ -248,124 +92,31 @@
content: counters(item, ".") " ";
}
-/* lists nested in definition list */
-dd > ul, dd > ol {
- padding-left: 0pt;
-}
-/* TODO: prefix, suffix? */
+/* Field Lists */
+/* ----------- */
-/* smaller font for super- and subscripts */
-/* sub, sup {font-size: 70%;} */ /* Mozilla default is `smaller` */
+/* field-list variants:: */
-
-/* Tables */
-/* ====== */
-
-/* margins and borders for "normal" tables */
-table {
-/* background: magenta; */
- margin-top: 1em ;
- margin-bottom: 1em;
-/* border-style: outset; */
- border-style: solid;
- border-color: silver;
- border-width: thin;
- border-collapse: collapse;
+/* example for custom field-name width */
+dl.field-list.narrow > dd {
+ margin-left: 5em;
}
-blockquote > table {
- margin-top: 0em ;
- margin-bottom: 0em;
-}
-td, th {
- border-style: solid;
- border-width: thin;
- border-color: silver;
- /* text-align: left; */
- padding: 0 1ex;
+/* start field-body on same line after long field names */
+dl.field-list.run-in > dd p {
+ display: block;
}
-td > p:first-child, th > p:first-child {
- margin-top: 0;
+/* wrap or truncate long field names */
+dl.field-list.fix-labelwidth > dt {
+ width: 8em; /* set to dl.field-list > dd margin-left - padding-left */
+ overflow: hidden;
}
-td > p, th > p {
- margin-bottom: 0;
+dl.field-list.fix-labelwidth > dd:after {
+ /* a "stopper" to prevent next dd floating up too far */
+ content: '';
+ display: block;
+ clear: left;
}
-
-/* no borders for "borderless" tables */
-table.borderless, table.borderless * {
- border-style: none;
-}
-
-/* "booktabs" style (no vertical lines) */
-table.booktabs {
- border: 0;
- border-top: 2px solid;
- border-bottom: 2px solid;
- border-collapse: collapse;
-}
-
-table.booktabs * {
- border: 0;
-}
-table.booktabs th {
- border-bottom: thin solid;
- text-align: left;
-}
-
-table > caption {
- text-align: left;
- margin-bottom: 0.25em
-/* padding: 2em 0 1em 0; */
-}
-
-/* numbered tables*/
-table.numbered > caption:before {
- counter-increment: table; /* defined/re-set in body */
- content: "Table " counter(table) ": ";
- font-weight: bold;
-}
-
-
-/* literal text
- ------------
-*/
-/* whitespace and wrapping in inline literals */
-/* possible values: normal, nowrap, pre, pre-wrap, pre-line */
-tt.literal {
- white-space: pre-wrap;
-}
-
-/* /* compensate for initial line-break (which is literal with XHTML 1.1) */ */
-/* pre.literal-block, pre.doctest-block { */
-/* margin-top: 0em ; */
-/* } */
-
-/* Table of Contents */
-
-/* don't indent like a topic */
-div.topic.contents {
- margin: 0;
-}
-/* div.topic.contents ul { */
-/* list-style: none; */
-/* } */
-
-div.topic.contents a {
- text-decoration: none; /* no underline for links */
-}
-
-/* section numbers */
-
-span.sectnum {
- padding-right: 1ex;
-}
-
-/* admonitions */
-
-/* no padding for top and bottom */
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
- padding: 0px 1em }
Modified: trunk/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml 2015-02-27 17:03:32 UTC (rev 7808)
+++ trunk/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml 2015-03-06 15:43:11 UTC (rev 7809)
@@ -12,7 +12,7 @@
<meta name="copyright" content="This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." name="description" xml:lang="en" />
-<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
+<link rel="stylesheet" href="../input/data/html-base.css" type="text/css" />
<link rel="stylesheet" href="../input/data/xhtml11.css" type="text/css" />
</head>
<body>
@@ -28,10 +28,9 @@
<dl class="docinfo">
<dt class="author">Author</dt>
-<dd class="author">David Goodger</dd>
+<dd class="author"><p>David Goodger</p></dd>
<dt class="address">Address</dt>
-<dd class="address"><pre class="address">
-123 Example Street
+<dd class="address"><pre class="address">123 Example Street
Example, EX Canada
A1B 2C3
</pre>
@@ -39,9 +38,10 @@
<dt class="contact">Contact</dt>
<dd class="contact"><a class="reference external" href="mailto:goodger@python.org">goodger@python.org</a></dd>
<dt class="authors">Authors</dt>
-<dd class="authors">Me
-<br />Myself
-<br />I</dd>
+<dd class="authors"><p>Me</p>
+<p>Myself</p>
+<p>I</p>
+</dd>
<dt class="organization">Organization</dt>
<dd class="organization">humankind</dd>
<dt class="date">Date</dt>
@@ -276,18 +276,18 @@
</div>
<div class="section" id="definition-lists">
<h2><a class="toc-backref" href="#id47"><span class="sectnum">2.4</span> Definition Lists</a></h2>
-<dl class="docutils">
+<dl>
<dt>Term</dt>
<dd><p>Definition</p>
</dd>
-<dt>Term <span class="classifier-delimiter">:</span> <span class="classifier">classifier</span></dt>
+<dt>Term<span class="classifier">classifier</span></dt>
<dd><p>Definition paragraph 1.</p>
<p>Definition paragraph 2.</p>
</dd>
<dt>Term</dt>
<dd><p>Definition</p>
</dd>
-<dt>Term <span class="classifier-delimiter">:</span> <span class="classifier">classifier one</span> <span class="classifier-delimiter">:</span> <span class="classifier">classifier two</span></dt>
+<dt>Term<span class="classifier">classifier one</span><span class="classifier">classifier two</span></dt>
<dd><p>Definition</p>
</dd>
</dl>
@@ -461,7 +461,7 @@
</div>
<div class="section" id="doctest-blocks">
<h2><a class="toc-backref" href="#id53"><span class="sectnum">2.10</span> Doctest Blocks</a></h2>
-<pre class="doctest-block">>>> print 'Python-specific usage examples; begun with ">>>"'
+<pre class="code pycon doctest-block">>>> print 'Python-specific usage examples; begun with ">>>"'
Python-specific usage examples; begun with ">>>"
>>> print '(cut and pasted from interactive Python sessions)'
(cut and pasted from interactive Python sessions)
@@ -469,47 +469,42 @@
</div>
<div class="section" id="footnotes">
<h2><a class="toc-backref" href="#id54"><span class="sectnum">2.11</span> Footnotes</a></h2>
-<dl class="footnote"><dt class="label">[1]</dt>
-<dd id="id8">
-<em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id9">2</a>, <a class="fn-backref" href="#id22">3</a>)</em> <p>A footnote contains body elements, consistently indented by at
+<dl class="footnote">
+<dt class="label" id="id8">[1]<span class="fn-backref">(<a href="#id1">1</a>,<a href="#id9">2</a>,<a href="#id22">3</a>)</span></dt>
+<dd><p>A footnote contains body elements, consistently indented by at
least 3 spaces.</p>
-<p class="last">This is the footnote's second paragraph.</p>
+<p>This is the footnote's second paragraph.</p>
</dd>
-<dt class="label">[2]</dt>
-<dd id="label">
-<em>(<a class="fn-backref" href="#id3">1</a>, <a class="fn-backref" href="#id10">2</a>)</em> <p>Footnotes may be numbered, either manually (as in <a class="footnote-reference" href="#id8" id="id9">[1]</a>) or
+<dt class="label" id="label">[2]<span class="fn-backref">(<a href="#id3">1</a>,<a href="#id10">2</a>)</span></dt>
+<dd><p>Footnotes may be numbered, either manually (as in <a class="footnote-reference" href="#id8" id="id9">[1]</a>) or
automatically using a "#"-prefixed label. This footnote has a
label so it can be referred to from multiple places, both as a
footnote reference (<a class="footnote-reference" href="#label" id="id10">[2]</a>) and as a <a class="reference internal" href="#label">hyperlink reference</a>.</p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id2">[3]</a></dt>
-<dd id="id12">
-<p class="first">This footnote is numbered automatically and anonymously using a
+<dt class="label" id="id12"><a class="fn-backref" href="#id2">[3]</a></dt>
+<dd><p>This footnote is numbered automatically and anonymously using a
label of "#" only.</p>
<p>This is the second paragraph.</p>
-<p class="last">And this is the third paragraph.</p>
+<p>And this is the third paragraph.</p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id4">[*]</a></dt>
-<dd id="id13">
-<p class="first last">Footnotes may also use symbols, specified with a "*" label.
+<dt class="label" id="id13"><a class="fn-backref" href="#id4">[*]</a></dt>
+<dd><p>Footnotes may also use symbols, specified with a "*" label.
Here's a reference to the next footnote: <a class="footnote-reference" href="#id15" id="id14">[†]</a>.</p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id14">[†]</a></dt>
-<dd id="id15">
-<p class="first last">This footnote shows the next symbol in the sequence.</p>
+<dt class="label" id="id15"><a class="fn-backref" href="#id14">[†]</a></dt>
+<dd><p>This footnote shows the next symbol in the sequence.</p>
</dd>
-<dt class="label">[4]</dt>
-<dd id="id16">
-<p class="first last">Here's an unreferenced footnote, with a reference to a
+<dt class="label" id="id16">[4]</dt>
+<dd><p>Here's an unreferenced footnote, with a reference to a
nonexistent footnote: <a href="#id97"><span class="problematic" id="id98"><span id="id17"></span>[5]_</span></a>.</p>
</dd>
</dl>
</div>
<div class="section" id="citations">
<h2><a class="toc-backref" href="#id55"><span class="sectnum">2.12</span> Citations</a></h2>
-<dl class="citation"><dt class="label">[CIT2002]</dt>
-<dd id="cit2002">
-<em>(<a class="fn-backref" href="#id5">1</a>, <a class="fn-backref" href="#id18">2</a>)</em> <p class="last">Citations are text-labeled footnotes. They may be
+<dl class="citation">
+<dt class="label" id="cit2002">[CIT2002]<span class="fn-backref">(<a href="#id5">1</a>,<a href="#id18">2</a>)</span></dt>
+<dd><p>Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.</p>
</dd>
</dl>
@@ -732,25 +727,21 @@
</div>
<div class="section" id="target-footnotes">
<h3><a class="toc-backref" href="#id92"><span class="sectnum">2.14.5</span> Target Footnotes</a></h3>
-<dl class="footnote"><dt class="label">[5]</dt>
-<dd id="id25">
-<em>(<a class="fn-backref" href="#id26">1</a>, <a class="fn-backref" href="#id27">2</a>, <a class="fn-backref" href="#id28">3</a>, <a class="fn-backref" href="#id35">4</a>)</em> <p class="last"><a class="reference external" href="http://www.python.org/">http://www.python.org/</a></p>
+<dl class="footnote">
+<dt class="label" id="id25">[5]<span class="fn-backref">(<a href="#id26">1</a>,<a href="#id27">2</a>,<a href="#id28">3</a>,<a href="#id35">4</a>)</span></dt>
+<dd><p><a class="reference external" href="http://www.python.org/">http://www.python.org/</a></p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id30">[6]</a></dt>
-<dd id="id29">
-<p class="first last"><a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p>
+<dt class="label" id="id29"><a class="fn-backref" href="#id30">[6]</a></dt>
+<dd><p><a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id32">[7]</a></dt>
-<dd id="id31">
-<p class="first last"><a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style</a></p>
+<dt class="label" id="id31"><a class="fn-backref" href="#id32">[7]</a></dt>
+<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">http://docutils.sourceforge.net/docs/user/config.html#table-style</a></p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id34">[8]</a></dt>
-<dd id="id33">
-<p class="first last"><a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf</a></p>
+<dt class="label" id="id33"><a class="fn-backref" href="#id34">[8]</a></dt>
+<dd><p><a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf</a></p>
</dd>
-<dt class="label"><a class="fn-backref" href="#id37">[9]</a></dt>
-<dd id="id36">
-<p class="first last"><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></p>
+<dt class="label" id="id36"><a class="fn-backref" href="#id37">[9]</a></dt>
+<dd><p><a class="reference external" href="http://docutils.sourceforge.net/">http://docutils.sourceforge.net/</a></p>
</dd>
</dl>
</div>
@@ -1077,34 +1068,49 @@
</div>
<div class="section" id="svg-images">
<h2><a class="toc-backref" href="#id78"><span class="sectnum">2.24</span> SVG Images</a></h2>
-<img alt="../../../docs/user/rst/images/biohazard.svg" src="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" />
+<object class="align-left" data="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" type="image/svg+xml">
+../../../docs/user/rst/images/biohazard.svg</object>
<p>Scalable vector graphics (SVG) images are not supported by all backends.
Rendering depends partially on the backend, especially if the size is
not explicitely given.</p>
-<img alt="../../../docs/user/rst/images/title-scaling.svg" class="align-left" src="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%;" />
-<p>A scaling image occupying 50% of the line width (scales with the
-browser window).</p>
+<object class="align-left" data="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%;" type="image/svg+xml">
+../../../docs/user/rst/images/title-scaling.svg</object>
+<p>A scaling image occupying 50% of the line width (scales with the browser
+window).</p>
<p>Whether an SVG image is scaled or clipped/padded cannot be set in the
-containing HTML. It depends on the viewport declaration inside its
-root <svg> element.</p>
-<p>An inline SVG image <img alt="inline-svg" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 0.8em;" /> scaled to a height of 0.8 em.</p>
-<img alt="../../../docs/user/rst/images/title-scaling.svg" class="align-right" src="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%; height: 1.2em;" />
+containing HTML. If the image is wrapped in <tt class="literal"><object></tt> tags, it
+depends on the viewport declaration inside its root <svg> element, if it is
+wrapped in <tt class="literal"><img></tt> it depends on the browser.</p>
+<object class="align-left" data="../../../docs/user/rst/images/title.svg" style="width: 50%; height: 15px;" type="image/svg+xml">
+../../../docs/user/rst/images/title.svg</object>
+<p>A fixed-size image in a box with 50% of the line width, 15 pixles high.</p>
+<object class="align-right" data="../../../docs/user/rst/images/title-scaling.svg" style="width: 50%; height: 1.2em;" type="image/svg+xml">
+../../../docs/user/rst/images/title-scaling.svg</object>
<p>A scaling image occupying 50% of the line width and 1.2 em high,
right aligned (this SVG image keeps the aspect ratio):</p>
-<img alt="../../../docs/user/rst/images/biohazard-scaling.svg" class="align-left" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 1em;" />
+<ul class="simple">
+<li><p>An inline SVG image <object data="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 0.8em;" type="image/svg+xml">inline-svg</object> scaled to a height of 0.8 em.</p></li>
+</ul>
+<object class="align-left" data="../../../docs/user/rst/images/biohazard-scaling.svg" style="height: 1em;" type="image/svg+xml">
+../../../docs/user/rst/images/biohazard-scaling.svg</object>
<p>A scaling image 1 em high, left aligned.</p>
<p>A scaling image 5 mm x 5 mm, centered, with hyperlink reference:</p>
-<a class="reference internal image-reference" href="#directives"><img alt="../../../docs/user/rst/images/biohazard-scaling.svg" class="align-center" src="../../../docs/user/rst/images/biohazard-scaling.svg" style="width: 5mm; height: 5mm;" /></a>
-<img alt="../../../docs/user/rst/images/biohazard.svg" class="align-left" src="../../../docs/user/rst/images/biohazard.svg" style="width: 4cm; height: 2em;" />
+<a class="reference internal image-reference" href="#directives"><object class="align-center" data="../../../docs/user/rst/images/biohazard-scaling.svg" style="width: 5mm; height: 5mm;" type="image/svg+xml">../../../docs/user/rst/images/biohazard-scaling.svg</object></a>
+<object class="align-left" data="../../../docs/user/rst/images/biohazard.svg" style="width: 4cm; height: 2em;" type="image/svg+xml">
+../../../docs/user/rst/images/biohazard.svg</object>
<p>A fixed-size image in a 4 cm x 2 em box.</p>
-<img alt="../../../docs/user/rst/images/title.svg" class="align-left" src="../../../docs/user/rst/images/title.svg" style="width: 50%; height: 15px;" />
-<p>A fixed-size image in a box 50% the line width and 15 pixle high.</p>
<div class="figure">
-<img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 290px; height: 28px;" />
+<object data="../../../docs/user/rst/images/title.svg" style="width: 290px; height: 28px;" type="image/svg+xml">
+reStructuredText, the markup syntax</object>
<p class="caption">SVG image in a figure.</p>
</div>
-<img alt="../../../docs/user/rst/images/biohazard-bitmap.svg" class="align-right" src="../../../docs/user/rst/images/biohazard-bitmap.svg" style="width: 3em;" />
-<p>An SVG image with embedded bitmap. Should be 3 em wide, right aligned.</p>
+<object class="align-right" data="../../../docs/user/rst/images/biohazard-bitmap.svg" style="width: 3em;" type="image/svg+xml">
+../../../docs/user/rst/images/biohazard-bitmap.svg</object>
+<p>An SVG image with embedded bitmap, 3 em wide, right aligned.
+Older versions of <cite>webkit</cite> based browsers (chromium, safari, midori,
+konqueror) cannot display the contained bitmap image if the SVG is wrapped
+in <tt class="literal"><img></tt> tags. The image does not scale properly if wrapped in
+<tt class="literal"><object></tt> tags.</p>
</div>
<div class="section" id="swf-images">
<h2><a class="toc-backref" href="#id79"><span class="sectnum">2.25</span> SWF Images</a></h2>
@@ -1139,7 +1145,7 @@
<ul class="simple">
<li><p>Unordered list nested in enumeration.</p></li>
</ul>
-<dl class="docutils">
+<dl class="simple">
<dt>Definition list</dt>
<dd><p>nested in top-level enumeration</p>
</dd>
@@ -1150,17 +1156,18 @@
</div>
<div class="section" id="description-list">
<h2><a class="toc-backref" href="#id82"><span class="sectnum">3.2</span> Description list</a></h2>
-<p>Definition lists are styled like in most dictionaries, encyclopedias
-etc. (as well as the LaTeX <cite>description</cite> environment) if given the
-<tt class="literal">description</tt> class argument:</p>
-<dl class="description docutils">
-<dt>The label</dt>
-<dd><p>is bold.</p>
+<p>Definition lists with the <tt class="literal">description</tt> class argument:</p>
+<dl class="description simple">
+<dt>description lists</dt>
+<dd><p>Lists that are styled like in most dictionaries, encyclopedias
+etc. (as well as the LaTeX <cite>description</cite> environment).</p>
</dd>
-<dt>The description</dt>
-<dd><p>starts on the same line. If it is longer, you will see that it has a
-hanging indent.</p>
+<dt>label</dt>
+<dd><p>The term to be described. Put in boldface.</p>
</dd>
+<dt>content</dt>
+<dd><p>starts on the same line and has a hanging indent.</p>
+</dd>
</dl>
</div>
<div class="section" id="field-list-handling">
@@ -1186,7 +1193,7 @@
previous one but regarded "short" by html4css1.</p>
</dd>
</dl>
-<p>With <cite>html4css2</cite>, the field list is typeset as CSS-styled <cite>definition
+<p>With <cite>html4css2</cite>, a <cite>field list</cite> is typeset as CSS-styled <cite>definition
list</cite>. The default layout is similar to the look with <cite>html4css1</cite>:</p>
<dl class="open field-list">
<dt>A long field name</dt>
@@ -1205,9 +1212,9 @@
</dl>
<div class="section" id="styling-with-class-arguments">
<h3><a class="toc-backref" href="#id84"><span class="sectnum">3.3.1</span> Styling with class arguments</a></h3>
-<p>The default style sheet <tt class="literal">html4css2.css</tt> supports the following class
-arguments for alternative styles:</p>
-<dl class="docutils">
+<p>The <tt class="literal">xhtml11.css</tt> style sheet supports the following class arguments
+for alternative styles:</p>
+<dl>
<dt><em>compact</em></dt>
<dd><dl class="compact ...
[truncated message content] |