Docutils | Overview | About | Users | Reference | Developers

Docutils Release Notes

Contact:
grubert@users.sourceforge.net
Maintainer:

docutils-develop@lists.sourceforge.net

Date:
2026-06-22
Revision:
10367
Web site:

https://docutils.sourceforge.io/

This document summarizes the major changes in previous and upcoming releases. For a more detailed list of changes, please see the Docutils HISTORY.

Future changes

Requirements

  • Drop support for Python 3.9 and 3.10 in Docutils 2.0.

Command line interface

  • Accept more than one source document in Docutils 2.0

    - COMMAND [OPTIONS] [SOURCE [DESTINATION]]
    + COMMAND [OPTIONS] [SOURCE [SOURCE2 [...]]]
  • The front end tools will use argparse for command line parsing in Docutils 2.0 or later.

Document Tree / Docutils DTD

  • 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.

  • Inline <target> elements and <target> elements with content will be deprecated in Docutils 1.0 and invalid in Docutils 2.0. The "rst" parser will use <inline> elements for inline targets in Docutils 1.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>.

  • The Transitions transform will ignore <pending>, <substitution_definition>, and <target> elements when warning about transitions at the start or end of the document or a section.

  • In case of name conflicts, an explicit target will not only override the "name" attribute of an implicit target but also its name-based "id". Use case: "sane" anchors for links from an external source to a fragment of the document. Cf. https://github.com/sphinx-doc/sphinx/issues/1961

Parsers

  • The "rst" parser will warn if a "figure" directive is missing both caption and legend in Docutils 1.0.

  • The legacy_ids configuration setting default will change to False in Docutils 2.0

Writers

  • 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.

  • "html5" writer:

    • 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

    • Move attribution behind the blockquote to comply with the "HTML living standard" [1] and adapt CSS stylesheets in Docutils 1.0.

    • Remove option --embed-images (obsoleted by "image_loading") in Docutils 2.0.

  • "latex2e" writer:

    • Remove use_verbatim_when_possible setting (use literal_block_env: verbatim) in Docutils 2.0.

  • "manpage" writer:

  • "odt" writer:

    • Align adjustment of relative image paths with the behaviour of HTML and LaTeX writers: assume them relative to the output directory (as required for image references in HTML), not the source directory.

Removals

  • Remove nodes.set_name_id_map() in Docutils 2.0 (not used since Docutils 0.23).

  • Remove transforms.references.DanglingReferences and transforms.references.DanglingReferencesVisitor in Docutils 2.0.

  • 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.

  • Drop short option -e in Docutils 2.0. Use the long equivalent --error-encoding.

  • 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.reporter, 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 parsers.rst.states.Struct (obsoleted by types.SimpleNamespace) in Docutils 2.0.

  • Ignore the "match_titles" argument of parsers.rst.states.RSTState.nested_list_parse() in Docutils 1.0; remove it in Docutils 2.0.

  • 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.

Misc

  • 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.)

  • 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. [2]

Release 1.0b1.dev (unpublished)

Document Tree / Docutils DTD:
  • Drop the name attribute from <reference> nodes.

Configuration changes:
Command line interface:
  • Option -o sets the output file path (shortcut for --output).

  • Drop the <destination> positional argument. Use -o <destination> or output redirection.

HTML5 writer:
  • Use normal font size and colour for informal titles of type "rubric".

  • Use more specific CSS selectors for styling <aside> elements as topic, sidebar, admonition, or system-message.

LaTeX writer:
New objects:
transforms.references.MatchReferences
transforms.references.ReportDanglingReferences
transforms.references.ReportUnreferencedLinks

replacements for transforms.references.DanglingReferences.

Removed objects:
core.publish_cmdline_to_binary()

Use core.publish_cmdline() (works with bytes since Docutils 0.20).

io.BinaryFileOutput

Use io.FileOutput (works with bytes since Docutils 0.20).

io.Input.byte_order_marks
io.Input.coding_slug
io.Input.successful_encoding
io.Input.determine_encoding_from_data()

No longer required as encoding detection is dropped.

nodes.Targetable.indirect_reference_name

Internal attribute for the Python-2-only MoinMoin <= 1.9.

parsers.recommonmark_wrapper

Wrapper module for the no longer maintained 3rd party recommonmark parser. See the parser setting documentation for alternatives.

parsers.rst.directives.CSVTable.HeaderDialect

deprecated since Docutils 0.20.

parsers.rst.directives.length_units

Use the tuple parsers.rst.directives.CSS3_LENGTH_UNITS.

Transformer.unknown_reference_resolvers
TransformSpec.unknown_reference_resolvers

Unknown references can be solved in a transform, see transforms.references.CitationReferences for an example.

utils.decode_path()

Not required with Python 3.

utils.get_stylesheet_reference()

Use utils.get_stylesheet_list().

writers.latex2e.LaTeXTranslator.visit_docinfo_item() "name" argument
writers.latex2e.SortableDict

Not used and deprecated since Docutils 0.22.

Release 0.23 (2026-05-27)

General:
rST parser:
  • Problems with the "include" directive are reported as ERROR, not SEVERE.

  • The "include" directive options :start-after: and :end-before: may now also be used without value (standing for an empty line).

  • The highlight language of a custom role based on the "code" role defaults to the role's name (if supported by Pygments). Specifying :language: none turns off syntax highlight.

HTML5 writer:
LaTeX writer:
  • Do not write \label commands for section titles and other implicit targets if there is no matching reference in the document.

  • Support semantic inline markup roles.

Configuration changes:
  • New setting legacy_ids (provisional).

  • The new setting latex_footnotes replaces "docutils_footnotes" (ignored since Docutils 0.13.1). The command line option --docutils-footnotes is kept and sets latex_footnotes to False.

New objects:
nodes.document.names:

Internal attribute mapping reference names to the referenced elements (or None if the name is a duplicate).

nodes.document.note_names():

Register an element's reference name(s), check for duplicates.

nodes.document.set_duplicate_name()

Called by nodes.document.note_names() to handle duplicate names. Provisional.

transforms.SectionIDs:

Ensure all sections have an identifier.

Removed objects:
parsers.rst.directives.tables.CSVTable.check_requirements()

not required with Python 3.

nodes.document.set_duplicate_name_id()

internal method, replaced by nodes.document.set_duplicate_name().

Release 0.22.4 (2025-12-18)

reStructuredText Specification:
  • Clarify indentation rules: minimal indentation is one space.

  • Clarify comment syntax: Comments begin with two dots and whitespace.

HTML writers:
  • New value "auto" for the initial_header_level setting.

  • Bugfixes in the provisional style-sheet "responsive.css".

See HISTORY for details.

Release 0.22.3 (2025-11-06)

rST parser:
  • Ignore combining characters when parsing the grid table structure.

  • Allow for auxiliary elements like sphinx.addnodes.only when testing for invalid parents of topics or sidebars.

Release 0.22.2 (2025-09-20)

Remove a spurious vim .swp-file.

Release 0.22.1 (2025-09-17)

rST parser:
  • Relax "section title" system messages from SEVERE to ERROR.

  • New attribute parsers.rst.states.NestedStateMachine.parent_state_machine.

LaTeX writer:
  • Add cross-reference anchors (\phantomsection\label{...}) for elements with IDs (fixes bug #503).

  • Fix cross-reference anchor placement in figures, images, literal-blocks, tables, and (sub)titles.

and improvements (see HISTORY).

Release 0.22 (2025-07-29)

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.

  • 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.

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.

transforms.references.CitationReferences

Mark citation_references as resolved if the backend uses a BibTeX database.

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).

Release 0.21.2 (2024-04-23)

Release 0.21.1 (2024-04-10)

Add missing metadata files to sdist. No changes to the code.

Release 0.21 (2024-04-09)

Release 0.20.1 (2023-05-17)

Bugfix release. See HISTORY for details.

Release 0.20 (2023-05-04)

Release 0.19 (2022-07-05)

Release 0.18.1 (2021-12-23)

Release 0.18 (2021-10-26)

Release 0.17.1 (2021-04-16)

Release 0.17 (2021-04-03)

Release 0.16 (2020-01-12)

Docutils 0.16.x supports Python 2.7 and Python >= 3.5 natively, without the use of the 2to3 tool.

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.

Release 0.14 (2017-08-03)

Release 0.13.1 (2016-12-09)

Release 0.12 (2014-07-06)

Small changes only, release current state

Release 0.11 (2013-07-22)

Release 0.10 (2012-12-16)

Docutils 0.10 is compatible with Python versions from 2.4 to 3.2.

Release 0.9.1 (2012-06-17)

Release 0.9 (2012-05-02)

Release 0.8.1 (2011-08-30)

Release 0.8 (2011-07-07)

Internationalization:

Components:

Release 0.7 (2010-07-07)

Components:

General:

Release 0.6 (2009-10-11)

Docutils 0.6 is compatible with Python versions from 2.3 up to 2.6 and convertible to 3.1 code.

Release 0.5 (2008-06-25)

Components:

reStructuredText:

Documentation:

Internationalization:

General:

Release 0.4 (2006-01-09)

Components:

reStructuredText:

Internationalization:

Documentation:

General:

Release 0.3.9 (2005-05-26)

Release 0.3.7 (2004-12-24)

Release 0.3.5 (2004-07-29)