[Zope-Checkins] CVS: Zope/lib/python/docutils - BUGS.txt: COPYING.txt: FAQ.txt: HISTORY.txt: PKG-INFO: README.txt: THANKS.txt:

Andreas Jung andreas at andreas-jung.com
Fri Jan 7 10:11:44 EST 2005

Update of /cvs-repository/Zope/lib/python/docutils
In directory cvs.zope.org:/tmp/cvs-serv2765/lib/python/docutils

Added Files:
      Tag: Zope-2_7-branch
Log Message:
Added *.txt + licenses

=== Added File Zope/lib/python/docutils/BUGS.txt ===
 Docutils_ Bugs

:Author: David Goodger; open to all Docutils developers
:Contact: goodger at python.org
:Date: $Date: 2005/01/07 15:11:43 $
:Revision: $Revision: $
:Copyright: This document has been placed in the public domain.

.. _Docutils: http://docutils.sourceforge.net/

Bugs in Docutils?!?  Yes, we do have a few.  Some are old-timers that
tend to stay in the shadows and don't bother anybody.  Once in a while
new bugs are born.  From time to time some bugs (new and old) crawl
out into the light and must be dealt with.  Icky.

This document describes how to report a bug, and lists known bugs.

.. contents::

How To Report A Bug

If you think you've discovered a bug, please read through these
guidelines before reporting it.

First, make sure it's a new bug:

* Please check the list of `known bugs`_ below and the `SourceForge
  Bug Tracker`_ to see if it has already been reported.

* Are you using the very latest version of Docutils?  The bug may have
  already been fixed.  Please get the latest version of Docutils from
  CVS_ or from the `development snapshot`_ and check again.  Even if
  your bug has not been fixed, others probably have, and you're better
  off with the most up-to-date code.

  If you don't have time to check the latest snapshot, please report
  the bug anyway.  We'd rather tell you that it's already fixed than
  miss reports of unfixed bugs.

* If Docutils does not behave the way you expect, look in the
  documentation_ (don't forget the FAQ_!) and `mailing list archives`_
  for evidence that it should behave the way you expect.

If you're not sure, please ask on the
docutils-users at lists.sourceforge.net [1]_ mailing list first.

If it's a new bug, the most important thing you can do is to write a
simple description and a recipe that reproduces the bug.  Try to
create a minimal document that demonstrates the bug.  The easier you
make it to understand and track down the bug, the more likely a fix
will be.

Now you're ready to write the bug report.  Please include:

* A clear description of the bug.  Describe how you expected Docutils
  to behave, and contrast that with how it actually behaved.  While
  the bug may seem obvious to you, it may not be so obvious to someone
  else, so it's best to avoid a guessing game.

* A complete description of the environment in which you reproduced
  the bug:

  - Your operating system & version.
  - The version of Python (``python -V``).
  - The version of Docutils (use the "-V" option to most Docutils
    front-end tools).
  - Any private modifications you made to Docutils.
  - Anything else that could possibly be relevant.  Err on the side
    of too much information, rather than too little.

* A literal transcript of the *exact* command you ran, and the *exact*
  output.  Use the "--traceback" option to get a complete picture.

* The exact input and output files.  Better to attach complete files
  to your bug report than to include just a summary or excerpt.

* If you also want to include speculation as to the cause, and even a
  patch to fix the bug, that would be great!

The best place to send your bug report is to the `SourceForge Bug
Tracker`_.  That way, it won't be misplaced or forgotten.  In fact, an
open bug report on SourceForge is a constant irritant that begs to be

Thank you!

(This section was inspired by the `Subversion project's`__ BUGS__

.. [1] Due to overwhelming amounts of spam, the
   docutils-users at lists.sourceforge.net mailing list has been set up
   for subscriber posting only.  Non-subscribers who post to
   docutils-users will receive a message with "Subject: Your message
   to Docutils-users awaits moderator approval".  Legitimate messages
   are accepted and posted as soon as possible (a list administrator
   must verify the message manually).  If you'd like to subscribe to
   docutils-users, please visit

__ http://subversion.tigris.org/
__ http://svn.collab.net/viewcvs/svn/trunk/BUGS?view=markup

.. _CVS: http://sourceforge.net/cvs/?group_id=38414
.. _development snapshot: http://docutils.sf.net/#development-snapshot
.. _documentation: docs/
.. _FAQ: FAQ.html
.. _mailing list archives: http://docutils.sf.net/#mailing-lists
.. _SourceForge Bug Tracker:

Known Bugs

Also see the `SourceForge Bug Tracker`_.

* .. _unencoded stylesheet reference:

  ``--stylesheet='foo&bar'`` causes an invalid stylesheet reference to
  be inserted in an HTML file, because the ``&`` isn't encoded as

* ``utils.relative_path()`` sometimes returns absolute _`paths on
  Windows` (like ``C:/test/foo.css``) where it could have chosen a
  relative path.

  Furthermore, absolute pathnames are inserted verbatim, like
  ``href="C:/test/foo.css"`` instead of

  For details, see `this posting by Alan G. Isaac

* .. _empty csv-table:

  When supplying an empty file for the csv-table directive, Docutils
  crashes with a zero-division error.  Example::

      .. csv-table::
         :file: empty.txt

* _`Line numbers` in system messages are inconsistent in the parser.

  - In text inserted by the "include" directive, errors are often not
    reported with the correct "source" or "line" numbers.  Perhaps all
    Reporter calls need "source" and "line" keyword arguments.
    Elements' .line assignments should be checked.  (Assign to .source
    too?  Add a set_info method?  To what?)  There's a test in

  - Some line numbers in elements are not being set properly
    (explicitly), just implicitly/automatically.  See rev. 1.74 of
    docutils/parsers/rst/states.py for an example of how to set.

* .. _none source:

  Quite a few nodes are getting a "None" source attribute as well.  In
  particular, see the bodies of definition lists.

* .. _mislocated targets:

  Explicit targets are sometimes mis-located.  In particular, placing
  a target before a section header puts the target at the end of the
  previous section instead of the start of the next section.  The code
  in docutils.transforms.misc.ClassAttribute could be used to fix
  this.  (Reported by David Priest.)

* David Abrahams pointed out that _`doubly-indirect substitutions`
  have a bug, but only when there's multiple references::

      |substitute| my coke for gin
      |substitute| you for my mum
      at least I'll get my washing done

      .. |substitute| replace:: |replace|
      .. |replace| replace:: swap

  This is tricky.  Substitutions have to propagate back completely.

* .. _substitutions and references:

  Another bug from David Abrahams (run with ``rst2html.py --traceback``)::

      |substitution| and again a |substitution|.

      .. |substitution| replace:: ref__

      __ a.html
      __ b.html

  Change the references.Substitutions tranform's priority from 220 to
  680, so it happens after reference resolution?  Then we have to deal
  with multiple IDs.  Perhaps the Substitution transform should remove
  all IDs from definitions after the first substitution reference is

* Footnote label "5" should be "4"::

      $ rst2pseudoxml.py <<EOF
      > ref [#abc]_ [#]_ [1]_ [#4]_
      > .. [#abc] footnote
      > .. [#] two
      > .. [1] one
      > .. [#4] four
      > EOF
      <document source="<stdin>">
              <footnote_reference auto="1" id="id1" refid="abc">
              <footnote_reference auto="1" id="id2" refid="id5">
              <footnote_reference id="id3" refid="id6">
              <footnote_reference auto="1" id="id4" refid="id7">
          <footnote auto="1" backrefs="id1" id="abc" name="abc">
          <footnote auto="1" backrefs="id2" id="id5" name="3">
          <footnote backrefs="id3" id="id6" name="1">
          <footnote auto="1" backrefs="id4" id="id7" name="4">

   Local Variables:
   mode: indented-text
   indent-tabs-mode: nil
   sentence-end-double-space: t
   fill-column: 70

=== Added File Zope/lib/python/docutils/COPYING.txt ===
 Copying Docutils

:Author: David Goodger
:Contact: goodger at users.sourceforge.net
:Date: $Date: 2005/01/07 15:11:43 $
:Web site: http://docutils.sourceforge.net/
:Copyright: This document has been placed in the public domain.

Most of the files included in this project have been placed in the
public domain, and therefore have no license requirements and no
restrictions on copying or usage; see the `Public Domain Dedication`_
below.  There are a few exceptions_, listed below.

One goal of the Docutils project is to be included in the Python
standard library distribution, at which time it is expected that
copyright will be asserted by the `Python Software Foundation

Public Domain Dedication

The persons who have associated their work with this project (the
"Dedicator": David Goodger and the many contributors to the Docutils
project) hereby dedicate the entire copyright, less the exceptions_
listed below, in the work of authorship known as "Docutils" identified
below (the "Work") to the public domain.

The primary repository for the Work is the Internet World Wide Web
site <http://docutils.sourceforge.net/>.  The Work consists of the
files within the "docutils" module of the Docutils project CVS
repository (Internet host cvs.sourceforge.net, filesystem path
/cvsroot/docutils), whose Internet web interface is located at
Files dedicated to the public domain may be identified by the
inclusion, near the beginning of each file, of a declaration of the

    Copyright: This document/module/DTD/stylesheet/file/etc. has been
               placed in the public domain.

Dedicator makes this dedication for the benefit of the public at large
and to the detriment of Dedicator's heirs and successors.  Dedicator
intends this dedication to be an overt act of relinquishment in
perpetuity of all present and future rights under copyright law,
whether vested or contingent, in the Work.  Dedicator understands that
such relinquishment of all rights includes the relinquishment of all
rights to enforce (by lawsuit or otherwise) those copyrights in the

Dedicator recognizes that, once placed in the public domain, the Work
may be freely reproduced, distributed, transmitted, used, modified,
built upon, or otherwise exploited by anyone for any purpose,
commercial or non-commercial, and in any way, including by methods
that have not yet been invented or conceived.

(This dedication is derived from the text of the `Creative Commons
Public Domain Dedication


The exceptions to the `Public Domain Dedication`_ above are:

* extras/optparse.py, copyright by Gregory P. Ward, released under a
  BSD-style license (which can be found in the module's source code).

* extras/textwrap.py, copyright by Gregory P. Ward and the Python
  Software Foundation, released under the `Python 2.3 license`_
  (`local copy`__).

  __ licenses/python-2-3.txt

* extras/roman.py, copyright by Mark Pilgrim, released under the
  `Python 2.1.1 license`_ (`local copy`__).

  __ licenses/python-2-1-1.txt

* test/docutils_difflib.py, copyright by the Python Software
  Foundation, released under the `Python 2.2 license`_ (`local
  copy`__).  This file is included for compatibility with Python
  versions less than 2.2.  (It's only used to report test failures
  anyhow; it isn't installed anywhere.  The included file is a
  pre-generator version of the difflib.py module included in Python

  __ licenses/python-2-2.txt

* tools/pep2html.py, copyright by the Python Software Foundation,
  released under the `Python 2.2 license`_ (`local copy`__).

  __ licenses/python-2-2.txt

* tools/editors/emacs/rst-html.el, copyright by Martin Blais, released
  under the `GNU General Public License`_ (`local copy`__).

  __ licenses/gpl.txt

* tools/editors/emacs/rst-mode.el, copyright by Stefan Merten,
  released under the `GNU General Public License`_ (`local copy`__).

  __ licenses/gpl.txt

(Disclaimer: I am not a lawyer.)  The BSD license and the Python
licenses are OSI-approved_ and GPL-compatible_.  Although complicated
by multiple owners and lots of legalese, the Python license basically
lets you copy, use, modify, and redistribute files as long as you keep
the copyright attribution intact, note any changes you make, and don't
use the owner's name in vain.  The BSD license is similar.

Plaintext versions of all the linked-to licenses are provided in the
licenses_ directory.

.. _licenses: licenses/
.. _Python 2.1.1 license: http://www.python.org/2.1.1/license.html
.. _Python 2.2 license: http://www.python.org/2.2/license.html
.. _Python 2.3 license: http://www.python.org/2.3/license.html
.. _GNU General Public License: http://www.gnu.org/copyleft/gpl.html
.. _OSI-approved: http://opensource.org/licenses/
.. _GPL-compatible: http://www.gnu.org/philosophy/license-list.html

=== Added File Zope/lib/python/docutils/FAQ.txt ===
 Docutils FAQ (Frequently Asked Questions)

:Date: $Date: 2005/01/07 15:11:43 $
:Web site: http://docutils.sourceforge.net/
:Copyright: This document has been placed in the public domain.

.. Please note that until there's a Q&A-specific construct available,
   this FAQ will use section titles for questions.  Therefore
   questions must fit on one line.  The title may be a summary of the
   question, with the full question in the section body.

.. contents::
.. sectnum::

This is a work in progress.  Please feel free to ask questions and/or
provide answers; `send email`__ to the `Docutils-Users mailing list`__
[1]_.  Project members should feel free to edit the source text file

.. [1] Due to overwhelming amounts of spam, the
   docutils-users at lists.sourceforge.net mailing list has been set up
   for subscriber posting only.  Non-subscribers who post to
   docutils-users will receive a message with "Subject: Your message
   to Docutils-users awaits moderator approval".  Legitimate messages
   are accepted and posted as soon as possible (a list administrator
   must verify the message manually).  If you'd like to subscribe to
   docutils-users, please visit

.. _let us know:
__ mailto:docutils-users at lists.sourceforge.net
__ http://lists.sourceforge.net/lists/listinfo/docutils-users


What is Docutils?

Docutils_ is a system for processing plaintext documentation into
useful formats, such as HTML, XML, and LaTeX.  It supports multiple
types of input, such as standalone files (implemented), inline
documentation from Python modules and packages (under development),
`PEPs (Python Enhancement Proposals)`_ (implemented), and others as

For an overview of the Docutils project implementation, see `PEP
258`_, "Docutils Design Specification".

Docutils is implemented in Python_.

.. _Docutils: http://docutils.sourceforge.net/
.. _PEPs (Python Enhancement Proposals):
.. _PEP 258: http://www.python.org/peps/pep-0258.html
.. _Python: http://www.python.org/

Why is it called "Docutils"?

Docutils is short for "Python Documentation Utilities".  The name
"Docutils" was inspired by "Distutils", the Python Distribution
Utilities architected by Greg Ward, a component of Python's standard

The earliest known use of the term "docutils" in a Python context was
a `fleeting reference`__ in a message by Fred Drake on 1999-12-02 in
the Python Doc-SIG mailing list.  It was suggested `as a project
name`__ on 2000-11-27 on Doc-SIG, again by Fred Drake, in response to
a question from Tony "Tibs" Ibbs: "What do we want to *call* this
thing?".  This was shortly after David Goodger first `announced
reStructuredText`__ on Doc-SIG.

Tibs used the name "Docutils" for `his effort`__ "to document what the
Python docutils package should support, with a particular emphasis on
documentation strings".  Tibs joined the current project (and its
predecessors) and graciously donated the name.

For more history of reStructuredText and the Docutils project, see `An
Introduction to reStructuredText`_.

Please note that the name is "Docutils", not "DocUtils" or "Doc-Utils"
or any other variation.

.. _An Introduction to reStructuredText:
__ http://mail.python.org/pipermail/doc-sig/1999-December/000878.html
__ http://mail.python.org/pipermail/doc-sig/2000-November/001252.html
__ http://mail.python.org/pipermail/doc-sig/2000-November/001239.html
__ http://homepage.ntlworld.com/tibsnjoan/docutils/STpy.html

Is there a GUI authoring environment for Docutils?

DocFactory_ is under development.  It uses wxPython and looks very

.. _DocFactory:

What is the status of the Docutils project?

Although useful and relatively stable, Docutils is experimental code,
with APIs and architecture subject to change.

Our highest priority is to fix bugs as they are reported.  So the
latest code from CVS (or `development snapshots`_) is almost always
the most stable (bug-free) as well as the most featureful.

What is the Docutils project release policy?

It ought to be "release early & often", but official releases are a
significant effort and aren't done that often.  We have
automatically-generated `development snapshots`_ which always contain
the latest code from CVS.  As the project matures, we may formalize on
a stable/development-branch scheme, but we're not using anything like
that yet.

.. _development snapshots:


What is reStructuredText?

reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get
plaintext markup syntax and parser system.  The reStructuredText
parser is a component of Docutils_.  reStructuredText is a revision
and reinterpretation of the StructuredText_ and Setext_ lightweight
markup systems.

If you are reading this on the web, you can see for yourself.  `The
source for this FAQ <FAQ.txt>`_ is written in reStructuredText; open
it in another window and compare them side by side.

`A ReStructuredText Primer`_ and the `Quick reStructuredText`_ user
reference are a good place to start.  The `reStructuredText Markup
Specification`_ is a detailed technical specification.

.. _A ReStructuredText Primer:
.. _Quick reStructuredText:
.. _reStructuredText Markup Specification:
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _StructuredText:
.. _Setext: http://docutils.sourceforge.net/mirror/setext.html

Why is it called "reStructuredText"?

The name came from a combination of "StructuredText", one of
reStructuredText's predecessors, with "re": "revised", "reworked", and
"reinterpreted", and as in the ``re.py`` regular expression module.
For a detailed history of reStructuredText and the Docutils project,
see `An Introduction to reStructuredText`_.

What's the standard abbreviation for "reStructuredText"?

"RST" and "ReST" (or "reST") are both acceptable.  Care should be
taken with capitalization, to avoid confusion with "REST__", an
acronym for "Representational State Transfer".

The abbreviations "reSTX" and "rSTX"/"rstx" should **not** be used;
they overemphasize reStructuredText's precedessor, Zope's

__ http://www.xml.com/pub/a/2002/02/06/rest.html

What's the standard filename extension for a reStructuredText file?

It's ".txt".  Some people would like to use ".rest" or ".rst" or
".restx", but why bother?  ReStructuredText source files are meant to
be readable as plaintext, and most operating systems already associate
".txt" with text files.  Using a specialized filename extension would
require that users alter their OS settings, which is something that
many users will not be willing or able to do.

Are there any reStructuredText editor extensions?

See `Editor Support for reStructuredText`__.

__ http://docutils.sf.net/tools/editors/README.html

How can I indicate the document title?  Subtitle?

A uniquely-adorned section title at the beginning of a document is
treated specially, as the document title.  Similarly, a
uniquely-adorned section title immediately after the document title
becomes the document subtitle.  For example::

    This is the Document Title

    This is the Document Subtitle

    Here's an ordinary paragraph.


    Here's an ordinary paragraph.

    This is *not* a Document Title

    The "ordinary paragraph" above the section title
    prevents it from becoming the document title.

Another counterexample::

    This is not the Document Title,  because...

    Here's an ordinary paragraph.

    ... the title adornment is not unique

    Another ordinary paragraph.

How can I represent esoteric characters (e.g. character entities) in a document?

For example, say you want an em-dash (XML character entity &mdash;,
Unicode character ``\u2014``) in your document: use a real em-dash.
Insert concrete characters (e.g. type a *real* em-dash) into your
input file, using whatever encoding suits your application, and tell
Docutils the input encoding.  Docutils uses Unicode internally, so the
em-dash character is a real em-dash internally.

Emacs users should refer to the `Emacs Support for reStructuredText`__
document.  Tips for other editors are welcome.

__ http://docutils.sourceforge.net/tools/editors/emacs/README.html

ReStructuredText has no character entity subsystem; it doesn't know
anything about XML charents.  To Docutils, "&mdash;" in input text is
7 discrete characters; no interpretation happens.  When writing HTML,
the "&" is converted to "&amp;", so in the raw output you'd see
"&amp;mdash;".  There's no difference in interpretation for text
inside or outside inline literals or literal blocks -- there's no
character entity interpretation in either case.

If you can't use a Unicode-compatible encoding and must rely on 7-bit
ASCII, there is a workaround.  Files containing character entity set
substitution definitions using the "unicode_" directive `are
available`_ (tarball_).  Please read the `description and
instructions`_ for use.  Thanks to David Priest for the original idea.
Incorporating these files into Docutils is on the `to-do list`_.
If you insist on using XML-style charents, you'll have to implement a
pre-processing system to convert to UTF-8 or something.  That
introduces complications though; you can no longer *write* about
charents naturally; instead of writing "&mdash;" you'd have to write

For the common case of long dashes, you might also want to insert the
following substitution definitons into your document (both of them are
using the "unicode_" directive)::

    .. |--| unicode:: U+2013   .. en dash
    .. |---| unicode:: U+2014  .. em dash, trimming surrounding whitespace

.. |--| unicode:: U+2013   .. en dash
.. |---| unicode:: U+2014  .. em dash, trimming surrounding whitespace

Now you can write dashes using pure ASCII: "``foo |--| bar; foo |---|
bar``", rendered as "foo |--| bar; foo |---| bar".  (Note that Mozilla
and Firefox may render this incorrectly.)  The ``:trim:`` option for
the em dash is necessary because you cannot write "``foo|---|bar``";
thus you need to add spaces ("``foo |---| bar``") and advise the
reStructuredText parser to trim the spaces using the ``:trim:``

.. _unicode:
.. _are available: http://docutils.sourceforge.net/tmp/charents/
.. _tarball: http://docutils.sourceforge.net/tmp/charents.tgz
.. _description and instructions:
.. _to-do list: http://docutils.sourceforge.net/docs/dev/todo.html

How can I generate backticks using a Scandinavian keyboard?

The use of backticks in reStructuredText is a bit awkward with
Scandinavian keyboards, where the backtick is a "dead" key.  To get
one ` character one must press SHIFT-` + SPACE.

Unfortunately, with all the variations out there, there's no way to
please everyone.  For Scandinavian programmers and technical writers,
this is not limited to reStructuredText but affects many languages and

Possible solutions include

* If you have to input a lot of backticks, simply type one in the
  normal/awkward way, select it, copy and then paste the rest (CTRL-V
  is a lot faster than SHIFT-` + SPACE).

* Use keyboard macros.

* Remap the keyboard.  The Scandinavian keyboard layout is awkward for
  other programming/technical characters too; for example, []{}
  etc. are a bit awkward compared to US keyboards.

  According to Axel Kollmorgen,

      Under Windows, you can use the `Microsoft Keyboard Layout Creator
      <http://www.microsoft.com/globaldev/tools/msklc.mspx>`__ to easily
      map the backtick key to a real backtick (no dead key). took me
      five minutes to load my default (german) keyboard layout, untick
      "Dead Key?" from the backtick key properties ("in all shift
      states"), "build dll and setup package", install the generated
      .msi, and add my custom keyboard layout via Control Panel >
      Regional and Language Options > Languages > Details > Add
      Keyboard layout (and setting it as default "when you start your

* Use a virtual/screen keyboard or character palette, such as:

  - `Web-based keyboards <http://keyboard.lab.co.il/>`__ (IE only
  - Windows: `Click-N-Type <http://www.lakefolks.org/cnt/>`__.
  - Mac OS X: the Character Palette can store a set of favorite
    characters for easy input.  Open System Preferences,
    International, Input Menu tab, enable "Show input menu in menu
    bar", and be sure that Character Palette is enabled in the list.

  Other options are welcome.

If anyone knows of other/better solutions, please `let us know`_.

Are there any tools for HTML/XML-to-reStructuredText?  (Round-tripping)

People have tossed the idea around, but little if any actual work has
ever been done.  There's no reason why reStructuredText should not be
round-trippable to/from XML; any technicalities which prevent
round-tripping would be considered bugs.  Whitespace would not be
identical, but paragraphs shouldn't suffer.  The tricky parts would be
the smaller details, like links and IDs and other bookkeeping.

For HTML, true round-tripping may not be possible.  Even adding lots
of extra "class" attributes may not be enough.  A "simple HTML" to RST
filter is possible -- for some definition of "simple HTML" -- but HTML
is used as dumb formatting so much that such a filter may not be
particularly useful.  No general-purpose filter exists.  An 80/20
approach should work though: build a tool that does 80% of the work
automatically, leaving the other 20% for manual tweaks.

Are there any Wikis that use reStructuredText syntax?

There are several, with various degrees of completeness.  With no
implied endorsement or recommendation, and in no particular order:

* `Ian Bicking's experimental code
* `MoinMoin <http://moin.sf.net>`__ has some support; `here's a sample
* Zope-based `Zwiki <http://zwiki.org/>`__
* Zope3-based Zwiki (in the Zope 3 source tree as ``zope.products.zwiki``)
* `StikiWiki <http://mithrandr.moria.org/code/stikiwiki/>`__
* `Trac <http://projects.edgewall.com/trac/>`__ `supports using reStructuredText
  <http://projects.edgewall.com/trac/wiki/WikiRestructuredText>`__ as an
  alternative to wiki markup. This includes support for `TracLinks
  <http://projects.edgewall.com/trac/wiki/TracLinks>`__ from within RST
  text via a custom RST reference-directive or, even easier, an interpreted text
  role 'trac'
* `Vogontia <http://www.ososo.de/vogontia/>`__, a Wiki-like FAQ system

Please `let us know`_ of any other reStructuredText Wikis.

The example application for the `Web Framework Shootout
<http://colorstudy.com/docs/shootout.html>`__ article is a Wiki using

Are there any Weblog (Blog) projects that use reStructuredText syntax?

With no implied endorsement or recommendation, and in no particular

* `Python Desktop Server <http://pyds.muensterland.org/>`__
* `PyBloxsom <http://roughingit.subtlehints.net/pyblosxom/>`__
* `rst2ht <http://www.rutherfurd.net/articles/rst-ht2html.html>`__
* `htmlnav <http://docutils.sourceforge.net/sandbox/gschwant/htmlnav/>`__
* `restblog <http://docutils.sourceforge.net/sandbox/mly/restblog/>`__
* `ReSTWeb <http://wingide.com/opensource/restweb>`__
* `Lino WebMan <http://lino.sourceforge.net/webman.html>`__

Please `let us know`_ of any other reStructuredText Blogs.

Can lists be indented without generating block quotes?

Some people like to write lists with indentation, without intending a
block quote context, like this::


      * list item 1
      * list item 2

There has been a lot of discussion about this, but there are some
issues that would need to be resolved before it could be implemented.
There is a summary of the issues and pointers to the discussions in
`the to-do list`__.

__ http://docutils.sourceforge.net/docs/dev/todo.html#indented-lists

Could the requirement for blank lines around lists be relaxed?

Short answer: no.

In reStructuredText, it would be impossible to unambigously mark up
and parse lists without blank lines before and after.  Deeply nested
lists may look ugly with so many blank lines, but it's a price we pay
for unambiguous markup.  Some other plaintext markup systems do not
require blank lines in nested lists, but they have to compromise
somehow, either accepting ambiguity or requiring extra complexity.
For example, `Epytext <http://epydoc.sf.net/epytext.html#list>`__ does
not require blank lines around lists, but it does require that lists
be indented and that ambiguous cases be escaped.

How can I include mathematical equations in documents?

There is no elegant built-in way, yet.  There are several ideas, but
no obvious winner.  This issue requires a champion to solve the
technical and aesthetic issues and implement a generic solution.
Here's the `to-do list entry`__.

__ http://docutils.sourceforge.net/docs/dev/todo.html#math-markup

There are several quick & dirty ways to include equations in documents.
They all presently use LaTeX syntax or dialects of it.

* For LaTeX output, nothing beats raw LaTeX math.  A simple way is to
  use the `raw directive`_::

      .. raw:: latex

          \[ x^3 + 3x^2a + 3xa^2 + a^3, \]
  For inline math you could use substitutions of the raw directive but
  the recently added `raw role`_ is more convenient.  You must define a
  custom role based on it once in your document::

      .. role:: raw-latex(raw)
          :format: latex

  and then you can just use the new role in your text::

      the binomial expansion of :raw-latex:`$(x+a)^3$` is

  .. _raw directive: http://docutils.sourceforge.net/docs/ref/rst/
  .. _raw role: http://docutils.sourceforge.net/docs/ref/rst/roles.html#raw

* For HTML the "Right" w3c-standard way to include math is MathML_.
  Unfortunately its rendering is still quite broken (or absent) on many
  browsers but it's getting better.  Another bad problem is that typing
  or reading raw MathML by humans is *really* painful, so embedding it
  in a reST document with the raw directive would defy the goals of
  readability and editability of reST (see an `example of raw MathML

  A much less painful way to generate HTML+MathML is to use itex2mml_ to
  convert a dialect of LaTeX syntax to presentation MathML.  Here is an
  example of potential `itex math markup
  <http://article.gmane.org/gmane.text.docutils.user/118>`__.  The
  simplest way to use it is to add ``html`` to the format lists for the
  raw directive/role and postprocess the resulting document with
  itex2mml.  This way you can *generate LaTeX and HTML+MathML from the
  same source*, but you must limit yourself to the intersection of LaTeX
  and itex markups for this to work.  Alan G. Isaac wrote a detailed
  HOWTO_ for this approach.

  .. _MathML: http://www.w3.org/Math/
  .. _itex2mml: http://pear.math.pitt.edu/mathzilla/itex2mml.html
  .. _HOWTO: http://www.american.edu/econ/itex2mml/mathhack.rst

  * The other way to add math to HTML is to use images of the equations,
    typically generated by TeX.  This is inferior to MathML in the long
    term but is perhaps more accessible nowdays.

    Of course, doing it by hand is too much work.  Beni Cherniavsky has
    written some `preprocessing scripts`__ for converting the
    ``texmath`` role/directive into images for HTML output and raw
    directives/subsitution for LaTeX output.  This way you can *generate
    LaTeX and HTML+images from the same source*.  `Instructions here`__.

    __ http://docutils.sourceforge.net/sandbox/cben/rolehack/
    __ http://docutils.sourceforge.net/sandbox/cben/rolehack/README.html

Is nested inline markup possible?

Not currently, no.  It's on the `to-do list`__ (`details here`__), and
hopefully will be part of the reStructuredText parser soon.  At that
time, markup like this will become possible::

    Here is some *emphasized text containing a `hyperlink`_ and
    ``inline literals``*.

__ http://docutils.sf.net/docs/dev/todo.html#nested-inline-markup
__ http://docutils.sf.net/docs/dev/rst/alternatives.html#nested-inline-markup

There are workarounds, but they are either convoluted or ugly or both.
They are not recommended.

* Inline markup can be combined with hyperlinks using `substitution
  definitions`__ and references__ with the `"replace" directive`__.
  For example::

      Here is an |emphasized hyperlink|_.

      .. |emphasized hyperlink| replace:: *emphasized hyperlink*
      .. _emphasized hyperlink: http://example.org

  It is not possible for just a portion of the replacement text to be
  a hyperlink; it's the entire replacement text or nothing.

  __ http://docutils.sf.net/docs/ref/rst/restructuredtext.html#substitution-definitions
  __ http://docutils.sf.net/docs/ref/rst/restructuredtext.html#substitution-references
  __ http://docutils.sf.net/docs/ref/rst/directives.html#replace

* The `"raw" directive`__ can be used to insert raw HTML into HTML

      Here is some |stuff|.

      .. |stuff| raw:: html

         <em>emphasized text containing a
         <a href="http://example.org">hyperlink</a> and
         <tt>inline literals</tt></em>

  Raw LaTeX is supported for LaTeX output, etc.

  __ http://docutils.sf.net/docs/ref/rst/directives.html#raw

How to indicate a line break or a significant newline?

`Line blocks`__ are designed for address blocks, verse, and other
cases where line breaks are significant and must be preserved.  Unlike
literal blocks, the typeface is not changed, and inline markup is
recognized.  For example::

    | A one, two, a one two three four
    | Half a bee, philosophically,
    |     must, *ipso facto*, half not be.
    | But half the bee has got to be,
    |     *vis a vis* its entity.  D'you see?
    | But can a bee be said to be
    |     or not to be an entire bee,
    |         when half the bee is not a bee,
    |             due to some ancient injury?
    | Singing...

__ http://docutils.sf.net/docs/ref/rst/restructuredtext.html#line-blocks

Here's a workaround for manually inserting explicit line breaks in
HTML output::

    .. |br| raw:: html

       <br />

    I want to break this line here: |br| this is after the break.

    If the extra whitespace bothers you, |br|\ backslash-escape it.

A URL containing asterisks doesn't work.  What to do?

Asterisks are valid URL characters (see :RFC:`2396`), sometimes used
in URLs.  For example::


Unfortunately, the parser thinks the asterisks are indicating
emphasis.  The slashes serve as delineating punctuation, allowing the
asterisks to be recognized as markup.  The example above is separated
by the parser into a truncated URL, an emphasized word, and some
regular text::


To turn off markup recognition, use a backslash to escape at least the
first asterisk, like this::


Escaping the second asterisk doesn't hurt, but it isn't necessary.

How can I make a literal block with *some* formatting?

Use the `parsed-literal`_ directive.

.. _parsed-literal: docs/ref/rst/directives.html#parsed-literal

Scenario: a document contains some source code, which calls for a
literal block to preserve linebreaks and whitespace.  But part of the
source code should be formatted, for example as emphasis or as a
hyperlink.  This calls for a *parsed* literal block::

    .. parsed-literal::

       print "Hello world!"  # *tricky* code [1]_

The emphasis (``*tricky*``) and footnote reference (``[1]_``) will be

Can reStructuredText be used for web or generic templating?

Docutils and reStructuredText can be used with or as a component of a
templating system, but they do not themselves include templating
functionality.  Templating should simply be left to dedicated
templating systems.  Users can choose a templating system to apply to
their reStructuredText documents as best serves their interests.

There are many good templating systems for Python (ht2html_, YAPTU_,
Quixote_'s PTL, Cheetah_, etc.; see this non-exhaustive list of `some
other templating systems`_), and many more for other languages, each
with different approaches.  We invite you to try several and find one
you like.  If you adapt it to use Docutils/reStructuredText, please
consider contributing the code to Docutils or `let us know`_ and we'll
keep a list here.

.. _ht2html: http://ht2html.sourceforge.net/
.. _YAPTU:
.. _Quixote: http://www.mems-exchange.org/software/quixote/
.. _Cheetah: http://www.cheetahtemplate.org/
.. _some other templating systems:

HTML Writer

What is the status of the HTML Writer?

The HTML Writer module, ``docutils/writers/html4css1.py``, is a
proof-of-concept reference implementation.  While it is a complete
implementation, some aspects of the HTML it produces may be
incompatible with older browsers or specialized applications (such as
web templating).  Alternate implementations are welcome.

What kind of HTML does it produce?

It produces XHTML compatible with the `HTML 4.01`_ and `XHTML 1.0`_
specifications (within reason; there are some incompatibilities
between the specs).  A cascading style sheet ("default.css" by
default) is required for proper viewing with a modern graphical
browser.  Correct rendering of the HTML produced depends on the CSS
support of the browser.

.. _HTML 4.01: http://www.w3.org/TR/html4/
.. _XHTML 1.0: http://www.w3.org/TR/xhtml1/

What browsers are supported?

No specific browser is targeted; all modern graphical browsers should
work.  Some older browsers, text-only browsers, and browsers without
full CSS support are known to produce inferior results.  Mozilla
(version 1.0 and up) and MS Internet Explorer (version 5.0 and up) are
known to give good results.  Reports of experiences with other
browsers are welcome.

Unexpected results from tools/rst2html.py: H1, H1 instead of H1, H2.  Why?

Here's the question in full:

    I have this text::

        Heading 1

        All my life, I wanted to be H1.

        Heading 1.1

        But along came H1, and so shouldn't I be H2?
        No!  I'm H1!

        Heading 1.1.1

        Yeah, imagine me, I'm stuck at H3!  No?!?

    When I run it through tools/rst2html.py, I get unexpected results
    (below).  I was expecting H1, H2, then H3; instead, I get H1, H1,

        <html lang="en">
        <title>Heading 1</title>
        <link rel="stylesheet" href="default.css" type="text/css" />
        <div class="document" id="heading-1">
        <h1 class="title">Heading 1</h1>                <-- first H1
        <p>All my life, I wanted to be H1.</p>
        <div class="section" id="heading-1-1">
        <h1><a name="heading-1-1">Heading 1.1</a></h1>        <-- H1
        <p>But along came H1, and so now I must be H2.</p>
        <div class="section" id="heading-1-1-1">
        <h2><a name="heading-1-1-1">Heading 1.1.1</a></h2>
        <p>Yeah, imagine me, I'm stuck at H3!</p>

    What gives?

Check the "class" attribute on the H1 tags, and you will see a
difference.  The first H1 is actually ``<h1 class="title">``; this is
the document title, and the default stylesheet renders it centered.
There can also be an ``<h2 class="subtitle">`` for the document

If there's only one highest-level section title at the beginning of a
document, it is treated specially, as the document title.  (Similarly, a
lone second-highest-level section title may become the document
subtitle.)  See `How can I indicate the document title?  Subtitle?`_ for
details.  Rather than use a plain H1 for the document title, we use ``<h1
class="title">`` so that we can use H1 again within the document.  Why
do we do this?  HTML only has H1-H6, so by making H1 do double duty, we
effectively reserve these tags to provide 6 levels of heading beyond the
single document title.

HTML is being used for dumb formatting for nothing but final display.
A stylesheet *is required*, and one is provided:
tools/stylesheets/default.css.  Of course, you're welcome to roll your
own.  The default stylesheet provides rules to format ``<h1
class="title">`` and ``<h2 class="subtitle">`` differently from
ordinary ``<h1>`` and ``<h2>``::

    h1.title {
      text-align: center }

    h2.subtitle {
      text-align: center }

If you don't want the top section heading to be interpreted as a
title at all, disable the `doctitle_xform`_ setting
(``--no-doc-title`` option).  This will interpret your document
differently from the standard settings, which might not be a good
idea.  If you don't like the reuse of the H1 in the HTML output, you
can tweak the `initial_header_level`_ setting
(``--initial-header-level`` option) -- but unless you match its value
to your specific document, you might end up with bad HTML (e.g. H3
without H2).

.. _doctitle_xform:
.. _initial_header_level:

(Thanks to Mark McEahern for the question and much of the answer.)

Why do enumerated lists only use numbers (no letters or roman numerals)?

The rendering of enumerators (the numbers or letters acting as list
markers) is completely governed by the stylesheet, so either the
browser can't find the stylesheet (try using the "--embed-stylesheet"
option), or the browser can't understand it (try a recent Firefox,
Mozilla, Konqueror, Opera, Safari, or even MSIE).

There appear to be garbage characters in the HTML.  What's up?

What you're seeing is most probably not garbage, but the result of a
mismatch between the actual encoding of the HTML output and the
encoding your browser is expecting.  Your browser is misinterpreting
the HTML data, which is encoded text.  A discussion of text encodings
is beyond the scope of this FAQ; see one or more of these documents
for more info:

* `UTF-8 and Unicode FAQ for Unix/Linux

* Chapters 3 and 4 of `Introduction to i18n [Internationalization]

* `Python Unicode Tutorial

* `Python Unicode Objects: Some Observations on Working With Non-ASCII
  Character Sets <http://effbot.org/zone/unicode-objects.htm>`_

The common case is with the default output encoding (UTF-8), when
either numbered sections are used (via the "sectnum_" directive) or
symbol-footnotes.  3 non-breaking spaces are inserted in each numbered
section title, between the generated number and the title text.  Most
footnote symbols are not available in ASCII, nor are non-breaking
spaces.  When encoded with UTF-8 and viewed with ordinary ASCII tools,
these characters will appear to be multi-character garbage.

You may have an decoding problem in your browser (or editor, etc.).
The encoding of the output is set to "utf-8", but your browswer isn't
recognizing that.  You can either try to fix your browser (enable
"UTF-8 character set", sometimes called "Unicode"), or choose a
different encoding for the HTML output.  You can also try
``--output-encoding=ascii:xmlcharrefreplace`` for HTML (not applicable
to non-XMLish outputs).

If you're generating document fragments, the "Content-Type" metadata
(between the HTML ``<head>`` and ``</head>`` tags) must agree with the
encoding of the rest of the document.  For UTF-8, it should be::

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Also, Docutils normally generates an XML declaration as the first line
of the output.  It must also match the document encoding.  For UTF-8::

    <?xml version="1.0" encoding="utf-8" ?>

.. _sectnum:

Python Source Reader

Can I use Docutils for Python auto-documentation?

Yes, in conjunction with other projects.

Docstring extraction functionality from within Docutils is still under
development.  There is most of a source code parsing module in
docutils/readers/python/moduleparser.py.  We do plan to finish it
eventually.  Ian Bicking wrote an initial front end for the
moduleparser.py module, in sandbox/ianb/extractor/extractor.py.  Ian
also did some work on the Python Source Reader
(docutils.readers.python) component at PyCon DC 2004.

Version 2.0 of Ed Loper's `Epydoc <http://epydoc.sourceforge.net/>`_
supports reStructuredText-format docstrings for HTML output.  Docutils
0.3 or newer is required.  Development of a Docutils-specific
auto-documentation tool will continue.  Epydoc works by importing
Python modules to be documented, whereas the Docutils-specific tool,
described above, will parse modules without importing them (as with
`HappyDoc <http://happydoc.sourceforge.net/>`_, which doesn't support

The advantages of parsing over importing are security and flexibility;
the disadvantage is complexity/difficulty.

* Security: untrusted code that shouldn't be executed can be parsed;
  importing a module executes its top-level code.
* Flexibility: comments and unofficial docstrings (those not supported
  by Python syntax) can only be processed by parsing.
* Complexity/difficulty: it's a lot harder to parse and analyze a
  module than it is to ``import`` and analyze one.

For more details, please see "Docstring Extraction Rules" in `PEP
258`_, item 3 ("How").


Is the Docutils document model based on any existing XML models?

Not directly, no.  It borrows bits from DocBook, HTML, and others.  I
(David Goodger) have designed several document models over the years,
and have my own biases.  The Docutils document model is designed for
simplicity and extensibility, and has been influenced by the needs of
the reStructuredText markup.

=== Added File Zope/lib/python/docutils/HISTORY.txt ===
 Docutils History

:Author: David Goodger; open to all Docutils developers
:Contact: goodger at python.org
:Date: $Date: 2005/01/07 15:11:43 $
:Web site: http://docutils.sourceforge.net/
:Copyright: This document has been placed in the public domain.

.. contents::

Release 0.3.7 (2004-12-24)

* docutils/frontend.py:

  - Added options: --input-encoding-error-handler,
    --record-dependencies, --leave-footnote-reference-space,
  - Added command-line and config file support for "overrides" setting

* docutils/io.py:

  - Added support for input encoding error handler.

* docutils/nodes.py:

  - Added dispatch_visit and dispatch_departure methods to
    NodeVisitor; useful as a hook for Visitors.
  - Changed structure of ``line_block``; added ``line``.
  - Added ``compound`` node class.
  - Added a mechanism for Visitors to transitionally ignore new node

* docutils/utils.py:

  - Moved ``escape2null`` and ``unescape`` functions from

* docutils/parsers/rst/roles.py:

  - Added "raw" role.
  - Changed role function API: the "text" parameter now takes
    null-escaped interpreted text content.

* docutils/parsers/rst/states.py:

  - Fixed bug where a "role" directive in a nested parse would crash
    the parser; the state machine's "language" attribute was not being
    copied over.
  - Added support for line block syntax.
  - Fixed directive parsing bug: argument-less directives didn't
    notice that arguments were present.
  - Removed error checking for transitions.
  - Added support for multiple classifiers in definition list items.
  - Moved ``escape2null`` and ``unescape`` functions to docutils/utils.py.
  - Changed role function API: the "text" parameter now takes
    null-escaped interpreted text content.
  - Empty sections and documents are allowed now.

* docutils/parsers/rst/directives/__init__.py:

  - Added ``encoding`` directive option conversion function.
  - Allow multiple class names in class_option conversion function.

* docutils/parsers/rst/directives/body.py:

  - Converted the line-block directive to use the new structure.
  - Extracted the old line-block functionality to the ``block``
    function (still used).
  - Added ``compound`` directive (thanks to Felix Wiemann).

* docutils/parsers/rst/directives/misc.py:

  - Added "encoding" option to "include" and "raw" directives.
  - Added "trim", "ltrim", and "rtrim" options to "unicode" directive.
  - Allow multiple class names in the "class" directive.

* docutils/parsers/rst/directives/parts.py:

  - Directive "sectnum" now accepts "prefix", "suffix", and "start"
    options.  Thanks to Lele Gaifax.

* docutils/parsers/rst/directives/tables.py:

  - Added "encoding" directive to "csv-table" directive.
  - Added workaround for lack of Unicode support in csv.py, for
    non-ASCII CSV input.

* docutils/transforms/misc.py:

  - Fixed bug when multiple "class" directives are applied to a single
  - Enabled multiple format names for "raw" directive.

* docutils/transforms/references.py:

  - Added support for trimming whitespace from beside substitution

* docutils/transforms/universal.py:

  - FinalChecks now checks for illegal transitions and moves
    transitions between sections.

* docutils/writers/html4css1.py:

  - HTMLTranslator.encode now converts U+00A0 to "&nbsp;".
  - "stylesheet" and "stylesheet_path" settings are now mutually
  - Added support for the new line_block/line structure.
  - --footnote-references now overrides
    --trim-footnote-reference-space, if applicable.
  - Added support for ``compound`` elements.
  - Enabled multiple format names for "raw" directive.
  - ``<p>`` tags of a paragraph which is the only visible child of the
    document node are no longer stripped.
  - Moved paragraph-compacting logic (for stripping ``<p>`` tags) to
    new method ``should_be_compact_paragraph()``.
  - Added class="docutils" to ``dl``, ``hr``, ``table`` and ``tt``
  - "raw" elements are now surrounded by ``span`` or ``div`` tags in
    the output if they have their ``class`` attribute set.
  - The whole document is now surrounded by a ``<div
    class="document">`` element.
  - Body-level images are now wrapped by their own ``<div>`` elements,
    with image classes copied to the wrapper, and for images which
    have the ``:align:`` option set, the surrounding ``<div>`` now
    receives a class attribute (like ``class="align-left"``).

* docutils/writers/latex2e.py:

  - no newline after depart_term.
  - Added translations for some Unicode quotes.
  - Added option "font-encoding", made package AE the default.
  - "stylesheet" and "stylesheet_path" settings are now mutually
  - --footnote-references now overrides
    --trim-footnote-reference-space, if applicable.
  - The footnote label style now matches the footnote reference style
    ("brackets" or "superscript").
  - Added support for ``compound`` elements.
  - Enabled multiple format names for "raw" directive.

* docs/ref/docutils.dtd:

  - Changed structure of the ``line_block`` element; added ``line``.
  - Added ``compound`` element.
  - Added "ltrim" and "rtrim" attributes to
    ``substitution_definition`` element.
  - Enabled multiple format names for ``raw`` element.
  - Enabled multiple classifiers in ``definition_list_item`` elements.

* docs/ref/rst/directives.txt

  - Marked "line-block" as deprecated.
  - "Class" directive now allows multiple class names.
  - Added "Rationale for Class Attribute Value Conversion".
  - Added warning about "raw" overuse/abuse.

* docs/ref/rst/restructuredtext.txt:

  - Added syntax for line blocks.
  - Definition list items may have multiple classifiers.

* docs/ref/rst/roles.txt:

  - Added "raw" role.

* tools/stylesheets/default.css:

  - Added support for the new line_block structure.
  - Added "docutils" class to ``dl``, ``hr``, ``table`` and ``tt``.

Release 0.3.5 (2004-07-29)


* _`Documentation cleanup/reorganization`.

  - Created new subdirectories of docs/:

    * ``docs/user/``: introductory/tutorial material for end-users
    * ``docs/dev/``: for core-developers (development notes, plans, etc.)
    * ``docs/api/``: API reference material for client-developers
    * ``docs/ref/``: reference material for all groups
    * ``docs/howto/``: for component-developers and core-developers
    * ``docs/peps/``: Python Enhancement Proposals

  - Moved ``docs/*`` to ``docs/user/``.
  - Moved ``pysource.dtd``, ``pysource.txt``, ``semantics.txt`` from
    ``spec/`` to ``docs/dev``.
  - Moved ``doctree.txt``, ``docutils.dtd``, ``soextblx.dtd``,
    ``transforms.txt`` from ``spec/`` to ``docs/ref/``.
  - Moved ``alternatives.txt``, and ``problems.txt`` from
    ``spec/rst/`` to ``docs/dev/rst/``.
  - Moved ``reStructuredText.txt``, ``directives.txt``,
    ``interpreted.txt``, and ``introduction.txt`` from ``spec/rst/``
    to ``docs/ref/rst/``.  Renamed ``interpreted.txt`` to
    ``roles.txt``, ``reStructuredText.txt`` to
  - Moved ``spec/howto/`` to ``docs/howto``.

  In order to keep the CVS history of moved files, we supplied
  SourceForge with a `script for modifying the Docutils CVS

  __ http://cvs.sourceforge.net/viewcvs.py/*checkout*/docutils/sandbox/davidg/infrastructure/cvs-reorg.sh?content-type=text/plain&rev=1.5

  After running the cleanup script:

  - Added ``docs/index.txt``.
  - Added a ``.htaccess`` file to the ``web`` module, containing
    redirects for all old paths to new paths.  They'll preserve
    fragments (the "#name" part of a URL), and won't clutter up the
    file system, and will correct the URL in the user's browser.
  - Added ``BUGS.txt``, ``docs/dev/policies.txt``,
    ``docs/dev/website.txt``, ``docs/dev/release.txt`` from all but
    the "To Do" list itself in ``docs/dev/todo.txt``.
  - Moved "Future Plans" from ``HISTORY.txt`` to new "Priorities"
    section of ``docs/dev/todo.txt``.
  - Added ``THANKS.txt`` from "Acknowledgements" in ``HISTORY.txt``.
  - Added "How To Report Bugs" to ``BUGS.txt``.
  - Went through all the sources and docs (including under web/) and
    updated links.  Mostly done by Felix Wiemann; thanks Felix!
    (Still need to update links in the sandboxes.)


* BUGS.txt: Added to project.

* THANKS.txt: Added to project.

* docutils/__init__.py:

  - 0.3.4: Post-release.

* docutils/core.py:

  - Added special error handling & advice for UnicodeEncodeError.
  - Refactored Publisher.publish (simplified exception handling &
    extracted debug dumps).
  - Renamed "enable_exit" parameter of convenience functions to
  - Enabled traceback (exception propagation) by default in
    programmatic convenience functions.
  - Now publish_file and publish_cmdline convenience functions return
    the encoded string results in addition to their regular I/O.
  - Extracted common code from publish_file, publish_string, and
    publish_parts, into new publish_programmatically.  Extracted
    settings code to ``Publisher.process_programmatic_settings``.
  - In Publisher.publish, disabled ``settings_overrides`` when
    ``settings`` is supplied; redundant.

* docutils/frontend.py:

  - Added help text for "--output-encoding-error-handler" and
  - Renamed "--exit" to "--exit-status".
  - Simplified default-setting code.

* docutils/parsers/rst/__init__.py:

  - Added "--pep-base-url" and "--rfc-base-url" options.

* docutils/parsers/rst/states.py:

  - Made URI recognition more aggressive and intelligent.

* docutils/parsers/rst/directives/__init__.py:

  - Added several directive option conversion functions.

* docutils/parsers/rst/directives/body.py:

  - Moved "table" directive to tables.py.

* docutils/parsers/rst/directives/tables.py: Table-related directives,
  added to project.

* docutils/writers/latex2e.py:

  - Added "--table-style=(standard|booktabs|nolines)"
  - figures get "here" option (LaTeX per default puts them at bottom),
    and figure content is centered.
  - Rowspan support for tables.
  - Fix: admonition titles before first section.
  - Replace ``--`` in literal by ``-{}-`` because fontencoding T1 has endash.
  - Replave ``_`` in literal by an underlined blank, because it has the correct
  - Fix: encode pdfbookmark titles, ``#`` broke pdflatex.
  - A few unicode replacements, if output_encoding != utf
  - Add "--graphicx-option".
  - Indent literal-blocks.
  - Fix: omit ``\maketitle`` when there is no document title.

* docs/index.txt: "Docutils Project Documentation Overview", added to

* docs/api/cmdline-tool.txt: "Inside A Docutils Command-Line Front-End
  Tool", added to project.

* docs/api/publisher.txt: "The Docutils Publisher", added to project.

* docs/api/runtime-settings.txt: "Docutils Runtime Settings", added to project.

* docs/dev/policies.txt: Added to project (extracted from
  ``docs/dev/todo.txt``, formerly ``spec/notes.txt``).

* docs/dev/release.txt: Added to project (extracted from
  ``docs/dev/todo.txt``, formerly ``spec/notes.txt``).

* docs/dev/testing.txt: Added to project.

* docs/dev/website.txt: Added to project (extracted from
  ``docs/dev/todo.txt``, formerly ``spec/notes.txt``).

* docs/ref/rst/directives.txt:

  - Added directives: "table", "csv-table".

* docs/user/rst/cheatsheet.txt: "The reStructuredText Cheat Sheet"
  added to project.  1 page for syntax, and a 1 page reference for
  directives and roles.  Source text to be used as-is; not meant to be
  converted to HTML.

* docs/user/rst/demo.txt: Added to project; moved from tools/test.txt
  with a change of title.

* test/functional/, contents, and test/test_functional.py: Added to

* tools/buildhtml.py: Fixed bug with config file handling.

* tools/html.py: Removed from project (duplicate of rst2html.py).

* tools/pep2html.py: Removed from project (duplicate of Python's
  nondist/peps/pep2html.py; Docutils' tools/pep.py can be used for
  Docutils-related PEPs in docs/peps/).

* tools/rst2pseudoxml.py: Renamed from publish.py.

* tools/rst2xml.py: Renamed from docutils-xml.py.

* tools/test.txt: Removed from project; moved to

* setup.py: Now also installs ``rst2latex.py``.

Release 0.3.3 (2004-05-09)

* docutils/__init__.py:

  - 0.3.1: Reorganized config file format (multiple sections); see
  - Added unknown_reference_resolvers attribute to TransformSpec.
  - 0.3.2: Interpreted text reorganization.
  - 0.3.3: Released.

* docutils/core.py:

  - Catch system messages to stop tracebacks from parsing errors.
  - Catch exceptions during processing report & exit without
    tracebacks, except when "--traceback" used.
  - Reordered components for OptionParser; application comes last.
  - Added "config_section" parameter to several methods and functions,
    allowing front ends to easily specify their config file sections.
  - Added publish_parts convenience function to allow access to individual
    parts of a document.

* docutils/examples.py: Added to project; practical examples of
  Docutils client code, to be used as-is or as models for variations.

* docutils/frontend.py:

  - Added "--traceback" & "--no-traceback" options ("traceback"
  - Implemented support for config file reorganization:
    ``standard_config_files`` moved from ``ConfigParser`` to
    ``OptionParser``; added
    ``OptionParser.get_config_file_settings()`` and
    ``.get_standard_config_settings()``; support for old "[options]"
    section (with deprecation warning) and mapping from old to new
  - Reimplemented setting validation.
  - Enabled flexible boolean values: yes/no, true/false, on/off.
  - Added ``Values``, a subclass of ``optparse.Values``, with support
    for list setting attributes.
  - Added support for new ``DOCUTILSCONFIG`` environment variable;
    thanks to Beni Cherniavsky.
  - Added "--no-section-numbering" option.

* docutils/io.py:

  - Catch IOErrors when opening source & destination files, report &
    exit without tracebacks.  Added ``handle_io_errors`` parameter to
    ``FileInput`` & ``FileOutput`` to enable caller error handling.

* docutils/nodes.py:

  - Changed ``SparseNodeVisitor`` and ``GenericNodeVisitor`` dynamic
    method definitions (via ``exec``) to dynamic assignments (via
    ``setattr``); thanks to Roman Suzi.
  - Encapsulated visitor dynamic assignments in a function; thanks to
    Ian Bicking.
  - Added indirect_reference_name attribute to the Targetable
    class. This attribute holds the whitespace_normalized_name
    (contains mixed case) of a target.

* docutils/statemachine.py:

  - Renamed ``StringList.strip_indent`` to ``.trim_left``.
  - Added ``StringList.get_2D_block``.

* docutils/utils.py:

  - Added "level" attribute to SystemMessage exceptions.

* docutils/languages/af.py: Added to project; Afrikaans mappings by
  Jannie Hofmeyr.

* docutils/languages/cs.py: Added to project; Czech mappings by Marek

* docutils/languages/eo.py: Added to project; Esperanto mappings by
  Marcelo Huerta San Martin.

* docutils/languages/pt_br.py: Added to project; Brazilian Portuguese
  mappings by Lalo Martins.

* docutils/languages/ru.py: Added to project; Russian mappings by
  Roman Suzi.

* docutils/parsers/rst/roles.py: Added to project.  Contains
  interpreted text role functions, a registry for interpreted text
  roles, and an API for adding to and retrieving from the registry.
  Contributed by Edward Loper.

* docutils/parsers/rst/states.py:

  - Updated ``RSTState.nested_parse`` for "include" in table cells.
  - Allowed true em-dash character and "---" as block quote
    attribution marker.
  - Added support for <angle-bracketed> complex option arguments
    (option lists).
  - Fixed handling of backslashes in substitution definitions.
  - Fixed off-by-1 error with extra whitespace after substitution
    definition directive.
  - Added inline markup parsing to field lists' field names.
  - Added support for quoted (and unindented) literal blocks.
    Driven in part by a bribe from Frank Siebenlist (thanks!).
  - Parser now handles escapes in URIs correctly.
  - Made embedded-URIs' reference text omittable.  Idea from Beni
  - Refactored explicit target processing code.
  - Added name attribute to references containing the reference name only
    through whitespace_normalize_name (no case changes).
  - parse_target no longer returns the refname after going through
    normalize_name. This is now handled in make_target.
  - Fixed bug relating to role-less interpreted text in non-English
  - Reorganized interpreted text processing; moved code into the new
    roles.py module.  Contributed by Edward Loper.
  - Refactored ``Body.parse_directive`` into ``run_directive`` and

* docutils/parsers/rst/tableparser.py:

  - Reworked for ``StringList``, to support "include" directives in
    table cells.

* docutils/parsers/rst/directives/__init__.py:

  - Renamed ``unchanged()`` directive option conversion function to
    ``unchanged_required``, and added a new ``unchanged``.
  - Catch unicode value too high error; fixes bug 781766.
  - Beefed up directive error reporting.

* docutils/parsers/rst/directives/body.py:

  - Added basic "table" directive.

* docutils/parsers/rst/directives/images.py:

  - Added "target" option to "image" directive.
  - Added name attribute to references containing the reference name only
    through whitespace_normalize_name (no case changes).

* docutils/parsers/rst/directives/misc.py:

  - Isolated the import of the ``urllib2`` module; was causing
    problems on SourceForge (``libssl.so.2`` unavailable?).
  - Added the "role" directive for declaring custom interpreted text

* docutils/parsers/rst/directives/parts.py:

  - The "contents" directive does more work up-front, creating the
    "topic" and "title", and leaving the "pending" node for the
    transform.  Allows earlier reference resolution; fixes subtle bug.

* docutils/parsers/rst/languages/af.py: Added to project; Afrikaans
  mappings by Jannie Hofmeyr.

* docutils/parsers/rst/languages/cs.py: Added to project; Czech
  mappings by Marek Blaha.

* docutils/parsers/rst/languages/eo.py: Added to project; Esperanto
  mappings by Marcelo Huerta San Martin.

* docutils/parsers/rst/languages/pt_br.py: Added to project; Brazilian
  Portuguese mappings by Lalo Martins.

* docutils/parsers/rst/languages/ru.py: Added to project; Russian
  mappings by Roman Suzi.

* docutils/transforms/parts.py:

  - The "contents" directive does more work up-front, creating the
    "topic" and "title", and leaving the "pending" node for the
    transform.  Allows earlier reference resolution; fixes subtle bug.
  - Added support for disabling of section numbering.
* docutils/transforms/references.py:

  - Verifying that external targets are truly targets and not indirect 
    references. This is because we are now adding a "name" attribute to 
    references in addition to targets. Note sure if this is correct!
  - Added code to hook into the unknown_reference_resolvers list for a
    transformer in resolve_indirect_target. This allows the
    unknown_reference_resolvers to keep around indirect targets which
    docutils doesn't know about.
  - Added specific error message for duplicate targets.

* docutils/transforms/universal.py:

  - Added FilterMessages transform (removes system messages below the
    verbosity threshold).
  - Added hook (via docutils.TransformSpec.unknown_reference_resolvers)
    to FinalCheckVisitor for application-specific handling of 
    unresolvable references.
  - Added specific error message for duplicate targets.
* docutils/writers/__init__.py:

  - Added assemble_parts method to the Writer class to allow for
    access to a documents individual parts.
  - Documented & set default for ``Writer.output`` attribute.

* docutils/writers/html4css1.py:

  - Fixed unicode handling of attribute values (bug 760673).
  - Prevent duplication of "class" attribute values (bug report from
    Kirill Lapshin).
  - Improved table grid/border handling (prompted by report from Bob
  - Added support for table titles.
  - Added "<title />" for untitled docs, for XHTML conformance; thanks
    to Darek Suchojad.
  - Added functionality to keep track of individual parts of a document
    and store them in a dictionary as the "parts" attribute of the writer.
    Contributed by Reggie Dugard at the Docutils sprint at PyCon DC 2004.
  - Added proper support for the "scale" attribute of the "image"
    element.  Contributed by Brent Cook.
  - Added ``--initial-header-level`` option.
  - Fixed bug: the body_pre_docinfo segment depended on there being a
    docinfo; if no docinfo, the document title was incorporated into
    the body segment.  Adversely affected the publish_parts interface.

* docutils/writers/latex2e.py:

  - Changed default stylesheet to "no stylesheet" to avoid latex complaining
    about a missing file.
  - Added options and support: ``--compound-enumerators``,
    ``--section-prefix-for-enumerators``, and
    ``--section-enumerator-separator``.  By John F Meinel Jr (SF patch
  - Added option ``--use-verbatim-when-possible``, to avoid
    problematic characters (eg, '~' in italian) in literal blocks.
  - It's now possible to use four section levels in the `book` and
    `report` LaTeX classes.  The default `article` class still has
    three levels limit.
* docs/config.txt: "Docutils Configuration Files", added to project.
  Moved config file entry descriptions from tools.txt.

* docs/tools.txt:

  - Moved config file entry descriptions to config.txt.

* spec/notes.txt: Continual updates.  Added "Setting Up For Docutils

* spec/howto/rst-roles.txt: "Creating reStructuredText Interpreted
  Text Roles", added to project.

* spec/rst/reStructuredText.txt:

  - Added description of support for <angle-bracketed> complex option
    arguments to option lists.
  - Added subsections for indented and quoted literal blocks.

* test: Continually adding & updating tests.

  - Added test/test_settings.py & test/data/config_*.txt support
  - Added test/test_writers/test_htmlfragment.py.

* test/DocutilsTestSupport.py:

  - Refactored LaTeX publisher test suite/case class names to make
    testing other writers easier.
  - Added HtmlWriterPublishTestCase and HtmlFragmentTestSuite classes
    to test the processing of HTML fragments which use the new
    publish_parts convenience function.

* tools/buildhtml.py:

  - Added support for the "--prune" option.
  - Removed dependency on pep2html.py; plaintext PEPs no longer

* tools/docutils.conf:

  - Updated for configuration file reorganization.

* tools/rst2html.py:

  - copied from tools/html.py

* setup.py:

  - added a 'scripts' section to configuration
  - added 'tools/rst2html.py' to the scripts section

Release 0.3 (2003-06-24)


* Renamed "attribute" to "option" for directives/extensions.

* Renamed transform method "transform" to "apply".

* Renamed "options" to "settings" for runtime settings (as set by
  command-line options).  Sometimes "option" (singular) became
  "settings" (plural).  Some variations below:

  - document.options -> document.settings (stored in other objects as
  - option_spec -> settings_spec (not directives though)
  - OptionSpec -> SettingsSpec
  - cmdline_options -> settings_spec
  - relative_path_options -> relative_path_settings
  - option_default_overrides -> settings_default_overrides
  - Publisher.set_options -> Publisher.get_settings


* COPYING.txt: Added "Public Domain Dedication".

* FAQ.txt: Frequently asked questions, added to project.

* setup.py:

  - Updated with PyPI Trove classifiers.
  - Conditional installation of third-party modules.

* docutils/__init__.py:

  - Bumped version to 0.2.1 to reflect changes to I/O classes.
  - Bumped version to 0.2.2 to reflect changes to stylesheet options.
  - Factored ``SettingsSpec`` out of ``Component``; separately useful.
  - Bumped version to 0.2.3 because of the new "--embed-stylesheet"
    option and its effect on the PEP template & writer.
  - Bumped version to 0.2.4 due to changes to the PEP template &
  - Bumped version to 0.2.5 to reflect changes to Reporter output.
  - Added ``TransformSpec`` class for new transform system.
  - Bumped version to 0.2.6 for API changes (renaming).
  - Bumped version to 0.2.7 for new ``docutils.core.publish_*``
    convenience functions.
  - Added ``Component.component_type`` attribute.
  - Bumped version to 0.2.8 because of the internal parser switch from
    plain lists to the docutils.statemachine.StringList objects.
  - Bumped version to 0.2.9 because of the frontend.py API changes.
  - Bumped version to 0.2.10 due to changes to the project layout
    (third-party modules removed from the "docutils" package), and
    signature changes in ``io.Input``/``io.Output``.
  - Changed version to 0.3.0 for release.

* docutils/core.py:

  - Made ``publish()`` a bit more convenient.
  - Generalized ``Publisher.set_io``.
  - Renamed ``publish()`` to ``publish_cmdline()``; rearranged its
    parameters; improved its docstring.
  - Added ``publish_file()`` and ``publish_string()``.
  - Factored ``Publisher.set_source()`` and ``.set_destination()``
    out of ``.set_io``.
  - Added support for "--dump-pseudo-xml", "--dump-settings", and
    "--dump-transforms" hidden options.
  - Added ``Publisher.apply_transforms()`` method.
  - Added ``Publisher.set_components()`` method; support for
    ``publish_*()`` conveninece functions.
  - Moved config file processing to docutils/frontend.py.
  - Added support for exit status ("exit_level" setting &
    ``enable_exit`` parameter for Publisher.publish() and convenience

* docutils/frontend.py:

  - Check for & exit on identical source & destination paths.
  - Fixed bug with absolute paths & "--config".
  - Set non-command-line defaults in ``OptionParser.__init__()``:
    ``_source`` & ``_destination``.
  - Distributed ``relative_path_settings`` to components; updated
    ``OptionParser.populate_from_components()`` to combine it all.
  - Require list of keys in ``make_paths_absolute`` (was implicit in
    global ``relative_path_settings``).
  - Added "--expose-internal-attribute", "--dump-pseudo-xml",
    "--dump-settings", and "--dump-transforms" hidden options.
  - Removed nasty internals-fiddling ``ConfigParser.get_section``
    code, replaced with correct code.
  - Added validation functionality for config files.
  - Added "--error-encoding" option/setting, "_disable_config"
    internal setting.
  - Added encoding validation; updated "--input-encoding" and
    "--output-encoding"; added "--error-encoding-error-handler" and
  - Moved config file processing from docutils/core.py.
  - Updated ``OptionParser.populate_from_components`` to handle new
    ``SettingsSpec.settings_defaults`` dict.
  - Added support for "-" => stdin/stdout.
  - Added "exit_level" setting ("--exit" option).

* docutils/io.py:

  - Split ``IO`` classes into subclasses of ``Input`` and ``Output``.
  - Added automatic closing to ``FileInput`` and ``FileOutput``.
  - Delayed opening of ``FileOutput`` file until ``write()`` called.
  - ``FileOutput.write()`` now returns the encoded output string.
  - Try to get path/stream name automatically in ``FileInput`` &
  - Added defaults for source & destination paths.
  - Allow for Unicode I/O with an explicit "unicode" encoding.
  - Added ``Output.encode()``.
  - Removed dependency on runtime settings; pass encoding directly.
  - Recognize Unicode strings in ``Input.decode()``.
  - Added support for output encoding error handlers.

* docutils/nodes.py:

  - Added "Invisible" element category class.
  - Changed ``Node.walk()`` & ``.walkabout()`` to permit more tree
    modification during a traversal.
  - Added element classes: ``line_block``, ``generated``, ``address``,
    ``sidebar``, ``rubric``, ``attribution``, ``admonition``,
    ``superscript``, ``subscript``, ``inline``
  - Added support for lists of nodes to ``Element.insert()``.
  - Fixed parent linking in ``Element.replace()``.
  - Added new abstract superclass ``FixedTextElement``; adds
    "xml:space" attribute.
  - Added support for "line" attribute of ``system_message`` nodes.
  - Added support for the observer pattern from ``utils.Reporter``.
    Added ``parse_messages`` and ``transform_messages`` attributes to
    ``document``, removed ``messages``.  Added ``note_parse_message``
    and ``note_transform_message`` methods.
  - Added support for improved diagnostics:

    - Added "document", "source", and "line" internal attributes to
      ``Node``, set by ``Node.setup_child()``.
    - Converted variations on ``node.parent = self`` to
    - Added ``document.current_source`` & ``.current_line``
      attributes, and ``.note_source`` observer method.
    - Changed "system_message" output to GNU-Tools format.

  - Added a "rawsource" attribute to the ``Text`` class, for text
    before backslash-escape resolution.
  - Support for new transform system.
  - Reworked ``pending`` element.
  - Fixed XML DOM bug (SF #660611).
  - Removed the ``interpeted`` element class and added
    ``title_reference``, ``abbreviation``, ``acronym``.
  - Made substitutions case-sensitive-but-forgiving; moved some code
    from the parser.
  - Fixed Unicode bug on element attributes (report: William Dode).

* docutils/optik.py: Removed from project; replaced with
  extras/optparse.py and extras/textwrap.py.  These will be installed
  only if they're not already present in the Python installation.

* docutils/roman.py: Moved to extras/roman.py; this will be installed
  only if it's not already present in the Python installation.

* docutils/statemachine.py:

  - Factored out ``State.add_initial_transitions()`` so it can be
  - Converted whitespace-specific "blank" and "indent" transitions
    from special-case code to ordinary transitions: removed
    ``StateMachineWS.check_line()`` & ``.check_whitespace()``, added
    ``StateWS.add_initial_transitions()`` method, ``ws_patterns`` &
    ``ws_initial_transitions`` attributes.
  - Removed ``State.match_transition()`` after merging it into
  - Added ``StateCorrection`` exception.
  - Added support for ``StateCorrection`` in ``StateMachine.run()``
    (moved ``TransitionCorrection`` support there too.)
  - Changed ``StateMachine.next_line()`` and ``.goto_line()`` to raise
    ``EOFError`` instead of ``IndexError``.
  - Added ``State.no_match`` method.
  - Added support for the Observer pattern, triggered by input line
  - Added ``strip_top`` parameter to
  - Made ``context`` a parameter to ``StateMachine.run()``.
  - Added ``ViewList`` & ``StringList`` classes;
    ``extract_indented()`` becomes ``StringList.get_indented()``.
  - Added ``StateMachine.insert_input()``.
  - Fixed ViewList slice handling for Python 2.3.  Patch from (and
    thanks to) Fred Drake.

* docutils/utils.py:

  - Added a ``source`` attribute to Reporter instances and
    ``system_message`` elements.
  - Added an observer pattern to ``utils.Reporter`` to keep track of
    system messages.
  - Fixed bugs in ``relative_path()``.
  - Added support for improved diagnostics.
  - Moved ``normalize_name()`` to nodes.py (``fully_normalize_name``).
  - Added support for encoding Reporter stderr output, and encoding
    error handlers.
  - Reporter keeps track of the highest level system message yet

* docutils/languages: Fixed bibliographic field language lookups.

* docutils/languages/es.py: Added to project; Spanish mappings by
  Marcelo Huerta San Martin.

* docutils/languages/fr.py: Added to project; French mappings by
  Stefane Fermigier.

* docutils/languages/it.py: Added to project; Italian mappings by
  Nicola Larosa.

* docutils/languages/sk.py: Added to project; Slovak mappings by
  Miroslav Vasko.

* docutils/parser/__init__.py:

  - Added ``Parser.finish_parse()`` method.

* docutils/parser/rst/__init__.py:

  - Added options: "--pep-references", "--rfc-references",
    "--tab-width", "--trim-footnote-reference-space".

* docutils/parsers/rst/states.py:

  - Changed "title under/overline too short" system messages from INFO
    to WARNING, and fixed its insertion location.
  - Fixed enumerated list item parsing to allow paragraphs & section
    titles to begin with enumerators.
  - Converted system messages to use the new "line" attribute.
  - Fixed a substitution reference edge case.
  - Added support for "--pep-references" and "--rfc-references"
    options; reworked ``Inliner`` code to make customization easier.
  - Removed field argument parsing.
  - Added support for short section title over/underlines.
  - Fixed "simple reference name" regexp to ignore text like
    "object.__method__"; not an anonymous reference.
  - Added support for improved diagnostics.
  - Reworked directive API, based on Dethe Elza's contribution.  Added
    ``Body.parse_directive()``, ``.parse_directive_options()``,
    ``.parse_directive_arguments()`` methods.
  - Added ``ExtensionOptions`` class, to parse directive options
    without parsing field bodies.  Factored
    ``Body.parse_field_body()`` out of ``Body.field()``, overridden in
  - Improved definition list term/classifier parsing.
  - Added warnings for unknown directives.
  - Renamed ``Stuff`` to ``Struct``.
  - Now flagged as errors: transitions at the beginning or end of
    sections, empty sections (except title), and empty documents.
  - Updated for ``statemachine.StringList``.
  - Enabled recognition of schemeless email addresses in targets.
  - Added support for embedded URIs in hyperlink references.
  - Added backslash-escapes to inline markup end-string suffix.
  - Added support for correct interpreted text processing.
  - Fixed nested title parsing (topic, sidebar directives).
  - Added special processing of backslash-escaped whitespace (idea
    from David Abrahams).
  - Made substitutions case-sensitive-but-forgiving; moved some code
    to ``docutils.nodes``.
  - Added support for block quote attributions.
  - Added a kludge to work-around a conflict between the bubble-up
    parser strategy and short titles (<= 3 char-long over- &
    underlines).  Fixes SF bug #738803 "infinite loop with multiple
    titles" submitted by Jason Diamond.
  - Added explicit interpreted text roles for standard inline markup:
    "emphasis", "strong", "literal".
  - Implemented "superscript" and "subscript" interpreted text roles.
  - Added initial support for "abbreviation" and "acronym" roles;
  - Added support for "--trim-footnote-reference-space" option.
  - Optional space before colons in directives & hyperlink targets.

* docutils/parsers/rst/tableparser.py:

  - Fixed a bug that was producing unwanted empty rows in "simple"
  - Detect bad column spans in "simple" tables.

* docutils/parsers/rst/directives: Updated all directive functions to
  new API.

* docutils/parsers/rst/directives/__init__.py:

  - Added ``flag()``, ``unchanged()``, ``path()``,
    ``nonnegative_int()``, ``choice()``, and ``class_option()``
    directive option helper functions.
  - Added warnings for unknown directives.
  - Return ``None`` for missing directives.
  - Added ``register_directive()``, thanks to William Dode and Paul

* docutils/parsers/rst/directives/admonitions.py:

  - Added "admonition" directive.

* docutils/parsers/rst/directives/body.py: Added to project.  Contains
  the "topic", "sidebar" (from Patrick O'Brien), "line-block",
  "parsed-literal", "rubric", "epigraph", "highlights" and
  "pull-quote" directives.

* docutils/parsers/rst/directives/images.py:

  - Added an "align" attribute to the "image" & "figure" directives
    (by Adam Chodorowski).
  - Added "class" option to "image", and "figclass" to "figure".

* docutils/parsers/rst/directives/misc.py:

  - Added "include", "raw", and "replace" directives, courtesy of
    Dethe Elza.
  - Added "unicode" and "class" directives.

* docutils/parsers/rst/directives/parts.py:

  - Added the "sectnum" directive; by Dmitry Jemerov.
  - Added "class" option to "contents" directive.

* docutils/parsers/rst/directives/references.py: Added to project.
  Contains the "target-notes" directive.

* docutils/parsers/rst/languages/__init__.py:

  - Return ``None`` from get_language() for missing language modules.

* docutils/parsers/rst/languages/de.py: Added to project; German
  mappings by Engelbert Gruber.

* docutils/parsers/rst/languages/en.py:

  - Added interpreted text roles mapping.

* docutils/parsers/rst/languages/es.py: Added to project; Spanish
  mappings by Marcelo Huerta San Martin.

* docutils/parsers/rst/languages/fr.py: Added to project; French
  mappings by William Dode.

* docutils/parsers/rst/languages/it.py: Added to project; Italian
  mappings by Nicola Larosa.

* docutils/parsers/rst/languages/sk.py: Added to project; Slovak
  mappings by Miroslav Vasko.

* docutils/readers/__init__.py:

  - Added support for the observer pattern from ``utils.Reporter``, in
    ``Reader.parse`` and ``Reader.transform``.
  - Removed ``Reader.transform()`` method.
  - Added default parameter values to ``Reader.__init__()`` to make
    instantiation easier.
  - Removed bogus aliases: "restructuredtext" is *not* a Reader.

* docutils/readers/pep.py:

  - Added the ``peps.TargetNotes`` transform to the Reader.
  - Removed PEP & RFC reference detection code; moved to
    parsers/rst/states.py as options (enabled here by default).
  - Added support for pre-acceptance PEPs (no PEP number yet).
  - Moved ``Inliner`` & made it a class attribute of ``Reader`` for
    easy subclassing.

* docutils/readers/python: Python Source Reader subpackage added to
  project, including preliminary versions of:

  - __init__.py
  - moduleparser.py: Parser for Python modules.

* docutils/transforms/__init__.py:

  - Added ``Transformer`` class and completed transform reform.
  - Added unknown_reference_resolvers list for each transformer. This list holds
    the list of functions provided by each component of the transformer that
    help resolve references.

* docutils/transforms/frontmatter.py:

  - Improved support for generic fields.
  - Fixed bibliographic field language lookups.

* docutils/transforms/misc.py: Added to project.  Miscellaneous

* docutils/transforms/parts.py:

  - Moved the "id" attribute from TOC list items to the references
  - Added the ``SectNum`` transform; by Dmitry Jemerov.
  - Added "class" attribute support to ``Contents``.

* docutils/transforms/peps.py:

  - Added ``mask_email()`` function, updating to pep2html.py's
  - Linked "Content-Type: text/x-rst" to PEP 12.
  - Added the ``TargetNotes`` PEP-specific transform.
  - Added ``TargetNotes.cleanup_callback``.
  - Added title check to ``Headers``.

* docutils/transforms/references.py:

  - Added the ``TargetNotes`` generic transform.
  - Split ``Hyperlinks`` into multiple transforms.
  - Fixed bug with multiply-indirect references (report: Bruce Smith).
  - Added check for circular indirect references.
  - Made substitutions case-sensitive-but-forgiving.

* docutils/transforms/universal.py:

  - Added support for the "--expose-internal-attributes" option.
  - Removed ``Pending`` transform classes & data.

* docutils/writers/__init__.py:

  - Removed ``Writer.transform()`` method.

* docutils/writers/docutils-xml.py:

  - Added XML and doctype declarations.
  - Added "--no-doctype" and "--no-xml-declaration" options.

* docutils/writers/html4css1.py:

  - "name" attributes only on these tags: a, applet, form, frame,
    iframe, img, map.
  - Added "name" attribute to <a> in section titles for Netscape 4
    support (bug report: Pearu Peterson).
  - Fixed targets (names) on footnote, citation, topic title,
    problematic, and system_message nodes (for Netscape 4).
  - Changed field names from "<td>" to "<th>".
  - Added "@" to "&#64;" encoding to thwart address harvesters.
  - Improved the vertical whitespace optimization; ignore "invisible"
    nodes (targets, comments, etc.).
  - Improved inline literals with ``<span class="pre">`` around chunks
    of text and ``&nbsp;`` for runs of spaces.
  - Improved modularity of output; added ``self.body_pre_docinfo`` and
    ``self.docinfo`` segments.
  - Added support for "line_block", "address" elements.
  - Improved backlinks (footnotes & system_messages).
  - Improved system_message output.
  - Redefined "--stylesheet" as containing an invariant URL, used
    verbatim.  Added "--stylesheet-path", interpreted w.r.t. the
    working directory.
  - Added "--footnote-references" option (superscript or brackets).
  - Added "--compact-lists" and "--no-compact-lists" options.
  - Added "--embed-stylesheet" and "--link-stylesheet" options;
    factored out ``HTMLTranslator.get_stylesheet_reference()``.
  - Improved field list rendering.
  - Added Docutils version to "generator" meta tag.
  - Fixed a bug with images; they must be inline, so wrapped in <p>.
  - Improved layout of <pre> HTML source.
  - Fixed attribute typo on <colspec>.
  - Refined XML prologue.
  - Support for no stylesheet.
  - Removed "interpreted" element support.
  - Added support for "title_reference", "sidebar", "attribution",
    "rubric", and generic "admonition" elements.
  - Added "--attribution" option.
  - Added support for "inline", "subscript", "superscript" elements.
  - Added initial support for "abbreviation" and "acronym";

* docutils/writers/latex2e.py: LaTeX Writer, added by Engelbert Gruber
  (from the sandbox).

  - Added french.
  - Double quotes in literal blocks (special treatment for de/ngerman).
  - Added '--hyperlink-color' option ('0' turns off coloring of links).
  - Added  "--attribution" option.
  - Right align attributions.

* docutils/writers/pep_html.py:

  - Parameterized output encoding in PEP template.
  - Reworked substitutions from ``locals()`` into ``subs`` dict.
  - Redefined "--pep-stylesheet" as containing an invariant URL, used
    verbatim.  Added "--pep-stylesheet-path", interpreted w.r.t. the
    working directory.
  - Added an override on the "--footnote-references" option.
  - Factored out ``HTMLTranslator.get_stylesheet_reference()``.
  - Added Docutils version to "generator" meta tag.
  - Added a "DO NOT EDIT THIS FILE" comment to generated HTML.

* docs/tools.txt:

  - Added a "silent" setting for ``buildhtml.py``.
  - Added a "Getting Help" section.
  - Rearranged the structure.
  - Kept up to date, with new settings, command-line options etc.
  - Added section for ``rst2latex.py`` (Engelbert Gruber).
  - Converted settings table into a definition list.

* docs/rst/quickstart.txt:

  - Added a table of contents.
  - Added feedback information.
  - Added mention of minimum section title underline lengths.
  - Removed the 4-character minimum for section title underlines.

* docs/rst/quickref.html:

  - Added a "Getting Help" section.
  - Added a style to make section title backlinks more subtle.
  - Added mention of minimum section title underline lengths.
  - Removed the 4-character minimum for section title underlines.

* extras: Directory added to project; contains third-party modules
  that Docutils depends on (optparse, textwrap, roman).  These are
  only installed if they're not already present.

* licenses: Directory added to project; contains copies of license
  files for non-public-domain files.

* spec/doctree.txt:

  - Changed the focus.  It's about DTD elements:  structural
    relationships, semantics, and external (public) attributes.  Not
    about the element class library.
  - Moved some implementation-specific stuff into ``docutils.nodes``
  - Wrote descriptions of all common attributes and parameter
    entities.  Filled in introductory material.
  - Working through the element descriptions: 55 down, 37 to go.
  - Removed "Representation of Horizontal Rules" to

* spec/docutils.dtd:

  - Added "generated" inline element.
  - Added "line_block" body element.
  - Added "auto" attribute to "title".
  - Changed content models of "literal_block" and "doctest_block" to
  - Added ``%number;`` attribute type parameter entity.
  - Changed ``%structural.elements;`` to ``%section.elements``.
  - Updated attribute types; made more specific.
  - Added "address" bibliographic element.
  - Added "line" attribute to ``system_message`` element.
  - Removed "field_argument" element; "field_name" may contain
    multiple words and whitespace.
  - Changed public identifier to docutils.sf.net.
  - Removed "interpreted" element; added "title_reference",
    "abbreviation", "acronym".
  - Removed "refuri" attribute from "footnote_reference" and
  - Added "sidebar", "rubric", "attribution", "admonition",
    "superscript", "subscript", and "inline" elements.

* spec/pep-0256.txt: Converted to reStructuredText & updated.

* spec/pep-0257.txt: Converted to reStructuredText & updated.

* spec/pep-0258.txt: Converted to reStructuredText & updated.

* spec/semantics.txt: Updated with text from a Doc-SIG response to
  Dallas Mahrt.

* spec/transforms.txt: Added to project.

* spec/howto: Added subdirectory, for developer how-to docs.

* spec/howto/rst-directives.txt: Added to project.  Original by Dethe
  Elza, edited & extended by David Goodger.

* spec/howto/i18n.txt: Docutils Internationalization.  Added to

* spec/rst/alternatives.txt:

  - Added "Doctree Representation of Transitions" from
  - Updated "Inline External Targets" & closed the debate.
  - Added ideas for interpreted text syntax extensions.
  - Added "Nested Inline Markup" section.

* spec/rst/directives.txt:

  - Added directives: "topic", "sectnum", "target-notes",
    "line-block", "parsed-literal", "include", "replace", "sidebar",
    "admonition", "rubric", "epigraph", "highlights", "unicode" and
  - Formalized descriptions of directive details.
  - Added an "align" attribute to the "image" & "figure" directives
    (by Adam Chodorowski).
  - Added "class" options to "topic", "sidebar", "line-block",
    "parsed-literal", "contents", and "image"; and "figclass" to

* spec/rst/interpreted.txt: Added to project.  Descriptions of
  interpreted text roles.

* spec/rst/introduction.txt:

  - Added pointers to material for new users.

* spec/rst/reStructuredText.txt:

  - Disambiguated comments (just add a newline after the "::").
  - Updated enumerated list description; added a discussion of the
    second-line validity checking.
  - Updated directive description.
  - Added a note redirecting newbies to the user docs.
  - Expanded description of inline markup start-strings in non-markup
  - Removed field arguments and made field lists a generic construct.
  - Removed the 4-character minimum for section title underlines.
  - Clarified term/classifier delimiter & inline markup ambiguity
    (definition lists).
  - Added "Embedded URIs".
  - Updated "Interpreted Text" section.
  - Added "Character-Level Inline Markup" section.

* test: Continually adding & updating tests.

  - Moved test/test_rst/ to test/test_parsers/test_rst/.
  - Moved test/test_pep/ to test/test_readers/test_pep/.
  - Added test/test_readers/test_python/.
  - Added test/test_writers/ (Engelbert Gruber).

* tools:

  - Made the ``locale.setlocale()`` calls in front ends

* tools/buildhtml.py:

  - Added "--silent" option.
  - Fixed bug with absolute paths & "--config".
  - Updated for new I/O classes.
  - Added some exception handling.
  - Separated publishers' setting defaults; prevents interference.
  - Updated for new ``publish_file()`` convenience function.

* tools/pep-html-template:

  - Allow for "--embed-stylesheet".
  - Added Docutils version to "generator" meta tag.
  - Added a "DO NOT EDIT THIS FILE" comment to generated HTML.
  - Conform to XHTML spec.

* tools/pep2html.py:

  - Made ``argv`` a parameter to ``main()``.
  - Added support for "Content-Type:" header & arbitrary PEP formats.
  - Linked "Content-Type: text/plain" to PEP 9.
  - Files skipped (due to an error) are not pushed onto the server.
  - Updated for new I/O classes.
  - Added ``check_requirements()`` & ``pep_type_error()``.
  - Added some exception handling.
  - Updated for new ``publish_string()`` convenience function.
  - Added a "DO NOT EDIT THIS FILE" comment to generated HTML.

* tools/quicktest.py:

  - Added "-V"/"--version" option.

* tools/rst2latex.py: LaTeX front end, added by Engelbert Gruber.

* tools/unicode2rstsubs.py: Added to project.  Produces character
  entity files (reSructuredText substitutions) from the MathML master
  unicode.xml file.

* tools/editors: Support code for editors, added to project.  Contains

* tools/stylesheets/default.css: Moved into the stylesheets directory.

  - Added style for chunks of inline literals.
  - Removed margin for first child of table cells.
  - Right-aligned field list names.
  - Support for auto-numbered section titles in TOCs.
  - Increased the size of inline literals (<tt>) in titles.
  - Restored the light gray background for inline literals.
  - Added support for "line_block" elements.
  - Added style for "address" elements.
  - Removed "a.footnote-reference" style; doing it with ``<sup>`` now.
  - Improved field list rendering.
  - Vertical whitespace improvements.
  - Removed "a.target" style.

* tools/stylesheets/pep.css:

  - Fixed nested section margins.
  - Other changes parallel those of ``../default.css``.

Release 0.2 (2002-07-31)


- The word "component" was being used ambiguously.  From now on,
  "component" will be used to mean "Docutils component", as in Reader,
  Writer, Parser, or Transform.  Portions of documents (Table of
  Contents, sections, etc.)  will be called "document parts".
- Did a grand renaming: a lot of ``verylongnames`` became
- Cleaned up imports: no more relative package imports or
  comma-separated lists of top-level modules.
- Added support for an option values object which carries default
  settings and overrides (from command-line options and library use).
- Added internal Unicode support, and support for both input and
  output encodings.
- Added support for the ``docutils.io.IO`` class & subclasses.


* docutils/__init__.py:

  - Added ``ApplicationError`` and ``DataError``, for use throughout
    the package.
  - Added ``Component`` base class for Docutils components; implements
    the ``supports`` method.
  - Added ``__version__`` (thus, ``docutils.__version__``).

* docutils/core.py:

  - Removed many keyword parameters to ``Publisher.__init__()`` and
    ``publish()``; bundled into an option values object.  Added
    "argv", "usage", "description", and "option_spec" parameters for
    command-line support.
  - Added ``Publisher.process_command_line()`` and ``.set_options()``
  - Reworked I/O model for ``docutils.io`` wrappers.
  - Updated ``Publisher.set_options()``; now returns option values
  - Added support for configuration files (/etc/docutils.conf,
    ./docutils.conf, ~/.docutils).
  - Added ``Publisher.setup_option_parser()``.
  - Added default usage message and description.

* docutils/frontend.py: Added to project; support for front-end
  (command-line) scripts.  Option specifications may be augmented by
  components.  Requires Optik (http://optik.sf.net/) for option
  processing (installed locally as docutils/optik.py).

* docutils/io.py: Added to project; uniform API for a variety of input
  output mechanisms.

* docutils/nodes.py:

  - Added ``TreeCopyVisitor`` class.
  - Added a ``copy`` method to ``Node`` and subclasses.
  - Added a ``SkipDeparture`` exception for visitors.
  - Renamed ``TreePruningException`` from ``VisitorException``.
  - Added docstrings to ``TreePruningException``, subclasses, and
  - Improved docstrings.
  - Added ``SparseNodeVisitor``, refined ``NodeVisitor``.
  - Moved ``utils.id()`` to ``nodes.make_id()`` to avoid circular
  - Added ``decoration``, ``header``, and ``footer`` node classes, and
    ``PreDecorative`` mixin.
  - Reworked the name/id bookkeeping; to ``document``, removed
    ``explicit_targets`` and ``implicit_targets`` attributes, added
    ``nametypes`` attribute and ``set_name_id_map`` method.
  - Added ``NodeFound`` exception, for use with ``NodeVisitor``
  - Added ``document.has_name()`` method.
  - Fixed DOM generation for list-attributes.
  - Added category class ``Labeled`` (used by footnotes & citations).
  - Added ``Element.set_class()`` method (sets "class" attribute).

* docutils/optik.py: Added to project.  Combined from the Optik
  package, with added option groups and other modifications.  The use
  of this module is probably only temporary.

* docutils/statemachine.py:

  - Added ``runtime_init`` method to ``StateMachine`` and ``State``.
  - Added underscores to improve many awkward names.
  - In ``string2lines()``, changed whitespace normalizing translation
    table to regexp; restores Python 2.0 compatibility with Unicode.

* docutils/urischemes.py:

  - Filled in some descriptions.
  - Added "shttp" scheme.

* docutils/utils.py:

  - Added ``clean_rcs_keywords`` function (moved from
  - Added underscores to improve many awkward names.
  - Changed names of Reporter's thresholds:
    warning_level -> report_level; error_level -> halt_level.
  - Moved ``utils.id()`` to ``nodes.make_id()``.
  - Added ``relative_path(source, target)``.

* docutils/languages/de.py: German mappings; added to project.  Thanks
  to Gunnar Schwant for the translations.

* docutils/languages/en.py: Added "Dedication" bibliographic field

* docutils/languages/sv.py: Swedish mappings; added to project by Adam

* docutils/parsers/rst/states.py:

  - Added underscores to improve many awkward names.
  - Added RFC-2822 header support.
  - Extracted the inline parsing code from ``RSTState`` to a separate
    class, ``Inliner``, which will allow easy subclassing.
  - Made local bindings for ``memo`` container & often-used contents
    (reduces code complexity a lot).  See ``RSTState.runtime_init()``.
  - ``RSTState.parent`` replaces ``RSTState.statemachine.node``.
  - Added ``MarkupMismatch`` exception; for late corrections.
  - Added ``-/:`` characters to inline markup's start string prefix,
    ``/`` to end string suffix.
  - Fixed a footnote bug.
  - Fixed a bug with literal blocks.
  - Applied patch from Simon Budig: simplified regexps with symbolic
    names, removed ``Inliner.groups`` and ``Body.explicit.groups``.
  - Converted regexps from ``'%s' % var`` to ``'%(var)s' % locals()``.
  - Fixed a bug in ``Inliner.interpreted_or_phrase_ref()``.
  - Allowed non-ASCII in "simple names" (directive names, field names,
    references, etc.).
  - Converted ``Inliner.patterns.initial`` to be dynamically built
    from parts with ``build_regexp()`` function.
  - Changed ``Inliner.inline_target`` to ``.inline_internal_target``.
  - Updated docstrings.
  - Changed "table" to "grid_table"; added "simple_table" support.

* docutils/parsers/rst/tableparser.py:

  - Changed ``TableParser`` to ``GridTableParser``.
  - Added ``SimpleTableParser``.
  - Refactored naming.

* docutils/parsers/rst/directives/__init__.py: Added "en" (English) as
  a fallback language for directive names.

* docutils/parsers/rst/directives/html.py: Changed the ``meta``
  directive to use a ``pending`` element, used only by HTML writers.

* docutils/parsers/rst/directives/parts.py: Renamed from

  - Added "backlinks" attribute to "contents" directive.

* docutils/parsers/rst/languages/sv.py: Swedish mappings; added to
  project by Adam Chodorowski.

* docutils/readers/__init__.py: Gave Readers more control over
  choosing and instantiating Parsers.

* docutils/readers/pep.py: Added to project; for PEP processing.

* docutils/transforms/__init__.py: ``Transform.__init__()`` now
  requires a ``component`` parameter.

* docutils/transforms/components.py: Added to project; transforms
  related to Docutils components.

* docutils/transforms/frontmatter.py:

  - In ``DocInfo.extract_authors``, check for a single "author" in an
    "authors" group, and convert it to a single "author" element.
  - Added support for "Dedication" and generic bibliographic fields.

* docutils/transforms/peps.py: Added to project; PEP-specific.

* docutils/transforms/parts.py: Renamed from old components.py.

  - Added filter for `Contents`, to use alt-text for inline images,
    and to remove inline markup that doesn't make sense in the ToC.
  - Added "name" attribute to TOC topic depending on its title.
  - Added support for optional TOC backlinks.

* docutils/transforms/references.py: Fixed indirect target resolution
  in ``Hyperlinks`` transform.

* docutils/transforms/universal.py:

  - Changed ``Messages`` transform to properly filter out system
    messages below the warning threshold.
  - Added ``Decorations`` transform (support for ``--generator``,
    ``--date``, ``--time``, ``--source-link`` options).

* docutils/writers/__init__.py: Added "pdf" alias in anticipation of
  Engelbert Gruber's PDF writer.

* docutils/writers/html4css1.py:

  - Made XHTML-compatible (switched to lowercase element & attribute
    names; empty tag format).
  - Escape double-dashes in comment text.
  - Improved boilerplate & modularity of output.
  - Exposed modular output in Writer class.
  - Added a "generator" meta tag to <head>.
  - Added support for the ``--stylesheet`` option.
  - Added support for ``decoration``, ``header``, and ``footer``
  - In ``HTMLTranslator.attval()``, changed whitespace normalizing
    translation table to regexp; restores Python 2.0 compatibility
    with Unicode.
  - Added the translator class as instance variable to the Writer, to
    make it easily subclassable.
  - Improved option list spacing (thanks to Richard Jones).
  - Modified field list output.
  - Added backlinks to footnotes & citations.
  - Added percentage widths to "<col>" tags (from colspec).
  - Option lists: "<code>" changed to "<kbd>", ``option_argument``
    "<span>" changed to "<var>".
  - Inline literals: "<code>" changed to "<tt>".
  - Many changes to optimize vertical space: compact simple lists etc.
  - Add a command-line options & directive attributes to control TOC
    and footnote/citation backlinks.
  - Added support for optional footnote/citation backlinks.
  - Added support for generic bibliographic fields.
  - Identify backrefs.
  - Relative URLs for stylesheet links.

* docutils/writers/pep_html.py: Added to project; HTML Writer for
  PEPs (subclass of ``html4css1.Writer``).

* docutils/writers/pseudoxml.py: Renamed from pprint.py.

* docutils/writers/docutils_xml.py: Added to project; trivial writer
  of the Docutils internal doctree in XML.

* docs/tools.txt: "Docutils Front-End Tools", added to project.

* spec/doctree.txt:

  - Changed the title to "The Docutils Document Tree".
  - Added "Hyperlink Bookkeeping" section.

* spec/docutils.dtd:

  - Added ``decoration``, ``header``, and ``footer`` elements.
  - Brought ``interpreted`` element in line with the parser: changed
    attribute "type" to "role", added "position".
  - Added support for generic bibliographic fields.

* spec/notes.txt: Continual updates.  Added "Project Policies".

* spec/pep-0256.txt:  Updated.  Added "Roadmap to the Doctring PEPs"

* spec/pep-0257.txt: Clarified prohibition of signature repetition.

* spec/pep-0258.txt: Updated.  Added text from pysource.txt and
  mailing list discussions.

* spec/pep-0287.txt:

  - Renamed to "reStructuredText Docstring Format".
  - Minor edits.
  - Reworked Q&A as an enumerated list.
  - Converted to reStructuredText format.

* spec/pysource.dtd:

  - Reworked structural elements, incorporating ideas from Tony Ibbs.

* spec/pysource.txt: Removed from project.  Moved much of its contents
  to pep-0258.txt.

* spec/rst/alternatives.txt:

  - Expanded auto-enumerated list idea; thanks to Fred Bremmer.
  - Added "Inline External Targets" section.

* spec/rst/directives.txt:

  - Added "backlinks" attribute to "contents" directive.

* spec/rst/problems.txt:

  - Updated the Enumerated List Markup discussion.
  - Added new alternative table markup syntaxes.

* spec/rst/reStructuredText.txt:

  - Clarified field list usage.
  - Updated enumerated list description.
  - Clarified purpose of directives.
  - Added ``-/:`` characters to inline markup's start string prefix,
    ``/`` to end string suffix.
  - Updated "Authors" bibliographic field behavior.
  - Changed "inline hyperlink targets" to "inline internal targets".
  - Added "simple table" syntax to supplement the existing but
    newly-renamed "grid tables".
  - Added cautions for anonymous hyperlink use.
  - Added "Dedication" and generic bibliographic fields.

* test: Made test modules standalone (subdirectories became packages).

* test/DocutilsTestSupport.py:

  - Added support for PEP extensions to reStructuredText.
  - Added support for simple tables.
  - Refactored naming.

* test/package_unittest.py: Renamed from UnitTestFolder.py.

  - Now supports true packages containing test modules
    (``__init__.py`` files required); fixes duplicate module name bug.

* test/test_pep/: Subpackage added to project; PEP testing.

* test/test_rst/test_SimpleTableParser.py: Added to project.

* tools:

  - Updated html.py and publish.py front-end tools to use the new
    command-line processing facilities of ``docutils.frontend``
    (exposed in ``docutils.core.Publisher``), reducing each to just a
    few lines of code.
  - Added ``locale.setlocale()`` calls to front-end tools.

* tools/buildhtml.py: Added to project; batch-generates .html from all
  the .txt files in directories and subdirectories.

* tools/default.css:

  - Added support for ``header`` and ``footer`` elements.
  - Added styles for "Dedication" topics (biblio fields).

* tools/docutils.conf: A configuration file; added to project.

* tools/docutils-xml.py: Added to project.

* tools/pep.py: Added to project; PEP to HTML front-end tool.

* tools/pep-html-template: Added to project.

* tools/pep2html.py: Added to project from Python (nondist/peps).
  Added support for Docutils (reStructuredText PEPs).

* tools/quicktest.py:

  - Added the ``--attributes`` option, hacked a bit.
  - Added a second command-line argument (output file); cleaned up.

* tools/stylesheets/: Subdirectory added to project.

* tools/stylesheets/pep.css: Added to project; stylesheet for PEPs.

Release 0.1 (2002-04-20)

This is the first release of Docutils, merged from the now inactive
reStructuredText__ and `Docstring Processing System`__ projects.  For
the pre-Docutils history, see the `reStructuredText HISTORY`__ and the
`DPS HISTORY`__ files.

__ http://structuredtext.sourceforge.net/
__ http://docstring.sourceforge.net/
__ http://structuredtext.sourceforge.net/HISTORY.html
__ http://docstring.sourceforge.net/HISTORY.html

General changes: renamed 'dps' package to 'docutils'; renamed
'restructuredtext' subpackage to 'rst'; merged the codebases; merged
the test suites (reStructuredText's test/test_states renamed to
test/test_rst); and all modifications required to make it all work.

* docutils/parsers/rst/states.py:

  - Improved diagnostic system messages for missing blank lines.
  - Fixed substitution_reference bug.

   Local Variables:
   mode: indented-text
   indent-tabs-mode: nil
   sentence-end-double-space: t
   fill-column: 70

=== Added File Zope/lib/python/docutils/PKG-INFO ===
Metadata-Version: 1.0
Name: docutils
Version: 0.3.7
Summary: Docutils -- Python Documentation Utilities
Home-page: http://docutils.sourceforge.net/
Author: David Goodger
Author-email: goodger at users.sourceforge.net
License: public domain, Python, BSD, GPL (see COPYING.txt)
Description: Docutils is a modular system for processing documentation
        into useful formats, such as HTML, XML, and LaTeX.  For
        input Docutils supports reStructuredText, an easy-to-read,
        what-you-see-is-what-you-get plaintext markup syntax.
Platform: OS-independent
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Other Audience
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: Public Domain
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: License :: OSI Approved :: BSD License
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing
Classifier: Natural Language :: English
Classifier: Natural Language :: Afrikaans
Classifier: Natural Language :: Esperanto
Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Italian
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovak
Classifier: Natural Language :: Spanish
Classifier: Natural Language :: Swedish

=== Added File Zope/lib/python/docutils/README.txt ===
 README: Docutils

:Author: David Goodger
:Contact: goodger at users.sourceforge.net
:Date: $Date: 2005/01/07 15:11:43 $
:Web site: http://docutils.sourceforge.net/
:Copyright: This document has been placed in the public domain.

.. contents::

Thank you for downloading the Python Docutils project archive.  As
this is a work in progress, please check the project website for
updated working files (snapshots).  This project should be considered
highly experimental; APIs are subject to change at any time.


This is for those who want to get up & running quickly.  Read on for
complete details.

1. Get and install the latest release of Python, available from


   Python 2.2 or later [1]_ is required; Python 2.2.2 or later is

2. Use the latest Docutils code.  Get the code from CVS or from the


   See `Releases & Snapshots`_ below for details.

3. Unpack the tarball in a temporary directory (**not** directly in
   Python's ``site-packages``) and install with the standard ::

       python setup.py install

   See Installation_ below for details.

4. Use a front-end tool from the "tools" subdirectory of the same
   directory as in step 3.  For example::

       cd tools
       ./rst2html.py ../FAQ.txt ../FAQ.html        (Unix)
       python rst2html.py ..\FAQ.txt ..\FAQ.html   (Windows)

   See Usage_ below for details.


The purpose of the Docutils project is to create a set of tools for
processing plaintext documentation into useful formats, such as HTML,
XML, and TeX.  Support for the following sources has been implemented:

* Standalone files.

* `PEPs (Python Enhancement Proposals)`_.

Support for the following sources is planned:

* Inline documentation from Python modules and packages, extracted
  with namespace context.  **This is the focus of the current
  development effort.**

* Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).

* Wikis, with global reference lookups of "wiki links".

* Compound documents, such as multiple chapter files merged into a

* And others as discovered.

.. _PEPs (Python Enhancement Proposals):

Releases & Snapshots

Putting together an official "Release" of Docutils is a significant
effort, so it isn't done that often.  In the meantime, the CVS
snapshots always contain the latest code and documentation, usually
updated within an hour of changes being committed to the repository,
and usually bug-free:

* Snapshot of Docutils code, documentation, front-end tools, and
  tests: http://docutils.sf.net/docutils-snapshot.tgz

* Snapshot of the Sandbox (experimental, contributed code):

* Snapshot of web files (the files that generate the web site):

To keep up to date on the latest developments, download fresh copies
of the snapshots regularly.  New functionality is being added weekly,
sometimes daily.  (There's also the CVS repository, and a mailing list
for CVS messages.  See the web site [address above] or
docs/dev/policies.txt for details.)


To run the code, Python 2.2 or later [1]_ must already be installed.
The latest release is recommended.  Python is available from

The `Python Imaging Library`, or PIL, is used for some image
manipulation operations if it is installed.

Docutils uses Greg Ward's Optik_/optparse option processing package.
It is included in the Docutils distribution.  Python 2.3 and later
come with optparse in the standard library; in this case, the Docutils
copy is not installed.

.. [1] Python 2.1 may be used providing the compiler package is
   installed.  The compiler package can be found in the Tools/
   directory of Python 2.1's source distribution.

.. _Python Imaging Library: http://www.pythonware.com/products/pil/
.. _Optik: http://optik.sourceforge.net/

Project Files & Directories

* README.txt: You're reading it.

* COPYING.txt: Public Domain Dedication and copyright details for
  non-public-domain files (most are PD).

* FAQ.txt: Docutils Frequently Asked Questions.

* HISTORY.txt: Release notes for the current and previous project

* setup.py: Installation script.  See "Installation" below.

* install.py: Quick & dirty installation script.  Just run it.  For
  any kind of customization or help though, setup.py must be used.

* docutils: The project source directory, installed as a Python

* extras: Directory for third-party modules that Docutils depends on.
  These are only installed if they're not already present.

* docs: The project documentation directory.  Read ``docs/index.txt``
  for an overview, which is especially interesting for developers.

* docs/user: The project user documentation directory.  Contains the
  following documents, among others:

  - docs/user/tools.txt: Docutils Front-End Tools
  - docs/user/latex.txt: Docutils LaTeX Writer
  - docs/user/rst/quickstart.txt: A ReStructuredText Primer
  - docs/user/rst/quickref.html: Quick reStructuredText (HTML only)

* docs/ref: The project reference directory.
  ``docs/ref/rst/restructuredtext.txt`` is the reStructuredText

* licenses: Directory containing copies of license files for
  non-public-domain files.

* tools: Directory for Docutils front-end tools.  See
  ``docs/user/tools.txt`` for documentation.

* test: Unit tests.  Not required to use the software, but very useful
  if you're planning to modify it.  See `Running the Test Suite`_


The first step is to expand the ``.tar.gz`` or ``.tgz`` archive in a
temporary directory (**not** directly in Python's ``site-packages``).
It contains a distutils setup file "setup.py".  OS-specific
installation instructions follow.

GNU/Linux, BSDs, Unix, Mac OS X, etc.

1. Open a shell.

2. Go to the directory created by expanding the archive::

       cd <archive_directory_path>

3. Install the package::

       python setup.py install

   If the python executable isn't on your path, you'll have to specify
   the complete path, such as /usr/local/bin/python.  You may need
   root permissions to complete this step.

You can also just run install.py; it does the same thing.


1. Open a DOS box (Command Shell, MSDOS Prompt, or whatever they're
   calling it these days).

2. Go to the directory created by expanding the archive::

       cd <archive_directory_path>

3. Install the package::

       <path_to_python.exe>\python setup.py install

If your system is set up to run Python when you double-click on .py
files, you can run install.py to do the same as the above.

Mac OS 8/9

1. Open the folder containing the expanded archive.

2. Double-click on the file "setup.py", which should be a "Python
   module" file.

   If the file isn't a "Python module", the line endings are probably
   also wrong, and you will need to set up your system to recognize
   ".py" file extensions as Python files.  See
   http://gotools.sourceforge.net/mac/python.html for detailed
   instructions.  Once set up, it's easiest to start over by expanding
   the archive again.

3. The distutils options window will appear.  From the "Command" popup
   list choose "install", click "Add", then click "OK".

If install.py is a "Python module" (see step 2 above if it isn't), you
can run it (double-click) instead of the above.  The distutils options
window will not appear.


After unpacking and installing the Docutils package, the following
shell commands will generate HTML for all included documentation::

    cd <archive_directory_path>/tools
    ./buildhtml.py ../

On Windows systems, type::

    cd <archive_directory_path>\tools
    python buildhtml.py ..

The final directory name of the ``<archive_directory_path>`` is
"docutils" for snapshots.  For official releases, the directory may be
called "docutils-X.Y.Z", where "X.Y.Z" is the release version.

    cd <archive_directory_path>
    tools/buildhtml.py --config=tools/docutils.conf          (Unix)
    python tools\buildhtml.py --config=tools\docutils.conf   (Windows)

Some files may generate system messages (warnings and errors).  The
``docs/user/rst/demo.txt`` file (under the archive directory) contains
5 intentional errors.  (They test the error reporting mechanism!)

There are many front-end tools in the unpacked "tools" subdirectory.
You may want to begin with the "rst2html.py" front-end tool.  Most
tools take up to two arguments, the source path and destination path,
with STDIN and STDOUT being the defaults.  Use the "--help" option to
the front-end tools for details on options and arguments.  See
Docutils Front-End Tools (``docs/user/tools.txt``) for full documentation.

The package modules are continually growing and evolving.  The
``docutils.statemachine`` module is usable independently.  It contains
extensive inline documentation (in reStructuredText format of course).

Contributions are welcome!

Running the Test Suite

To run the entire test suite, after installation_ open a shell and use
the following commands::

    cd <archive_directory_path>/test

Under Windows, type::

    cd <archive_directory_path>\test
    python alltests.py

You should see a long line of periods, one for each test, and then a
summary like this::

    Ran 518 tests in 24.653s

    Elapsed time: 26.189 seconds

The number of tests will grow over time, and the times reported will
depend on the computer running the tests.  The difference between the
two times represents the time required to set up the tests (import
modules, create data structures, etc.).

If any of the tests fail, please `open a bug report`_ or `send email`_
[2]_.  Please include all relevant output, information about your
operating system, Python version, and Docutils version.  To see the
Docutils version, use these commands in the shell::

    cd ../tools
    ./quicktest.py --version

Windows users type these commands::

    cd ..\tools
    python quicktest.py --version

.. _open a bug report:
.. _send email: mailto:docutils-users at lists.sourceforge.net

Getting Help

If you have questions or need assistance with Docutils or
reStructuredText, please `post a message`_ to the `Docutils-Users
mailing list`_ [2]_.

.. [2] Due to overwhelming amounts of spam, the
   docutils-users at lists.sourceforge.net mailing list has been set up
   for subscriber posting only.  Non-subscribers who post to
   docutils-users will receive a message with "Subject: Your message
   to Docutils-users awaits moderator approval".  Legitimate messages
   are accepted and posted as soon as possible (a list administrator
   must verify the message manually).  If you'd like to subscribe to
   docutils-users, please visit

.. _post a message: mailto:docutils-users at lists.sourceforge.net
.. _Docutils-Users mailing list:

   Local Variables:
   mode: indented-text
   indent-tabs-mode: nil
   sentence-end-double-space: t
   fill-column: 70

=== Added File Zope/lib/python/docutils/THANKS.txt ===

:Author: David Goodger
:Contact: goodger at python.org
:Date: $Date: 2005/01/07 15:11:43 $
:Revision: $Revision: $
:Copyright: This document has been placed in the public domain.

I would like to acknowledge the people who have made a direct impact
on the Docutils project, knowingly or not, in terms of encouragement,
suggestions, criticism, bug reports, code contributions, cash
donations, tasty treats, and related projects:

* Aahz
* David Abrahams
* David Ascher
* Heiko Baumann
* Eric Bellot
* Ian Bicking
* Marek Blaha
* Martin Blais
* Stephen Boulet
* Fred Bremmer
* Simon Budig
* Bill Bumgarner
* Brett Cannon
* Greg Chapman
* Nicolas Chauveau
* Beni Cherniavsky
* Adam Chodorowski
* Brent Cook
* Laura Creighton
* Artur de Sousa Rocha
* Stephan Deibel & `Wing IDE <http://wingide.com/>`__
* Jason Diamond
* William Dode
* Fred Drake
* Reggie Dugard
* Dethe Elza
* Marcus Ertl
* Benja Fallenstein
* fantasai
* Stefane Fermigier
* Jim Fulton
* Peter Funk
* Lele Gaifax
* Dinu C. Gherman
* Matt Gilbert
* Jorge Gonzalez
* Engelbert Gruber
* Jacob Hallen
* Simon Hefti
* Doug Hellmann
* Marc Herbert
* Juergen Hermann
* Jannie Hofmeyr
* Steve Holden
* Michael Hudson
* Marcelo Huerta San Martin
* Ludger Humbert
* Jeremy Hylton
* Tony Ibbs
* Alan Jaffray
* Joe YS Jaw
* Dmitry Jemerov
* Richard Jones
* Andreas Jung
* Garth Kidd
* Axel Kollmorgen
* Jeff Kowalczyk
* Dave Kuhlman
* Lloyd Kvam
* Kirill Lapshin
* Nicola Larosa
* Daniel Larsson
* Marc-Andre Lemburg
* Julien Letessier
* Wolfgang Lipp
* Edward Loper
* Dallas Mahrt
* Ken Manheimer
* Bob Marshall
* Mark McEahern
* Vincent McIntyre
* John F Meinel Jr
* Skip Montanaro
* Paul Moore
* Nigel W. Moriarty
* Mark Nodine
* Patrick K. O'Brien
* Michel Pelletier
* Sam Penrose
* Tim Peters
* Pearu Peterson
* Mark Pilgrim
* Brett g Porter
* David Priest
* Jens Quade
* Andy Robinson
* Tavis Rudd
* Tracy Ruggles
* Oliver Rutherfurd
* Luc Saffre
* Kenichi Sato
* Ueli Schlaepfer
* Gunnar Schwant
* Bill Sconce
* Frank Siebenlist
* Bruce Smith
* Asko Soukka
* Darek Suchojad
* Roman Suzi
* Janet Swisher
* tav
* Kent Tenney
* Bob Tolbert
* Paul Tremblay
* Laurence Tratt
* Adrian van den Dries
* Guido van Rossum
* Miroslav Vasko
* Paul Viren
* Martin von Loewis
* Greg Ward
* Barry Warsaw
* Edward Welbourne
* Felix Wiemann
* Ka-Ping Yee
* Moshe Zadka

Thank you!

Special thanks to `SourceForge <http://sourceforge.net>`__ and the
`Python Software Foundation <http://www.python.org/psf/>`__.

Hopefully I haven't forgotten anyone or misspelled any names;
apologies (and please let me know!) if I have.

More information about the Zope-Checkins mailing list