Docutils Release Notes
This document summarizes the major changes in previous and upcoming releases.
For a more detailed list of changes, please see the Docutils HISTORY.
The command-line usage pattern will change:
- COMMAND [OPTIONS] [SOURCE [DESTINATION]]
+ COMMAND [OPTIONS] [SOURCE [SOURCE2 [...]]]
- Stop accepting the DESTINATION positional argument in Docutils 1.0.
Use --output=DESTINATION (cf. the "output_path" configuration setting)
or output redirection.
- Accept the short option -o for --output in Docutils 1.0
- Accept more than one source document in Docutils 2.0
For the rationale, see https://clig.dev/#arguments-and-flags.
The front end tools will use argparse for command line parsing
in Docutils 2.0 or later.
- Drop the name attribute from <reference> nodes in Docutils 1.0.
- Use the %tbl.table.att parameter entity instead of %bodyatt
to customize the <table> element's attribute list in Docutils 1.0.
- The <footnote> element's first child (<label>) will become mandatory
in Docutils 1.0.
- The "rst" parser will warn if a "figure" directive is missing both
caption and legend in Docutils 1.0.
- The "rst" parser will use <inline> elements for inline targets
in Docutils 1.0.
- <target> elements with content will be deprecated in Docutils 1.0
and invalid in Docutils 2.0.
- To match the definition in the "Exchange Table Model", the
"colwidth" attribute will be stored as a str (instead of
numerical) value in Python element instances in Docutils 1.0.
Proportional values will be stored with unit "*" in Docutils 2.0.
The default unit will change to "pt" in Docutils 3.0.
- The <doctest_block> element will be deprecated in Docutils 1.0.
The rST parser will handle a doctest block similar to a "code" directive
with language "pycon" (Python console) and generate a <literal_block>.
- Remove io.BinaryFileOutput and core.publish_cmdline_to_binary()
in Docutils 0.24.
- Remove writers.latex2e.SortableDict in Docutils 0.24.
- Remove parsers.rst.directives.length_units in Docutils 0.24.
Use parsers.rst.directives.CSS3_LENGTH_UNITS. Mind that this
is a tuple, not a list.
- Remove the "name" argument from
writers.latex2e.LaTeXTranslator.visit_docinfo_item()
(ignored since Docutils 0.22) in Docutils 0.24.
- Remove parsers.rst.directives.CSVTable.HeaderDialect
in Docutils 1.0.
- Remove utils.decode_path() and utils.get_stylesheet_reference()
in Docutils 1.0.
- Remove support for the recommonmark parser in Docutils 1.0.
Recommonmark is unmaintained since 2021 and deprecated in favour
of the MyST parser.
- Remove the input_encoding auto-detection code in Docutils 1.0.
- Remove the "TransformSpec.unknown_reference_resolvers" hook chain
in Docutils 1.0. Use a transform,
see transforms.references.CitationReferences for an example.
- Remove the internal attribute nodes.Targetable.indirect_reference_name
in Docutils 1.0. (Was required for MoinMoin <= 1.9.)
- Don't call transforms.references.DanglingReferences and
transforms.references.DanglingReferencesVisitor in Docutils 1.0;
remove them in Docutils 2.0. [rationale]
- Remove parsers.rst.roles.set_classes() and
parsers.rst.roles.normalized_role_options()
(obsoleted by parsers.rst.roles.normalize_options()) in Docutils 2.0.
- Remove the "rawsource" argument from nodes.Text.__init__()
in Docutils 2.0.
- Remove the internal attributes nodes.Element.known_attributes,
nodes.Element.basic_attributes, and nodes.Element.local_attributes,
in Docutils 2.0.
- 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.
- Remove the "reader_name", "parser_name", and "writer_name" arguments of
core.Publisher.__init__() and the core.publish_*() convenience
functions as well as the "parser_name" argument of Reader.__init__()
in Docutils 2.0. Since Docutils 0.22, you may use "reader", "parser",
and "writer" arguments for component names as well as instances.
- Remove states.RSTStateMachine.memo.section_bubble_up_kludge,
states.RSTStateMachine.memo.section_level,
states.RSTState.title_inconsistent(), and states.Line.eofcheck
in Docutils 2.0. Ignored since Docutils 0.22.
- Remove frontend.OptionParser, frontend.Option, frontend.Values,
frontend.store_multiple(), and frontend.read_config_file() when
migrating to argparse in Docutils 2.0 or later.
- Prefer explicit reference names as base for an HTML element's ID
in Docutils 1.0. No change for internal cross-references.
Cf. Sphinx issue #1961
- 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.)
- Change the default priority of the universal.SmartQuotes transform
from 855 (very late) to 510 (main) in Docutils 1.0.
- Move math format conversion from docutils/utils/math (called from
docutils/writers/_html_base.py) to a transform.
- If the environment variable SOURCE_DATE_EPOCH is set, the "date"
directive and the timestamp inserted by the "datestamp"
configuration setting will use its value instead of the current time to
support reproducible builds in Docutils 1.0.
Targets generated from hyperlink references with embedded URI or alias
are no longer "explicit" but "implicit" (i.e. with the same priority as
auto-generated section targets, see implicit hyperlink targets).
Don't report an error for duplicate targets with identical refname.
Drop the "name" option of the "target-notes" directive.
(Report an error instead of silently ignoring the value.)
New alias "rst-class" for the "class" directive to improve the
compatibility with Sphinx.
- New objects
- transforms.references.CitationReferences
- Mark citation_references as resolved if the backend
uses a BibTeX database.
Output changes
- manpage:
- Do not drop text of internal targets.
- Fix backwards-compatibility problem:
- reStructuredText section parsing no longer requires
parsers.rst.states.RSTStateMachine.memo.section_parents
(a cache introduced in Docutils 0.22rc1).
Deprecate parsers.rst.states.Struct (obsoleted by types.SimpleNamespace).
- reStructuredText:
- Support CSS3 units. This adds "ch", "rem", "vw", "vh", "vmin",
"vmax", and "Q" to the supported length units. Note that some
output formats don't support all units.
- New option "figname" for the "figure" directive.
- Document Tree / Docutils DTD
- Allow multiple <term> elements in a <definition_list_item>
(third-party writers may need adaption).
- The first element in a <figure> may also be a <reference>
(with nested "clickable" <image>).
- Configuration changes
- Make MathML the default math_output for the "html5" writer.
- Change the default input_encoding from None (auto-detect) to "utf-8".
- Drop short options -i and -o.
Use the long equivalents --input-encoding and --output-encoding.
(See command line interface for the rationale.)
- Rename configuration setting "output" to "output_path".
- New setting "validate".
- The manpage writer now recognizes the sections [writers] and
[manpage writer] with the new setting text_references.
- Output changes
- LaTeX:
Don't wrap references with custom reference_label in a \hyperref
command. The "hyperref" package generates hyperlinks for labels by
default, so there is no change in the PDF
(except for the starred forms like reference_label = \ref*).
Stop requiring "ifthen.sty". Add "ifthen" to the stylesheet setting
or replace use of \ifthenelse{\isundefined... with the eTeX
primitive \ifdefined.
- HTML5:
- Unitless image size measures are written as <img> "width" and
"hight" values instead of "style" rules. The current behaviour
is kept for values with units, so users may specify, e.g. :width:
50px instead of :width: 50 to override CSS stylesheet rules.
- manpage:
Don't UPPERCASE section headings.
Handle hyperlink references (see the text_references setting).
- null:
The "null" writer output changed from None to the empty string.
publish_string() now returns a bytes or str instance
for all writers (as documented).
- New objects
- parsers.docutils_xml
parser for Docutils XML (e.g., the output of the "xml" writer).
Provisional.
Try docutils --parser=xml test/data/multiple-term-definitions.xml
or use the :parser: option of the "include" directive to include
an XML file in a rST document.
- nodes.Element.validate()
- Raise nodes.ValidationError if the element does not comply with
the Docutils Document Model.
Provisional.
- writers.DoctreeTranslator
- Generic Docutils document tree translator base class with
uri2path() auxiliary method.
Provisional.
- Removed objects
- core.Publisher.setup_option_parser()
- internal, obsolete,
- frontend.ConfigParser.get_section()
- obsoleted by the configparser's "Mapping Protocol Access",
- frontend.OptionParser.set_defaults_from_dict()
- obsolete,
- nodes.Element.set_class()
- obsolete, append to Element['classes'] directly,
- parsers.rst.directives.tables.CSVTable.decode_from_csv()
- not required with Python 3,
- parsers.rst.directives.tables.CSVTable.encode_from_csv()
- not required with Python 3,
- transforms.writer_aux.Compound
- not used since Dec 2010,
- utils.error_reporting
- obsolete in Python 3,
- utils.Reporter.set_conditions()
- obsolete, set attributes via configuration settings or directly.
- Removed localisations
- Mistranslations of the "admonition" directive name:
- Use "advies" (af), "varsel" (da), "warnhinweis" (de), "aviso" (es),
"sciigo" (eo), "annonce" (fr), "avviso" (it), "advies" (nl),
"zauważenie" (pl) (introduced in Docutils 0.21)
or the English name "admonition".
- New files
- docutils/parsers/rst/include/html-roles.txt
- Standard definition file for additional roles matching HTML tags.
- Removed files
- tools/rst2odt_prepstyles.py
- Obsoleted by writers.odf_odt.prepstyles.
- docutils/utils/roman.py
- Obsoleted by docutils/utils/_roman_numerals.py
Bugfixes and improvements (see HISTORY).
- Document Tree / Docutils DTD
- Remove declaration of unsupported element <info>.
- Remove <decoration> from content declaration of <section> elements.
- Declare support for languages Georgian and Catalan (Valencian).
- Fix test failures.
Add missing metadata files to sdist.
No changes to the code.
Bugfix release. See HISTORY for details.
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:
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.
Place common settings in section [latex writers].
- New configuration setting "output". Obsoletes the <destination>
positional argument (cf. future changes).
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.
tools/
- Moved quicktest.py to tools/dev/.
Bugfixes and improvements (see HISTORY).
Drop support for Python 2.7, 3.5, and 3.6.
Output changes:
- HTML5:
Wrap groups of footnotes in an <aside> for easier styling.
The CSS rule .footnote-list { display: contents; } can be used to
restore the behaviour of custom CSS styles.
After package installation, the CLI commands python -m docutils and
docutils start the generic command line front end tool.
Support parsing "Markdown" input with 3rd party parsers
myst, pycmark, or recommonmark.
The default values for the "pep-references", "rfc-base-url",
and "python-home" configuration settings now use the "https:" scheme.
The PEP-writer template's header is updated to fix links and
resemble the header of official PEPs.
Various bugfixes and improvements (see HISTORY).
Note
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).
Use nodes.Node.findall() to get an iterator.
- re-add module parsers.rst.directives.html
(stub, emits deprecation warning and loads "Meta" directive
from its new place at parsers.rst.directives.misc.)
- Small bugfixes (see HISTORY).
Output changes:
- Identifiers:
During identifier normalization, leading number and hyphen
characters are no longer stripped from a reference name, if the
id_prefix setting is non-empty.
- Example:
with --id-prefix="DU-", a section with title "34. May"
now gets the identifier key DU-34-may instead of DU-may.
The default value for the auto_id_prefix setting changed to %:
"use the tag name as prefix for auto-generated IDs".
Set auto_id_prefix to id for unchanged auto-IDs.
- HTML5:
Use the semantic tag <aside> for footnote text and citations, topics
(except abstract and toc), admonitions, and system messages.
Use <nav> for the Table of Contents.
Make "auto" table column widths the default: Only specify column
widths, if the "widths" option is set and not "auto".
The table-style setting "colwidths-grid" restores the current default.
Items of a definition list with class argument "details" are
converted to details disclosure elements. Example:
..class:: details
Summary
This additional information should be hidden.
Do not add "compound-first", "compound-middle", or "compound-last" to
elements nested in a compound. Use child selector and ":first-child",
":last-child" pseudo classes instead.
Use class value "backrefs" instead of "fn-backref" for a span of
back-references.
Write footnote brackets and field term colons to HTML, so that they
are present also without CSS and when copying text.
Move space character between section number and heading into
"sectnum" span.
- math_output: html
- Support more commands, fix mapping of commands to Unicode characters.
- Scale variable sized operators and big delimiters with CSS.
- Don't use <tt> element (deprecated in HTML5).
- Use STIX fonts if available.
- LaTeX:
legacy_class_functions setting default changed to "False",
admonitions are now environments.
New standard Docutils doctree node: <meta>.
New configuration settings:
Removed files:
iepngfix.htc and blank.gif (IE 6 workaround for s5_html).
Removed sub-module:
parsers.rst.directives.html (reversed in release 0.18.1).
Removed function: utils.unique_combinations()
(obsoleted by itertools.combinations()).
Removed attributes:
- HTMLTranslator.topic_classes: check node.parent.classes instead.
- nodes.Text.rawsource: we store the null-escaped text in Text
nodes since 0.16 so there is no additional information in the
rawsource.
Major refactoring and fixes/additions in
docutils/utils/math/math2html.py and
docutils/utils/math/latex2mathml.py
(mathematical notation in HTML, cf. LaTeX syntax for mathematics).
nodes.Node.traverse() returns an iterator instead of a list
(reversed in release 0.18.1).
Various bugfixes and improvements (see HISTORY).
Fix spelling errors in documentation and docstrings.
Thanks to Dimitri Papadopoulos.
- Bug fixes (for details see the Docutils HISTORY).
- Numerous bug fixes and improvements
(for details see the Docutils HISTORY).
- Installing with setup.py now requires setuptools.
Alternatively, install with pip.
- The generic command line front end tool docutils-cli.py allows
the free selection of reader, parser, and writer components.
- Support Arabic language.
- New, experimental wrapper to integrate the recommonmark
Markdown parser for use with Docutils.
Currently only tested with recommonmark version 0.4.0.
- HTML5 writer:
- New option embed_images.
- Use semantic tags (for details see the Docutils HISTORY).
- Change the initial_header_level setting's default to "2", as browsers
use the same style for <h1> and <h2> when nested in a section.
- New optional style responsive.css, adapts to different screen
sizes.
- Move non-essential styling from minimal.css to plain.css
rsp. responsive.css.
- Show code line numbers as pseudo-elements so they are skipped when
copying the code block from the page.
- LaTeX writer:
- New configuration setting legacy_class_functions.
- The special value "auto" for the graphicx_option setting
is no longer supported (it never worked for xetex/luatex).
- Styling commands using the legacy \docutilsrole prefix are
now ignored. Use \DUrole.
- Most helper commands and element definitions are now defined in the
LaTeX package docutils.sty and only inserted in the document
preamble if the stylesheet setting does not lists "docutils".
- Remove legacy LaTeX stylesheet docutils-05-compat.sty.
Docutils 0.16.x supports Python 2.7 and Python >= 3.5 natively,
without the use of the 2to3 tool.
- reStructuredText:
- LaTeX writer:
- Informal titles of type "rubric" default to bold-italic and left aligned.
- Deprecate \docutilsrole prefix for styling commands:
use \DUrole instead.
- Fix topic subtitle.
- Add "latex writers" to the config_section_dependencies.
- Ignore classes for rubric elements
(class wrapper interferes with LaTeX formatting).
- tools/buildhtml.py
- New option --html-writer allows to select "html" (default),
"html4" or "html5" (deprecated in favour of the "writer" setting
in Docutils 0.18).
- docutils/io.py
- Remove the handle_io_errors argument from io.FileInput/Output.
- docutils/nodes.py
- Various bugfixes and improvements (see HISTORY).
Docutils 0.15.x is compatible with Python versions 2.6, 2.7 and 3.3 to 3.5.
Note
Docutils 0.15.x is the last version supporting Python 2.6, 3.3 and 3.4.
- reStructuredText:
- Allow embedded colons in field list field names (before, tokens like
:this:example: were considered ordinary text).
- Fixed a bug with the "trim" options of the "unicode" directive.
- languages: Added Korean localisation (ko).
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.
- docutils/parsers/rst/:
- Added functionality: escaped whitespace in URI contexts.
- Consistent handling of all whitespace characters in inline markup
recognition. (May break documents that relied on some whitespace
characters (NBSP, ...) not to be recognized as whitespace.)
- docutils/utils/smartquotes.py:
- Update quote definitions for et, fi, fr, ro, sv, tr, uk.
- Add quote definitions for hr, hsb, hu, lv, sh, sl, sr.
- Differentiate apostrophe from closing single quote (if possible).
- Add command line interface for stand-alone use (requires 2.7).
- docutils/writers/_html_base:
- Provide default title in metadata.
- The MathJax CDN shut down on April 30, 2017. For security reasons, we
don't use a third party public installation as default but warn
if math_output is set to MathJax without specifying a URL.
See math_output for details.
- docutils/writers/html4css1:
- Respect automatic table column sizing.
- docutils/writers/latex2e/__init__.py
- Handle class arguments for block-level elements by wrapping them
in a "DUclass" environment. This replaces the special handling for
"epigraph" and "topic" elements.
- docutils/writers/odf_odt:
- Language option sets ODF document's default language
- Image width, scale, ... set image size in generated ODF.
- tools/
- New front-end rst2html4.py.
- docutils/writers/html5_polyglot
- New HTML writer generating HTML 5.
- tools/
- New front-end rst2html5.py.
- languages: persian/farsi (fa) and latvian (la) mappings.
- change default base url for :rfc: to http://tools.ietf.org/html/
- tables accept widths, a list and align
- latex2e: Fix admonition width, remove deprecated options,
better tablewidth auto, ...
- rst.el: The problem with electric-indent-mode has been fixed.
Small changes only, release current state
General
- Apply [ 2714873 ] Fix for the overwriting of document attributes.
- Support embedded aliases within hyperlink references.
- Fix [ 228 ] try local import of docutils components (reader, writer, parser,
language module) before global search.
docutils/parsers/rst/directives/tables.py
- Fix [ 210 ] Python 3.3 checks CVS syntax only if "strict" is True.
docutils/writers/html4css1/__init__.py
- Fix [ 3600051 ] for tables in a list, table cells are not compacted.
- New setting stylesheet_dirs (see above).
Now, it is easy to add a custom stylesheet to Docutils' default
stylesheet with, e.g., --stylesheet_path='html4css1.css, mystyle.css'
- Changed behaviour of the default settings:
if there is a file html4css1.css in the working directory of the
process at launch, it is used instead of the one provided by Docutils
in the writer source directory.
- New default for math_output: HTML math.css.
- Avoid repeated class declarations in html4css1 writer
(modified version of patch [ 104 ]).
docutils/writers/latex2e/__init__.py
- Drop the simple algorithm replacing straight double quotes with
English typographic ones.
Activate the SmartQuotes transform if you want this feature.
- New setting stylesheet_dirs: Comma-separated list of directories
where stylesheets are found. Used by stylesheet_path when expanding
relative path arguments.
docutils/writers/manpage.py
- Fix [3607063] handle lines starting with a period.
- Fix option separating comma was bold (thanks to Bill Morris).
Docutils 0.10 is compatible with Python versions from 2.4 to 3.2.
General:
SmartQuotes transform for typographic quotes and dashes.
docutils/math, docutils/error_reporting.py, and
docutils/urischemes.py moved to the utils package.
Code importing these modules needs to adapt, e.g.:
try:
import docutils.math as math
except ImportError:
import docutils.utils.math as math
enhanced math and error handling.
docutils/io.py
- FileInput/FileOutput: no system-exit on IOError.
The handle_io_errors argument is ignored.
docutils/writers/html4css1/__init__.py
- Use <code> tag for inline "code",
do not drop nested inline nodes (syntax highlight tokens).
- Customizable MathJax URL (based on patch by Dmitry Shachnev).
- No line break after opening inline math tag.
docutils/writers/latex2e/__init__.py, docutils/writers/xetex/__init__.py
- Fix section numbering by LaTeX.
docutils/writers/s5_html/__init__.py
- Fix [ 3556388 ] Mathjax does not work with rst2s5.
Note
Docutils 0.9.1 is the last version supporting Python 2.3.
General:
- reStructuredText "code" role and directive with syntax highlighting
by Pygments.
- "code" option of the "include" directive.
- Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
characters and "international" quotes around inline markup.
- Fix handling of missing stylesheets.
setup.py
- Fix [ 2971827 ] and [ 3442827 ]
extras/roman.py moved to docutils/utils/roman.py
docutils/utils.py -> docutils/utils/__init__.py
- docutils.utils is now a package (providing a place for sub-modules)
docutils/writers/html4css1/__init__.py
- change default for math-output setting to MathJax
docutils/writers/latex2e/__init__.py
- Support the abbreviation and acronym standard roles.
- Record only files required to generate the LaTeX source as dependencies.
- Use \setcounter{secnumdepth}{0} instead of *-versions
when suppressing LaTeX section numbering.
- General:
- Fix [ 3364658 ] (Change last file with Apache license to BSD-2-Clause)
and [ 3395920 ] (correct copyright info for rst.el).
- docutils/writers/latex2e/__init__.py
- Clean up Babel language setting. Restores Sphinx compatibility.
COPYING:
- Some additions to the Docutils core are released under the 2-Clause BSD
license.
General:
- Handle language codes according to BCP 47.
- If the specified language is not supported by Docutils,
warn and fall back to English.
- Math support: reStructuredText "math" role and directive,
math and math_block doctree elements.
- Orphaned "python" reader and "newlatex2e" writer moved to the sandbox.
reStructuredText:
most directives now support a "name" option that attaches a
reference name. So you can write
.. image:: image.png
:name: image name
as a short form of
.. _image name:
.. image:: image.png
Internationalization:
- Added Lithuanian mappings.
Components:
Components:
- HTML writer:
- Support SVG and SWF images (thanks to Stefan Rank).
- Generate valid XHTML for centered images with targets.
Use CSS classes instead of "align" tags for image alignment.
- LaTeX2e writer:
- Use the \url command for URLs (breaks long URLs instead of writing
into the margin).
- Preserve runs of spaces in 'inline literals'.
- Deprecate figure_footnotes setting.
- Rename use_latex_footnotes setting to docutils_footnotes.
- New latex_preamble setting.
- Use PDF standard fonts (Times/Helvetica/Courier) as default.
- hyperref package called with unicode option (see the
hyperref config tips for how to override).
- Drop the special output_encoding default ("latin-1").
The Docutils wide default (usually "UTF-8") is used instead.
- manpage writer:
- Titles level 1, that is .SH, always uppercase.
- Apply patch from mg: literal text should be bold in man-pages.
General:
- io.FileInput opens files as text files with universal newline support
(mode "rU", configurable with the new optional argument "mode").
- setup.py:
- Python 3 support: copy test/ and tools/ to the build-dir
and convert Python sources with 2to3.
Docutils 0.6 is compatible with Python versions from 2.3 up to 2.6
and convertible to 3.1 code.
- reStructuredText:
- Allow length units for all length specifications.
- Allow percent sign in "scale" option of "figure" and "image" directives.
- Align images with class "align-[right|center|left]"
(allows setting the alignment of an image in a figure).
- Hard tabs in literal inclusions are replaced by spaces.
This is configurable via the new :tab-width: option of the
"include" directive (a negative tab-width prevents tab expansion).
- HTML writer:
- --stylesheet and --stylesheet-path options now support a comma
separated list of stylesheets.
- LaTeX2e writer:
- New defaults:
- font-encoding: "T1" (formerly implicitly set by 'ae').
- use-latex-toc: true (ToC with page numbers).
- use-latex-footnotes: true (no mixup with figures).
- Float placement defaults to "here definitely" (configurable).
- Align of image in a figure defaults to 'center'.
- Use class defaults for page margins ('typearea' now optional).
- Support LaTeX packages as --stylesheet arguments.
- Use bp for lengths without unit or unit pt,
do not convert px to pt.
- Do not use 'ae' and 'aeguill' packages if font-encoding is set to ''.
- Set sub- and superscript role argument as text not math.
- Support custom roles based on standard roles.
- Load packages and define macros only if required in the document.
- All Docutils specific LaTeX macros are prefixed with DU.
- Better conformance to Docutils specifications with "use_latex_toc".
- If 'sectnum_xform' is False, the 'sectnum' directive triggers
section numbering by LaTeX.
- Use default font in admonitions and sidebar.
- Typeset generic topic as "quote with title".
- Use template (file and configuration option).
- Render doctest blocks as literal blocks (indented).
- Bugfix: The "align" argument of a figure now works as documented
(aligning the figure, not its contents).
- ODT writer:
- moved from sandbox to Doctutils core.
- manpage writer:
- moved from sandbox to Doctutils core.
Note
Docutils 0.5 is the last version supporting Python 2.2.
Components:
- HTML writer.
- Dropped all name attributes of a elements (id is
universally supported now).
- LaTeX2e writer:
- Better bibTeX citation support.
- Add --literal-block-env
- PEP writer:
- Changed to support new python.org website structure and
pep2pyramid.py.
reStructuredText:
- Changed the directive API to a new object-oriented system.
(Compatibility for the old, functional-style directive interface is
retained.) See the updated Creating reStructuredText Directives
how-to.
- Allow + and : in reference names requested for citations.
Documentation:
Internationalization:
General:
- Configuration files are now assumed and required to be
UTF-8-encoded.
- Added docutils/writers/html4css1/template.txt.
- Enhance emacs support.
Note
Docutils 0.4 is the last version supporting Python 2.1.
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).
Components:
- Added an S5/HTML writer and the rst2s5.py front end:
multi-platform, multi-browser HTML slide shows.
- The newlatex2e writer is nearing completion.
- Added a DocTree reader, publish_doctree and
publish_from_doctree convenience functions, for document tree
extraction and reprocessing.
reStructuredText:
- Added directives: "container" (generic block-level container),
"default-role" (role used for `backtick` syntax), "title"
(document title metadata), and "date" (generate the current local
date, for substitution definitions).
- Length units are now supported for image sizes.
- Added standard definition files for special characters etc.
Internationalization:
- Added Japanese and Simplified Chinese language mappings, and support
for double-width CJK-characters in tables and section titles.
Documentation:
General:
- A special "line block" syntax has been added. (Also see the
quick reference.)
- Empty sections are now allowed.
- A "raw" role has been added.
- The LaTeX writer now escapes consecutive dashes (like "--" or "---")
so that they are no longer transformed by LaTeX to en or em dashes.
(Please see the FAQ for how to represent such dashes.)
- A dependency recorder has been added.
- A directive has been added for compound paragraphs.