1 .. -*- coding: utf-8 -*-
3 ========================
5 ========================
7 :Contact: grubert@users.sourceforge.net
8 :Maintainer: docutils-develop@lists.sourceforge.net
11 :Web site: http://docutils.sourceforge.net/
12 :Copyright: This document has been placed in the public domain.
15 This document summarizes the major changes in recent and upcoming releases.
16 For a more detailed list of changes, please see the Docutils `HISTORY`_.
24 The default for the configuration setting `legacy_class_functions`_ will
25 change to "False". Adapt stylesheets modifying ``\DUadmonition``
26 and/or ``\DUtitle`` or set to "True".
30 Use <aside> instad of <dl> for footnote text and citations,
31 <aside> for topics (except abstract), admonitions, and system messages,
32 and <nav> for the Table of Contents.
34 Write footnote brackets and field term colons to HTML, so that
35 they are present also without CSS and when copying text.
36 Hide with CSS if required.
38 Use <summary> and <details> tags for term and definition of a
39 definition list with class value "details".
41 Move attribution behind the blockquote to comply with
42 https://html.spec.whatwg.org/#the-blockquote-element.
45 Remove the IE PNG Fix by Angus Turnbull. IE has native PNG
46 support since version 7.
48 * Make <meta> a standard Docutils doctree node.
50 The `meta directive`__ will insert <meta> instead of pending nodes.
51 Writers may ignore some or all <meta> elements if they are not
52 supported by the output format.
54 The ``transforms/components.Filter`` class will become obsolete by
55 this change and may be removed in future.
57 __ docs/ref/rst/directives.html#meta
59 * ``Node.traverse()`` will return an iterator instead of a list.
61 * Remove ``utils.unique_combinations``
62 (obsoleted by ``itertools.combinations``).
64 * Eventually remove the "rawsource" attribute and argument from nodes.Text:
65 we store the null-escaped text in Text nodes since 0.16 so there is no
66 additional information in the rawsource.
68 * If the id_prefix_ setting is non-empty, leading number and hyphen characters
69 will not be stripped from a `reference name`_ during `identifier
70 normalization`_. This may change generated `identifier keys`.
72 Example: with ``--id-prefix="DU-"``, a section with title "34. May"
73 currently gets the identifier key ``DU-may`` and after the change the
74 identifier key ``DU-34-may``.
76 * The default value for auto_id_prefix_ will change to "%". This means
77 auto-generated IDs will use the tag name as prefix. Set auto_id_prefix_ to
78 "id" if you want unchanged auto-IDs or to "%" if you want the new
79 feature already in 0.17.
81 * The default HTML writer "html" with frontend ``rst2html.py`` may change
82 from "html4css1" to "html5".
84 Use ``get_writer_by_name('html')`` or the rst2html.py_ front end, if you
85 want the output to be up-to-date automatically.
87 Use the "html4" writer or ``rst2html4.py``, if you depend on
88 stability of the generated HTML code, e.g. because you use a custom
89 style sheet or post-processing that may break otherwise.
91 .. _id_prefix: docs/user/config.html#id-prefix
92 .. _auto_id_prefix: docs/user/config.html#auto-id-prefix
93 .. _rst2html.py: docs/user/tools.html#rst2html-py
94 .. _reference name: docs/ref/rst/restructuredtext.html#reference-names
95 .. _identifier normalization: docs/ref/rst/directives.html#identifier-normalization
101 * Installing with ``setup.py`` now requires setuptools_.
102 Alternatively, install with pip_.
104 * The generic command line front end tool docutils-cli.py_ allows
105 the free selection of reader, parser, and writer components.
107 * New, experimental wrapper to integrate the
108 `recommonmark`__ Markdown parser for use with Docutils.
110 __ https://pypi.org/project/recommonmark/
112 * HTML writers: new option to embed images.
116 - Use the new semantic tags <main>, <section>, <header>,
117 <footer>, <aside>, <figure>, and <figcaption>.
118 See ``minimal.css`` and ``plain.css`` for styling rule examples.
120 Change the `initial_header_level`_ setting's default to "2", as browsers
121 use the `same style for <h1> and <h2> when nested in a section`__.
123 - Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>,
124 <i>, <b>, <u>, <mark>, and <bdi> if a matching class value
125 is found in `inline` and `literal` elements.
126 Use <ins> and <del> if a matching class value
127 is found in `inline`, `literal`, or `container` elements.
129 - New optional style ``responsive.css``, adapts to different screen
132 .. _initial_header_level: docs/user/config.html#initial-header-level
133 __ https://stackoverflow.com/questions/39547412/same-font-size-for-h1-and-h2-in-article
137 - New configuration setting `legacy_class_functions`_.
139 - The special value "auto" for the `graphicx_option`_ setting
140 is no longer supported (it never worked for xetex/luatex).
142 - `Styling commands`__ using the legacy ``\docutilsrole`` prefix are
143 now ignored. Use ``\DUrole``.
145 __ docs/user/latex.html#classes
147 - Most helper commands and element definitions are now defined in the
148 LaTeX package `docutils.sty`_ and only inserted in the document
149 preamble if the stylesheet__ setting does not lists "docutils".
151 __ docs/user/config.html#stylesheet-latex-writers
153 .. _setuptools: https://pypi.org/project/setuptools/
154 .. _pip: https://pypi.org/project/pip/
155 .. _docutils-cli.py: docs/user/tools.html#docutils-cli-py
156 .. _legacy_class_functions: docs/user/config.html#legacy-class-functions
157 .. _graphicx_option: docs/user/config.html#graphicx-option
158 .. _docutils.sty: https://ctan.org/pkg/docutils
161 Release 0.16 (2020-01-12)
162 =========================
166 Docutils 0.15.x is the last version supporting Python 2.6, 3.3 and 3.4.
168 Docutils 0.16.x supports Python 2.7 and Python >= 3.5 natively,
169 without the use of the ``2to3`` tool.
173 - Keep `backslash escapes`__ in the document tree. This allows, e.g.,
174 escaping of author-separators in `bibliographic fields`__.
176 __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism
177 __ docs/ref/rst/restructuredtext.html#bibliographic-fields
181 - Informal titles of type "rubric" default to bold-italic and left aligned.
182 - Deprecate ``\docutilsrole`` prefix for styling commands:
183 use ``\DUrole`` instead.
184 - Fix topic subtitle.
185 - Add "latex writers" to the `config_section_dependencies`.
186 - Ignore classes for `rubric` elements
187 (class wrapper interferes with LaTeX formatting).
191 - New option "--html-writer" allows to select "html__" (default),
194 __ html: docs/user/html.html#html
198 - Remove the `handle_io_errors` option from io.FileInput/Output.
202 - If `auto_id_prefix`_ ends with "%", this is replaced with the tag name.
204 .. _auto_id_prefix: docs/user/config.html#auto-id-prefix
206 * Various bugfixes and improvements (see HISTORY_).
209 Release 0.15 (2019-07-20)
210 =========================
214 Docutils 0.14.x is the last version supporting Python 2.4, 2.5,
217 Docutils 0.15.x is compatible with Python versions 2.6, 2.7 and 3.3 to 3.5
218 (cf. `Python 3 compatibility`_).
222 - Allow embedded colons in field list field names (before, tokens like
223 ``:this:example:`` were considered ordinary text).
225 - Fixed a bug with the "trim" options of the "unicode" directive.
227 * languages: Added Korean localisation (ko).
230 Release 0.14 (2017-08-03)
231 =========================
233 * docutils/docs/ref/docutils.dtd:
235 - Enable validation of Docutils XML documents against the DTD:
237 * docutils/parsers/rst/:
239 - Added functionality: escaped whitespace in URI contexts.
240 - Consistent handling of all whitespace characters in inline markup
241 recognition. (May break documents that relied on some whitespace
242 characters (NBSP, ...) *not* to be recognized as whitespace.)
244 * docutils/utils/smartquotes.py:
246 - Update quote definitions for et, fi, fr, ro, sv, tr, uk.
247 - Add quote definitions for hr, hsb, hu, lv, sh, sl, sr.
248 - Differentiate apostrophe from closing single quote (if possible).
249 - Add command line interface for stand-alone use (requires 2.7).
251 * docutils/writers/_html_base:
253 - Provide default title in metadata.
254 - The MathJax CDN shut down on April 30, 2017. For security reasons, we
255 don't use a third party public installation as default but warn
256 if `math-output` is set to MathJax without specifying a URL.
257 See math-output_ for details.
259 * docutils/writers/html4css1:
261 - Respect automatic table column sizing.
263 * docutils/writers/latex2e/__init__.py
265 - Handle class arguments for block-level elements by wrapping them
266 in a "DUclass" environment. This replaces the special handling for
267 "epigraph" and "topic" elements.
269 * docutils/writers/odf_odt:
271 - Language option sets ODF document's default language
272 - Image width, scale, ... set image size in generated ODF.
276 - New front-end ``rst2html4.py``.
279 Release 0.13.1 (2016-12-09)
280 ===========================
282 * docutils/writers/html5_polyglot
284 - New HTML writer generating `HTML 5`_.
286 .. _HTML 5: http://www.w3.org/TR/html5/
290 - New front-end ``rst2html5.py``.
292 * languages: persian/farsi (fa) and latvian (la) mappings.
294 * change default base url for :rfc: to http://tools.ietf.org/html/
296 * tables accept widths, a list and align
298 * latex2e: Fix admonition width, remove deprecated options,
299 better tablewidth auto, ...
301 * rst.el: The problem with ``electric-indent-mode`` has been fixed.
304 Release 0.12 (2014-07-06)
305 =========================
307 Small changes only, release current state
310 Release 0.11 (2013-07-22)
311 =========================
315 - Apply [ 2714873 ] Fix for the overwritting of document attributes.
316 - Support embedded aliases within hyperlink references.
317 - Fix [ 228 ] try local import of docutils components (reader, writer, parser,
318 language module) before global search.
320 * docutils/parsers/rst/directives/tables.py
322 - Fix [ 210 ] Python 3.3 checks CVS syntax only if "strict" is True.
324 * docutils/writers/html4css1/__init__.py
325 - Fix [ 3600051 ] for tables in a list, table cells are not compacted.
326 - New setting `stylesheet_dirs` (see above).
328 Now, it is easy to add a custom stylesheet to Docutils' default
329 stylesheet with, e.g., ``--stylesheet_path='html4css1.css, mystyle.css'``
331 Changed behaviour of the default settings:
332 if there is a file ``html4css1.css`` in the working directory of the
333 process at launch, it is used instead of the one provided by Docutils
334 in the writer source directory.
336 - New default for math-output_: ``HTML math.css``.
337 - Avoid repeated class declarations in html4css1 writer
338 (modified version of patch [ 104 ]).
340 .. _math-output: docs/user/config.html#math-output
342 * docutils/writers/latex2e/__init__.py
344 - Drop the simple algorithm replacing straight double quotes with
345 English typographic ones.
346 Activate the SmartQuotes_ transform if you want this feature.
347 - New setting `stylesheet_dirs`: Comma-separated list of directories
348 where stylesheets are found. Used by `stylesheet_path` when expanding
349 relative path arguments.
351 .. _SmartQuotes: docs/user/config.html#smart-quotes
353 * docutils/writers/manpage.py
355 - Fix [3607063] handle lines starting with a period.
356 - Fix option separating comma was bold (thanks to Bill Morris).
358 Release 0.10 (2012-12-16)
359 =========================
363 Docutils 0.9.x is the last version supporting Python 2.3.
365 Docutils 0.10 is compatible with Python versions from 2.4 to 3.2
366 (cf. `Python 3 compatibility`_).
370 - SmartQuotes transform for typographic quotes and dashes.
372 - ``docutils/math``, ``docutils/error_reporting.py``, and
373 ``docutils/urischemes.py`` moved to the utils package.
374 Code importing these modules needs to adapt, e.g.::
377 import docutils.math as math
379 import docutils.utils.math as math
381 - enhanced math and error handling.
385 - FileInput/FileOutput: no system-exit on IOError.
386 The `handle_io_errors` option is ignored.
388 * docutils/writers/html4css1/__init__.py
390 - Use ``<code>`` tag for inline "code",
391 do not drop nested inline nodes (syntax highlight tokens).
392 - Customizable MathJax URL (based on patch by Dmitry Shachnev).
393 - No line break after opening inline math tag.
395 * docutils/writers/latex2e/__init__.py, docutils/writers/xetex/__init__.py
397 - Fix section numbering by LaTeX.
399 * docutils/writers/s5_html/__init__.py
401 - Fix [ 3556388 ] Mathjax does not work with rst2s5.
404 Release 0.9.1 (2012-06-17)
405 ==========================
409 Several fixes for Python 3 usage.
413 - Fix [ 3527842 ]. Under Python 3, converted tests and tools were
414 installed in the PYTHONPATH. Converted tests are now
415 stored in ``docutils/test3/``, tools no longer need conversion.
417 If you installed one of Docutils versions 0.7 ... 0.9 with
418 ``setup.py install`` under Python 3, remove the spurious
419 ``test/`` and ``tools/`` directories in the site library root.
422 Release 0.9 (2012-05-02)
423 =========================
427 - reStructuredText "code" role and directive with syntax highlighting
429 - "code" option of the "include" directive.
431 .. _Pygments: http://pygments.org/
433 - Fix [ 3402314 ] allow non-ASCII whitespace, punctuation
434 characters and "international" quotes around inline markup.
436 - Fix handling of missing stylesheets.
440 - Fix [ 2971827 ] and [ 3442827 ]
441 extras/roman.py moved to docutils/utils/roman.py
443 * docutils/utils.py -> docutils/utils/__init__.py
445 - docutils.utils is now a package (providing a place for sub-modules)
447 * docutils/writers/html4css1/__init__.py
449 - change default for `math-output` setting to MathJax
451 * docutils/writers/latex2e/__init__.py
453 - Support the `abbreviation` and `acronym` standard roles.
454 - Record only files required to generate the LaTeX source as dependencies.
455 - Use ``\setcounter{secnumdepth}{0}`` instead of ``*``-versions
456 when suppressing LaTeX section numbering.
459 Release 0.8.1 (2011-08-30)
460 ==========================
464 - Fix [ 3364658 ] (Change last file with Apache license to BSD-2-Clause)
465 and [ 3395920 ] (correct copyright info for rst.el).
467 * docutils/writers/latex2e/__init__.py
469 - Clean up Babel language setting. Restores Sphinx compatibility.
472 Release 0.8 (2011-07-07)
473 ========================
477 - Some additions to the Docutils core are released under the 2-Clause BSD
482 - Handle language codes according to `BCP 47`_.
483 - If the specified langauage is not supported by Docutils,
484 warn and fall back to English.
485 - Math support: reStructuredText "math" role and directive,
486 ``math`` and ``math_block`` doctree elements.
487 - Orphaned "python" reader and "newlatex2e" writer moved to the sandbox.
489 .. _BCP 47: http://www.rfc-editor.org/rfc/bcp/bcp47.txt
493 - most directives now support a "name" option that attaches a
494 reference name. So you can write ::
496 .. figure:: image.png
499 as a short form of ::
503 .. figure:: image.png
505 Internationalization:
507 * Added lithuanian mappings.
513 - New setting "math-output" with support for HTML, MathML, and LaTeX.
517 - Convert image URI to a local file path.
518 - Apply [ 3148141 ] fix multicolumn support when a colspanning cell
519 has more than one paragraph (Wolfgang Scherer).
523 - New writer generating LaTeX code for compiling with ``xelatex``.
525 XeTeX uses unicode and modern font technologies.
527 * and fixes and enhancements here and there.
530 Release 0.7 (2010-07-07)
531 ========================
537 - Support SVG and SWF images (thanks to Stefan Rank).
538 - Generate valid XHTML for centered images with targets.
539 Use CSS classes instead of "align" tags for image alignment.
543 - Use the ``\url`` command for URLs (breaks long URLs instead of writing
545 - Preserve runs of spaces in 'inline literals'.
546 - Deprecate ``figure_footnotes`` setting.
547 - Rename ``use_latex_footnotes`` setting to `docutils_footnotes`__.
548 - New ``latex_preamble`` setting.
549 - Use PDF standard fonts (Times/Helvetica/Courier) as default.
550 - `hyperref` package called with ``unicode`` option (see the
551 `hyperref config tips`__ for how to override).
552 - Drop the special `output_encoding`__ default ("latin-1").
553 The Docutils wide default (usually "UTF-8") is used instead.
555 __ docs/user/config.html#docutils-footnotes
556 __ docs/user/latex.html#hyperlinks
557 __ docs/user/latex.html#output-encoding
561 - Titles level 1, that is ``.SH``, always uppercase.
562 - Apply patch from mg: literal text should be bold in man-pages.
566 * io.FileInput opens files as text files with universal newline support
567 (mode "rU", configurable with the new optional argument "mode").
571 - Python 3 support: copy test/ and tools/ to the build-dir
572 and convert Python sources with 2to3.
575 Release 0.6 (2009-10-11)
576 ========================
580 Docutils 0.5 is the last version supporting Python 2.2.
582 Docutils 0.6 is compatible with Python versions from 2.3 up to 2.6
583 and convertible to 3.1 code.
587 The "newlatex" writer is orphaned.
589 The recommended way to generate PDF output is to use either the
590 LaTeX2e writer or one of the alternatives listed at
591 http://docutils.sourceforge.net/docs/user/links.html#pdf.
595 - Allow length units for all length specifications.
596 - Allow percent sign in "scale" argument of "figure" and "image" directives.
597 - Bugfix: The "figalign" argument of a figure now works as intended
598 (aligning the figure not its contents).
599 - Align images with class "align-[right|center|left]"
600 (allows setting the alignment of an image in a figure).
601 - Hard tabs in literal inclusions are replaced by spaces. This is
602 configurable via the new "tab-width" option of the "include" directive
603 (a negative tab-width prevents tab expansion).
607 - ``--stylesheet`` and ``--stylesheet-path`` options now support a comma
608 separated list of stylesheets.
613 - font-encoding: "T1" (formerly implicitely set by 'ae').
614 - use-latex-toc: true (ToC with page numbers).
615 - use-latex-footnotes: true (no mixup with figures).
616 - Float placement defaults to "here definitely" (configurable).
617 - Align of image in a figure defaults to 'center'.
618 - Use class defaults for page margins ('typearea' now optional).
619 - Support LaTeX packages as ``--stylesheet`` arguments.
620 - Use ``bp`` for lengths without unit or unit ``pt``,
621 do not convert ``px`` to ``pt``.
622 - Do not use 'ae' and 'aeguill' packages if font-encoding is set to ''.
623 - Set sub- and superscript role argument as text not math.
624 - Support custom roles based on standard roles.
625 - Load packages and define macros only if required in the document.
626 - All Docutils specific LaTeX macros are prefixed with ``DU``.
627 - Better conformance to Docutils specifications with "use_latex_toc".
628 - If 'sectnum_xform' is False, the 'sectnum' directive triggers
629 section numbering by LaTeX.
630 - Use default font in admonitions and sidebar.
631 - Typeset generic topic as "quote with title".
632 - Use template (file and configuration option).
633 - Render doctest blocks as literal blocks (indented).
637 - moved from sandbox to Doctutils core.
641 - moved from sandbox to Doctutils core.
644 Release 0.5 (2008-06-25)
645 ========================
651 - Dropped all ``name`` attributes of ``a`` elements (``id`` is
652 universally supported now).
656 - Better bibTeX citation support.
657 - Add ``--literal-block-env``
661 - Changed to support new python.org website structure and
666 * Changed the directive API to a new object-oriented system.
667 (Compatibility for the old, functional-style directive interface is
668 retained.) See the updated `Creating reStructuredText Directives`__
671 __ docs/howto/rst-directives.html
673 * Allow ``+`` and ``:`` in reference names requested for citations.
677 * Added `Deploying Docutils Securely`__
679 __ docs/howto/security.txt
681 Internationalization:
683 * Added hebrew mappings.
687 * Configuration files are now assumed and required to be
690 * Added docutils/writers/html4css1/template.txt.
692 * Enhance emacs support.
695 Release 0.4 (2006-01-09)
696 ========================
700 Docutils 0.4.x is the last version that will support Python 2.1.
701 Docutils 0.5 will *not* be compatible with Python 2.1; Python 2.2
702 or later will be required.
704 Docutils 0.4.x is the last version that will make compromises in
705 its HTML output for Netscape Navigator 4. Docutils 0.5 will
706 require more up-to-date browsers (the exact definition is to be
711 * Added an `S5/HTML writer`__ and the rst2s5.py__ front end:
712 multi-platform, multi-browser HTML slide shows.
714 __ docs/user/slide-shows.html
715 __ docs/user/tools.html#rst2s5-py
717 * The newlatex2e writer is nearing completion.
719 * Added a DocTree reader, ``publish_doctree`` and
720 ``publish_from_doctree`` convenience functions, for document tree
721 extraction and reprocessing.
725 * Added directives: "container__" (generic block-level container),
726 "default-role__" (role used for \`backtick\` syntax), "title__"
727 (document title metadata), and "date__" (generate the current local
728 date, for substitution definitions).
730 __ docs/ref/rst/directives.html#container
731 __ docs/ref/rst/directives.html#default-role
732 __ docs/ref/rst/directives.html#title
733 __ docs/ref/rst/directives.html#date
735 * Length units are now supported for image__ sizes.
737 __ docs/ref/rst/directives.html#image
739 * Added `standard definition files`__ for special characters etc.
741 __ docs/ref/rst/definitions.html
743 Internationalization:
745 * Added Japanese and Simplified Chinese language mappings, and support
746 for double-width CJK-characters in tables and section titles.
750 * Added a `guide for distributors`__ (package maintainers) and a
751 `guide for developers`__.
753 __ docs/dev/distributing.html
754 __ docs/dev/hacking.html
758 * Added significant `Emacs support for reST`__.
760 __ docs/user/emacs.html
762 * Added a `--strip-comments`__ option.
764 __ docs/user/config.html#strip-comments
766 * `--embed-stylesheet`__ is now the default for the HTML writer
767 (rather than --link-stylesheet).
769 __ docs/user/config.html#embed-stylesheet
772 Release 0.3.9 (2005-05-26)
773 ==========================
775 * Added "file_insertion_enabled__" and "raw_enabled__" settings.
777 __ docs/user/config.html#file-insertion-enabled
778 __ docs/user/config.html#raw-enabled
780 * Added `auto-enumerated lists`__.
782 __ docs/ref/rst/restructuredtext.html#enumerated-lists
784 * Added `"header" and "footer"`__ directives.
786 __ docs/ref/rst/directives.html#document-header-footer
788 * Added "list-table__" directive.
790 __ docs/ref/rst/directives.html#list-table
792 * Added support for `section subtitles`__.
794 __ docs/user/config.html#sectsubtitle-xform
796 * Added "field_name_limit__" and "option_limit__" settings to HTML writer.
798 __ docs/user/config.html#field-name-limit
799 __ docs/user/config.html#option-limit
801 * Added "cloak_email_addresses__" setting to HTML writer.
803 __ docs/user/config.html#cloak-email-addresses
805 * UTF-8 BOMs are now removed from the input stream.
808 Release 0.3.7 (2004-12-24)
809 ==========================
811 * A special "`line block`__" syntax has been added. (Also see the
812 `quick reference`__.)
814 __ docs/ref/rst/restructuredtext.html#line-blocks
815 __ docs/user/rst/quickref.html#line-blocks
817 * Empty sections are now allowed.
819 * A "raw__" role has been added.
821 __ docs/ref/rst/roles.html#raw
823 * The LaTeX writer now escapes consecutive dashes (like "--" or "---")
824 so that they are no longer transformed by LaTeX to en or em dashes.
825 (Please see the FAQ__ for how to represent such dashes.)
827 __ FAQ.html#how-can-i-represent-esoteric-characters-e-g-character-entities-in-a-document
829 * A `dependency recorder`__ has been added.
831 __ docs/user/config.html#record-dependencies
833 * A directive has been added for `compound paragraphs`__.
835 __ docs/ref/rst/directives.html#compound-paragraph
838 Release 0.3.5 (2004-07-29)
839 ==========================
841 * Improved, extended and reorganized the documentation__.
845 * Added "csv-table__" directive.
847 __ docs/ref/rst/directives.html#csv-table
849 .. _HISTORY: HISTORY.html
850 .. _Python 3 compatibility: README.html#python-3-compatibility