|
From: <mi...@us...> - 2023-04-14 00:12:18
|
Revision: 9349
http://sourceforge.net/p/docutils/code/9349
Author: milde
Date: 2023-04-14 00:12:15 +0000 (Fri, 14 Apr 2023)
Log Message:
-----------
Update HISTORY and RELEASE-NOTES for the 0.20 release.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-04-14 00:12:07 UTC (rev 9348)
+++ trunk/docutils/HISTORY.txt 2023-04-14 00:12:15 UTC (rev 9349)
@@ -13,8 +13,8 @@
.. contents::
-Release 0.20b (unpublished)
-===========================
+Release 0.20 (unpublished)
+==========================
* General
@@ -25,12 +25,12 @@
- New argument "auto_encode" for `publish_string()`,
`publish_from_docstring()` and `publish_programmatically()`.
- - New functions `rst2…()` for use as "console_scripts" `entry point`_.
+ - New functions `rst2…()` for use as "console_scripts" `entry points`_.
* docutils/frontend.py
- - New setting ``output``. Obsoletes the ``<destination>`` positional
- argument (cf. "Future changes" in the RELEASE-NOTES).
+ - New configuration setting output_. Obsoletes the ``<destination>``
+ positional argument (cf. `Future changes` in the RELEASE-NOTES_).
* docutils/io.py
@@ -59,17 +59,19 @@
* docutils/transforms/frontmatter.py
- - `DocInfo` now accepts author names with initial like "A. Einstein"
- (that are `parsed as enumerated list`__) in "author" fields
- instead of rising an error.
+ - Accept author names with initials like ``A. Einstein`` in the "author"
+ `bibliographic field`_ instead of rising an error
+ (generally, such names are `parsed as enumerated list`__).
+ .. _bibliographic field:
+ docs/ref/rst/restructuredtext.html#bibliographic-fields
__ docs/ref/rst/restructuredtext.html#enumerated-lists
* docutils/transforms/references.py
- - Ignore `citation_reference` nodes if the "use_bibex" setting is
- active. In this case, citations are provided by LaTeX/BibTeX.
- Fixes bug #384.
+ - `DanglingReferences` ignores `citation_reference` nodes if the
+ "use_bibex" setting is active. (In this case, citations are provided
+ by LaTeX/BibTeX.) Fixes bug #384.
* docutils/utils/__init__.py
@@ -84,7 +86,8 @@
* docutils/utils/math/tex2mathml_extern.py
- - Support `pandoc` as LaTeX to MathML converter. Patch by Ximin Luo.
+ - Support `Pandoc` as alternative LaTeX to MathML converter.
+ Patch by Ximin Luo.
* docutils/writers/_html_base.py
@@ -98,14 +101,16 @@
- Wrap definition lists with "details" class argument in a <div>
with the "id" and "class" values of the list node.
- - Use dpub-ARIA role "doc-footnote" (instead of ARIA role "note")
+ - Use dpub-ARIA role "doc-footnote__" (instead of ARIA role "note")
for footnotes.
+ __ https://www.w3.org/TR/dpub-aria-1.1/#doc-footnote
+
* docutils/writers/latex2e/__init__.py
- - Do not insert ``\usepackage[utf8]{inputenc}`` into UTF-8 encoded
- LaTeX sources. UTF-8 is the default encoding for LaTeX2e since 2018.
- - Fix handling of the "use_bibtex" setting.
+ - Do not load the `inputenc` package in UTF-8 encoded LaTeX sources.
+ (UTF-8 is the default encoding for LaTeX2e since 2018).
+ - Fix behaviour of the use_bibtex_ setting.
- Outsource parts of `depart_document()` to new auxiliary methods
`make_title()` and `append_bibliography()`.
- Ensure POSIX paths in stylesheet loading macros.
@@ -112,16 +117,17 @@
* docutils/writers/latex2e/titlepage.tex
- - Drop ``\usepackage{fixltx2e}`` from template. (Obsolete since 2015
- and dropped from other templates in Docutils 0.14.)
+ - Drop ``\usepackage{fixltx2e}`` from template.
+ (Obsolete since 2015 and dropped from other templates in Docutils 0.14.)
* docutils/writers/manpage.py
- - Do not output empty "manual" in ``.TH``
+ - Do not output empty "manual" in ``.TH``.
* docutils/writers/xetex/__init__.py
- - Ignore settings in the [latex2e writer] configuration file section.
+ - Ignore settings in the [latex2e writer] configuration file section
+ (users can place common settings in section [latex writers]).
* setup.py
@@ -156,6 +162,7 @@
- Moved ``quicktest.py`` to ``tools/dev/``.
+
Release 0.19 (2022-07-05)
=========================
@@ -258,9 +265,6 @@
- New ``docutils``" console script `entry point`_. Fixes bug #447.
- .. _entry point:
- https://packaging.python.org/en/latest/specifications/entry-points/
-
* test/alltests.py
- Always encode the log file ``alltests.out`` using "utf-8".
@@ -284,7 +288,11 @@
- Options ``-h`` and ``--help`` print short usage message.
+.. _entry point:
+.. _entry points:
+ https://packaging.python.org/en/latest/specifications/entry-points/
+
Release 0.18.1 (2021-11-23)
===========================
@@ -355,8 +363,6 @@
- New option `image_loading`_. Support "lazy" loading of images.
Obsoletes `embed_images`_.
- .. _image_loading: docs/user/config.html#image-loading
-
* docutils/writers/pseudoxml.py
- Fix spelling of setting `detailed`_.
@@ -1415,12 +1421,6 @@
- docutils.utils is now a package (providing a place for sub-modules)
- .. note:: docutils/math, docutils/error_reporting.py, and
- docutils/urischemes.py will move to the utils package in the next
- release, too. See RELEASE-NOTES__
-
- __ RELEASE-NOTES.html
-
- DependencyList uses io.FileOutput and 'utf-8' encoding to prevent
errors recording non-ASCII filenames (fixes [ 3434355 ]).
@@ -1819,8 +1819,7 @@
- Configuration files are now assumed and required to be
UTF-8-encoded.
- Paths of applied configuration files are now recorded in the
- runtime setting `_config_files`_ (accessible via
- `dump_settings`_).
+ runtime setting `_config_files`_ (accessible via `dump_settings`_).
- Added `strip_elements_with_classes`_ and `strip_classes`_ settings.
* docutils/io.py:
@@ -4140,6 +4139,7 @@
.. References
==========
+.. _RELEASE-NOTES: RELEASE-NOTES.html
.. _`_config_files`: docs/user/config.html#config-files
.. _auto_id_prefix: docs/user/config.html#auto-id-prefix
.. _detailled:
@@ -4167,6 +4167,7 @@
.. _legacy_column_widths: docs/user/config.html#legacy-column-widths
.. _literal_block_env: docs/user/config.html#literal-block-env
.. _math_output: docs/user/config.html#math-output
+.. _output: docs/user/config.html#output
.. _output_encoding: docs/user/config.html#output-encoding
.. _raw_enabled: docs/user/config.html#raw-enabled
.. _reference_label: docs/user/config.html#reference-label
@@ -4186,7 +4187,6 @@
.. _view_mode: docs/user/config.html#view-mode
-
..
Local Variables:
mode: indented-text
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-04-14 00:12:07 UTC (rev 9348)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-04-14 00:12:15 UTC (rev 9349)
@@ -20,7 +20,7 @@
Future changes
==============
-Drop support for Python 3.7 and 3.8 in Docutils 0.21.
+Drop support for Python 3.7 and 3.8 in Docutils 0.21.
* Usage:
@@ -28,8 +28,8 @@
points`_ (without the ``.py`` extension) instead of installing the
``rst2*.py`` `front end tools`_ in the binary PATH. [#]_
- You may use the `generic command line front end tool`_ as a
- future-proof command, for example:
+ You may use the ``docutils`` `generic command line front end tool`_
+ as a future-proof command, for example:
.. code:: diff
@@ -65,7 +65,7 @@
__ docs/user/html.html#html
-* The command-line usage pattern will change:
+* The _`command-line usage pattern` will change:
.. code:: diff
@@ -105,7 +105,7 @@
* "html5" writer:
- Stop setting the "footnote-reference" class value for footnote
- references in Docutils 0.21.
+ references in Docutils 0.21.
Since 0.18, you can use the CSS selector
``[role="doc-noteref"]`` instead of ``.footnote-reference``
(see minimal.css for examples).
@@ -117,33 +117,34 @@
__ https://www.w3.org/TR/2014/REC-html5-20141028/grouping-content.html
#the-blockquote-element
+ - Change the default value for math_output_ to "MathML" in Docutils 0.22.
+
- Remove option ``--embed-images`` (obsoleted by "image_loading_")
- in Docutils 2.0.
+ in Docutils 2.0.
- - Change the default value for math_output_ to "MathML" in Docutils 0.22.
-
* "latex2e" writer:
- Change default of use_latex_citations_ setting to True
- in Docutils 1.0.
+ in Docutils 1.0.
- Change default of legacy_column_widths_ setting to False
- in Docutils 1.0.
+ in Docutils 1.0.
- Remove ``use_verbatim_when_possible`` setting
- (use literal_block_env_: verbatim) in Docutils 2.0.
+ (use literal_block_env_: verbatim) in Docutils 2.0.
-* The default value of the `auto_encode` argument of
- `core.publish_str()` and `core.publish_programmatically()`
- will change to ``False`` in Docutils 0.22.
+* The default value of the `auto_encode` argument of `core.publish_str()`,
+ `core.publish_from_doctree()`, and `core.publish_programmatically()`
+ will change to ``False`` in Docutils 0.22.
+ The functions will then return a `str` object by default.
* Remove the "rawsource" argument from `nodes.Text.__init__()`
- (deprecated and ignored since Docutils 0.18) in Docutils 2.0.
+ (deprecated and ignored since Docutils 0.18) in Docutils 2.0.
* Remove the compatibility hacks `nodes.reprunicode` and `nodes.ensure_str()`
- in Docutils 0.21 or later. They are not required with Python 3.x.
+ in Docutils 0.21 or later. They are not required with Python 3.x.
-* Drop support for `old-format configuration files`_ in Docutils 2.0.
+* Drop support for `old-format configuration files`_ in Docutils 2.0.
* Remove file ``install.py`` in Docutils 0.21.
See README.txt__ for alternatives.
@@ -180,6 +181,10 @@
Release 0.20 (unpublished)
==========================
+.. Note::
+
+ Docutils 0.20 is the last version supporting Python 3.7 and 3.8.
+
* Output changes:
HTML5:
@@ -190,19 +195,29 @@
- Settings in the [latex2e writer] configuration file section
are now ignored by the "xetex" writer.
- Move settings intended for both, "xetex" and "latex2e" writers
- to section `[latex writers]`_.
+ Users can place common settings in section `[latex writers]`_.
.. _[latex writers]: docs/user/config.html#latex-writers
-* The new function argument `auto_encode` for `core.publish_string()` and
- `core.publish_programmatically()` selects whether the output document is
+ - New command line setting output_. Obsoletes the ``<destination>``
+ positional argument (cf. `future changes`__).
+
+ __ `command-line usage pattern`_
+
+* The new function argument `auto_encode` for Publisher convenience
+ functions with `String I/O`_ selects whether the output document is
encoded and returned as `bytes` instance. The default is ``True`` (for
- backwards compatibility) and will change to ``False`` in Docutils 0.22.
+ backwards compatibility) and will change to ``False`` in Docutils 0.22.
+* `utils.find_file_in_dirs()` now returns a POSIX path also on Windows;
+ `utils.get_stylesheet_list()` no longer converts ``\`` to ``/``.
+
* Bugfixes and improvements (see HISTORY_).
+.. _String I/O: docs/api/publisher.html#string-i-o
+.. _output: docs/user/config.html#output
+
Release 0.19 (2022-07-05)
=========================
@@ -245,7 +260,7 @@
.. Note::
- Docutils 0.18.x is the last version supporting Python 2.7, 3.5, and 3.6.
+ Docutils 0.18.1 is the last version supporting Python 2.7, 3.5, and 3.6.
* ``nodes.Node.traverse()`` returns a list again to restore backwards
compatibility (fixes bug #431).
@@ -446,13 +461,9 @@
Release 0.16 (2020-01-12)
=========================
-.. Note::
+Docutils 0.16.x supports Python 2.7 and Python >= 3.5 natively,
+without the use of the ``2to3`` tool.
- Docutils 0.15.x is the last version supporting Python 2.6, 3.3 and 3.4.
-
- Docutils 0.16.x supports Python 2.7 and Python >= 3.5 natively,
- without the use of the ``2to3`` tool.
-
* reStructuredText:
- Keep `backslash escapes`__ in the document tree. This allows, e.g.,
@@ -496,14 +507,12 @@
Release 0.15 (2019-07-20)
=========================
+Docutils 0.15.x is compatible with Python versions 2.6, 2.7 and 3.3 to 3.5.
+
.. Note::
- Docutils 0.14.x is the last version supporting Python 2.4, 2.5,
- 3.1, and 3.2.
+ Docutils 0.15.x is the last version supporting Python 2.6, 3.3 and 3.4.
- Docutils 0.15.x is compatible with Python versions 2.6, 2.7 and 3.3 to 3.5
- (cf. `Python 3 compatibility`_).
-
* reStructuredText:
- Allow embedded colons in field list field names (before, tokens like
@@ -517,6 +526,11 @@
Release 0.14 (2017-08-03)
=========================
+.. Note::
+
+ Docutils 0.14.x is the last version supporting Python 2.4, 2.5,
+ 3.1, and 3.2.
+
* docutils/docs/ref/docutils.dtd:
- Enable validation of Docutils XML documents against the DTD:
@@ -645,13 +659,8 @@
Release 0.10 (2012-12-16)
=========================
-.. Note::
+Docutils 0.10 is compatible with Python versions from 2.4 to 3.2.
- Docutils 0.9.x is the last version supporting Python 2.3.
-
- Docutils 0.10 is compatible with Python versions from 2.4 to 3.2
- (cf. `Python 3 compatibility`_).
-
* General:
- SmartQuotes transform for typographic quotes and dashes.
@@ -691,6 +700,10 @@
Release 0.9.1 (2012-06-17)
==========================
+.. Note::
+
+ Docutils 0.9.1 is the last version supporting Python 2.3.
+
* General:
Several fixes for Python 3 usage.
@@ -862,13 +875,9 @@
Release 0.6 (2009-10-11)
========================
-.. Note::
+Docutils 0.6 is compatible with Python versions from 2.3 up to 2.6
+and convertible to 3.1 code.
- Docutils 0.5 is the last version supporting Python 2.2.
-
- Docutils 0.6 is compatible with Python versions from 2.3 up to 2.6
- and convertible to 3.1 code.
-
.. note::
The "newlatex" writer is orphaned.
@@ -931,6 +940,10 @@
Release 0.5 (2008-06-25)
========================
+.. Note::
+
+ Docutils 0.5 is the last version supporting Python 2.2.
+
Components:
* HTML writer.
@@ -984,12 +997,10 @@
.. Note::
- Docutils 0.4.x is the last version that will support Python 2.1.
- Docutils 0.5 will *not* be compatible with Python 2.1; Python 2.2
- or later will be required.
+ Docutils 0.4 is the last version supporting Python 2.1.
- Docutils 0.4.x is the last version that will make compromises in
- its HTML output for Netscape Navigator 4. Docutils 0.5 will
+ It is also the last version that will make compromises in
+ its HTML output for Netscape Navigator 4. Docutils 0.5 will
require more up-to-date browsers (the exact definition is to be
determined).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2023-04-16 20:46:41
|
Revision: 9350
http://sourceforge.net/p/docutils/code/9350
Author: grubert
Date: 2023-04-16 20:46:39 +0000 (Sun, 16 Apr 2023)
Log Message:
-----------
Fix message for nonconforming docinfo-Authors.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/test/test_transforms/test_docinfo.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-04-14 00:12:15 UTC (rev 9349)
+++ trunk/docutils/HISTORY.txt 2023-04-16 20:46:39 UTC (rev 9350)
@@ -157,6 +157,10 @@
- Fix regex to match multiline message "requires ... recommonmark"
+* test/test_transforms/test_docinfo.py
+
+ - Fix message for nonconforming docinfo-Authors.
+
* tools/
- Moved ``quicktest.py`` to ``tools/dev/``.
Modified: trunk/docutils/test/test_transforms/test_docinfo.py
===================================================================
--- trunk/docutils/test/test_transforms/test_docinfo.py 2023-04-14 00:12:15 UTC (rev 9349)
+++ trunk/docutils/test/test_transforms/test_docinfo.py 2023-04-16 20:46:39 UTC (rev 9350)
@@ -358,7 +358,7 @@
Shaw
<system_message level="2" line="3" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
+ Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
<field classes="authors">
<field_name>
Authors
@@ -368,7 +368,7 @@
<list_item>
<system_message level="2" line="6" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
+ Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
<field classes="authors">
<field_name>
Authors
@@ -381,7 +381,7 @@
Two
<system_message level="2" line="10" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
+ Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
<field classes="authors">
<field_name>
Authors
@@ -394,7 +394,7 @@
Two
<system_message level="2" line="15" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item.
+ Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
"""],
["""\
.. RCS keyword extraction.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-17 20:26:34
|
Revision: 9351
http://sourceforge.net/p/docutils/code/9351
Author: milde
Date: 2023-04-17 20:26:33 +0000 (Mon, 17 Apr 2023)
Log Message:
-----------
Fix test failure introduced in [r9348].
Reword and wrap warning message for incompatible content
of the bibliographic field "author".
Adapt "frontmatter" unit test cases.
Modified Paths:
--------------
trunk/docutils/docutils/transforms/frontmatter.py
trunk/docutils/test/test_transforms/test_docinfo.py
Modified: trunk/docutils/docutils/transforms/frontmatter.py
===================================================================
--- trunk/docutils/docutils/transforms/frontmatter.py 2023-04-16 20:46:39 UTC (rev 9350)
+++ trunk/docutils/docutils/transforms/frontmatter.py 2023-04-17 20:26:33 UTC (rev 9351)
@@ -513,14 +513,15 @@
raise TransformError
except TransformError:
field[-1] += self.document.reporter.warning(
- 'Bibliographic field "%s" incompatible with extraction: '
- 'it must contain either a single paragraph (with authors '
- 'separated by one of "%s"), multiple paragraphs (one per '
- 'author), or a bullet list with one paragraph (one author) '
- 'per item. Remember that leading initials can cause '
- '(mis)recognizing names as enumerated lists.'
- % (name, ''.join(self.language.author_separators)),
- base_node=field)
+ f'Cannot extract "{name}" from bibliographic field:\n'
+ f'Bibliographic field "{name}" must contain either\n'
+ ' a single paragraph (with author names separated by one of '
+ f'"{"".join(self.language.author_separators)}"),\n'
+ ' multiple paragraphs (one per author),\n'
+ ' or a bullet list with one author name per item.\n'
+ 'Note: Leading initials can cause (mis)recognizing names '
+ 'as enumerated list.',
+ base_node=field)
raise
def authors_from_one_paragraph(self, field):
Modified: trunk/docutils/test/test_transforms/test_docinfo.py
===================================================================
--- trunk/docutils/test/test_transforms/test_docinfo.py 2023-04-16 20:46:39 UTC (rev 9350)
+++ trunk/docutils/test/test_transforms/test_docinfo.py 2023-04-17 20:26:33 UTC (rev 9351)
@@ -358,7 +358,12 @@
Shaw
<system_message level="2" line="3" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
+ Cannot extract "Authors" from bibliographic field:
+ Bibliographic field "Authors" must contain either
+ a single paragraph (with author names separated by one of ";,"),
+ multiple paragraphs (one per author),
+ or a bullet list with one author name per item.
+ Note: Leading initials can cause (mis)recognizing names as enumerated list.
<field classes="authors">
<field_name>
Authors
@@ -368,7 +373,12 @@
<list_item>
<system_message level="2" line="6" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
+ Cannot extract "Authors" from bibliographic field:
+ Bibliographic field "Authors" must contain either
+ a single paragraph (with author names separated by one of ";,"),
+ multiple paragraphs (one per author),
+ or a bullet list with one author name per item.
+ Note: Leading initials can cause (mis)recognizing names as enumerated list.
<field classes="authors">
<field_name>
Authors
@@ -381,7 +391,12 @@
Two
<system_message level="2" line="10" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
+ Cannot extract "Authors" from bibliographic field:
+ Bibliographic field "Authors" must contain either
+ a single paragraph (with author names separated by one of ";,"),
+ multiple paragraphs (one per author),
+ or a bullet list with one author name per item.
+ Note: Leading initials can cause (mis)recognizing names as enumerated list.
<field classes="authors">
<field_name>
Authors
@@ -394,7 +409,12 @@
Two
<system_message level="2" line="15" source="test data" type="WARNING">
<paragraph>
- Bibliographic field "Authors" incompatible with extraction: it must contain either a single paragraph (with authors separated by one of ";,"), multiple paragraphs (one per author), or a bullet list with one paragraph (one author) per item. Remember that leading initials can cause (mis)recognizing names as enumerated lists.
+ Cannot extract "Authors" from bibliographic field:
+ Bibliographic field "Authors" must contain either
+ a single paragraph (with author names separated by one of ";,"),
+ multiple paragraphs (one per author),
+ or a bullet list with one author name per item.
+ Note: Leading initials can cause (mis)recognizing names as enumerated list.
"""],
["""\
.. RCS keyword extraction.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-17 20:26:44
|
Revision: 9352
http://sourceforge.net/p/docutils/code/9352
Author: milde
Date: 2023-04-17 20:26:41 +0000 (Mon, 17 Apr 2023)
Log Message:
-----------
The "null" writer will generate an empty string in Docutils 0.22.
Update writer documentation to Python 3 terminology.
Format multi-line docstrings according to policies.
Writers generate `str` or `bytes` output.
In future, the "null" writer will also generate `str` output
for consistency with other writers and the documentation.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/writers/__init__.py
trunk/docutils/docutils/writers/null.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-04-17 20:26:33 UTC (rev 9351)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-04-17 20:26:41 UTC (rev 9352)
@@ -133,6 +133,8 @@
- Remove ``use_verbatim_when_possible`` setting
(use literal_block_env_: verbatim) in Docutils 2.0.
+* "null" writer: output will change to the empty string in Docutils 0.22.
+
* The default value of the `auto_encode` argument of `core.publish_str()`,
`core.publish_from_doctree()`, and `core.publish_programmatically()`
will change to ``False`` in Docutils 0.22.
Modified: trunk/docutils/docutils/writers/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/__init__.py 2023-04-17 20:26:33 UTC (rev 9351)
+++ trunk/docutils/docutils/writers/__init__.py 2023-04-17 20:26:41 UTC (rev 9352)
@@ -36,19 +36,23 @@
universal.StripClassesAndElements]
document = None
- """The document to write (Docutils doctree); set by `write`."""
+ """The document to write (Docutils doctree); set by `write()`."""
output = None
- """Final translated form of `document` (Unicode string for text, binary
- string for other forms); set by `translate`."""
+ """Final translated form of `document`
+ (`str` for text, `bytes` for binary formats); set by `translate()`.
+ """
+
language = None
- """Language module for the document; set by `write`."""
+ """Language module for the document; set by `write()`."""
destination = None
"""`docutils.io` Output object; where to write the document.
- Set by `write`."""
+ Set by `write()`.
+ """
+
def __init__(self):
# Used by HTML and LaTeX writer for output fragments:
Modified: trunk/docutils/docutils/writers/null.py
===================================================================
--- trunk/docutils/docutils/writers/null.py 2023-04-17 20:26:33 UTC (rev 9351)
+++ trunk/docutils/docutils/writers/null.py 2023-04-17 20:26:41 UTC (rev 9352)
@@ -4,6 +4,9 @@
"""
A do-nothing Writer.
+
+`self.output` will change from ``None`` to the empty string
+in Docutils 0.22.
"""
from docutils import writers
@@ -18,4 +21,5 @@
config_section_dependencies = ('writers',)
def translate(self):
+ # output = None # TODO in 0.22
pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-17 20:26:53
|
Revision: 9353
http://sourceforge.net/p/docutils/code/9353
Author: milde
Date: 2023-04-17 20:26:50 +0000 (Mon, 17 Apr 2023)
Log Message:
-----------
Raise ValueError if StringOutput.write() gets data of unsupported type
... instead of returning/storing an "informal string representation".
Replaces the test for the "odt" writers" with binary output in
`core.publish_programmatically()` with a generic alternative
(that also catches the case of the "null" writer instead of writing
the string "None").
Modified Paths:
--------------
trunk/docutils/docutils/core.py
trunk/docutils/docutils/io.py
trunk/docutils/test/test_publisher.py
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2023-04-17 20:26:41 UTC (rev 9352)
+++ trunk/docutils/docutils/core.py 2023-04-17 20:26:50 UTC (rev 9353)
@@ -23,7 +23,6 @@
from docutils import (__version__, __version_details__, SettingsSpec,
io, utils, readers, writers)
-import docutils.writers.odf_odt # noqa:F401
from docutils.frontend import OptionParser
from docutils.readers import doctree
@@ -725,10 +724,6 @@
source_class=source_class,
destination_class=destination_class)
publisher.set_components(reader_name, parser_name, writer_name)
- if isinstance(publisher.writer,
- writers.odf_odt.Writer) and not auto_encode:
- raise ValueError('The ODT writer generates binary output and cannot '
- 'be used with `auto_encode=False`')
publisher.process_programmatic_settings(
settings_spec, settings_overrides, config_section)
publisher.set_source(source, source_path)
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2023-04-17 20:26:41 UTC (rev 9352)
+++ trunk/docutils/docutils/io.py 2023-04-17 20:26:50 UTC (rev 9353)
@@ -321,8 +321,8 @@
If `data` is a `bytes` instance, it is returned unchanged.
Otherwise it is encoded with `self.encoding`.
- If `self.encoding` is set to the pseudo encoding name "unicode",
- `data` must be a `str` instance and is returned unchanged.
+ Provisional: If `self.encoding` is set to the pseudo encoding name
+ "unicode", `data` must be a `str` instance and is returned unchanged.
"""
if self.encoding and self.encoding.lower() == 'unicode':
assert isinstance(data, str), ('output encoding is "unicode" '
@@ -649,6 +649,13 @@
def __init__(self, destination=None, destination_path=None,
encoding=None, error_handler='strict', auto_encode=True):
+ """Initialize self.
+
+ `auto_encode` determines the return type of `self.write()`.
+ Its default value will change to False in Docutils 0.22.
+ Other attributes are passed to `Output.__init__()`.
+ """
+
self.auto_encode = auto_encode
"""Let `write()` encode the output document and return `bytes`."""
super().__init__(destination, destination_path,
@@ -657,17 +664,19 @@
def write(self, data):
"""Store `data` in `self.destination`, and return it.
- If `self.auto_encode` is False, store and return a `str`
- sub-class instance with "encoding" and "errors" attributes
- set to `self.encoding` and `self.error_handler`.
+ If `self.auto_encode` is False, `data` must be a `str` instance
+ and is stored/returned as `str` sub-class `OutString` with
+ attributes "encoding" and "errors" set to `self.encoding`
+ and `self.error_handler` respectively.
- If `self.auto_encode` is True, encode `data` with `self.encoding`
- and `self.error_handler` and store/return a `bytes` instance.
- Exception:
- If `self.encoding` is set to the pseudo encoding name "unicode",
- `data` must be a `str` instance and is returned unchanged
- (cf. `Output.encode`).
- Beware that the `output_encoding`_ setting may affect the content
+ If `self.auto_encode` is True, `data` can be a `bytes` or `str`
+ instance and is stored/returned as a `bytes` instance
+ (`str` data is encoded with `self.encode()`).
+ Exception (provisional): If `self.encoding` is set to the pseudo
+ encoding name "unicode", `data` must be a `str` instance and is
+ stored/returned unchanged (cf. `Output.encode`).
+
+ Attention: the `output_encoding`_ setting may affect the content
of the output (e.g. an encoding declaration in HTML or XML or the
representation of characters as LaTeX macro vs. literal character).
"""
@@ -674,11 +683,12 @@
if self.auto_encode:
self.destination = self.encode(data)
return self.destination
-
- if not self.encoding or self.encoding.lower() == 'unicode':
+ if not isinstance(data, str):
+ raise ValueError('StringOutput.write() expects `str` instance, '
+ f'not {type(data)}.')
+ encoding = self.encoding
+ if not encoding or encoding.lower() == 'unicode':
encoding = None
- else:
- encoding = self.encoding
self.destination = OutString(data, encoding, self.error_handler)
return self.destination
Modified: trunk/docutils/test/test_publisher.py
===================================================================
--- trunk/docutils/test/test_publisher.py 2023-04-17 20:26:41 UTC (rev 9352)
+++ trunk/docutils/test/test_publisher.py 2023-04-17 20:26:50 UTC (rev 9353)
@@ -150,10 +150,8 @@
TODO: return `str` with document as "flat XML" (.fodt).
"""
with self.assertRaises(ValueError) as cm:
- core.publish_string('test',
- writer_name='odt',
- auto_encode=False)
- self.assertIn('ODT writer generates binary output', str(cm.exception))
+ core.publish_string('test', writer_name='odt', auto_encode=False)
+ self.assertIn('expects `str` instance', str(cm.exception))
class PublishDoctreeTestCase(unittest.TestCase, docutils.SettingsSpec):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-18 23:50:50
|
Revision: 9356
http://sourceforge.net/p/docutils/code/9356
Author: milde
Date: 2023-04-18 23:50:48 +0000 (Tue, 18 Apr 2023)
Log Message:
-----------
Update documentation for the "csv-table" directive.
Document current behaviour and the roadmap to bring it in line
with the specification.
Add deprecation warnings for to-be-removed objects.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/ref/rst/directives.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/parsers/rst/directives/__init__.py
trunk/docutils/docutils/parsers/rst/directives/tables.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-04-17 20:27:15 UTC (rev 9355)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-04-18 23:50:48 UTC (rev 9356)
@@ -102,6 +102,18 @@
- Remove the input encoding auto-detection code in Docutils 1.0 or later.
+* "csv-table_" directive:
+
+ - Use the same CSV format for the main CSV data and the :header: option
+ (as specified in the documentation since addition of "csv-table_")
+ in Docutils 0.21.
+
+ - Move `parsers.rst.directives.Table.process_header_option()` to
+ `parsers.rst.directives.CSVTable` in Docutils 0.21.
+
+ - Remove `parsers.rst.directives.CSVTable.HeaderDialect`
+ in Docutils 0.22.
+
* "html5" writer:
- Stop setting the "footnote-reference" class value for footnote
@@ -178,6 +190,7 @@
.. _literal_block_env: docs/user/config.html#literal-block-env
.. _use_latex_citations: docs/user/config.html#use-latex-citations
.. _buildhtml.py: docs/user/tools.html#buildhtml-py
+.. _csv-table: docs/ref/rst/directives.html#csv-table
Release 0.20 (unpublished)
@@ -270,7 +283,7 @@
* re-add module ``parsers.rst.directives.html``
(stub, emits deprecation warning and loads
- "Meta" directive from ist new place at ``parsers.rst.directives.misc``.)
+ "Meta" directive from its new place at ``parsers.rst.directives.misc``.)
* Small bugfixes (see HISTORY_).
Modified: trunk/docutils/docs/ref/rst/directives.txt
===================================================================
--- trunk/docutils/docs/ref/rst/directives.txt 2023-04-17 20:27:15 UTC (rev 9355)
+++ trunk/docutils/docs/ref/rst/directives.txt 2023-04-18 23:50:48 UTC (rev 9356)
@@ -838,12 +838,13 @@
:Doctree Element: table_
:Directive Arguments: One, optional (table title).
:Directive Options: Possible (see below).
-:Directive Content: A CSV (comma-separated values) table.
+:Directive Content: A CSV (comma-separated values) table
+ or (with the `:file:`_ or `:url:`_ options) None
.. WARNING::
- The "csv-table" directive's ":file:" and ":url:" options represent
- a potential security holes. They can be disabled with the
+ The "csv-table" directive's `:file:`_ and `:url:`_ options represent
+ potential security holes. They can be disabled with the
"file_insertion_enabled_" runtime setting.
The "csv-table" directive is used to create a table from CSV
@@ -853,7 +854,7 @@
file).
* Block markup and inline markup within cells is supported. Line ends
- are recognized within cells.
+ are recognized within quoted cells.
* There is no support for checking that the number of columns in each
row is the same. The directive automatically adds empty entries at
@@ -868,8 +869,8 @@
:widths: 15, 10, 30
"Albatross", 2.99, "On a stick!"
- "Crunchy Frog", 1.49, "If we took the bones out, it wouldn't be
- crunchy, now would it?"
+ "Crunchy Frog", 1.49, "If we took the bones out,
+ it wouldn't be crunchy, now would it?"
"Gannet Ripple", 1.99, "On a stick!"
The following options are recognized:
@@ -876,11 +877,14 @@
``align`` : "left", "center", or "right"
The horizontal alignment of the table. (New in Docutils 0.13)
+
+.. _delimiter:
-``delim`` : char | "tab" | "space" [#whitespace-delim]_
- A one-character string used to separate fields.
- Defaults to ``,`` (comma). May be specified as a Unicode code
- point; see the unicode_ directive for syntax details.
+``delim`` : char | "tab" | "space"
+ A one-character string [#char-or-uni]_ used to separate data fields.
+ The special values "tab" and "space" are converted to the respective
+ whitespace characters. [#tab-expansion]_
+ Defaults to ``,`` (comma).
``encoding`` : string
The text encoding of the external CSV data (file or URL).
@@ -887,15 +891,16 @@
Defaults to the document's `input_encoding`_.
``escape`` : char
- A one-character string used to escape the
- delimiter or quote characters. May be specified as a Unicode
- code point; see the unicode_ directive for syntax details. Used
- when the delimiter is used in an unquoted field, or when quote
- characters are used within a field. The default is to double-up
- the character, e.g. "He said, ""Hi!"""
+ A one-character string [#char-or-uni]_ used to escape the delimiter_
+ or quote_ characters from the CSV parser.
+ The default is no CSV-escape character --
+ quote data fields containing the delimiter and double-up the quote
+ character, e.g. ``"He said, ""Hi!"""``.
+ The reStructuredText `escaping mechanism`_ is applied
+ after CSV parsing as part of parsing the field content for
+ reStructuredText markup.
- .. Add another possible value, "double", to explicitly indicate
- the default case?
+.. _`:file:`:
``file`` : string (newlines removed)
The local filesystem path to a CSV data file.
@@ -905,6 +910,10 @@
before any ``header-rows`` from the main CSV data. Must use the
same CSV format as the main CSV data.
+ .. note:: Currently, the header option uses a hard-coded
+ CSV dialect variant with the backslash as escape character.
+ This will change to the documented behaviour in Docutils 0.21.
+
``header-rows`` : integer
The number of rows of CSV data to use in the table header.
Defaults to 0.
@@ -913,17 +922,20 @@
Treat whitespace immediately following the delimiter as
significant. The default is to ignore such whitespace.
+.. _quote:
+
``quote`` : char
- A one-character string used to quote elements
- containing the delimiter or which start with the quote
- character. Defaults to ``"`` (quote). May be specified as a
- Unicode code point; see the unicode_ directive for syntax
- details.
+ A one-character string [#char-or-uni]_ used to quote fields
+ containing special characters, such as the delimiter, quote,
+ or new-line characters.
+ Defaults to ``"`` (quote).
``stub-columns`` : integer
- The number of table columns to use as stubs (row titles, on the
- left). Defaults to 0.
+ The number of table columns to use as stubs (row titles, on the left).
+ Defaults to 0.
+.. _`:url:`:
+
``url`` : string (whitespace removed)
An Internet URL reference to a CSV data file.
@@ -941,10 +953,18 @@
and the common options class_ and name_.
-.. [#whitespace-delim] Whitespace delimiters are supported only for external
- CSV files.
+.. [#char-or-uni] May be specified as a *Unicode character code*;
+ see the unicode_ directive for syntax details.
+.. [#tab-expansion] Note, that tabs can be used as separator only in
+ external files because all hard `tabs in rST sources are converted to
+ spaces`__.
+ __ restructuredtext.html#whitespace
+
+.. _escaping mechanism: restructuredtext.html#escaping-mechanism
+
+
List Table
==========
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2023-04-17 20:27:15 UTC (rev 9355)
+++ trunk/docutils/docs/user/config.txt 2023-04-18 23:50:48 UTC (rev 9356)
@@ -828,10 +828,12 @@
tab_width
~~~~~~~~~
-Number of spaces for hard tab expansion.
+Number of spaces for `hard tab expansion`_.
Default: 8. Option: ``--tab-width``.
+.. _hard tab expansion: ../ref/rst/restructuredtext.html#whitespace
+
trim_footnote_reference_space
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/docutils/docutils/parsers/rst/directives/__init__.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/__init__.py 2023-04-17 20:27:15 UTC (rev 9355)
+++ trunk/docutils/docutils/parsers/rst/directives/__init__.py 2023-04-18 23:50:48 UTC (rev 9356)
@@ -334,7 +334,7 @@
def single_char_or_unicode(argument):
"""
- A single character is returned as-is. Unicode characters codes are
+ A single character is returned as-is. Unicode character codes are
converted as in `unicode_code`. (Directive option conversion function.)
"""
char = unicode_code(argument)
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2023-04-17 20:27:15 UTC (rev 9355)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2023-04-18 23:50:48 UTC (rev 9356)
@@ -53,6 +53,11 @@
return title, messages
def process_header_option(self):
+ # Provisional
+ # * Will move to CSVTable in Docutils 0.21
+ # as it calls `self.HeaderDialect()` only defined in CSVTable.
+ # * Will change to use the same CSV dialect as the body to get in line
+ # with the specification in ref/rst/directives.txt in Docutils 0.21.
source = self.state_machine.get_source(self.lineno - 1)
table_head = []
max_header_cols = 0
@@ -132,7 +137,12 @@
class RSTTable(Table):
+ """
+ Class for the `"table" directive`__ for formal tables using rST syntax.
+ __ https://docutils.sourceforge.io/docs/ref/rst/directives.html
+ """
+
def run(self):
if not self.content:
warning = self.reporter.warning('Content block expected '
@@ -219,12 +229,15 @@
if 'escape' in options:
self.doublequote = False
self.escapechar = options['escape']
- csv.Dialect.__init__(self)
+ super().__init__()
class HeaderDialect(csv.Dialect):
- """CSV dialect to use for the "header" option data."""
+ """CSV dialect used for the "header" option data.
+ Deprecated. Will be removed in Docutils 0.22.
+ """
+
delimiter = ','
quotechar = '"'
escapechar = '\\'
@@ -234,9 +247,19 @@
lineterminator = '\n'
quoting = csv.QUOTE_MINIMAL
- def check_requirements(self):
- pass
+ def __init__(self):
+ warnings.warn('CSVTable.HeaderDialect will be removed '
+ 'in Docutils 0.22.',
+ PendingDeprecationWarning, stacklevel=2)
+ super().__init__()
+ @staticmethod
+ def check_requirements():
+ warnings.warn('CSVTable.check_requirements()'
+ ' is not required with Python 3'
+ ' and will be removed in Docutils 0.22.',
+ DeprecationWarning, stacklevel=2)
+
def run(self):
try:
if (not self.state.document.settings.file_insertion_enabled
@@ -247,7 +270,6 @@
nodes.literal_block(self.block_text, self.block_text),
line=self.lineno)
return [warning]
- self.check_requirements()
title, messages = self.make_title()
csv_data, source = self.get_csv_data()
table_head, max_header_cols = self.process_header_option()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2023-04-19 11:23:19
|
Revision: 9357
http://sourceforge.net/p/docutils/code/9357
Author: grubert
Date: 2023-04-19 11:23:17 +0000 (Wed, 19 Apr 2023)
Log Message:
-----------
tox.ini changedir to directory ``test`` to avoid path problems.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/tox.ini
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-04-18 23:50:48 UTC (rev 9356)
+++ trunk/docutils/HISTORY.txt 2023-04-19 11:23:17 UTC (rev 9357)
@@ -137,6 +137,7 @@
* tox.ini
- Extracted flake8 configuration and moved to ``.flake8``.
+ - changedir to directory ``test`` to avoid path problems.
* test/
Modified: trunk/docutils/tox.ini
===================================================================
--- trunk/docutils/tox.ini 2023-04-18 23:50:48 UTC (rev 9356)
+++ trunk/docutils/tox.ini 2023-04-19 11:23:17 UTC (rev 9357)
@@ -5,9 +5,10 @@
[testenv]
allowlist_externals =
find
+changedir = test
commands =
find . -type f -name "*.pyc" -delete
- python test/alltests.py
+ python alltests.py
[testenv:style]
deps =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-21 17:41:24
|
Revision: 9362
http://sourceforge.net/p/docutils/code/9362
Author: milde
Date: 2023-04-21 17:41:17 +0000 (Fri, 21 Apr 2023)
Log Message:
-----------
Last documentation edits for 0.20 release.
Review and small corrections to HISTORY and RELEASE-NOTES.
Add comment with rationale for future cvs-table changes.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/parsers/rst/directives/tables.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-04-20 23:04:43 UTC (rev 9361)
+++ trunk/docutils/HISTORY.txt 2023-04-21 17:41:17 UTC (rev 9362)
@@ -26,6 +26,7 @@
- New argument "auto_encode" for `publish_string()`,
`publish_from_docstring()` and `publish_programmatically()`.
- New functions `rst2…()` for use as "console_scripts" `entry points`_.
+ (cf. `Future changes` in the RELEASE-NOTES_).
* docutils/frontend.py
@@ -82,7 +83,7 @@
* docutils/utils/math/latex2mathml.py
- - Support "mod" notation for modulo operation/modulus arithmetic.
+ - Support "mod" notation for modulo operation / modulus arithmetic.
* docutils/utils/math/tex2mathml_extern.py
@@ -126,8 +127,8 @@
* docutils/writers/xetex/__init__.py
- - Ignore settings in the [latex2e writer] configuration file section
- (users can place common settings in section [latex writers]).
+ - Ignore settings in the [latex2e writer] configuration file section.
+ Place common settings in section [latex writers].
* setup.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-04-20 23:04:43 UTC (rev 9361)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-04-21 17:41:17 UTC (rev 9362)
@@ -206,11 +206,15 @@
Use dpub-ARIA role "doc-footnote" (instead of ARIA role "note")
for footnotes.
+ LaTeX:
+ Do not load the `inputenc` package in UTF-8 encoded LaTeX sources.
+ (UTF-8 is the default encoding for LaTeX2e since 2018).
+
* Configuration changes:
- Settings in the [latex2e writer] configuration file section
are now ignored by the "xetex" writer.
- Users can place common settings in section `[latex writers]`_.
+ Place common settings in section `[latex writers]`_.
.. _[latex writers]: docs/user/config.html#latex-writers
Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/directives/tables.py 2023-04-20 23:04:43 UTC (rev 9361)
+++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2023-04-21 17:41:17 UTC (rev 9362)
@@ -234,12 +234,25 @@
super().__init__()
class HeaderDialect(csv.Dialect):
+ """
+ CSV dialect used for the "header" option data.
- """CSV dialect used for the "header" option data.
-
Deprecated. Will be removed in Docutils 0.22.
"""
-
+ # The separate HeaderDialect was introduced in revision 2294
+ # (2004-06-17) in the sandbox before the "csv-table" directive moved
+ # to the trunk in r2309. Discussion in docutils-devel around this time
+ # did not mention a rationale (part of the discussion was in private
+ # mail).
+ # This is in conflict with the documentation, which always said:
+ # ""
+ # and did not change in this aspect.
+ #
+ # Maybe it was intended to have similar escape rules for rST and CSV,
+ # however with the current implementation this means we need
+ # `\\` for rST markup and ``\\\\`` for a literal backslash
+ # in the "option" header but ``\`` and ``\\`` in the header-lines and
+ # table cells of the main CSV data.
delimiter = ','
quotechar = '"'
escapechar = '\\'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-26 21:00:21
|
Revision: 9366
http://sourceforge.net/p/docutils/code/9366
Author: milde
Date: 2023-04-26 21:00:10 +0000 (Wed, 26 Apr 2023)
Log Message:
-----------
Documentation fix/update.
The return value of `io.FileOutput` (and hence of `core.publish_cmdline()`
and `core.publish_file()`) is a `str` instance (except for
binary output document formats) and has always been under Python 3.
Modified Paths:
--------------
trunk/docutils/docs/api/publisher.txt
trunk/docutils/docutils/core.py
Modified: trunk/docutils/docs/api/publisher.txt
===================================================================
--- trunk/docutils/docs/api/publisher.txt 2023-04-26 12:57:44 UTC (rev 9365)
+++ trunk/docutils/docs/api/publisher.txt 2023-04-26 21:00:10 UTC (rev 9366)
@@ -42,13 +42,18 @@
publish_cmdline()
-----------------
-Function for command-line front-end tools, like ``rst2html.py`` with
-file I/O. Also returns the output as `bytes` instance.
+Function for command-line front-end tools, like ``rst2html.py``
+or functions for `"console_scripts" entry points`_ like `core.rst2html()`
+with file I/O.
+In addition to writing the output document to a file, also returns it as
+`str` instance (rsp. `bytes` for binary output document formats).
There are several examples in the ``tools/`` directory of the Docutils
repository. A detailed analysis of one such tool is in `Inside A Docutils
Command-Line Front-End Tool`_.
+.. _"console_scripts" entry points:
+ https://packaging.python.org/en/latest/specifications/entry-points/
.. _Inside A Docutils Command-Line Front-End Tool: ../howto/cmdline-tool.html
@@ -57,7 +62,7 @@
For programmatic use with file-like I/O.
In addition to writing the output document to a file, also returns it as
-a `bytes` instance.
+`str` instance (rsp. `bytes` for binary output document formats).
publish_string()
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2023-04-26 12:57:44 UTC (rev 9365)
+++ trunk/docutils/docutils/core.py 2023-04-26 21:00:10 UTC (rev 9366)
@@ -39,8 +39,9 @@
settings=None):
"""
Initial setup. If any of `reader`, `parser`, or `writer` are not
- specified, the corresponding ``set_...`` method should be called with
- a component name (`set_reader` sets the parser as well).
+ specified, ``set_components()`` or the corresponding ``set_...()``
+ method should be called with component names
+ (`set_reader` sets the parser as well).
"""
self.document = None
@@ -385,7 +386,8 @@
"""
Set up & run a `Publisher` for command-line-based file I/O (input and
output file paths taken automatically from the command line).
- Also return the encoded output as `bytes`.
+ Also return the output as `str` or `bytes` (for binary output document
+ formats).
Parameters: see `publish_programmatically()` for the remainder.
@@ -412,7 +414,8 @@
config_section=None, enable_exit_status=False):
"""
Set up & run a `Publisher` for programmatic use with file-like I/O.
- Also return the encoded output as `bytes`.
+ Also return the output as `str` or `bytes` (for binary output document
+ formats).
Parameters: see `publish_programmatically()`.
"""
@@ -591,7 +594,7 @@
"""
Set up & run a `Publisher` for command-line-based file I/O (input and
output file paths taken automatically from the command line).
- Also return the encoded output as `bytes`.
+ Also return the output as `bytes`.
This is just like publish_cmdline, except that it uses
io.BinaryFileOutput instead of io.FileOutput.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-04-28 21:26:39
|
Revision: 9368
http://sourceforge.net/p/docutils/code/9368
Author: milde
Date: 2023-04-28 21:26:36 +0000 (Fri, 28 Apr 2023)
Log Message:
-----------
Add output encoding error handler to the parts provided by all writers.
The new generic part "errors" returned by default
contains the `output_encoding_error_handler` setting,
which may make-or-break encoding ``parts['whole']``.
Allows use of `core.publish_parts()` to get the document as `str`,
post-process it and encode with user configurated encoding and
encoding-error handler.
Modified Paths:
--------------
trunk/docutils/docs/api/publisher.txt
trunk/docutils/docutils/core.py
trunk/docutils/docutils/writers/__init__.py
trunk/docutils/test/test_writers/test_html4css1_parts.py
trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
trunk/docutils/test/test_writers/test_latex2e_misc.py
Modified: trunk/docutils/docs/api/publisher.txt
===================================================================
--- trunk/docutils/docs/api/publisher.txt 2023-04-28 18:53:03 UTC (rev 9367)
+++ trunk/docutils/docs/api/publisher.txt 2023-04-28 21:26:36 UTC (rev 9368)
@@ -140,7 +140,10 @@
`````````````````````````````
_`encoding`
- The output encoding setting.
+ The `output_encoding`_ setting.
+
+_`errors`
+ The `output_encoding_error_handler`_ setting.
_`version`
The version of Docutils used.
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2023-04-28 18:53:03 UTC (rev 9367)
+++ trunk/docutils/docutils/core.py 2023-04-28 21:26:36 UTC (rev 9368)
@@ -494,7 +494,7 @@
e.g.::
parts = publish_parts(...)
- body = parts['body'].encode(parts['encoding'])
+ body = parts['body'].encode(parts['encoding'], parts['errors'])
See the `API documentation`__ for details on the provided parts.
Modified: trunk/docutils/docutils/writers/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/__init__.py 2023-04-28 18:53:03 UTC (rev 9367)
+++ trunk/docutils/docutils/writers/__init__.py 2023-04-28 21:26:36 UTC (rev 9368)
@@ -55,11 +55,11 @@
def __init__(self):
- # Used by HTML and LaTeX writer for output fragments:
self.parts = {}
"""Mapping of document part names to fragments of `self.output`.
- Values are Unicode strings; encoding is up to the client. The 'whole'
- key should contain the entire document output.
+
+ See `Writer.assemble_parts()` below and
+ <https://docutils.sourceforge.io/docs/api/publisher.html>.
"""
def write(self, document, destination):
@@ -95,9 +95,14 @@
raise NotImplementedError('subclass must override this method')
def assemble_parts(self):
- """Assemble the `self.parts` dictionary. Extend in subclasses."""
+ """Assemble the `self.parts` dictionary. Extend in subclasses.
+
+ See <https://docutils.sourceforge.io/docs/api/publisher.html>.
+ """
self.parts['whole'] = self.output
self.parts['encoding'] = self.document.settings.output_encoding
+ self.parts['errors'] = (
+ self.document.settings.output_encoding_error_handler)
self.parts['version'] = docutils.__version__
Modified: trunk/docutils/test/test_writers/test_html4css1_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html4css1_parts.py 2023-04-28 18:53:03 UTC (rev 9367)
+++ trunk/docutils/test/test_writers/test_html4css1_parts.py 2023-04-28 21:26:36 UTC (rev 9368)
@@ -75,6 +75,7 @@
del parts['head']
del parts['head_prefix']
del parts['encoding']
+ del parts['errors']
del parts['version']
# remove standard portions:
parts['meta'] = parts['meta'].replace(self.standard_meta_value, '')
Modified: trunk/docutils/test/test_writers/test_html5_polyglot_parts.py
===================================================================
--- trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2023-04-28 18:53:03 UTC (rev 9367)
+++ trunk/docutils/test/test_writers/test_html5_polyglot_parts.py 2023-04-28 21:26:36 UTC (rev 9368)
@@ -73,6 +73,7 @@
del parts['head']
del parts['head_prefix']
del parts['encoding']
+ del parts['errors']
del parts['version']
# remove standard portions:
parts['meta'] = parts['meta'].replace(self.standard_meta_value, '')
Modified: trunk/docutils/test/test_writers/test_latex2e_misc.py
===================================================================
--- trunk/docutils/test/test_writers/test_latex2e_misc.py 2023-04-28 18:53:03 UTC (rev 9367)
+++ trunk/docutils/test/test_writers/test_latex2e_misc.py 2023-04-28 21:26:36 UTC (rev 9368)
@@ -68,6 +68,7 @@
'dedication',
'docinfo',
'encoding',
+ 'errors',
'fallbacks',
'head_prefix',
'latex_preamble',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-02 23:04:29
|
Revision: 9369
http://sourceforge.net/p/docutils/code/9369
Author: milde
Date: 2023-05-02 23:04:27 +0000 (Tue, 02 May 2023)
Log Message:
-----------
Revert addition of `io.OutString` and the "auto_encode" argument.
We need a review of the "string output" interface and a consensus
on the "clean" end-state before starting with the implementation.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/api/publisher.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/core.py
trunk/docutils/docutils/io.py
trunk/docutils/test/test_io.py
trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py
trunk/docutils/test/test_publisher.py
trunk/docutils/test/test_writers/test_html4css1_misc.py
trunk/docutils/test/test_writers/test_html4css1_template.py
trunk/docutils/test/test_writers/test_html5_polyglot_misc.py
trunk/docutils/test/test_writers/test_html5_template.py
trunk/docutils/test/test_writers/test_latex2e.py
trunk/docutils/test/test_writers/test_manpage.py
trunk/docutils/test/test_writers/test_pseudoxml.py
trunk/docutils/test/test_writers/test_s5.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/HISTORY.txt 2023-05-02 23:04:27 UTC (rev 9369)
@@ -23,8 +23,6 @@
* docutils/core.py
- - New argument "auto_encode" for `publish_string()`,
- `publish_from_docstring()` and `publish_programmatically()`.
- New functions `rst2…()` for use as "console_scripts" `entry points`_.
(cf. `Future changes` in the RELEASE-NOTES_).
@@ -33,11 +31,6 @@
- New configuration setting output_. Obsoletes the ``<destination>``
positional argument (cf. `Future changes` in the RELEASE-NOTES_).
-* docutils/io.py
-
- - New `str` sub-class `io.OutString` with "encoding" and "errors"
- attributes.
-
* docutils/languages/
docutils/parsers/rst/languages/
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-02 23:04:27 UTC (rev 9369)
@@ -147,11 +147,6 @@
* "null" writer: output will change to the empty string in Docutils 0.22.
-* The default value of the `auto_encode` argument of `core.publish_str()`,
- `core.publish_from_doctree()`, and `core.publish_programmatically()`
- will change to ``False`` in Docutils 0.22.
- The functions will then return a `str` object by default.
-
* Remove the "rawsource" argument from `nodes.Text.__init__()`
(deprecated and ignored since Docutils 0.18) in Docutils 2.0.
@@ -223,17 +218,11 @@
__ `command-line usage pattern`_
-* The new function argument `auto_encode` for Publisher convenience
- functions with `String I/O`_ selects whether the output document is
- encoded and returned as `bytes` instance. The default is ``True`` (for
- backwards compatibility) and will change to ``False`` in Docutils 0.22.
-
* `utils.find_file_in_dirs()` now returns a POSIX path also on Windows;
`utils.get_stylesheet_list()` no longer converts ``\`` to ``/``.
* Bugfixes and improvements (see HISTORY_).
-.. _String I/O: docs/api/publisher.html#string-i-o
.. _output: docs/user/config.html#output
Modified: trunk/docutils/docs/api/publisher.txt
===================================================================
--- trunk/docutils/docs/api/publisher.txt 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/docs/api/publisher.txt 2023-05-02 23:04:27 UTC (rev 9369)
@@ -16,9 +16,8 @@
The ``docutils.core.Publisher`` class is the core of Docutils,
managing all the processing and relationships between components. See
`PEP 258`_ for an overview of Docutils components.
-Configuration_ is done via `runtime settings`_ assembled from several sources.
-
-The `Publisher convenience functions`_ are the normal entry points for
+Configuration is done via `runtime settings`_ assembled from several sources.
+The *Publisher convenience functions* are the normal entry points for
using Docutils as a library.
.. _PEP 258: ../peps/pep-0258.html
@@ -42,14 +41,14 @@
publish_cmdline()
-----------------
-Function for command-line front-end tools, like ``rst2html.py``
-or functions for `"console_scripts" entry points`_ like `core.rst2html()`
-with file I/O.
-In addition to writing the output document to a file, also returns it as
-`str` instance (rsp. `bytes` for binary output document formats).
+Function for command-line front-end tools, like ``rst2html.py`` or
+`"console_scripts" entry points`_ like `core.rst2html()` with file I/O.
+In addition to writing the output document to a file-like object, also
+returns it as `str` instance (rsp. `bytes` for binary output document
+formats).
There are several examples in the ``tools/`` directory of the Docutils
-repository. A detailed analysis of one such tool is in `Inside A Docutils
+repository. A detailed analysis of one such tool is `Inside A Docutils
Command-Line Front-End Tool`_.
.. _"console_scripts" entry points:
@@ -60,9 +59,9 @@
publish_file()
--------------
-For programmatic use with file-like I/O.
-In addition to writing the output document to a file, also returns it as
-`str` instance (rsp. `bytes` for binary output document formats).
+For programmatic use with file I/O. In addition to writing the output
+document to a file-like object, also returns it as `str` instance
+(rsp. `bytes` for binary output document formats).
publish_string()
@@ -75,23 +74,23 @@
`bytes` are decoded with input_encoding_.
Output
- is a memory object:
-
- * a `str` instance [#]_, if the "auto_encode" function argument is
- ``False`` or output_encoding_ is set to the special value
+ * is a `bytes` instance, if output_encoding_ is set to an encoding
+ registered with Python's "codecs_" module (default: "utf-8"),
+ * a `str` instance, if output_encoding_ is set to the special value
``"unicode"``.
- * a `bytes` instance, if the "auto_encode" argument is ``True`` and
- output_encoding_ is set to an encoding registered with
- Python's "codecs_" module (default: "utf-8").
+.. Caution::
+ The "output_encoding" and "output_encoding_error_handler" `runtime
+ settings`_ may affect the content of the output document:
+ Some document formats contain an *encoding declaration*,
+ some formats use substitutions for non-encodable characters.
- Calling ``output = bytes(publish_string(…))`` ensures that ``output``
- is a `bytes` instance encoded with the configured output_encoding_
- (matching the encoding indicated inside HTML, XML, and LaTeX documents).
+ Use `publish_parts()`_ to get a `str` instance of the output document
+ as well as the values of the output_encoding_ and
+ output_encoding_error_handler_ runtime settings.
-.. [#] More precisely, an instance of a `str` sub-class with the
- output_encoding_ and output_encoding_error_handler_ configuration
- settings stored as "encoding" and "errors" attributes.
+*This function is provisional* because in Python 3 the name and behaviour
+no longer match.
.. _codecs: https://docs.python.org/3/library/codecs.html
@@ -110,16 +109,17 @@
Render from an existing `document tree`_ data structure (doctree).
Returns the output document as a memory object (cf. `string I/O`_).
+*This function is provisional* because in Python 3 the name and behaviour
+of the *string output* interface no longer match.
+
publish_programmatically()
--------------------------
Auxilliary function used by `publish_file()`_, `publish_string()`_,
-`publish_doctree()`_, and `publish_parts()`_.
-It returns a 2-tuple: the output document as memory object (cf. `string
-I/O`_) and the Publisher object.
+`publish_doctree()`_, and `publish_parts()`_.
+Applications should not need to call this function directly.
-
.. _publish-parts-details:
publish_parts()
@@ -126,22 +126,32 @@
---------------
For programmatic use with string input (cf. `string I/O`_).
-Returns a dictionary of document parts. Dictionary keys are the names of
-parts, and values are `str` instances; encoding is up to the client.
-Useful when only portions of the processed document are desired.
+Returns a dictionary of document parts as `str` instances. [#binary-output]_
+Dictionary keys are the part names.
+Each Writer component may publish a different set of document parts,
+described below.
-There are usage examples in the `docutils/examples.py`_ module.
+Example: post-process the output document with a custom function
+``post_process()`` before encoding with user-customizable encoding
+and errors ::
-Each Writer component may publish a different set of document parts,
-described below. Not all writers implement all parts.
+ def publish_bytes_with_postprocessing(*args, **kwargs):
+ parts = publish_parts(*args, **kwargs)
+ out_str = post_process(parts['whole'])
+ return out_str.encode(parts['encoding'], parts['errors'])
+There are more usage examples in the `docutils/examples.py`_ module.
+.. _docutils/examples.py: ../../docutils/examples.py
+.. _ODT: ../user/odt.html
+
+
Parts Provided By All Writers
`````````````````````````````
_`encoding`
The `output_encoding`_ setting.
-
+
_`errors`
The `output_encoding_error_handler`_ setting.
@@ -149,9 +159,12 @@
The version of Docutils used.
_`whole`
- ``parts['whole']`` contains the entire formatted document.
+ Contains the entire formatted document. [#binary-output]_
+ .. [#binary-output] Output documents in binary formats (e.g. ODT_)
+ are stored as a `bytes` instance.
+
Parts Provided By the HTML Writers
``````````````````````````````````
@@ -233,8 +246,8 @@
_`html_head`
``parts['html_head']`` contains the HTML ``<head>`` content, less
the stylesheet link and the ``<head>`` and ``</head>`` tags
- themselves. Since ``publish_parts`` returns `str` instances and
- does not know about the output encoding, the "Content-Type" meta
+ themselves. Since `publish_parts()` returns `str` instances which
+ do not know about the output encoding, the "Content-Type" meta
tag's "charset" value is left unresolved, as "%s"::
<meta http-equiv="Content-Type" content="text/html; charset=%s" />
@@ -388,41 +401,44 @@
https://docutils.sourceforge.io/docutils/writers/latex2e/xelatex.tex
-.. _docutils/examples.py: ../../docutils/examples.py
+.. _runtime settings:
-
Configuration
=============
-Docutils is configured by runtime settings assembled from several
+Docutils is configured by *runtime settings* assembled from several
sources:
* *settings specifications* of the selected components (reader, parser,
writer),
-* *configuration files* (if enabled), and
+* the ``settings_overrides`` argument of the `Publisher convenience
+ functions`_ (see below),
+* *configuration files* (unless disabled), and
* *command-line options* (if enabled).
-The individual settings are described in `Docutils Configuration`_.
-
Docutils overlays default and explicitly specified values from these
sources such that settings behave the way we want and expect them to
behave. For details, see `Docutils Runtime Settings`_.
+The individual settings are described in `Docutils Configuration`_.
To pass application-specific setting defaults to the Publisher
convenience functions, use the ``settings_overrides`` parameter. Pass
a dictionary of setting names & values, like this::
- overrides = {'input_encoding': 'ascii',
- 'output_encoding': 'latin-1'}
- output = publish_string(..., settings_overrides=overrides)
+ app_defaults = {'input_encoding': 'ascii',
+ 'output_encoding': 'latin-1'}
+ output = publish_string(..., settings_overrides=app_defaults)
Settings from command-line options override configuration file
settings, and they override application defaults.
-Further customization is possible creating custom component
-objects and passing *them* to ``publish_*()`` or the ``Publisher``.
+See `Docutils Runtime Settings`_ or the docstring of
+`publish_programmatically()` for a description of all `configuration
+arguments`_ of the Publisher convenience functions.
+.. _configuration arguments: runtime-settings.html#convenience-functions
+
Encodings
=========
@@ -453,7 +469,9 @@
A different encoding can be specified with the `output_encoding`_ setting.
.. Caution:: Docutils may introduce non-ASCII text if you use
- `auto-symbol footnotes`_ or the `"contents" directive`_.
+ `auto-symbol footnotes`_ or the `"contents" directive`_.
+ In non-English documents, also auto-generated labels
+ may contain non-ASCII characters.
.. [#magic-comment] A comment like ::
@@ -496,9 +514,8 @@
../ref/rst/restructuredtext.html#auto-symbol-footnotes
.. _"contents" directive:
../ref/rst/directives.html#table-of-contents
-.. _document tree:
+.. _document tree:
.. _Docutils document tree: ../ref/doctree.html
-.. _runtime settings:
.. _Docutils Runtime Settings: ./runtime-settings.html
.. _Docutils Configuration: ../user/config.html
.. _inspecting_codecs: https://codeberg.org/milde/inspecting-codecs
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/docs/user/config.txt 2023-05-02 23:04:27 UTC (rev 9369)
@@ -476,7 +476,7 @@
Path to a file where Docutils will write a list of files that were
required to generate the output, e.g. included files or embedded
-stylesheets [#dependencies]_. [#pwd]_ The format is one path per
+stylesheets. [#dependencies]_ [#pwd]_ The format is one path per
line with forward slashes as separator, the encoding is UTF-8.
Set to ``-`` in order to write dependencies to stdout.
Modified: trunk/docutils/docutils/core.py
===================================================================
--- trunk/docutils/docutils/core.py 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/docutils/core.py 2023-05-02 23:04:27 UTC (rev 9369)
@@ -439,27 +439,21 @@
writer=None, writer_name='pseudoxml',
settings=None, settings_spec=None,
settings_overrides=None, config_section=None,
- enable_exit_status=False,
- auto_encode=True):
+ enable_exit_status=False):
"""
Set up & run a `Publisher` for programmatic use with string I/O.
Accepts a `bytes` or `str` instance as `source`.
- If `auto_encode` is True, the output is encoded according to the
- `output_encoding`_ setting; the return value is a `bytes` instance
- (unless `output_encoding`_ is "unicode",
- cf. `docutils.io.StringOutput.write()`).
+ The output is encoded according to the `output_encoding`_ setting;
+ the return value is a `bytes` instance (unless `output_encoding`_ is
+ "unicode", cf. `docutils.io.StringOutput.write()`).
- If `auto_encode` is False, the output is an instance of a `str`
- sub-class with "output_encoding" and "output_encoding_error_handler"
- settings stored as `encoding` and `errors` attributes.
+ Parameters: see `publish_programmatically()`.
- The default value of `auto_encode` will change to ``False`` in
- Docutils 0.22.
+ This function is provisional because in Python 3 name and behaviour
+ no longer match.
- Parameters: see `publish_programmatically()`.
-
.. _output_encoding:
https://docutils.sourceforge.io/docs/user/config.html#output-encoding
"""
@@ -473,8 +467,7 @@
settings=settings, settings_spec=settings_spec,
settings_overrides=settings_overrides,
config_section=config_section,
- enable_exit_status=enable_exit_status,
- auto_encode=auto_encode)
+ enable_exit_status=enable_exit_status)
return output
@@ -546,8 +539,7 @@
writer=None, writer_name='pseudoxml',
settings=None, settings_spec=None,
settings_overrides=None, config_section=None,
- enable_exit_status=False,
- auto_encode=True):
+ enable_exit_status=False):
"""
Set up & run a `Publisher` to render from an existing document tree
data structure. For programmatic use with string output
@@ -563,6 +555,9 @@
document tree.
Other parameters: see `publish_programmatically()`.
+
+ This function is provisional because in Python 3 name and behaviour
+ of the `io.StringOutput` class no longer match.
"""
reader = doctree.Reader(parser_name='null')
publisher = Publisher(reader, None, writer,
@@ -574,7 +569,6 @@
publisher.process_programmatic_settings(
settings_spec, settings_overrides, config_section)
publisher.set_destination(None, destination_path)
- publisher.destination.auto_encode = auto_encode
return publisher.publish(enable_exit_status=enable_exit_status)
@@ -623,12 +617,12 @@
writer, writer_name,
settings, settings_spec,
settings_overrides, config_section,
- enable_exit_status,
- auto_encode=True):
+ enable_exit_status):
"""
Set up & run a `Publisher` for custom programmatic use.
- Return the output (as `str` or `bytes`) and the Publisher object.
+ Return the output (as `str` or `bytes`, depending on `destination_class`,
+ writer, and the "output_encoding" setting) and the Publisher object.
Applications should not need to call this function directly. If it does
seem to be necessary to call this function directly, please write to the
@@ -716,12 +710,6 @@
defined by `settings_spec`. Used only if no `settings` specified.
* `enable_exit_status`: Boolean; enable exit status at end of processing?
-
- * `auto_encode`: Boolean; encode string output and return `bytes`?
- Ignored with `io.FileOutput`.
- New in Docutils 0.21.
- The default value will change to ``False`` in Docutils 0.22 or later.
- The argument may be removed in Docutils 2.0 or later.
"""
publisher = Publisher(reader, parser, writer, settings=settings,
source_class=source_class,
@@ -731,8 +719,6 @@
settings_spec, settings_overrides, config_section)
publisher.set_source(source, source_path)
publisher.set_destination(destination, destination_path)
- if isinstance(publisher.destination, io.StringOutput):
- publisher.destination.auto_encode = auto_encode
output = publisher.publish(enable_exit_status=enable_exit_status)
return output, publisher
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/docutils/io.py 2023-05-02 23:04:27 UTC (rev 9369)
@@ -74,57 +74,6 @@
return f'{err.__class__.__name__}: {err}'
-class OutString(str):
- """Return a string representation of `object` with known encoding.
-
- Differences to `str()`:
-
- If the `encoding` is given, both `str` instances and byte-like objects
- are stored as text string, the latter decoded with `encoding` and
- `errors` (defaulting to 'strict').
-
- The encoding is never guessed. If `encoding` is None (the default),
- an informal string representation is used, also if `errors` are given.
-
- The original or intended encoding and error handler are stored in the
- attributes `encoding` and `errors`.
- Typecasting to `bytes` uses the stored values.
- """
-
- def __new__(cls, object, encoding=None, errors='strict'):
- """Return a new OutString object.
-
- Provisional.
- """
- try:
- # decode bytes-like objects if encoding is known
- return super().__new__(cls, object, encoding, errors)
- except TypeError:
- return super().__new__(cls, object)
-
- def __init__(self, object, encoding=None, errors='strict'):
- """Set "encoding" and "errors" attributes."""
- self.encoding = encoding
- self.errors = errors
-
- def __bytes__(self):
- try:
- return super().encode(self.encoding, self.errors)
- except TypeError:
- raise TypeError('OutString instance without known encoding')
-
- def __repr__(self):
- if self.errors != 'strict':
- errors_arg = f', errors={self.errors!r}'
- else:
- errors_arg = ''
- return (f'{self.__class__.__name__}({super().__repr__()}, '
- f'encoding={self.encoding!r}{errors_arg})')
-
- def encode(self, encoding=None, errors=None):
- return super().encode(encoding or self.encoding, errors or self.errors)
-
-
class Input(TransformSpec):
"""
Abstract base class for input wrappers.
@@ -652,53 +601,29 @@
class StringOutput(Output):
- """Output to a `bytes` or `str` instance."""
+ """Output to a `bytes` or `str` instance.
+ Provisional.
+ """
+
default_destination_path = '<string>'
- def __init__(self, destination=None, destination_path=None,
- encoding=None, error_handler='strict', auto_encode=True):
- """Initialize self.
-
- `auto_encode` determines the return type of `self.write()`.
- Its default value will change to False in Docutils 0.22.
- Other attributes are passed to `Output.__init__()`.
- """
-
- self.auto_encode = auto_encode
- """Let `write()` encode the output document and return `bytes`."""
- super().__init__(destination, destination_path,
- encoding, error_handler)
-
def write(self, data):
"""Store `data` in `self.destination`, and return it.
- If `self.auto_encode` is False, `data` must be a `str` instance
- and is stored/returned as `str` sub-class `OutString` with
- attributes "encoding" and "errors" set to `self.encoding`
- and `self.error_handler` respectively.
+ If `self.encoding` is set to the pseudo encoding name "unicode",
+ `data` must be a `str` instance and is stored/returned unchanged
+ (cf. `Output.encode`).
- If `self.auto_encode` is True, `data` can be a `bytes` or `str`
- instance and is stored/returned as a `bytes` instance
+ Otherwise, `data` can be a `bytes` or `str` instance and is
+ stored/returned as a `bytes` instance
(`str` data is encoded with `self.encode()`).
- Exception (provisional): If `self.encoding` is set to the pseudo
- encoding name "unicode", `data` must be a `str` instance and is
- stored/returned unchanged (cf. `Output.encode`).
Attention: the `output_encoding`_ setting may affect the content
of the output (e.g. an encoding declaration in HTML or XML or the
representation of characters as LaTeX macro vs. literal character).
"""
- if self.auto_encode:
- self.destination = self.encode(data)
- return self.destination
- if not isinstance(data, str):
- raise ValueError('StringOutput.write() expects `str` instance, '
- f'not {type(data)}.')
- encoding = self.encoding
- if not encoding or encoding.lower() == 'unicode':
- encoding = None
- self.destination = OutString(data, encoding, self.error_handler)
+ self.destination = self.encode(data)
return self.destination
Modified: trunk/docutils/test/test_io.py
===================================================================
--- trunk/docutils/test/test_io.py 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/test/test_io.py 2023-05-02 23:04:27 UTC (rev 9369)
@@ -190,19 +190,6 @@
fo.write(self.udata)
self.assertEqual(self.udrain.getvalue(), self.udata)
- def test_write_auto_encode_false(self):
- so = du_io.StringOutput(encoding='latin1', error_handler='replace',
- auto_encode=False)
- output = so.write(self.udata)
- # store output in self.destination and also return it
- self.assertEqual(output, self.udata)
- self.assertEqual(so.destination, self.udata)
- # store also encoding and encoding error handler ...
- self.assertEqual(output.encoding, 'latin1')
- self.assertEqual(output.errors, 'replace')
- # ... to allow easy conversion to `bytes`:
- self.assertEqual(bytes(output), self.bdata)
-
def test_FileOutput_hande_io_errors_deprection_warning(self):
with self.assertWarnsRegex(DeprecationWarning,
'"handle_io_errors" is ignored'):
@@ -238,52 +225,6 @@
self.assertRaises(ValueError, fo.write, self.udata)
-class OutStringTests(unittest.TestCase):
-
- def test__init__defaults(self):
- """Test `__new__()` and `__init__()` with default values."""
-
- os = du_io.OutString('Grüße')
- self.assertEqual(str(os), 'Grüße')
- self.assertEqual(os.encoding, None)
- self.assertEqual(os.errors, 'strict')
- # converting to `bytes` fails if the encoding is not known:
- with self.assertRaises(TypeError):
- self.assertEqual(bytes(os), 'Grüße')
- # without known encoding, `bytes` and other incompatible types
- # are converted to their string representation ...
- bos = du_io.OutString(b'gut')
- self.assertEqual(str(bos), "b'gut'")
- bos_e = du_io.OutString('Grüße'.encode('latin1'), errors='ignore')
- self.assertEqual(str(bos_e), r"b'Gr\xfc\xdfe'")
- bos = du_io.OutString(b'gut', encoding=None)
- self.assertEqual(str(bos), "b'gut'")
-
- def test__init__custom_attributes(self):
- """Test `__new__()` and `__init__()` with custom encoding."""
- os8 = du_io.OutString('Grüße', encoding='utf-8')
- self.assertEqual(str(os8), 'Grüße')
- self.assertEqual(bytes(os8), b'Gr\xc3\xbc\xc3\x9fe')
- self.assertEqual(repr(os8), "OutString('Grüße', encoding='utf-8')")
- # With known encoding, "bytes-like" objects are decoded
- bos1 = du_io.OutString(b'Gr\xfc\xdfe', encoding='latin1')
- self.assertEqual(str(bos1), 'Grüße')
- self.assertEqual(bytes(bos1), b'Gr\xfc\xdfe')
- # Invalid encodings (including the empty string) raise an error
- with self.assertRaises(LookupError):
- du_io.OutString(b'Gr\xfc\xdfe', encoding='')
-
- def test__init__custom_errors(self):
- """Test `__new__()` and `__init__()` with custom `errors`."""
- ts8_r = du_io.OutString('Grüße', encoding='utf-8', errors='replace')
- # Encoding uses the stored error handler:
- self.assertEqual(ts8_r.encode('ascii'), b'Gr??e')
- # Initialization with a `bytes` object uses the error handler, too:
- bts8_r = du_io.OutString(b'Gr\xfc\xdfe', encoding='utf-8',
- errors='replace')
- self.assertEqual(str(bts8_r), 'Gr��e')
-
-
class ErrorOutputTests(unittest.TestCase):
def test_defaults(self):
e = du_io.ErrorOutput()
Modified: trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py
===================================================================
--- trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/test/test_parsers/test_recommonmark/test_misc.py 2023-05-02 23:04:27 UTC (rev 9369)
@@ -54,21 +54,19 @@
settings_overrides={
'warning_stream': '',
'raw_enabled': False,
- },
- auto_encode=False)
- self.assertNotIn('<raw>', output)
- self.assertIn('<system_message', output)
- self.assertIn('Raw content disabled.', output)
+ })
+ self.assertNotIn(b'<raw>', output)
+ self.assertIn(b'<system_message', output)
+ self.assertIn(b'Raw content disabled.', output)
def test_raw_disabled_inline(self):
output = publish_string('foo <a href="uri">', parser=Parser(),
settings_overrides={'warning_stream': '',
'raw_enabled': False,
- },
- auto_encode=False)
- self.assertNotIn('<raw>', output)
- self.assertIn('<system_message', output)
- self.assertIn('Raw content disabled.', output)
+ })
+ self.assertNotIn(b'<raw>', output)
+ self.assertIn(b'<system_message', output)
+ self.assertIn(b'Raw content disabled.', output)
if __name__ == '__main__':
Modified: trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py
===================================================================
--- trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py 2023-04-28 21:26:36 UTC (rev 9368)
+++ trunk/docutils/test/test_parsers/test_rst/test_directives/test_code_parsing.py 2023-05-02 23:04:27 UTC (rev 9369)
@@ -52,19 +52,17 @@
class CodeParsingTests(unittest.TestCase):
def test_lexer_error(self):
- output = publish_string(unknown_language, settings_overrides=settings,
- auto_encode=False)
- self.assertIn('<system_message level="2"', output)
- self.assertIn('Cannot analyze code. '
- 'No Pygments lexer found for "s...
[truncated message content] |
|
From: <mi...@us...> - 2023-05-03 11:01:06
|
Revision: 9370
http://sourceforge.net/p/docutils/code/9370
Author: milde
Date: 2023-05-03 11:01:03 +0000 (Wed, 03 May 2023)
Log Message:
-----------
Documentation update.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/user/tools.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-02 23:04:27 UTC (rev 9369)
+++ trunk/docutils/HISTORY.txt 2023-05-03 11:01:03 UTC (rev 9370)
@@ -28,7 +28,7 @@
* docutils/frontend.py
- - New configuration setting output_. Obsoletes the ``<destination>``
+ - New configuration setting "output_". Obsoletes the ``<destination>``
positional argument (cf. `Future changes` in the RELEASE-NOTES_).
* docutils/languages/
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-02 23:04:27 UTC (rev 9369)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-03 11:01:03 UTC (rev 9370)
@@ -12,7 +12,7 @@
:Copyright: This document has been placed in the public domain.
-This document summarizes the major changes in recent and upcoming releases.
+This document summarizes the major changes in previous and upcoming releases.
For a more detailed list of changes, please see the Docutils `HISTORY`_.
.. contents::
@@ -22,61 +22,44 @@
Drop support for Python 3.7 and 3.8 in Docutils 0.21.
-* Usage:
+Command line interface
+----------------------
- - Docutils 0.21 will provide ``rst2*`` `"console_scripts" entry
- points`_ (without the ``.py`` extension) instead of installing the
- ``rst2*.py`` `front end tools`_ in the binary PATH. [#]_
+* Docutils 0.21 will provide ``rst2*`` "console_scripts" `entry points`_
+ (without the ``.py`` extension) instead of installing the
+ ``rst2*.py`` `front end tools`_ in the binary PATH. [#]_
- You may use the ``docutils`` `generic command line front end tool`_
- as a future-proof command, for example:
+ You may use the ``docutils`` `generic command line front end tool`_
+ as a future-proof command, for example:
- .. code:: diff
+ .. code:: diff
- - rst2latex.py --use-latex-abstract FAQ.txt > FAQ.tex
- + docutils --writer=latex --use-latex-abstract FAQ.txt > FAQ.tex
+ - rst2latex.py --use-latex-abstract FAQ.txt > FAQ.tex
+ + docutils --writer=latex --use-latex-abstract FAQ.txt > FAQ.tex
- Exceptions:
- The auxilliary script ``rst2odt_prepstyles.py`` will become
- available via ``python -m docutils.writers.odf_odt.prepstyles``.
+ Exceptions:
+ The auxilliary script ``rst2odt_prepstyles.py`` will become
+ available via ``python -m docutils.writers.odf_odt.prepstyles``.
- The ``rstpep2html.py`` script will be retired.
- Use ``docutils --reader=pep --writer=pep_html`` for a PEP preview
- (the final rendering is done by a Sphinx-based build system,
- cf. :PEP:`676`).
+ The ``rstpep2html.py`` script will be retired.
+ Use ``docutils --reader=pep --writer=pep_html`` for a PEP preview
+ (the final rendering is done by a Sphinx-based build system,
+ cf. :PEP:`676`).
+ .. [#] Some Linux distributions already use the short names.
- .. [#] Some Linux distributions already use the short names.
-
- .. _"console_scripts" entry points:
- https://packaging.python.org/en/latest/specifications/entry-points/
-
- - The `default HTML writer`__ will change in Docutils 2.0:
-
- The rst2html_ front end and ``get_writer_by_name('html')`` select
- "html4css1" now and will select "html5" in Docutils 2.0 and later.
-
- * Use rst2html4_, ``docutils --writer=html4``, or
- ``get_writer_by_name('html4')`` if you depend on stability of the
- generated HTML code, e.g. because you use a custom style sheet or
- post-processing that may break otherwise.
- * Use rst2html5_, ``docutils`` or ``get_writer_by_name('html5')``
- if you want a HTML5 document.
-
- __ docs/user/html.html#html
-
* The _`command-line usage pattern` will change:
.. code:: diff
- - <toolname> [options] [<source> [<destination>]]
- + <toolname> [options] source [source2 [source3 [...]]]
+ - COMMAND [OPTIONS] [SOURCE [DESTINATION]]
+ + COMMAND [OPTIONS] [SOURCE [SOURCE2 [...]]] [>DESTINATION]
* Remove short options ``-i`` and ``-o`` in Docutils 0.22.
Use the long equivalents ``--input-encoding`` and ``--output-encoding``.
- * Stop accepting the `<destination>` positional argument in Docutils 1.0.
- Use output redirection ``>`` or the option ``--output=<destination>``
+ * Stop accepting the DESTINATION positional argument in Docutils 1.0.
+ Use output redirection or the option ``--output=DESTINATION``
(available since Docutils 0.20).
* Accept more than one source document and the short option
@@ -84,36 +67,46 @@
For the rationale, see https://clig.dev/#arguments-and-flags.
-* `Input encoding`_:
+.. _entry points:
+ https://packaging.python.org/en/latest/specifications/entry-points/
- - Raise UnicodeError (instead of falling back to the locale encoding)
- if decoding the source with the default encoding (UTF-8) fails and
- Python is started in `UTF-8 mode`_. (Docutils 0.21)
- Raise UnicodeError (instead of falling back to "latin1") if both,
- default and locale encoding, fail. (Docutils 0.21)
+`Input encoding`_
+-----------------
- - Only remove BOM (U+FEFF ZWNBSP at start of data), no other ZWNBSPs.
- Only remove BOM with `input_encoding`_ values None, '', 'utf-8-sig',
- 'utf-16', and 'utf-32'. (Docutils 0.21)
+* Raise UnicodeError (instead of falling back to the locale encoding)
+ if decoding the source with the default encoding (UTF-8) fails and
+ Python is started in `UTF-8 mode`_. (Docutils 0.21)
- - Change the default input encoding from ``None`` (auto-detect) to
- "utf-8" in Docutils 0.22.
+ Raise UnicodeError (instead of falling back to "latin1") if both,
+ default and locale encoding, fail. (Docutils 0.21)
- - Remove the input encoding auto-detection code in Docutils 1.0 or later.
+* Only remove BOM (U+FEFF ZWNBSP at start of data), no other ZWNBSPs.
+ Only remove BOM with `input_encoding`_ values None, '', 'utf-8-sig',
+ 'utf-16', and 'utf-32'. (Docutils 0.21)
-* "csv-table_" directive:
+* Change the default input encoding from ``None`` (auto-detect) to
+ "utf-8" in Docutils 0.22.
- - Use the same CSV format for the main CSV data and the :header: option
- (as specified in the documentation since addition of "csv-table_")
- in Docutils 0.21.
+* Remove the input encoding auto-detection code in Docutils 1.0 or later.
- - Move `parsers.rst.directives.Table.process_header_option()` to
- `parsers.rst.directives.CSVTable` in Docutils 0.21.
+Writers
+-------
- - Remove `parsers.rst.directives.CSVTable.HeaderDialect`
- in Docutils 0.22.
+* The `default HTML writer`__ will change in Docutils 2.0:
+ The rst2html_ front end and ``get_writer_by_name('html')`` select
+ "html4css1" now and will select "html5" in Docutils 2.0 and later.
+
+ - Use rst2html4_, ``docutils --writer=html4``, or
+ ``get_writer_by_name('html4')`` if you depend on stability of the
+ generated HTML code, e.g. because you use a custom style sheet or
+ post-processing that may break otherwise.
+ - Use rst2html5_, ``docutils`` or ``get_writer_by_name('html5')``
+ if you want a HTML5 document.
+
+ __ docs/user/html.html#html
+
* "html5" writer:
- Stop setting the "footnote-reference" class value for footnote
@@ -147,28 +140,49 @@
* "null" writer: output will change to the empty string in Docutils 0.22.
-* Remove the "rawsource" argument from `nodes.Text.__init__()`
- (deprecated and ignored since Docutils 0.18) in Docutils 2.0.
+Misc
+----
+* "csv-table_" directive:
+
+ - Use the same CSV format for the main CSV data and the :header: option
+ (as specified in the documentation since addition of "csv-table_")
+ in Docutils 0.21.
+
+ - Move `parsers.rst.directives.Table.process_header_option()` to
+ `parsers.rst.directives.CSVTable` in Docutils 0.21.
+
+ - Remove `parsers.rst.directives.CSVTable.HeaderDialect`
+ in Docutils 0.22.
+
* Remove the compatibility hacks `nodes.reprunicode` and `nodes.ensure_str()`
in Docutils 0.21 or later. They are not required with Python 3.x.
-* Drop support for `old-format configuration files`_ in Docutils 2.0.
-
* Remove file ``install.py`` in Docutils 0.21.
See README.txt__ for alternatives.
__ README.html#installation
-* Move math format conversion from docutils/utils/math (called from
- docutils/writers/_html_base.py) to a transform__.
+* Remove the "rawsource" argument from `nodes.Text.__init__()`
+ in Docutils 2.0.
- __ docs/ref/transforms.html
+* Drop support for `old-format configuration files`_ in Docutils 2.0.
* Remove the ``--html-writer`` option of the `buildhtml.py`_ application
(obsoleted by the `"writer" setting`_ since Docutils 0.18)
in Docutils 2.0.
+* Revise the `String I/O`__ interface used by the `publish_string()`
+ and `publish_from_doctree()` publisher convenience functions.
+ (In Python 3, name and behaviour no longer match.)
+
+ __ docs/api/publisher.html#string-i-o
+
+* Move math format conversion from docutils/utils/math (called from
+ docutils/writers/_html_base.py) to a transform__.
+
+ __ docs/ref/transforms.html
+
.. _front end tools: docs/user/tools.html
.. _input encoding:
.. _input_encoding: docs/user/config.html#input-encoding
@@ -187,7 +201,6 @@
.. _buildhtml.py: docs/user/tools.html#buildhtml-py
.. _csv-table: docs/ref/rst/directives.html#csv-table
-
Release 0.20 (unpublished)
==========================
Modified: trunk/docutils/docs/user/tools.txt
===================================================================
--- trunk/docutils/docs/user/tools.txt 2023-05-02 23:04:27 UTC (rev 9369)
+++ trunk/docutils/docs/user/tools.txt 2023-05-03 11:01:03 UTC (rev 9370)
@@ -12,26 +12,12 @@
.. contents::
-.. note::
- Docutils front-end tool names, install details and the set of
- auto-installed tools will change in Docutils 0.21.
-
- The command line usage pattern will change over the next releases.
-
- See `Future changes`__ in the RELEASE-NOTES.
-
-__ RELEASE-NOTES.html#future-changes
-
-
--------------
Introduction
--------------
-Once the Docutils package is unpacked, you will discover a ``tools/``
-directory containing several front ends for common Docutils
-processing.
-In addition to the `generic command line front end`_, Docutils has
-many small front ends, each specialized for a specific "Reader" (which
+In addition to the `generic command line front end`_, Docutils installs
+several small front ends, each specialized for a specific "Reader" (which
knows how to interpret a file in context), a "Parser" (which
understands the syntax of the text), and a "Writer" (which knows how
to generate a specific data format).
@@ -54,7 +40,17 @@
.. [#] The exceptions are buildhtml.py_ and rst2odt_prepstyles.py_.
+.. note::
+ Docutils front-end tool names, install details and the set of
+ auto-installed tools will change in Docutils 0.21.
+ The command line usage pattern will change over the next releases.
+
+ See `Future changes`_ in the RELEASE-NOTES.
+
+.. _future changes: ../../RELEASE-NOTES.html#future-changes
+
+
Getting Help
============
@@ -110,47 +106,6 @@
HTML-Generating Tools
=====================
-buildhtml.py
-------------
-
-:Readers: Standalone, PEP
-:Parser: reStructuredText
-:Writers: html_, html5_, pep_html_
-:Config_: `[buildhtml application]`_
-
-Use ``buildhtml.py`` to generate ``*.html`` from all the ``*.txt`` files
-(including PEPs) in each <directory> given, and their subdirectories
-too. (Use the ``--local`` option to skip subdirectories.)
-
-Usage::
-
- buildhtml.py [options] [<directory> ...]
-
-After unpacking the Docutils package, the following shell commands
-will generate HTML for all included documentation::
-
- cd docutils/tools
- buildhtml.py ..
-
-For official releases, the directory may be called "docutils-X.Y",
-where "X.Y" is the release version. Alternatively::
-
- cd docutils
- tools/buildhtml.py --config=tools/docutils.conf
-
-The current directory (and all subdirectories) is chosen by default if
-no directory is named. Some files may generate system messages
-(docs/user/rst/demo.txt contains intentional errors); use the
-``--quiet`` option to suppress all warnings. The ``--config`` option
-ensures that the correct settings are in place (a ``docutils.conf``
-`configuration file`_ in the current directory is picked up
-automatically). Command-line options may be used to override config
-file settings or replace them altogether.
-
-.. _[buildhtml application]: config.html#buildhtml-application
-.. _configuration file: `configuration files`_
-
-
.. _rst2html:
rst2html.py
@@ -216,11 +171,11 @@
To experiment with styles, please see the
`guide to writing HTML (CSS) stylesheets for Docutils`__.
+.. _XHTML 1.0 Transitional: https://www.w3.org/TR/xhtml1/
.. _html4css1: html.html#html4css1
.. _link-stylesheet: config.html#embed-stylesheet
.. _--stylesheet: config.html#stylesheet
.. _--stylesheet-path: config.html#stylesheet-path
-
__ ../howto/html-stylesheets.html
@@ -240,7 +195,9 @@
define required and optional styling rules respectively.
.. _html5: html.html#html5
+.. _HTML 5: https://www.w3.org/TR/html5/
+
rstpep2html.py
--------------
@@ -267,7 +224,6 @@
The rendering of published PEPs is done by a Sphinx-based build system
(see :PEP:`676`).
-
.. _pep_html: html.html#pep-html
@@ -378,12 +334,53 @@
S5 <slide-shows.html>`_.
-.. _HTML 5: https://www.w3.org/TR/html5/
-.. _HTML 4.1: https://www.w3.org/TR/html401/
-.. _XHTML 1.0 Transitional: https://www.w3.org/TR/xhtml1/
-.. _XHTML 1.1: https://www.w3.org/TR/xhtml1/
+buildhtml.py
+------------
+:Readers: Standalone, PEP
+:Parser: reStructuredText
+:Writers: html_, html5_, pep_html_
+:Config_: `[buildhtml application]`_
+The ``buildhtml.py`` script can be found in the ``/tools`` directory of
+the "docutils" source. It is not included in binary packages. [#]_
+
+Use ``buildhtml.py`` to generate ``*.html`` from all the ``*.txt`` files
+(including PEPs) in each <directory> given, and their subdirectories
+too. (Use the ``--local`` option to skip subdirectories.)
+
+Usage::
+
+ buildhtml.py [options] [<directory> ...]
+
+After unpacking the Docutils source package, the following shell commands
+will generate HTML for all included documentation::
+
+ cd docutils/tools
+ buildhtml.py ..
+
+For official releases, the directory may be called "docutils-X.Y",
+where "X.Y" is the release version. Alternatively::
+
+ cd docutils
+ tools/buildhtml.py --config=tools/docutils.conf
+
+The current directory (and all subdirectories) is chosen by default if
+no directory is named. Some files may generate system messages
+(docs/user/rst/demo.txt contains intentional errors); use the
+``--quiet`` option to suppress all warnings. The ``--config`` option
+ensures that the correct settings are in place (a ``docutils.conf``
+`configuration file`_ in the current directory is picked up
+automatically). Command-line options may be used to override config
+file settings or replace them altogether.
+
+.. [#] The Debian package "python3-docutils" includes the script
+ under the name ``rst-builthtml``.
+
+.. _[buildhtml application]: config.html#buildhtml-application
+.. _configuration file: `configuration files`_
+
+
LaTeX-Generating Tools
======================
@@ -452,8 +449,8 @@
.. _troff: https://troff.org/
-ODF/OpenOffice-Generating Tools
-===============================
+OpenDocument-Generating Tools
+=============================
rst2odt.py
----------
@@ -478,13 +475,16 @@
rst2odt_prepstyles.py
`````````````````````
-A helper tool to fix a word-processor-generated STYLE_FILE.odt for
-odtwriter use::
+A helper tool to prepare a word-processor-generated STYLE_FILE.odt for
+use with the "odt" writer: [#]_ ::
- rst2odt_prepstyles STYLE_FILE.odt
+ rst2odt_prepstyles.py STYLE_FILE.odt
See `Odt Writer for Docutils`__ for details.
+.. [#] The call pattern will change in Docutils 0.20, see
+ `Future changes`_ in the RELEASE-NOTES.
+
__ odt.html#page-size
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-03 11:01:15
|
Revision: 9371
http://sourceforge.net/p/docutils/code/9371
Author: milde
Date: 2023-05-03 11:01:13 +0000 (Wed, 03 May 2023)
Log Message:
-----------
Documentation spellcheck and cleanup.
Fix typos. Mark up object names.
No extra HISTORY entries for test refactoring clean up commits.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-03 11:01:03 UTC (rev 9370)
+++ trunk/docutils/HISTORY.txt 2023-05-03 11:01:13 UTC (rev 9371)
@@ -85,7 +85,7 @@
* docutils/writers/_html_base.py
- - Refactoring of HTMLTranslator initialization and collecting of
+ - Refactoring of `HTMLTranslator` initialization and collecting of
document "parts". Adapt HTML writers importing `_html_base`.
Changes to the HTML output (no space character before closing tag of
@@ -148,20 +148,11 @@
.. _coverage.py: https://pypi.org/project/coverage/
-* test/test_parsers/test_get_parser_class.py
-
- - Fix regex to match multiline message "requires ... recommonmark"
-
-* test/test_transforms/test_docinfo.py
-
- - Fix message for nonconforming docinfo-Authors.
-
* tools/
- Moved ``quicktest.py`` to ``tools/dev/``.
-
Release 0.19 (2022-07-05)
=========================
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-03 11:01:03 UTC (rev 9370)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-03 11:01:13 UTC (rev 9371)
@@ -38,7 +38,7 @@
+ docutils --writer=latex --use-latex-abstract FAQ.txt > FAQ.tex
Exceptions:
- The auxilliary script ``rst2odt_prepstyles.py`` will become
+ The auxiliary script ``rst2odt_prepstyles.py`` will become
available via ``python -m docutils.writers.odf_odt.prepstyles``.
The ``rstpep2html.py`` script will be retired.
@@ -74,11 +74,11 @@
`Input encoding`_
-----------------
-* Raise UnicodeError (instead of falling back to the locale encoding)
+* Raise `UnicodeError` (instead of falling back to the locale encoding)
if decoding the source with the default encoding (UTF-8) fails and
Python is started in `UTF-8 mode`_. (Docutils 0.21)
- Raise UnicodeError (instead of falling back to "latin1") if both,
+ Raise `UnicodeError` (instead of falling back to "latin1") if both,
default and locale encoding, fail. (Docutils 0.21)
* Only remove BOM (U+FEFF ZWNBSP at start of data), no other ZWNBSPs.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2023-05-04 11:38:38
|
Revision: 9372
http://sourceforge.net/p/docutils/code/9372
Author: grubert
Date: 2023-05-04 11:38:35 +0000 (Thu, 04 May 2023)
Log Message:
-----------
version 0.20rc1
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.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/embed_images_html5.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.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.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/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/HISTORY.txt 2023-05-04 11:38:35 UTC (rev 9372)
@@ -13,8 +13,8 @@
.. contents::
-Release 0.20 (unpublished)
-==========================
+Release 0.20rc1 (2023-05-04)
+============================
* General
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/README.txt 2023-05-04 11:38:35 UTC (rev 9372)
@@ -1,8 +1,8 @@
.. include:: docs/header0.txt
-==============================
- README: Docutils 0.20b.dev
-==============================
+==========================
+ README: Docutils 0.20rc1
+==========================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-04 11:38:35 UTC (rev 9372)
@@ -201,13 +201,17 @@
.. _buildhtml.py: docs/user/tools.html#buildhtml-py
.. _csv-table: docs/ref/rst/directives.html#csv-table
-Release 0.20 (unpublished)
-==========================
+Release 0.20rc1 (2023-05-04)
+============================
.. Note::
Docutils 0.20 is the last version supporting Python 3.7 and 3.8.
+* General
+
+ - Support Python 3.11 (patch #198 by Hugo van Kemenade).
+
* Output changes:
HTML5:
@@ -234,6 +238,22 @@
* `utils.find_file_in_dirs()` now returns a POSIX path also on Windows;
`utils.get_stylesheet_list()` no longer converts ``\`` to ``/``.
+* docutils/languages/
+ docutils/parsers/rst/languages/
+
+ - Support Ukrainian. Patch by Dmytro Kazanzhy.
+
+* test/coverage.sh
+
+ - Removed. Use the coverage.py_ project instead,
+ ``coverage run test/alltests.py`` and ``coverage report``.
+
+ .. _coverage.py: https://pypi.org/project/coverage/
+
+* tools/
+
+ - Moved ``quicktest.py`` to ``tools/dev/``.
+
* Bugfixes and improvements (see HISTORY_).
.. _output: docs/user/config.html#output
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/docutils/__init__.py 2023-05-04 11:38:35 UTC (rev 9372)
@@ -54,7 +54,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.20b.dev'
+__version__ = '0.20rc1'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -118,9 +118,9 @@
major=0,
minor=20,
micro=0,
- releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
- serial=0, # pre-release number (0 for final releases and snapshots)
- release=False # True for official releases and pre-releases
+ releaselevel='candidate', # one of 'alpha', 'beta', 'candidate', 'final'
+ serial=1, # pre-release number (0 for final releases and snapshots)
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple.
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/setup.py 2023-05-04 11:38:35 UTC (rev 9372)
@@ -33,7 +33,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'https://docutils.sourceforge.io/',
- 'version': '0.20b.dev',
+ 'version': '0.20rc1',
'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 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<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 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/dangerous.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -3,7 +3,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<title>Embedded Images</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/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<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 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<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 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<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 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<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.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/pep_html.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.20b.dev: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev -->
+<!-- Generated by Docutils 0.20rc1 -->
<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 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-05-03 11:01:13 UTC (rev 9371)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-05-04 11:38:35 UTC (rev 9372)
@@ -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.20b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20rc1: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-10 10:12:23
|
Revision: 9379
http://sourceforge.net/p/docutils/code/9379
Author: milde
Date: 2023-05-10 10:12:20 +0000 (Wed, 10 May 2023)
Log Message:
-----------
Include "tox.ini" in sdist packages.
Fixes [bugs:#467]
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/MANIFEST.in
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-10 10:12:11 UTC (rev 9378)
+++ trunk/docutils/HISTORY.txt 2023-05-10 10:12:20 UTC (rev 9379)
@@ -16,8 +16,10 @@
Changes since 0.20
==================
-Nothing yet
+* docutils/MANIFEST.in
+ - Include tox.ini in the source package (bug #467).
+
Release 0.20 (2023-05-09)
=========================
Modified: trunk/docutils/MANIFEST.in
===================================================================
--- trunk/docutils/MANIFEST.in 2023-05-10 10:12:11 UTC (rev 9378)
+++ trunk/docutils/MANIFEST.in 2023-05-10 10:12:20 UTC (rev 9379)
@@ -1,4 +1,5 @@
include *.txt
+include tox.ini
include install.py
recursive-include docutils *
recursive-include docs *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-10 11:24:57
|
Revision: 9380
http://sourceforge.net/p/docutils/code/9380
Author: milde
Date: 2023-05-10 11:24:54 +0000 (Wed, 10 May 2023)
Log Message:
-----------
Include "docutils.conf" in the source package.
This file contains the configuration used when generating
Docutil's HTML documentation.
May help solving [bugs:#461].
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/MANIFEST.in
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-10 10:12:20 UTC (rev 9379)
+++ trunk/docutils/HISTORY.txt 2023-05-10 11:24:54 UTC (rev 9380)
@@ -18,7 +18,8 @@
* docutils/MANIFEST.in
- - Include tox.ini in the source package (bug #467).
+ - Include tox.ini and docutils.conf in the source package
+ (cf. bug #467 and bug #461).
Release 0.20 (2023-05-09)
=========================
Modified: trunk/docutils/MANIFEST.in
===================================================================
--- trunk/docutils/MANIFEST.in 2023-05-10 10:12:20 UTC (rev 9379)
+++ trunk/docutils/MANIFEST.in 2023-05-10 11:24:54 UTC (rev 9380)
@@ -1,5 +1,6 @@
include *.txt
include tox.ini
+include docutils.conf
include install.py
recursive-include docutils *
recursive-include docs *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-11 15:01:23
|
Revision: 9383
http://sourceforge.net/p/docutils/code/9383
Author: milde
Date: 2023-05-11 15:01:20 +0000 (Thu, 11 May 2023)
Log Message:
-----------
Announce upcoming fix for the localization of the "admonition" directive name.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/parsers/rst/languages/fr.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-11 14:23:48 UTC (rev 9382)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-11 15:01:20 UTC (rev 9383)
@@ -183,6 +183,15 @@
__ docs/ref/transforms.html
+* docutils/parsers/rst/languages/
+
+ Fix mistranslated localizations of the "admonition" directive name in
+ Docutils 0.21 (or later). In Docutils, "admonition" is used as a
+ generic term for "advice"/"caveat"/"remark", not a reprimand.
+ Use the English term (or specific admonitions) instead of "aanmaning",
+ "ammonizione", "Ermahnung", "exhortacion", "formaning", "upomnienie",
+ or "vermaning" to avoid errors in future conversions.
+
.. _front end tools: docs/user/tools.html
.. _input encoding:
.. _input_encoding: docs/user/config.html#input-encoding
Modified: trunk/docutils/docutils/parsers/rst/languages/fr.py
===================================================================
--- trunk/docutils/docutils/parsers/rst/languages/fr.py 2023-05-11 14:23:48 UTC (rev 9382)
+++ trunk/docutils/docutils/parsers/rst/languages/fr.py 2023-05-11 15:01:20 UTC (rev 9383)
@@ -26,6 +26,8 @@
'astuce': 'tip',
'avertissement': 'warning',
'admonition': 'admonition', # sic! Not used in this sense in rST.
+ # suggestions: annonce, avis, indication, remarque, renseignement
+ # see also https://sourceforge.net/p/docutils/bugs/453/
'encadré': 'sidebar',
'sujet': 'topic',
'bloc-textuel': 'line-block',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-16 14:49:33
|
Revision: 9386
http://sourceforge.net/p/docutils/code/9386
Author: milde
Date: 2023-05-16 14:49:31 +0000 (Tue, 16 May 2023)
Log Message:
-----------
Move auxiliary script rst2odt_prepstyles.py to the library.
Added Paths:
-----------
trunk/docutils/docutils/writers/odf_odt/prepstyles.py
Removed Paths:
-------------
trunk/docutils/tools/rst2odt_prepstyles.py
Copied: trunk/docutils/docutils/writers/odf_odt/prepstyles.py (from rev 9385, trunk/docutils/tools/rst2odt_prepstyles.py)
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/prepstyles.py (rev 0)
+++ trunk/docutils/docutils/writers/odf_odt/prepstyles.py 2023-05-16 14:49:31 UTC (rev 9386)
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+
+# $Id$
+# Author: Dave Kuhlman <dku...@re...>
+# Copyright: This module has been placed in the public domain.
+
+"""
+Adapt a word-processor-generated styles.odt for odtwriter use:
+
+Drop page size specifications from styles.xml in STYLE_FILE.odt.
+See https://docutils.sourceforge.io/docs/user/odt.html#page-size
+"""
+
+# Author: Michael Schutte <mi...@ui...>
+
+from xml.etree import ElementTree as etree
+
+import sys
+import zipfile
+from tempfile import mkstemp
+import shutil
+import os
+
+NAMESPACES = {
+ "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
+ "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+}
+
+
+def prepstyle(filename):
+
+ zin = zipfile.ZipFile(filename)
+ styles = zin.open("styles.xml")
+
+ root = None
+ # some extra effort to preserve namespace prefixes
+ for event, elem in etree.iterparse(styles, events=("start", "start-ns")):
+ if event == "start-ns":
+ etree.register_namespace(elem[0], elem[1])
+ elif event == "start":
+ if root is None:
+ root = elem
+
+ styles.close()
+
+ for el in root.findall(".//style:page-layout-properties",
+ namespaces=NAMESPACES):
+ for attr in list(el.attrib):
+ if attr.startswith("{%s}" % NAMESPACES["fo"]):
+ del el.attrib[attr]
+
+ tempname = mkstemp()
+ zout = zipfile.ZipFile(os.fdopen(tempname[0], "wb"), "w",
+ zipfile.ZIP_DEFLATED)
+
+ for item in zin.infolist():
+ if item.filename == "styles.xml":
+ zout.writestr(item, etree.tostring(root, encoding="UTF-8"))
+ else:
+ zout.writestr(item, zin.read(item.filename))
+
+ zout.close()
+ zin.close()
+ shutil.move(tempname[1], filename)
+
+
+def main():
+ args = sys.argv[1:]
+ if len(args) != 1 or args[0] in ('-h', '--help'):
+ print(__doc__, file=sys.stderr)
+ print("Usage: %s STYLE_FILE.odt\n" % sys.argv[0], file=sys.stderr)
+ sys.exit(1)
+ filename = args[0]
+ prepstyle(filename)
+
+
+if __name__ == '__main__':
+ main()
Deleted: trunk/docutils/tools/rst2odt_prepstyles.py
===================================================================
--- trunk/docutils/tools/rst2odt_prepstyles.py 2023-05-13 14:39:18 UTC (rev 9385)
+++ trunk/docutils/tools/rst2odt_prepstyles.py 2023-05-16 14:49:31 UTC (rev 9386)
@@ -1,78 +0,0 @@
-#!/usr/bin/env python3
-
-# $Id$
-# Author: Dave Kuhlman <dku...@re...>
-# Copyright: This module has been placed in the public domain.
-
-"""
-Adapt a word-processor-generated styles.odt for odtwriter use:
-
-Drop page size specifications from styles.xml in STYLE_FILE.odt.
-See https://docutils.sourceforge.io/docs/user/odt.html#page-size
-"""
-
-# Author: Michael Schutte <mi...@ui...>
-
-from xml.etree import ElementTree as etree
-
-import sys
-import zipfile
-from tempfile import mkstemp
-import shutil
-import os
-
-NAMESPACES = {
- "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
- "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
-}
-
-
-def prepstyle(filename):
-
- zin = zipfile.ZipFile(filename)
- styles = zin.open("styles.xml")
-
- root = None
- # some extra effort to preserve namespace prefixes
- for event, elem in etree.iterparse(styles, events=("start", "start-ns")):
- if event == "start-ns":
- etree.register_namespace(elem[0], elem[1])
- elif event == "start":
- if root is None:
- root = elem
-
- styles.close()
-
- for el in root.findall(".//style:page-layout-properties",
- namespaces=NAMESPACES):
- for attr in list(el.attrib):
- if attr.startswith("{%s}" % NAMESPACES["fo"]):
- del el.attrib[attr]
-
- tempname = mkstemp()
- zout = zipfile.ZipFile(os.fdopen(tempname[0], "wb"), "w",
- zipfile.ZIP_DEFLATED)
-
- for item in zin.infolist():
- if item.filename == "styles.xml":
- zout.writestr(item, etree.tostring(root, encoding="UTF-8"))
- else:
- zout.writestr(item, zin.read(item.filename))
-
- zout.close()
- zin.close()
- shutil.move(tempname[1], filename)
-
-
-def main():
- args = sys.argv[1:]
- if len(args) != 1 or args[0] in ('-h', '--help'):
- print(__doc__, file=sys.stderr)
- print("Usage: %s STYLE_FILE.odt\n" % sys.argv[0], file=sys.stderr)
- sys.exit(1)
- filename = args[0]
- prepstyle(filename)
-
-
-if __name__ == '__main__':
- main()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-16 14:49:43
|
Revision: 9387
http://sourceforge.net/p/docutils/code/9387
Author: milde
Date: 2023-05-16 14:49:41 +0000 (Tue, 16 May 2023)
Log Message:
-----------
Add a small backwards compatibility script for rst2odt_prepstyles.py.
This way, users can adapt to the new command before the
"tools/*.py" scripts are no longer installed in Docutils 0.21.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/user/odt.txt
Added Paths:
-----------
trunk/docutils/tools/rst2odt_prepstyles.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-16 14:49:31 UTC (rev 9386)
+++ trunk/docutils/HISTORY.txt 2023-05-16 14:49:41 UTC (rev 9387)
@@ -13,6 +13,7 @@
.. contents::
+
Changes since 0.20
==================
@@ -21,6 +22,12 @@
- Include tox.ini and docutils.conf in the source package
(cf. bug #467 and bug #461).
+* tools/rst2odt_prepstyles.py
+
+ - Moved to ``docutils/writers/odf_odt/prepstyles.py``.
+ Replaced with a provisional backwards compatibility script.
+
+
Release 0.20 (2023-05-09)
=========================
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-16 14:49:31 UTC (rev 9386)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-16 14:49:41 UTC (rev 9387)
@@ -38,16 +38,21 @@
+ docutils --writer=latex --use-latex-abstract FAQ.txt > FAQ.tex
Exceptions:
- The auxiliary script ``rst2odt_prepstyles.py`` will become
- available via ``python -m docutils.writers.odf_odt.prepstyles``.
+ The ``rstpep2html.py`` and ``rst2odt_prepstyles.py`` scripts
+ will be retired.
- The ``rstpep2html.py`` script will be retired.
- Use ``docutils --reader=pep --writer=pep_html`` for a PEP preview
- (the final rendering is done by a Sphinx-based build system,
- cf. :PEP:`676`).
+ Use ``docutils --reader=pep --writer=pep_html`` for a PEP preview. [#]_
+ Use ``python -m docutils.writers.odf_odt.prepstyles``
+ to `strip the page size`__ from an ODT writer stylesheet.
+
+ __ docs/user/odt.html#page-size
+
.. [#] Some Linux distributions already use the short names.
+ .. [#] The final rendering is done by a Sphinx-based build system
+ (cf. :PEP:`676`).
+
* The _`command-line usage pattern` will change:
.. code:: diff
@@ -210,6 +215,13 @@
.. _buildhtml.py: docs/user/tools.html#buildhtml-py
.. _csv-table: docs/ref/rst/directives.html#csv-table
+
+Release 0.20.1 (unpublished)
+============================
+
+Bugfix release. See HISTORY_ for details.
+
+
Release 0.20 (2023-05-04)
=========================
Modified: trunk/docutils/docs/user/odt.txt
===================================================================
--- trunk/docutils/docs/user/odt.txt 2023-05-16 14:49:31 UTC (rev 9386)
+++ trunk/docutils/docs/user/odt.txt 2023-05-16 14:49:41 UTC (rev 9387)
@@ -657,14 +657,13 @@
Here are a few reasons and ideas:
-- The page size is stored in the style sheet. The default page
- size is ``Letter``. You can change the page size (for example,
+- The `page size`_ is stored in the style sheet. The default page
+ size is ``US Letter``. You can change the page size (for example,
to ``A4``) in your custom stylesheet by opening it in
``oowriter``, then clicking on menu: ``Format/Page...``, then
clicking on the ``Page`` tab.
-
Defining and using custom style names
-------------------------------------
@@ -1064,12 +1063,12 @@
Page size
---------
-The default page size, in documents generated by ``odtwriter`` is
-``Letter``. You can change this (for example to ``A4``) by using a
+The default page size, in documents generated by the ODT writer is
+"US Letter". You can change this (for example to ``A4``) by using a
custom stylesheet. See `Defining and using a custom stylesheet`_
for instructions on how to do this.
-On machines which support ``paperconf``, ``odtwriter`` can insert
+On machines which support ``paperconf``, the ODT writer can insert
the default page size for your locale. In order for this to work,
the following conditions must be met:
@@ -1077,13 +1076,16 @@
``odtwriter`` uses ``paperconf -s`` to obtain the paper size.
See ``man paperconf`` for more information.
-2. The default page height and width must be removed from the
- ``styles.odt`` used to generate the document. A Python script
- ``rst2odt_prepstyles.py`` is distributed with ``odtwriter`` and
- is installed in the ``bin`` directory. You can remove the page
- height and width with something like the following::
+2. The page height and width settings must be absent from the stylesheet
+ used to generate the document.
+
+ You can use the Python script ``prepstyles.py`` distributed with
+ Docutils to remove the page height and width settings from a
+ stylesheet file ``STYLES.odt`` with ::
- $ rst2odt_prepstyles.py styles.odt
+ $ python3 -m docutils.writers.odf_odt.prepstyles STYLES.odt
+
+ (the command changed in Docutils 0.20.1).
.. warning:: If you edit your stylesheet in ``oowriter`` and then
save it, ``oowriter`` automatically inserts a page height and
Added: trunk/docutils/tools/rst2odt_prepstyles.py
===================================================================
--- trunk/docutils/tools/rst2odt_prepstyles.py (rev 0)
+++ trunk/docutils/tools/rst2odt_prepstyles.py 2023-05-16 14:49:41 UTC (rev 9387)
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+# Copyright: This module has been placed in the public domain.
+
+"""
+Adapt a word-processor-generated styles.odt for odtwriter use:
+
+Drop page size specifications from styles.xml in STYLE_FILE.odt.
+See https://docutils.sourceforge.io/docs/user/odt.html#page-size
+
+Provisional backwards compatibility stub (to be removed in Docutils >= 0.21).
+
+The actual code moved to the "docutils" library package and can be started
+with ``python -m docutils.writers.odf_odt.prepstyles``.
+"""
+
+from docutils.writers.odf_odt import prepstyles
+
+if __name__ == '__main__':
+ prepstyles.main()
Property changes on: trunk/docutils/tools/rst2odt_prepstyles.py
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2023-05-16 23:33:39
|
Revision: 9388
http://sourceforge.net/p/docutils/code/9388
Author: grubert
Date: 2023-05-16 23:33:36 +0000 (Tue, 16 May 2023)
Log Message:
-----------
Release 0.20.1
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/README.txt
trunk/docutils/RELEASE-NOTES.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/embed_images_html5.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.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.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/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/HISTORY.txt 2023-05-16 23:33:36 UTC (rev 9388)
@@ -14,8 +14,8 @@
.. contents::
-Changes since 0.20
-==================
+Release 0.20.1 (2023-05-17)
+===========================
* docutils/MANIFEST.in
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/README.txt 2023-05-16 23:33:36 UTC (rev 9388)
@@ -1,8 +1,8 @@
.. include:: docs/header0.txt
-==============================
- README: Docutils 0.20.1b.dev
-==============================
+=========================
+ README: Docutils 0.20.1
+=========================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-16 23:33:36 UTC (rev 9388)
@@ -216,8 +216,8 @@
.. _csv-table: docs/ref/rst/directives.html#csv-table
-Release 0.20.1 (unpublished)
-============================
+Release 0.20.1 (2023-05-17)
+===========================
Bugfix release. See HISTORY_ for details.
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/docutils/__init__.py 2023-05-16 23:33:36 UTC (rev 9388)
@@ -54,7 +54,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.20.1b.dev'
+__version__ = '0.20.1'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -118,9 +118,9 @@
major=0,
minor=20,
micro=1,
- releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
+ releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
serial=0, # pre-release number (0 for final releases and snapshots)
- release=False # True for official releases and pre-releases
+ release=True # True for official releases and pre-releases
)
"""Comprehensive version information tuple.
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/setup.py 2023-05-16 23:33:36 UTC (rev 9388)
@@ -33,7 +33,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'https://docutils.sourceforge.io/',
- 'version': '0.20.1b.dev',
+ 'version': '0.20.1',
'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 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<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 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/dangerous.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -3,7 +3,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<title>Embedded Images</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/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<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 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<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 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<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 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<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.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/pep_html.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.20.1b.dev: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev -->
+<!-- Generated by Docutils 0.20.1 -->
<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 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-05-16 14:49:41 UTC (rev 9387)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-05-16 23:33:36 UTC (rev 9388)
@@ -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.20.1b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gr...@us...> - 2023-05-17 00:11:50
|
Revision: 9390
http://sourceforge.net/p/docutils/code/9390
Author: grubert
Date: 2023-05-17 00:11:48 +0000 (Wed, 17 May 2023)
Log Message:
-----------
Version 0.20.2b.dev
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
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/embed_images_html5.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.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.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/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/HISTORY.txt 2023-05-17 00:11:48 UTC (rev 9390)
@@ -14,6 +14,11 @@
.. contents::
+Changes since 0.20.1
+====================
+
+None Yet
+
Release 0.20.1 (2023-05-17)
===========================
Modified: trunk/docutils/README.txt
===================================================================
--- trunk/docutils/README.txt 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/README.txt 2023-05-17 00:11:48 UTC (rev 9390)
@@ -1,8 +1,8 @@
.. include:: docs/header0.txt
-=========================
- README: Docutils 0.20.1
-=========================
+===============================
+ README: Docutils 0.20.2b.dev
+===============================
:Author: David Goodger
:Contact: go...@py...
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/docutils/__init__.py 2023-05-17 00:11:48 UTC (rev 9390)
@@ -54,7 +54,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.20.1'
+__version__ = '0.20.2b.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -117,10 +117,10 @@
__version_info__ = VersionInfo(
major=0,
minor=20,
- micro=1,
- releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
+ micro=2,
+ releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
serial=0, # pre-release number (0 for final releases and snapshots)
- release=True # True for official releases and pre-releases
+ release=False # True for official releases and pre-releases
)
"""Comprehensive version information tuple.
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/setup.py 2023-05-17 00:11:48 UTC (rev 9390)
@@ -33,7 +33,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'https://docutils.sourceforge.io/',
- 'version': '0.20.1',
+ 'version': '0.20.2b.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 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<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 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/dangerous.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -3,7 +3,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<title>Embedded Images</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/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<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 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<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 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<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 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<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.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/pep_html.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1 -->
+<!-- Generated by Docutils 0.20.2b.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 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-05-16 23:34:35 UTC (rev 9389)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-05-17 00:11:48 UTC (rev 9390)
@@ -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.20.1: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-05-24 22:59:40
|
Revision: 9395
http://sourceforge.net/p/docutils/code/9395
Author: milde
Date: 2023-05-24 22:59:36 +0000 (Wed, 24 May 2023)
Log Message:
-----------
Review "reference-label" LaTeX writer setting. Update docs.
Modified Paths:
--------------
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-05-24 22:59:28 UTC (rev 9394)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-05-24 22:59:36 UTC (rev 9395)
@@ -143,6 +143,12 @@
- Remove ``use_verbatim_when_possible`` setting
(use literal_block_env_: verbatim) in Docutils 2.0.
+ - Don't wrap references with custom reference-label_ in
+ a ``\hyperref`` command in Docutils 0.22.
+
+ .. _reference-label: docs/user/config.html#reference-label
+
+
* "null" writer: output will change to the empty string in Docutils 0.22.
Misc
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2023-05-24 22:59:28 UTC (rev 9394)
+++ trunk/docutils/docs/user/config.txt 2023-05-24 22:59:36 UTC (rev 9395)
@@ -1100,7 +1100,7 @@
MathML is part of the HTML5 standard [#mathml-in-html4]_ and
`supported by all major browsers`__ (since January 2023 also by Chrome).
- .. [#mathml-in-html4]
+ .. [#mathml-in-html4]
With the "html4css1" writer, the resulting HTML document does
not validate, as there is no DTD for `MathML + XHTML Transitional`.
However, MathML-enabled browsers will render it fine.
@@ -1183,7 +1183,7 @@
Default: HTML math.css. Option: ``--math-output``.
-| New in Docutils 0.8.
+| New in Docutils 0.8.
| The default for the HTML5 writer will change to
"MathML" in Docutils 0.22.
@@ -1736,12 +1736,27 @@
reference_label
~~~~~~~~~~~~~~~
-Per default the latex-writer puts the reference title into
-hyper references. Specify "ref*" or "pageref*" to get the section
-number or the page number.
+The LaTeX command name for `hyperlink references`_ to internal__ or
+implicit__ targets. Per default the LaTeX writer uses ``\hyperref``.
+Specify an alternative reference command, e.g., "ref" or "pageref" to get
+the section number or the page number as reference text.
-Default: "" (use hyper references). Option: ``--reference-label``.
+.. Caution::
+ * Drops the original reference text.
+ * Experimental. Not sufficiently tested.
+ * Fails, e.g., with section numbering by Docutils (cf. sectnum_xform_)
+ or tables without caption.
+ * Provisional: to be replaced by a dedicated
+ `interpreted text role`_ for references.
+Default: "" (use "hyperref"). Option: ``--reference-label``.
+
+.. _hyperlink references: ../ref/rst/restructuredtext.html#hyperlink-references
+__ ../ref/rst/restructuredtext.html#internal-hyperlink-targets
+__ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
+.. _interpreted text role: ../ref/rst/restructuredtext.html#interpreted-text
+
+
section_enumerator_separator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2005,7 +2020,7 @@
[odf_odt writer]
----------------
-The `ODF/ODT Writer`__ generates documents in the
+The `ODF/ODT Writer`__ generates documents in the
OpenDocument_ Text format (.odt).
The output_encoding_ setting is ignored, the output encoding is
@@ -2182,7 +2197,7 @@
~~~~~~
Work silently (no progress messages). Independent of
-"report_level".
+report_level_.
Default: show progress (None). Option: ``--silent``.
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2023-05-24 22:59:28 UTC (rev 9394)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2023-05-24 22:59:36 UTC (rev 9395)
@@ -1185,7 +1185,7 @@
self.use_latex_toc = settings.use_latex_toc
self.use_latex_docinfo = settings.use_latex_docinfo
self.use_latex_citations = settings.use_latex_citations
- self._reference_label = settings.reference_label
+ self.reference_label = settings.reference_label
self.hyperlink_color = settings.hyperlink_color
self.compound_enumerators = settings.compound_enumerators
self.font_encoding = getattr(settings, 'font_encoding', '')
@@ -1808,7 +1808,7 @@
if self.use_latex_citations:
if not self.inside_citation_reference_label:
self.out.append(r'\cite{')
- self.inside_citation_reference_label = 1
+ self.inside_citation_reference_label = True
else:
assert self.out[-1] in (' ', '\n'),\
'unexpected non-whitespace while in reference label'
@@ -2820,8 +2820,8 @@
# problematic chars double caret and unbalanced braces:
if href.find('^^') != -1 or self.has_unbalanced_braces(href):
self.error(
- 'External link "%s" not supported by LaTeX.\n'
- ' (Must not contain "^^" or unbalanced braces.)' % href)
+ f'External link "{href}" not supported by LaTeX.\n'
+ ' (Must not contain "^^" or unbalanced braces.)')
if node['refuri'] == node.astext():
self.out.append(r'\url{%s}' % href)
raise nodes.SkipNode
@@ -2837,9 +2837,10 @@
if not self.is_inline(node):
self.out.append('\n')
self.out.append('\\hyperref[%s]{' % href)
- if self._reference_label:
+ if self.reference_label:
+ # TODO: don't use \hyperref if self.reference_label is True
self.out.append('\\%s{%s}}' %
- (self._reference_label, href.replace('#', '')))
+ (self.reference_label, href.replace('#', '')))
raise nodes.SkipNode
def depart_reference(self, node):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-06-22 15:34:39
|
Revision: 9398
http://sourceforge.net/p/docutils/code/9398
Author: milde
Date: 2023-06-22 15:34:37 +0000 (Thu, 22 Jun 2023)
Log Message:
-----------
Update roman.py to version 1.4.
Fixes feature-requests:#95 (license is now ZPL 2.1).
Modified Paths:
--------------
trunk/docutils/COPYING.txt
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/utils/roman.py
Added Paths:
-----------
trunk/docutils/licenses/ZPL-2-1.txt
Removed Paths:
-------------
trunk/docutils/licenses/python-2-1-1.txt
Modified: trunk/docutils/COPYING.txt
===================================================================
--- trunk/docutils/COPYING.txt 2023-05-26 18:47:49 UTC (rev 9397)
+++ trunk/docutils/COPYING.txt 2023-06-22 15:34:37 UTC (rev 9398)
@@ -131,9 +131,9 @@
* docutils/utils/roman.py
copyright by Mark Pilgrim, released under the
- `Python 2.1.1 license`_ (`local copy`__).
+ `Zope Public License Version 2.1`_ (`local copy`__).
- __ licenses/python-2-1-1.txt
+ __ licenses/ZPL-2-1.txt
* tools/editors/emacs/rst.el
@@ -150,10 +150,10 @@
.. _sandbox: https://docutils.sourceforge.io/sandbox/README.html
.. _licenses: licenses/
-.. _Python 2.1.1 license: https://docs.python.org/3/license.html
.. _GNU General Public License: https://www.gnu.org/copyleft/gpl.html
.. _BSD 2-Clause License: http://opensource.org/licenses/BSD-2-Clause
.. _BSD 3-Clause License: https://opensource.org/licenses/BSD-3-Clause
+.. _Zope Public License Version 2.1: https://opensource.org/license/zpl-2-1/
.. _OSI-approved: http://opensource.org/licenses/
.. _license-list:
.. _GPL-compatible: https://www.gnu.org/licenses/license-list.html
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-05-26 18:47:49 UTC (rev 9397)
+++ trunk/docutils/HISTORY.txt 2023-06-22 15:34:37 UTC (rev 9398)
@@ -17,8 +17,12 @@
Changes since 0.20.1
====================
-None Yet
+* docutils/utils/roman.py
+ Update to version `1.4 <https://pypi.org/project/roman/4.1/>`__.
+ Fixes feature-requests:#95 (license is now ZPL 2.1).
+
+
Release 0.20.1 (2023-05-17)
===========================
Modified: trunk/docutils/docutils/utils/roman.py
===================================================================
--- trunk/docutils/docutils/utils/roman.py 2023-05-26 18:47:49 UTC (rev 9397)
+++ trunk/docutils/docutils/utils/roman.py 2023-06-22 15:34:37 UTC (rev 9398)
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001 Mark Pilgrim and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
"""Convert to and from Roman numerals"""
__author__ = "Mark Pilgrim (f8...@di...)"
@@ -14,39 +27,55 @@
http://www.python.org/2.1.1/license.html
"""
+import argparse
import re
+import sys
# Define exceptions
-class RomanError(Exception): pass
-class OutOfRangeError(RomanError): pass
-class NotIntegerError(RomanError): pass
-class InvalidRomanNumeralError(RomanError): pass
+class RomanError(Exception):
+ pass
+class OutOfRangeError(RomanError):
+ pass
+
+
+class NotIntegerError(RomanError):
+ pass
+
+
+class InvalidRomanNumeralError(RomanError):
+ pass
+
+
# Define digit mapping
-romanNumeralMap = (('M', 1000),
+romanNumeralMap = (('M', 1000),
('CM', 900),
- ('D', 500),
+ ('D', 500),
('CD', 400),
- ('C', 100),
+ ('C', 100),
('XC', 90),
- ('L', 50),
+ ('L', 50),
('XL', 40),
- ('X', 10),
+ ('X', 10),
('IX', 9),
- ('V', 5),
+ ('V', 5),
('IV', 4),
- ('I', 1))
+ ('I', 1))
def toRoman(n):
"""convert integer to Roman numeral"""
- if not (0 < n < 5000):
- raise OutOfRangeError("number out of range (must be 1..4999)")
- if int(n) != n:
+ if not isinstance(n, int):
raise NotIntegerError("decimals can not be converted")
+ if not (-1 < n < 5000):
+ raise OutOfRangeError("number out of range (must be 0..4999)")
+ # special case
+ if n == 0:
+ return 'N'
+
result = ""
for numeral, integer in romanNumeralMap:
while n >= integer:
@@ -74,6 +103,10 @@
if not s:
raise InvalidRomanNumeralError('Input can not be blank')
+ # special case
+ if s == 'N':
+ return 0
+
if not romanNumeralPattern.search(s):
raise InvalidRomanNumeralError('Invalid Roman numeral: %s' % s)
@@ -80,7 +113,42 @@
result = 0
index = 0
for numeral, integer in romanNumeralMap:
- while s[index:index+len(numeral)] == numeral:
+ while s[index:index + len(numeral)] == numeral:
result += integer
index += len(numeral)
return result
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(
+ prog='roman',
+ description='convert between roman and arabic numerals'
+ )
+ parser.add_argument('number', help='the value to convert')
+ parser.add_argument(
+ '-r', '--reverse',
+ action='store_true',
+ default=False,
+ help='convert roman to numeral (case insensitive) [default: False]')
+
+ args = parser.parse_args()
+ args.number = args.number
+ return args
+
+
+def main():
+ args = parse_args()
+ if args.reverse:
+ u = args.number.upper()
+ r = fromRoman(u)
+ print(r)
+ else:
+ i = int(args.number)
+ n = toRoman(i)
+ print(n)
+
+ return 0
+
+
+if __name__ == "__main__": # pragma: no cover
+ sys.exit(main()) # pragma: no cover
Added: trunk/docutils/licenses/ZPL-2-1.txt
===================================================================
--- trunk/docutils/licenses/ZPL-2-1.txt (rev 0)
+++ trunk/docutils/licenses/ZPL-2-1.txt 2023-06-22 15:34:37 UTC (rev 9398)
@@ -0,0 +1,44 @@
+Zope Public License (ZPL) Version 2.1
+
+A copyright notice accompanies this license document that identifies the
+copyright holders.
+
+This license has been certified as open source. It has also been designated as
+GPL compatible by the Free Software Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions in source code must retain the accompanying copyright
+notice, this list of conditions, and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying copyright
+notice, this list of conditions, and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to endorse or promote
+products derived from this software without prior written permission from the
+copyright holders.
+
+4. The right to distribute this software or to use it for any purpose does not
+give you the right to use Servicemarks (sm) or Trademarks (tm) of the
+copyright
+holders. Use of them is covered by separate agreement with the copyright
+holders.
+
+5. If any files are modified, you must cause the modified files to carry
+prominent notices stating that you changed the files and the date of any
+change.
+
+Disclaimer
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Property changes on: trunk/docutils/licenses/ZPL-2-1.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Deleted: trunk/docutils/licenses/python-2-1-1.txt
===================================================================
--- trunk/docutils/licenses/python-2-1-1.txt 2023-05-26 18:47:49 UTC (rev 9397)
+++ trunk/docutils/licenses/python-2-1-1.txt 2023-06-22 15:34:37 UTC (rev 9398)
@@ -1,232 +0,0 @@
-A. HISTORY OF THE SOFTWARE
-==========================
-
-Python was created in the early 1990s by Guido van Rossum at Stichting
-Mathematisch Centrum (CWI) in the Netherlands as a successor of a
-language called ABC. Guido is Python's principal author, although it
-includes many contributions from others. The last version released
-from CWI was Python 1.2. In 1995, Guido continued his work on Python
-at the Corporation for National Research Initiatives (CNRI) in Reston,
-Virginia where he released several versions of the software. Python
-1.6 was the last of the versions released by CNRI. In 2000, Guido and
-the Python core development team moved to BeOpen.com to form the
-BeOpen PythonLabs team. Python 2.0 was the first and only release
-from BeOpen.com.
-
-Following the release of Python 1.6, and after Guido van Rossum left
-CNRI to work with commercial software developers, it became clear that
-the ability to use Python with software available under the GNU Public
-License (GPL) was very desirable. CNRI and the Free Software
-Foundation (FSF) interacted to develop enabling wording changes to the
-Python license. Python 1.6.1 is essentially the same as Python 1.6,
-with a few minor bug fixes, and with a different license that enables
-later versions to be GPL-compatible. Python 2.1 is a derivative work
-of Python 1.6.1, as well as of Python 2.0.
-
-After Python 2.0 was released by BeOpen.com, Guido van Rossum and the
-other PythonLabs developers joined Digital Creations. All
-intellectual property added from this point on, starting with Python
-2.1 and its alpha and beta releases, is owned by the Python Software
-Foundation (PSF), a non-profit modeled after the Apache Software
-Foundation. See https://www.python.org/psf/ for more information about
-the PSF.
-
-Thanks to the many outside volunteers who have worked under Guido's
-direction to make these releases possible.
-
-
-B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
-===============================================================
-
-PSF LICENSE AGREEMENT
----------------------
-
-1. This LICENSE AGREEMENT is between the Python Software Foundation
-("PSF"), and the Individual or Organization ("Licensee") accessing and
-otherwise using Python 2.1.1 software in source or binary form and its
-associated documentation.
-
-2. Subject to the terms and conditions of this License Agreement, PSF
-hereby grants Licensee a nonexclusive, royalty-free, world-wide
-license to reproduce, analyze, test, perform and/or display publicly,
-prepare derivative works, distribute, and otherwise use Python 2.1.1
-alone or in any derivative version, provided, however, that PSF's
-License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
-2001 Python Software Foundation; All Rights Reserved" are retained in
-Python 2.1.1 alone or in any derivative version prepared by Licensee.
-
-3. In the event Licensee prepares a derivative work that is based on
-or incorporates Python 2.1.1 or any part thereof, and wants to make
-the derivative work available to others as provided herein, then
-Licensee hereby agrees to include in any such work a brief summary of
-the changes made to Python 2.1.1.
-
-4. PSF is making Python 2.1.1 available to Licensee on an "AS IS"
-basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
-DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
-FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.1.1 WILL NOT
-INFRINGE ANY THIRD PARTY RIGHTS.
-
-5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
-2.1.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
-A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.1.1,
-OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
-
-6. This License Agreement will automatically terminate upon a material
-breach of its terms and conditions.
-
-7. Nothing in this License Agreement shall be deemed to create any
-relationship of agency, partnership, or joint venture between PSF and
-Licensee. This License Agreement does not grant permission to use PSF
-trademarks or trade name in a trademark sense to endorse or promote
-products or services of Licensee, or any third party.
-
-8. By copying, installing or otherwise using Python 2.1.1, Licensee
-agrees to be bound by the terms and conditions of this License
-Agreement.
-
-
-BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0
-----------------------------------------------
-
-BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
-
-1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
-office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
-Individual or Organization ("Licensee") accessing and otherwise using
-this software in source or binary form and its associated
-documentation ("the Software").
-
-2. Subject to the terms and conditions of this BeOpen Python License
-Agreement, BeOpen hereby grants Licensee a non-exclusive,
-royalty-free, world-wide license to reproduce, analyze, test, perform
-and/or display publicly, prepare derivative works, distribute, and
-otherwise use the Software alone or in any derivative version,
-provided, however, that the BeOpen Python License is retained in the
-Software, alone or in any derivative version prepared by Licensee.
-
-3. BeOpen is making the Software available to Licensee on an "AS IS"
-basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
-DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
-FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
-INFRINGE ANY THIRD PARTY RIGHTS.
-
-4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
-SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
-AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
-DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
-
-5. This License Agreement will automatically terminate upon a material
-breach of its terms and conditions.
-
-6. This License Agreement shall be governed by and interpreted in all
-respects by the law of the State of California, excluding conflict of
-law provisions. Nothing in this License Agreement shall be deemed to
-create any relationship of agency, partnership, or joint venture
-between BeOpen and Licensee. This License Agreement does not grant
-permission to use BeOpen trademarks or trade names in a trademark
-sense to endorse or promote products or services of Licensee, or any
-third party. As an exception, the "BeOpen Python" logos available at
-http://www.pythonlabs.com/logos.html may be used according to the
-permissions granted on that web page.
-
-7. By copying, installing or otherwise using the software, Licensee
-agrees to be bound by the terms and conditions of this License
-Agreement.
-
-
-CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT
--------------------------------------------------
-
-1. This LICENSE AGREEMENT is between the Corporation for National
-Research Initiatives, having an office at 1895 Preston White Drive,
-Reston, VA 20191 ("CNRI"), and the Individual or Organization
-("Licensee") accessing and otherwise using Python 1.6.1 software in
-source or binary form and its associated documentation.
-
-2. Subject to the terms and conditions of this License Agreement, CNRI
-hereby grants Licensee a nonexclusive, royalty-free, world-wide
-license to reproduce, analyze, test, perform and/or display publicly,
-prepare derivative works, distribute, and otherwise use Python 1.6.1
-alone or in any derivative version, provided, however, that CNRI's
-License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
-1995-2001 Corporation for National Research Initiatives; All Rights
-Reserved" are retained in Python 1.6.1 alone or in any derivative
-version prepared by Licensee. Alternately, in lieu of CNRI's License
-Agreement, Licensee may substitute the following text (omitting the
-quotes): "Python 1.6.1 is made available subject to the terms and
-conditions in CNRI's License Agreement. This Agreement together with
-Python 1.6.1 may be located on the Internet using the following
-unique, persistent identifier (known as a handle): 1895.22/1013. This
-Agreement may also be obtained from a proxy server on the Internet
-using the following URL: http://hdl.handle.net/1895.22/1013".
-
-3. In the event Licensee prepares a derivative work that is based on
-or incorporates Python 1.6.1 or any part thereof, and wants to make
-the derivative work available to others as provided herein, then
-Licensee hereby agrees to include in any such work a brief summary of
-the changes made to Python 1.6.1.
-
-4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
-basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
-DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
-FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
-INFRINGE ANY THIRD PARTY RIGHTS.
-
-5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
-1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
-A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
-OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
-
-6. This License Agreement will automatically terminate upon a material
-breach of its terms and conditions.
-
-7. This License Agreement shall be governed by the federal
-intellectual property law of the United States, including without
-limitation the federal copyright law, and, to the extent such
-U.S. federal law does not apply, by the law of the Commonwealth of
-Virginia, excluding Virginia's conflict of law provisions.
-Notwithstanding the foregoing, with regard to derivative works based
-on Python 1.6.1 that incorporate non-separable material that was
-previously distributed under the GNU General Public License (GPL), the
-law of the Commonwealth of Virginia shall govern this License
-Agreement only as to issues arising under or with respect to
-Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
-License Agreement shall be deemed to create any relationship of
-agency, partnership, or joint venture between CNRI and Licensee. This
-License Agreement does not grant permission to use CNRI trademarks or
-trade name in a trademark sense to endorse or promote products or
-services of Licensee, or any third party.
-
-8. By clicking on the "ACCEPT" button where indicated, or by copying,
-installing or otherwise using Python 1.6.1, Licensee agrees to be
-bound by the terms and conditions of this License Agreement.
-
- ACCEPT
-
-
-CWI PERMISSIONS STATEMENT AND DISCLAIMER
-----------------------------------------
-
-Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
-The Netherlands. All rights reserved.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Stichting Mathematisch
-Centrum or CWI not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
-FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-06-22 16:20:02
|
Revision: 9400
http://sourceforge.net/p/docutils/code/9400
Author: milde
Date: 2023-06-22 16:19:59 +0000 (Thu, 22 Jun 2023)
Log Message:
-----------
Set Docutils version to 0.21b.dev.
Start for the next version's development cycle.
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/embed_images_html5.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.html
trunk/docutils/test/functional/expected/misc_rst_html4css1.html
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/expected/pep_html.html
trunk/docutils/test/functional/expected/rst_html5_tuftig.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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/README.txt 2023-06-22 16:19:59 UTC (rev 9400)
@@ -1,7 +1,7 @@
.. include:: docs/header0.txt
===============================
- README: Docutils 0.20.2b.dev
+ README: Docutils 0.21b.dev
===============================
:Author: David Goodger
@@ -392,7 +392,7 @@
.. _project page: https://sourceforge.net/p/docutils
.. _Docutils-users: docs/user/mailing-lists.html#docutils-users
-
+
..
Local Variables:
mode: indented-text
Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/docutils/__init__.py 2023-06-22 16:19:59 UTC (rev 9400)
@@ -54,7 +54,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.20.2b.dev'
+__version__ = '0.21b.dev'
"""Docutils version identifier (complies with PEP 440)::
major.minor[.micro][releaselevel[serial]][.dev]
@@ -116,8 +116,8 @@
__version_info__ = VersionInfo(
major=0,
- minor=20,
- micro=2,
+ minor=21,
+ micro=0,
releaselevel='beta', # one of 'alpha', 'beta', 'candidate', 'final'
serial=0, # pre-release number (0 for final releases and snapshots)
release=False # True for official releases and pre-releases
Modified: trunk/docutils/setup.py
===================================================================
--- trunk/docutils/setup.py 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/setup.py 2023-06-22 16:19:59 UTC (rev 9400)
@@ -33,7 +33,7 @@
input Docutils supports reStructuredText, an easy-to-read,
what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
'url': 'https://docutils.sourceforge.io/',
- 'version': '0.20.2b.dev',
+ 'version': '0.21b.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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/compact_lists.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/dangerous.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<title>dangerous.txt</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/embed_images_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/embed_images_html5.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/embed_images_html5.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -3,7 +3,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8"/>
-<meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<title>Embedded Images</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/field_name_limit.html
===================================================================
--- trunk/docutils/test/functional/expected/field_name_limit.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/field_name_limit.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/footnotes_html5.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_html.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_html.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/math_output_html.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/math_output_latex.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/math_output_mathjax.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<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.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html4css1.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/misc_rst_html4css1.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<title>Additional tests with html4css1</title>
<link rel="stylesheet" href="foo&bar.css" type="text/css" />
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Additional tests with HTML 5</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/pep_html.html
===================================================================
--- trunk/docutils/test/functional/expected/pep_html.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/pep_html.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -8,7 +8,7 @@
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.20.2b.dev: https://docutils.sourceforge.io/" />
+ <meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<title>PEP 100 - Test PEP</title>
<link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
</head>
Modified: trunk/docutils/test/functional/expected/rst_html5_tuftig.html
===================================================================
--- trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/rst_html5_tuftig.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Special Features of the tuftig.css Stylesheet</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/standalone_rst_docutils_xml.xml 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev -->
+<!-- Generated by Docutils 0.21b.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 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/standalone_rst_html4css1.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
<meta name="author" content="David Goodger" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="reStructuredText, test, parser" name="keywords" />
<meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_1.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-06-22 16:19:43 UTC (rev 9399)
+++ trunk/docutils/test/functional/expected/standalone_rst_s5_html_2.html 2023-06-22 16:19:59 UTC (rev 9400)
@@ -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.20.2b.dev: https://docutils.sourceforge.io/" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
<meta name="version" content="S5 1.1" />
<meta name="author" content="David Goodger" />
<meta name="date" content="2005-11-28" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mi...@us...> - 2023-06-22 16:37:29
|
Revision: 9401
http://sourceforge.net/p/docutils/code/9401
Author: milde
Date: 2023-06-22 16:37:27 +0000 (Thu, 22 Jun 2023)
Log Message:
-----------
LaTeX writer: fix placement of hyperlink target (label) for tables.
Fixes [bugs:#440].
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docs/user/config.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/test/functional/expected/latex_cornercases.tex
trunk/docutils/test/functional/expected/latex_memoir.tex
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
trunk/docutils/test/functional/input/data/hyperlinking.txt
trunk/docutils/test/functional/input/data/tables_latex.txt
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/HISTORY.txt 2023-06-22 16:37:27 UTC (rev 9401)
@@ -22,7 +22,11 @@
Update to version `1.4 <https://pypi.org/project/roman/4.1/>`__.
Fixes feature-requests:#95 (license is now ZPL 2.1).
+* docutils/writers/latex2e/__init__.py
+ - Fix placement of hyperlink target (label) for tables (bug #440).
+
+
Release 0.20.1 (2023-05-17)
===========================
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/RELEASE-NOTES.txt 2023-06-22 16:37:27 UTC (rev 9401)
@@ -145,6 +145,7 @@
- Don't wrap references with custom reference-label_ in
a ``\hyperref`` command in Docutils 0.22.
+ Specify, e.g., "ref" instead of "ref*" to keep generating hyperlinks.
.. _reference-label: docs/user/config.html#reference-label
Modified: trunk/docutils/docs/user/config.txt
===================================================================
--- trunk/docutils/docs/user/config.txt 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/docs/user/config.txt 2023-06-22 16:37:27 UTC (rev 9401)
@@ -1736,10 +1736,10 @@
reference_label
~~~~~~~~~~~~~~~
-The LaTeX command name for `hyperlink references`_ to internal__ or
-implicit__ targets. Per default the LaTeX writer uses ``\hyperref``.
-Specify an alternative reference command, e.g., "ref" or "pageref" to get
-the section number or the page number as reference text.
+Per default the LaTeX writer uses ``\hyperref`` for `hyperlink
+references`_ to internal__ or implicit__ targets.
+Specify an alternative reference command, e.g., "ref" or "pageref"
+to get the section number or the page number as reference text.
.. Caution::
* Drops the original reference text.
@@ -1747,16 +1747,16 @@
* Fails, e.g., with section numbering by Docutils (cf. sectnum_xform_)
or tables without caption.
* Provisional: to be replaced by a dedicated
- `interpreted text role`_ for references.
+ `interpreted text role`_ for references (cf. TODO__).
Default: "" (use "hyperref"). Option: ``--reference-label``.
-.. _hyperlink references: ../ref/rst/restructuredtext.html#hyperlink-references
__ ../ref/rst/restructuredtext.html#internal-hyperlink-targets
__ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
+__ ../dev/todo.html#object-numbering-and-object-references
+.. _hyperlink references: ../ref/rst/restructuredtext.html#hyperlink-references
.. _interpreted text role: ../ref/rst/restructuredtext.html#interpreted-text
-
section_enumerator_separator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2023-06-22 16:37:27 UTC (rev 9401)
@@ -904,7 +904,6 @@
return '|'
return ''
- # horizontal lines are drawn below a row,
def get_opening(self, width=r'\linewidth'):
align_map = {'left': '[l]',
'center': '[c]',
@@ -1009,6 +1008,11 @@
return 'l'
def get_caption(self):
+ """Deprecated. Will be removed in Docutils 0.22."""
+ warnings.warn('`writers.latex2e.Table.get_caption()` is obsolete'
+ ' and will be removed in Docutils 0.22.',
+ DeprecationWarning, stacklevel=2)
+
if not self.caption:
return ''
caption = ''.join(self.caption)
@@ -3007,6 +3011,13 @@
width = self.to_latex_length(node['width'])
except KeyError:
width = r'\linewidth'
+ # Insert hyperlabel and anchor before the table
+ # if it has no caption/title.
+ # See visit_thead() for tables with caption.
+ if not self.active_table.caption:
+ self.out.extend(self.ids_to_labels(
+ node, set_anchor=len(self.table_stack) != 1,
+ newline=True))
# TODO: Don't use a longtable or add \noindent before
# the next paragraph, when in a "compound paragraph".
# Start a new line or a new paragraph?
@@ -3018,9 +3029,6 @@
self.active_table.close()
if len(self.table_stack) > 0:
self.active_table = self.table_stack.pop()
- # Insert hyperlabel after (long)table, as
- # other places (beginning, caption) result in LaTeX errors.
- self.out += self.ids_to_labels(node, set_anchor=False, newline=True)
self.duclass_close(node)
def visit_target(self, node):
@@ -3079,7 +3087,14 @@
if 1 == self.thead_depth():
self.out.append('{%s}\n' % self.active_table.get_colspecs(node))
self.active_table.set('preamble written', 1)
- self.out.append(self.active_table.get_caption())
+ if self.active_table.caption:
+ if self._thead_depth == 1:
+ pre = [r'\caption{']
+ post = self.ids_to_labels(node.parent.parent, False) + [r'}\\']
+ else:
+ pre = [r'\caption[]{']
+ post = [r' (... continued)}\\']
+ self.out.extend(pre + self.active_table.caption + post + ['\n'])
self.out.extend(self.active_table.visit_thead())
def depart_thead(self, node):
Modified: trunk/docutils/test/functional/expected/latex_cornercases.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_cornercases.tex 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/test/functional/expected/latex_cornercases.tex 2023-06-22 16:37:27 UTC (rev 9401)
@@ -617,6 +617,7 @@
\\
\hline
+\label{nested-table}
\noindent\makebox[\linewidth][r]{%
\setlength{\DUtablewidth}{\dimexpr\linewidth-3\arrayrulewidth\relax}%
\begin{tabular}{|p{\DUcolumnwidth{0.150}}|p{\DUcolumnwidth{0.150}}|}
@@ -869,13 +870,13 @@
In LaTeX, we must set an explicit anchor (\texttt{\textbackslash{}phantomsection}) for a
%
-\phantomsection\label{hypertarget-in-plain-text}hypertarget in plain text or in a figure but not in a longtable or
-caption:
+\phantomsection\label{hypertarget-in-plain-text}hypertarget in plain text or in a figure but not in a table title
+or figure caption:
\setlength{\DUtablewidth}{\dimexpr\linewidth-4\arrayrulewidth\relax}%
\begin{longtable}{|p{\DUcolumnwidth{0.150}}|p{\DUcolumnwidth{0.150}}|p{\DUcolumnwidth{0.150}}|}
\caption{Table with %
-\label{hypertarget-in-table-title}hypertarget in table title.}\\
+\label{hypertarget-in-table-title}hypertarget in table title.\label{table-label}}\\
\hline
False
@@ -886,7 +887,6 @@
\\
\hline
\end{longtable}
-\label{table-label}
\begin{figure}
\phantomsection\label{figure-label}
@@ -904,6 +904,7 @@
See \hyperref[hypertarget-in-plain-text]{hypertarget in plain text},
\hyperref[table-label]{table label}, \hyperref[hypertarget-in-table-title]{hypertarget in table title},
+\hyperref[nested-table]{nested table},
\hyperref[figure-label]{figure label}, \hyperref[hypertarget-in-figure-caption]{hypertarget in figure caption},
\hyperref[hypertarget-in-figure-legend]{hypertarget in figure legend}, and
\hyperref[image-label]{image label}.
Modified: trunk/docutils/test/functional/expected/latex_memoir.tex
===================================================================
--- trunk/docutils/test/functional/expected/latex_memoir.tex 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/test/functional/expected/latex_memoir.tex 2023-06-22 16:37:27 UTC (rev 9401)
@@ -1081,6 +1081,7 @@
column widths are determined by the backend (if supported by the
writer/backend).
+\phantomsection\label{target2}\label{target1}
\begin{longtable*}{|l|l|l|}
\hline
\textbf{A} & \textbf{B} & \textbf{A or B} \\
@@ -1101,7 +1102,6 @@
True & True & True \\
\hline
\end{longtable*}
-\label{target2}\label{target1}
\subsection{2.14.4 Admonitions%
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2023-06-22 16:37:27 UTC (rev 9401)
@@ -1082,6 +1082,7 @@
column widths are determined by the backend (if supported by the
writer/backend).
+\phantomsection\label{target2}\label{target1}
\begin{longtable*}{|l|l|l|}
\hline
\textbf{A} & \textbf{B} & \textbf{A or B} \\
@@ -1102,7 +1103,6 @@
True & True & True \\
\hline
\end{longtable*}
-\label{target2}\label{target1}
\subsubsection{2.14.4 Admonitions%
Modified: trunk/docutils/test/functional/expected/standalone_rst_xetex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/test/functional/expected/standalone_rst_xetex.tex 2023-06-22 16:37:27 UTC (rev 9401)
@@ -1117,6 +1117,7 @@
column widths are determined by the backend (if supported by the
writer/backend).
+\phantomsection\label{target2}\label{target1}
\begin{longtable*}{|l|l|l|}
\hline
\textbf{A} & \textbf{B} & \textbf{A or B} \\
@@ -1137,7 +1138,6 @@
True & True & True \\
\hline
\end{longtable*}
-\label{target2}\label{target1}
\subsubsection{2.14.4 Admonitions%
Modified: trunk/docutils/test/functional/input/data/hyperlinking.txt
===================================================================
--- trunk/docutils/test/functional/input/data/hyperlinking.txt 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/test/functional/input/data/hyperlinking.txt 2023-06-22 16:37:27 UTC (rev 9401)
@@ -2,8 +2,8 @@
=======================
In LaTeX, we must set an explicit anchor (``\phantomsection``) for a
-_`hypertarget in plain text` or in a figure but not in a longtable or
-caption:
+_`hypertarget in plain text` or in a figure but not in a table title
+or figure caption:
.. _`table label`:
@@ -27,6 +27,7 @@
See `hypertarget in plain text`_,
`table label`_, `hypertarget in table title`_,
+`nested table`_,
`figure label`_, `hypertarget in figure caption`_,
`hypertarget in figure legend`_, and
`image label`_.
Modified: trunk/docutils/test/functional/input/data/tables_latex.txt
===================================================================
--- trunk/docutils/test/functional/input/data/tables_latex.txt 2023-06-22 16:19:59 UTC (rev 9400)
+++ trunk/docutils/test/functional/input/data/tables_latex.txt 2023-06-22 16:37:27 UTC (rev 9401)
@@ -114,6 +114,7 @@
+-----------------------------------------+-----------------+
| .. table:: | cell 1, 2 |
| :align: right | |
+| :name: nested table | |
| | |
| +-----+-----+ | |
| | 1 | 2 | | |
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|