|
From: <mi...@us...> - 2021-05-20 10:07:56
|
Revision: 8734
http://sourceforge.net/p/docutils/code/8734
Author: milde
Date: 2021-05-20 10:07:55 +0000 (Thu, 20 May 2021)
Log Message:
-----------
Write footnote brackets and field term colons to HTML.
Makes them available also without CSS and when copying text.
Hide brackets with CSS for "footnote-references=superscript".
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html5_polyglot/minimal.css
trunk/docutils/docutils/writers/html5_polyglot/responsive.css
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/HISTORY.txt 2021-05-20 10:07:55 UTC (rev 8734)
@@ -1,5 +1,3 @@
-.. -*- coding: utf-8 -*-
-
==================
Docutils History
==================
@@ -31,13 +29,19 @@
- Removed ``unique_combinations`` (obsoleted by ``itertools.combinations``).
+* docutils/writers/_html_base.py
+
+ - Write footnote brackets and field term colons to HTML, so that
+ they are present also without CSS and when copying text.
+ Adapt ``minimal.css``.
+
* docutils/writers/latex2e/__init__.py
- - The setting `legacy_class_functions`_ now defaults to "False".
+ - The setting `legacy_class_functions`_ now defaults to "False".
Adapt stylesheets modifying ``\DUadmonition`` and/or ``\DUtitle``.
* docutils/writers/latex2e/docutils.sty
-
+
- Fix excessive padding above sidebar titles.
* docutils/writers/pseudoxml.py:
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/RELEASE-NOTES.txt 2021-05-20 10:07:55 UTC (rev 8734)
@@ -29,12 +29,12 @@
- Use <summary> and <details> tags for term and definition of a
definition list with class value "details".
- - Write footnote brackets and field term colons to HTML, so that
- they are present also without CSS and when copying text.
- Hide with CSS if required.
+ - Move attribution behind the blockquote to comply with the
+ __`"living standard"`?
+ HTML5__ allows <cite> elements inside a blockquote (cf. Example 16).
- - Move attribution behind the blockquote to comply with
- https://html.spec.whatwg.org/#the-blockquote-element.
+ __ https://html.spec.whatwg.org/#the-blockquote-element
+ __ https://www.w3.org/TR/html52/grouping-content.html#the-blockquote-element
* `htm4css1` writer: Support the embed_images_ option.
@@ -91,16 +91,22 @@
Release 0.18.dev
================
-* Config setting `legacy_class_functions`_: default changed to "False".
-
* Removed files:
- ``iepngfix.htc`` and ``blank.gif`` (IE 6 workaround for `s5_html`).
+* Removed function: ``utils.unique_combinations``
+ (obsoleted by ``itertools.combinations``).
+
+* HTML5 writer: changes to HTML output
+
+ - Write footnote brackets and field term colons to HTML, so that
+ they are present also without CSS and when copying text.
+
+* LaTeX writer: `legacy_class_functions`_ setting default changed to "False".
+
* ``nodes.Node.traverse()`` returns an iterator instead of a list.
-* Removed ``utils.unique_combinations``
- (obsoleted by ``itertools.combinations``).
Release 0.17.1 (2021-04-16)
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/docutils/writers/_html_base.py 2021-05-20 10:07:55 UTC (rev 8734)
@@ -432,9 +432,7 @@
atts['class'] = ' '.join(classes)
assert 'id' not in atts
ids.extend(node.get('ids', []))
- if 'ids' in atts:
- ids.extend(atts['ids'])
- del atts['ids']
+ ids.extend(atts.pop('ids', []))
if ids:
atts['id'] = ids[0]
for id in ids[1:]:
@@ -788,8 +786,9 @@
meta_tag = '<meta name="%s" content="%s" />\n' \
% (name, self.attval(node.astext()))
self.add_meta(meta_tag)
- self.body.append('<dt class="%s">%s</dt>\n'
- % (name, self.language.labels[name]))
+ self.body.append(
+ '<dt class="%s">%s<span class="colon">:</span></dt>\n'
+ % (name, self.language.labels[name]))
self.body.append(self.starttag(node, 'dd', '', CLASS=name))
def depart_docinfo_item(self):
@@ -903,7 +902,7 @@
CLASS=''.join(node.parent['classes'])))
def depart_field_name(self, node):
- self.body.append('</dt>\n')
+ self.body.append('<span class="colon">:</span></dt>\n')
def visit_field_body(self, node):
self.body.append(self.starttag(node, 'dd', '',
@@ -940,9 +939,6 @@
self.body_suffix[:0] = footer
del self.body[start:]
- # TODO: use the new HTML5 element <aside> for footnote text
- # (allows better styling with CSS, the current <dl> list styling
- # with "float" interferes with sidebars).
def visit_footnote(self, node):
if not self.in_footnote_list:
listnode = node.copy()
@@ -962,10 +958,12 @@
def visit_footnote_reference(self, node):
href = '#' + node['refid']
classes = 'footnote-reference ' + self.settings.footnote_references
- self.body.append(self.starttag(node, 'a', '', #suffix,
+ self.body.append(self.starttag(node, 'a', suffix='',
CLASS=classes, href=href))
+ self.body.append('<span class="fn-bracket">[</span>')
def depart_footnote_reference(self, node):
+ self.body.append('<span class="fn-bracket">]</span>')
self.body.append('</a>')
# Docutils-generated text: put section numbers in a span for CSS styling:
@@ -1090,31 +1088,31 @@
# footnote and citation labels:
def visit_label(self, node):
- if (isinstance(node.parent, nodes.footnote)):
- classes = self.settings.footnote_references
- else:
- classes = 'brackets'
# pass parent node to get id into starttag:
self.body.append(self.starttag(node.parent, 'dt', '', CLASS='label'))
- self.body.append(self.starttag(node, 'span', '', CLASS=classes))
- # footnote/citation backrefs:
+ # backlinks to the footnote/citation reference(s):
if self.settings.footnote_backlinks:
backrefs = node.parent['backrefs']
if len(backrefs) == 1:
self.body.append('<a class="fn-backref" href="#%s">'
% backrefs[0])
+ # bracket (hidden by CSS for superscript footnotes)
+ self.body.append('<span class="fn-bracket">[</span>')
def depart_label(self, node):
+ self.body.append('<span class="fn-bracket">]</span>')
+ # backlinks to the footnote/citation reference(s):
if self.settings.footnote_backlinks:
backrefs = node.parent['backrefs']
- if len(backrefs) == 1:
- self.body.append('</a>')
- self.body.append('</span>')
- if self.settings.footnote_backlinks and len(backrefs) > 1:
+ else:
+ backrefs = []
+ if len(backrefs) == 1:
+ self.body.append('</a>')
+ if len(backrefs) > 1:
backlinks = ['<a href="#%s">%s</a>' % (ref, i)
- for (i, ref) in enumerate(backrefs, 1)]
+ for (i, ref) in enumerate(backrefs, 1)]
self.body.append('<span class="fn-backref">(%s)</span>'
- % ','.join(backlinks))
+ % ','.join(backlinks))
self.body.append('</dt>\n<dd>')
def visit_legend(self, node):
@@ -1599,10 +1597,8 @@
self.body.append(self.starttag(node, 'dt', ''))
def depart_term(self, node):
- """
- Leave the end tag to `self.visit_definition()`, in case there's a
- classifier.
- """
+ # Leave the end tag to `self.visit_definition()`,
+ # in case there's a classifier.
pass
def visit_tgroup(self, node):
Modified: trunk/docutils/docutils/writers/html5_polyglot/minimal.css
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/minimal.css 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/docutils/writers/html5_polyglot/minimal.css 2021-05-20 10:07:55 UTC (rev 8734)
@@ -140,11 +140,6 @@
width: 100%;
margin: 0;
}
-/* field names followed by a colon */
-dl.field-list > dt:after,
-dl.docinfo > dt:after {
- content: ":";
-}
/* Bibliographic Fields (docinfo) */
dl.docinfo pre.address {
@@ -161,15 +156,15 @@
dl.footnote.superscript > dd { margin-left: 0.7em; }
dl.footnote.brackets > dd { margin-left: 1.6em; }
dl.footnote > dt { font-weight: normal; }
-a.footnote-reference.brackets:before,
-dt.label > span.brackets:before { content: "["; }
-a.footnote-reference.brackets:after,
-dt.label > span.brackets:after { content: "]"; }
a.footnote-reference.superscript,
dl.footnote.superscript > dt.label {
vertical-align: super;
font-size: small;
}
+a.footnote-reference.superscript > span.fn-bracket,
+dl.footnote.superscript > dt.label span.fn-bracket {
+ display: none;
+}
dt.label > span.fn-backref {
margin-left: 0.2em;
font-weight: normal;
Modified: trunk/docutils/docutils/writers/html5_polyglot/responsive.css
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/responsive.css 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/docutils/writers/html5_polyglot/responsive.css 2021-05-20 10:07:55 UTC (rev 8734)
@@ -172,7 +172,6 @@
}
/* Footnotes and Citations */
-/* TODO: use <aside> */
dl.footnote {
font-size: small;
padding-left: 0.5em;
@@ -179,9 +178,11 @@
border-left: solid;
border-left-width: thin;
}
-dt.label > span.fn-backref {
+dl.citation > dt.label span.fn-bracket {
+ display: none;
}
+
/* Images, Figures, and Tables */
img {
display: block;
@@ -296,7 +297,6 @@
/* Let content flow to the side of aligned images and figures */
/* no floats around this elements */
-dl.footnote, dl.citation, /* errors with internal floats */
footer, header, hr,
h1, h2, h3 {
clear: both;
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2021-05-20 10:07:55 UTC (rev 8734)
@@ -12,52 +12,52 @@
<main id="test-footnote-and-citation-rendering">
<h1 class="title">Test footnote and citation rendering</h1>
-<p>Paragraphs may contain footnote references (manually numbered<a class="footnote-reference superscript" href="#footnote-1" id="footnote-reference-1">1</a>, anonymous auto-numbered<a class="footnote-reference superscript" href="#footnote-2" id="footnote-reference-2">3</a>, labeled auto-numbered<a class="footnote-reference superscript" href="#label" id="footnote-reference-3">2</a>, or
-symbolic<a class="footnote-reference superscript" href="#footnote-3" id="footnote-reference-4">*</a>) or citation references (<a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>, <a class="citation-reference" href="#du2015" id="citation-reference-2">[DU2015]</a>).</p>
+<p>Paragraphs may contain footnote references (manually numbered<a class="footnote-reference superscript" href="#footnote-1" id="footnote-reference-1"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>, anonymous auto-numbered<a class="footnote-reference superscript" href="#footnote-2" id="footnote-reference-2"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>, labeled auto-numbered<a class="footnote-reference superscript" href="#label" id="footnote-reference-3"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>, or
+symbolic<a class="footnote-reference superscript" href="#footnote-3" id="footnote-reference-4"><span class="fn-bracket">[</span>*<span class="fn-bracket">]</span></a>) or citation references (<a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>, <a class="citation-reference" href="#du2015" id="citation-reference-2">[DU2015]</a>).</p>
<dl class="footnote superscript">
-<dt class="label" id="footnote-1"><span class="superscript">1</span><span class="fn-backref">(<a href="#footnote-reference-1">1</a>,<a href="#footnote-reference-5">2</a>)</span></dt>
+<dt class="label" id="footnote-1"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-1">1</a>,<a href="#footnote-reference-5">2</a>)</span></dt>
<dd><p>A footnote contains body elements, consistently indented by at
least 3 spaces.</p>
<p>This is the footnote's second paragraph.</p>
</dd>
-<dt class="label" id="label"><span class="superscript">2</span><span class="fn-backref">(<a href="#footnote-reference-3">1</a>,<a href="#footnote-reference-6">2</a>)</span></dt>
-<dd><p>Footnotes may be numbered, either manually (as in<a class="footnote-reference superscript" href="#footnote-1" id="footnote-reference-5">1</a>) or
+<dt class="label" id="label"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-3">1</a>,<a href="#footnote-reference-6">2</a>)</span></dt>
+<dd><p>Footnotes may be numbered, either manually (as in<a class="footnote-reference superscript" href="#footnote-1" id="footnote-reference-5"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></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 superscript" href="#label" id="footnote-reference-6">2</a>) and as a <a class="reference internal" href="#label">hyperlink reference</a>.</p>
+footnote reference (<a class="footnote-reference superscript" href="#label" id="footnote-reference-6"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>) and as a <a class="reference internal" href="#label">hyperlink reference</a>.</p>
</dd>
-<dt class="label" id="footnote-2"><span class="superscript"><a class="fn-backref" href="#footnote-reference-2">3</a></span></dt>
+<dt class="label" id="footnote-2"><a class="fn-backref" href="#footnote-reference-2"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></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>And this is the third paragraph.</p>
</dd>
-<dt class="label" id="footnote-3"><span class="superscript"><a class="fn-backref" href="#footnote-reference-4">*</a></span></dt>
+<dt class="label" id="footnote-3"><a class="fn-backref" href="#footnote-reference-4"><span class="fn-bracket">[</span>*<span class="fn-bracket">]</span></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 superscript" href="#footnote-4" id="footnote-reference-7">†</a>.</p>
+Here's a reference to the next footnote:<a class="footnote-reference superscript" href="#footnote-4" id="footnote-reference-7"><span class="fn-bracket">[</span>†<span class="fn-bracket">]</span></a>.</p>
</dd>
-<dt class="label" id="footnote-4"><span class="superscript"><a class="fn-backref" href="#footnote-reference-7">†</a></span></dt>
+<dt class="label" id="footnote-4"><a class="fn-backref" href="#footnote-reference-7"><span class="fn-bracket">[</span>†<span class="fn-bracket">]</span></a></dt>
<dd><p>This footnote shows the next symbol in the sequence.</p>
</dd>
-<dt class="label" id="footnote-5"><span class="superscript">4</span></dt>
+<dt class="label" id="footnote-5"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></dt>
<dd><p>Here's an unreferenced footnote, with a reference to a
-nonexistent footnote:<a class="footnote-reference superscript" href="#footnote-6" id="footnote-reference-8">5</a>.</p>
+nonexistent footnote:<a class="footnote-reference superscript" href="#footnote-6" id="footnote-reference-8"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a>.</p>
</dd>
</dl>
<section id="citations">
<h2>Citations</h2>
<dl class="citation">
-<dt class="label" id="cit2002"><span class="brackets">CIT2002</span><span class="fn-backref">(<a href="#citation-reference-1">1</a>,<a href="#citation-reference-3">2</a>)</span></dt>
+<dt class="label" id="cit2002"><span class="fn-bracket">[</span>CIT2002<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#citation-reference-1">1</a>,<a href="#citation-reference-3">2</a>)</span></dt>
<dd><p>Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.</p>
</dd>
-<dt class="label" id="du2015"><span class="brackets"><a class="fn-backref" href="#citation-reference-2">DU2015</a></span></dt>
+<dt class="label" id="du2015"><a class="fn-backref" href="#citation-reference-2"><span class="fn-bracket">[</span>DU2015<span class="fn-bracket">]</span></a></dt>
<dd><p><cite>Example document</cite>, Hometown: 2015.</p>
</dd>
</dl>
<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="citation-reference-3">[CIT2002]</a>.</p>
<dl class="footnote superscript">
-<dt class="label" id="footnote-6"><span class="superscript"><a class="fn-backref" href="#footnote-reference-8">5</a></span></dt>
+<dt class="label" id="footnote-6"><a class="fn-backref" href="#footnote-reference-8"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></dt>
<dd><p>this footnote is missing in the standard example document.</p>
</dd>
</dl>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-05-20 10:07:55 UTC (rev 8734)
@@ -27,32 +27,32 @@
<h1 class="title">reStructuredText Test Document</h1>
<p class="subtitle" id="examples-of-syntax-constructs"><span id="subtitle"></span>Examples of Syntax Constructs</p>
<dl class="docinfo">
-<dt class="author">Author</dt>
+<dt class="author">Author<span class="colon">:</span></dt>
<dd class="author"><p>David Goodger</p></dd>
-<dt class="address">Address</dt>
+<dt class="address">Address<span class="colon">:</span></dt>
<dd class="address"><pre class="address">123 Example Street
Example, EX Canada
A1B 2C3
</pre>
</dd>
-<dt class="contact">Contact</dt>
+<dt class="contact">Contact<span class="colon">:</span></dt>
<dd class="contact"><a class="reference external" href="mailto:goodger@python.org">goodger@python.org</a></dd>
-<dt class="authors">Authors</dt>
+<dt class="authors">Authors<span class="colon">:</span></dt>
<dd class="authors"><p>Me</p>
<p>Myself</p>
<p>I</p>
</dd>
-<dt class="organization">Organization</dt>
+<dt class="organization">Organization<span class="colon">:</span></dt>
<dd class="organization">humankind</dd>
-<dt class="date">Date</dt>
+<dt class="date">Date<span class="colon">:</span></dt>
<dd class="date">Now, or yesterday. Or maybe even <em>before</em> yesterday.</dd>
-<dt class="status">Status</dt>
+<dt class="status">Status<span class="colon">:</span></dt>
<dd class="status">This is a "work in progress"</dd>
-<dt class="revision">Revision</dt>
+<dt class="revision">Revision<span class="colon">:</span></dt>
<dd class="revision">is managed by a version control system.</dd>
-<dt class="version">Version</dt>
+<dt class="version">Version<span class="colon">:</span></dt>
<dd class="version">1</dd>
-<dt class="copyright">Copyright</dt>
+<dt class="copyright">Copyright<span class="colon">:</span></dt>
<dd class="copyright">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,
@@ -60,10 +60,10 @@
incorporate, collate, fold, staple, or mutilate it, or do
anything else to it that your or anyone else's heart
desires.</dd>
-<dt class="field-name">field name</dt>
+<dt class="field-name">field name<span class="colon">:</span></dt>
<dd class="field-name"><p>This is a "generic bibliographic field".</p>
</dd>
-<dt class="field-name-2">field name "2"</dt>
+<dt class="field-name-2">field name "2"<span class="colon">:</span></dt>
<dd class="field-name-2"><p>Generic bibliographic fields may contain multiple body elements.</p>
<p>Like this.</p>
</dd>
@@ -189,12 +189,12 @@
<h4><a class="toc-backref" href="#toc-entry-7"><span class="sectnum">2.1.1</span> Inline Markup</a></h4>
<p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
<strong>strong emphasis</strong>, <span class="docutils literal">inline literals</span>, standalone hyperlinks
-(<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-18">7</a>), internal
+(<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-18"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a>), internal
cross-references (<a class="reference internal" href="#example">example</a>), external hyperlinks with embedded URIs
(<a class="reference external" href="http://www.python.org">Python web site</a>), <a class="reference external" href="http://www.python.org/">anonymous hyperlink
-references</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-25">7</a> (<a class="reference external" href="https://docutils.sourceforge.io/">a second reference</a> <a class="footnote-reference brackets" href="#footnote-12" id="footnote-reference-26">12</a>), footnote references (manually
-numbered <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-1">1</a>, anonymous auto-numbered <a class="footnote-reference brackets" href="#footnote-2" id="footnote-reference-2">3</a>, labeled auto-numbered
-<a class="footnote-reference brackets" href="#label" id="footnote-reference-3">2</a>, or symbolic <a class="footnote-reference brackets" href="#footnote-3" id="footnote-reference-4">*</a>), citation references (see <a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>),
+references</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-25"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a> (<a class="reference external" href="https://docutils.sourceforge.io/">a second reference</a> <a class="footnote-reference brackets" href="#footnote-12" id="footnote-reference-26"><span class="fn-bracket">[</span>12<span class="fn-bracket">]</span></a>), footnote references (manually
+numbered <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-1"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>, anonymous auto-numbered <a class="footnote-reference brackets" href="#footnote-2" id="footnote-reference-2"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>, labeled auto-numbered
+<a class="footnote-reference brackets" href="#label" id="footnote-reference-3"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>, or symbolic <a class="footnote-reference brackets" href="#footnote-3" id="footnote-reference-4"><span class="fn-bracket">[</span>*<span class="fn-bracket">]</span></a>), citation references (see <a class="citation-reference" href="#cit2002" id="citation-reference-1">[CIT2002]</a>),
substitution references (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" /> &
a <em>trimmed heart</em> <span class="docutils literal">(U+2665):</span>♥), and <span class="target" id="inline-hyperlink-targets">inline hyperlink targets</span>
(see <a class="reference internal" href="#targets">Targets</a> below for a reference back to here). Character-level
@@ -298,17 +298,17 @@
<section id="field-lists">
<h3><a class="toc-backref" href="#toc-entry-11"><span class="sectnum">2.5</span> Field Lists</a></h3>
<dl class="field-list">
-<dt>what</dt>
+<dt>what<span class="colon">:</span></dt>
<dd><p>Field lists map field names to field bodies, like database
records. They are often part of an extension syntax. They are
an unambiguous variant of RFC 2822 fields.</p>
</dd>
-<dt>how arg1 arg2</dt>
+<dt>how arg1 arg2<span class="colon">:</span></dt>
<dd><p>The field marker is a colon, the field name, and a colon.</p>
<p>The field body may contain one or more body elements, indented
relative to the field marker.</p>
</dd>
-<dt>credits</dt>
+<dt>credits<span class="colon">:</span></dt>
<dd><p class="credits">This paragraph has the <cite>credits</cite> class set. (This is actually not
about credits but just for ensuring that the class attribute
doesn't get stripped away.)</p>
@@ -471,31 +471,31 @@
<section id="footnotes">
<h3><a class="toc-backref" href="#toc-entry-17"><span class="sectnum">2.11</span> Footnotes</a></h3>
<dl class="footnote brackets">
-<dt class="label" id="footnote-1"><span class="brackets">1</span><span class="fn-backref">(<a href="#footnote-reference-1">1</a>,<a href="#footnote-reference-5">2</a>,<a href="#footnote-reference-9">3</a>)</span></dt>
+<dt class="label" id="footnote-1"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-1">1</a>,<a href="#footnote-reference-5">2</a>,<a href="#footnote-reference-9">3</a>)</span></dt>
<dd><p>A footnote contains body elements, consistently indented by at
least 3 spaces.</p>
<p>This is the footnote's second paragraph.</p>
</dd>
-<dt class="label" id="label"><span class="brackets">2</span><span class="fn-backref">(<a href="#footnote-reference-3">1</a>,<a href="#footnote-reference-6">2</a>)</span></dt>
-<dd><p>Footnotes may be numbered, either manually (as in <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-5">1</a>) or
+<dt class="label" id="label"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-3">1</a>,<a href="#footnote-reference-6">2</a>)</span></dt>
+<dd><p>Footnotes may be numbered, either manually (as in <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-5"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></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 brackets" href="#label" id="footnote-reference-6">2</a>) and as a <a class="reference internal" href="#label">hyperlink reference</a>.</p>
+footnote reference (<a class="footnote-reference brackets" href="#label" id="footnote-reference-6"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>) and as a <a class="reference internal" href="#label">hyperlink reference</a>.</p>
</dd>
-<dt class="label" id="footnote-2"><span class="brackets"><a class="fn-backref" href="#footnote-reference-2">3</a></span></dt>
+<dt class="label" id="footnote-2"><a class="fn-backref" href="#footnote-reference-2"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></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>And this is the third paragraph.</p>
</dd>
-<dt class="label" id="footnote-3"><span class="brackets"><a class="fn-backref" href="#footnote-reference-4">*</a></span></dt>
+<dt class="label" id="footnote-3"><a class="fn-backref" href="#footnote-reference-4"><span class="fn-bracket">[</span>*<span class="fn-bracket">]</span></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 brackets" href="#footnote-4" id="footnote-reference-7">†</a>.</p>
+Here's a reference to the next footnote: <a class="footnote-reference brackets" href="#footnote-4" id="footnote-reference-7"><span class="fn-bracket">[</span>†<span class="fn-bracket">]</span></a>.</p>
</dd>
-<dt class="label" id="footnote-4"><span class="brackets"><a class="fn-backref" href="#footnote-reference-7">†</a></span></dt>
+<dt class="label" id="footnote-4"><a class="fn-backref" href="#footnote-reference-7"><span class="fn-bracket">[</span>†<span class="fn-bracket">]</span></a></dt>
<dd><p>This footnote shows the next symbol in the sequence.</p>
</dd>
-<dt class="label" id="footnote-5"><span class="brackets">4</span></dt>
+<dt class="label" id="footnote-5"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></dt>
<dd><p>Here's an unreferenced footnote, with a reference to a
nonexistent footnote: <a href="#system-message-2"><span class="problematic" id="footnote-reference-8">[5]_</span></a>.</p>
</dd>
@@ -504,7 +504,7 @@
<section id="citations">
<h3><a class="toc-backref" href="#toc-entry-18"><span class="sectnum">2.12</span> Citations</a></h3>
<dl class="citation">
-<dt class="label" id="cit2002"><span class="brackets">CIT2002</span><span class="fn-backref">(<a href="#citation-reference-1">1</a>,<a href="#citation-reference-2">2</a>)</span></dt>
+<dt class="label" id="cit2002"><span class="fn-bracket">[</span>CIT2002<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#citation-reference-1">1</a>,<a href="#citation-reference-2">2</a>)</span></dt>
<dd><p>Citations are text-labeled footnotes. They may be
rendered separately and differently from footnotes.</p>
</dd>
@@ -520,7 +520,7 @@
<p>Section headers are implicit targets, referred to by name. See
<a class="reference internal" href="#targets">Targets</a>, which is a subsection of <a class="reference internal" href="#body-elements">Body Elements</a>.</p>
<p>Explicit external targets are interpolated into references such as
-"<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-19">7</a>".</p>
+"<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-19"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a>".</p>
<p>Targets may be indirect and anonymous. Thus <a class="reference internal" href="#targets">this phrase</a> may also
refer to the <a class="reference internal" href="#targets">Targets</a> section.</p>
<p>Here's a <a href="#system-message-4"><span class="problematic" id="problematic-2">`hyperlink reference without a target`_</span></a>, which generates an
@@ -556,7 +556,7 @@
</ul>
</div>
<p>These are just a sample of the many reStructuredText Directives. For
-others, please see <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">reStructuredText Directives</a> <a class="footnote-reference brackets" href="#footnote-13" id="footnote-reference-27">13</a>.</p>
+others, please see <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">reStructuredText Directives</a> <a class="footnote-reference brackets" href="#footnote-13" id="footnote-reference-27"><span class="fn-bracket">[</span>13<span class="fn-bracket">]</span></a>.</p>
<section id="document-parts">
<h4><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">2.14.1</span> Document Parts</a></h4>
<p>An example of the "contents" directive can be seen above this section
@@ -831,40 +831,40 @@
<section id="target-footnotes">
<h4><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.6</span> Target Footnotes</a></h4>
<dl class="footnote brackets">
-<dt class="label" id="footnote-7"><span class="brackets">7</span><span class="fn-backref">(<a href="#footnote-reference-18">1</a>,<a href="#footnote-reference-19">2</a>,<a href="#footnote-reference-20">3</a>,<a href="#footnote-reference-25">4</a>)</span></dt>
+<dt class="label" id="footnote-7"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-18">1</a>,<a href="#footnote-reference-19">2</a>,<a href="#footnote-reference-20">3</a>,<a href="#footnote-reference-25">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" id="footnote-8"><span class="brackets"><a class="fn-backref" href="#footnote-reference-21">8</a></span></dt>
+<dt class="label" id="footnote-8"><a class="fn-backref" href="#footnote-reference-21"><span class="fn-bracket">[</span>8<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="http://pygments.org/">http://pygments.org/</a></p>
</dd>
-<dt class="label" id="footnote-9"><span class="brackets"><a class="fn-backref" href="#footnote-reference-22">9</a></span></dt>
+<dt class="label" id="footnote-9"><a class="fn-backref" href="#footnote-reference-22"><span class="fn-bracket">[</span>9<span class="fn-bracket">]</span></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" id="footnote-10"><span class="brackets"><a class="fn-backref" href="#footnote-reference-23">10</a></span></dt>
+<dt class="label" id="footnote-10"><a class="fn-backref" href="#footnote-reference-23"><span class="fn-bracket">[</span>10<span class="fn-bracket">]</span></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" id="footnote-11"><span class="brackets"><a class="fn-backref" href="#footnote-reference-24">11</a></span></dt>
+<dt class="label" id="footnote-11"><a class="fn-backref" href="#footnote-reference-24"><span class="fn-bracket">[</span>11<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text</a></p>
</dd>
-<dt class="label" id="footnote-12"><span class="brackets"><a class="fn-backref" href="#footnote-reference-26">12</a></span></dt>
+<dt class="label" id="footnote-12"><a class="fn-backref" href="#footnote-reference-26"><span class="fn-bracket">[</span>12<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://docutils.sourceforge.io/">https://docutils.sourceforge.io/</a></p>
</dd>
-<dt class="label" id="footnote-13"><span class="brackets"><a class="fn-backref" href="#footnote-reference-27">13</a></span></dt>
+<dt class="label" id="footnote-13"><a class="fn-backref" href="#footnote-reference-27"><span class="fn-bracket">[</span>13<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">https://docutils.sourceforge.io/docs/ref/rst/directives.html</a></p>
</dd>
-<dt class="label" id="footnote-14"><span class="brackets"><a class="fn-backref" href="#footnote-reference-28">14</a></span></dt>
+<dt class="label" id="footnote-14"><a class="fn-backref" href="#footnote-reference-28"><span class="fn-bracket">[</span>14<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata</a></p>
</dd>
-<dt class="label" id="footnote-15"><span class="brackets"><a class="fn-backref" href="#footnote-reference-29">15</a></span></dt>
+<dt class="label" id="footnote-15"><a class="fn-backref" href="#footnote-reference-29"><span class="fn-bracket">[</span>15<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag">https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag</a></p>
</dd>
-<dt class="label" id="footnote-16"><span class="brackets"><a class="fn-backref" href="#footnote-reference-30">16</a></span></dt>
+<dt class="label" id="footnote-16"><a class="fn-backref" href="#footnote-reference-30"><span class="fn-bracket">[</span>16<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article">https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article</a></p>
</dd>
-<dt class="label" id="footnote-17"><span class="brackets"><a class="fn-backref" href="#footnote-reference-31">17</a></span></dt>
+<dt class="label" id="footnote-17"><a class="fn-backref" href="#footnote-reference-31"><span class="fn-bracket">[</span>17<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">https://html.spec.whatwg.org/#text-level-semantics</a></p>
</dd>
-<dt class="label" id="footnote-18"><span class="brackets"><a class="fn-backref" href="#footnote-reference-32">18</a></span></dt>
+<dt class="label" id="footnote-18"><a class="fn-backref" href="#footnote-reference-32"><span class="fn-bracket">[</span>18<span class="fn-bracket">]</span></a></dt>
<dd><p><a class="reference external" href="https://html.spec.whatwg.org/multipage/edits.html">https://html.spec.whatwg.org/multipage/edits.html</a></p>
</dd>
</dl>
@@ -871,7 +871,7 @@
</section>
<section id="replacement-text">
<h4><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.7</span> Replacement Text</a></h4>
-<p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-20">7</a>.</p>
+<p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-20"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a>.</p>
</section>
<section id="compound-paragraph">
<h4><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.8</span> Compound Paragraph</a></h4>
@@ -957,7 +957,7 @@
</dl>
<p class="compound-middle">a paragraph,</p>
<dl class="compound-middle field-list simple">
-<dt>a field</dt>
+<dt>a field<span class="colon">:</span></dt>
<dd><p>list,</p>
</dd>
</dl>
@@ -992,12 +992,12 @@
Inline markup is supported, e.g. <em>emphasis</em>, <strong>strong</strong>, <span class="docutils literal">literal
text</span>, <sub>sub-</sub> and <sup>super</sup>scripts,
inline formulas: <span class="formula"><i>A</i> = 2<i>π</i><i>r</i><sup>2</sup></span>,
-footnotes <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-9">1</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre>
+footnotes <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-9"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre>
</section>
<section id="code">
<h4><a class="toc-backref" href="#toc-entry-62"><span class="sectnum">2.14.10</span> Code</a></h4>
<p>Blocks of source code can be set with the <cite>code</cite> directive. If the code
-language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#footnote-8" id="footnote-reference-21">8</a>
+language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#footnote-8" id="footnote-reference-21"><span class="fn-bracket">[</span>8<span class="fn-bracket">]</span></a>
syntax highlighter and can be formatted with a style sheet. (Code parsing
is turned off using the <span class="docutils literal"><span class="pre">syntax-highlight</span></span> config setting in the test
conversions in order to get identical results with/without installed
@@ -1021,7 +1021,7 @@
</section>
<section id="meta">
<h4><a class="toc-backref" href="#toc-entry-63"><span class="sectnum">2.14.11</span> Meta</a></h4>
-<p>The <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</a> <a class="footnote-reference brackets" href="#footnote-14" id="footnote-reference-28">14</a> is used to specify metadata to be stored in,
+<p>The <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</a> <a class="footnote-reference brackets" href="#footnote-14" id="footnote-reference-28"><span class="fn-bracket">[</span>14<span class="fn-bracket">]</span></a> is used to specify metadata to be stored in,
e.g., HTML META tags or ODT file properties.</p>
</section>
</section>
@@ -1259,7 +1259,7 @@
<li><p>Use only <a class="reference internal" href="#meta">meta</a> keywords recognized by HTML 5.
Add HTML5-compatible meta tags for docinfo items
"authors", "date", and "copyright".</p>
-<p>Add a <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag">viewport meta tag</a> <a class="footnote-reference brackets" href="#footnote-15" id="footnote-reference-29">15</a> to tell mobile browsers
+<p>Add a <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag">viewport meta tag</a> <a class="footnote-reference brackets" href="#footnote-15" id="footnote-reference-29"><span class="fn-bracket">[</span>15<span class="fn-bracket">]</span></a> to tell mobile browsers
to use the device-width as viewport.</p>
</li>
<li><p>Set table column widths with <style="width: ...">, not "width" argument.</p></li>
@@ -1271,7 +1271,7 @@
<footer>, <aside>, <figure>, and <figcaption>.
See <span class="docutils literal">minimal.css</span> and <span class="docutils literal">responsive.css</span> for styling rule examples.</p>
<p>Change the <cite>initial_header_level</cite> setting default to "2", as browsers
-use the <a class="reference external" href="https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article">same style for <h1> and <h2> when nested in a <section></a> <a class="footnote-reference brackets" href="#footnote-16" id="footnote-reference-30">16</a>.</p>
+use the <a class="reference external" href="https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article">same style for <h1> and <h2> when nested in a <section></a> <a class="footnote-reference brackets" href="#footnote-16" id="footnote-reference-30"><span class="fn-bracket">[</span>16<span class="fn-bracket">]</span></a>.</p>
</li>
<li><p>Use HTML5 tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>,
<i>, <b>, <u>, <mark>, and <bdi> if a matching class value
@@ -1286,20 +1286,20 @@
<span class="docutils literal"><span class="pre">field-list</span></span> class argument value to allow CSS styling.
With <span class="docutils literal">html_plain.css</span>, the layout is similar to <cite>html4css1</cite>:</p>
<dl class="open field-list">
-<dt>A long field name</dt>
+<dt>A long field name<span class="colon">:</span></dt>
<dd><p>sticks into the field body.</p>
<p>The field body is pushed to the next line (you can suppress this
behaviour with the <a class="reference internal" href="#run-in">run-in</a> class argument).</p>
</dd>
-<dt>Customization</dt>
+<dt>Customization<span class="colon">:</span></dt>
<dd><p>of the field name width is possible with CSS instead
of the <cite>field-name-limit</cite> configuration setting, for
example:</p>
<pre class="literal-block">dl.field-list > dd { margin-left: 6em; }</pre>
</dd>
-<dt>Empty</dt>
+<dt>Empty<span class="colon">:</span></dt>
<dd><p></p></dd>
-<dt>fields</dt>
+<dt>fields<span class="colon">:</span></dt>
<dd><p>must not lead to misalignment of the following content.</p>
</dd>
</dl>
@@ -1354,16 +1354,16 @@
<dl class="simple">
<dt><em>compact</em></dt>
<dd><dl class="compact field-list simple">
-<dt>Feature</dt>
+<dt>Feature<span class="colon">:</span></dt>
<dd><p>No additional space between list items.</p>
</dd>
-<dt>Option</dt>
+<dt>Option<span class="colon">:</span></dt>
<dd><p>The <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line option (and the
corresponding configuration setting) set the <cite>compact</cite>
class argument on all "simple" field lists, if not
overridden with <cite>open</cite>.</p>
</dd>
-<dt>Use</dt>
+<dt>Use<span class="colon">:</span></dt>
<dd><p>For lists with short field body.</p>
</dd>
</dl>
@@ -1370,12 +1370,12 @@
</dd>
<dt><em>open</em></dt>
<dd><dl class="open field-list">
-<dt>Feature</dt>
+<dt>Feature<span class="colon">:</span></dt>
<dd><p>Additional space between list items also in "simple" lists.
(Overrides the <span class="docutils literal"><span class="pre">--compact-field-lists</span></span> command line
option and the corresponding configuration setting)</p>
</dd>
-<dt>Use</dt>
+<dt>Use<span class="colon">:</span></dt>
<dd><p>For "simple" lists that should keep the space between list items.</p>
</dd>
</dl>
@@ -1382,13 +1382,13 @@
</dd>
<dt><em>narrow</em></dt>
<dd><dl class="narrow field-list simple">
-<dt>Feature</dt>
+<dt>Feature<span class="colon">:</span></dt>
<dd><p>Less indented field body.</p>
</dd>
-<dt>Use</dt>
+<dt>Use<span class="colon">:</span></dt>
<dd><p>For lists with short field names.</p>
</dd>
-<dt>A long field name</dt>
+<dt>A long field name<span class="colon">:</span></dt>
<dd><p>sticks into the field body and the field body starts on a
new line (if not combined with <a class="reference internal" href="#run-in">run-in</a>).</p>
</dd>
@@ -1398,15 +1398,15 @@
<dl class="simple" id="run-in">
<dt><em>run-in</em></dt>
<dd><dl class="run-in field-list simple">
-<dt>Feature</dt>
+<dt>Feature<span class="colon">:</span></dt>
<dd><p>Field body starts on the same line also after long field
names.</p>
</dd>
-<dt>A long field name</dt>
+<dt>A long field name<span class="colon">:</span></dt>
<dd><p>sticks into the field body which continues on
the same line.</p>
</dd>
-<dt>The next field name</dt>
+<dt>The next field name<span class="colon">:</span></dt>
<dd><p>and field body should align. Long text in the field
body is wrapped and aligns with other fields.</p>
</dd>
@@ -1417,7 +1417,7 @@
<section id="table-variants">
<h4><a class="toc-backref" href="#toc-entry-48"><span class="sectnum">3.2.3</span> Table Variants</a></h4>
<p>The following styles can be applied to individual tables via a class
-argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#footnote-9" id="footnote-reference-22">9</a> configuration
+argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#footnote-9" id="footnote-reference-22"><span class="fn-bracket">[</span>9<span class="fn-bracket">]</span></a> configuration
setting (or command line argument).</p>
<ul>
<li><p>Numbered tables can be achieved with the "numbered" class option:</p>
@@ -1457,7 +1457,7 @@
common request and already on the <cite>TODO list</cite>.</p>
</li>
<li><p>A table with "booktabs" class value, is rendered similar to the style
-from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#footnote-10" id="footnote-reference-23">10</a> LaTeX package.</p>
+from the <a class="reference external" href="http://tug.ctan.org/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf">booktabs</a> <a class="footnote-reference brackets" href="#footnote-10" id="footnote-reference-23"><span class="fn-bracket">[</span>10<span class="fn-bracket">]</span></a> LaTeX package.</p>
</li>
</ul>
<p>"Booktabs" style table, numbered, centre-aligned, with auto-sized columns:</p>
@@ -1508,7 +1508,7 @@
<section id="text-level-semantics">
<h3><a class="toc-backref" href="#toc-entry-50"><span class="sectnum">3.3</span> Text-Level Semantics</a></h3>
<p>This section describes the <a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">HTML 5 tags for representation of text-level
-semantics</a> <a class="footnote-reference brackets" href="#footnote-17" id="footnote-reference-31">17</a> and their reStructuredText equivalents.</p>
+semantics</a> <a class="footnote-reference brackets" href="#footnote-17" id="footnote-reference-31"><span class="fn-bracket">[</span>17<span class="fn-bracket">]</span></a> and their reStructuredText equivalents.</p>
<dl class="description">
<dt>a</dt>
<dd><p>Hyperlinks</p>
@@ -1563,9 +1563,9 @@
</blockquote>
</dd>
<dt>abbr</dt>
-<dd><p>Abbreviations <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-10">5</a></p>
+<dd><p>Abbreviations <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-10"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p>
<blockquote>
-<p>Organic food in Ireland is certified by the <abbr>IOFGA</abbr> <a class="footnote-reference brackets" href="#footnote-6" id="footnote-reference-11">‡</a></p>
+<p>Organic food in Ireland is certified by the <abbr>IOFGA</abbr> <a class="footnote-reference brackets" href="#footnote-6" id="footnote-reference-11"><span class="fn-bracket">[</span>‡<span class="fn-bracket">]</span></a></p>
</blockquote>
<p>In rST there are separate roles for <cite>abbreviations</cite> <abbr>rsp.</abbr>
<cite>acronymes</cite>. In HTML, the <acronym> tag is obsolete and authors are
@@ -1572,7 +1572,7 @@
advised to use <abbr> instead. The HTML5 writer uses <abbr> for Docutil's
<abbreviation> element.</p>
<dl class="footnote brackets">
-<dt class="label" id="footnote-6"><span class="brackets"><a class="fn-backref" href="#footnote-reference-11">‡</a></span></dt>
+<dt class="label" id="footnote-6"><a class="fn-backref" href="#footnote-reference-11"><span class="fn-bracket">[</span>‡<span class="fn-bracket">]</span></a></dt>
<dd><p>Irish Organic Farmers and Growers Association</p>
</dd>
</dl>
@@ -1583,12 +1583,12 @@
<!-- <ruby> OJ <rp>(</rp><rt>Orange Juice</rt><rp>)</rp></ruby> -->
</dd>
<dt>data</dt>
-<dd><p>Machine-readable equivalent <a class="footnote-reference brackets" href="#attribute-required" id="footnote-reference-12">6</a></p>
+<dd><p>Machine-readable equivalent <a class="footnote-reference brackets" href="#attribute-required" id="footnote-reference-12"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span></a></p>
<!-- Available starting today! <data value="UPC:022014640201">North Coast
Organic Apple Cider</data> -->
</dd>
<dt>time</dt>
-<dd><p>Machine-readable equivalent of date- or time-related data <a class="footnote-reference brackets" href="#attribute-required" id="footnote-reference-13">6</a></p>
+<dd><p>Machine-readable equivalent of date- or time-related data <a class="footnote-reference brackets" href="#attribute-required" id="footnote-reference-13"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span></a></p>
<!-- Available starting on <time datetime="2011-11-18">November 18th</time>! -->
</dd>
<dt>code</dt>
@@ -1655,7 +1655,7 @@
</blockquote>
</dd>
<dt>bdi</dt>
-<dd><p>Text directionality isolation <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-14">5</a></p>
+<dd><p>Text directionality isolation <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-14"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p>
<blockquote>
<p>The recommended restaurant is <bdi>My Juice Café (At The Beach)</bdi>.</p>
</blockquote>
@@ -1663,7 +1663,7 @@
element.</p>
</dd>
<dt>bdo</dt>
-<dd><p>Text directionality formatting <a class="footnote-reference brackets" href="#attribute-required" id="footnote-reference-15">6</a></p>
+<dd><p>Text directionality formatting <a class="footnote-reference brackets" href="#attribute-required" id="footnote-reference-15"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span></a></p>
<!-- The proposal is to write English, but in reverse order. "Juice" would
become "<bdo dir=rtl>Juice</bdo>"> -->
<p>Authors <em>must</em> specify the dir attribute on this element.</p>
@@ -1702,11 +1702,11 @@
</dd>
</dl>
<dl class="footnote brackets">
-<dt class="label" id="attribute-optional"><span class="brackets">5</span><span class="fn-backref">(<a href="#footnote-reference-10">1</a>,<a href="#footnote-reference-14">2</a>,<a href="#footnote-reference-16">3</a>,<a href="#footnote-reference-17">4</a>)</span></dt>
+<dt class="label" id="attribute-optional"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-10">1</a>,<a href="#footnote-reference-14">2</a>,<a href="#footnote-reference-16">3</a>,<a href="#footnote-reference-17">4</a>)</span></dt>
<dd><p>Would gain from support for attributes/arguments
-to inline roles. See <a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">TODO</a> <a class="footnote-reference brackets" href="#footnote-11" id="footnote-reference-24">11</a></p>
+to inline roles. See <a class="reference external" href="http://docutils.sourceforge.net/docs/dev/todo.html#interpreted-text">TODO</a> <a class="footnote-reference brackets" href="#footnote-11" id="footnote-reference-24"><span class="fn-bracket">[</span>11<span class="fn-bracket">]</span></a></p>
</dd>
-<dt class="label" id="attribute-required"><span class="brackets">6</span><span class="fn-backref">(<a href="#footnote-reference-12">1</a>,<a href="#footnote-reference-13">2</a>,<a href="#footnote-reference-15">3</a>)</span></dt>
+<dt class="label" id="attribute-required"><span class="fn-bracket">[</span>6<span class="fn-bracket">]</span><span class="fn-backref">(<a href="#footnote-reference-12">1</a>,<a href="#footnote-reference-13">2</a>,<a href="#footnote-reference-15">3</a>)</span></dt>
<dd><p>Requires support for attributes to inline
roles to make sense.</p>
</dd>
@@ -1714,11 +1714,11 @@
</section>
<section id="indicating-edits">
<h3><a class="toc-backref" href="#toc-entry-51"><span class="sectnum">3.4</span> Indicating Edits</a></h3>
-<p>The <a class="reference external" href="https://html.spec.whatwg.org/multipage/edits.html">HTML tags for representation of edits to the document</a> <a class="footnote-reference brackets" href="#footnote-18" id="footnote-reference-32">18</a> and their
+<p>The <a class="reference external" href="https://html.spec.whatwg.org/multipage/edits.html">HTML tags for representation of edits to the document</a> <a class="footnote-reference brackets" href="#footnote-18" id="footnote-reference-32"><span class="fn-bracket">[</span>18<span class="fn-bracket">]</span></a> and their
reStructuredText equivalents are:</p>
<dl class="description">
<dt>ins</dt>
-<dd><p>Additions <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-16">5</a></p>
+<dd><p>Additions <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-16"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p>
<blockquote>
<p>This text has "always" been here. <ins>This text has been inserted.</ins></p>
<ins class="docutils container">
@@ -1727,7 +1727,7 @@
</blockquote>
</dd>
<dt>del</dt>
-<dd><p>Removed content <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-17">5</a></p>
+<dd><p>Removed content <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-17"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a></p>
<blockquote>
<p><del>This text has been deleted</del>, here is the rest of the paragraph.</p>
<del class="docutils container">
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2021-05-20 10:07:40 UTC (rev 8733)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2021-05-20 10:07:55 UTC (rev 8734)
@@ -183,7 +183,7 @@
""",
"""\
{'docinfo': '''<dl class="docinfo simple">
-<dt class="author">Author</dt>
+<dt class="author">Author<span class="colon">:</span></dt>
<dd class="author"><p>me</p></dd>
</dl>\\n''',
'fragment': '''<p>Some stuff</p>\\n''',
@@ -190,7 +190,7 @@
'html_body': '''<main id="title">
<h1 class="title">Title</h1>
<dl class="docinfo simple">
-<dt class="author">Author</dt>
+<dt class="author">Author<span class="colon">:</span></dt>
<dd class="author"><p>me</p></dd>
</dl>
<p>Some stuff</p>
@@ -391,14 +391,14 @@
"""\
{'fragment': '''<p>Not a docinfo.</p>
<dl class="field-list simple">
-<dt>This</dt>
+<dt>This<span class="colon">:</span></dt>
<dd><p id="target">is</p>
</dd>
-<dt>a</dt>
+<dt>a<span class="colon">:</span></dt>
<dd><p></p></dd>
-<dt>simple</dt>
+<dt>simple<span class="colon">:</span></dt>
<dd><p></p></dd>
-<dt>field</dt>
+<dt>field<span class="colon">:</span></dt>
<dd><p>list</p>
</dd>
</dl>\\n''',
@@ -405,14 +405,14 @@
'html_body': '''<main>
<p>Not a docinfo.</p>
<dl class="field-list simple">
-<dt>This</dt>
+<dt>This<span class="colon">:</span></dt>
<dd><p id="target">is</p>
</dd>
-<dt>a</dt>
+<dt>a<span class="colon">:</span></dt>
<dd><p></p></dd>
-<dt>simple</dt>
+<dt>simple<span class="colon">:</span></dt>
<dd><p></p></dd>
-<dt>field</dt>
+<dt>field<span class="colon">:</span></dt>
<dd><p>list</p>
</dd>
</dl>
@@ -429,10 +429,10 @@
{'fragment': '''\
<p>Not a docinfo.</p>
<dl class="field-list simple">
-<dt>This is</dt>
+<dt>This is<span class="colon">:</span></dt>
<dd><p>a</p>
</dd>
-<dt>simple field list with loooong field</dt>
+<dt>simple field list with loooong field<span class="colon">:</span></dt>
<dd><p>names</p>
</dd>
</dl>\\n''',
@@ -440,10 +440,10 @@
<main>
<p>Not a docinfo.</p>
<dl class="field-list simple">
-<dt>This ...
[truncated message content] |