docutils  0.18.1
About: Docutils is a text processing system for processing plaintext documentation into useful formats, such as HTML or LaTeX.
  Fossies Dox: docutils-0.18.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

docutils Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies docutils-0.18.1.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).
 README: Docutils 0.18.1

:Author: David Goodger
:Date: $Date: 2021-11-23 18:44:14 +0100 (Di, 23. Nov 2021) $
:Web site:
:Copyright: This document has been placed in the public domain.

.. contents::


This is for those who want to get up & running quickly.

1. Docutils requires Python, available from

   See Requirements_ below for details.

2. Install the latest stable release from PyPi with pip_::

       python -m pip install docutils

   To install a pre-relase, append the option ``--pre``.
   To install a `development version`_, follow the instructions in
   section `Installation`_ below.

3. Use the `front-end scripts`_ to convert reStructuredText documents.
   Try for example:: FAQ.txt FAQ.html         (Unix)
       python tools/ FAQ.txt FAQ.html  (Windows)

   See Usage_ below for details.

.. _pip:


The purpose of the Docutils project is to create a set of tools for
processing plaintext documentation into useful formats, such as HTML,
LaTeX, troff (man pages), OpenOffice, and native XML.  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.

* 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):


To run the code, Python_ must be installed.

* Docutils 0.16 and later supports Python 2.7 and 3.5+ natively.  [#2to3]_
* Docutils 0.14 dropped Python 2.4, 2.5, 3.1 and 3.2 support.
* Docutils 0.10 dropped Python 2.3 support.
* From version 0.6, Docutils is compatible with Python 3. [#2to3]_
* For Docutils 0.5, Python 2.2.1+ is required.
* Up to Docutils 0.4, Python 2.1 is required.

.. [#2to3] Up to version 0.15, the Docutils codebase was translated
   "on-demand" using the 2to3 tool.


Docutils uses the following packages for enhanced functionality, if they
are installed:

* Installation_ is usually done with pip_ or setuptools_.

* The `Python Imaging Library`_, or PIL, is used for some image
  manipulation operations.

* The `Pygments`_ package provides syntax highlight of "code" directives
  and roles.

* The `recommonmark`_ parser is used to parse input in Markdown format.

The `Docutils Link List <docs/user/links.html>`__ records projects that
users of Docutils and reStructuredText may find useful.

.. _Python:
.. _Python Imaging Library:
.. _Pygments:
.. _setuptools:
.. _recommonmark:

Development version

While we are trying to follow a "release early & often" policy,
features are added frequently.  Since the code in the repository_
is usually in a bug-free state, we recommend using a current snapshot
or a working copy.

To get a _`snapshot`, go to the code page and click the download snapshot

* Docutils code, documentation, front-end tools, and tests:

* Sandbox (experimental, contributed code):

To keep up to date on the latest developments, download fresh copies of the
snapshots regularly or use a `working copy of the Docutils code repository`__.

Continue with the `Installation`_ instructions below.

.. _repository: docs/dev/repository.html
__ docs/dev/repository.html#checking-out-the-repository


Steps to install Docutils from source:

* Go to the directory containing the file ````.

  A snapshot_ must be unpacked in a temporary directory (**not** directly in
  Python's ``site-packages``) first.

* Run `` install``. [#setup-requires-setuptools]_
  On Windows systems it may be sufficient to double-click ````.

.. [#setup-requires-setuptools] ```` requires the `setuptools`_
   package. For a manual install see the options in `Setting up for Docutils

   __ docs/dev/policies.html#setting-up-for-docutils-development

Optional steps:

* `running the test suite`_

* `converting the documentation`_

OS-specific installation instructions follow.

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

1. Open a shell.

2. Go to the directory containing ````::

       cd <archive_directory_path>

3. Install the package (you may need root permissions to complete this

       (enter admin password)
       python install

   If the python executable isn't on your path, you'll have to specify
   the complete path, such as ``/usr/local/bin/python``.

   To install for a specific Python version, use this version in the
   setup call, e.g. ::

       python3.7 install

   To install for different Python versions, repeat stepĀ 3 for every
   required version. The last installed version will be used in the
   `shebang line`_ of the ``rst2*.py`` wrapper scripts.

   .. _shebang line:


Just double-click ````.  If this doesn't work, try the

1. Open a DOS Box (Command Shell, MS-DOS 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 install

   To install for a specific python version, specify the Python
   executable for this version.

   To install for different Python versions, repeat stepĀ 3 for every
   required version.


There are many front-end tools in the unpacked "tools" subdirectory.
Installation under Unix places copies in the PATH.
You may want to begin with the "" 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`_ 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!

.. _front-end scripts:
.. _Docutils Front-End Tools: docs/user/tools.html

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: Frequently Asked Questions (with answers!).

* RELEASE-NOTES.txt: Summary of the major changes in recent releases.

* HISTORY.txt: A detailed change log, for the current and all previous
  project releases.

* BUGS.txt: Known bugs, and how to report a bug.

* THANKS.txt: List of contributors.

* Installation script.  See "Installation" below.

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

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

* docs: The project documentation directory.  Read ``docs/index.txt``
  for an overview.

* 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`_

Converting the documentation

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

    cd <archive_directory_path>/tools
    ./ ../

On Windows systems, type::

    cd <archive_directory_path>\tools
    python ..

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/ --config=tools/docutils.conf          (Unix)
    python tools\ --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
five intentional errors.  (They test the error reporting mechanism!)

Running the Test Suite

The test suite is documented in `Docutils Testing`_ (docs/dev/testing.txt).

To run the entire test suite, open a shell and use the following

    cd <archive_directory_path>/test

Under Windows, type::

    cd <archive_directory_path>\test

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

    Ran 1111 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 an email`_
(see `Bugs <BUGS.html>`_).
Please include all relevant output, information about your operating
system, Python version, and Docutils version.  To see the Docutils
version, use one of the ``rst2*`` front ends or ``tools/``
with the ``--version`` option, e.g.::

    cd ../tools
    ./ --version

Windows users type these commands::

    cd ..\tools
    python --version

.. _Docutils Testing:
.. _open a bug report:
.. _send an email:
.. _web interface:

Getting Help

If you have questions or need assistance with Docutils or
reStructuredText, please post a message to the Docutils-users_ mailing

.. _Docutils-users: docs/user/mailing-lists.html#docutils-users

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