|
From: <mi...@us...> - 2019-12-12 13:04:59
|
Revision: 8435
http://sourceforge.net/p/docutils/code/8435
Author: milde
Date: 2019-12-12 13:04:57 +0000 (Thu, 12 Dec 2019)
Log Message:
-----------
Document possible heavy ressource use when parsing untrusted input.
See bug #381.
Modified Paths:
--------------
trunk/docutils/docs/howto/security.txt
trunk/docutils/docutils/statemachine.py
Modified: trunk/docutils/docs/howto/security.txt
===================================================================
--- trunk/docutils/docs/howto/security.txt 2019-12-04 19:27:04 UTC (rev 8434)
+++ trunk/docutils/docs/howto/security.txt 2019-12-12 13:04:57 UTC (rev 8435)
@@ -23,7 +23,7 @@
secure the Docutils software in your applications.
Docutils does not come in a through-the-web secure state, because this
-would inconvenience ordinary users
+would inconvenience ordinary users.
__ ../../FAQ.html#are-there-any-weblog-blog-projects-that-use-restructuredtext-syntax
__ ../../FAQ.html#are-there-any-wikis-that-use-restructuredtext-syntax
@@ -66,6 +66,17 @@
.. _raw_enabled: ../user/config.html#raw-enabled
+CPU and memory utilization
+--------------------------
+
+Parsing complex reStructuredText documents may require high processing
+ressources. This enables `Denial of Service` attacs using specially crafted
+input.
+
+It is recommended to enforce limits for the computation time and resource
+utilization of the Docutils process when processing untrusted input.
+
+
Securing Docutils
=================
Modified: trunk/docutils/docutils/statemachine.py
===================================================================
--- trunk/docutils/docutils/statemachine.py 2019-12-04 19:27:04 UTC (rev 8434)
+++ trunk/docutils/docutils/statemachine.py 2019-12-12 13:04:57 UTC (rev 8435)
@@ -1500,7 +1500,6 @@
transition name.
"""
-
def string2lines(astring, tab_width=8, convert_whitespace=False,
whitespace=re.compile('[\v\f]')):
"""
@@ -1518,6 +1517,8 @@
"""
if convert_whitespace:
astring = whitespace.sub(' ', astring)
+ # TODO: add a test for too long lines (max_line_lenght = 1000, say)?
+ # See bug #381.
return [s.expandtabs(tab_width).rstrip() for s in astring.splitlines()]
def _exception_data():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2019-12-15 00:35:26
|
Revision: 8440
http://sourceforge.net/p/docutils/code/8440
Author: grubert
Date: 2019-12-15 00:35:24 +0000 (Sun, 15 Dec 2019)
Log Message:
-----------
set version: 0.16rc1.dev
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/README.txt 2019-12-15 00:35:24 UTC (rev 8440)
@@ -1,5 +1,5 @@
============================
- README: Docutils 0.16b.dev
+ README: Docutils 0.16rc1.dev
============================
:Author: David Goodger
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/docutils/__init__.py 2019-12-15 00:35:24 UTC (rev 8440)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.16b.dev'
+__version__ = '0.16rc1.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -74,9 +74,9 @@
major=0,
minor=16,
micro=0,
- releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
+ releaselevel='candidate', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
- serial=0,
+ serial=1,
release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/setup.py 2019-12-15 00:35:24 UTC (rev 8440)
@@ -79,7 +79,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.16b.dev',
+ 'version': '0.16rc1.dev',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/dangerous.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2019-12-15 00:35:24 UTC (rev 8440)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>link_in_substitution.txt</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/pep_html.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2019-12-15 00:35:24 UTC (rev 8440)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.16b.dev -->
+<!-- Generated by Docutils 0.16rc1.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="authors" content="Me Myself I" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="author" content="Me" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2019-12-13 17:02:41 UTC (rev 8439)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2019-12-15 00:35:24 UTC (rev 8440)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16b.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2019-12-19 19:24:07
|
Revision: 8442
http://sourceforge.net/p/docutils/code/8442
Author: grubert
Date: 2019-12-19 19:24:05 +0000 (Thu, 19 Dec 2019)
Log Message:
-----------
version: 0.16rc1
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/README.txt 2019-12-19 19:24:05 UTC (rev 8442)
@@ -1,6 +1,6 @@
-==============================
- README: Docutils 0.16rc1.dev
-==============================
+==========================
+ README: Docutils 0.16rc1
+==========================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/docutils/__init__.py 2019-12-19 19:24:05 UTC (rev 8442)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.16rc1.dev'
+__version__ = '0.16rc1'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -77,7 +77,7 @@
releaselevel='candidate', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
serial=1,
- release=False # True for official releases and pre-releases
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/setup.py 2019-12-19 19:24:05 UTC (rev 8442)
@@ -79,7 +79,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.16rc1.dev',
+ 'version': '0.16rc1',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/dangerous.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2019-12-19 19:24:05 UTC (rev 8442)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>link_in_substitution.txt</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/pep_html.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2019-12-19 19:24:05 UTC (rev 8442)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.16rc1.dev -->
+<!-- Generated by Docutils 0.16rc1 -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="authors" content="Me Myself I" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="author" content="Me" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2019-12-15 00:41:49 UTC (rev 8441)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2019-12-19 19:24:05 UTC (rev 8442)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2019-12-19 20:06:09
|
Revision: 8444
http://sourceforge.net/p/docutils/code/8444
Author: grubert
Date: 2019-12-19 20:06:06 +0000 (Thu, 19 Dec 2019)
Log Message:
-----------
version: 0.16rc2.dev
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/README.txt 2019-12-19 20:06:06 UTC (rev 8444)
@@ -1,6 +1,6 @@
-==========================
- README: Docutils 0.16rc1
-==========================
+==============================
+ README: Docutils 0.16rc2.dev
+==============================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/docutils/__init__.py 2019-12-19 20:06:06 UTC (rev 8444)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.16rc1'
+__version__ = '0.16rc2.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -76,8 +76,8 @@
micro=0,
releaselevel='candidate', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
- serial=1,
- release=True # True for official releases and pre-releases
+ serial=2,
+ release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/setup.py 2019-12-19 20:06:06 UTC (rev 8444)
@@ -79,7 +79,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.16rc1',
+ 'version': '0.16rc2.dev',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/dangerous.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2019-12-19 20:06:06 UTC (rev 8444)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>link_in_substitution.txt</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/pep_html.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2019-12-19 20:06:06 UTC (rev 8444)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.16rc1 -->
+<!-- Generated by Docutils 0.16rc2.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="authors" content="Me Myself I" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="author" content="Me" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2019-12-19 19:57:19 UTC (rev 8443)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2019-12-19 20:06:06 UTC (rev 8444)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2020-01-12 13:28:34
|
Revision: 8453
http://sourceforge.net/p/docutils/code/8453
Author: grubert
Date: 2020-01-12 13:28:32 +0000 (Sun, 12 Jan 2020)
Log Message:
-----------
set version 0.16
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/README.txt 2020-01-12 13:28:32 UTC (rev 8453)
@@ -1,6 +1,6 @@
-==============================
- README: Docutils 0.16rc2.dev
-==============================
+=======================
+ README: Docutils 0.16
+=======================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/docutils/__init__.py 2020-01-12 13:28:32 UTC (rev 8453)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.16rc2.dev'
+__version__ = '0.16'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -74,10 +74,10 @@
major=0,
minor=16,
micro=0,
- releaselevel='candidate', # one of 'alpha', 'beta', 'candidate', 'final'
+ releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
- serial=2,
- release=False # True for official releases and pre-releases
+ serial=0,
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/setup.py 2020-01-12 13:28:32 UTC (rev 8453)
@@ -79,7 +79,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.16rc2.dev',
+ 'version': '0.16',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/dangerous.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2020-01-12 13:28:32 UTC (rev 8453)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>link_in_substitution.txt</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/pep_html.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2020-01-12 13:28:32 UTC (rev 8453)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.16rc2.dev -->
+<!-- Generated by Docutils 0.16 -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="authors" content="Me Myself I" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="author" content="Me" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2020-01-09 10:50:44 UTC (rev 8452)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2020-01-12 13:28:32 UTC (rev 8453)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16rc2.dev: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2020-01-12 15:10:26
|
Revision: 8456
http://sourceforge.net/p/docutils/code/8456
Author: grubert
Date: 2020-01-12 15:10:24 +0000 (Sun, 12 Jan 2020)
Log Message:
-----------
set release 0.17b.dev
Modified Paths:
--------------
trunk/docutils/README.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/setup.py
trunk/docutils/test/functional/expected/compact_lists.html
trunk/docutils/test/functional/expected/dangerous.html
trunk/docutils/test/functional/expected/field_name_limit.html
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_html.html
trunk/docutils/test/functional/expected/math_output_latex.html
trunk/docutils/test/functional/expected/math_output_mathjax.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/README.txt 2020-01-12 15:10:24 UTC (rev 8456)
@@ -1,6 +1,6 @@
-=======================
- README: Docutils 0.16
-=======================
+============================
+ README: Docutils 0.17b.dev
+============================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/docutils/__init__.py 2020-01-12 15:10:24 UTC (rev 8456)
@@ -56,7 +56,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.16'
+__version__ = '0.17b.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -72,12 +72,12 @@
__version_info__ = VersionInfo(
major=0,
- minor=16,
+ minor=17,
micro=0,
- releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
+ releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
# pre-release serial number (0 for final releases and active development):
serial=0,
- release=True # True for official releases and pre-releases
+ release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple. See 'Version Numbering' in
docs/dev/policies.txt."""
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/setup.py 2020-01-12 15:10:24 UTC (rev 8456)
@@ -79,7 +79,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'http://docutils.sourceforge.net/',
- 'version': '0.16',
+ 'version': '0.17b.dev',
'author': 'David Goodger',
'author_email': 'go...@py...',
'maintainer': 'docutils-develop list',
Modified: trunk/docutils/test/functional/expected/compact_lists.html
===================================================================
--- trunk/docutils/test/functional/expected/compact_lists.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>compact_lists.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/dangerous.html
===================================================================
--- trunk/docutils/test/functional/expected/dangerous.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/dangerous.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>field_list.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_latex.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_latex.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/math_output_mathjax.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathjax.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<script type="text/javascript" src="/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS_CHTML"></script>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2020-01-12 15:10:24 UTC (rev 8456)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>link_in_substitution.txt</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/pep_html.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+ <meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>PEP 100 -- Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2020-01-12 15:10:24 UTC (rev 8456)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
-<!-- Generated by Docutils 0.16 -->
+<!-- Generated by Docutils 0.17b.dev -->
<document ids="restructuredtext-test-document doctitle" names="restructuredtext\ test\ document doctitle" source="functional/input/standalone_rst_docutils_xml.txt" title="reStructuredText Test Document">
<title>reStructuredText Test Document</title>
<subtitle ids="examples-of-syntax-constructs subtitle" names="examples\ of\ syntax\ constructs subtitle">Examples of Syntax Constructs</subtitle>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="authors" content="Me Myself I" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
<meta name="author" content="Me" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2020-01-12 14:47:26 UTC (rev 8455)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2020-01-12 15:10:24 UTC (rev 8456)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.17b.dev: http://docutils.sourceforge.net/" />
<meta name="version" content="S5 1.1" />
<title>Slide Shows</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2020-01-12 15:17:14
|
Revision: 8457
http://sourceforge.net/p/docutils/code/8457
Author: grubert
Date: 2020-01-12 15:17:12 +0000 (Sun, 12 Jan 2020)
Log Message:
-----------
Changes since 0.16
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-12 15:10:24 UTC (rev 8456)
+++ trunk/docutils/HISTORY.txt 2020-01-12 15:17:12 UTC (rev 8457)
@@ -15,9 +15,13 @@
2019-07-23 : Branch: branches/rel-0.15 created to investigate import problems: bugs#366
-Changes Since 0.15
+Changes Since 0.16
==================
+
+Release 0.16
+============
+
* General
- Dropped support for Python 2.6, 3.3 and 3.4
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2020-01-12 15:10:24 UTC (rev 8456)
+++ trunk/docutils/RELEASE-NOTES.txt 2020-01-12 15:17:12 UTC (rev 8457)
@@ -80,8 +80,8 @@
.. _reference name: docs/ref/rst/restructuredtext.html#reference-names
.. _identifier normalization: directives.html#identifier-normalization
-Release 0.16b (2019-12-01)
-==========================
+Release 0.16 (2020-01-12)
+=========================
.. Note::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-16 10:54:25
|
Revision: 8462
http://sourceforge.net/p/docutils/code/8462
Author: milde
Date: 2020-01-16 10:54:23 +0000 (Thu, 16 Jan 2020)
Log Message:
-----------
Document buildhtml.py options "html_writer" and "dry-run".
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docs/user/config.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-12 19:05:00 UTC (rev 8461)
+++ trunk/docutils/HISTORY.txt 2020-01-16 10:54:23 UTC (rev 8462)
@@ -110,10 +110,9 @@
* tools/buildhtml.py
- - New option "--html-writer" allows to select "html__" (default),
- "html4" or "html5".
+ - New option `html-writer`_.
- __ html: docs/user/html.html#html
+ .. _html-writer: docs/user/config.html#html-writer
Release 0.15.1 (2019-07-24)
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2020-01-12 19:05:00 UTC (rev 8461)
+++ trunk/docutils/docs/user/config.txt 2020-01-16 10:54:23 UTC (rev 8462)
@@ -1911,6 +1911,23 @@
[buildhtml application]
-----------------------
+dry_run
+~~~~~~~
+
+Do not process files, show files that would be processed.
+
+Default: False. Options: ``--dry-run``.
+
+html_writer
+~~~~~~~~~~~
+
+`HTML writer`_ version. One of "html", "html4", "html5".
+
+Default: "html" (use Docutils' default HTML writer).
+Options: ``--html-writer``
+
+.. _HTML writer: html.html
+
ignore
~~~~~~
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2020-01-16 19:57:08
|
Revision: 8463
http://sourceforge.net/p/docutils/code/8463
Author: grubert
Date: 2020-01-16 19:57:06 +0000 (Thu, 16 Jan 2020)
Log Message:
-----------
Explicit include test subdirectory contents in MANIFEST.in to avoid inclusion of test outputs.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/MANIFEST.in
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-16 10:54:23 UTC (rev 8462)
+++ trunk/docutils/HISTORY.txt 2020-01-16 19:57:06 UTC (rev 8463)
@@ -18,7 +18,11 @@
Changes Since 0.16
==================
+* General
+ - Explicit include test subdirectory contents in MANIFEST.in to avoid
+ inclusion of test outputs.
+
Release 0.16
============
Modified: trunk/docutils/MANIFEST.in
===================================================================
--- trunk/docutils/MANIFEST.in 2020-01-16 10:54:23 UTC (rev 8462)
+++ trunk/docutils/MANIFEST.in 2020-01-16 19:57:06 UTC (rev 8463)
@@ -6,6 +6,18 @@
recursive-include docutils *
recursive-include docs *
recursive-include licenses *
-recursive-include test *
+include test/*.py
+include test/coverage.sh
+include test/docutils.conf
+recursive-include test/data *
+include test/functional/README.txt
+include test/functional/output/README.txt
+recursive-include test/functional/expected *
+recursive-include test/functional/input *
+recursive-include test/functional/tests *
+recursive-include test/test_parsers *
+recursive-include test/test_readers *
+recursive-include test/test_transforms *
+recursive-include test/test_writers *
recursive-include tools *
recursive-exclude * *.pyc *~ .DS_Store
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-26 21:23:44
|
Revision: 8467
http://sourceforge.net/p/docutils/code/8467
Author: milde
Date: 2020-01-26 21:23:42 +0000 (Sun, 26 Jan 2020)
Log Message:
-----------
Clean up LanguageImporter. Update documentation.
* Fix caching.
* Report missing/incomplete modules and
language-variant substitutions (info).
* Move documentation from instance to class definition.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docs/howto/i18n.txt
trunk/docutils/docutils/languages/__init__.py
trunk/docutils/docutils/parsers/rst/languages/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-26 21:23:28 UTC (rev 8466)
+++ trunk/docutils/HISTORY.txt 2020-01-26 21:23:42 UTC (rev 8467)
@@ -22,6 +22,7 @@
- Explicit include test subdirectory contents in MANIFEST.in to avoid
inclusion of test outputs.
+ - Fix [ 385 ]: Import of language modules.
Release 0.16
============
Modified: trunk/docutils/docs/howto/i18n.txt
===================================================================
--- trunk/docutils/docs/howto/i18n.txt 2020-01-26 21:23:28 UTC (rev 8466)
+++ trunk/docutils/docs/howto/i18n.txt 2020-01-26 21:23:42 UTC (rev 8467)
@@ -29,7 +29,8 @@
be [#]_) fully parameterized. To enable a new language, two modules
have to be added to the project: one for Docutils itself (the
`Docutils Language Module`_) and one for the reStructuredText parser
-(the `reStructuredText Language Module`_).
+(the `reStructuredText Language Module`_). Users may add local language
+support via a module in the PYTHONPATH root (e.g. the working directory).
.. [#] If anything in Docutils is insufficiently parameterized, it
should be considered a bug. Please report bugs to the Docutils
@@ -71,25 +72,6 @@
02iso-3166-code-lists/index.html
-Python Code
-===========
-
-Generally Python code in Docutils is ASCII-only. In language modules,
-Unicode-escapes can be used for non-ASCII characters.
-
-`PEP 263`_ introduces source code encodings to Python modules,
-implemented beginning in Python 2.3. Especially for languages with
-non-Latin scripts, using UTF-8 encoded literal Unicode strings increases the
-readability. Start the source code file with the magic comment::
-
- # -*- coding: utf-8 -*-
-
-As mentioned in the note above, developers are invited to explore
-"gettext" and other i18n technologies.
-
-.. _PEP 263: http://www.python.org/peps/pep-0263.html
-
-
Docutils Language Module
========================
Modified: trunk/docutils/docutils/languages/__init__.py
===================================================================
--- trunk/docutils/docutils/languages/__init__.py 2020-01-26 21:23:28 UTC (rev 8466)
+++ trunk/docutils/docutils/languages/__init__.py 2020-01-26 21:23:42 UTC (rev 8467)
@@ -16,8 +16,16 @@
from docutils.utils import normalize_language_tag
+
class LanguageImporter(object):
+ """Import language modules.
+ When called with a BCP 47 language tag, instances return a module
+ with localisations from `docutils.languages` or the PYTHONPATH.
+
+ If there is no matching module, warn (if a `reporter` is passed)
+ and fall back to English.
+ """
packages = ('docutils.languages.', '')
warn_msg = ('Language "%s" not supported: '
'Docutils-generated text will be in English.')
@@ -27,21 +35,22 @@
def __init__(self):
self.cache = {}
- def import_from_packages(self, name):
+ def import_from_packages(self, name, reporter=None):
"""Try loading module `name` from `self.packages`."""
- try:
- return self.cache[name]
- except KeyError:
- pass
+ module = None
for package in self.packages:
try:
module = import_module(package+name)
self.check_content(module)
except (ImportError, AttributeError):
+ if reporter and module:
+ reporter.info('%s is no complete Docutils language module.'
+ %module)
+ elif reporter:
+ reporter.info('Module "%s" not found.'%(package+name))
continue
- self.cache[name] = module
- return module
- return None
+ break
+ return module
def check_content(self, module):
"""Check if we got a Docutils language module."""
@@ -57,21 +66,18 @@
pass
for tag in normalize_language_tag(language_code):
tag = tag.replace('-', '_') # '-' not valid in module names
- module = self.import_from_packages(tag)
+ module = self.import_from_packages(tag, reporter)
if module is not None:
- return module
- if reporter is not None:
- reporter.warning(self.warn_msg % language_code)
- module = self.import_from_packages('en')
- self.cache[tag] = module # warn only one time!
+ break
+ else:
+ if reporter:
+ reporter.warning(self.warn_msg % language_code)
+ if self.fallback:
+ module = self.import_from_packages(self.fallback)
+ if reporter and (language_code != 'en'):
+ reporter.info('Using %s for language "%s".'%(module, language_code))
+ self.cache[language_code] = module
return module
get_language = LanguageImporter()
-"""Return module with language localizations
-
-from `docutils.languages` or the PYTHONPATH.
-
-The argument `language_code` is a "BCP 47" language tag.
-If there is no matching module, warn and fall back to English.
-"""
Modified: trunk/docutils/docutils/parsers/rst/languages/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/__init__.py 2020-01-26 21:23:28 UTC (rev 8466)
+++ trunk/docutils/docutils/parsers/rst/languages/__init__.py 2020-01-26 21:23:42 UTC (rev 8467)
@@ -17,6 +17,15 @@
from docutils.languages import LanguageImporter
class RstLanguageImporter(LanguageImporter):
+ """Import language modules.
+
+ When called with a BCP 47 language tag, instances return a module
+ with localisations for "directive" and "role" names for from
+ `docutils.parsers.rst.languages` or the PYTHONPATH.
+
+ If there is no matching module, warn (if a `reporter` is passed)
+ and return None.
+ """
packages = ('docutils.parsers.rst.languages.', '')
warn_msg = 'rST localisation for language "%s" not found.'
fallback = None
@@ -28,11 +37,3 @@
raise ImportError
get_language = RstLanguageImporter()
-"""Return module with language localizations for reStructuredText.
-
-Get translated directive and rolenames from `docutils.parsers.rst.languages`
-or the PYTHONPATH.
-
-The argument `language_code` is a "BCP 47" language tag.
-If there is no matching module, warn and return None.
-"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-26 22:08:15
|
Revision: 8468
http://sourceforge.net/p/docutils/code/8468
Author: milde
Date: 2020-01-26 22:08:13 +0000 (Sun, 26 Jan 2020)
Log Message:
-----------
VersionInfo fixes
* Raise ValueError for invalid values.
* Provide default values.
* Fix comparison to ordinary tuples.
(Test for equality still fails, because __eg__() is not called
when comparing a namedtuple subclass to a tuple!)
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/__init__.py
trunk/docutils/test/test__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-26 21:23:42 UTC (rev 8467)
+++ trunk/docutils/HISTORY.txt 2020-01-26 22:08:13 UTC (rev 8468)
@@ -24,6 +24,11 @@
inclusion of test outputs.
- Fix [ 385 ]: Import of language modules.
+* docutils/__init__.py
+
+ - VersionInfo: ValueError for invalid values, fix comparison to tuples.
+
+
Release 0.16
============
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2020-01-26 21:23:42 UTC (rev 8467)
+++ trunk/docutils/docutils/__init__.py 2020-01-26 22:08:13 UTC (rev 8468)
@@ -67,9 +67,48 @@
See 'Version Numbering' in docs/dev/policies.txt.
"""
-VersionInfo = namedtuple(
- 'VersionInfo', 'major minor micro releaselevel serial release')
+# from functools import total_ordering
+# @total_ordering
+class VersionInfo(namedtuple('VersionInfo',
+ 'major minor micro releaselevel serial release')):
+ def __new__(cls, major=0, minor=0, micro=0,
+ releaselevel='final', serial=0, release=True):
+ releaselevels = ('alpha', 'beta', 'candidate', 'final')
+ if releaselevel not in releaselevels:
+ raise ValueError('releaselevel must be one of %r.'
+ % (releaselevels, ))
+ if releaselevel == 'final':
+ if not(release):
+ raise ValueError('releaselevel "final" must not be used '
+ 'with development versions (leads to wrong '
+ 'version ordering of the related __version__')
+ if serial != 0:
+ raise ValueError('"serial" must be 0 for final releases')
+
+ return super(VersionInfo, cls).__new__(cls, major, minor, micro,
+ releaselevel, serial, release)
+
+ def __lt__(self, other):
+ if isinstance(other, tuple):
+ other = VersionInfo(*other)
+ return tuple.__lt__(self, other)
+
+ def __gt__(self, other):
+ if isinstance(other, tuple):
+ other = VersionInfo(*other)
+ return tuple.__gt__(self, other)
+
+ def __le__(self, other):
+ if isinstance(other, tuple):
+ other = VersionInfo(*other)
+ return tuple.__le__(self, other)
+
+ def __ge__(self, other):
+ if isinstance(other, tuple):
+ other = VersionInfo(*other)
+ return tuple.__ge__(self, other)
+
__version_info__ = VersionInfo(
major=0,
minor=17,
Modified: trunk/docutils/test/test__init__.py
===================================================================
--- trunk/docutils/test/test__init__.py 2020-01-26 21:23:42 UTC (rev 8467)
+++ trunk/docutils/test/test__init__.py 2020-01-26 22:08:13 UTC (rev 8468)
@@ -14,6 +14,7 @@
import DocutilsTestSupport # must be imported before docutils
import docutils
import docutils.utils
+from docutils import VersionInfo
if sys.version_info >= (3, 0):
@@ -33,33 +34,42 @@
class VersionInfoTests(unittest.TestCase):
+ def test_VersionInfo(self):
+ # arguments may use keywords
+ self.assertEqual(VersionInfo(0, 1, 2, 'beta', 3, False),
+ VersionInfo(major=0, minor=1, micro=2,
+ releaselevel='beta', serial=3,
+ release=False))
+ # check defaults:
+ self.assertEqual(VersionInfo(),
+ VersionInfo(0, 0, 0, releaselevel='final',
+ serial=0, release=True))
+
+ def test_VersionInfo_value_check(self):
+ # releaselevel must be one of ('alpha', 'beta', 'candidate', 'final')
+ with self.assertRaises(ValueError):
+ VersionInfo(0, 1, 0, 'gamma')
+ # releaselevel 'final' must not be used with development versions
+ with self.assertRaises(ValueError):
+ VersionInfo(0, 1, releaselevel='final', release=False)
+ # "serial" must be 0 for final releases'
+ with self.assertRaises(ValueError):
+ VersionInfo(0, 1, releaselevel='final', serial=1)
+
def test__version_info__(self):
+ """Ensure that the current __version_info__ is valid."""
+ releaselevels = ('alpha', 'beta', 'candidate', 'final')
+
self.assertEqual(len(docutils.__version_info__), 6)
self.assertEqual(type(docutils.__version_info__.major), int)
self.assertEqual(type(docutils.__version_info__.minor), int)
self.assertEqual(type(docutils.__version_info__.micro), int)
- self.assertEqual(type(docutils.__version_info__.releaselevel), str)
+ self.assertTrue(
+ docutils.__version_info__.releaselevel in releaselevels)
self.assertEqual(type(docutils.__version_info__.serial), int)
self.assertEqual(type(docutils.__version_info__.release), bool)
- releaselevels = ('alpha', 'beta', 'candidate', 'final')
- self.assertTrue(
- docutils.__version_info__.releaselevel in releaselevels)
- if (docutils.__version_info__.releaselevel == 'final'):
- # releaselevel 'final' must not be used with development versions
- # (leads to wrong version ordering of the related __version__):
- #
- # Within a numeric release (1.0, 2.7.3), the following suffixes
- # are permitted and MUST be ordered as shown:
- #
- # .devN, aN, bN, rcN, <no suffix>, .postN
- #
- # https://www.python.org/dev/peps/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering
- self.assertTrue(docutils.__version_info__.release)
- # pre-release serial number must be 0 for final releases:
- self.assertEqual(docutils.__version_info__.serial, 0)
-
def test__version__(self):
"""Test that __version__ is equivalent to __version_info__."""
self.assertEqual(
@@ -66,6 +76,66 @@
docutils.utils.version_identifier(docutils.__version_info__),
docutils.__version__)
+ def test_version_info_comparing(self):
+ """Test comparing of __version_info__ instances."""
+ # Example development cycle:
+ devcycle = ('0.1a.dev 0.1a 0.1a1.dev '
+ '0.1b.dev 0.1b 0.1b1.dev '
+ '0.1rc1.dev 0.1rc1 0.1rc2.dev '
+ '0.1 0.1.1b.dev 0.1.1b 0.1.1 '
+ '0.2b.dev 0.2b 0.2')
+ # corresponding version_info values:
+ versioninfos = [VersionInfo(0, 1, 0, 'alpha', 0, False),
+ VersionInfo(0, 1, 0, 'alpha', 0, True),
+ VersionInfo(0, 1, 0, 'alpha', 1, False),
+ VersionInfo(0, 1, 0, 'beta', 0, False),
+ VersionInfo(0, 1, 0, 'beta', 0, True),
+ VersionInfo(0, 1, 0, 'beta', 1, False),
+ VersionInfo(0, 1, 0, 'candidate', 1, False),
+ VersionInfo(0, 1, 0, 'candidate', 1, True),
+ VersionInfo(0, 1, 0, 'candidate', 2, False),
+ VersionInfo(0, 1, 0, 'final', 0, True),
+ VersionInfo(0, 1, 1, 'beta', 0, False),
+ VersionInfo(0, 1, 1, 'beta', 0, True),
+ VersionInfo(0, 1, 1, 'final', 0, True),
+ VersionInfo(0, 2, 0, 'beta', 0, False),
+ VersionInfo(0, 2, 0, 'beta', 0, True),
+ VersionInfo(0, 2, 0, 'final', 0, True),
+ ]
+ # transform to version strings
+ versions = [docutils.utils.version_identifier(vinfo)
+ for vinfo in versioninfos]
+
+ # ensure version infos corresponding to the dev cycle are ascending
+ self.assertEqual(versions, devcycle.split())
+ self.assertEqual(versioninfos, sorted(versioninfos))
+
+ def test_version_info_tuple_comparing(self):
+ """Test comparing of __version_info__ instances to tuples."""
+
+ # {<version string>: <version info>}
+ v01b = VersionInfo(0, 1, 0, 'beta', 0, True)
+ v01 = VersionInfo(0, 1, 0, 'final', 0, True)
+ v02b_dev = VersionInfo(0, 2, 0, 'beta', 0, False)
+
+ # compare to ordinary tuples:
+ self.assertTrue(v01b < (0, 2))
+ self.assertTrue((0, 2) > v01b)
+ self.assertTrue(v01b < (0, 1))
+ self.assertTrue((0, 1) > v01b)
+ self.assertTrue(v01 <= (0, 1))
+ self.assertTrue(v01 >= (0, 1))
+ self.assertTrue((0, 1) <= v01)
+ self.assertTrue((0, 1) >= v01)
+ self.assertTrue(v02b_dev > (0, 1))
+ self.assertTrue((0, 1) < v02b_dev)
+ # Test for equality requires complete tuple, because __eg__() is
+ # not called when comparing a namedtuple subclass to a tuple:
+ self.assertTrue((0, 1, 0, 'final', 0, True) == v01)
+ # self.assertTrue((0, 1) == v01) # fails
+ # self.assertTrue(v01 == (0, 1)) # fails
+
+
if __name__ == '__main__':
unittest.main()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-26 22:08:27
|
Revision: 8469
http://sourceforge.net/p/docutils/code/8469
Author: milde
Date: 2020-01-26 22:08:25 +0000 (Sun, 26 Jan 2020)
Log Message:
-----------
Fix [ 383 ] Smart quotes around opening and separator characters.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/utils/smartquotes.py
trunk/docutils/test/test_transforms/test_smartquotes.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-26 22:08:13 UTC (rev 8468)
+++ trunk/docutils/HISTORY.txt 2020-01-26 22:08:25 UTC (rev 8469)
@@ -27,6 +27,10 @@
* docutils/__init__.py
- VersionInfo: ValueError for invalid values, fix comparison to tuples.
+
+* docutils/utils/smartquotes.py
+
+ - Fix [ 383 ]: Smart quotes around opening and separator characters.
Release 0.16
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2020-01-26 22:08:13 UTC (rev 8468)
+++ trunk/docutils/docutils/utils/smartquotes.py 2020-01-26 22:08:25 UTC (rev 8469)
@@ -228,15 +228,15 @@
'Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening
-single-quote, when in fact it should be the `right single quotation mark`
+secondary quote, when in fact it should be the `RIGHT SINGLE QUOTATION MARK`
character which is also "the preferred character to use for apostrophe"
(Unicode). I don't think this problem can be solved in the general case --
every word processor I've tried gets this wrong as well. In such cases, it's
-best to use the proper character for closing single-quotes (’) by hand.
+best to inset the `RIGHT SINGLE QUOTATION MARK` (’) by hand.
-In English, the same character is used for apostrophe and closing single
+In English, the same character is used for apostrophe and closing secondary
quote (both plain and "smart" ones). For other locales (French, Italean,
-Swiss, ...) "smart" single closing quotes differ from the curly apostrophe.
+Swiss, ...) "smart" secondary closing quotes differ from the curly apostrophe.
.. class:: language-fr
@@ -243,7 +243,7 @@
Il dit : "C'est 'super' !"
If the apostrophe is used at the end of a word, it cannot be distinguished
-from a single quote by the algorithm. Therefore, a text like::
+from a secondary quote by the algorithm. Therefore, a text like::
.. class:: language-de-CH
@@ -251,7 +251,7 @@
will get a single closing guillemet instead of an apostrophe.
-This can be prevented by use use of the curly apostrophe character (’) in
+This can be prevented by use use of the `RIGHT SINGLE QUOTATION MARK` in
the source::
- "Er sagt: 'Ich fass' es nicht.'"
@@ -636,46 +636,50 @@
"""
smart = smartchars(language)
+ ch_classes = {'open': u'[(\[{]', # opening braces
+ 'close': r'[^\s]', # everything except whitespace
+ 'punct': r"""[-!"#\$\%'()*+,.\/:;<=>?\@\[\\\]\^_`{|}~]""",
+ 'dash': u'[-–—]' # hyphen and em/en dashes
+ + r'|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];',
+ 'sep': u'[\\s\u200B\u200C]| ', # Whitespace, ZWSP, ZWNJ
+ }
- punct_class = r"""[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]"""
- close_class = r"""[^\ \t\r\n\[\{\(\-]"""
- open_class = u'[\u200B\u200C]' # ZWSP, ZWNJ
- dec_dashes = r"""–|—"""
-
# Special case if the very first character is a quote
- # followed by punctuation at a non-word-break.
- # Close the quotes by brute force:
- text = re.sub(r"^'(?=%s\\B)" % (punct_class,), smart.csquote, text)
- text = re.sub(r'^"(?=%s\\B)' % (punct_class,), smart.cpquote, text)
+ # followed by punctuation at a non-word-break. Use closing quotes.
+ # TODO: example (when does this match?)
+ text = re.sub(r"^'(?=%s\\B)" % ch_classes['punct'], smart.csquote, text)
+ text = re.sub(r'^"(?=%s\\B)' % ch_classes['punct'], smart.cpquote, text)
- # Special case for double sets of quotes, e.g.:
- # <p>He said, "'Quoted' words in a larger quote."</p>
+ # Special case for adjacent quotes
+ # like "'Quoted' words in a larger quote."
text = re.sub(r""""'(?=\w)""", smart.opquote+smart.osquote, text)
text = re.sub(r"""'"(?=\w)""", smart.osquote+smart.opquote, text)
+ # Special case: "opening character" followed by quote,
+ # optional punctuation and space like "[", '(', or '-'.
+ text = re.sub(r"(%(open)s|%(dash)s)'(?=%(punct)s? )" % ch_classes,
+ r'\1%s'%smart.csquote, text)
+ text = re.sub(r'(%(open)s|%(dash)s)"(?=%(punct)s? )' % ch_classes,
+ r'\1%s'%smart.cpquote, text)
+
# Special case for decade abbreviations (the '80s):
if language.startswith('en'): # TODO similar cases in other languages?
text = re.sub(r"'(?=\d{2}s)", smart.apostrophe, text)
- # Get most opening single quotes:
- opening_single_quotes_regex = re.compile(u"""
+ # Get most opening secondary quotes:
+ opening_secondary_quotes_regex = re.compile(u"""
(# ?<= # look behind fails: requires fixed-width pattern
- \\s | # a whitespace char, or
- %s | # another separating char, or
- | # a non-breaking space entity, or
- [\u2013 \u2014 ] | # literal dashes, or
- -- | # dumb dashes, or
- &[mn]dash; | # dash entities (named or
- %s | # decimal or
- &\\#x201[34]; # hex)
+ %(sep)s | # a whitespace char, or
+ %(open)s | # opening brace, or
+ %(dash)s # em/en-dash
)
' # the quote
- (?=\\w) # followed by a word character
- """ % (open_class, dec_dashes), re.VERBOSE | re.UNICODE)
+ (?=\\w|%(punct)s) # followed by a word character or punctuation
+ """ % ch_classes, re.VERBOSE | re.UNICODE)
- text = opening_single_quotes_regex.sub(r'\1'+smart.osquote, text)
+ text = opening_secondary_quotes_regex.sub(r'\1'+smart.osquote, text)
- # In many locales, single closing quotes are different from apostrophe:
+ # In many locales, secondary closing quotes are different from apostrophe:
if smart.csquote != smart.apostrophe:
apostrophe_regex = re.compile(r"(?<=(\w|\d))'(?=\w)", re.UNICODE)
text = apostrophe_regex.sub(smart.apostrophe, text)
@@ -682,41 +686,33 @@
# TODO: keep track of quoting level to recognize apostrophe in, e.g.,
# "Ich fass' es nicht."
- closing_single_quotes_regex = re.compile(r"""
- (?<=%s)
- '
- """ % close_class, re.VERBOSE)
- text = closing_single_quotes_regex.sub(smart.csquote, text)
+ closing_secondary_quotes_regex = re.compile(r"(?<!\s)'", re.UNICODE)
+ text = closing_secondary_quotes_regex.sub(smart.csquote, text)
- # Any remaining single quotes should be opening ones:
+ # Any remaining secondary quotes should be opening ones:
text = re.sub(r"""'""", smart.osquote, text)
- # Get most opening double quotes:
- opening_double_quotes_regex = re.compile(u"""
+ # Get most opening primary quotes:
+ opening_primary_quotes_regex = re.compile(u"""
(
- \\s | # a whitespace char, or
- %s | # another separating char, or
- | # a non-breaking space entity, or
- [\u2013 \u2014 ] | # literal dashes, or
- -- | # dumb dashes, or
- &[mn]dash; | # dash entities (named or
- %s | # decimal or
- &\\#x201[34]; # hex)
+ %(sep)s | # a whitespace char, or
+ %(open)s | # zero width separating char, or
+ %(dash)s # em/en-dash
)
" # the quote
- (?=\\w) # followed by a word character
- """ % (open_class, dec_dashes), re.VERBOSE | re.UNICODE)
+ (?=\\w|%(punct)s) # followed by a word character or punctuation
+ """ % ch_classes, re.VERBOSE | re.UNICODE)
- text = opening_double_quotes_regex.sub(r'\1'+smart.opquote, text)
+ text = opening_primary_quotes_regex.sub(r'\1'+smart.opquote, text)
- # Double closing quotes:
- closing_double_quotes_regex = re.compile(r"""
+ # primary closing quotes:
+ closing_primary_quotes_regex = re.compile(r"""
(
- (?<=%s)" | # char indicating the quote should be closing
+ (?<!\s)" | # no whitespace before
"(?=\s) # whitespace behind
)
- """ % (close_class,), re.VERBOSE | re.UNICODE)
- text = closing_double_quotes_regex.sub(smart.cpquote, text)
+ """, re.VERBOSE | re.UNICODE)
+ text = closing_primary_quotes_regex.sub(smart.cpquote, text)
# Any remaining quotes should be opening ones.
text = re.sub(r'"', smart.opquote, text)
@@ -826,16 +822,16 @@
"""
smart = smartchars(language)
- text = re.sub(smart.endash, "-", text) # en-dash
- text = re.sub(smart.emdash, "--", text) # em-dash
+ text = re.sub(smart.endash, "-", text) # en-dash
+ text = re.sub(smart.emdash, "--", text) # em-dash
- text = re.sub(smart.osquote, "'", text) # open single quote
- text = re.sub(smart.csquote, "'", text) # close single quote
+ text = re.sub(smart.osquote, "'", text) # open secondary quote
+ text = re.sub(smart.csquote, "'", text) # close secondary quote
- text = re.sub(smart.opquote, '"', text) # open double quote
- text = re.sub(smart.cpquote, '"', text) # close double quote
+ text = re.sub(smart.opquote, '"', text) # open primary quote
+ text = re.sub(smart.cpquote, '"', text) # close primary quote
- text = re.sub(smart.ellipsis, '...', text)# ellipsis
+ text = re.sub(smart.ellipsis, '...', text) # ellipsis
return text
Modified: trunk/docutils/test/test_transforms/test_smartquotes.py
===================================================================
--- trunk/docutils/test/test_transforms/test_smartquotes.py 2020-01-26 22:08:13 UTC (rev 8468)
+++ trunk/docutils/test/test_transforms/test_smartquotes.py 2020-01-26 22:08:25 UTC (rev 8469)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# $Id$
#
@@ -18,7 +18,9 @@
"""
from __future__ import absolute_import
-from . import DocutilsTestSupport # must be imported before docutils
+if __name__ == '__main__':
+ import __init__
+from test_transforms import DocutilsTestSupport # must be imported before docutils
from docutils.transforms.universal import SmartQuotes
from docutils.parsers.rst import Parser
@@ -26,7 +28,8 @@
def suite():
parser = Parser()
settings = {'smart_quotes': True,
- 'trim_footnote_ref_space': True}
+ 'trim_footnote_ref_space': True,
+ 'report': 2} # TODO: why is this ignored when running as main?
s = DocutilsTestSupport.TransformTestSuite(
parser, suite_settings=settings)
s.generateTests(totest)
@@ -111,10 +114,11 @@
f'(x) = df(x)/dx
"""],
[u"""\
-Quotes preceded by
-a word"a" and'a',
-punctuation:"a",'a',
+Closing quotes, if preceded by
+wor"d char's
+or punctuation:"a",'a';'a' (TODO: opening quotes if followed by word-char?).
+Opening quotes after
normal space "a" 'a',
thin space "a" 'a',
em space "a" 'a',
@@ -123,17 +127,25 @@
ZWNJ\u200C"a" and\u200C'a',
escaped space\\ "a" and\\ 'a',
+hyphen -"a", -'a'
—"a",—'a'
-en dash–"a"–'a',
-em dash—"a"—'a'.
+en dash –"a"–'a',
+em dash —"a"—'a'.
+
+opening brackets ("a") ('a') ["a"] ['a'] {"a"} {'a'}
+
+But not if followed by (optional punctuation and) whitespace:
+"-", "–", "—", "(", "a[", "{"
+'-', '–', '—', '((', '[', '{'
""",
u"""\
<document source="test data">
<paragraph>
- Quotes preceded by
- a word”a” and’a’,
- punctuation:”a”,’a’,
+ Closing quotes, if preceded by
+ wor”d char’s
+ or punctuation:”a”,’a’;’a’ (TODO: opening quotes if followed by word-char?).
<paragraph>
+ Opening quotes after
normal space “a” ‘a’,
thin space “a” ‘a’,
em space “a” ‘a’,
@@ -142,9 +154,16 @@
ZWNJ\u200C“a” and\u200C‘a’,
escaped space“a” and‘a’,
<paragraph>
+ hyphen -“a”, -‘a’
—“a”,—‘a’
- en dash–“a”–‘a’,
- em dash—“a”—‘a’.
+ en dash –“a”–‘a’,
+ em dash —“a”—‘a’.
+ <paragraph>
+ opening brackets (“a”) (‘a’) [“a”] [‘a’] {“a”} {‘a’}
+ <paragraph>
+ But not if followed by (optional punctuation and) whitespace:
+ “-”, “–”, “—”, “(”, “a[”, “{”
+ ‘-’, ‘–’, ‘—’, ‘((’, ‘[’, ‘{’
"""],
["""\
Quotes and inline-elements:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 00:44:17
|
Revision: 8472
http://sourceforge.net/p/docutils/code/8472
Author: milde
Date: 2020-01-30 00:44:15 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
html5: Use semantic tags <header>, <footer>, <section>, <aside>.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/docutils/writers/html5_polyglot/minimal.css
trunk/docutils/docutils/writers/html5_polyglot/plain.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 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/HISTORY.txt 2020-01-30 00:44:15 UTC (rev 8472)
@@ -32,7 +32,10 @@
- Fix [ 383 ]: Smart quotes around opening and separator characters.
+* docutils/writers/html5_polyglot/
+ - Use semantic HTML5 tags <header>, <footer>, <section>.
+
Release 0.16
============
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/docutils/writers/_html_base.py 2020-01-30 00:44:15 UTC (rev 8472)
@@ -720,6 +720,7 @@
or 'docutils document without title')
self.head.append('<title>%s</title>\n' % self.encode(title))
+ # TODO: use new HTML5 element <main>?
def depart_document(self, node):
self.head_prefix.extend([self.doctype,
self.head_prefix_template %
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:15 UTC (rev 8472)
@@ -189,14 +189,31 @@
def depart_date(self, node):
self.depart_docinfo_item()
- # TODO: use HTML5 <footer> element?
- # def visit_footer(self, node):
- # def depart_footer(self, node):
+ # use HTML5 <footer> element
+ def visit_footer(self, node):
+ self.context.append(len(self.body))
- # TODO: use the new HTML5 element <aside>? (Also for footnote text)
- # def visit_footnote(self, node):
- # def depart_footnote(self, node):
+ def depart_footer(self, node):
+ start = self.context.pop()
+ footer = [self.starttag(node, 'footer')]
+ footer.extend(self.body[start:])
+ footer.append('\n</footer>\n')
+ self.footer.extend(footer)
+ self.body_suffix[:0] = footer
+ del self.body[start:]
+ def visit_header(self, node):
+ self.context.append(len(self.body))
+
+ def depart_header(self, node):
+ start = self.context.pop()
+ header = [self.starttag(node, 'header')]
+ header.extend(self.body[start:])
+ header.append('</header>\n')
+ self.body_prefix.extend(header)
+ self.header.extend(header)
+ del self.body[start:]
+
# Meta tags: 'lang' attribute replaced by 'xml:lang' in XHTML 1.1
# HTML5/polyglot recommends using both
def visit_meta(self, node):
@@ -214,6 +231,22 @@
def depart_organization(self, node):
self.depart_docinfo_item()
- # TODO: use the new HTML5 element <section>?
- # def visit_section(self, node):
- # def depart_section(self, node):
+ # use the new HTML5 element <section>
+ def visit_section(self, node):
+ self.section_level += 1
+ self.body.append(
+ self.starttag(node, 'section'))
+
+ def depart_section(self, node):
+ self.section_level -= 1
+ self.body.append('</section>\n')
+
+ # use the new HTML5 element <aside>
+ def visit_sidebar(self, node):
+ self.body.append(
+ self.starttag(node, 'aside', CLASS='sidebar'))
+ self.in_sidebar = True
+
+ def depart_sidebar(self, node):
+ self.body.append('</aside>\n')
+ self.in_sidebar = False
Modified: trunk/docutils/docutils/writers/html5_polyglot/minimal.css
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/minimal.css 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/docutils/writers/html5_polyglot/minimal.css 2020-01-30 00:44:15 UTC (rev 8472)
@@ -219,7 +219,6 @@
/* Admonitions and System Messages */
div.admonition,
div.system-message,
-div.sidebar,
aside.sidebar {
margin: 1em 1.5em;
border: medium outset;
@@ -230,7 +229,6 @@
}
/* Sidebar */
-div.sidebar,
aside.sidebar {
width: 30%;
max-width: 26em;
@@ -273,10 +271,8 @@
}
/* Document Header and Footer */
-/* div.header, */
-/* header { border-bottom: 1px solid black; } */
-/* div.footer, */
-/* footer { border-top: 1px solid black; } */
+header { border-bottom: 1px solid black; }
+footer { border-top: 1px solid black; }
/* new HTML5 block elements: set display for older browsers */
header, section, footer, aside, nav, main, article, figure {
Modified: trunk/docutils/docutils/writers/html5_polyglot/plain.css
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/plain.css 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/docutils/writers/html5_polyglot/plain.css 2020-01-30 00:44:15 UTC (rev 8472)
@@ -73,9 +73,8 @@
/* ===== */
/* Definition Lists */
-
-/* lists nested in definition lists */
-/* (:only-child is new in CSS 3) */
+/* Indent lists nested in definition lists */
+/* (:only-child is new in CSS 3) */
dd > ul:only-child, dd > ol:only-child { padding-left: 1em; }
/* Description Lists */
@@ -256,12 +255,9 @@
/* Compound Paragraph */
/* Container */
-/* can be styled in a custom stylesheet */
-
/* Document Header and Footer */
-footer, header,
-div.footer, div.header {
+footer, header {
font-size: smaller;
clear: both;
padding: 0.5em 2%;
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-30 00:44:15 UTC (rev 8472)
@@ -43,7 +43,7 @@
nonexistent footnote:<a class="footnote-reference superscript" href="#footnote-6" id="footnote-reference-8">5</a>.</p>
</dd>
</dl>
-<div class="section" id="citations">
+<section id="citations">
<h1>Citations</h1>
<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>
@@ -60,7 +60,7 @@
<dd><p>this footnote is missing in the standard example document.</p>
</dd>
</dl>
+</section>
</div>
-</div>
</body>
</html>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-27 15:14:57 UTC (rev 8471)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:15 UTC (rev 8472)
@@ -18,11 +18,9 @@
<link rel="stylesheet" href="../input/data/math.css" type="text/css" />
</head>
<body>
-<div class="header">
+<header>
<p>Document header</p>
-
-<hr class="header"/>
-</div>
+</header>
<div class="document" id="restructuredtext-test-document">
<span id="doctitle"></span>
<h1 class="title">reStructuredText Test Document</h1>
@@ -164,32 +162,32 @@
<li><p><a class="reference internal" href="#error-handling" id="toc-entry-52"><span class="sectnum">5</span> Error Handling</a></p></li>
</ul>
</div>
-<div class="section" id="structural-elements">
+<section id="structural-elements">
<h1><a class="toc-backref" href="#toc-entry-1"><span class="sectnum">1</span> Structural Elements</a></h1>
-<div class="section" id="section-title">
+<section id="section-title">
<h2 class="with-subtitle"><a class="toc-backref" href="#toc-entry-2"><span class="sectnum">1.1</span> Section Title</a></h2>
<p class="section-subtitle" id="section-subtitle">Section Subtitle</p>
<p>Lone subsections are converted to a section subtitle by a transform
activated with the <span class="docutils literal"><span class="pre">--section-subtitles</span></span> command line option or the
<span class="docutils literal"><span class="pre">sectsubtitle-xform</span></span> configuration value.</p>
-</div>
-<div class="section" id="empty-section">
+</section>
+<section id="empty-section">
<h2><a class="toc-backref" href="#toc-entry-3"><span class="sectnum">1.2</span> Empty Section</a></h2>
-</div>
-<div class="section" id="transitions">
+</section>
+<section id="transitions">
<h2><a class="toc-backref" href="#toc-entry-4"><span class="sectnum">1.3</span> Transitions</a></h2>
<p>Here's a transition:</p>
<hr class="docutils" />
<p>It divides the section. Transitions may also occur between sections:</p>
-</div>
-</div>
+</section>
+</section>
<hr class="docutils" />
-<div class="section" id="body-elements">
+<section id="body-elements">
<h1><a class="toc-backref" href="#toc-entry-5"><span class="sectnum">2</span> Body Elements</a></h1>
-<div class="section" id="paragraphs">
+<section id="paragraphs">
<h2><a class="toc-backref" href="#toc-entry-6"><span class="sectnum">2.1</span> Paragraphs</a></h2>
<p>A paragraph.</p>
-<div class="section" id="inline-markup">
+<section id="inline-markup">
<h3><a class="toc-backref" href="#toc-entry-7"><span class="sectnum">2.1.1</span> Inline Markup</a></h3>
<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
@@ -216,9 +214,9 @@
<span class="docutils literal">This is an example of <span class="pre">--inline-literal</span> <span class="pre">--text,</span> <span class="pre">--including</span> <span class="pre">some--</span> <span class="pre">strangely--hyphenated-words.</span> <span class="pre">Adjust-the-width-of-your-browser-window</span> to see how the text is wrapped. <span class="pre">--</span> <span class="pre">----</span> <span class="pre">--------</span> Now note the spacing between the words of this sentence (words should be grouped in pairs).</span></p>
<p>If the <span class="docutils literal"><span class="pre">--pep-references</span></span> option was supplied, there should be a
live link to PEP 258 here.</p>
-</div>
-</div>
-<div class="section" id="bullet-lists">
+</section>
+</section>
+<section id="bullet-lists">
<h2><a class="toc-backref" href="#toc-entry-8"><span class="sectnum">2.2</span> Bullet Lists</a></h2>
<ul>
<li><p>A bullet list</p>
@@ -244,8 +242,8 @@
</ul>
</li>
</ul>
-</div>
-<div class="section" id="enumerated-lists">
+</section>
+<section id="enumerated-lists">
<h2><a class="toc-backref" href="#toc-entry-9"><span class="sectnum">2.3</span> Enumerated Lists</a></h2>
<ol class="arabic">
<li><p>Arabic numerals.</p>
@@ -280,8 +278,8 @@
</ol>
</li>
</ol>
-</div>
-<div class="section" id="definition-lists">
+</section>
+<section id="definition-lists">
<h2><a class="toc-backref" href="#toc-entry-10"><span class="sectnum">2.4</span> Definition Lists</a></h2>
<dl>
<dt>Term</dt>
@@ -298,8 +296,8 @@
<dd><p>Definition</p>
</dd>
</dl>
-</div>
-<div class="section" id="field-lists">
+</section>
+<section id="field-lists">
<h2><a class="toc-backref" href="#toc-entry-11"><span class="sectnum">2.5</span> Field Lists</a></h2>
<dl class="field-list">
<dt>what</dt>
@@ -318,8 +316,8 @@
doesn't get stripped away.)</p>
</dd>
</dl>
-</div>
-<div class="section" id="option-lists">
+</section>
+<section id="option-lists">
<h2><a class="toc-backref" href="#toc-entry-12"><span class="sectnum">2.6</span> Option Lists</a></h2>
<p>For listing command-line options:</p>
<dl class="option-list">
@@ -357,8 +355,8 @@
</dl>
<p>There must be at least two spaces between the option and the
description.</p>
-</div>
-<div class="section" id="literal-blocks">
+</section>
+<section id="literal-blocks">
<h2><a class="toc-backref" href="#toc-entry-13"><span class="sectnum">2.7</span> Literal Blocks</a></h2>
<p>Literal blocks are indicated with a double-colon ("::") at the end of
the preceding paragraph (over there <span class="docutils literal"><span class="pre">--></span></span>). They can be indented:</p>
@@ -370,8 +368,8 @@
<pre class="literal-block">>> Great idea!
>
> Why didn't I think of that?</pre>
-</div>
-<div class="section" id="line-blocks">
+</section>
+<section id="line-blocks">
<h2><a class="toc-backref" href="#toc-entry-14"><span class="sectnum">2.8</span> Line Blocks</a></h2>
<p>This section tests line blocks. Line blocks are body elements which
consist of lines and other line blocks. Nested line blocks cause
@@ -444,8 +442,8 @@
<div class="line">w.</div>
<div class="line"><br /></div>
</div>
-</div>
-<div class="section" id="block-quotes">
+</section>
+<section id="block-quotes">
<h2><a class="toc-backref" href="#toc-entry-15"><span class="sectnum">2.9</span> Block Quotes</a></h2>
<p>Block quotes consist of indented body elements:</p>
<blockquote>
@@ -463,8 +461,8 @@
<p>ReStructuredText est un langage de balisage léger utilisé
notamment dans la documentation du langage Python.</p>
</blockquote>
-</div>
-<div class="section" id="doctest-blocks">
+</section>
+<section id="doctest-blocks">
<h2><a class="toc-backref" href="#toc-entry-16"><span class="sectnum">2.10</span> Doctest Blocks</a></h2>
<pre class="code python doctest">>>> print 'Python-specific usage examples; begun with ">>>"'
Python-specific usage examples; begun with ">>>"
@@ -471,8 +469,8 @@
>>> print '(cut and pasted from interactive Python sessions)'
(cut and pasted from interactive Python sessions)
</pre>
-</div>
-<div class="section" id="footnotes">
+</section>
+<section id="footnotes">
<h2><a class="toc-backref" href="#toc-entry-17"><span class="sectnum">2.11</span> Footnotes</a></h2>
<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>
@@ -504,8 +502,8 @@
nonexistent footnote: <a href="#system-message-2"><span class="problematic" id="footnote-reference-8">[5]_</span></a>.</p>
</dd>
</dl>
-</div>
-<div class="section" id="citations">
+</section>
+<section id="citations">
<h2><a class="toc-backref" href="#toc-entry-18"><span class="sectnum">2.12</span> Citations</a></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-2">2</a>)</span></dt>
@@ -515,8 +513,8 @@
</dl>
<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="citation-reference-2">[CIT2002]</a>, and a <a href="#system-message-3"><span class="problematic" id="citation-reference-3">[nonexistent]_</span></a>
citation.</p>
-</div>
-<div class="section" id="targets">
+</section>
+<section id="targets">
<span id="another-target"></span><h2><a class="toc-backref" href="#toc-entry-19"><span class="sectnum">2.13</span> Targets</a></h2>
<p id="example">This paragraph is pointed to by the explicit "example" target. A
reference can be found under <a class="reference internal" href="#inline-markup">Inline Markup</a>, above. <a class="reference internal" href="#inline-hyperlink-targets">Inline
@@ -529,20 +527,20 @@
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
error.</p>
-<div class="section" id="duplicate-target-names">
+<section id="duplicate-target-names">
<h3><a class="toc-backref" href="#toc-entry-20"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></h3>
<p>Duplicate names in section headers or other implicit targets will
generate "info" (level-1) system messages. Duplicate names in
explicit targets will generate "warning" (level-2) system messages.</p>
-</div>
-<div class="section" id="duplicate-target-names-1">
+</section>
+<section id="duplicate-target-names-1">
<h3><a class="toc-backref" href="#toc-entry-21"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></h3>
<p>Since there are two "Duplicate Target Names" section headers, we
cannot uniquely refer to either of them by name. If we try to (like
this: <a href="#system-message-5"><span class="problematic" id="problematic-3">`Duplicate Target Names`_</span></a>), an error is generated.</p>
-</div>
-</div>
-<div class="section" id="directives">
+</section>
+</section>
+<section id="directives">
<h2><a class="toc-backref" href="#toc-entry-22"><span class="sectnum">2.14</span> Directives</a></h2>
<div class="contents local topic" id="contents">
<ul class="auto-toc simple">
@@ -560,13 +558,13 @@
<p>These are just a sample of the many reStructuredText Directives. For
others, please see
<a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html</a>.</p>
-<div class="section" id="document-parts">
+<section id="document-parts">
<h3><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">2.14.1</span> Document Parts</a></h3>
<p>An example of the "contents" directive can be seen above this section
(a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the
document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p>
-</div>
-<div class="section" id="images-and-figures">
+</section>
+<section id="images-and-figures">
<h3><a class="toc-backref" href="#toc-entry-54"><span class="sectnum">2.14.2</span> Images and Figures</a></h3>
<p>An image directive (also clickable -- a hyperlink reference):</p>
<a class="reference internal image-reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" class="class1 class2" src="../../../docs/user/rst/images/title.png" /></a>
@@ -747,8 +745,8 @@
</tr>
</tbody>
</table>
-</div>
-<div class="section" id="admonitions">
+</section>
+<section id="admonitions">
<h3><a class="toc-backref" href="#toc-entry-55"><span class="sectnum">2.14.3</span> Admonitions</a></h3>
<div class="admonition attention">
<p class="admonition-title">Attention!</p>
@@ -796,11 +794,11 @@
<p class="admonition-title">And, by the way...</p>
<p>You can make up your own admonition too.</p>
</div>
-</div>
-<div class="section" id="topics-sidebars-and-rubrics">
+</section>
+<section id="topics-sidebars-and-rubrics">
<h3><a class="toc-backref" href="#toc-entry-56"><span class="sectnum">2.14.4</span> Topics, Sidebars, and Rubrics</a></h3>
<p><em>Sidebars</em> are like miniature, parallel documents.</p>
-<div class="sidebar">
+<aside class="sidebar">
<p class="sidebar-title">Sidebar Title</p>
<p class="sidebar-subtitle">Optional Subtitle</p>
<p>This is a sidebar. It is for text outside the flow of the main
@@ -808,7 +806,7 @@
<p class="rubric">This is a rubric inside a sidebar</p>
<p>Sidebars often appear beside the main text with a border and a different
background or font color.</p>
-</div>
+</aside>
<p>A <em>topic</em> is like a block quote with a title, or a self-contained section
with no subsections.</p>
<div class="topic">
@@ -820,8 +818,8 @@
<p class="rubric">This is a rubric</p>
<p>Topics and rubrics can be used at places where a <a class="reference internal" href="#section-title">section title</a> is not
allowed (e.g. inside a directive).</p>
-</div>
-<div class="section" id="target-footnotes">
+</section>
+<section id="target-footnotes">
<h3><a class="toc-backref" href="#toc-entry-57"><span class="sectnum">2.14.5</span> Target Footnotes</a></h3>
<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>
@@ -849,12 +847,12 @@
<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>
-</div>
-<div class="section" id="replacement-text">
+</section>
+<section id="replacement-text">
<h3><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.6</span> Replacement Text</a></h3>
<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>
-</div>
-<div class="section" id="compound-paragraph">
+</section>
+<section id="compound-paragraph">
<h3><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.7</span> Compound Paragraph</a></h3>
<p>The <em>compound</em> directive is used to create a "compound paragraph", which
is a single logical paragraph containing multiple physical body
@@ -964,8 +962,8 @@
</div>
<p class="compound-last">and the final paragraph of the compound 7.</p>
</div>
-</div>
-<div class="section" id="parsed-literal-blocks">
+</section>
+<section id="parsed-literal-blocks">
<h3><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.8</span> Parsed Literal Blocks</a></h3>
<pre class="literal-block">This is a parsed literal block.
This line is indented. The next line is blank.
@@ -974,8 +972,8 @@
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>
-</div>
-<div class="section" id="code">
+</section>
+<section id="code">
<h3><a class="toc-backref" href="#toc-entry-61"><span class="sectnum">2.14.9</span> Code</a></h3>
<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>
@@ -999,15 +997,15 @@
as a code block, here the rst file <span class="docutils literal">header_footer.txt</span> with line numbers:</p>
<pre class="code rst literal-block"><code><span class="ln">1 </span>.. header:: Document header
<span class="ln">2 </span>.. footer:: Document footer</code></pre>
-</div>
-</div>
-<div class="section" id="substitution-definitions">
+</section>
+</section>
+<section id="substitution-definitions">
<h2><a class="toc-backref" href="#toc-entry-32"><span class="sectnum">2.15</span> Substitution Definitions</a></h2>
<p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
<p>A Unicode example:</p>
<p>(Substitution definitions are not visible in the HTML source.)</p>
-</div>
-<div class="section" id="comments">
+</section>
+<section id="comments">
<h2><a class="toc-backref" href="#toc-entry-33"><span class="sectnum">2.16</span> Comments</a></h2>
<p>Here's one:</p>
<!-- Comments begin with two dots and a space. Anything may
@@ -1018,21 +1016,21 @@
Comments may contain non-ASCII characters: ä ö ü æ ø å -->
<p>(View the HTML source to see the comment.)</p>
-</div>
-<div class="section" id="raw-text">
+</section>
+<section id="raw-text">
<h2><a class="toc-backref" href="#toc-entry-34"><span class="sectnum">2.17</span> Raw text</a></h2>
<p>This does not necessarily look nice, because there may be missing white space.</p>
<p>It's just there to freeze the behavior.</p>
A test.Second test.<div class="myclass">Another test with myclass set.</div><p>This is the <span class="myrawroleclass">fourth test</span> with myrawroleclass set.</p>
-Fifth test in HTML.<br />Line two.</div>
-<div class="section" id="container">
+Fifth test in HTML.<br />Line two.</section>
+<section id="container">
<h2><a class="toc-backref" href="#toc-entry-35"><span class="sectnum">2.18</span> Container</a></h2>
<div class="custom docutils container">
<p>paragraph 1</p>
<p>paragraph 2</p>
</div>
-</div>
-<div class="section" id="colspanning-tables">
+</section>
+<section id="colspanning-tables">
<h2><a class="toc-backref" href="#toc-entry-36"><span class="sectnum">2.19</span> Colspanning tables</a></h2>
<p>This table has a cell spanning two columns:</p>
<table>
@@ -1069,8 +1067,8 @@
</tr>
</tbody>
</table>
-</div>
-<div class="section" id="rowspanning-tables">
+</section>
+<section id="rowspanning-tables">
<h2><a class="toc-backref" href="#toc-entry-37"><span class="sectnum">2.20</span> Rowspanning tables</a></h2>
<p>Here's a table with cells spanning several rows:</p>
<table>
@@ -1102,8 +1100,8 @@
</tr>
</tbody>
</table>
-</div>
-<div class="section" id="complex-tables">
+</section>
+<section id="complex-tables">
<h2><a class="toc-backref" href="#toc-entry-38"><span class="sectnum">2.21</span> Complex tables</a></h2>
<p>Here's a complex table, which should test all features.</p>
<table>
@@ -1151,8 +1149,8 @@
</tr>
</tbody>
</table>
-</div>
-<div class="section" id="list-tables">
+</section>
+<section id="list-tables">
<h2><a class="toc-backref" href="#toc-entry-39"><span class="sectnum">2.22</span> List Tables</a></h2>
<p>Here's a list table exercising all features:</p>
<table class="colwidths-given test" style="width: 40em">
@@ -1198,8 +1196,8 @@
</tr>
</tbody>
</table>
-</div>
-<div class="section" id="custom-roles">
+</section>
+<section id="custom-roles">
<h2><a class="toc-backref" href="#toc-entry-40"><span class="sectnum">2.23</span> Custom Roles</a></h2>
<ul>
<li><p>A role based on an existing role.</p>
@@ -1226,11 +1224,11 @@
<p><span class="green sc" lang="en-gb">British colourful text in small-caps</span>.</p>
</li>
</ul>
-</div>
-</div>
-<div class="section" id="html-specific">
+</section>
+</section>
+<section id="html-specific">
<h1><a class="toc-backref" href="#toc-entry-41"><span class="sectnum">3</span> HTML specific</a></h1>
-<div class="section" id="svg-images">
+<section id="svg-images">
<h2><a class="toc-backref" href="#toc-entry-42"><span class="sectnum">3.1</span> SVG Images</a></h2>
<img alt="../../../docs/user/rst/images/biohazard.svg" class="align-left" src="../../../docs/user/rst/images/biohazard.svg" style="width: 48px; height: 48px;" />
<p>Scalable vector graphics (SVG) images are the only standards-compliable way
@@ -1314,8 +1312,8 @@
<p class="caption"><strong>Figure:</strong> SVG image in a figure.</p>
</div>
</blockquote>
-</div>
-<div class="section" id="swf-images">
+</section>
+<section id="swf-images">
<h2><a class="toc-backref" href="#toc-entry-43"><span class="sectnum">3.2</span> SWF Images</a></h2>
<p>Shockwave Flash is an image/movie format that most modern web browsers
support via a plugin. It is sometimes blocked due to privacy/security
@@ -1326,8 +1324,8 @@
[biohazard.swf]</object>
<p>An SWF image in a 4 cm x 2 em box, left aligned.</p>
<p>An inline SWF image <object data="../../../docs/user/rst/images/biohazard.swf" style="width: 0.8em; height: 0.8em;" type="application/x-shockwave-flash">inline-swf</object> scaled to 0.8 em x 0.8 em.</p>
-</div>
-<div class="section" id="text-level-semantics">
+</section>
+<section id="text-level-semantics">
<h2><a class="toc-backref" href="#toc-entry-44"><span class="sectnum">3.3</span> Text-level semantics</a></h2>
<p><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-13" id="footnote-reference-27">13</a> and their
reStructuredText equivalents.</p>
@@ -1531,8 +1529,8 @@
</blockquote>
</dd>
</dl>
-</div>
-<div class="section" id="indicating-edits">
+</section>
+<section id="indicating-edits">
<h2><a class="toc-backref" href="#toc-entry-45"><span class="sectnum">3.4</span> Indicating Edits</a></h2>
<p><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-14" id="footnote-reference-28">14</a> and their
reStructuredText equivalents.</p>
@@ -1566,9 +1564,9 @@
roles to make sense.</p>
</dd>
</dl>
-</div>
-</div>
-<div class="section" id="changes-to-the-html4css1-writer">
+</section>
+</section>
+<section id="changes-to-the-html4css1-writer">
<h1><a class="toc-backref" href="#toc-entry-46"><span class="sectnum">4</span> Changes to the html4css1 writer</a></h1>
<ul class="simple">
<li><p>Use only meta keywords recognized by HTML 5.</p></li>
@@ -1579,7 +1577,7 @@
space.</p></li>
<li><p>Put subtitles in <p> elements.</p></li>
</ul>
-<div class="section" id="field-list-handling">
+<section id="field-list-handling">
<h2><a class="toc-backref" href="#toc-entry-47"><span class="sectnum">4.1</span> Field list handling</a></h2>
<p>The following list demonstrates the problems with the html4css1
approach: the <cite>field-name-limit</cite> setting is given in "number of
@@ -1622,12 +1620,12 @@
<dd><p>must not ...
[truncated message content] |
|
From: <mi...@us...> - 2020-01-30 00:44:29
|
Revision: 8473
http://sourceforge.net/p/docutils/code/8473
Author: milde
Date: 2020-01-30 00:44:27 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
html5: Use semantic tags <figure> and <figcaption>.
Modified Paths:
--------------
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:15 UTC (rev 8472)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:27 UTC (rev 8473)
@@ -159,6 +159,7 @@
def visit_acronym(self, node):
# @@@ implementation incomplete ("title" attribute)
self.body.append(self.starttag(node, 'abbr', ''))
+
def depart_acronym(self, node):
self.body.append('</abbr>')
@@ -167,11 +168,20 @@
def visit_authors(self, node):
self.visit_docinfo_item(node, 'authors', meta=False)
for subnode in node:
- self.add_meta('<meta name="author" content="%s" />\n' %
+ self.add_meta('<meta name="author" content="%s" />\n' %
self.attval(subnode.astext()))
+
def depart_authors(self, node):
self.depart_docinfo_item()
+
+ # don't add 'caption' class value
+ def visit_caption(self, node):
+ self.body.append('<figcaption>\n')
+ self.body.append(self.starttag(node, 'p', ''))
+ def depart_caption(self, node):
+ self.body.append('</p>\n')
+
# no standard meta tag name in HTML5, use dcterms.rights
# see https://wiki.whatwg.org/wiki/MetaExtensions
def visit_copyright(self, node):
@@ -178,6 +188,7 @@
self.visit_docinfo_item(node, 'copyright', meta=False)
self.add_meta('<meta name="dcterms.rights" content="%s" />\n'
% self.attval(node.astext()))
+
def depart_copyright(self, node):
self.depart_docinfo_item()
@@ -186,9 +197,24 @@
self.visit_docinfo_item(node, 'date', meta=False)
self.add_meta('<meta name="dcterms.date" content="%s" />\n'
% self.attval(node.astext()))
+
def depart_date(self, node):
self.depart_docinfo_item()
+ # use new HTML5 <figure> and <figcaption> elements
+ def visit_figure(self, node):
+ atts = {}
+ if node.get('width'):
+ atts['style'] = 'width: %s' % node['width']
+ if node.get('align'):
+ atts['class'] = "align-" + node['align']
+ self.body.append(self.starttag(node, 'figure', **atts))
+
+ def depart_figure(self, node):
+ if len(node) > 1:
+ self.body.append('</figcaption>\n')
+ self.body.append('</figure>\n')
+
# use HTML5 <footer> element
def visit_footer(self, node):
self.context.append(len(self.body))
@@ -202,6 +228,7 @@
self.body_suffix[:0] = footer
del self.body[start:]
+ # use HTML5 <header> element
def visit_header(self, node):
self.context.append(len(self.body))
@@ -213,7 +240,17 @@
self.body_prefix.extend(header)
self.header.extend(header)
del self.body[start:]
+
+ # place inside HTML5 <figcaption> element (together with caption)
+ def visit_legend(self, node):
+ if not isinstance(node.parent[1], nodes.caption):
+ self.body.append('<figcaption>\n')
+ self.body.append(self.starttag(node, 'div', CLASS='legend'))
+ def depart_legend(self, node):
+ self.body.append('</div>\n')
+ # <figcaption> closed in visit_figure()
+
# Meta tags: 'lang' attribute replaced by 'xml:lang' in XHTML 1.1
# HTML5/polyglot recommends using both
def visit_meta(self, node):
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:15 UTC (rev 8472)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:27 UTC (rev 8473)
@@ -595,9 +595,10 @@
<p>A <em>figure</em> is an image with a caption and/or a legend. With page-based output
media, figures might float to a different position if this helps the page
layout.</p>
-<div class="figclass1 figclass2 figure">
+<figure class="figclass1 figclass2">
<img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/title.png" style="width: 258px;" />
-<p class="caption">Plaintext markup syntax and parser system.</p>
+<figcaption>
+<p>Plaintext markup syntax and parser system.</p>
<div class="legend">
<table>
<colgroup>
@@ -618,40 +619,47 @@
</table>
<p>This paragraph is also part of the legend.</p>
</div>
-</div>
+</figcaption>
+</figure>
<p>A left-aligned figure:</p>
-<div class="figclass1 figclass2 figure align-left" style="width: 70%">
+<figure class="figclass1 figclass2 align-left" style="width: 70%">
<img alt="reStructuredText, the markup syntax" class="class1 class2" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
-<p class="caption">This is the caption.</p>
+<figcaption>
+<p>This is the caption.</p>
<div class="legend">
<p>This is the legend.</p>
<p>The legend may consist of several paragraphs.</p>
</div>
-</div>
+</figcaption>
+</figure>
<p>This paragraph might flow around the figure.</p>
<p>The specific behavior depends upon the style sheet and the browser or
rendering software used.</p>
<p>A centered figure:</p>
-<div class="figure align-center">
+<figure class="align-center">
<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
-<p class="caption">This is the caption.</p>
+<figcaption>
+<p>This is the caption.</p>
<div class="legend">
<p>This is the legend.</p>
<p>The legend may consist of several paragraphs.</p>
</div>
-</div>
+</figcaption>
+</figure>
<p>This paragraph might flow around the figure.</p>
<p>The specific behavior depends upon the style sheet and the browser or
rendering software used.</p>
<p>A right-aligned figure:</p>
-<div class="figure align-right">
+<figure class="align-right">
<img alt="../../../docs/user/rst/images/biohazard.png" src="../../../docs/user/rst/images/biohazard.png" style="width: 40px;" />
-<p class="caption">This is the caption.</p>
+<figcaption>
+<p>This is the caption.</p>
<div class="legend">
<p>This is the legend.</p>
<p>The legend may consist of several paragraphs.</p>
</div>
-</div>
+</figcaption>
+</figure>
<p>This paragraph might flow around the figure. The specific behavior depends
upon the style sheet and the browser or rendering software used.</p>
<p>Tables may be given titles and additional arguments with the <em>table</em>
@@ -1307,10 +1315,12 @@
</ul>
<p>SVG images can also be put in figures:</p>
<blockquote>
-<div class="figure align-center">
+<figure class="align-center">
<img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 290px; height: 28px;" />
-<p class="caption"><strong>Figure:</strong> SVG image in a figure.</p>
-</div>
+<figcaption>
+<p><strong>Figure:</strong> SVG image in a figure.</p>
+</figcaption>
+</figure>
</blockquote>
</section>
<section id="swf-images">
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2020-01-30 00:44:15 UTC (rev 8472)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2020-01-30 00:44:27 UTC (rev 8473)
@@ -423,7 +423,8 @@
:simple field list with loooong field: names
""",
"""\
-{'fragment': '''<p>Not a docinfo.</p>
+{'fragment': '''\
+<p>Not a docinfo.</p>
<dl class="field-list simple">
<dt>This is</dt>
<dd><p>a</p>
@@ -432,7 +433,8 @@
<dd><p>names</p>
</dd>
</dl>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''\
+<div class="document">
<p>Not a docinfo.</p>
<dl class="field-list simple">
<dt>This is</dt>
@@ -445,9 +447,119 @@
</div>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
+["""\
+.. figure:: dummy.png
+
+ The figure's caption.
+
+ A legend.
+
+ The legend's second paragraph.
+""",
+"""\
+{'fragment': '''\
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+<figcaption>
+<p>The figure's caption.</p>
+<div class="legend">
+<p>A legend.</p>
+<p>The legend's second paragraph.</p>
+</div>
+</figcaption>
+</figure>\\n''',
+ 'html_body': '''\
+<div class="document">
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+<figcaption>
+<p>The figure's caption.</p>
+<div class="legend">
+<p>A legend.</p>
+<p>The legend's second paragraph.</p>
+</div>
+</figcaption>
+</figure>
+</div>\\n''',
+ 'html_head': '''...<title><string></title>\\n'''}
+"""],
+["""\
+.. figure:: dummy.png
+
+ The figure's caption, no legend.
+""",
+"""\
+{'fragment': '''\
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+<figcaption>
+<p>The figure's caption, no legend.</p>
+</figcaption>
+</figure>\\n''',
+ 'html_body': '''\
+<div class="document">
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+<figcaption>
+<p>The figure's caption, no legend.</p>
+</figcaption>
+</figure>
+</div>\\n''',
+ 'html_head': '''...<title><string></title>\\n'''}
+"""],
+["""\
+.. figure:: dummy.png
+
+ ..
+
+ A legend without caption.
+""",
+"""\
+{'fragment': '''\
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+<figcaption>
+<div class="legend">
+<p>A legend without caption.</p>
+</div>
+</figcaption>
+</figure>\\n''',
+ 'html_body': '''\
+<div class="document">
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+<figcaption>
+<div class="legend">
+<p>A legend without caption.</p>
+</div>
+</figcaption>
+</figure>
+</div>\\n''',
+ 'html_head': '''...<title><string></title>\\n'''}
+"""],
])
+["""\
+.. figure:: dummy.png
+No caption nor legend.
+""",
+"""\
+{'fragment': '''\
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+</figure>
+<p>No caption nor legend.</p>\\n''',
+ 'html_body': '''\
+<div class="document">
+<figure>
+<img alt="dummy.png" src="dummy.png" />
+</figure>
+<p>No caption nor legend.</p>
+</div>\\n''',
+ 'html_head': '''...<title><string></title>\\n'''}
+"""],
+
if __name__ == '__main__':
import unittest
unittest.main(defaultTest='suite')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 00:44:43
|
Revision: 8474
http://sourceforge.net/p/docutils/code/8474
Author: milde
Date: 2020-01-30 00:44:40 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
Use new HTML5 element <main>.
Modified Paths:
--------------
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/test/functional/expected/footnotes_html5.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2020-01-30 00:44:27 UTC (rev 8473)
+++ trunk/docutils/docutils/writers/_html_base.py 2020-01-30 00:44:40 UTC (rev 8474)
@@ -720,7 +720,6 @@
or 'docutils document without title')
self.head.append('<title>%s</title>\n' % self.encode(title))
- # TODO: use new HTML5 element <main>?
def depart_document(self, node):
self.head_prefix.extend([self.doctype,
self.head_prefix_template %
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:27 UTC (rev 8473)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:40 UTC (rev 8474)
@@ -201,6 +201,36 @@
def depart_date(self, node):
self.depart_docinfo_item()
+ def visit_document(self, node):
+ title = (node.get('title', '') or os.path.basename(node['source'])
+ or 'untitled Docutils document')
+ self.head.append('<title>%s</title>\n' % self.encode(title))
+
+ def depart_document(self, node):
+ self.head_prefix.extend([self.doctype,
+ self.head_prefix_template %
+ {'lang': self.settings.language_code}])
+ self.html_prolog.append(self.doctype)
+ self.meta.insert(0, self.content_type % self.settings.output_encoding)
+ self.head.insert(0, self.content_type % self.settings.output_encoding)
+ if 'name="dcterms.' in ''.join(self.meta):
+ self.head.append(
+ '<link rel="schema.dcterms" href="http://purl.org/dc/terms/">')
+ if self.math_header:
+ if self.math_output == 'mathjax':
+ self.head.extend(self.math_header)
+ else:
+ self.stylesheet.extend(self.math_header)
+ # skip content-type meta tag with interpolated charset value:
+ self.html_head.extend(self.head[1:])
+ self.body_prefix.append(self.starttag(node, 'main'))
+ self.body_suffix.insert(0, '</main>\n')
+ self.fragment.extend(self.body) # self.fragment is the "naked" body
+ self.html_body.extend(self.body_prefix[1:] + self.body_pre_docinfo
+ + self.docinfo + self.body
+ + self.body_suffix[:-1])
+ assert not self.context, 'len(context) = %s' % len(self.context)
+
# use new HTML5 <figure> and <figcaption> elements
def visit_figure(self, node):
atts = {}
Modified: trunk/docutils/test/functional/expected/footnotes_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-30 00:44:27 UTC (rev 8473)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2020-01-30 00:44:40 UTC (rev 8474)
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
</head>
<body>
-<div class="document" id="test-footnote-and-citation-rendering">
+<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
@@ -61,6 +61,6 @@
</dd>
</dl>
</section>
-</div>
+</main>
</body>
</html>
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2020-01-30 00:44:27 UTC (rev 8473)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2020-01-30 00:44:40 UTC (rev 8474)
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
</head>
<body>
-<div class="document" id="mathematics">
+<main id="mathematics">
<h1 class="title">Mathematics</h1>
<p>Docutils supports inline math with the prefix or postfix <span class="docutils literal">:math:</span>
@@ -215,6 +215,6 @@
\end{cases}
</pre>
</div>
-</div>
+</main>
</body>
</html>
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:27 UTC (rev 8473)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:40 UTC (rev 8474)
@@ -21,7 +21,7 @@
<header>
<p>Document header</p>
</header>
-<div class="document" id="restructuredtext-test-document">
+<main id="restructuredtext-test-document">
<span id="doctitle"></span>
<h1 class="title">reStructuredText Test Document</h1>
<p class="subtitle" id="examples-of-syntax-constructs"><span id="subtitle"></span>Examples of Syntax Constructs</p>
@@ -1830,7 +1830,7 @@
<p>Duplicate target name, cannot be used as a unique reference: "duplicate target names".</p>
</div>
</section>
-</div>
+</main>
<footer>
<p>Document footer</p>
<p><a class="reference external" href="http://www.w3.org/TR/html5/"><img alt="Conforms to HTML 5" src="http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://validator.w3.org/check?uri=referer"><img alt="Check validity!" src="https://www.w3.org/Icons/ValidatorSuite/vs-blue-190.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://jigsaw.w3.org/css-validator/check/referer"><img alt="Valid CSS 2.1!" src="http://jigsaw.w3.org/css-validator/images/vcss" style="width: 88px; height: 31px;" /></a></p>
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2020-01-30 00:44:27 UTC (rev 8473)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2020-01-30 00:44:40 UTC (rev 8474)
@@ -54,9 +54,9 @@
""",
"""\
{'fragment': '''<p>Simple String</p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Simple String</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -64,9 +64,9 @@
""",
"""\
{'fragment': '''<p>Simple String with <em>markup</em></p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Simple String with <em>markup</em></p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -74,9 +74,9 @@
""",
"""\
{'fragment': '''<p>Simple String with an even simpler <span class="docutils literal">inline literal</span></p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Simple String with an even simpler <span class="docutils literal">inline literal</span></p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -86,9 +86,9 @@
""",
"""\
{'fragment': '''<p>A simple <a class="reference external" href="http://www.test.com/test_url">anonymous reference</a></p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>A simple <a class="reference external" href="http://www.test.com/test_url">anonymous reference</a></p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -99,10 +99,10 @@
"""\
{'fragment': '''<p>One paragraph.</p>
<p>Two paragraphs.</p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>One paragraph.</p>
<p>Two paragraphs.</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -114,10 +114,10 @@
"""\
{'fragment': '''<p>A simple <a class="reference external" href="http://www.test.com/test_url">named reference</a> with stuff in between the
reference and the target.</p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>A simple <a class="reference external" href="http://www.test.com/test_url">named reference</a> with stuff in between the
reference and the target.</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -150,7 +150,7 @@
<p>And even more stuff</p>
</section>
</section>\\n''',
- 'html_body': '''<div class="document" id="title">
+ 'html_body': '''<main id="title">
<h1 class="title">Title</h1>
<p class="subtitle" id="subtitle">Subtitle</p>
<p>Some stuff</p>
@@ -162,7 +162,7 @@
<p>And even more stuff</p>
</section>
</section>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title>Title</title>\\n''',
'html_subtitle': '''<p class="subtitle" id="subtitle">Subtitle</p>\\n''',
'html_title': '''<h1 class="title">Title</h1>\\n''',
@@ -184,7 +184,7 @@
<dd class="author"><p>me</p></dd>
</dl>\\n''',
'fragment': '''<p>Some stuff</p>\\n''',
- 'html_body': '''<div class="document" id="title">
+ 'html_body': '''<main id="title">
<h1 class="title">Title</h1>
<dl class="docinfo simple">
<dt class="author">Author</dt>
@@ -191,7 +191,7 @@
<dd class="author"><p>me</p></dd>
</dl>
<p>Some stuff</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title>Title</title>
<meta name="author" content="me" />\\n''',
'html_title': '''<h1 class="title">Title</h1>\\n''',
@@ -208,9 +208,9 @@
""",
"""\
{'fragment': '''<p>Simple String</p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Simple String</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -218,9 +218,9 @@
""",
"""\
{'fragment': '''<p>Simple String with <em>markup</em></p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Simple String with <em>markup</em></p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -228,9 +228,9 @@
""",
"""\
{'fragment': '''<p>Simple String with an even simpler <span class="docutils literal">inline literal</span></p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Simple String with an even simpler <span class="docutils literal">inline literal</span></p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -240,9 +240,9 @@
""",
"""\
{'fragment': '''<p>A simple <a class="reference external" href="http://www.test.com/test_url">anonymous reference</a></p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>A simple <a class="reference external" href="http://www.test.com/test_url">anonymous reference</a></p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -254,10 +254,10 @@
"""\
{'fragment': '''<p>A simple <a class="reference external" href="http://www.test.com/test_url">named reference</a> with stuff in between the
reference and the target.</p>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>A simple <a class="reference external" href="http://www.test.com/test_url">named reference</a> with stuff in between the
reference and the target.</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -296,7 +296,7 @@
</section>
</section>
</section>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<section id="title">
<h1>Title</h1>
<section id="not-a-subtitle">
@@ -312,7 +312,7 @@
</section>
</section>
</section>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -324,12 +324,12 @@
<li><p>bullet</p></li>
<li><p>list</p></li>
</ul>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<ul class="simple">
<li><p>bullet</p></li>
<li><p>list</p></li>
</ul>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -357,7 +357,7 @@
</tr>
</tbody>
</table>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<table class="align-right">
<colgroup>
<col style="width: 50%%" />
@@ -372,7 +372,7 @@
</tr>
</tbody>
</table>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -399,7 +399,7 @@
<dd><p>list</p>
</dd>
</dl>\\n''',
- 'html_body': '''<div class="document">
+ 'html_body': '''<main>
<p>Not a docinfo.</p>
<dl class="field-list simple">
<dt>This</dt>
@@ -413,7 +413,7 @@
<dd><p>list</p>
</dd>
</dl>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -434,7 +434,7 @@
</dd>
</dl>\\n''',
'html_body': '''\
-<div class="document">
+<main>
<p>Not a docinfo.</p>
<dl class="field-list simple">
<dt>This is</dt>
@@ -444,7 +444,7 @@
<dd><p>names</p>
</dd>
</dl>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -469,7 +469,7 @@
</figcaption>
</figure>\\n''',
'html_body': '''\
-<div class="document">
+<main>
<figure>
<img alt="dummy.png" src="dummy.png" />
<figcaption>
@@ -480,7 +480,7 @@
</div>
</figcaption>
</figure>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -497,7 +497,7 @@
</figcaption>
</figure>\\n''',
'html_body': '''\
-<div class="document">
+<main>
<figure>
<img alt="dummy.png" src="dummy.png" />
<figcaption>
@@ -504,7 +504,7 @@
<p>The figure's caption, no legend.</p>
</figcaption>
</figure>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
["""\
@@ -525,7 +525,7 @@
</figcaption>
</figure>\\n''',
'html_body': '''\
-<div class="document">
+<main>
<figure>
<img alt="dummy.png" src="dummy.png" />
<figcaption>
@@ -534,7 +534,7 @@
</div>
</figcaption>
</figure>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
])
@@ -550,12 +550,12 @@
</figure>
<p>No caption nor legend.</p>\\n''',
'html_body': '''\
-<div class="document">
+<main>
<figure>
<img alt="dummy.png" src="dummy.png" />
</figure>
<p>No caption nor legend.</p>
-</div>\\n''',
+</main>\\n''',
'html_head': '''...<title><string></title>\\n'''}
"""],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 00:44:53
|
Revision: 8475
http://sourceforge.net/p/docutils/code/8475
Author: milde
Date: 2020-01-30 00:44:51 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
html5: use semantic text-level tags
if matching class value found in "inline"
and "inline-literal" emements.
Modified Paths:
--------------
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/test/functional/expected/standalone_rst_html5.html
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:40 UTC (rev 8474)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:51 UTC (rev 8475)
@@ -173,7 +173,7 @@
def depart_authors(self, node):
self.depart_docinfo_item()
-
+
# don't add 'caption' class value
def visit_caption(self, node):
self.body.append('<figcaption>\n')
@@ -270,7 +270,26 @@
self.body_prefix.extend(header)
self.header.extend(header)
del self.body[start:]
-
+
+ # use HTML text-level tags if matching class value found
+ supported_inline_tags = set(('small', 's', 'q', 'dfn', 'var', 'samp',
+ 'kbd', 'i', 'b', 'u', 'mark', 'bdi'))
+ def visit_inline(self, node):
+ # If there is exactly one of the "supported inline tags" in
+ # the list of class values, use it as tag name:
+ classes = node.get('classes', [])
+ tags = [cls for cls in classes
+ if cls in self.supported_inline_tags]
+ if len(tags) == 1:
+ node.html5tagname = tags[0]
+ classes.remove(tags[0])
+ else:
+ node.html5tagname = 'span'
+ self.body.append(self.starttag(node, node.html5tagname, ''))
+
+ def depart_inline(self, node):
+ self.body.append('</%s>' % node.html5tagname)
+
# place inside HTML5 <figcaption> element (together with caption)
def visit_legend(self, node):
if not isinstance(node.parent[1], nodes.caption):
@@ -280,7 +299,47 @@
def depart_legend(self, node):
self.body.append('</div>\n')
# <figcaption> closed in visit_figure()
-
+
+ # use HTML text-level tags if matching class value found
+ def visit_literal(self, node):
+ # special case: "code" role
+ classes = node.get('classes', [])
+ if 'code' in classes:
+ # filter 'code' from class arguments
+ node['classes'] = [cls for cls in classes if cls != 'code']
+ self.body.append(self.starttag(node, 'code', ''))
+ return
+
+ classes = node.get('classes', [])
+ tags = [cls for cls in classes
+ if cls in self.supported_inline_tags]
+ if len(tags) == 1:
+ tagname = tags[0]
+ classes.remove(tags[0])
+ else:
+ tagname = 'span'
+ self.body.append(
+ self.starttag(node, tagname, '', CLASS='docutils literal'))
+ text = node.astext()
+ # remove hard line breaks (except if in a parsed-literal block)
+ if not isinstance(node.parent, nodes.literal_block):
+ text = text.replace('\n', ' ')
+ # Protect text like ``--an-option`` and the regular expression
+ # ``[+]?(\d+(\.\d*)?|\.\d+)`` from bad line wrapping
+ for token in self.words_and_spaces.findall(text):
+ if token.strip() and self.in_word_wrap_point.search(token):
+ self.body.append('<span class="pre">%s</span>'
+ % self.encode(token))
+ else:
+ self.body.append(self.encode(token))
+ self.body.append('</%s>' % tagname)
+ # Content already processed:
+ raise nodes.SkipNode
+
+ def depart_literal(self, node):
+ # skipped unless literal element is from "code" role:
+ self.body.append('</code>')
+
# Meta tags: 'lang' attribute replaced by 'xml:lang' in XHTML 1.1
# HTML5/polyglot recommends using both
def visit_meta(self, node):
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:40 UTC (rev 8474)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:51 UTC (rev 8475)
@@ -1362,13 +1362,13 @@
<dd><p>Side comments</p>
<blockquote>
<p>These grapes are made into wine.
-<span class="small">Alcohol is addictive.</span></p>
+<small>Alcohol is addictive.</small></p>
</blockquote>
</dd>
<dt>s</dt>
<dd><p>Inaccurate text</p>
<blockquote>
-<p>Price: <span class="s">£4.50</span> £2.00!</p>
+<p>Price: <s>£4.50</s> £2.00!</p>
</blockquote>
</dd>
<dt>cite</dt>
@@ -1381,7 +1381,7 @@
<dt>q</dt>
<dd><p>Quotations</p>
<blockquote>
-<p>The judge said <span class="q">You can drink water from the fish tank</span>
+<p>The judge said <q>You can drink water from the fish tank</q>
but advised against it.</p>
</blockquote>
</dd>
@@ -1388,7 +1388,7 @@
<dt>dfn</dt>
<dd><p>Defining instance</p>
<blockquote>
-<p>The term <span class="dfn">organic food</span> refers to food produced without synthetic
+<p>The term <dfn>organic food</dfn> refers to food produced without synthetic
chemicals.</p>
</blockquote>
</dd>
@@ -1436,7 +1436,7 @@
<dt>var</dt>
<dd><p>Variables</p>
<blockquote>
-<p>If there are <span class="var">n</span> fruit in the bowl, at least <span class="var">n</span>÷2 will be
+<p>If there are <var>n</var> fruit in the bowl, at least <var>n</var>÷2 will be
ripe.</p>
</blockquote>
</dd>
@@ -1443,13 +1443,13 @@
<dt>samp</dt>
<dd><p>Computer output</p>
<blockquote>
-<p>The computer said <span class="samp docutils literal">Unknown error <span class="pre">-3</span></span>.</p>
+<p>The computer said <samp class="docutils literal">Unknown error <span class="pre">-3</span></samp>.</p>
</blockquote>
</dd>
<dt>kbd</dt>
<dd><p>User input</p>
<blockquote>
-<p>Hit <span class="kbd">F1</span> to continue.</p>
+<p>Hit <kbd>F1</kbd> to continue.</p>
</blockquote>
</dd>
<dt>sub</dt>
@@ -1467,19 +1467,19 @@
<dt>i</dt>
<dd><p>Alternative voice</p>
<blockquote>
-<p>Lemonade consists primarily of <span class="i" lang="la">Citrus limon</span>.</p>
+<p>Lemonade consists primarily of <i lang="la">Citrus limon</i>.</p>
</blockquote>
</dd>
<dt>b</dt>
<dd><p>Keywords</p>
<blockquote>
-<p>Take a <span class="b">lemon</span> and squeeze it with a <span class="b">juicer</span>.</p>
+<p>Take a <b>lemon</b> and squeeze it with a <b>juicer</b>.</p>
</blockquote>
</dd>
<dt>u</dt>
<dd><p>Annotations</p>
<blockquote>
-<p>The mixture of apple juice and <span class="u spelling">eldeflower</span> juice is very
+<p>The mixture of apple juice and <u class="spelling">eldeflower</u> juice is very
pleasant.</p>
</blockquote>
</dd>
@@ -1486,14 +1486,14 @@
<dt>mark</dt>
<dd><p>Highlight</p>
<blockquote>
-<p>Elderflower cordial, with one <span class="mark">part</span> cordial to ten
-<span class="mark">part</span>s water, stands a<span class="mark">part</span> from the rest.</p>
+<p>Elderflower cordial, with one <mark>part</mark> cordial to ten
+<mark>part</mark>s water, stands a<mark>part</mark> from the rest.</p>
</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>
<blockquote>
-<p>The recommended restaurant is <span class="bdi">My Juice Café (At The Beach)</span>.</p>
+<p>The recommended restaurant is <bdi>My Juice Café (At The Beach)</bdi>.</p>
</blockquote>
<p>The <cite>dir</cite> global attribute defaults to "auto" (not "inherit") on this
element.</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 00:45:06
|
Revision: 8476
http://sourceforge.net/p/docutils/code/8476
Author: milde
Date: 2020-01-30 00:45:02 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
html5: support <ins> and <del> tags.
Modified Paths:
--------------
trunk/docutils/docutils/writers/html5_polyglot/__init__.py
trunk/docutils/test/functional/expected/standalone_rst_html5.html
Modified: trunk/docutils/docutils/writers/html5_polyglot/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:44:51 UTC (rev 8475)
+++ trunk/docutils/docutils/writers/html5_polyglot/__init__.py 2020-01-30 00:45:02 UTC (rev 8476)
@@ -182,6 +182,26 @@
def depart_caption(self, node):
self.body.append('</p>\n')
+ # use HTML block-level tags if matching class value found
+ supported_block_tags = set(('ins', 'del'))
+ def visit_container(self, node):
+ # If there is exactly one of the "supported block tags" in
+ # the list of class values, use it as tag name:
+ classes = node.get('classes', [])
+ tags = [cls for cls in classes
+ if cls in self.supported_block_tags]
+ if len(tags) == 1:
+ node.html5tagname = tags[0]
+ classes.remove(tags[0])
+ else:
+ node.html5tagname = 'div'
+ self.body.append(self.starttag(node, node.html5tagname,
+ CLASS='docutils container'))
+
+ def depart_container(self, node):
+ self.body.append('</%s>\n' % node.html5tagname)
+
+
# no standard meta tag name in HTML5, use dcterms.rights
# see https://wiki.whatwg.org/wiki/MetaExtensions
def visit_copyright(self, node):
@@ -273,7 +293,8 @@
# use HTML text-level tags if matching class value found
supported_inline_tags = set(('small', 's', 'q', 'dfn', 'var', 'samp',
- 'kbd', 'i', 'b', 'u', 'mark', 'bdi'))
+ 'kbd', 'i', 'b', 'u', 'mark', 'bdi',
+ 'ins', 'del'))
def visit_inline(self, node):
# If there is exactly one of the "supported inline tags" in
# the list of class values, use it as tag name:
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:44:51 UTC (rev 8475)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2020-01-30 00:45:02 UTC (rev 8476)
@@ -1548,19 +1548,19 @@
<dt>ins</dt>
<dd><p>Additions <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-16">5</a></p>
<blockquote>
-<p>This text has "always" been here. <span class="ins">This text has been inserted.</span></p>
-<div class="ins docutils container">
+<p>This text has "always" been here. <ins>This text has been inserted.</ins></p>
+<ins class="docutils container">
<p>This paragraph has been inserted.</p>
-</div>
+</ins>
</blockquote>
</dd>
<dt>del</dt>
<dd><p>Removed content <a class="footnote-reference brackets" href="#attribute-optional" id="footnote-reference-17">5</a></p>
<blockquote>
-<p><span class="del">This text has been deleted</span>, here is the rest of the paragraph.</p>
-<div class="del docutils container">
+<p><del>This text has been deleted</del>, here is the rest of the paragraph.</p>
+<del class="docutils container">
<p>This paragraph has been deleted.</p>
-</div>
+</del>
</blockquote>
</dd>
</dl>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 12:29:21
|
Revision: 8477
http://sourceforge.net/p/docutils/code/8477
Author: milde
Date: 2020-01-30 12:29:19 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
Log html5 writer changes.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-30 00:45:02 UTC (rev 8476)
+++ trunk/docutils/HISTORY.txt 2020-01-30 12:29:19 UTC (rev 8477)
@@ -34,8 +34,17 @@
* docutils/writers/html5_polyglot/
- - Use semantic HTML5 tags <header>, <footer>, <section>.
+ - Use the new semantic tags <main>, <section>, <header>,
+ <footer>, <aside>, <figure>, and <figcaption>.
+ See ``minimal.css`` and ``plain.css`` for styling rule examples.
+ - Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>,
+ <i>, <b>, <u>, <mark>, and <bdi> if a matching class value
+ is found in `inline` and `literal` elements.
+
+ - Use HTML tags <ins> and <del> if a matching class value
+ is found in `inline`, `literal`, or `container` elements.
+
Release 0.16
============
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2020-01-30 00:45:02 UTC (rev 8476)
+++ trunk/docutils/RELEASE-NOTES.txt 2020-01-30 12:29:19 UTC (rev 8477)
@@ -24,19 +24,6 @@
* Installing with ``setup.py`` will require setuptools_ in versions > 0.16.
-* HTML5 writer:
- Use the new semantic tags <main>, <section>, <header>,
- <footer>, <aside>, <figure>, and <figcaption>.
- See ``minimal.css`` and ``plain.css`` for styling rule examples.
-
- Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>,
- <i>, <b>, <u>, <mark>, and <bdi> if a matching class value
- is found in `inline` and `literal` elements.
-
- Use HTML tags <ins> and <del> if a matching class value
- is found in `inline`, `literal`, or `container` elements.
-
-
* LaTeX writer:
Wrap admonitions in a "DUclass" environment. Stylesheets modifying
"\DUadmonition" will need to adapt.
@@ -80,6 +67,24 @@
.. _reference name: docs/ref/rst/restructuredtext.html#reference-names
.. _identifier normalization: directives.html#identifier-normalization
+
+Release 0.17
+============
+
+* HTML5 writer:
+
+ - Use the new semantic tags <main>, <section>, <header>,
+ <footer>, <aside>, <figure>, and <figcaption>.
+ See ``minimal.css`` and ``plain.css`` for styling rule examples.
+
+ - Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>,
+ <i>, <b>, <u>, <mark>, and <bdi> if a matching class value
+ is found in `inline` and `literal` elements.
+
+ - Use HTML tags <ins> and <del> if a matching class value
+ is found in `inline`, `literal`, or `container` elements.
+
+
Release 0.16 (2020-01-12)
=========================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 12:29:31
|
Revision: 8478
http://sourceforge.net/p/docutils/code/8478
Author: milde
Date: 2020-01-30 12:29:29 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
Use importlib.import_module() to programmatically import modules.
The __import__() function is intended for internal use only.
The documentation recommends to replace it with
importlib.import_module() (new in Python 2.7).
Implements feature-request #67.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/parsers/__init__.py
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/docutils/readers/__init__.py
trunk/docutils/docutils/writers/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-30 12:29:19 UTC (rev 8477)
+++ trunk/docutils/HISTORY.txt 2020-01-30 12:29:29 UTC (rev 8478)
@@ -23,6 +23,7 @@
- Explicit include test subdirectory contents in MANIFEST.in to avoid
inclusion of test outputs.
- Fix [ 385 ]: Import of language modules.
+ - Use importlib.import_module() to programmatically import modules.
* docutils/__init__.py
Modified: trunk/docutils/docutils/parsers/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/__init__.py 2020-01-30 12:29:19 UTC (rev 8477)
+++ trunk/docutils/docutils/parsers/__init__.py 2020-01-30 12:29:29 UTC (rev 8478)
@@ -9,6 +9,8 @@
__docformat__ = 'reStructuredText'
import sys
+from importlib import import_module
+
from docutils import Component
@@ -45,7 +47,7 @@
if parser_name in _parser_aliases:
parser_name = _parser_aliases[parser_name]
try:
- module = __import__(parser_name, globals(), locals(), level=1)
+ module = import_module('docutils.parsers.'+parser_name)
except ImportError:
- module = __import__(parser_name, globals(), locals(), level=0)
+ module = import_module(parser_name)
return module.Parser
Modified: trunk/docutils/docutils/parsers/rst/directives/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/__init__.py 2020-01-30 12:29:19 UTC (rev 8477)
+++ trunk/docutils/docutils/parsers/rst/directives/__init__.py 2020-01-30 12:29:29 UTC (rev 8478)
@@ -11,6 +11,7 @@
import re
import codecs
import sys
+from importlib import import_module
from docutils import nodes
from docutils.utils import split_escaped_whitespace, escape2null, unescape
@@ -115,7 +116,7 @@
# Error handling done by caller.
return None, messages
try:
- module = __import__(modulename, globals(), locals(), level=1)
+ module = import_module('docutils.parsers.rst.directives.'+modulename)
except ImportError as detail:
messages.append(document.reporter.error(
'Error importing directive module "%s" (directive "%s"):\n%s'
Modified: trunk/docutils/docutils/readers/__init__.py
===================================================================
--- trunk/docutils/docutils/readers/__init__.py 2020-01-30 12:29:19 UTC (rev 8477)
+++ trunk/docutils/docutils/readers/__init__.py 2020-01-30 12:29:29 UTC (rev 8478)
@@ -9,6 +9,7 @@
__docformat__ = 'reStructuredText'
import sys
+from importlib import import_module
from docutils import utils, parsers, Component
from docutils.transforms import universal
@@ -106,7 +107,7 @@
if reader_name in _reader_aliases:
reader_name = _reader_aliases[reader_name]
try:
- module = __import__(reader_name, globals(), locals(), level=1)
+ module = import_module('docutils.readers.'+reader_name)
except ImportError:
- module = __import__(reader_name, globals(), locals(), level=0)
+ module = import_module(reader_name)
return module.Reader
Modified: trunk/docutils/docutils/writers/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/__init__.py 2020-01-30 12:29:19 UTC (rev 8477)
+++ trunk/docutils/docutils/writers/__init__.py 2020-01-30 12:29:29 UTC (rev 8478)
@@ -10,6 +10,7 @@
import os.path
import sys
+from importlib import import_module
import docutils
from docutils import languages, Component
@@ -137,7 +138,7 @@
if writer_name in _writer_aliases:
writer_name = _writer_aliases[writer_name]
try:
- module = __import__(writer_name, globals(), locals(), level=1)
+ module = import_module('docutils.writers.'+writer_name)
except ImportError:
- module = __import__(writer_name, globals(), locals(), level=0)
+ module = import_module(writer_name)
return module.Writer
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 13:29:52
|
Revision: 8479
http://sourceforge.net/p/docutils/code/8479
Author: milde
Date: 2020-01-30 13:29:50 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
New class-argument handling in LaTeX writer.
If the new "legacy_class_functions" setting is False,
class values are handled with wrappers
and admonitions use the ``DUadmonition`` environment.
This will become the new default in 0.18.
Modified Paths:
--------------
trunk/docutils/docs/user/config.txt
trunk/docutils/docs/user/latex.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2020-01-30 12:29:29 UTC (rev 8478)
+++ trunk/docutils/docs/user/config.txt 2020-01-30 13:29:50 UTC (rev 8479)
@@ -1415,13 +1415,6 @@
Default: off. Options: ``--use-latex-docinfo, --use-docutils-docinfo``.
-docutils_footnotes
-~~~~~~~~~~~~~~~~~~
-Use the Docutils-specific macros ``\DUfootnote`` and
-``\DUfootnotetext`` for footnotes_.
-
-Default: on. Option: ``--docutils-footnotes``.
-
use_latex_citations
~~~~~~~~~~~~~~~~~~~
@@ -1622,7 +1615,6 @@
A LaTeX verbatim environment is only usable if there is no other
markup contained in the literal-block.
-
section_prefix_for_enumerators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1744,7 +1736,31 @@
.. _LaTeX font encodings:
http://mirror.ctan.org/macros/latex/doc/encguide.pdf
+legacy_class_functions
+~~~~~~~~~~~~~~~~~~~~~~
+Use legacy functions ``\DUtitle`` and ``\DUadmonition`` with a
+comma-separated list of class values as optional argument. If `False`, class
+values are handled with wrappers and admonitions use the ``DUadmonition``
+environment. See `Generating LaTeX with Docutils`__ for details.
+
+Default: True (this will change to False in version 0.18).
+Options: ``--legacy-class-functions``, ``--new-class-functions``.
+
+New in Docutils 0.17.
+
+__ latex.html#classes
+
+docutils_footnotes
+~~~~~~~~~~~~~~~~~~
+Use the Docutils-specific macros ``\DUfootnote`` and
+``\DUfootnotetext`` for footnotes_.
+
+TODO: The alternative, "use_latex_footnotes" is not implemented yet.
+
+Default: on. Option: ``--docutils-footnotes``.
+
+
[xetex writer]
~~~~~~~~~~~~~~
Modified: trunk/docutils/docs/user/latex.txt
===================================================================
--- trunk/docutils/docs/user/latex.txt 2020-01-30 12:29:29 UTC (rev 8478)
+++ trunk/docutils/docs/user/latex.txt 2020-01-30 13:29:50 UTC (rev 8479)
@@ -238,17 +238,8 @@
* Elements can have multiple class arguments. In contrast to HTML/CSS, the
order of the class arguments cannot be ignored in LaTeX
-* For "historical reasons", class handling differs for some elements and
- class values:
-
- * The special macros ``\DUadmonition``, ``\DUtitle``, and ``\DUtopic`` are
- written with a comma separated list of class values as optional
- argument. See http://www.ctan.org/topic/keyval for LaTeX packages that
- help parsing value lists.
-
- See the sections on admonitions_, titles_, and the `topic element`_ for
- customization examples.
-
+* Class handling differs for some elements and class values:
+
* Class argument values starting with ``align-`` are transformed to
"align" argument values. Class argument values starting with
``language-`` set the elements language property.
@@ -256,9 +247,15 @@
* The table element recognizes some special class values. See section
table_.
+ * For "historical reasons", the special macros ``\DUadmonition`` and
+ ``\DUtitle`` are written with a comma separated list of class values as
+ optional argument if the legacy-class-functions_ setting is True.
+
+ See the sections on admonitions_ and titles_ for customization examples.
+
.. _"classes" attribute: ../ref/doctree.html#classes
+.. _legacy-class-functions: config.html#legacy-class-functions
-
LaTeX code
----------
@@ -443,13 +440,17 @@
__ ../ref/rst/directives.html#admonitions
Command:
- ``\DUadmonition``
+ ``\DUadmonition`` (with legacy-class-functions_)
+
+Environment:
+ ``DUadmonition`` (with new-class-functions_)
+
+ .. _new-class-functions: legacy-class-functions_
Default:
Typeset in a frame (90 % of text width).
-The admonition title is typeset with the ``\DUtitle`` command which also
-takes a class argument. See `titles`_
+The admonition title is typeset with the ``\DUtitle`` command (see `titles`_).
Example 1:
A lighter layout without the frame::
@@ -464,14 +465,14 @@
\end{quote}
\fi
}
+
+ rsp with new-class-functions_::
+
+ \newenvironment{DUadmonition}%
+ {\begin{quote}}
+ {\end{quote}}
- The first part of this definition acts as a "dispatcher". This way it is
- possible to define a special handling of `specific admonitions`_ based on
- the "class" argument.
-.. _specific admonitions:
- ../ref/rst/directives.html#specific-admonitions
-
Example 2:
Print admonitions in the margin::
@@ -485,8 +486,15 @@
\newcommand{\DUadmonitionnote}[1]{\marginpar{#1}}
+ rsp with new-class-functions_ we re-define the environment in the
+ class-wrapper::
+
+ \newcommand{\DUCLASSnote}{%
+ \renewcommand{\DUadmonition}{\marginpar}
+
Make sure there is enough space to fit the note.
+
.. _marginnote:
http://mirror.ctan.org/help/Catalogue/entries/marginnote.html
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2020-01-30 12:29:29 UTC (rev 8478)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2020-01-30 13:29:50 UTC (rev 8479)
@@ -211,6 +211,18 @@
'"--use-bibtex=mystyle,mydb1,mydb2".',
['--use-bibtex'],
{'default': ''}),
+ ('Use legacy functions with class value list for '
+ '\\DUtitle and \\DUadmonition (current default). ',
+ ['--legacy-class-functions'],
+ {'default': True,
+ 'action': 'store_true',
+ 'validator': frontend.validate_boolean}),
+ ('Use \\DUrole and "DUclass" wrappers for class values. '
+ 'Place admonition content in an environment (future default).',
+ ['--new-class-functions'],
+ {'dest': 'legacy_class_functions',
+ 'action': 'store_false',
+ 'validator': frontend.validate_boolean}),
# TODO: implement "latex footnotes" alternative
('Footnotes with numbers/symbols by Docutils. (default) '
'(The alternative, --latex-footnotes, is not implemented yet.)',
@@ -482,11 +494,17 @@
class PreambleCmds(object):
"""Building blocks for the latex preamble."""
-PreambleCmds.abstract = r"""
+PreambleCmds.abstract_legacy = r"""
% abstract title
\providecommand*{\DUtitleabstract}[1]{\centerline{\textbf{#1}}}"""
-PreambleCmds.admonition = r"""
+PreambleCmds.abstract = r"""
+\providecommand*{\DUCLASSabstract}{
+ \renewcommand{\DUtitle}[1]{\centerline{\textbf{##1}}}
+}"""
+
+# deprecated, see https://sourceforge.net/p/docutils/bugs/339/
+PreambleCmds.admonition_legacy = r"""
% admonition (specially marked topic)
\providecommand{\DUadmonition}[2][class-arg]{%
% try \DUadmonition#1{#2}:
@@ -499,6 +517,22 @@
\fi
}"""
+PreambleCmds.admonition = r"""
+% admonition (specially marked topic)
+\ifx\DUadmonition\undefined % poor man's "provideenvironment"
+ \newbox{\DUadmonitionbox}
+ \newenvironment{DUadmonition}%
+ {\begin{center}
+ \begin{lrbox}{\DUadmonitionbox}
+ \begin{minipage}{0.9\linewidth}
+ }%
+ { \end{minipage}
+ \end{lrbox}
+ \fbox{\usebox{\DUadmonitionbox}}
+ \end{center}
+ }
+\fi"""
+
## PreambleCmds.caption = r"""% configure caption layout
## \usepackage{caption}
## \captionsetup{singlelinecheck=false}% no exceptions for one-liners"""
@@ -515,6 +549,7 @@
\providecommand*{\DUCLASSdedication}{%
\renewenvironment{quote}{\begin{center}}{\end{center}}%
}"""
+# TODO: add \em to set dedication text in italics.
PreambleCmds.duclass = r"""
% class handling for environments (block-level elements)
@@ -527,10 +562,13 @@
{\csname end\DocutilsClassFunctionName \endcsname}%
\fi"""
-PreambleCmds.error = r"""
+PreambleCmds.error_legacy = r"""
% error admonition title
\providecommand*{\DUtitleerror}[1]{\DUtitle{\color{red}#1}}"""
+PreambleCmds.error = r"""
+\providecommand*{\DUCLASSerror}{\color{red}}"""
+
PreambleCmds.fieldlist = r"""
% fieldlist environment
\ifthenelse{\isundefined{\DUfieldlist}}{
@@ -682,7 +720,7 @@
% titlereference role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}"""
-PreambleCmds.title = r"""
+PreambleCmds.title_legacy = r"""
% title for topics, admonitions, unsupported section levels, and sidebar
\providecommand*{\DUtitle}[2][class-arg]{%
% call \DUtitle#1{#2} if it exists:
@@ -693,6 +731,10 @@
\fi
}"""
+PreambleCmds.title = r"""
+% title for topics, admonitions, unsupported section levels, and sidebar
+\providecommand*{\DUtitle}[1]{\subsubsection*{#1}}"""
+
PreambleCmds.transition = r"""
% transition (break, fancybreak, anonymous section)
\providecommand*{\DUtransition}{%
@@ -1648,7 +1690,6 @@
if cls.startswith('language-'):
language = self.babel.language_name(cls[9:])
if language:
- self.babel.otherlanguages[language] = True
self.out.append('\\end{selectlanguage}\n')
else:
self.fallbacks['DUclass'] = PreambleCmds.duclass
@@ -1691,16 +1732,27 @@
self.depart_docinfo_item(node)
def visit_admonition(self, node):
+ # strip the generic 'admonition' from the list of classes
+ node['classes'] = [cls for cls in node['classes']
+ if cls != 'admonition']
+ if self.settings.legacy_class_functions:
+ self.fallbacks['admonition'] = PreambleCmds.admonition_legacy
+ if 'error' in node['classes']:
+ self.fallbacks['error'] = PreambleCmds.error_legacy
+ self.out.append('\n\\DUadmonition[%s]{' % ','.join(node['classes']))
+ return
self.fallbacks['admonition'] = PreambleCmds.admonition
if 'error' in node['classes']:
self.fallbacks['error'] = PreambleCmds.error
- # strip the generic 'admonition' from the list of classes
- node['classes'] = [cls for cls in node['classes']
- if cls != 'admonition']
- self.out.append('\n\\DUadmonition[%s]{' % ','.join(node['classes']))
+ self.duclass_open(node)
+ self.out.append('\\begin{DUadmonition}')
def depart_admonition(self, node):
- self.out.append('}\n')
+ if self.settings.legacy_class_functions:
+ self.out.append('}\n')
+ return
+ self.out.append('\\end{DUadmonition}\n')
+ self.duclass_close(node)
def visit_author(self, node):
self.pdfauthor.append(self.attval(node.astext()))
@@ -1780,7 +1832,6 @@
if self._use_latex_citations:
self.push_output_collector([])
else:
- # TODO: do we need these?
## self.requirements['~fnt_floats'] = PreambleCmds.footnote_floats
self.out.append(r'\begin{figure}[b]')
self.append_hypertargets(node)
@@ -1813,6 +1864,7 @@
self.out.append('\\hyperlink{%s}{[' % href)
def depart_citation_reference(self, node):
+ # TODO: normalize labels
if self._use_latex_citations:
followup_citation = False
# check for a following citation separated by a space or newline
@@ -2910,6 +2962,8 @@
def visit_system_message(self, node):
self.requirements['color'] = PreambleCmds.color
self.fallbacks['title'] = PreambleCmds.title
+ if self.settings.legacy_class_functions:
+ self.fallbacks['title'] = PreambleCmds.title_legacy
node['classes'] = ['system-message']
self.visit_admonition(node)
self.out.append('\n\\DUtitle[system-message]{system-message}\n')
@@ -3050,11 +3104,13 @@
elif (isinstance(node.parent, nodes.topic) or
isinstance(node.parent, nodes.admonition) or
isinstance(node.parent, nodes.sidebar)):
- self.fallbacks['title'] = PreambleCmds.title
- classes = ','.join(node.parent['classes'])
- if not classes:
- classes = node.parent.tagname
- self.out.append('\n\\DUtitle[%s]{' % classes)
+ classes = node.parent['classes'] or [node.parent.tagname]
+ if self.settings.legacy_class_functions:
+ self.fallbacks['title'] = PreambleCmds.title_legacy
+ self.out.append('\n\\DUtitle[%s]{' % ','.join(classes))
+ else:
+ self.fallbacks['title'] = PreambleCmds.title
+ self.out.append('\n\\DUtitle{')
self.context.append('}\n')
# Table caption
elif isinstance(node.parent, nodes.table):
@@ -3173,6 +3229,8 @@
# special topics:
if 'abstract' in node['classes']:
self.fallbacks['abstract'] = PreambleCmds.abstract
+ if self.settings.legacy_class_functions:
+ self.fallbacks['abstract'] = PreambleCmds.abstract_legacy
self.push_output_collector(self.abstract)
elif 'dedication' in node['classes']:
self.fallbacks['dedication'] = PreambleCmds.dedication
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-01-30 21:35:06
|
Revision: 8480
http://sourceforge.net/p/docutils/code/8480
Author: milde
Date: 2020-01-30 21:35:05 +0000 (Thu, 30 Jan 2020)
Log Message:
-----------
latex writer: announced changes.
Remove backwards compatibility code for the deprecated
`styling command`__ prefix ``\docutilsrole``.
Log entries for new setting "legacy_class_functions".
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/test/functional/expected/latex_literal_block.tex
trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/test_writers/test_latex2e.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/HISTORY.txt 2020-01-30 21:35:05 UTC (rev 8480)
@@ -46,6 +46,18 @@
- Use HTML tags <ins> and <del> if a matching class value
is found in `inline`, `literal`, or `container` elements.
+* docutils/writers/latex2e/__init__.py:
+
+ - Use LaTeX environments for admonitions and "class wrappers" for styling
+ admonitions and titles if the new configuration setting
+ `legacy_class_functions`_ is False.
+
+ - Remove backwards compatibility code for the deprecated
+ `styling command`__ prefix ``\docutilsrole``.
+
+ __ docs/user/latex.html#classes
+
+
Release 0.16
============
@@ -185,7 +197,6 @@
* docutils/parsers/rst/states.py:
- Allow embedded colons in field list field names.
- - Add `rawsource` attribute for text of inline elements.
* docutils/parsers/rst/directives/html.py:
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/RELEASE-NOTES.txt 2020-01-30 21:35:05 UTC (rev 8480)
@@ -25,14 +25,10 @@
* Installing with ``setup.py`` will require setuptools_ in versions > 0.16.
* LaTeX writer:
- Wrap admonitions in a "DUclass" environment. Stylesheets modifying
- "\DUadmonition" will need to adapt.
+ The default for the configuration setting `legacy_class_functions`_ will
+ change to "False". Adapt stylesheets modifying ``\DUadmonition``
+ and/or ``\DUtitle`` or set to "True".
- Styling commands using ``\docutilsrole`` prefix will be ignored in
- versions > 0.16 (see `Generating LaTeX with Docutils`__).
-
- __ docs/user/latex.html#classes
-
* ``Node.traverse()`` will return an iterator instead of a list.
* Remove ``utils.unique_combinations``
@@ -66,6 +62,7 @@
.. _rst2html.py: docs/user/tools.html#rst2html-py
.. _reference name: docs/ref/rst/restructuredtext.html#reference-names
.. _identifier normalization: directives.html#identifier-normalization
+.. _legacy_class_functions: docs/user/config.html#legacy-class-functions
Release 0.17
@@ -84,7 +81,15 @@
- Use HTML tags <ins> and <del> if a matching class value
is found in `inline`, `literal`, or `container` elements.
+* LaTeX writer:
+ - New configuration setting `legacy_class_functions`_.
+
+ - `Styling commands`__ using the legacy ``\docutilsrole`` prefix are
+ now ignored. Use ``\DUrole``.
+
+ __ docs/user/latex.html#classes
+
Release 0.16 (2020-01-12)
=========================
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2020-01-30 21:35:05 UTC (rev 8480)
@@ -613,15 +613,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}"""
Modified: trunk/docutils/test/functional/expected/latex_literal_block.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/latex_literal_block.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -61,15 +61,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/latex_literal_block_fancyvrb.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -61,15 +61,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_listings.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_listings.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/latex_literal_block_listings.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -67,15 +67,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/latex_literal_block_verbatim.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -60,15 +60,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/latex_literal_block_verbatimtab.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -61,15 +61,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -106,15 +106,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2020-01-30 21:35:05 UTC (rev 8480)
@@ -105,15 +105,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
Modified: trunk/docutils/test/test_writers/test_latex2e.py
===================================================================
--- trunk/docutils/test/test_writers/test_latex2e.py 2020-01-30 13:29:50 UTC (rev 8479)
+++ trunk/docutils/test/test_writers/test_latex2e.py 2020-01-30 21:35:05 UTC (rev 8480)
@@ -12,7 +12,9 @@
import string
-from . import DocutilsTestSupport
+if __name__ == '__main__':
+ import __init__
+from test_transforms import DocutilsTestSupport # must be imported before docutils
def suite():
@@ -81,15 +83,8 @@
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
- \else
- % backwards compatibility: try \docutilsrole#1{#2}
- \ifcsname docutilsrole#1\endcsname%
- \PackageWarningNoLine{docutils}{Command prefix "docutilsrole" is
- deprecated, \MessageBreak use `\protect\DUrole #1`}
- \csname docutilsrole#1\endcsname{#2}%
- \else%
- #2%
- \fi%
+ \else%
+ #2%
\fi%
}
""",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-02-06 12:46:46
|
Revision: 8482
http://sourceforge.net/p/docutils/code/8482
Author: milde
Date: 2020-02-06 12:46:45 +0000 (Thu, 06 Feb 2020)
Log Message:
-----------
Minor formatting updates.
Modified Paths:
--------------
trunk/docutils/docutils/nodes.py
trunk/docutils/docutils/utils/__init__.py
trunk/docutils/test/test_utils.py
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2020-01-31 08:17:24 UTC (rev 8481)
+++ trunk/docutils/docutils/nodes.py 2020-02-06 12:46:45 UTC (rev 8482)
@@ -620,6 +620,12 @@
def __len__(self):
return len(self.children)
+ def __contains__(self, key):
+ # Test for both, children and attributes with operator ``in``.
+ if isinstance(key, basestring):
+ return key in self.attributes
+ return key in self.children
+
def __getitem__(self, key):
if isinstance(key, basestring):
return self.attributes[key]
@@ -703,14 +709,6 @@
has_key = hasattr
- # support operator ``in``
- def __contains__(self, key):
- # support both membership test for children and attributes
- # (has_key is translated to "in" by 2to3)
- if isinstance(key, basestring):
- return key in self.attributes
- return key in self.children
-
def get_language_code(self, fallback=''):
"""Return node's language tag.
Modified: trunk/docutils/docutils/utils/__init__.py
===================================================================
--- trunk/docutils/docutils/utils/__init__.py 2020-01-31 08:17:24 UTC (rev 8481)
+++ trunk/docutils/docutils/utils/__init__.py 2020-02-06 12:46:45 UTC (rev 8482)
@@ -681,7 +681,6 @@
# find all combinations of subtags
taglist = []
for n in range(len(subtags), 0, -1):
- # for tags in unique_combinations(subtags, n):
for tags in itertools.combinations(subtags, n):
taglist.append('-'.join(base_tag+tags))
taglist += base_tag
Modified: trunk/docutils/test/test_utils.py
===================================================================
--- trunk/docutils/test/test_utils.py 2020-01-31 08:17:24 UTC (rev 8481)
+++ trunk/docutils/test/test_utils.py 2020-02-06 12:46:45 UTC (rev 8482)
@@ -267,9 +267,9 @@
['de-at', 'de'])
self.assertEqual(utils.normalize_language_tag('de-AT-1901'),
['de-at-1901', 'de-at', 'de-1901', 'de'])
- self.assertEqual(utils.normalize_language_tag('de-AT-1901-frak'),
- ['de-at-1901-frak', 'de-at-1901', 'de-at-frak',
- 'de-1901-frak', 'de-at', 'de-1901', 'de-frak', 'de'])
+ self.assertEqual(utils.normalize_language_tag('de-AT-1901-Latf'),
+ ['de-at-1901-latf', 'de-at-1901', 'de-at-latf',
+ 'de-1901-latf', 'de-at', 'de-1901', 'de-latf', 'de'])
self.assertEqual(utils.normalize_language_tag('grc-ibycus-x-altquot'),
['grc-ibycus-x-altquot', 'grc-ibycus',
'grc-x-altquot', 'grc'])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-02-06 12:47:02
|
Revision: 8484
http://sourceforge.net/p/docutils/code/8484
Author: milde
Date: 2020-02-06 12:47:00 +0000 (Thu, 06 Feb 2020)
Log Message:
-----------
setup.py: Switch to setuptools
This removes a lot of distutils overrides we were using in favour of
good old-fashioned 'MANIFEST.in' entries. This appears to generate the
almost the exact same artifacts with the exception of a single new file,
'docutils/writers/latex2e/docutils-05-compat.sty'. However, this file is
referenced from multiple documents, including the LaTeX writer user
guide ('docs/user/latex.txt') and a document describing the file itself
('docs/user/docutils-05-compat.sty.txt'), suggesting this was a mistake
that we're correcting here.
This comparison was made as follows.
1. Create directories to backup artifacts.
$ mkdir -p /tmp/docutils/old
$ mkdir -p /tmp/docutils/new
2. Using the code before this change, build a package and copy it to the
backup directory.
$ virtualenv .venv --python python3.6
$ source .venv/bin/activate
$ cd docutils
$ python setup.py build
$ mv build /tmp/docutils/old/
$ cd -
$ deactivate
$ rm -rf .venv
3. Repeat step 2 but with this change applied, using '/tmp/docutils/new'
as the backup location.
4. Compare the directories.
$ cd /tmp/docutils
$ diff -burq new/build/ old/build/
Only in new/build/lib/docutils/writers/latex2e: docutils-05-compat.sty
5. Repeat steps 2-4 but using the 'python setup.py bdist_wheel' command,
copying the 'dist' directory (rather than the 'build' directory), and
extracting generated wheel using the 'unzip' command.
Signed-off-by: Stephen Finucane <st...@th...>
Modified Paths:
--------------
trunk/docutils/MANIFEST.in
trunk/docutils/setup.py
Modified: trunk/docutils/MANIFEST.in
===================================================================
--- trunk/docutils/MANIFEST.in 2020-02-06 12:46:53 UTC (rev 8483)
+++ trunk/docutils/MANIFEST.in 2020-02-06 12:47:00 UTC (rev 8484)
@@ -20,4 +20,10 @@
recursive-include test/test_transforms *
recursive-include test/test_writers *
recursive-include tools *
+recursive-include docutils/writers *.css
+recursive-include docutils/writers *.gif
+recursive-include docutils/writers *.odt
+recursive-include docutils/writers *.js
+recursive-include docutils/writers *.txt
recursive-exclude * *.pyc *~ .DS_Store
+global-exclude docutils.conf
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2020-02-06 12:46:53 UTC (rev 8483)
+++ trunk/docutils/setup.py 2020-02-06 12:47:00 UTC (rev 8484)
@@ -4,24 +4,14 @@
from __future__ import print_function
+import glob
+import os
import sys
-import os
-import glob
try:
- import setuptools
+ from setuptools import setup
except ImportError:
- print('Warning: Could not load package `setuptools`.')
- print('Actions requiring `setuptools` instead of `distutils` will fail')
-try:
- from distutils.core import setup, Command
- from distutils.command.build import build
- from distutils.command.build_py import build_py
- from distutils.command.install_data import install_data
- from distutils.util import convert_path
- from distutils import log
-except ImportError:
- print('Error: The "distutils" standard module, which is required for the ')
+ print('Error: The "setuptools" module, which is required for the')
print('installation of Docutils, could not be found. You may need to ')
print('install a package called "python-devel" (or similar) on your ')
print('system using your package manager.')
@@ -28,48 +18,6 @@
sys.exit(1)
-class smart_install_data(install_data):
- # From <http://wiki.python.org/moin/DistutilsInstallDataScattered>,
- # by Pete Shinners.
-
- def run(self):
- # need to change self.install_dir to the library dir
- install_cmd = self.get_finalized_command('install')
- self.install_dir = getattr(install_cmd, 'install_lib')
- return install_data.run(self)
-
-
-class build_data(Command):
-
- def initialize_options(self):
- pass
-
- def finalize_options(self):
- pass
-
- def run(self):
- build_py_cmd = self.get_finalized_command('build_py')
- data_files = self.distribution.data_files
- for f in data_files:
- dir = convert_path(f[0])
- dir = os.path.join(build_py_cmd.build_lib, dir)
- self.mkpath(dir)
- for data in f[1]:
- data = convert_path(data)
- self.copy_file(data, dir)
-
-
-# let our build_data run
-build.sub_commands.append(('build_data', lambda *a: True))
-
-
-s5_theme_files = []
-for dir in glob.glob('docutils/writers/s5_html/themes/*'):
- if os.path.isdir(dir):
- theme_files = glob.glob('%s/*' % dir)
- s5_theme_files.append((dir, theme_files))
-
-
package_data = {
'name': 'docutils',
'description': 'Docutils -- Python Documentation Utilities',
@@ -87,10 +35,7 @@
'license': 'public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)',
'platforms': 'OS-independent',
'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
- 'cmdclass': {
- 'build_data': build_data,
- 'install_data': smart_install_data,
- },
+ 'include_package_data': True,
'package_dir': {
'docutils': 'docutils',
'docutils.tools': 'tools'
@@ -115,28 +60,6 @@
'docutils.writers.xetex',
'docutils.writers.odf_odt',
],
- 'data_files': [
- ('docutils/parsers/rst/include',
- glob.glob('docutils/parsers/rst/include/*.txt')),
- ('docutils/writers/html5_polyglot', [
- 'docutils/writers/html5_polyglot/minimal.css',
- 'docutils/writers/html5_polyglot/plain.css',
- 'docutils/writers/html5_polyglot/math.css',
- 'docutils/writers/html5_polyglot/template.txt']),
- ('docutils/writers/html4css1', [
- 'docutils/writers/html4css1/html4css1.css',
- 'docutils/writers/html4css1/template.txt']),
- ('docutils/writers/latex2e', [
- 'docutils/writers/latex2e/default.tex',
- 'docutils/writers/latex2e/titlepage.tex',
- 'docutils/writers/latex2e/xelatex.tex']),
- ('docutils/writers/pep_html', [
- 'docutils/writers/pep_html/pep.css',
- 'docutils/writers/pep_html/template.txt']),
- ('docutils/writers/s5_html/themes', [
- 'docutils/writers/s5_html/themes/README.txt']),
- ('docutils/writers/odf_odt', ['docutils/writers/odf_odt/styles.odt']),
- ] + s5_theme_files,
'scripts': [
'tools/rst2html.py',
'tools/rst2html4.py',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-02-06 12:47:11
|
Revision: 8485
http://sourceforge.net/p/docutils/code/8485
Author: milde
Date: 2020-02-06 12:47:08 +0000 (Thu, 06 Feb 2020)
Log Message:
-----------
Update/Fix MANIFEST.in
* Drop entries that are included by default.
* Simplify exclusion of functional test output.
* Exclude "__pycache__".
* Do not exclude "docutils.conf" from the source package.
Exclude "docutils/docutils.conf" from binary packages in setup.py.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/MANIFEST.in
trunk/docutils/setup.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-02-06 12:47:00 UTC (rev 8484)
+++ trunk/docutils/HISTORY.txt 2020-02-06 12:47:08 UTC (rev 8485)
@@ -20,11 +20,13 @@
* General
- - Explicit include test subdirectory contents in MANIFEST.in to avoid
- inclusion of test outputs.
- Fix [ 385 ]: Import of language modules.
- Use importlib.import_module() to programmatically import modules.
+* docutils/MANIFEST.in
+
+ - Exclude test outputs.
+
* docutils/__init__.py
- VersionInfo: ValueError for invalid values, fix comparison to tuples.
Modified: trunk/docutils/MANIFEST.in
===================================================================
--- trunk/docutils/MANIFEST.in 2020-02-06 12:47:00 UTC (rev 8484)
+++ trunk/docutils/MANIFEST.in 2020-02-06 12:47:08 UTC (rev 8485)
@@ -1,29 +1,11 @@
include *.txt
-include *.py
-include setup.cfg
-include MANIFEST
-include MANIFEST.in
+include install.py
recursive-include docutils *
recursive-include docs *
recursive-include licenses *
-include test/*.py
-include test/coverage.sh
-include test/docutils.conf
-recursive-include test/data *
-include test/functional/README.txt
+recursive-include tools *
+recursive-include test *
+exclude test/alltests.out test/record.txt
+prune test/functional/output
include test/functional/output/README.txt
-recursive-include test/functional/expected *
-recursive-include test/functional/input *
-recursive-include test/functional/tests *
-recursive-include test/test_parsers *
-recursive-include test/test_readers *
-recursive-include test/test_transforms *
-recursive-include test/test_writers *
-recursive-include tools *
-recursive-include docutils/writers *.css
-recursive-include docutils/writers *.gif
-recursive-include docutils/writers *.odt
-recursive-include docutils/writers *.js
-recursive-include docutils/writers *.txt
-recursive-exclude * *.pyc *~ .DS_Store
-global-exclude docutils.conf
+global-exclude *.pyc *~ __pycache__ .DS_Store
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2020-02-06 12:47:00 UTC (rev 8484)
+++ trunk/docutils/setup.py 2020-02-06 12:47:08 UTC (rev 8485)
@@ -13,7 +13,7 @@
except ImportError:
print('Error: The "setuptools" module, which is required for the')
print('installation of Docutils, could not be found. You may need to ')
- print('install a package called "python-devel" (or similar) on your ')
+ print('install a package called "python-setuptools" (or similar) on your ')
print('system using your package manager.')
sys.exit(1)
@@ -36,6 +36,7 @@
'platforms': 'OS-independent',
'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
'include_package_data': True,
+ 'exclude_package_data': {"": ["docutils.conf"]},
'package_dir': {
'docutils': 'docutils',
'docutils.tools': 'tools'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2020-02-06 12:47:29
|
Revision: 8487
http://sourceforge.net/p/docutils/code/8487
Author: milde
Date: 2020-02-06 12:47:25 +0000 (Thu, 06 Feb 2020)
Log Message:
-----------
latex writer: Remove legacy stylesheet.
Modified Paths:
--------------
trunk/docutils/COPYING.txt
trunk/docutils/HISTORY.txt
trunk/docutils/docs/user/latex.txt
Removed Paths:
-------------
trunk/docutils/docs/user/docutils-05-compat.sty.txt
trunk/docutils/docutils/writers/latex2e/docutils-05-compat.sty
Modified: trunk/docutils/COPYING.txt
===================================================================
--- trunk/docutils/COPYING.txt 2020-02-06 12:47:16 UTC (rev 8486)
+++ trunk/docutils/COPYING.txt 2020-02-06 12:47:25 UTC (rev 8487)
@@ -79,8 +79,6 @@
* docutils/utils/math/__init__.py,
docutils/utils/math/latex2mathml.py,
docutils/writers/xetex/__init__.py,
- docutils/writers/latex2e/docutils-05-compat.sty,
- docs/user/docutils-05-compat.sty.txt,
docutils/utils/error_reporting.py,
docutils/test/transforms/test_smartquotes.py:
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2020-02-06 12:47:16 UTC (rev 8486)
+++ trunk/docutils/HISTORY.txt 2020-02-06 12:47:25 UTC (rev 8487)
@@ -59,7 +59,11 @@
__ docs/user/latex.html#classes
+* docutils/writers/latex2e/docutils-05-compat.sty:
+ - Remove this legacy stylesheet.
+
+
Release 0.16
============
@@ -1061,8 +1065,7 @@
- Apply [ 1612821 ] Double quotes in literal text in Italian/German
-* docutils/writers/latex2e/__init__.py (see also
- `<docs/user/docutils-05-compat.sty.html>`__) :
+* docutils/writers/latex2e/__init__.py:
- Add ``--embed-stylesheet`` option.
- Apply [ 1474017 ] image vertical alignment is reversed.
Deleted: trunk/docutils/docs/user/docutils-05-compat.sty.txt
===================================================================
--- trunk/docutils/docs/user/docutils-05-compat.sty.txt 2020-02-06 12:47:16 UTC (rev 8486)
+++ trunk/docutils/docs/user/docutils-05-compat.sty.txt 2020-02-06 12:47:25 UTC (rev 8487)
@@ -1,738 +0,0 @@
-==================================================================
- Changes to the Docutils latex2e writer since version 0.5
-==================================================================
-
-A backwards compatibility style sheet
-*************************************
-
-:Author: Guenter Milde
-:Contact: doc...@li...
-:Revision: $Revision$
-:Date: $Date$
-:Copyright: © 2009 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.
-
-:Abstract: This file documents changes and provides a style for best
- possible compatibility to the behaviour of the `latex2e`
- writer of Doctutils release 0.5.
-
-.. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause
-
-::
-
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{docutils-05-compat}
- [2009/03/26 v0.1 compatibility with rst2latex from Docutils 0.5]
-
-.. contents::
- :depth: 3
-
-Usage
-=====
-
-* To get an (almost) identic look for your old documents,
- place ``docutils-05-compat.sty`` in the TEXINPUT path (e.g.
- the current work directory) and pass the
- ``--stylesheet=docutils-05-compat`` option to ``rst2latex.py``.
-
-* To use your custom stylesheets without change, add them to the
- compatibility style, e.g.
- ``--stylesheet="docutils-05-compat,mystyle.tex``.
-
-.. tip:: As the changes include bug fixes that are partly reverted by this
- style, it is recommended to adapt the stylesheets to the new version or
- copy just the relevant parts of this style into them.
-
-Changes since 0.5
-=================
-
-Bugfixes
---------
-
-* Newlines around comments, targets and references prevent run-together
- paragraphs.
-
- + An image directive with hyperlink reference or target did not start a
- new paragraph (e.g. the first two image examples in
- standalone_rst_latex.tex).
-
- + Paragraphs were not separated if there was a (hyper) target definition
- inbetween.
-
- + Paragraphs did run together, if separated by a comment-paragraph in the
- rst source.
-
-* Fixed missing and spurious internal links/targets.
- Internal links now take you to the correct place.
-
-* Verbose and linked system messages.
-
-* `Figure and image alignment`_ now conforms to the rst definition.
-
-* Put `header and footer directive`__ content in \DUheader respective
- \DUfooter macros (ignored by the default style/template).
-
- (They were put inside hard-coded markup at the top/bottom of the document
- without an option to get them on every page.)
-
-__ ../ref/rst/directives.html#document-header-footer
-
-* Render doctest blocks as literal blocks (fixes bug [1586058] doctest block
- nested in admonition). I.e.
-
- + indent doctest blocks by nesting in a quote environment. This is also
- the rendering by the HTML writer (html4css2.css).
- + apply the ``--literal-block-env`` setting also to doctest blocks.
-
- .. warning::
- (``--literal-block-env=verbatim`` and
- ``--literal-block-env=lstlistings`` fail with literal or doctest
- blocks nested in an admonition.
-
-* Two-way hyperlinked footnotes and support for symbol footnotes and
- ``--footnote-references=brackets`` with ``--use-latex-footnotes``.
-
-* The packages `fixltx2e` (providing LaTeX patches and the \textsubscript
- command) and `cmap` (including character maps in the generated PDF for
- better search and copy-and-paste operations) are now always loaded
- (configurable with custom templates_).
-
-Backwards compatibility:
- "Bug for bug compatibility" is not provided.
-
-
-New configuration setting defaults
-----------------------------------
-
-- font-encoding: "T1" (formerly implicitely set by 'ae').
-- use-latex-toc: true (ToC with page numbers).
-- use-latex-footnotes: true (no mixup with figures).
-
-Backwards compatibility:
- Reset to the former defaults with:
-
- | font-encoding: ''
- | use-latex-toc: False
- | use-latex-footnotes: False
-
- (in the config file) or the command line options:
-
- ``--figure-footnotes --use-docutils-toc --font-encoding=''``
-
-
-Cleaner LaTeX source
---------------------
-
-New features:
- * Remove redundant "double protection" from the encoding of the "special
- printing characters" and square brackets, e.g. ``\%`` instead of
- ``{\%}``.
- * Remove some spurious whitespace, e.g. ``\item [what:] -> \item[what:]``.
- * Use conventional style for "named" macros, e.g. ``\dots{}`` instead of
- ``{\dots}``
-
-Backwards compatibility:
- Changes do not affect the output.
-
-
-LaTeX style sheets
-------------------
-
-New Feature:
- LaTeX packages can be used as ``--stylesheet`` argument without
- restriction.
-
-Implementation:
- Use ``\usepackage`` if style sheet ends with ``.sty`` or has no
- extension and ``\input`` else.
-
-Rationale:
- while ``\input`` works with extension as well as without extension,
- ``\usepackage`` expects the package name without extension. (The latex2e
- writer will strip a ``.sty`` extension.)
-
-
-Backwards compatibility:
- Up to Docutils 0.5, if no filename extension is given in the
- ``stylesheet`` argument, ``.tex`` is assumed (by latex).
-
- Since Docutils 0.6, a stylesheet without filename extension is assumed to
- be a LaTeX package (``*.sty``) and referenced with the ``\usepackage``
- command.
-
-.. important::
- Always specify the extension if you want the style sheet to be
- ``\input`` by LaTeX.
-
-
-Templates
----------
-
-New Feature:
- Advanced configuration via custom templates.
-
-Implementation:
- A ``--template`` option and config setting allows specification of a
- template file.
-
-See the `LaTeX writer documentation`__ for details.
-
-__ latex.html#templates
-
-
-Custom roles
-------------
-
-New Feature: failsave implementation
- As with classes to HTML objects, class arguments are silently ignored if
- there is no styling rule for this class in a custom style sheet.
-
-New Feature: custom roles based on standard roles
- As class support needs to be handled by the LaTeX writer, this feature was
- not present "automatically" (as in HTML). Modified visit/depart_*()
- methods for the standard roles now call visit/depart_inline() if there are
- class arguments to the node.
-
-Backwards compatibility:
- The implementation is fully backwards compatible. (SVN versions 5742 to
- 5861 contained an implementation that did not work with commands expecting
- an argument.)
-
-Length units
-------------
-
-New Features:
- 1. Add default unit if none given.
- A poll on docutils-users favoured ``bp`` (Big Point: 1 bp = 1/72 in).
-
- 2. Do not change ``px`` to ``pt``.
-
- 3. Lengths specified in the document with unit "pt" will be written with
- unit "bp" to the LaTeX source.
-
-Rationale:
- 1. prevent LaTeX error "missing unit".
-
- 2. ``px`` is a valid unit in pdftex since version 1.3.0 released on
- 2005-02-04:
-
- 1px defaults to 1bp (or 72dpi), but can be changed with the
- ``\pdfpxdimen`` primitive.::
-
- \pdfpxdimen=1in % 1 dpi
- \divide\pdfpxdimen by 96 % 96 dpi
-
- -- http://www.tug.org/applications/pdftex/NEWS
-
- Modern TeX distributions use pdftex also for dvi generation (i.e.
- ``latex`` actually calls ``pdftex`` with some options).
-
- 3. In Docutils (as well as CSS) the unit symbol "pt" denotes the
- `Postscript point` or `DTP point` while LaTeX uses "pt" for the `LaTeX
- point`, which is unknown to Docutils and 0.3 % smaller.
-
- The `DTP point` is available in LaTeX as "bp" (big point):
-
- 1 pt = 1/72.25 in < 1 bp = 1/72 in
-
-
-Backwards compatibility:
- Images with width specification in ``px`` come out slightly (0.3 %) larger:
-
- 1 px = 1 bp = 1/72 in > 1 pt = 1/72.25 in
-
- This can be reset with ::
-
- \pdfpxdimen=1pt
-
-.. caution:: It is impossible to revert the change of lengths specified with
- "pt" or without unit in a style sheet, however the 0.3 % change will be
- imperceptible in most cases.
-
-.. admonition:: Error ``illegal unit px``
-
- The unit ``px`` is not defined in "pure" LaTeX, but introduced by the
- `pdfTeX` converter on 2005-02-04. `pdfTeX` is used in all modern LaTeX
- distributions (since ca. 2006) also for conversion into DVI.
-
- If you convert the LaTeX source with a legacy program, you might get the
- error ``illegal unit px``.
-
- If updating LaTeX is not an option, just remove the ``px`` from the length
- specification. HTML/CSS will default to ``px`` while the `latexe2` writer
- will add the fallback unit ``bp``.
-
-
-Font encoding
--------------
-
-New feature:
- Do not mix font-encoding and font settings: do not load the obsolete
- `ae` and `aeguill` packages unless explicitely required via the
- ``--stylesheet`` option.
-
- :font-encoding = "": do not load `ae` and `aeguill`, i.e.
-
- * do not change font settings,
- * do not use the fontenc package
- (implicitely loaded via `ae`),
- * use LaTeX default font encoding (OT1)
-
- :font-encoding = "OT1": load `fontenc` with ``\usepackage[OT1]{fontenc}``
-
-Example:
- ``--font-encoding=LGR,T1`` becomes ``\usepackage[LGR,T1]{fontenc}``
- (Latin, Latin-1 Supplement, and Greek)
-
-
-Backwards compatibility:
- Load the ae and aeguill packages if fontenc is not used.
-
-.. tip:: Using `ae` is not recommended. A similar look (but better
- implementation) can be achieved with the packages `lmodern`, `cmsuper`,
- or `cmlgr` all providing Computer Modern look-alikes in vector format and
- T1 encoding, e.g. ``--font-encoding=T1 --stylesheet=lmodern``.
-
-Sub- and superscript as text
-----------------------------
-
-New feature:
- Set sub- and superscript role argument in text mode not as math.
-
- Pass the role content to ``\textsubscript`` or ``\textsuperscript``.
-
-Backwards compatibility:
- The old implementation set the role content in Math mode, where
-
- * whitespace is ignored,
- * a different command set and font setting scheme is active,
- * Latin letters are typeset italic but numbers upright.
-
- Although it is possible to redefine ``\textsubscript`` and
- ``\textsuperscript`` to typeset the content in math-mode, this can lead to
- errors with certain input and is therefore not done in this style sheet.
-
-.. tip:: To get italic subscripts, define and use in your document
- `custom roles`_ like ``.. role:: sub(subscript)`` and
- ``.. role:: super(superscript)`` and define the "role commands"::
-
- \newcommand{\DUrolesub}{\itshape}
- \newcommand{\DUrolesuper}{\itshape}
-
- Alternatively, if you want all sub- and superscripts in italic, redefine
- the macros::
-
- %% \let\DUsup\textsubscript
- %% \let\DUsuper\textsuperscript
- %% \renewcommand*{\textsubscript}{\DUsub\itshape}
- %% \renewcommand*{\textsuperscript}{\DUsuper\itshape}
-
- This is not fully backwards compatible, as it will also set numbers in
- italic shape and not ignore whitespace.
-
-Page layout
------------
-
-New features:
- * Margins are configurable via the ``DIV=...`` document option.
-
- * The ``\raggedbottom`` setting is no longer inserted into the document. It
- is the default for article and report classes. If requested in combination
- with a book class, it can be given in a custom style sheet.
-
-Backwards compatibility:
- Up to version 0.5, use of `typearea` and a DIV setting of 12 were
- hard-coded into the latex2e writer ::
-
- \usepackage{typearea}
- \typearea{12}
-
- and the vertical alignment of lower boundary of the text area in book
- classes disabled via ::
-
- \raggedbottom
-
-
-ToC and section numbers
------------------------
-
-Better conformance to Docutils specifications.
-
-New feature:
- * The "depth" argument of the "contents" and "sectnum" directives is
- respected.
-
- * section numbering independent of 'use-latex-toc':
-
- + sections are only numbered if there is a "sectnum" directive in the
- document
-
- + section numbering by LaTeX if the "sectnum_xforms" config setting is
- False.
-
-Backwards compatibility:
-
- The previous behaviour was to always number sections if 'use-latex-toc' is
- true, using the document class defaults. It cannot be restored
- universally, the following code sets the default values of the "article"
- document class::
-
- \setcounter{secnumdepth}{3}
- \setcounter{tocdepth}{3}
-
-.. TODO or not to do? (Back-compatibility problems)
- * The default "depth" of the LaTeX-created ToC and the LaTeX section
- numbering is increased to the number of supported section levels.
-
-New feature:
- If 'use-latex-toc' is set, local tables of content are typeset using the
- 'minitoc' package (instead of being ignored).
-
-Backwards compatibility:
- Disable the creation of local ToCs (ignoring all special commands) by
- replacing ``\usepackage{minitoc} with ``\usepackage{mtcoff}``.
-
-
-Default font in admonitions and sidebar
----------------------------------------
-
-New feature:
- Use default font in admonitions and sidebar.
-
-Backward compatibility:
- See the fallback definitions for admonitions_, `topic title`_ and
- `sidebar`_.
-
-
-Figure placement
-----------------
-
-New feature:
- Use ``\floatplacement`` from the `float` package instead of
- "hard-coded" optional argument for the global setting.
-
- Default to ``\floatplacement{figure}{H}`` (here definitely). This
- corresponds most closely to the source and HTML placement (principle of
- least surprise).
-
-Backwards compatibility:
- Set the global default back to the previous used value::
-
- \usepackage{float}
- \floatplacement{figure}{htbp} % here, top, bottom, extra-page
-
-
-Figure and image alignment
---------------------------
-
-New features:
-
-a) Fix behaviour of 'align' argument to a figure (do not align figure
- contents).
-
- As the 'figwidth' argument is still ignored and the "natural width" of a
- figure in LaTeX is 100% \textwidth, setting the 'align' argument of a
- figure has currently no effect on the LaTeX output.
-
-b) Set default align of image in a figure to 'center'.
-
-c) Also center images that are wider than textwidth.
-
-d) Align images with class "align-[right|center|left]" (allows setting the
- alignment of an image in a figure).
-
-Backwards compatibility:
- There is no "automatic" way to reverse these changes via a style sheet.
-
-a) The alignment of the image can be set with the "align-left",
- "align-center" and "align-right" class arguments.
-
- As previously, the caption of a figure is aligned according to the
- document class -- configurable with a style sheet using the "caption"
- package.
-
-b) See a)
-
-c) Set the alignment of "oversized" images to "left" to get back the
- old placement.
-
-Shorter preamble
-----------------
-
-New feature:
- The document preamble is pruned to contain only relevant commands and
- settings.
-
-Packages that are no longer required
-````````````````````````````````````
-
-The following packages where required in pre-0.5 versions and still loaded
-with version 0.5::
-
- \usepackage{shortvrb}
- \usepackage{amsmath}
-
-
-Packages that are conditionally loaded
-``````````````````````````````````````
-
-Additional to the `typearea` for `page layout`_, the following packages are
-only loaded if actually required by doctree elements:
-
-Tables
-^^^^^^
-
-Standard package for tables across several pages::
-
- \usepackage{longtable}
-
-Extra space between text in tables and the line above them
-('array' is implicitely loaded by 'tabularx', see below)::
-
- \usepackage{array}
- \setlength{\extrarowheight}{2pt}
-
-Table cells spanning multiple rows::
-
- \usepackage{multirow}
-
-Docinfo
-^^^^^^^
-
-One-page tables with auto-width columns::
-
- \usepackage{tabularx}
-
-Images
-^^^^^^
-Include graphic files::
-
- \usepackage{graphicx}
-
-Problematic, Sidebar
-^^^^^^^^^^^^^^^^^^^^
-Set text and/or background colour, coloured boxes with ``\colorbox``::
-
- \usepackage{color}
-
-Floats for footnotes settings
-`````````````````````````````
-
-Settings for the use of floats for footnotes are only included if
-
-* the option "use-latex-footnotes" is False, and
-* there is at least one footnote in the document.
-
-::
-
- % begin: floats for footnotes tweaking.
- \setlength{\floatsep}{0.5em}
- \setlength{\textfloatsep}{\fill}
- \addtolength{\textfloatsep}{3em}
- \renewcommand{\textfraction}{0.5}
- \renewcommand{\topfraction}{0.5}
- \renewcommand{\bottomfraction}{0.5}
- \setcounter{totalnumber}{50}
- \setcounter{topnumber}{50}
- \setcounter{bottomnumber}{50}
- % end floats for footnotes
-
-
-Special lengths, commands, and environments
--------------------------------------------
-
-Removed definitions
-```````````````````
-
-admonition width
-^^^^^^^^^^^^^^^^
-The ``admonitionwith`` lenght is replaced by the more powerful
-``\DUadmonition`` command (see admonitions_).
-
-Backwards compatibility:
- The default value (90 % of the textwidth) is unchanged.
-
- To configure the admonition width, you must redefine the ``DUadmonition``
- command instead of changing the ``admonitionwith`` length value.
-
-
-Renamed definitions (now conditional)
-`````````````````````````````````````
-
-The names for special doctree elements are now prefixed with ``DU``.
-
-Up to version 0.5, all definitions were included in the preamble (before the
-style sheet) of every document -- even if not used in the body. Since
-version 0.6, fallback definitions are included after the style sheet and
-only if required.
-
-Customization is done by an alternative definition in a style sheet with
-``\newcommand`` instead of the former ``\renewcommand``.
-
-The following code provides the old definitions and maps them (or their
-custom variants) to the new interface.
-
-docinfo width
-^^^^^^^^^^^^^
-::
-
- \newlength{\docinfowidth}
- \setlength{\docinfowidth}{0.9\textwidth}
-
- \newlength{\DUdocinfowidth}
- \AtBeginDocument{\setlength{\DUdocinfowidth}{\docinfowidth}}
-
-line block
-^^^^^^^^^^
-::
-
- \newlength{\lineblockindentation}
- \setlength{\lineblockindentation}{2.5em}
- \newenvironment{lineblock}[1]
- {\begin{list}{}
- {\setlength{\partopsep}{\parskip}
- \addtolength{\partopsep}{\baselineskip}
- \topsep0pt\itemsep0.15\baselineskip\parsep0pt
- \leftmargin#1}
- \raggedright}
- {\end{list}}
-
- \newlength{\DUlineblockindent}
- \AtBeginDocument{\setlength{\DUlineblockindent}{\lineblockindentation}}
- \newenvironment{DUlineblock}[1]
- {\begin{lineblock}{#1}}
- {\end{lineblock}}
-
-local line width
-^^^^^^^^^^^^^^^^
-
-The ``\locallinewidth`` length for internal use in tables is replaced
-by ``\DUtablewidth``. It was never intended for customization::
-
- \newlength{\locallinewidth}
-
-option lists
-^^^^^^^^^^^^
-::
-
- \newcommand{\optionlistlabel}[1]{\bf #1 \hfill}
- \newenvironment{optionlist}[1]
- {\begin{list}{}
- {\setlength{\labelwidth}{#1}
- \setlength{\rightmargin}{1cm}
- \setlength{\leftmargin}{\rightmargin}
- \addtolength{\leftmargin}{\labelwidth}
- \addtolength{\leftmargin}{\labelsep}
- \renewcommand{\makelabel}{\optionlistlabel}}
- }{\end{list}}
-
- \newcommand{\DUoptionlistlabel}{\optionlistlabel}
- \newenvironment{DUoptionlist}
- {\begin{optionlist}{3cm}}
- {\end{optionlist}}
-
-rubric
-^^^^^^
-Now less prominent (not bold, normal size) restore with::
-
- \newcommand{\rubric}[1]{\subsection*{~\hfill {\it #1} \hfill ~}}
- \newcommand{\DUrubric}[2][class-arg]{\rubric{#2}}
-
-title reference role
-^^^^^^^^^^^^^^^^^^^^
-::
-
- \newcommand{\titlereference}[1]{\textsl{#1}}
- \newcommand{\DUroletitlereference}[1]{\titlereference{#1}}
-
-
-New definitions
-```````````````
-
-New Feature:
- Enable customization of some more Docutils elements with special commands
-
- :admonition: ``DUadmonition`` command (replacing ``\admonitionwidth``),
- :field list: ``DUfieldlist`` environment,
- :legend: ``DUlegend`` environment,
- :sidebar: ``\DUsidebar``, ``\DUtitle``, and
- ``DUsubtitle`` commands,
- :topic: ``\DUtopic`` and ``\DUtitle`` commands,
- :transition: ``\DUtransition`` command.
- :footnotes: ``\DUfootnotemark`` and ``\DUfootnotetext`` commands with
- hyperlink support using the Docutils-provided footnote label.
-
-Backwards compatibility:
- In most cases, the default definition corresponds to the previously used
- construct. The following definitions restore the old behaviour in case of
- changes.
-
-admonitions
-^^^^^^^^^^^
-Use sans-serif fonts::
-
- \newcommand{\DUadmonition}[2][class-arg]{%
- \begin{center}
- \fbox{\parbox{0.9\textwidth}{\sffamily #2}}
- \end{center}
- }
-
-dedication
-^^^^^^^^^^
-Do not center::
-
- \newcommand{\DUtopicdedication}[1]{#1}
-
-But center the title::
-
- \newcommand*{\DUtitlededication}[1]{\centerline{\textbf{#1}}}
-
-sidebar
-^^^^^^^
-Use sans-serif fonts, a frame, and a darker shade of grey::
-
- \providecommand{\DUsidebar}[2][class-arg]{%
- \begin{center}
- \sffamily
- \fbox{\colorbox[gray]{0.80}{\parbox{0.9\textwidth}{#2}}}
- \end{center}
- }
-
-sidebar sub-title
-^^^^^^^^^^^^^^^^^
-Bold instead of emphasized::
-
- \providecommand*{\DUsubtitlesidebar}[1]{\hspace*{\fill}\\
- \textbf{#1}\smallskip}
-
-topic
-^^^^^
-No quote but normal text::
-
- \newcommand{\DUtopic}[2][class-arg]{%
- \ifcsname DUtopic#1\endcsname%
- \csname DUtopic#1\endcsname{#2}%
- \else
- #2
- \fi
- }
-
-topic title
-^^^^^^^^^^^
-Title for "topics" (admonitions, sidebar).
-
-Larger font size::
-
- \providecommand*{\DUtitletopic}[1]{\textbf{\large #1}\smallskip}
-
-transition
-^^^^^^^^^^
-Do not add vertical space after the transition. ::
-
- \providecommand*{\DUtransition}[1][class-arg]{%
- \hspace*{\fill}\hrulefill\hspace*{\fill}}
Modified: trunk/docutils/docs/user/latex.txt
===================================================================
--- trunk/docutils/docs/user/latex.txt 2020-02-06 12:47:16 UTC (rev 8486)
+++ trunk/docutils/docs/user/latex.txt 2020-02-06 12:47:25 UTC (rev 8487)
@@ -1848,14 +1848,8 @@
* The Docutils HISTORY_ lists all changes during the history of docutils.
Important changes are summarized in the RELEASE-NOTES_.
-* docutils-05-compat.sty_ is a `style sheet`_ that provides best possible
- backwards compatibility with release 0.5.
-
.. _HISTORY: ../../HISTORY.html
.. _RELEASE-NOTES: ../../RELEASE-NOTES.html
-.. _docutils-05-compat: docutils-05-compat.sty.html
-.. _docutils-05-compat.sty:
- ../../docutils/writers/latex2e/docutils-05-compat.sty
Problems
Deleted: trunk/docutils/docutils/writers/latex2e/docutils-05-compat.sty
===================================================================
--- trunk/docutils/docutils/writers/latex2e/docutils-05-compat.sty 2020-02-06 12:47:16 UTC (rev 8486)
+++ trunk/docutils/docutils/writers/latex2e/docutils-05-compat.sty 2020-02-06 12:47:25 UTC (rev 8487)
@@ -1,738 +0,0 @@
-% ==================================================================
-% Changes to the Docutils latex2e writer since version 0.5
-% ==================================================================
-%
-% A backwards compatibility style sheet
-% *************************************
-%
-% :Author: Guenter Milde
-% :Contact: mi...@us...
-% :Revision: $Revision: 6156 $
-% :Date: $Date: 2009-02-24 $
-% :Copyright: © 2009 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.
-%
-% :Abstract: This file documents changes and provides a style for best
-% possible compatibility to the behaviour of the `latex2e`
-% writer of Doctutils release 0.5.
-%
-% .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause
-%
-% ::
-
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{docutils-05-compat}
-[2009/03/26 v0.1 compatibility with rst2latex from Docutils 0.5]
-
-% .. contents::
-% :depth: 3
-%
-% Usage
-% =====
-%
-% * To get an (almost) identic look for your old documents,
-% place ``docutils-05-compat.sty`` in the TEXINPUT path (e.g.
-% the current work directory) and pass the
-% ``--stylesheet=docutils-05-compat`` option to ``rst2latex.py``.
-%
-% * To use your custom stylesheets without change, add them to the
-% compatibility style, e.g.
-% ``--stylesheet="docutils-05-compat,mystyle.tex``.
-%
-% .. tip:: As the changes include bug fixes that are partly reverted by this
-% style, it is recommended to adapt the stylesheets to the new version or
-% copy just the relevant parts of this style into them.
-%
-% Changes since 0.5
-% =================
-%
-% Bugfixes
-% --------
-%
-% * Newlines around comments, targets and references prevent run-together
-% paragraphs.
-%
-% + An image directive with hyperlink reference or target did not start a
-% new paragraph (e.g. the first two image examples in
-% standalone_rst_latex.tex).
-%
-% + Paragraphs were not separated if there was a (hyper) target definition
-% inbetween.
-%
-% + Paragraphs did run together, if separated by a comment-paragraph in the
-% rst source.
-%
-% * Fixed missing and spurious internal links/targets.
-% Internal links now take you to the correct place.
-%
-% * Verbose and linked system messages.
-%
-% * `Figure and image alignment`_ now conforms to the rst definition.
-%
-% * Put `header and footer directive`__ content in \DUheader respective
-% \DUfooter macros (ignored by the default style/template).
-%
-% (They were put inside hard-coded markup at the top/bottom of the document
-% without an option to get them on every page.)
-%
-% __ ../ref/rst/directives.html#document-header-footer
-%
-% * Render doctest blocks as literal blocks (fixes bug [1586058] doctest block
-% nested in admonition). I.e.
-%
-% + indent doctest blocks by nesting in a quote environment. This is also
-% the rendering by the HTML writer (html4css2.css).
-% + apply the ``--literal-block-env`` setting also to doctest blocks.
-%
-% .. warning::
-% (``--literal-block-env=verbatim`` and
-% ``--literal-block-env=lstlistings`` fail with literal or doctest
-% blocks nested in an admonition.
-%
-% * Two-way hyperlinked footnotes and support for symbol footnotes and
-% ``--footnote-references=brackets`` with ``--use-latex-footnotes``.
-%
-% * The packages `fixltx2e` (providing LaTeX patches and the \textsubscript
-% command) and `cmap` (including character maps in the generated PDF for
-% better search and copy-and-paste operations) are now always loaded
-% (configurable with custom templates_).
-%
-% Backwards compatibility:
-% "Bug for bug compatibility" is not provided.
-%
-%
-% New configuration setting defaults
-% ----------------------------------
-%
-% - font-encoding: "T1" (formerly implicitely set by 'ae').
-% - use-latex-toc: true (ToC with page numbers).
-% - use-latex-footnotes: true (no mixup with figures).
-%
-% Backwards compatibility:
-% Reset to the former defaults with:
-%
-% | font-encoding: ''
-% | use-latex-toc: False
-% | use-latex-footnotes: False
-%
-% (in the config file) or the command line options:
-%
-% ``--figure-footnotes --use-docutils-toc --font-encoding=''``
-%
-%
-% Cleaner LaTeX source
-% --------------------
-%
-% New features:
-% * Remove redundant "double protection" from the encoding of the "special
-% printing characters" and square brackets, e.g. ``\%`` instead of
-% ``{\%}``.
-% * Remove some spurious whitespace, e.g. ``...
[truncated message content] |