Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 52.14.165.32
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/docutils-doc/docs/dev/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/doc/docutils-doc/docs/dev/todo.html
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>Docutils To Do List</title>
<meta name="author" content="David Goodger (with input from many); open to all Docutils developers" />
<meta name="date" content="2012-12-12" />
<meta name="copyright" content="This document has been placed in the public domain." />
<link rel="stylesheet" href="../../css/html4css1.css" type="text/css" />
</head>
<body>
<div class="document" id="docutils-to-do-list">
<h1 class="title"><a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> To Do List</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>David Goodger (with input from many); open to all Docutils
developers</td></tr>
<tr><th class="docinfo-name">Contact:</th>
<td><a class="first last reference external" href="mailto:docutils-develop&#64;lists.sourceforge.net">docutils-develop&#64;lists.sourceforge.net</a></td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>2012-12-12</td></tr>
<tr><th class="docinfo-name">Revision:</th>
<td>7545</td></tr>
<tr><th class="docinfo-name">Copyright:</th>
<td>This document has been placed in the public domain.</td></tr>
</tbody>
</table>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#minimum-requirements-for-python-standard-library-candidacy" id="id17">Minimum Requirements for Python Standard Library Candidacy</a></li>
<li><a class="reference internal" href="#general" id="id18">General</a><ul>
<li><a class="reference internal" href="#object-numbering-and-object-references" id="id19">object numbering and object references</a></li>
</ul>
</li>
<li><a class="reference internal" href="#documentation" id="id20">Documentation</a><ul>
<li><a class="reference internal" href="#user-docs" id="id21">User Docs</a></li>
<li><a class="reference internal" href="#developer-docs" id="id22">Developer Docs</a></li>
<li><a class="reference internal" href="#how-tos" id="id23">How-Tos</a></li>
<li><a class="reference internal" href="#peps" id="id24">PEPs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#python-source-reader" id="id25">Python Source Reader</a></li>
<li><a class="reference internal" href="#restructuredtext-parser" id="id26">reStructuredText Parser</a><ul>
<li><a class="reference internal" href="#misc" id="id27">Misc</a></li>
<li><a class="reference internal" href="#math-markup" id="id28">Math Markup</a><ul>
<li><a class="reference internal" href="#alternative-input-formats" id="id29">alternative input formats</a></li>
<li><a class="reference internal" href="#latex-output" id="id30">LaTeX output</a></li>
<li><a class="reference internal" href="#html-output" id="id31">HTML output</a></li>
<li><a class="reference internal" href="#openoffice-output" id="id32">OpenOffice output</a></li>
</ul>
</li>
<li><a class="reference internal" href="#directives" id="id33">Directives</a></li>
<li><a class="reference internal" href="#interpreted-text" id="id34">Interpreted Text</a></li>
<li><a class="reference internal" href="#doctree-pruning" id="id35">Doctree pruning</a></li>
</ul>
</li>
<li><a class="reference internal" href="#unimplemented-transforms" id="id36">Unimplemented Transforms</a></li>
<li><a class="reference internal" href="#html-writer" id="id37">HTML Writer</a></li>
<li><a class="reference internal" href="#pep-html-writer" id="id38">PEP/HTML Writer</a></li>
<li><a class="reference internal" href="#s5-html-writer" id="id39">S5/HTML Writer</a></li>
<li><a class="reference internal" href="#epub-html-writer" id="id40">Epub/HTML Writer</a></li>
<li><a class="reference internal" href="#latex-writer" id="id41">LaTeX writer</a><ul>
<li><a class="reference internal" href="#bug-fixes" id="id42">Bug fixes</a></li>
<li><a class="reference internal" href="#generate-clean-and-configurable-latex-source" id="id43">Generate clean and configurable LaTeX source</a><ul>
<li><a class="reference internal" href="#configurable-placement-of-figure-and-table-floats" id="id44">Configurable placement of figure and table floats</a></li>
<li><a class="reference internal" href="#latex-constructs-and-packages-instead-of-re-implementations" id="id45">LaTeX constructs and packages instead of re-implementations</a></li>
</ul>
</li>
<li><a class="reference internal" href="#default-layout" id="id46">Default layout</a><ul>
<li><a class="reference internal" href="#tables" id="id47">Tables</a></li>
<li><a class="reference internal" href="#image-and-figure-directives" id="id48">Image and figure directives</a></li>
</ul>
</li>
<li><a class="reference internal" href="#missing-features" id="id49">Missing features</a><ul>
<li><a class="reference internal" href="#unicode-to-latex" id="id50">Unicode to LaTeX</a></li>
<li><a class="reference internal" href="#allow-choice-between-utf8-standard-and-utf8x-extended-encodings" id="id51">Allow choice between utf8 (standard) and utf8x (extended) encodings</a></li>
<li><a class="reference internal" href="#xetex-writer" id="id52">XeTeX writer</a></li>
<li><a class="reference internal" href="#problematic-urls" id="id53">problematic URLs</a></li>
<li><a class="reference internal" href="#add-stylesheet-option" id="id54">add-stylesheet option</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#front-end-tools" id="id55">Front-End Tools</a></li>
</ul>
</div>
<p>Priority items are marked with &quot;&#64;&quot; symbols.  The more &#64;s, the higher
the priority.  Items in question form (containing &quot;?&quot;) are ideas which
require more thought and debate; they are potential to-do's.</p>
<p>Many of these items are awaiting champions.  If you see something
you'd like to tackle, please do!  If there's something you'd like to
see done but are unable to implement it yourself, please consider
donating to Docutils: <a class="reference external" href="http://sourceforge.net/donate/index.php?group_id=38414">Support the Docutils project!</a></p>
<p>Please see also the <a class="reference external" href="../../BUGS.html">Bugs</a> document for a list of bugs in Docutils.</p>
<div class="section" id="minimum-requirements-for-python-standard-library-candidacy">
<h1><a class="toc-backref" href="#id17">Minimum Requirements for Python Standard Library Candidacy</a></h1>
<p>Below are action items that must be added and issues that must be
addressed before Docutils can be considered suitable to be proposed
for inclusion in the Python standard library.</p>
<p>Many of these are now handled by <a class="reference external" href="http://sphinx.pocoo.org/">Sphinx</a></p>
<ul class="simple">
<li>Support for <a class="reference internal" href="#document-splitting">document splitting</a>.  May require some major code
rework.</li>
<li>Support for subdocuments (see <a class="reference internal" href="#large-documents">large documents</a>).</li>
<li><a class="reference internal" href="#object-numbering-and-object-references">Object numbering and object references</a>.</li>
<li><a class="reference internal" href="#nested-inline-markup">Nested inline markup</a>.</li>
<li><a class="reference internal" href="#python-source-reader">Python Source Reader</a>.</li>
<li>The HTML writer needs to be rewritten (or a second HTML writer
added) to allow for custom classes, and for arbitrary splitting
(stack-based?).</li>
<li><a class="reference internal" href="#documentation">Documentation</a> of the architecture.  Other docs too.</li>
<li>Plugin support.</li>
<li>Suitability for <a class="reference external" href="http://docutils.sf.net/sandbox/README.html#documenting-python">Python module documentation</a>.</li>
</ul>
</div>
<div class="section" id="general">
<h1><a class="toc-backref" href="#id18">General</a></h1>
<ul>
<li><p class="first">Encoding of command line arguments can only be guessed:</p>
<ul>
<li><p class="first">try UTF-8/strict first, then try the locale's encoding with
strict error handling, then ASCII/replace?</p>
<p>UTF-8 is almost 100% safe to try first; false positives are rare,
The locale's encoding with strict error handling may be a
reasonable compromise, but any error would indicate that the
locale's encoding is inappropriate.  The only safe fallback is
ASCII/replace.</p>
</li>
<li><p class="first">Do not decode argv before option parsing but individual string
values?</p>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">+1</span></kbd></td>
<td><p class="first last">Allows for separate command-line vs. filesystem encodings,
respectively to keep file names encoded.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">+1</span></kbd></td>
<td><p class="first last">Allows to configure command-line encoding in a config file,</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-1</span></kbd></td>
<td><p class="first last">More complicated.</p>
</td></tr>
</tbody>
</table>
</li>
</ul>
<p>Cf. &lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2890/focus=2957">http://thread.gmane.org/gmane.text.docutils.user/2890/focus=2957</a>&gt;.</p>
</li>
<li><p class="first">Improve handling on Windows:</p>
<ul class="simple">
<li>Get graphical installer.</li>
<li>Make rst2html.py an .exe file using py2exe.</li>
</ul>
</li>
<li><p id="gui">The user interface is very difficult to use for most Windows users;
you can't really expect them to use the command line.  We need some
kind of GUI that can launch rst2html.py, and save the HTML output to
a file, and launch a browser.  What's important is that we get
settings to work with the GUI.  So we need some way to dynamically
generate a list of settings for the GUI.  The current settings_spec
for OptionParser doesn't seem to be usable for this for the
following reasons:</p>
<ul class="simple">
<li>It's biased toward the command line -- there are <em>two</em> options for
one boolean setting.</li>
<li>You cannot have both a one-line description and a longer
description for tooltips/help-texts.</li>
<li>It doesn't provide hints for the input type.  You cannot easily
infer the type of a setting from its validator, because any
component can add new validators.  In fact, it may be necessary to
have both a hint about the input type (e.g. string) and a
validator (valid ID), or it may be necessary to have a different
set of choices for the CLI (1, INFO, 2, ...) and for the GUI
(INFO, WARNING, ...).</li>
<li>It's coupled to the OptionParser.  We want to be able to change
the underlying system without breaking everything.</li>
<li>It's a bunch of primitive structures.  We want an extensible (thus
object-oriented) interface.</li>
</ul>
<p>So we probably need to create a class for storing all the settings,
and auto-generate the OptionParser data from that.</p>
<p>I talked to Stephan Deibel about getting Docutils integrated into
Wing IDE.  He said it's possible, and he'd be willing to help.
There's a scripting interface to Wing, which we'd use.  We can
dynamically generate a list of preferences and not worry too much
about the rendering (from what I understood); Wing's whole GUI is
dynamic anyway.  The interface could be made usable for other GUIs.
For example, we could try to get option support for DocFactory.  //
FW</p>
</li>
<li><p class="first">Allow different report levels for STDERR and system_messages inside
the document?</p>
</li>
<li><p class="first">Change the docutils-update script (in sandbox/infrastructure), to
support arbitrary branch snapshots.</p>
</li>
<li><p class="first">Move some general-interest sandboxes out of individuals'
directories, into subprojects?</p>
</li>
<li><p class="first">Add option for file (and URL) access restriction to make Docutils
usable in Wikis and similar applications.</p>
<p>2005-03-21: added <tt class="docutils literal">file_insertion_enabled</tt> &amp; <tt class="docutils literal">raw_enabled</tt>
settings.  These partially solve the problem, allowing or disabling
<strong>all</strong> file accesses, but not limited access.</p>
</li>
<li><p class="first">Configuration file handling needs discussion:</p>
<ul class="simple">
<li>There should be some error checking on the contents of config
files.  How much checking should be done?  How loudly should
Docutils complain if it encounters an error/problem?</li>
<li>Docutils doesn't complain when it doesn't find a configuration
file supplied with the <tt class="docutils literal"><span class="pre">--config</span></tt> option.  Should it?  (If yes,
error or warning?)</li>
</ul>
</li>
<li><p class="first">Internationalization:</p>
<ul>
<li><p class="first">I18n needs refactoring, the language dictionaries are difficult to
maintain.  Maybe have a look at gettext or similar tools.</p>
<p>(This would make a nice Google Summer of Code project)</p>
</li>
<li><p class="first">Language modules: in accented languages it may be useful to have
both accented and unaccented entries in the
<tt class="docutils literal">bibliographic_fields</tt> mapping for versatility.</p>
</li>
<li><p class="first">Add a &quot;--strict-language&quot; option &amp; setting: no English fallback
for language-dependent features.</p>
<p>Make this the default for output (as opposed to input)?
Throw an error with a helpfull message, e.g.</p>
<blockquote>
<p>Default &quot;contents&quot; title for language %s missing, please specify
an explicit title.</p>
</blockquote>
<p>or</p>
<blockquote>
<p>&quot;attention&quot; title for language %s missing, please use a generic
admonition with explicit title.</p>
</blockquote>
</li>
<li><p class="first">Add internationalization to <span class="target" id="footer-boilerplate-text">footer boilerplate text</span> (resulting
from &quot;--generator&quot;, &quot;--source-link&quot;, and &quot;--date&quot; etc.), allowing
translations.</p>
</li>
</ul>
</li>
<li><p class="first">Add validation?  See <a class="reference external" href="http://pytrex.sourceforge.net">http://pytrex.sourceforge.net</a>, RELAX NG, pyRXP.</p>
</li>
<li><p class="first">In <tt class="docutils literal">docutils.readers.get_reader_class</tt> (&amp; <tt class="docutils literal">parsers</tt> &amp;
<tt class="docutils literal">writers</tt> too), should we be importing &quot;standalone&quot; or
&quot;docutils.readers.standalone&quot;?  (This would avoid importing
top-level modules if the module name is not in docutils/readers.
Potential nastiness.)</p>
</li>
<li><p class="first">Perhaps store a <span class="target" id="name-to-id-mapping-file">name-to-id mapping file</span>?  This could be stored
permanently, read by subsequent processing runs, and updated with
new entries.  (&quot;Persistent ID mapping&quot;?)</p>
</li>
<li><p class="first">Perhaps the <tt class="docutils literal">Component.supports</tt> method should deal with
individual features (&quot;meta&quot; etc.) instead of formats (&quot;html&quot; etc.)?</p>
</li>
<li><p class="first">Think about <span class="target" id="large-documents">large documents</span> made up of multiple subdocument
files.  Issues: continuity (<a class="reference internal" href="#persistent-sequences">persistent sequences</a> above),
cross-references (<a class="reference internal" href="#name-to-id-mapping-file">name-to-id mapping file</a> above and <a class="reference internal" href="#targets-in-other-documents">targets in
other documents</a> below), splitting (<a class="reference internal" href="#document-splitting">document splitting</a> below).</p>
<p>When writing a book, the author probably wants to split it up into
files, perhaps one per chapter (but perhaps even more detailed).
However, we'd like to be able to have references from one chapter to
another, and have continuous numbering (pages and chapters, as
applicable).  Of course, none of this is implemented yet.  There has
been some thought put into some aspects; see <a class="reference external" href="../ref/rst/directives.html#including-an-external-document-fragment">the &quot;include&quot;
directive</a> and the <a class="reference internal" href="#reference-merging">Reference Merging</a> transform below.</p>
<p>When I was working with SGML in Japan, we had a system where there
was a top-level coordinating file, book.sgml, which contained the
top-level structure of a book: the &lt;book&gt; element, containing the
book &lt;title&gt; and empty component elements (&lt;preface&gt;, &lt;chapter&gt;,
&lt;appendix&gt;, etc.), each with filename attributes pointing to the
actual source for the component.  Something like this:</p>
<pre class="literal-block">
&lt;book id=&quot;bk01&quot;&gt;
&lt;title&gt;Title of the Book&lt;/title&gt;
&lt;preface inrefid=&quot;pr01&quot;&gt;&lt;/preface&gt;
&lt;chapter inrefid=&quot;ch01&quot;&gt;&lt;/chapter&gt;
&lt;chapter inrefid=&quot;ch02&quot;&gt;&lt;/chapter&gt;
&lt;chapter inrefid=&quot;ch03&quot;&gt;&lt;/chapter&gt;
&lt;appendix inrefid=&quot;ap01&quot;&gt;&lt;/appendix&gt;
&lt;/book&gt;
</pre>
<p>(The &quot;inrefid&quot; attribute stood for &quot;insertion reference ID&quot;.)</p>
<p>The processing system would process each component separately, but
it would recognize and use the book file to coordinate chapter and
page numbering, and keep a persistent ID to (title, page number)
mapping database for cross-references.  Docutils could use a similar
system for large-scale, multipart documents.</p>
<p>Aahz's idea:</p>
<blockquote>
<p>First the ToC:</p>
<pre class="literal-block">
.. ToC-list::
    Introduction.txt
    Objects.txt
    Data.txt
    Control.txt
</pre>
<p>Then a sample use:</p>
<pre class="literal-block">
.. include:: ToC.txt

As I said earlier in chapter :chapter:`Objects.txt`, the
reference count gets increased every time a binding is made.
</pre>
<p>Which produces:</p>
<pre class="literal-block">
As I said earlier in chapter 2, the
reference count gets increased every time a binding is made.
</pre>
<p>The ToC in this form doesn't even need to be references to actual
reST documents; I'm simply doing it that way for a minimum of
future-proofing, in case I do want to add the ability to pick up
references within external chapters.</p>
</blockquote>
<p>Perhaps, instead of ToC (which would overload the &quot;contents&quot;
directive concept already in use), we could use &quot;manifest&quot;.  A
&quot;manifest&quot; directive might associate local reference names with
files:</p>
<pre class="literal-block">
.. manifest::
   intro: Introduction.txt
   objects: Objects.txt
   data: Data.txt
   control: Control.txt
</pre>
<p>Then the sample becomes:</p>
<pre class="literal-block">
.. include:: manifest.txt

As I said earlier in chapter :chapter:`objects`, the
reference count gets increased every time a binding is made.
</pre>
</li>
<li><p class="first">Add support for <span class="target" id="multiple-output-files">multiple output files</span> and <span class="target" id="generic-data-handling">generic data
handling</span>:</p>
<p>It should be possible for a component to <strong>emit or reference</strong> data
to be either <strong>included or referenced</strong> in the output document.
Examples of such data are stylesheets or images.</p>
<p>For this, we need a &quot;data&quot; object which stores the data either
inline or by referring to a file.  The Docutils framework is
responsible for either:</p>
<ul class="simple">
<li>storing the data in the appropriate location (e.g. in the
directory of the output file, or in a user-specified directory)
and providing the paths of the stored files to the writer, <em>or</em></li>
<li>providing the data itself to the writer so that it can be embedded
in the output document.</li>
</ul>
<p>This approach decouples data handling from the data source (which
can either be embedded or referenced) and the destination (which can
either be embedded or referenced as well).</p>
<p>See &lt;<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.devel/3631">http://article.gmane.org/gmane.text.docutils.devel/3631</a>&gt;.</p>
</li>
<li><p class="first">Add testing for Docutils' front end tools?</p>
</li>
<li><p class="first">Publisher: &quot;Ordinary setup&quot; shouldn't requre specific ordering; at
the very least, there ought to be error checking higher up in the
call chain.  [Aahz]</p>
<p><tt class="docutils literal">Publisher.get_settings</tt> requires that all components be set up
before it's called.  Perhaps the I/O <em>objects</em> shouldn't be set, but
I/O <em>classes</em>.  Then options are set up (<tt class="docutils literal">.set_options</tt>), and
<tt class="docutils literal">Publisher.set_io</tt> (or equivalent code) is called with source &amp;
destination paths, creating the I/O objects.</p>
<p>Perhaps I/O objects shouldn't be instantiated until required.  For
split output, the Writer may be called multiple times, once for each
doctree, and each doctree should have a separate Output object (with
a different path).  Is the &quot;Builder&quot; pattern applicable here?</p>
</li>
<li><p class="first">Perhaps I/O objects should become full-fledged components (i.e.
subclasses of <tt class="docutils literal">docutils.Component</tt>, as are Readers, Parsers, and
Writers now), and thus have associated option/setting specs and
transforms.</p>
</li>
<li><p class="first">Multiple file I/O suggestion from Michael Hudson: use a file-like
object or something you can iterate over to get file-like objects.</p>
</li>
<li><p class="first">Add an &quot;--input-language&quot; option &amp; setting?  Specify a different
language module for input (bibliographic fields, directives) than
for output.  The &quot;--language&quot; option would set both input &amp; output
languages.</p>
</li>
<li><p class="first">Auto-generate reference tables for language-dependent features?
Could be generated from the source modules.  A special command-line
option could be added to Docutils front ends to do this.  (Idea from
Engelbert Gruber.)</p>
</li>
<li><p class="first">Enable feedback of some kind from internal decisions, such as
reporting the successful input encoding.  Modify runtime settings?
System message?  Simple stderr output?</p>
</li>
<li><p class="first">Rationalize Writer settings (HTML/LaTeX/PEP) -- share settings.</p>
</li>
<li><p class="first">Add an &quot;--include file&quot; command-line option (config setting too?),
equivalent to &quot;.. include:: file&quot; as the first line of the doc text?
Especially useful for character entity sets, text transform specs,
boilerplate, etc.</p>
</li>
<li><p class="first">Parameterize the Reporter object or class?  See the <a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/1112">2004-02-18
&quot;rest checking and source path&quot;</a> thread.</p>
</li>
<li><p class="first">Add a &quot;disable_transforms&quot; setting?  And a dummy Writer subclass
that does nothing when its .write() method is called?  Would allow
for easy syntax checking.  See the <a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/1112">2004-02-18 &quot;rest checking and
source path&quot;</a> thread.</p>
</li>
<li><p class="first">Add a generic meta-stylesheet mechanism?  An external file could
associate style names (&quot;class&quot; attributes) with specific elements.
Could be generalized to arbitrary output attributes; useful for HTML
&amp; XMLs.  Aahz implemented something like this in
sandbox/aahz/Effective/EffMap.py.</p>
</li>
<li><p id="classes-for-table-cells">William Dode suggested that table cells be assigned &quot;class&quot;
attributes by columns, so that stylesheets can affect text
alignment.  Unfortunately, there doesn't seem to be a way (in HTML
at least) to leverage the &quot;colspec&quot; elements (HTML &quot;col&quot; tags) by
adding classes to them.  The resulting HTML is very verbose:</p>
<pre class="literal-block">
&lt;td class=&quot;col1&quot;&gt;111&lt;/td&gt;
&lt;td class=&quot;col2&quot;&gt;222&lt;/td&gt;
...
</pre>
<p>At the very least, it should be an option.  People who don't use it
shouldn't be penalized by increases in their HTML file sizes.</p>
<p>Table rows could also be assigned classes (like odd/even).  That
would be easier to implement.</p>
<p>How should it be implemented?</p>
<ul class="simple">
<li>There could be writer options (column classes &amp; row classes) with
standard values.</li>
<li>The table directive could grow some options.  Something like
&quot;:cell-classes: col1 col2 col3&quot; (either must match the number of
columns, or repeat to fill?)  and &quot;:row-classes: odd even&quot; (repeat
to fill; body rows only, or header rows too?).</li>
</ul>
<p>Probably per-table directive options are best.  The &quot;class&quot; values
could be used by any writer, and applying such classes to all tables
in a document with writer options is too broad.</p>
</li>
<li><p class="first">Add file-specific settings support to config files, like:</p>
<pre class="literal-block">
[file index.txt]
compact-lists: no
</pre>
<p>Is this even possible?  Should the criterion be the name of the
input file or the output file?  Alternative (more explicit) syntax:</p>
<pre class="literal-block">
[source_file index.txt]
...

[dest_file index.html]
...
</pre>
<p>Or rather allow settings configuration from the rst source file
(see <a class="reference internal" href="#misc-settings">misc.settings</a> directive)?</p>
</li>
<li><p class="first">The &quot;validator&quot; support added to OptionParser is very similar to
&quot;<a class="reference external" href="http://code.enthought.com/traits/">traits</a>&quot; in <a class="reference external" href="http://www.scipy.org/">SciPy</a>.  Perhaps something could be done with them?
(Had I known about traits when I was implementing docutils.frontend,
I may have used them instead of rolling my own.)</p>
</li>
<li><p class="first">tools/buildhtml.py: Extend the --prune option (&quot;prune&quot; config
setting) to accept file names (generic path) in addition to
directories (e.g. --prune=docs/user/rst/cheatsheet.txt, which should
<em>not</em> be converted to HTML).</p>
</li>
<li><p class="first">Add support for <span class="target" id="plugins">plugins</span>.</p>
</li>
<li><p class="first"><span class="target" id="config-directories">Config directories</span>: Currently, ~/.docutils, ./docutils.conf/, &amp;
/etc/docutils.conf are read as configuration files.  Proposal: allow
~/.docutils to be a a configuration <em>directory</em>, along with
/etc/docutils/ and ./docutils.conf/.  Within these directories,
check for config.txt files.  We can also have subdirectories here,
for plugins, S5 themes, components (readers/writers/parsers) etc.</p>
<p>Docutils will continue to support configuration files for backwards
compatibility.</p>
</li>
<li><p class="first">Add support for document decorations other than headers &amp; footers?
For example, top/bottom/side navigation bars for web pages.  Generic
decorations?</p>
<p>Seems like a bad idea as long as it isn't independent from the ouput
format (for example, navigation bars are only useful for web pages).</p>
</li>
<li><p class="first">docutils_update: Check for a <tt class="docutils literal">Makefile</tt> in a directory, and run
<tt class="docutils literal">make</tt> if found?  This would allow for variant processing on
specific source files, such as running rst2s5.py instead of
rst2html.py.</p>
</li>
<li><p class="first">Add a &quot;disable table of contents&quot; setting?  The S5 writer could set
it as a default.  Rationale:</p>
<blockquote>
<p>The <tt class="docutils literal">contents</tt> (table of contents) directive must not be used
[in S5/HTML documents].  It changes the CSS class of headings
and they won't show up correctly in the screen presentation.</p>
<p class="attribution">&mdash;<a class="reference external" href="../user/slide-shows.html">Easy Slide Shows With reStructuredText &amp; S5</a></p>
</blockquote>
<p>Analogue to the <tt class="docutils literal">sectnum_xform</tt> setting, it could be used by the
latex writer to switch to a LaTeX generated ToC (currently, the latex
writer calls it &quot;use_latex_toc&quot;).</p>
</li>
</ul>
<div class="section" id="object-numbering-and-object-references">
<h2><a class="toc-backref" href="#id19">object numbering and object references</a></h2>
<p>For equations, tables &amp; figures.</p>
<p>These would be the equivalent of DocBook's &quot;formal&quot; elements.</p>
<p>In LaTeX, automatic counters are implemented for sections, equations and
floats (figures, tables) (configurable via stylesheets or in the
latex-preamble). Objects can be given <a class="reference external" href="../ref/rst/restructuredtext.html#reference-names">reference names</a> with the
<tt class="docutils literal"><span class="pre">\label{&lt;refname}</span></tt> command, <tt class="docutils literal"><span class="pre">\ref{&lt;refname&gt;}</span></tt> inserts the
corresponding number.</p>
<p>No such mechanism exists in HTML.</p>
<ul>
<li><p class="first">We need <span class="target" id="persistent-sequences">persistent sequences</span>, similar to chapter and footnote
numbers. See <a class="reference external" href="http://xml.openoffice.org/">OpenOffice.org XML</a> &quot;fields&quot;.</p>
<ul class="simple">
<li>Should the sequences be automatic or manual (user-specifyable)?</li>
</ul>
</li>
<li><p class="first">It is already possible to give <a class="reference external" href="../ref/rst/restructuredtext.html#reference-names">reference names</a> to objects via
internal hyperlink targets or the &quot;name&quot; directive option:</p>
<pre class="literal-block">
.. _figure name:

.. figure:: image.png
</pre>
<p>or</p>
<pre class="literal-block">
.. figure:: image.png
   :name: figure name
</pre>
<p>Improve the mapping of &quot;phrase references&quot; to IDs/labels with
Literal transcription (i.e. ü -&gt; ue, ß -&gt; ss, å -&gt; aa) instead of just
stripping the accents and other non-ASCII chars.
Use <a class="reference external" href="http://pypi.python.org/pypi/Unidecode">http://pypi.python.org/pypi/Unidecode</a>?</p>
<p>A &quot;table&quot; directive has been implemented, supporting table titles.</p>
<p>Perhaps the name could derive from the title/caption?</p>
</li>
<li><p class="first">We need syntax for object references.  Cf. <a class="reference external" href="http://xml.openoffice.org/">OpenOffice.org XML</a>
&quot;reference fields&quot;:</p>
<ul>
<li><p class="first">Parameterized substitutions are too complicated
(cf. <cite>or not to do</cite>: <a class="reference external" href="rst/alternatives.html#object-references">object references</a>)</p>
</li>
<li><p class="first">An interpreted text approach is simpler and better:</p>
<pre class="literal-block">
See Figure :ref:`figure name` and Equation :ref:`eq:identity`.
</pre>
</li>
<li><p class="first">&quot;equation&quot;, &quot;figure&quot;, and &quot;page&quot; roles could generate appropriate
boilerplate text:</p>
<pre class="literal-block">
See :figure:`figure name` on :page:`figure name`.
</pre>
<p>See <a class="reference internal" href="#interpreted-text">Interpreted Text</a> below.</p>
<p>Reference boilerplate could be specified in the document
(defaulting to nothing):</p>
<pre class="literal-block">
.. fignum::
   :prefix-ref: &quot;Figure &quot;
   :prefix-caption: &quot;Fig. &quot;
   :suffix-caption: :
</pre>
<p>The position of the role (prefix or suffix) could also be utilized</p>
</li>
</ul>
</li>
</ul>
<p>See also the <a class="reference external" href="http://www.loria.fr/~rougier/coding/article/rst2html.py">Modified rst2html</a>
by Nicolas Rougier for a sample implementation.</p>
</div>
</div>
<div class="section" id="documentation">
<h1><a class="toc-backref" href="#id20">Documentation</a></h1>
<div class="section" id="user-docs">
<h2><a class="toc-backref" href="#id21">User Docs</a></h2>
<ul class="simple">
<li>Add a FAQ entry about using Docutils (with reStructuredText) on a
server and that it's terribly slow.  See the first paragraphs in
&lt;<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/1584">http://article.gmane.org/gmane.text.docutils.user/1584</a>&gt;.</li>
<li>Add document about what Docutils has previously been used for
(web/use-cases.txt?).</li>
<li>Improve index in docs/user/config.txt.</li>
</ul>
</div>
<div class="section" id="developer-docs">
<h2><a class="toc-backref" href="#id22">Developer Docs</a></h2>
<ul class="simple">
<li>Complete <a class="reference external" href="../api/runtime-settings.html">Docutils Runtime Settings</a>.</li>
<li>Improve the internal module documentation (docstrings in the code).
Specific deficiencies listed below.<ul>
<li>docutils.parsers.rst.states.State.build_table: data structure
required (including StringList).</li>
<li>docutils.parsers.rst.states: more complete documentation of parser
internals.</li>
</ul>
</li>
<li>docs/ref/doctree.txt: DTD element structural relationships,
semantics, and attributes.  In progress; element descriptions to be
completed.</li>
<li>Document the <tt class="docutils literal">pending</tt> elements, how they're generated and what
they do.</li>
<li>Document the transforms (perhaps in docstrings?): how they're used,
what they do, dependencies &amp; order considerations.</li>
<li>Document the HTML classes used by html4css1.py.</li>
<li>Write an overview of the Docutils architecture, as an introduction
for developers.  What connects to what, why, and how.  Either update
PEP 258 (see <a class="reference internal" href="#peps">PEPs</a> below) or as a separate doc.</li>
<li>Give information about unit tests.  Maybe as a howto?</li>
<li>Document the docutils.nodes APIs.</li>
<li>Complete the docs/api/publisher.txt docs.</li>
</ul>
</div>
<div class="section" id="how-tos">
<h2><a class="toc-backref" href="#id23">How-Tos</a></h2>
<ul class="simple">
<li>Creating Docutils Writers</li>
<li>Creating Docutils Readers</li>
<li>Creating Docutils Transforms</li>
<li>Creating Docutils Parsers</li>
<li>Using Docutils as a Library</li>
</ul>
</div>
<div class="section" id="peps">
<h2><a class="toc-backref" href="#id24">PEPs</a></h2>
<ul>
<li><p class="first">Complete PEP 258 Docutils Design Specification.</p>
<ul>
<li><p class="first">Fill in the blanks in API details.</p>
</li>
<li><p class="first">Specify the nodes.py internal data structure implementation?</p>
<blockquote>
<p>[Tibs:] Eventually we need to have direct documentation in
there on how it all hangs together - the DTD is not enough
(indeed, is it still meant to be correct?  [Yes, it is.
--DG]).</p>
</blockquote>
</li>
</ul>
</li>
<li><p class="first">Rework PEP 257, separating style from spec from tools, wrt Docutils?
See Doc-SIG from 2001-06-19/20.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="python-source-reader">
<h1><a class="toc-backref" href="#id25">Python Source Reader</a></h1>
<p>General:</p>
<ul class="simple">
<li>Analyze Tony Ibbs' PySource code.</li>
<li>Analyze Doug Hellmann's HappyDoc project.</li>
<li>Investigate how POD handles literate programming.</li>
<li>Take the best ideas and integrate them into Docutils.</li>
</ul>
<p>Miscellaneous ideas:</p>
<ul>
<li><p class="first">Ask Python-dev for opinions (GvR for a pronouncement) on special
variables (__author__, __version__, etc.): convenience vs. namespace
pollution.  Ask opinions on whether or not Docutils should recognize
&amp; use them.</p>
</li>
<li><p class="first">If we can detect that a comment block begins with <tt class="docutils literal">##</tt>, a la
JavaDoc, it might be useful to indicate interspersed section headers
&amp; explanatory text in a module.  For example:</p>
<pre class="literal-block">
&quot;&quot;&quot;Module docstring.&quot;&quot;&quot;

##
# Constants
# =========

a = 1
b = 2

##
# Exception Classes
# =================

class MyException(Exception): pass

# etc.
</pre>
</li>
<li><p class="first">Should standalone strings also become (module/class) docstrings?
Under what conditions?  We want to prevent arbitrary strings from
becomming docstrings of prior attribute assignments etc.  Assume
that there must be no blank lines between attributes and attribute
docstrings?  (Use lineno of NEWLINE token.)</p>
<p>Triple-quotes are sometimes used for multi-line comments (such as
commenting out blocks of code).  How to reconcile?</p>
</li>
<li><p class="first">HappyDoc's idea of using comment blocks when there's no docstring
may be useful to get around the conflict between <a class="reference external" href="../peps/pep-0258.html#additional-docstrings">additional
docstrings</a> and <tt class="docutils literal">from __future__ import</tt> for module docstrings.
A module could begin like this:</p>
<pre class="literal-block">
#!/usr/bin/env python
# :Author: Me
# :Copyright: whatever

&quot;&quot;&quot;This is the public module docstring (``__doc__``).&quot;&quot;&quot;

# More docs, in comments.
# All comments at the beginning of a module could be
# accumulated as docstrings.
# We can't have another docstring here, because of the
# ``__future__`` statement.

from __future__ import division
</pre>
<p>Using the JavaDoc convention of a doc-comment block beginning with
<tt class="docutils literal">##</tt> is useful though.  It allows doc-comments and implementation
comments.</p>
</li>
<li><p class="first">HappyDoc uses an initial comment block to set &quot;parser configuration
values&quot;.  Do the same thing for Docutils, to set runtime settings on
a per-module basis?  I.e.:</p>
<pre class="literal-block">
# Docutils:setting=value
</pre>
<p>Could be used to turn on/off function parameter comment recognition
&amp; other marginal features.  Could be used as a general mechanism to
augment config files and command-line options (but which takes
precedence?).</p>
</li>
<li><p class="first">Multi-file output should be divisible at arbitrary level.</p>
</li>
<li><p class="first">Support all forms of <tt class="docutils literal">import</tt> statements:</p>
<ul class="simple">
<li><tt class="docutils literal">import module</tt>: listed as &quot;module&quot;</li>
<li><tt class="docutils literal">import module as alias</tt>: &quot;alias (module)&quot;</li>
<li><tt class="docutils literal">from module import identifier</tt>: &quot;identifier (from module)&quot;</li>
<li><tt class="docutils literal">from module import identifier as alias</tt>: &quot;alias (identifier
from module)&quot;</li>
<li><tt class="docutils literal">from module import *</tt>: &quot;all identifiers (<tt class="docutils literal">*</tt>) from module&quot;</li>
</ul>
</li>
<li><p class="first">Have links to colorized Python source files from API docs?  And
vice-versa: backlinks from the colorized source files to the API
docs!</p>
</li>
<li><p class="first">In summaries, use the first <em>sentence</em> of a docstring if the first
line is not followed by a blank line.</p>
</li>
</ul>
</div>
<div class="section" id="restructuredtext-parser">
<h1><a class="toc-backref" href="#id26">reStructuredText Parser</a></h1>
<p>Also see the <a class="reference external" href="rst/alternatives.html#or-not-to-do">... Or Not To Do?</a> list.</p>
<div class="section" id="misc">
<h2><a class="toc-backref" href="#id27">Misc</a></h2>
<ul>
<li><p class="first">Allow embedded references and not only embedded URIs: <tt class="docutils literal">`link text
<span class="pre">&lt;reference_&gt;`_</span></tt>; see the second half of
&lt;<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.devel/3738">http://article.gmane.org/gmane.text.docutils.devel/3738</a>&gt;.</p>
</li>
<li><p class="first">Another list problem:</p>
<pre class="literal-block">
* foo
      * bar
      * baz
</pre>
<p>This ends up as a definition list.  This is more of a usability
issue.</p>
</li>
<li><p class="first">This case is probably meant to be a nested list, but it ends up as a
list inside a block-quote without an error message:</p>
<pre class="literal-block">
- foo

 - bar
</pre>
<p>It should probably just be an error.</p>
<p>The problem with this is that you don't notice easily in HTML that
it's not a nested list but a block-quote -- there's not much of a
visual difference.</p>
</li>
<li><p class="first">Treat enumerated lists that are not arabic and consist of only one
item in a single line as ordinary paragraphs.  See
&lt;<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/2635">http://article.gmane.org/gmane.text.docutils.user/2635</a>&gt;.</p>
</li>
<li><p class="first">The citation syntax could use some improvements.  See
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2499">http://thread.gmane.org/gmane.text.docutils.user/2499</a>&gt; (and the
sub-thread at
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2499/focus=3028">http://thread.gmane.org/gmane.text.docutils.user/2499/focus=3028</a>&gt;,
and the follow-ups at
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3087">http://thread.gmane.org/gmane.text.docutils.user/3087</a>&gt;,
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3110">http://thread.gmane.org/gmane.text.docutils.user/3110</a>&gt;,
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3114">http://thread.gmane.org/gmane.text.docutils.user/3114</a>&gt;),
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2443">http://thread.gmane.org/gmane.text.docutils.user/2443</a>&gt;,
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2715">http://thread.gmane.org/gmane.text.docutils.user/2715</a>&gt;,
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3027">http://thread.gmane.org/gmane.text.docutils.user/3027</a>&gt;,
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3120">http://thread.gmane.org/gmane.text.docutils.user/3120</a>&gt;,
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3253">http://thread.gmane.org/gmane.text.docutils.user/3253</a>&gt;.</p>
</li>
<li><p class="first">The current list-recognition logic has too many false positives, as
in</p>
<pre class="literal-block">
* Aorta
* V. cava superior
* V. cava inferior
</pre>
<p>Here <tt class="docutils literal">V.</tt> is recognized as an enumerator, which leads to
confusion.  We need to find a solution that resolves such problems
without complicating the spec to much.</p>
<p>See &lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2524">http://thread.gmane.org/gmane.text.docutils.user/2524</a>&gt;.</p>
</li>
<li><p class="first">Add indirect links via citation references &amp; footnote references.
Example:</p>
<pre class="literal-block">
`Goodger (2005)`_ is helpful.

.. _Goodger (2005): [goodger2005]_
.. [goodger2005] citation text
</pre>
<p>See &lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2499">http://thread.gmane.org/gmane.text.docutils.user/2499</a>&gt;.</p>
</li>
<li><p class="first">Complain about bad URI characters
(<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/2046">http://article.gmane.org/gmane.text.docutils.user/2046</a>) and
disallow internal whitespace
(<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/2214">http://article.gmane.org/gmane.text.docutils.user/2214</a>).</p>
</li>
<li><p class="first">Create <tt class="docutils literal">info</tt>-level system messages for unnecessarily
backslash-escaped characters (as in <tt class="docutils literal">&quot;\something&quot;</tt>, rendered as
&quot;something&quot;) to allow checking for errors which silently slipped
through.</p>
</li>
<li><p class="first">Add (functional) tests for untested roles.</p>
</li>
<li><p class="first">Add test for &quot;:figwidth: image&quot; option of &quot;figure&quot; directive.  (Test
code needs to check if PIL is available on the system.)</p>
</li>
<li><p class="first">Add support for CJK double-width whitespace (indentation) &amp;
punctuation characters (markup; e.g. double-width &quot;*&quot;, &quot;-&quot;, &quot;+&quot;)?</p>
</li>
<li><p class="first">Add motivation sections for constructs in spec.</p>
</li>
<li><p class="first">Support generic hyperlink references to <span class="target" id="targets-in-other-documents">targets in other
documents</span>?  Not in an HTML-centric way, though (it's trivial to say
<tt class="docutils literal"><span class="pre">http://www.example.com/doc#name</span></tt>, and useless in non-HTML
contexts).  XLink/XPointer?  <tt class="docutils literal">.. baseref::</tt>?  See Doc-SIG
2001-08-10.</p>
</li>
<li><p id="adaptable-file-extensions">In target URLs, it would be useful to not explicitly specify the
file extension.  If we're generating HTML, then &quot;.html&quot; is
appropriate; if PDF, then &quot;.pdf&quot;; etc.  How about using &quot;.*&quot; to
indicate &quot;choose the most appropriate filename extension&quot;?  For
example:</p>
<pre class="literal-block">
.. _Another Document: another.*
</pre>
<p>What is to be done for output formats that don't <em>have</em> hyperlinks?
For example, LaTeX targeted at print.  Hyperlinks may be &quot;called
out&quot;, as footnotes with explicit URLs.  (Don't convert the links.)</p>
<p>But then there's also LaTeX targeted at PDFs, which <em>can</em> have
links.  Perhaps a runtime setting for &quot;*&quot; could explicitly provide
the extension, defaulting to the output file's extension.</p>
<p>Should the system check for existing files?  No, not practical.</p>
<p>Handle documents only, or objects (images, etc.) also?</p>
<p>If this handles images also, how to differentiate between document
and image links?  Element context (within &quot;image&quot;)?  Which image
extension to use for which document format?  Again, a runtime
setting would suffice.</p>
<p>This may not be just a parser issue; it may need framework support.</p>
<p>Mailing list threads: <a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/1239">Images in both HTML and LaTeX</a> (especially
<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/1278">this summary of Lea's objections</a>), <a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/1915">more-universal links?</a>,
<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/2438">Output-format-sensitive link targets?</a></p>
<p>Idea from Jim Fulton: an external lookup table of targets:</p>
<blockquote>
<p>I would like to specify the extension (e.g. .txt) [in the
source, rather than <tt class="docutils literal">filename.*</tt>], but tell the converter to
change references to the files anticipating that the files will
be converted too.</p>
<p>For example:</p>
<pre class="literal-block">
.. _Another Document: another.txt

rst2html.py --convert-links &quot;another.txt bar.txt&quot; foo.txt
</pre>
<p>That is, name the files for which extensions should be converted.</p>
<p>Note that I want to refer to original files in the original text
(another.txt rather than another.txt) because I want the
unconverted text to stand on its own.</p>
<p>Note that in most cases, people will be able to use globs:</p>
<pre class="literal-block">
rst2html.py --convert-link-extensions-for &quot;`echo *.txt`&quot; foo.txt
</pre>
<p>It might be nice to be able to use multiple arguments, as in:</p>
<pre class="literal-block">
rst2html.py --convert-link-extensions-for *.txt -- foo.txt
</pre>
<pre class="literal-block">
&gt; What is to be done for output formats
&gt; that don't have hyperlinks?
</pre>
<p>Don't convert the links.</p>
<pre class="literal-block">
&gt; Handle documents only, or objects
&gt; (images, etc.) also?
</pre>
<p>No, documents only, but there really is no need for gueswork.
Just get the file names as command-line arguments.  EIBTI
[explicit is better than implicit].</p>
</blockquote>
<p>For images, we probably need separate solution (which is being
worked on), whereas for documents, the issue is basically
interlinking between reStructuredText documents.  IMO, this cries
for support for multiple input and output files, i.e. support for
documents which comprise multiple files.  Adding adaptable file
extensions seems like a kludge.  // FW</p>
</li>
<li><p class="first">Implement the header row separator modification to table.el.  (Wrote
to Takaaki Ota &amp; the table.el mailing list on 2001-08-12, suggesting
support for &quot;=====&quot; header rows.  On 2001-08-17 he replied, saying
he'd put it on his to-do list, but &quot;don't hold your breath&quot;.)</p>
</li>
<li><p class="first">Fix the parser's indentation handling to conform with the stricter
definition in the spec.  (Explicit markup blocks should be strict or
forgiving?)</p>
<!-- XXX What does this mean?  Can you elaborate, David? -->
</li>
<li><p class="first">Make the parser modular.  Allow syntax constructs to be added or
disabled at run-time.  Subclassing is probably not enough because it
makes it difficult to apply multiple extensions.</p>
</li>
<li><p class="first">Generalize the &quot;doctest block&quot; construct (which is overly
Python-centric) to other interactive sessions?  &quot;Doctest block&quot;
could be renamed to &quot;I/O block&quot; or &quot;interactive block&quot;, and each of
these could also be recognized as such by the parser:</p>
<ul>
<li><p class="first">Shell sessions:</p>
<pre class="literal-block">
$ cat example1.txt
A block beginning with a &quot;$ &quot; prompt is interpreted as a shell
session interactive block.  As with Doctest blocks, the
interactive block ends with the first blank line, and wouldn't
have to be indented.
</pre>
</li>
<li><p class="first">Root shell sessions:</p>
<pre class="literal-block">
# cat example2.txt
A block beginning with a &quot;# &quot; prompt is interpreted as a root
shell session (the user is or has to be logged in as root)
interactive block.  Again, the block ends with a blank line.
</pre>
</li>
</ul>
<p>Other standard (and unambiguous) interactive session prompts could
easily be added (such as &quot;&gt; &quot; for WinDOS).</p>
<p>Tony Ibbs spoke out against this idea (2002-06-14 Doc-SIG thread
&quot;docutils feedback&quot;).</p>
</li>
<li><p class="first">Add support for pragma (syntax-altering) directives.</p>
<p>Some pragma directives could be local-scope unless explicitly
specified as global/pragma using &quot;:global:&quot; options.</p>
</li>
<li><p class="first">Support whitespace in angle-bracketed standalone URLs according to
Appendix E (&quot;Recommendations for Delimiting URI in Context&quot;) of <a class="reference external" href="http://www.rfc-editor.org/rfc/rfc2396.txt">RFC
2396</a>.</p>
</li>
<li><p class="first">Use the vertical spacing of the source text to determine the
corresponding vertical spacing of the output?</p>
</li>
<li><p class="first">[From Mark Nodine]  For cells in simple tables that comprise a
single line, the justification can be inferred according to the
following rules:</p>
<ol class="arabic simple">
<li>If the text begins at the leftmost column of the cell,
then left justification, ELSE</li>
<li>If the text begins at the rightmost column of the cell,
then right justification, ELSE</li>
<li>Center justification.</li>
</ol>
<p>The onus is on the author to make the text unambiguous by adding
blank columns as necessary.  There should be a parser setting to
turn off justification-recognition (normally on would be fine).</p>
<p>Decimal justification?</p>
<p>All this shouldn't be done automatically.  Only when it's requested
by the user, e.g. with something like this:</p>
<pre class="literal-block">
.. table::
   :auto-indent:

   (Table goes here.)
</pre>
<p>Otherwise it will break existing documents.</p>
</li>
<li><p class="first">Generate a warning or info message for paragraphs which should have
been lists, like this one:</p>
<pre class="literal-block">
1. line one
3. line two
</pre>
</li>
<li><p class="first">Generalize the &quot;target-notes&quot; directive into a command-line option
somehow?  See docutils-develop 2003-02-13.</p>
</li>
<li><p class="first">Allow a &quot;::&quot;-only paragraph (first line, actually) to introduce a
<span class="target" id="literal-block-without-a-blank-line">literal block without a blank line</span>?  (Idea from Paul Moore.)</p>
<pre class="literal-block">
::
    This is a literal block
</pre>
<p>Is indentation enough to make the separation between a paragraph
which contains just a <tt class="docutils literal">::</tt> and the literal text unambiguous?
(There's one problem with this concession: If one wants a definition
list item which defines the term &quot;::&quot;, we'd have to escape it.)  It
would only be reasonable to apply it to &quot;::&quot;-only paragraphs though.
I think the blank line is visually necessary if there's text before
the &quot;::&quot;:</p>
<pre class="literal-block">
The text in this paragraph needs separation
from the literal block following::
    This doesn't look right.
</pre>
</li>
<li><p class="first">Add new syntax for <span class="target" id="nested-inline-markup">nested inline markup</span>?  Or extend the parser to
parse nested inline markup somehow?  See the <a class="reference external" href="rst/alternatives.html#nested-inline-markup">collected notes</a>.</p>
</li>
<li><p class="first">Drop the backticks from embedded URIs with omitted reference text?
Should the angle brackets be kept in the output or not?</p>
<pre class="literal-block">
&lt;file_name&gt;_
</pre>
<p>Probably not worth the trouble.</p>
</li>
<li><p class="first">How about a syntax for alternative hyperlink behavior, such as &quot;open
in a new window&quot; (as in HTML's <tt class="docutils literal">&lt;a <span class="pre">target=&quot;_blank&quot;&gt;</span></tt>)?</p>
<p>The MoinMoin wiki uses a caret (&quot;^&quot;) at the beginning of the URL
(&quot;^&quot; is not a legal URI character).  That could work for both inline
and explicit targets:</p>
<pre class="literal-block">
The `reference docs &lt;^url&gt;`__ may be handy.

.. _name: ^url
</pre>
<p>This may be too specific to HTML.  It hasn't been requested very
often either.</p>
</li>
<li><p class="first">Add an option to add URI schemes at runtime.</p>
</li>
<li><p class="first"><span class="target" id="segmented-lists">Segmented lists</span>:</p>
<pre class="literal-block">
: segment : segment : segment
: segment : segment : very long
  segment
: segment : segment : segment
</pre>
<p>The initial colon (&quot;:&quot;) can be thought of as a type of bullet</p>
<p>We could even have segment titles:</p>
<pre class="literal-block">
:: title  : title   : title
: segment : segment : segment
: segment : segment : segment
</pre>
<p>This would correspond well to DocBook's SegmentedList.  Output could
be tabular or &quot;name: value&quot; pairs, as described in DocBook's docs.</p>
</li>
<li><p class="first">Allow backslash-escaped colons in field names:</p>
<pre class="literal-block">
:Case Study\: Event Handling: This chapter will be dropped.
</pre>
</li>
<li><p class="first">Enable grid <span class="target" id="tables-inside-xml-comments">tables inside XML comments</span>, where &quot;--&quot; ends comments.
I see three implementation possibilities:</p>
<ol class="arabic simple">
<li>Make the table syntax characters into &quot;table&quot; directive options.
This is the most flexible but most difficult, and we probably
don't need that much flexibility.</li>
<li>Substitute &quot;~&quot; for &quot;-&quot; with a specialized directive option
(e.g. &quot;:tildes:&quot;).</li>
<li>Make the standard table syntax recognize &quot;~&quot; as well as &quot;-&quot;, even
without a directive option.  Individual tables would have to be
internally consistent.</li>
</ol>
<p>Directive options are preferable to configuration settings, because
tables are document-specific.  A pragma directive would be another
approach, to set the syntax once for a whole document.</p>
<p>In the meantime, the <a class="reference external" href="../ref/rst/directives.html#list-table">list-table</a> directive is a good replacement for
grid tables inside XML comments.</p>
</li>
<li><p class="first">Generalize docinfo contents (bibliographic fields): remove specific
fields, and have only a single generic &quot;field&quot;?</p>
</li>
<li><p class="first"><span class="target" id="line-numbers">Line numbers</span> and &quot;source&quot; in system messages:</p>
<ul>
<li><p class="first">Add &quot;source&quot; and &quot;line&quot; keyword arguments to all Reporter calls?
This would require passing source/line arguments along all
intermediate functions (where currently only <cite>line</cite> is used).</p>
<p>Or rather specify &quot;line&quot; only if actually needed?</p>
<p>Currently, <cite>document.reporter</cite> uses a state machine instance to
determine the &quot;source&quot; and &quot;line&quot; info from
<cite>statemachine.input_lines</cite> if not given explicitely. Except for
special cases, the &quot;line&quot; argument is not needed because,
<cite>document.statemachine</cite> keeps record of the current line number.</p>
</li>
<li><p class="first">For system messages generated after the parsing is completed (i.e. by
transforms or the writer) &quot;line&quot; info must be present in the doctree
elements.</p>
<p>Elements' .line assignments should be checked.  (Assign to .source
too?  Add a set_info method?  To what?)</p>
<p>The &quot;source&quot; (and line number in the source) can either be added
explicitely to the elements or determined from the “raw” line
number by <cite>document.statemachine.get_source_and_line</cite>.</p>
</li>
<li><p class="first">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.</p>
</li>
<li><p class="first">The line numbers of definition list items are wrong:</p>
<pre class="literal-block">
$ rst2pseudoxml.py --expose-internal-attribute line
1
  2
  3

5
  6
  7

&lt;document source=&quot;&lt;stdin&gt;&quot;&gt;
    &lt;definition_list&gt;
        &lt;definition_list_item internal:line=&quot;3&quot;&gt;
            &lt;term&gt;
                1
            &lt;definition&gt;
                &lt;paragraph internal:line=&quot;2&quot;&gt;
                    2
                    3
        &lt;definition_list_item internal:line=&quot;6&quot;&gt;
            &lt;term&gt;
                5
            &lt;definition&gt;
                &lt;paragraph internal:line=&quot;6&quot;&gt;
                    6
                    7
</pre>
</li>
</ul>
</li>
<li><p id="none-source">Quite a few nodes are getting a &quot;None&quot; source attribute as well.  In
particular, see the bodies of definition lists.</p>
</li>
</ul>
</div>
<div class="section" id="math-markup">
<h2><a class="toc-backref" href="#id28">Math Markup</a></h2>
<p>Since Docutils 0.8, a &quot;math&quot; role and directive using LaTeX math
syntax as input format is part of reStructuredText.</p>
<p>Open issues:</p>
<ul class="simple">
<li>Use a &quot;Transform&quot; for math format conversions as extensively discussed in
the &quot;math directive issues&quot; thread in May 2008
(<a class="reference external" href="http://osdir.com/ml/text.docutils.devel/2008-05/threads.html">http://osdir.com/ml/text.docutils.devel/2008-05/threads.html</a>)?</li>
<li>Generic &quot;math-output&quot; option (currently specific to HTML).
(List of math-output preferences?)</li>
<li>Try to be compatible with <a class="reference external" href="http://sphinx.pocoo.org/ext/math.html">Math support in Sphinx</a>?<ul>
<li>The <tt class="docutils literal">:label:</tt> option selects a label for the equation, by which it
can be cross-referenced, and causes an equation number to be issued.
In Docutils, the option <tt class="docutils literal">:name:</tt> sets the label.
Equation numbering is not implemented yet.</li>
<li>Option <tt class="docutils literal">:nowrap:</tt> prevents wrapping of the given math in a
math environment (you have to specify the math environment in the
content).</li>
</ul>
</li>
</ul>
<ul class="simple">
<li>Equation numbering and references. (Should be handled in a unified way
with other numbered entities like formal tables and images.)</li>
</ul>
<div class="section" id="alternative-input-formats">
<h3><a class="toc-backref" href="#id29">alternative input formats</a></h3>
<p>Use a directive option to specify an alternative input format, e.g. (but not
limited to):</p>
<dl class="docutils">
<dt><a class="reference external" href="http://www.w3.org/TR/MathML2/">MathML</a></dt>
<dd><p class="first">Not for hand-written code but maybe usefull when pasted in (or included
from a file)</p>
<p class="last">For an overview of MathML implementations and tests, see, e.g.,
the <a class="reference external" href="http://www.mathweb.org/wiki/MathML">mathweb wiki</a> or the <a class="reference external" href="http://wiki.contextgarden.net/MathML">ConTeXT MathML page</a>.</p>
</dd>
<dt><a class="reference external" href="http://www1.chapman.edu/~jipsen/mathml/asciimath.html">ASCIIMath</a></dt>
<dd><p class="first">Simple, ASCII based math input language (see also <a class="reference external" href="http://www.wjagray.co.uk/maths/ASCIIMathTutorial.html">ASCIIMath tutorial</a>).</p>
<ul class="last">
<li><p class="first">The Python module <a class="reference external" href="http://pypi.python.org/pypi/asciimathml/">ASCIIMathML</a> translates a string with ASCIIMath into a
MathML tree. Used, e.g., by <a class="reference external" href="http://fletcherpenney.net/multimarkdown/">MultiMarkdown</a>.</p>
<p>A more comprehensive and implementation is <a class="reference external" href="http://sourceforge.net/projects/asciimathpython/">ASCIIMathPython</a> by
Paul Trembley (also used in his sandbox projects).</p>
</li>
<li><p class="first">For conversion to LaTeX, there is a JavaScript script at
<a class="reference external" href="http://dlippman.imathas.com/asciimathtex/ASCIIMath2TeX.js">http://dlippman.imathas.com/asciimathtex/ASCIIMath2TeX.js</a></p>
</li>
</ul>
</dd>
<dt><a class="reference external" href="http://www.unicode.org/notes/tn28/">Unicode Nearly Plain Text Encoding of Mathematics</a></dt>
<dd><p class="first">format for lightly marked-up representation of mathematical
expressions in Unicode.</p>
<p class="last">(Unicode Technical Note. Sole responsibility for its contents rests
with the author(s). Publication does not imply any endorsement by
the Unicode Consortium.)</p>
</dd>
<dt>itex</dt>
<dd>See <a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/118">the culmination of a relevant discussion in 2003</a>.</dd>
</dl>
</div>
<div class="section" id="latex-output">
<h3><a class="toc-backref" href="#id30">LaTeX output</a></h3>
<p>Which equation environments should be supported by the math directive?</p>
<ul>
<li><p class="first">one line:</p>
<ul class="simple">
<li>numbered: <cite>equation</cite></li>
<li>unnumbered: <cite>equation*</cite></li>
</ul>
</li>
<li><p class="first">multiline (test for <tt class="docutils literal">\\</tt> outside of a nested environment
(e.g. <cite>array</cite> or <cite>cases</cite>)</p>
<ul>
<li><p class="first">numbered: <cite>align</cite> (number every line)</p>
<p>(To give one common number to all lines, put them in a <cite>split</cite>
environment. Docutils then places it in an <cite>equation</cite> environment.)</p>
</li>
<li><p class="first">unnumbered: <cite>align*</cite></p>
</li>
<li><p class="first">Sphinx math also supports <cite>gather</cite> (checking for blank lines in
the content). Docutils puts content blocks separated by blank
lines in separate math-block doctree nodes. (The only difference of
<cite>gather</cite> to two consecutive &quot;normal&quot; environments seems to be that
page-breaks between the two are prevented.)</p>
</li>
</ul>
</li>
</ul>
<p>See <a class="reference external" href="http://www.math.uiuc.edu/~hildebr/tex/displays.html">http://www.math.uiuc.edu/~hildebr/tex/displays.html</a>.</p>
</div>
<div class="section" id="html-output">
<h3><a class="toc-backref" href="#id31">HTML output</a></h3>
<p>There is no native math support in HTML.</p>
<dl class="docutils">
<dt><a class="reference external" href="http://www.w3.org/TR/MathML2/">MathML</a></dt>
<dd><p class="first">Converters from LaTeX to MathML include</p>
<ul class="simple">
<li><a class="reference external" href="../../../sandbox/jensj/latex_math/">latex_math</a> (Python) by Jens Jørgen Mortensen in the Docutils sandbox</li>
<li><a class="reference external" href="http://gva.noekeon.org/blahtexml/">Blahtex</a> (C++)</li>
<li><a class="reference external" href="http://www.mathtoweb.com/">MathToWeb</a> (Java)</li>
<li><a class="reference external" href="http://www.tug.org/applications/tex4ht/mn.html">TeX4ht</a> (TeX based)</li>
<li><a class="reference external" href="http://dlmf.nist.gov/LaTeXML/">LaTeXML</a> (Perl)</li>
<li><a class="reference external" href="http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html">itex</a> (also <a class="reference external" href="http://msevior.livejournal.com/26377.html">used in Abiword</a>)</li>
<li><a class="reference external" href="http://hutchinson.belmont.ma.us/tth/mml/">TtM</a> (C, non free, free binary for Linux) with an <a class="reference external" href="http://hutchinson.belmont.ma.us/tth/mml/ttmmozform.html">online-trial page</a></li>
<li><a class="reference external" href="http://www.gold-saucer.org/mathml/greasemonkey/dist/display-latex">Steve’s LATEX-to-MathML translator</a>
('mini-language', javascript, Python)</li>
</ul>
<p><a class="reference external" href="../../../sandbox/jensj/latex_math/">latex_math</a> is the base for the current <a class="reference external" href="../../docutils/math/latex2mathml.py">latex2mathml</a> module used
with <tt class="docutils literal"><span class="pre">--math-output=MathML</span></tt>.</p>
<ul class="last simple">
<li>Write a new converter based on:<ul>
<li>a generic tokenizer (see e.g. a <a class="reference external" href="http://code.activestate.com/recipes/252124-latex-codec/">latex-codec recipe</a>,
<a class="reference external" href="http://mirror.ctan.org/biblio/bibtex/utils/mab2bib/latex.py">updated latex-codec</a>, )</li>
<li>the Unicode-Char &lt;-&gt; LaTeX mappings database <a class="reference external" href="http://milde.users.sourceforge.net/LUCR/Math/">unimathsymbols</a></li>
</ul>
</li>
</ul>
</dd>
</dl>
<!-- URL seems down:
.. _itex: http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html -->
<dl class="docutils">
<dt>HTML/CSS</dt>
<dd><p class="first">format math in standard HTML enhanced by CSS rules
(<a class="reference external" href="http://www.cs.tut.fi/~jkorpela/math/">Overview</a>, <a class="reference external" href="http://www.zipcon.net/~swhite/docs/math/math.html">Examples and experiments</a>).</p>
<p>LaTeX-math to HTML/CSS converters include</p>
<ul class="simple">
<li><a class="reference external" href="ttp://hutchinson.belmont.ma.us/tth/index.html">TtH</a> (C)</li>
<li><a class="reference external" href="http://para.inria.fr/~maranget/hevea/">Hevea</a> (Objective Caml)</li>
<li><a class="reference external" href="http://elyxer.nongnu.org/">eLyXer</a> (Python)</li>
</ul>
<p class="last">The <tt class="docutils literal"><span class="pre">math-output=html</span></tt> option uses the converter from eLyXer.</p>
</dd>
<dt>images</dt>
<dd>(PNG or SVG) like e.g. Wikipedia. (e.g. with <a class="reference external" href="http://dvisvgm.sourceforge.net/">dvisvgm</a> or the
pure-python MathML-&gt;SVG converter <a class="reference external" href="http://www.grigoriev.ru/svgmath/">SVGMath</a>)</dd>
</dl>
</div>
<div class="section" id="openoffice-output">
<h3><a class="toc-backref" href="#id32">OpenOffice output</a></h3>
<ul>
<li><p class="first">The <a class="reference external" href="http://www.oasis-open.org/standards#opendocumentv1.1">OpenDocument standard</a> version 1.1 says:</p>
<blockquote>
<p>Mathematical content is represented by MathML 2.0</p>
</blockquote>
<p>However, putting MathML into an ODP file seems tricky as these
(maybe outdated) links suppose:
<a class="reference external" href="http://idippedut.dk/post/2008/01/25/Do-your-math-ODF-and-MathML.aspx">http://idippedut.dk/post/2008/01/25/Do-your-math-ODF-and-MathML.aspx</a>
<a class="reference external" href="http://idippedut.dk/post/2008/03/03/Now-I-get-it-ODF-and-MathML.aspx">http://idippedut.dk/post/2008/03/03/Now-I-get-it-ODF-and-MathML.aspx</a></p>
</li>
<li><p class="first"><a class="reference external" href="http://ooolatex.sourceforge.net/">OOoLaTeX</a>:  &quot;a set of macros designed to bring the power of LaTeX
into OpenOffice.&quot;</p>
</li>
</ul>
</div>
</div>
<div class="section" id="directives">
<h2><a class="toc-backref" href="#id33">Directives</a></h2>
<p>Directives below are often referred to as &quot;module.directive&quot;, the
directive function.  The &quot;module.&quot; is not part of the directive name
when used in a document.</p>
<ul>
<li><p class="first">Allow for field lists in list tables.  See
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.devel/3392">http://thread.gmane.org/gmane.text.docutils.devel/3392</a>&gt;.</p>
</li>
<li><p id="unify-tables">Unify table implementations and unify options of table directives
(<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.user/1857">http://article.gmane.org/gmane.text.docutils.user/1857</a>).</p>
</li>
<li><p class="first">Allow directives to be added at run-time?</p>
</li>
<li><p class="first">Use the language module for directive option names?</p>
</li>
<li><p class="first">Add &quot;substitution_only&quot; and &quot;substitution_ok&quot; function attributes,
and automate context checking?</p>
</li>
<li><p class="first">Implement options or features on existing directives:</p>
<ul>
<li><p class="first">All directives that produce titled elements should grow implicit
reference names based on the titles.</p>
</li>
<li><p class="first">Allow the <span class="target" id="trim">:trim:</span> option for all directives when they occur in a
substitution definition, not only the <a class="reference external" href="../ref/rst/directives.html#unicode-character-codes">unicode</a> directive.</p>
</li>
<li><p class="first">Add the &quot;class&quot; option to the <a class="reference external" href="../ref/rst/directives.html#unicode-character-codes">unicode</a> directive.  For example, you
might want to get characters or strings with borders around them.</p>
</li>
<li><p class="first"><span class="target" id="images-figure">images.figure</span>: &quot;title&quot; and &quot;number&quot;, to indicate a formal
figure?</p>
</li>
<li><p class="first"><span class="target" id="parts-sectnum">parts.sectnum</span>: &quot;local&quot;?, &quot;refnum&quot;</p>
<p>A &quot;local&quot; option could enable numbering for sections from a
certain point down, and sections in the rest of the document are
not numbered.  For example, a reference section of a manual might
be numbered, but not the rest.  OTOH, an all-or-nothing approach
would probably be enough.</p>
<p>The &quot;sectnum&quot; directive should be usable multiple times in a
single document.  For example, in a long document with &quot;chapter&quot;
and &quot;appendix&quot; sections, there could be a second &quot;sectnum&quot; before
the first appendix, changing the sequence used (from 1,2,3... to
A,B,C...).  This is where the &quot;local&quot; concept comes in.  This part
of the implementation can be left for later.</p>
<p>A &quot;refnum&quot; option (better name?) would insert reference names
(targets) consisting of the reference number.  Then a URL could be
of the form <tt class="docutils literal"><span class="pre">http://host/document.html#2.5</span></tt> (or &quot;2-5&quot;?).  Allow
internal references by number?  Allow name-based <em>and</em>
number-based ids at the same time, or only one or the other (which
would the table of contents use)?  Usage issue: altering the
section structure of a document could render hyperlinks invalid.</p>
</li>
<li><p class="first"><span class="target" id="parts-contents">parts.contents</span>: Add a &quot;suppress&quot; or &quot;prune&quot; option?  It would
suppress contents display for sections in a branch from that point
down.  Or a new directive, like &quot;prune-contents&quot;?</p>
<p>Add an option to include topics in the TOC?  Another for sidebars?
The &quot;topic&quot; directive could have a &quot;contents&quot; option, or the
&quot;contents&quot; directive&quot; could have an &quot;include-topics&quot; option.  See
docutils-develop 2003-01-29.</p>
</li>
<li><p class="first"><span class="target" id="parts-header">parts.header</span> &amp; <span class="target" id="parts-footer">parts.footer</span>: Support multiple, named headers
&amp; footers?  For example, separate headers &amp; footers for odd, even,
and the first page of a document.</p>
<p>This may be too specific to output formats which have a notion of
&quot;pages&quot;.</p>
</li>
<li><p class="first"><span class="target" id="misc-class">misc.class</span>:</p>
<ul class="simple">
<li>Add a <tt class="docutils literal">:parent:</tt> option for setting the parent's class
(<a class="reference external" href="http://article.gmane.org/gmane.text.docutils.devel/3165">http://article.gmane.org/gmane.text.docutils.devel/3165</a>).</li>
</ul>
</li>
<li><p class="first"><span class="target" id="misc-include">misc.include</span>:</p>
<ul>
<li><p class="first">Option to label lines?</p>
</li>
<li><p class="first">How about an environment variable, say RSTINCLUDEPATH or
RSTPATH, for standard includes (as in <tt class="docutils literal">.. include:: &lt;name&gt;</tt>)?
This could be combined with a setting/option to allow
user-defined include directories.</p>
</li>
<li><p class="first">Add support for inclusion by URL?</p>
<pre class="literal-block">
.. include::
   :url: http://www.example.org/inclusion.txt
</pre>
</li>
<li><p class="first">Strip blank lines from begin and end of a literal included file or
file section. This would correspond to the way a literal block is
handled.</p>
<p>As nodes.literal_block expects (and we have) the text as a string
(rather than a list of lines), using a regexp seems the way.</p>
</li>
</ul>
</li>
<li><p class="first"><span class="target" id="misc-raw">misc.raw</span>: add a &quot;destination&quot; option to the &quot;raw&quot; directive?</p>
<pre class="literal-block">
.. raw:: html
   :destination: head

   &lt;link ...&gt;
</pre>
<p>It needs thought &amp; discussion though, to come up with a consistent
set of destination labels and consistent behavior.</p>
<p>And placing HTML code inside the &lt;head&gt; element of an HTML
document is rather the job of a templating system.</p>
</li>
<li><p class="first"><span class="target" id="body-sidebar">body.sidebar</span>: Allow internal section structure?  Adornment
styles would be independent of the main document.</p>
<p>That is really complicated, however, and the document model
greatly benefits from its simplicity.</p>
</li>
</ul>
</li>
<li><p class="first">Implement directives.  Each of the list items below begins with an
identifier of the form, &quot;module_name.directive_function_name&quot;.  The
directive name itself could be the same as the
directive_function_name, or it could differ.</p>
<ul>
<li><p class="first"><span class="target" id="html-imagemap">html.imagemap</span></p>
<p>It has the disadvantage that it's only easily implementable for
HTML, so it's specific to one output format.</p>
<p>(For non-HTML writers, the imagemap would have to be replaced with
the image only.)</p>
</li>
<li><p class="first"><span class="target" id="parts-endnotes">parts.endnotes</span> (or &quot;footnotes&quot;): See <a class="reference internal" href="#footnote-citation-gathering">Footnote &amp; Citation Gathering</a>.</p>
</li>
<li><p class="first"><span class="target" id="parts-citations">parts.citations</span>: See <a class="reference internal" href="#footnote-citation-gathering">Footnote &amp; Citation Gathering</a>.</p>
</li>
<li><p class="first"><span class="target" id="misc-language">misc.language</span>: Specify (= change) the language of a document at
parse time?</p>
<ul class="simple">
<li>The <a class="reference internal" href="#misc-settings">misc.settings</a> directive suggested below offers a more generic
approach.</li>
<li>The language of document parts can be indicated by the &quot;special class
value&quot; <tt class="docutils literal"><span class="pre">&quot;language-&quot;</span></tt> + <a class="reference external" href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">BCP 47</a> language code. Class arguments to
the title are attached to the document's base node - hence titled
documents can be given a different language at parse time. However,
&quot;language by class attribute&quot; does not change parsing (localized
directives etc.), only supporting writers.</li>
</ul>
</li>
<li><p class="first"><span class="target" id="misc-settings">misc.settings</span>: Set any(?) Docutils runtime setting from within
a document?  Needs much thought and discussion.</p>
<p>Security concerns need to be taken into account (it shouldn't be
possible to enable <tt class="docutils literal">file_insertion_enabled</tt> from within a
document), and settings that only would have taken effect before
the directive (like <tt class="docutils literal"><span class="pre">tab-width</span></tt>) shouldn't be accessible either.</p>
<p>See this sub-thread:
&lt;<a class="reference external" href="http://thread.gmane.org/gmane.text.docutils.user/3620/focus=3649">http://thread.gmane.org/gmane.text.docutils.user/3620/focus=3649</a>&gt;</p>
</li>
<li><p class="first"><span class="target" id="misc-gather">misc.gather</span>: Gather (move, or copy) all instances of a specific
element.  A generalization of the <a class="reference internal" href="#footnote-citation-gathering">Footnote &amp; Citation Gathering</a>
ideas.</p>
</li>
<li><p class="first">Add a custom &quot;directive&quot; directive, equivalent to &quot;role&quot;?  For
example:</p>
<pre class="literal-block">
.. directive:: incr

   .. class:: incremental

.. incr::

&quot;``.. incr::``&quot; above is equivalent to &quot;``.. class:: incremental``&quot;.
</pre>
<p>Another example:</p>
<pre class="literal-block">
.. directive:: printed-links

   .. topic:: Links
      :class: print-block

      .. target-notes::
         :class: print-inline
</pre>
<p>This acts like macros.  The directive contents will have to be
evaluated when referenced, not when defined.</p>
<ul class="simple">
<li>Needs a better name?  &quot;Macro&quot;, &quot;substitution&quot;?</li>
<li>What to do with directive arguments &amp; options when the
macro/directive is referenced?</li>
</ul>
</li>
<li><p class="first">Make the meaning of block quotes overridable?  Only a 1-shot
though; doesn't solve the general problem.</p>
</li>
<li><div class="note" id="conditional-directives">
<p class="first admonition-title">Note</p>
<p class="last">See also the implementation in <a class="reference external" href="http://sphinx.pocoo.org/">Sphinx</a>.</p>
</div>
<p>Docutils already has the ability to say &quot;use this content for
Writer X&quot; via the &quot;raw&quot; directive. It also does have the ability
to say &quot;use this content for any Writer other than X&quot; via the
&quot;strip-elements with class&quot; config value.  However, using &quot;raw&quot;
input just to select a special writer is inconvenient in many
cases.
It wouldn't be difficult to get more straightforward support, though.</p>
<p>My first idea would be to add a set of conditional directives.
Let's call them &quot;writer-is&quot; and &quot;writer-is-not&quot; for discussion
purposes (don't worry about implemention details).  We might
have:</p>
<pre class="literal-block">
.. writer-is:: text-only

   ::

       +----------+
       |   SNMP   |
       +----------+
       |   UDP    |
       +----------+
       |    IP    |
       +----------+
       | Ethernet |
       +----------+

.. writer-is:: pdf

   .. figure:: protocol_stack.eps

.. writer-is-not:: text-only pdf

   .. figure:: protocol_stack.png
</pre>
<p>This could be an interface to the Filter transform
(docutils.transforms.components.Filter).</p>
<p>The ideas in <a class="reference internal" href="#adaptable-file-extensions">adaptable file extensions</a> above may also be
applicable here.</p>
<p>SVG's &quot;switch&quot; statement may provide inspiration.</p>
<p>Here's an example of a directive that could produce multiple
outputs (<em>both</em> raw troff pass-through <em>and</em> a GIF, for example)
and allow the Writer to select.</p>
<pre class="literal-block">
.. eqn::

   .EQ
   delim %%
   .EN
   %sum from i=o to inf c sup i~=~lim from {m -&gt; inf}
   sum from i=0 to m sup i%
   .EQ
   delim off
   .EN
</pre>
</li>
<li><p class="first"><span class="target" id="body-example">body.example</span>: Examples; suggested by Simon Hefti.  Semantics as
per Docbook's &quot;example&quot;; admonition-style, numbered, reference,
with a caption/title.</p>
</li>
<li><p class="first"><span class="target" id="body-index">body.index</span>: Index targets.</p>
<p>See <a class="reference external" href="./rst/alternatives.html#index-entries-indexes">Index Entries &amp; Indexes</a>.</p>
</li>
<li><p class="first"><span class="target" id="body-literal">body.literal</span>: Literal block, possibly &quot;formal&quot; (see <a class="reference internal" href="#object-numbering-and-object-references">object
numbering and object references</a> above).  Possible options:</p>
<ul>
<li><p class="first">&quot;highlight&quot; a range of lines</p>
</li>
<li><p class="first">include only a specified range of lines</p>
</li>
<li><p class="first">&quot;number&quot; or &quot;line-numbers&quot;? (since 0.9 available with &quot;code&quot; directive)</p>
</li>
<li><p class="first">&quot;styled&quot; could indicate that the directive should check for
style comments at the end of lines to indicate styling or
markup.</p>
<p>Specific derivatives (i.e., a &quot;python-interactive&quot; directive)
could interpret style based on cues, like the &quot;&gt;&gt;&gt; &quot; prompt and
&quot;input()&quot;/&quot;raw_input()&quot; calls.</p>
</li>
</ul>
<p>See docutils-users 2003-03-03.</p>
</li>
<li><p class="first"><span class="target" id="body-listing">body.listing</span>: Code listing with title (to be numbered
eventually), equivalent of &quot;figure&quot; and &quot;table&quot; directives.</p>
</li>
<li><p class="first"><span class="target" id="pysource-usage">pysource.usage</span>: Extract a usage message from the program,
either by running it at the command line with a <tt class="docutils literal"><span class="pre">--help</span></tt> option
or through an exposed API.  [Suggestion for Optik.]</p>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="interpreted-text">
<h2><a class="toc-backref" href="#id34">Interpreted Text</a></h2>
<p>Interpreted text is entirely a reStructuredText markup construct, a
way to get around built-in limitations of the medium.  Some roles are
intended to introduce new doctree elements, such as &quot;title-reference&quot;.
Others are merely convenience features, like &quot;RFC&quot;.</p>
<p>All supported interpreted text roles must already be known to the
Parser when they are encountered in a document.  Whether pre-defined
in core/client code, or in the document, doesn't matter; the roles
just need to have already been declared.  Adding a new role may
involve adding a new element to the DTD and may require extensive
support, therefore such additions should be well thought-out.  There
should be a limited number of roles.</p>
<p>The only place where no limit is placed on variation is at the start,
at the Reader/Parser interface.  Transforms are inserted by the Reader
into the Transformer's queue, where non-standard elements are
converted.  Once past the Transformer, no variation from the standard
Docutils doctree is possible.</p>
<p>An example is the Python Source Reader, which will use interpreted
text extensively.  The default role will be &quot;Python identifier&quot;, which
will be further interpreted by namespace context into &lt;class&gt;,
&lt;method&gt;, &lt;module&gt;, &lt;attribute&gt;, etc. elements (see pysource.dtd),
which will be transformed into standard hyperlink references, which
will be processed by the various Writers.  No Writer will need to have
any knowledge of the Python-Reader origin of these elements.</p>
<ul>
<li><p class="first">Add explicit interpreted text roles for the rest of the implicit
inline markup constructs: named-reference, anonymous-reference,
footnote-reference, citation-reference, substitution-reference,
target, uri-reference (&amp; synonyms).</p>
</li>
<li><p class="first">Add directives for each role as well?  This would allow indirect
nested markup:</p>
<pre class="literal-block">
This text contains |nested inline markup|.

.. |nested inline markup| emphasis::

   nested ``inline`` markup
</pre>
</li>
<li><p class="first">Implement roles:</p>
<ul>
<li><p class="first">&quot;<span class="target" id="raw-wrapped">raw-wrapped</span>&quot; (or &quot;<span class="target" id="raw-wrap">raw-wrap</span>&quot;): Base role to wrap raw text
around role contents.</p>
<p>For example, the following reStructuredText source ...</p>
<pre class="literal-block">
.. role:: red(raw-formatting)
   :prefix:
       :html: &lt;font color=&quot;red&quot;&gt;
       :latex: {\color{red}
   :suffix:
       :html: &lt;/font&gt;
       :latex: }

colored :red:`text`
</pre>
<p>... will yield the following document fragment:</p>
<pre class="literal-block">
&lt;paragraph&gt;
    colored
    &lt;inline classes=&quot;red&quot;&gt;
        &lt;raw format=&quot;html&quot;&gt;
            &lt;font color=&quot;red&quot;&gt;
        &lt;raw format=&quot;latex&quot;&gt;
            {\color{red}
        &lt;inline classes=&quot;red&quot;&gt;
            text
        &lt;raw format=&quot;html&quot;&gt;
            &lt;/font&gt;
        &lt;raw format=&quot;latex&quot;&gt;
            }
</pre>
<p>Possibly without the intermediate &quot;inline&quot; node.</p>
</li>
<li><p class="first"><span class="target" id="acronym-and-abbreviation">&quot;acronym&quot; and &quot;abbreviation&quot;</span>: Associate the full text with a
short form.  Jason Diamond's description:</p>
<blockquote>
<p>I want to translate <tt class="docutils literal"><span class="pre">`reST`:acronym:</span></tt> into <tt class="docutils literal">&lt;acronym
<span class="pre">title='reStructuredText'&gt;reST&lt;/acronym&gt;</span></tt>.  The value of the
title attribute has to be defined out-of-band since you can't
parameterize interpreted text.  Right now I have them in a
separate file but I'm experimenting with creating a directive
that will use some form of reST syntax to let you define them.</p>
</blockquote>
<p>Should Docutils complain about undefined acronyms or
abbreviations?</p>
<p>What to do if there are multiple definitions?  How to
differentiate between CSS (Content Scrambling System) and CSS
(Cascading Style Sheets) in a single document?  David Priest
responds,</p>
<blockquote>
<p>The short answer is: you don't.  Anyone who did such a thing
would be writing very poor documentation indeed.  (Though I
note that <a class="reference external" href="rst/alternatives.html#parameterized-interpreted-text">somewhere else in the docs</a>, there's mention of
allowing replacement text to be associated with the
abbreviation.  That takes care of the duplicate
acronyms/abbreviations problem, though a writer would be
foolish to ever need it.)</p>
</blockquote>
<p>How to define the full text?  Possibilities:</p>
<ol class="arabic">
<li><p class="first">With a directive and a definition list?</p>
<pre class="literal-block">
.. acronyms::

   reST
       reStructuredText
   DPS
       Docstring Processing System
</pre>
<p>Would this list remain in the document as a glossary, or would
it simply build an internal lookup table?  A &quot;glossary&quot;
directive could be used to make the intention clear.
Acronyms/abbreviations and glossaries could work together.</p>
<p>Then again, a glossary could be formed by gathering individual
definitions from around the document.</p>
</li>
<li><p class="first">Some kind of <a class="reference external" href="rst/alternatives.html#parameterized-interpreted-text">inline parameter syntax</a>?</p>
<pre class="literal-block">
`reST &lt;reStructuredText&gt;`:acronym: is `WYSIWYG &lt;what you
see is what you get&gt;`:acronym: plaintext markup.
</pre>
</li>
<li><p class="first">A combination of 1 &amp; 2?</p>
<p>The multiple definitions issue could be handled by establishing
rules of priority.  For example, directive-based lookup tables
have highest priority, followed by the first inline definition.
Multiple definitions in directive-based lookup tables would
trigger warnings, similar to the rules of <a class="reference external" href="../ref/rst/restructuredtext.html#implicit-hyperlink-targets">implicit hyperlink
targets</a>.</p>
</li>
<li><p class="first">Using substitutions?</p>
<pre class="literal-block">
.. |reST| acronym:: reST
   :text: reStructuredText
</pre>
</li>
</ol>
<p>What do we do for other formats than HTML which do not support
tool tips?  Put the full text in parentheses?</p>
</li>
<li><p class="first">&quot;figure&quot;, &quot;table&quot;, &quot;listing&quot;, &quot;chapter&quot;, &quot;page&quot;, etc: See <a class="reference internal" href="#object-numbering-and-object-references">object
numbering and object references</a> above.</p>
</li>
<li><p class="first">&quot;glossary-term&quot;: This would establish a link to a glossary.  It
would require an associated &quot;glossary-entry&quot; directive, whose
contents could be a definition list:</p>
<pre class="literal-block">
.. glossary-entry::

   term1
       definition1
   term2
       definition2
</pre>
<p>This would allow entries to be defined anywhere in the document,
and collected (via a &quot;glossary&quot; directive perhaps) at one point.</p>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="doctree-pruning">
<h2><a class="toc-backref" href="#id35">Doctree pruning</a></h2>
<p>The number of doctree nodes can be reduced by &quot;normalizing&quot; some related
nodes. This makes the document model and the writers somewhat simpler.</p>
<ul>
<li><p class="first">The &quot;doctest&quot; element should go away.  The construct could simply be
a front-end to generic literal blocks.  We could immediately (in 0.7)
remove the doctest node from the doctree, but leave the
syntax in reST.  The reST parser could represent doctest blocks as
literal blocks with a class attribute.  The syntax could be left in
reST (for a set period of time?).</p>
</li>
<li><p class="first">&quot;Normalize&quot; special admonitions (note, hint, warning, ...) during parsing
(similar to <span class="target" id="transforms-writer-aux-admonitions">transforms.writer_aux.Admonitions</span>). There is no need to
keep them as distinct elements in the doctree specification.</p>
<p>Keep the special admonition directives in reStructuredText syntax?</p>
</li>
</ul>
</div>
</div>
<div class="section" id="unimplemented-transforms">
<h1><a class="toc-backref" href="#id36">Unimplemented Transforms</a></h1>
<ul>
<li><p class="first"><span class="target" id="footnote-citation-gathering">Footnote &amp; Citation Gathering</span></p>
<p>Collect and move footnotes &amp; citations to the end of a document or the
place of a &quot;footnotes&quot; or &quot;citations&quot; directive
(see <cite>&lt;./ref/rst/directives.html&gt;_</cite>)</p>
<dl class="docutils">
<dt>Footnotes:</dt>
<dd><p class="first">Collect all footnotes that are referenced in the document before the
directive (and after an eventually preceding <tt class="docutils literal">.. footnotes::</tt>
directive) and insert at this place.</p>
<p class="last">Allows &quot;endnotes&quot; at a configurable place.</p>
</dd>
<dt>Citations:</dt>
<dd><p class="first">Collect citations that are referenced ...</p>
<p>Citations can be:</p>
<ol class="loweralpha simple">
<li>defined in the document as citation elements</li>
<li>auto-generated from entries in a bibliographic database.<ul>
<li>based on <a class="reference external" href="http://code.google.com/p/bibstuff/">bibstuff</a>?</li>
<li>also have a look at<ul>
<li><a class="reference external" href="http://www.cs.cornell.edu/people/egs/crosstex/">CrossTeX</a>, a backwards-compatible, improved bibtex
re-implementation in Python (including HTML export).
(development stalled since 2 years)</li>
<li><a class="reference external" href="http://pybtex.sourceforge.net/">Pybtex</a>,a drop-in replacement for BibTeX written in Python.<ul>
<li>BibTeX styles &amp; (experimental) pythonic style API.</li>
<li>Database in BibTeX, BibTeXML and YAML formats.</li>
<li>full Unicode support.</li>
<li>Write to TeX, HTML and plain text.</li>
</ul>
</li>
<li><a class="reference external" href="http://e6h.org/%7Eegh/hg/zotero-plain/">Zotero plain</a>
supports Zotero databases and <a class="reference external" href="http://www.citationstyles.org/">CSL</a> styles with Docutils with an
<tt class="docutils literal">xcite</tt> role.</li>
<li><a class="reference external" href="http://sphinxcontrib-bibtex.readthedocs.org/">sphinxcontrib-bibtex</a> Sphinx extension with &quot;bibliography&quot;
directive and &quot;cite&quot; role supporting BibTeX databases.</li>
<li><a class="reference external" href="http://www.loria.fr/~rougier/coding/article/rst2html.py">Modified rst2html</a> by
Nicolas Rougier.</li>
</ul>
</li>
</ul>
</li>
</ol>
<ul class="last simple">
<li>Automatically insert a &quot;References&quot; heading?</li>
</ul>
</dd>
</dl>
</li>
</ul>
<ul>
<li><p class="first"><span class="target" id="reference-merging">Reference Merging</span></p>
<p>When merging two or more subdocuments (such as docstrings),
conflicting references may need to be resolved.  There may be:</p>
<ul class="simple">
<li>duplicate reference and/or substitution names that need to be made
unique; and/or</li>
<li>duplicate footnote numbers that need to be renumbered.</li>
</ul>
<p>Should this be done before or after reference-resolving transforms
are applied?  What about references from within one subdocument to
inside another?</p>
</li>
<li><p class="first"><span class="target" id="document-splitting">Document Splitting</span></p>
<p>If the processed document is written to multiple files (possibly in
a directory tree), it will need to be split up.  Internal references
will have to be adjusted.</p>
<p>(HTML only?  Initially, yes.  Eventually, anything should be
splittable.)</p>
<p>Ideas:</p>
<ul>
<li><p class="first">Insert a &quot;destination&quot; attribute into the root element of each
split-out document, containing the path/filename.  The Output
object or Writer will recognize this attribute and split out the
files accordingly.  Must allow for common headers &amp; footers,
prev/next, breadcrumbs, etc.</p>
</li>
<li><p class="first">Transform a single-root document into a document containing
multiple subdocuments, recursively.  The content model of the
&quot;document&quot; element would have to change to:</p>
<pre class="literal-block">
&lt;!ELEMENT document
    ( (title, subtitle?)?,
      decoration?,
      (docinfo, transition?)?,
      %structure.model;,
      document* )&gt;
</pre>
<p>(I.e., add the last line -- 0 or more document elements.)</p>
<p>Let's look at the case of hierarchical (directories and files)
HTML output.  Each document element containing further document
elements would correspond to a directory (with an index.html file
for the content preceding the subdocuments).  Each document
element containing no subdocuments (i.e., structure model elements
only) corresponds to a concrete file with no directory.</p>
<p>The natural transform would be to map sections to subdocuments,
but possibly only a given number of levels deep.</p>
</li>
</ul>
</li>
<li><p class="first"><span class="target" id="navigation">Navigation</span></p>
<p>If a document is split up, each segment will need navigation links:
parent, children (small TOC), previous (preorder), next (preorder).
Part of <a class="reference internal" href="#document-splitting">Document Splitting</a>?</p>
</li>
<li><p class="first"><span class="target" id="list-of-system-messages">List of System Messages</span></p>
<p>The <tt class="docutils literal">system_message</tt> elements are inserted into the document tree,
adjacent to the problems themselves where possible.  Some (those
generated post-parse) are kept until later, in
<tt class="docutils literal">document.messages</tt>, and added as a special final section,
&quot;Docutils System Messages&quot;.</p>
<p>Docutils could be made to generate hyperlinks to all known
system_messages and add them to the document, perhaps to the end of
the &quot;Docutils System Messages&quot; section.</p>
<p>Fred L. Drake, Jr. wrote:</p>
<blockquote>
<p>I'd like to propose that both parse- and transformation-time
messages are included in the &quot;Docutils System Messages&quot; section.
If there are no objections, I can make the change.</p>
</blockquote>
<p>The advantage of the current way of doing things is that parse-time
system messages don't require a transform; they're already in the
document.  This is valuable for testing (unit tests,
tools/quicktest.py).  So if we do decide to make a change, I think
the insertion of parse-time system messages ought to remain as-is
and the Messages transform ought to move all parse-time system
messages (remove from their originally inserted positions, insert in
System Messages section).</p>
</li>
<li><p class="first"><span class="target" id="index-generation">Index Generation</span></p>
</li>
</ul>
</div>
<div class="section" id="html-writer">
<h1><a class="toc-backref" href="#id37">HTML Writer</a></h1>
<ul>
<li><p class="first">Make it easier to find out fragment names (#foo-bar) of <tt class="docutils literal">_`inline
targets`</tt>.  Currently you have to either look at the source or
guess the fragment.</p>
<p>For example, we could add support for self-referencing targets
(i.e. inline targets would [unobtrusively] link to themselves, so
that you can just click them and then copy the address).  Or we
could add support for titles that display the fragment name (as in
&lt;<a class="reference external" href="http://subversion.tigris.org/mailing-list-guidelines.html">http://subversion.tigris.org/mailing-list-guidelines.html</a>&gt;; just
hover the paragraphs).</p>
<p>Either way it should be optional and deactivated by default.</p>
<p>This would be useful for documents like Docutils' bug list or to-do
list.</p>
</li>
<li><p class="first">Make the <span class="target" id="list-compacting">list compacting</span> logic more generic: For example, allow
for literal blocks or line blocks inside of compact list items.</p>
<p>This is not implementable as long as list compacting is done by
omitting <tt class="docutils literal">&lt;p&gt;</tt> tags.  List compacting would need to be done by
adjusting CSS margins instead.</p>
</li>
<li><p class="first">Idea for field-list rendering: hanging indent:</p>
<pre class="literal-block">
Field name (bold): First paragraph of field body begins
    with the field name inline.

    If the first item of a field body is not a paragraph,
    it would begin on the following line.
</pre>
</li>
<li><p class="first">Add more support for &lt;link&gt; elements, especially for navigation
bars.</p>
<p>The framework does not have a notion of document relationships, so
probably <a class="reference internal" href="#misc-raw">raw.destination</a> should be used.</p>
<p>We'll have framework support for document relationships when support
for <a class="reference internal" href="#multiple-output-files">multiple output files</a> is added.  The HTML writer could
automatically generate &lt;link&gt; elements then.</p>
</li>
<li><p class="first">Base list compaction on the spacing of source list?  Would require
parser support.  (Idea: fantasai, 16 Dec 2002, doc-sig.)</p>
</li>
<li><p class="first">Add a tool tip (&quot;title&quot; attribute?) to footnote back-links
identifying them as such.  Text in Docutils language module.</p>
</li>
</ul>
</div>
<div class="section" id="pep-html-writer">
<h1><a class="toc-backref" href="#id38">PEP/HTML Writer</a></h1>
<ul>
<li><p class="first">Remove the generic style information (duplicated from html4css1.css)
from pep.css to avoid redundancy.</p>
<p>Needs support for multiple stylesheets in the PEP writer
(is this inherited from HTML?).</p>
</li>
</ul>
</div>
<div class="section" id="s5-html-writer">
<h1><a class="toc-backref" href="#id39">S5/HTML Writer</a></h1>
<ul>
<li><p class="first">Add a way to begin an untitled slide.</p>
</li>
<li><p class="first">Add a way to begin a new slide, continuation, using the same title
as the previous slide?  (Unnecessary?)  You need that if you have a
lot of items in one section which don't fit on one slide.</p>
<p>Maybe either this item or the previous one can be realized using
transitions.</p>
</li>
<li><p class="first">Have a timeout on incremental items, so the colour goes away after 1
second.</p>
</li>
<li><p class="first">Add an empty, black last slide (optionally).  Currently the handling
of the last slide is not very nice, it re-cycles through the
incremental items on the last slide if you hit space-bar after the
last item.</p>
</li>
<li><p class="first">Add a command-line option to disable advance-on-click.</p>
</li>
<li><p class="first">Add a speaker's master document, which would contain a small version
of the slide text with speaker's notes interspersed.  The master
document could use <tt class="docutils literal"><span class="pre">target=&quot;whatever&quot;</span></tt> to direct links to a
separate window on a second monitor (e.g., a projector).</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">This item and the following items are partially
accomplished by the S5 1.2 code (currently in alpha), which has
not yet been integrated into Docutils.</p>
</div>
</li>
<li><p class="first">Speaker's notes -- how to intersperse?  Could use reST comments
(&quot;..&quot;), but make them visible in the speaker's master document.  If
structure is necessary, we could use a &quot;comment&quot; directive (to avoid
nonsensical DTD changes, the &quot;comment&quot; directive could produce an
untitled topic element).</p>
<p>The speaker's notes could (should?) be separate from S5's handout
content.</p>
</li>
<li><p class="first">The speaker's master document could use frames for easy navigation:
TOC on the left, content on the right.</p>
<ul class="simple">
<li>It would be nice if clicking in the TOC frame simultaneously
linked to both the speaker's notes frame and to the slide window,
synchronizing both.  Needs JavaScript?</li>
<li>TOC would have to be tightly formatted -- minimal indentation.</li>
<li>TOC auto-generated, as in the PEP Reader.  (What if there already
is a &quot;contents&quot; directive in the document?)</li>
<li>There could be another frame on the left (top-left or bottom-left)
containing a single &quot;Next&quot; link, always pointing to the next slide
(synchronized, of course).  Also &quot;Previous&quot; link?  FF/Rew go to
the beginning of the next/current parent section?  First/Last
also?  Tape-player-style buttons like <tt class="docutils literal">|&lt;&lt;&nbsp; &lt;&lt;&nbsp; &lt;&nbsp; &gt;&nbsp; &gt;&gt;&nbsp; &gt;&gt;|</tt>?</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="epub-html-writer">
<h1><a class="toc-backref" href="#id40">Epub/HTML Writer</a></h1>
<p>Add epub as an output format.</p>
<p>Pack the output of a HTML writer and supporting files (e.g. images)
into one single epub document.</p>
<blockquote>
<p>epub is an open file format for ebooks based on HTML, specified by the
<a class="reference external" href="http://www.idpf.org/">International Digital Publishing Forum</a>. Thus, documents in epub
format are suited to be read with <a class="reference external" href="http://en.wikipedia.org/wiki/List_of_e-book_readers">electronic reading devices</a>. The
epub format comprises:</p>
<ul class="simple">
<li><a class="reference external" href="http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html">Open Publication Structure (OPS)</a></li>
<li><a class="reference external" href="http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html">Open Packaging Format (OPF)</a></li>
<li><a class="reference external" href="http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm">OEBPS Container Format (OCF)</a></li>
</ul>
<p class="attribution">&mdash;<a class="reference external" href="http://bitbucket.org/wierob/rst2epub/">rst2epub</a> README</p>
</blockquote>
<p>There is a project for epub support with sphinx providing a
(hopefully) reusable framework.</p>
<p>Also, the <a class="reference external" href="http://plastex.sourceforge.net/">plasTeX</a> Python package has an EPUB renderer:</p>
<blockquote>
It simply calls the XHTML renderer and does the epub packaging in
postprocessing.</blockquote>
</div>
<div class="section" id="latex-writer">
<h1><a class="toc-backref" href="#id41">LaTeX writer</a></h1>
<p>Also see the <a class="reference external" href="../user/latex.html#problems">Problems</a> section in the <a class="reference external" href="../user/latex.html">latex writer documentation</a>.</p>
<div class="section" id="bug-fixes">
<h2><a class="toc-backref" href="#id42">Bug fixes</a></h2>
<ul>
<li><p class="first">A multirow cell in a table expects empty cells in the spanned rows while
the doctree contains only the remaining cells (&quot;Exchange Table Model&quot;, see
docs/ref/soextblx.dtd).</p>
<p>Needs bookkeeping of &quot;open&quot; multirow cells (how many how long) and
insertion of additional '&amp;'s.</p>
<p>See <a class="reference external" href="../../test/functional/input/data/latex.txt">../../test/functional/input/data/latex.txt</a></p>
</li>
<li><p class="first">Too deeply nested lists fail: generate a warning and provide
a workaround.</p>
</li>
<li><p class="first">Spaces in inline literal text:</p>
<pre class="literal-block">
Now note    the
spacing    between the    words of    this sentence    (words
should    be grouped    in pairs).
</pre>
<p>Discuss the desired behaviour and implement a consistent one.</p>
</li>
<li><p class="first">An enumerated list in the docinfo fails (newcounter definition inside
tabularx).</p>
</li>
<li><p class="first">File names of included graphics (see also <cite>grffile</cite> package).</p>
</li>
</ul>
</div>
<div class="section" id="generate-clean-and-configurable-latex-source">
<h2><a class="toc-backref" href="#id43">Generate clean and configurable LaTeX source</a></h2>
<ul class="simple">
<li>Check the generated source with package <cite>nag</cite>.</li>
</ul>
<div class="section" id="configurable-placement-of-figure-and-table-floats">
<h3><a class="toc-backref" href="#id44">Configurable placement of figure and table floats</a></h3>
<ul>
<li><p class="first">Special class argument to individually place figures?</p>
<p>Either:</p>
<blockquote>
<p>placement-&lt;optional arg&gt;  -&gt; figure[&lt;optional arg&gt;]{...}</p>
</blockquote>
<p>e.g. <tt class="docutils literal">.. class::&nbsp; <span class="pre">placement-htb</span></tt>,</p>
<p>or more verbose:</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">H:</th><td class="field-body">place-here</td>
</tr>
<tr class="field"><th class="field-name">h:</th><td class="field-body">place-here-if-possible</td>
</tr>
<tr class="field"><th class="field-name">t:</th><td class="field-body">place-top</td>
</tr>
<tr class="field"><th class="field-name">b:</th><td class="field-body">place-bottom</td>
</tr>
<tr class="field"><th class="field-name">p:</th><td class="field-body">place-on-extra-page</td>
</tr>
</tbody>
</table>
<p>e.g.: <tt class="docutils literal">.. class:: <span class="pre">place-here-if-possible</span> <span class="pre">place-top</span> <span class="pre">place-bottom</span></tt></p>
<p>Maybe support both variants?</p>
</li>
</ul>
</div>
<div class="section" id="latex-constructs-and-packages-instead-of-re-implementations">
<h3><a class="toc-backref" href="#id45">LaTeX constructs and packages instead of re-implementations</a></h3>
<p>Which packages do we want to use?</p>
<blockquote>
<ul>
<li><p class="first">base and &quot;recommended&quot; packages</p>
<p>(packages that should be in a &quot;reasonably sized and reasonably modern
LaTeX installation like the <cite>texlive-latex-recommended</cite> Debian package,
say):</p>
</li>
<li><p class="first">No &quot;fancy&quot; or &quot;exotic&quot; requirements.</p>
</li>
<li><p class="first">pointers to advanced packages and their use in the <a class="reference external" href="../user/latex.html">latex writer
documentation</a>.</p>
</li>
</ul>
</blockquote>
<ul>
<li><p class="first"><tt class="docutils literal">alltt</tt> environment for literal block.</p>
</li>
<li><p class="first">footnotes</p>
<ul class="simple">
<li>True footnotes with LaTeX auto-numbering (as option <tt class="docutils literal"><span class="pre">--latex-footnotes</span></tt>)
(also for target-footnotes):<ul>
<li>attach footnote text to footnote-symobol node</li>
<li>write footnote{&lt;footnote text&gt;}</li>
<li>consider cases where LaTeX does not support footnotes
(inside tables, headings, ...)?</li>
<li>consider multiple footnote refs to common footnote text.</li>
</ul>
<!-- Quote:

If the symbol you want is not one of the ones listed, you'll need to
redefine ``\@fnsymbol`` and add it, e.g. perhaps like::

 \def\@fnsymbol#1{\ifcase#1\hbox{}\or *\or \dagger\or \ddagger\or
 \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger \or
 \ddagger\ddagger \or \mathchar"27C \else\@ctrerr\fi\relax}

which would allow \symbolfootnote[10]{footnote} to have a club as its
mark. -->
</li>
<li>document customization (links to how-to and packages):</li>
</ul>
<!-- Footnote packages:

:footnote: texlive-latex-recommended % savenotes environment
:footmisc: texlive-latex-extra       % formatting options
:manyfoot: texlive-latex-extra
:bigfoot: texlive-latex-extra
:perpage: texlive-latex-extra
:ftnxtra: new on CTAN
          fixes the issue of footnote inside \caption{},
          tabular environment and \section{} like commands.


German tutorial:
http://www2.informatik.hu-berlin.de/~ahamann/studies/footnotes.pdf -->
<!-- Footnote FAQs:

`Footnotes whose texts are identical
<http://www.tex.ac.uk/cgi-bin/texfaq2html?label=repfootnote>`__

* label per hand or use footmisc

`More than one sequence of footnotes
<http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multfoot>`__

* manyfoot, bigfoot

`Footnotes in tables
<http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footintab>`__

* `tabularx` and longtable allow footnotes.
* `footnote` provides a "savenotes" environment which collects all
  footnotes and emits them at ``end{savenotes}``

`Footnotes in LaTeX section headings
<http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftnsect>`__

* Take advantage of the fact that the mandatory argument doesn't
  move if the optional argument is present::

      \section[title] {title\footnote{title ftnt}}

* Use the footmisc package, with package option stable - this modifies
  footnotes so that they softly and silently vanish away if used in a
  moving argument.

* Use ftnxtra.

`Footnotes numbered per page
<http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footnpp>`__

* perpage provides a general mechanism for resetting counters per page
* footmisc provides a package option perpage -->
</li>
<li><p class="first">enumeration environment, field list</p>
<ul class="simple">
<li>use <cite>mdwlist</cite> from texlive-latex-recommended?</li>
<li>use <cite>eqlist</cite> (texlive-latex-extra) for field-lists?</li>
</ul>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">--use-latex-when-possible</span></tt> »super option« that would set the
following:</p>
<pre class="literal-block">
   --no-section-numbering
   --use-latex-toc
   --use-latex-docinfo
   --use-latex-abstract
   --use-latex-footnotes
   --use-latex-citations

? (My preference is to default to use-latex-* whenever possible [GM])
</pre>
</li>
</ul>
</div>
</div>
<div class="section" id="default-layout">
<h2><a class="toc-backref" href="#id46">Default layout</a></h2>
<ul>
<li><p class="first">Use italic instead of slanted for titlereference?</p>
</li>
<li><p class="first">Start a new paragraph after lists (as currently)
or continue (no blank line in source, no parindent in output)?</p>
<p>Overriding:</p>
<ul class="simple">
<li>continue if the <a class="reference external" href="../ref/rst/directives.html#compound-paragraph">compound paragraph</a> directive is used, or</li>
<li>force a new paragraph with an empty comment.</li>
</ul>
</li>
<li><p class="first">Sidebar handling (environment with <cite>framed</cite>, <cite>marginnote</cite>, <cite>wrapfig</cite>,
...)?</p>
</li>
<li><p class="first">Use optionlist for docinfo?</p>
</li>
<li><p class="first">Keep literal-blocks together on a page, avoid pagebreaks.</p>
<p>Failed experiments up to now: samepage, minipage, pagebreak 1 to 4 before
the block.</p>
<p>Should be possible with <tt class="docutils literal"><span class="pre">--literal-block-env==lstlistings</span></tt> and some
configuration...</p>
</li>
<li><p class="first">More space between title and subtitle?</p>
<pre class="literal-block">
-  \\ % subtitle%
+  \\[0.5em] % subtitle%
</pre>
</li>
</ul>
<div class="section" id="tables">
<h3><a class="toc-backref" href="#id47">Tables</a></h3>
<ul>
<li><p class="first">Improve/simplify logic to set the column width in the output.</p>
<ul class="simple">
<li>Assumed reST line length for table width setting configurable, or</li>
<li>use <cite>ltxtable</cite> (a combination of <cite>tabularx</cite> (auto-width) and
<cite>longtable</cite> (page breaks)), or</li>
<li>use tabularx column type <tt class="docutils literal">X</tt> and let LaTeX decide width, or</li>
<li>use <a class="reference external" href="http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tabulary">tabulary</a>?</li>
</ul>
</li>
<li><p class="first">From comp.text.tex (13. 4. 2011):</p>
<blockquote>
<p>When using fixed width columns, you should ensure that the total
width does not exceed linewidth: if the first column is p{6cm}
the second one should be p{dimexprlinewidth-6cm-4tabcolsep}
because the glue tabcolsep is added twice at every column edge.
You may also consider to set tabcolsep to a different value...</p>
</blockquote>
</li>
<li><p class="first">csv-tables do not have a colwidth.</p>
</li>
<li><p class="first">Add more classes or options, e.g. for</p>
<ul class="simple">
<li>column width set by latex,</li>
<li>horizontal alignment and rules.</li>
<li>long table vs. tabular (see next item).</li>
</ul>
</li>
<li><p class="first">Use tabular instead of longtable for tables in legends or generally
inside a float?</p>
<p>Alternatively, default to tabular and use longtable only if specified
by config setting or class argument (analogue to booktable)?</p>
</li>
<li><p class="first">Table heads and footer for longtable (firstpage lastpage ..)?</p>
</li>
<li><p class="first">In tools.txt the option tables right column, there should be some more
spacing between the description and the next paragraph &quot;Default:&quot;.</p>
</li>
<li><p class="first">Paragraph separation in tables is hairy.
see <a class="reference external" href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=struttab">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=struttab</a></p>
<ul class="simple">
<li>The strut solution did not work.</li>
<li>setting extrarowheight added ad top of row not between paragraphs in
a cell. ALTHOUGH i set it to 2pt because, text is too close to the topline.</li>
<li>baselineskip/stretch does not help.</li>
</ul>
</li>
<li><p class="first">Should there be two hlines after table head and on table end?</p>
</li>
<li><p class="first">Place titled tables in a float ('table' environment)?</p>
<p>The 'table', 'csv-table', and 'list-table' directives support an (optional)
table title. In analogy to the 'figure' directive this should map to a
table float.</p>
</li>
</ul>
</div>
<div class="section" id="image-and-figure-directives">
<h3><a class="toc-backref" href="#id48">Image and figure directives</a></h3>
<ul>
<li><p class="first">compare the test case in:</p>
<ul class="simple">
<li><a class="reference external" href="../../test/functional/input/data/standard.txt">../../test/functional/input/data/standard.txt</a></li>
<li><a class="reference external" href="../../test/functional/expected/standalone_rst_html4css1.html">../../test/functional/expected/standalone_rst_html4css1.html</a></li>
<li><a class="reference external" href="../../test/functional/expected/standalone_rst_latex.tex">../../test/functional/expected/standalone_rst_latex.tex</a></li>
</ul>
</li>
<li><p class="first">According to the HTML standard
<a class="reference external" href="http://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG">http://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG</a> a right- or
left-aligned image should be floated alongside the paragraph.</p>
<ul class="simple">
<li>Use this default also for LaTeX?</li>
<li>Wrap text around figures/images with class argument &quot;wrap&quot;
(like the odt writer)?</li>
</ul>
<p>Use <cite>wrapfig</cite> (or other recommended) package.</p>
</li>
<li><p class="first">support more graphic formats (especially SVG, the only standard
vector format for HTML)</p>
<p>There is a <a class="reference external" href="http://mirror.ctan.org/macros/latex/contrib/flashmovie">SWF package</a> at CTAN.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="missing-features">
<h2><a class="toc-backref" href="#id49">Missing features</a></h2>
<ul>
<li><p class="first">support &quot;figwidth&quot; argument for figures.</p>
<p>As the 'figwidth' argument is still ignored and the &quot;natural width&quot; of
a figure in LaTeX is 100&nbsp;% of the text width, setting the 'align'
argument has currently no effect on the LaTeX output.</p>
</li>
<li><p class="first">Let <cite>meta</cite> directive insert PDF-keywords into header?</p>
</li>
<li><p class="first">Multiple author entries in docinfo (same thing as in html).
(already solved?)</p>
</li>
<li><p class="first">Consider supporting the &quot;compact&quot; option and class argument (from
rst2html) as some lists look better compact and others need the space.</p>
</li>
<li><p class="first">Better citation support
(see <a class="reference internal" href="#footnote-citation-gathering">Footnote &amp; Citation Gathering</a>).</p>
</li>
<li><p class="first">If <tt class="docutils literal"><span class="pre">use-latex-citations</span></tt> is used, a bibliography is inserted right at the
end of the document.</p>
<p>Put in place of the to-be-implemented &quot;citations&quot; directive
(see <a class="reference internal" href="#footnote-citation-gathering">Footnote &amp; Citation Gathering</a>).</p>
</li>
</ul>
<div class="section" id="unicode-to-latex">
<h3><a class="toc-backref" href="#id50">Unicode to LaTeX</a></h3>
<p>The <a class="reference external" href="http://www.lyx.org">LyX</a> document processor has a comprehensive
Unicode to LaTeX conversion feature with a file called <tt class="docutils literal">unicodesymbols</tt>
that lists LaTeX counterparts for a wide range of Unicode characters.</p>
<ul class="simple">
<li>Use this in the LaTeXTranslator?
Think of copyright issues!</li>
<li>The &quot;ucs&quot; package has many translations in ...doc/latex/ucs/config/</li>
<li>The <a class="reference external" href="http://code.google.com/p/bibstuff/">bibstuff</a> tool ships a <cite>latex_codec</cite> Python module!</li>
</ul>
</div>
<div class="section" id="allow-choice-between-utf8-standard-and-utf8x-extended-encodings">
<h3><a class="toc-backref" href="#id51">Allow choice between utf8 (standard) and utf8x (extended) encodings</a></h3>
<ul class="simple">
<li>Allow the user to select <em>utf8</em> or <em>utf8x</em> LaTeX encoding. (Docutil's
output encoding becomes LaTeX's input encoding.)</li>
</ul>
<p>The <cite>ucs</cite> package provides extended support for UTF-8 encoding in LaTeX
via the <cite>inputenc</cite>-option <tt class="docutils literal">utf8x</tt>.  It is, however, a non-standard
extension and no longer developed.</p>
<dl class="docutils">
<dt>Ideas:</dt>
<dd><ol class="first last loweralpha simple">
<li>Python has 4 names for the UTF-8 encoding (<tt class="docutils literal">utf_8, U8, UTF, utf8</tt>)
give a special meaning to one of the aliases,</li>
<li>scan &quot;stylesheets&quot; and &quot;latex-preamble&quot; options and use <tt class="docutils literal">utf8x</tt>
if it contains <tt class="docutils literal">ucs</tt></li>
</ol>
</dd>
</dl>
</div>
<div class="section" id="xetex-writer">
<h3><a class="toc-backref" href="#id52">XeTeX writer</a></h3>
<ul class="simple">
<li>Glyphs missing in the font are left out in the PDF without warning
(e.g. ⇔ left-right double arrow in the functional test output).</li>
<li>Disable word-wrap (hyphenation) in literal text locally with
<tt class="docutils literal"><span class="pre">providecommand{\nohyphenation}{\addfontfeatures{HyphenChar=None}}</span></tt>?</li>
</ul>
</div>
<div class="section" id="problematic-urls">
<h3><a class="toc-backref" href="#id53">problematic URLs</a></h3>
<ul>
<li><p class="first">^^ LaTeX's special syntax for characters results in &quot;strange&quot; replacements
(both with href and url).</p>
<p><a class="reference external" href="../strange^^name">file with ^^</a>:
<a class="reference external" href="../strange^^name">../strange^^name</a></p>
</li>
<li><p class="first">Unbalanced braces, { or }, will fail (both with href and url):</p>
<pre class="literal-block">
`file with { &lt;../strange{name&gt;`__
`&lt;../strange{name&gt;`__
</pre>
</li>
</ul>
<p>Currently, a warning is written to the error output stream.</p>
<p>For correct printing, we can</p>
<ul>
<li><p class="first">use the href command with &quot;normal&quot; escaped name argument, or</p>
</li>
<li><p class="first">define a url-command in the preamble</p>
<pre class="literal-block">
\urldef{\fragileURLi}\nolinkurl{myself%node&#64;gateway.net}
</pre>
</li>
</ul>
<p>but need to find a way to insert it as href argument.</p>
<p>The following fails:</p>
<pre class="literal-block">
\href{http://www.w3.org/XML/Schema^^dev}{\fragileURLi}
</pre>
<p>Use %-replacement like <a class="reference external" href="http://nowhere/url_with%28parens%29">http://nowhere/url_with%28parens%29</a> ?</p>
<p>-&gt; does not work for file paths (with pdflatex and xpdf).</p>
</div>
<div class="section" id="add-stylesheet-option">
<h3><a class="toc-backref" href="#id54">add-stylesheet option</a></h3>
<p>From <a class="reference external" href="http://article.gmane.org/gmane.text.docutils.devel/3429/">http://article.gmane.org/gmane.text.docutils.devel/3429/</a></p>
<p>The problem is that since we have a default value, we have to
differentiate between adding another stylesheet and replacing the
default.  I suggest that the existing --stylesheet &amp; --stylesheet-path
options keep their semantics to replace the existing settings.  We
could introduce new --add-stylesheet &amp; --add-stylesheet-path options,
which accumulate; further --stylesheet/--stylesheet-path options would
clear these lists.  The stylesheet or stylesheet_path setting (only
one may be set), plus the added_stylesheets and added_stylesheet_paths
settings, describe the combined styles.</p>
<p>For example, this run will have only one custom stylesheet:</p>
<blockquote>
rstpep2html.py --stylesheet-path custom.css ...</blockquote>
<p>This run will use the default stylesheet, and the custom one:</p>
<blockquote>
rstpep2html.py --add-stylesheet-path custom.css ...</blockquote>
<p>This run will use the default stylesheet, a custom local stylesheet,
and an external stylesheet:</p>
<blockquote>
<dl class="docutils">
<dt>rstpep2html.py --add-stylesheet-path custom.css </dt>
<dd>--add-stylesheet <a class="reference external" href="http://www.example.org/external.css">http://www.example.org/external.css</a> ...</dd>
</dl>
</blockquote>
<p>This run will use only the second custom stylesheet:</p>
<blockquote>
<dl class="docutils">
<dt>rstpep2html.py --add-stylesheet-path custom.css </dt>
<dd>--stylesheet-path second.css ...</dd>
</dl>
</blockquote>
</div>
</div>
</div>
<div class="section" id="front-end-tools">
<h1><a class="toc-backref" href="#id55">Front-End Tools</a></h1>
<ul>
<li><p class="first">What about if we don't know which Reader and/or Writer we are
going to use?  If the Reader/Writer is specified on the
command-line?  (Will this ever happen?)</p>
<p>Perhaps have different types of front ends:</p>
<ol class="loweralpha simple">
<li><span class="target" id="fully-qualified">Fully qualified</span>: Reader and Writer are hard-coded into the
front end (e.g. <tt class="docutils literal">pep2html [options]</tt>, <tt class="docutils literal">pysource2pdf
[options]</tt>).</li>
<li><span class="target" id="partially-qualified">Partially qualified</span>: Reader is hard-coded, and the Writer is
specified a sub-command (e.g. <tt class="docutils literal">pep2 html [options]</tt>,
<tt class="docutils literal">pysource2 pdf [options]</tt>).  The Writer is known before option
processing happens, allowing the OptionParser to be built
dynamically.  Alternatively, the Writer could be hard-coded and
the Reader specified as a sub-command (e.g. <tt class="docutils literal">htmlfrom pep
[options]</tt>).</li>
<li><span class="target" id="unqualified">Unqualified</span>: Reader and Writer are specified as subcommands
(e.g. <tt class="docutils literal">publish pep html [options]</tt>, <tt class="docutils literal">publish pysource pdf
[options]</tt>).  A single front end would be sufficient, but
probably only useful for testing purposes.</li>
<li><span class="target" id="dynamic">Dynamic</span>: Reader and/or Writer are specified by options, with
defaults if unspecified (e.g. <tt class="docutils literal">publish <span class="pre">--writer</span> pdf
[options]</tt>).  Is this possible?  The option parser would have
to be told about new options it needs to handle, on the fly.
Component-specific options would have to be specified <em>after</em>
the component-specifying option.</li>
</ol>
<p>Allow common options before subcommands, as in CVS?  Or group all
options together?  In the case of the <a class="reference internal" href="#fully-qualified">fully qualified</a>
front ends, all the options will have to be grouped together
anyway, so there's no advantage (we can't use it to avoid
conflicts) to splitting common and component-specific options
apart.</p>
</li>
<li><p class="first">Parameterize help text &amp; defaults somehow?  Perhaps a callback?  Or
initialize <tt class="docutils literal">settings_spec</tt> in <tt class="docutils literal">__init__</tt> or <tt class="docutils literal">init_options</tt>?</p>
</li>
<li><p class="first">Disable common options that don't apply?
(This should now be easier with <tt class="docutils literal">frontend.filter_settings_spec</tt>.)</p>
</li>
<li><p class="first">Add <tt class="docutils literal"><span class="pre">--section-numbering</span></tt> command line option.  The &quot;sectnum&quot;
directive should override the <tt class="docutils literal"><span class="pre">--no-section-numbering</span></tt> command
line option then.</p>
</li>
<li><p class="first">Create a single <a class="reference internal" href="#dynamic">dynamic</a> or <a class="reference internal" href="#unqualified">unqualified</a> front end that can be
installed?</p>
</li>
</ul>
<!-- Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
End: -->
</div>
</div>
</body>
</html>

Anon7 - 2022
AnonSec Team