5 :Author: David Goodger (with input from many); open to all Docutils
7 :Contact: docutils-develop@lists.sourceforge.net
10 :Copyright: This document has been placed in the public domain.
12 .. _Docutils: http://docutils.sourceforge.net/
17 Priority items are marked with "@" symbols. The more @s, the higher
18 the priority. Items in question form (containing "?") are ideas which
19 require more thought and debate; they are potential to-do's.
21 Many of these items are awaiting champions. If you see something
22 you'd like to tackle, please do! If there's something you'd like to
23 see done but are unable to implement it yourself, please consider
24 donating to Docutils: |donate|
26 .. |donate| image:: http://images.sourceforge.net/images/project-support.jpg
27 :target: http://sourceforge.net/donate/index.php?group_id=38414
31 :alt: Support the Docutils project!
33 Please see also the Bugs_ document for a list of bugs in Docutils.
35 .. _bugs: ../../BUGS.html
38 Minimum Requirements for Python Standard Library Candidacy
39 ==========================================================
41 Below are action items that must be added and issues that must be
42 addressed before Docutils can be considered suitable to be proposed
43 for inclusion in the Python standard library.
45 Many of these are now handled by Sphinx_
47 * Support for `document splitting`_. May require some major code
50 * Support for subdocuments (see `large documents`_).
52 * `Object numbering and object references`_.
54 * `Nested inline markup`_.
56 * `Python Source Reader`_.
58 * The HTML writer needs to be rewritten (or a second HTML writer
59 added) to allow for custom classes, and for arbitrary splitting
62 * Documentation_ of the architecture. Other docs too.
66 * Suitability for `Python module documentation
67 <http://docutils.sf.net/sandbox/README.html#documenting-python>`_.
69 .. _Sphinx: http://sphinx.pocoo.org/
74 * Move to single source for Python 2 and Python 3.
75 (Cf. `Porting Python 2 Code to Python 3`_ and
76 `clean single-source support for Python 2/3`_.)
78 - Gradually phase out support for Python 2.4 and 2.5 first.
80 .. _Porting Python 2 Code to Python 3:
81 https://docs.python.org/3/howto/pyporting.html
82 .. _clean single-source support for Python 2/3:
83 http://python-future.org
85 * Encoding of command line arguments can only be guessed:
87 * try UTF-8/strict first, then try the locale's encoding with
88 strict error handling, then ASCII/replace?
90 UTF-8 is almost 100% safe to try first; false positives are rare,
91 The locale's encoding with strict error handling may be a
92 reasonable compromise, but any error would indicate that the
93 locale's encoding is inappropriate. The only safe fallback is
96 * Do not decode argv before option parsing but individual string
99 +1 Allows for separate command-line vs. filesystem encodings,
100 respectively to keep file names encoded.
101 +1 Allows to configure command-line encoding in a config file,
104 Cf. <http://thread.gmane.org/gmane.text.docutils.user/2890/focus=2957>.
106 * Improve handling on Windows:
108 - Get graphical installer.
109 - Make rst2html.py an .exe file using py2exe.
113 The user interface is very difficult to use for most Windows users;
114 you can't really expect them to use the command line. We need some
115 kind of GUI that can launch rst2html.py, and save the HTML output to
116 a file, and launch a browser. What's important is that we get
117 settings to work with the GUI. So we need some way to dynamically
118 generate a list of settings for the GUI. The current settings_spec
119 for OptionParser doesn't seem to be usable for this for the
122 - It's biased toward the command line -- there are *two* options for
125 - You cannot have both a one-line description and a longer
126 description for tooltips/help-texts.
128 - It doesn't provide hints for the input type. You cannot easily
129 infer the type of a setting from its validator, because any
130 component can add new validators. In fact, it may be necessary to
131 have both a hint about the input type (e.g. string) and a
132 validator (valid ID), or it may be necessary to have a different
133 set of choices for the CLI (1, INFO, 2, ...) and for the GUI
134 (INFO, WARNING, ...).
136 - It's coupled to the OptionParser. We want to be able to change
137 the underlying system without breaking everything.
139 - It's a bunch of primitive structures. We want an extensible (thus
140 object-oriented) interface.
142 So we probably need to create a class for storing all the settings,
143 and auto-generate the OptionParser data from that.
145 I talked to Stephan Deibel about getting Docutils integrated into
146 Wing IDE. He said it's possible, and he'd be willing to help.
147 There's a scripting interface to Wing, which we'd use. We can
148 dynamically generate a list of preferences and not worry too much
149 about the rendering (from what I understood); Wing's whole GUI is
150 dynamic anyway. The interface could be made usable for other GUIs.
151 For example, we could try to get option support for DocFactory. //
154 * Allow different report levels for STDERR and system_messages inside
157 * Change the docutils-update script (in sandbox/infrastructure), to
158 support arbitrary branch snapshots.
160 * Move some general-interest sandboxes out of individuals'
161 directories, into subprojects?
163 * Add option for file (and URL) access restriction to make Docutils
164 usable in Wikis and similar applications.
166 2005-03-21: added ``file_insertion_enabled`` & ``raw_enabled``
167 settings. These partially solve the problem, allowing or disabling
168 **all** file accesses, but not limited access.
170 * Configuration file handling needs discussion:
172 - There should be some error checking on the contents of config
173 files. How much checking should be done? How loudly should
174 Docutils complain if it encounters an error/problem?
176 - Docutils doesn't complain when it doesn't find a configuration
177 file supplied with the ``--config`` option. Should it? (If yes,
180 * Internationalization:
182 - I18n needs refactoring, the language dictionaries are difficult to
183 maintain. Maybe have a look at gettext or similar tools.
185 (This would make a nice Google Summer of Code project)
187 - Language modules: in accented languages it may be useful to have
188 both accented and unaccented entries in the
189 ``bibliographic_fields`` mapping for versatility.
191 - Add a "--strict-language" option & setting: no English fallback
192 for language-dependent features.
194 Make this the default for output (as opposed to input)?
195 Throw an error with a helpfull message, e.g.
197 Default "contents" title for language %s missing, please specify
202 "attention" title for language %s missing, please use a generic
203 admonition with explicit title.
205 - Add internationalization to _`footer boilerplate text` (resulting
206 from "--generator", "--source-link", and "--date" etc.), allowing
210 * Add validation? See http://pytrex.sourceforge.net, RELAX NG, pyRXP.
212 * In ``docutils.readers.get_reader_class`` (& ``parsers`` &
213 ``writers`` too), should we be importing "standalone" or
214 "docutils.readers.standalone"? (This would avoid importing
215 top-level modules if the module name is not in docutils/readers.
216 Potential nastiness.)
218 * Perhaps store a _`name-to-id mapping file`? This could be stored
219 permanently, read by subsequent processing runs, and updated with
220 new entries. ("Persistent ID mapping"?)
222 * Perhaps the ``Component.supports`` method should deal with
223 individual features ("meta" etc.) instead of formats ("html" etc.)?
225 * Think about _`large documents` made up of multiple subdocument
226 files. Issues: continuity (`persistent sequences`_ above),
227 cross-references (`name-to-id mapping file`_ above and `targets in
228 other documents`_ below), splitting (`document splitting`_ below).
230 When writing a book, the author probably wants to split it up into
231 files, perhaps one per chapter (but perhaps even more detailed).
232 However, we'd like to be able to have references from one chapter to
233 another, and have continuous numbering (pages and chapters, as
234 applicable). Of course, none of this is implemented yet. There has
235 been some thought put into some aspects; see `the "include"
236 directive`__ and the `Reference Merging`_ transform below.
238 When I was working with SGML in Japan, we had a system where there
239 was a top-level coordinating file, book.sgml, which contained the
240 top-level structure of a book: the <book> element, containing the
241 book <title> and empty component elements (<preface>, <chapter>,
242 <appendix>, etc.), each with filename attributes pointing to the
243 actual source for the component. Something like this::
246 <title>Title of the Book</title>
247 <preface inrefid="pr01"></preface>
248 <chapter inrefid="ch01"></chapter>
249 <chapter inrefid="ch02"></chapter>
250 <chapter inrefid="ch03"></chapter>
251 <appendix inrefid="ap01"></appendix>
254 (The "inrefid" attribute stood for "insertion reference ID".)
256 The processing system would process each component separately, but
257 it would recognize and use the book file to coordinate chapter and
258 page numbering, and keep a persistent ID to (title, page number)
259 mapping database for cross-references. Docutils could use a similar
260 system for large-scale, multipart documents.
262 __ ../ref/rst/directives.html#including-an-external-document-fragment
278 As I said earlier in chapter :chapter:`Objects.txt`, the
279 reference count gets increased every time a binding is made.
283 As I said earlier in chapter 2, the
284 reference count gets increased every time a binding is made.
286 The ToC in this form doesn't even need to be references to actual
287 reST documents; I'm simply doing it that way for a minimum of
288 future-proofing, in case I do want to add the ability to pick up
289 references within external chapters.
291 Perhaps, instead of ToC (which would overload the "contents"
292 directive concept already in use), we could use "manifest". A
293 "manifest" directive might associate local reference names with
297 intro: Introduction.txt
302 Then the sample becomes::
304 .. include:: manifest.txt
306 As I said earlier in chapter :chapter:`objects`, the
307 reference count gets increased every time a binding is made.
309 * Add support for _`multiple output files` and _`generic data
312 It should be possible for a component to **emit or reference** data
313 to be either **included or referenced** in the output document.
314 Examples of such data are stylesheets or images.
316 For this, we need a "data" object which stores the data either
317 inline or by referring to a file. The Docutils framework is
318 responsible for either:
320 * storing the data in the appropriate location (e.g. in the
321 directory of the output file, or in a user-specified directory)
322 and providing the paths of the stored files to the writer, *or*
324 * providing the data itself to the writer so that it can be embedded
325 in the output document.
327 This approach decouples data handling from the data source (which
328 can either be embedded or referenced) and the destination (which can
329 either be embedded or referenced as well).
331 See <http://article.gmane.org/gmane.text.docutils.devel/3631>.
333 * Add testing for Docutils' front end tools?
335 * Publisher: "Ordinary setup" shouldn't requre specific ordering; at
336 the very least, there ought to be error checking higher up in the
339 ``Publisher.get_settings`` requires that all components be set up
340 before it's called. Perhaps the I/O *objects* shouldn't be set, but
341 I/O *classes*. Then options are set up (``.set_options``), and
342 ``Publisher.set_io`` (or equivalent code) is called with source &
343 destination paths, creating the I/O objects.
345 Perhaps I/O objects shouldn't be instantiated until required. For
346 split output, the Writer may be called multiple times, once for each
347 doctree, and each doctree should have a separate Output object (with
348 a different path). Is the "Builder" pattern applicable here?
350 * Perhaps I/O objects should become full-fledged components (i.e.
351 subclasses of ``docutils.Component``, as are Readers, Parsers, and
352 Writers now), and thus have associated option/setting specs and
355 * Multiple file I/O suggestion from Michael Hudson: use a file-like
356 object or something you can iterate over to get file-like objects.
358 * Add an "--input-language" option & setting? Specify a different
359 language module for input (bibliographic fields, directives) than
360 for output. The "--language" option would set both input & output
363 * Auto-generate reference tables for language-dependent features?
364 Could be generated from the source modules. A special command-line
365 option could be added to Docutils front ends to do this. (Idea from
368 * Enable feedback of some kind from internal decisions, such as
369 reporting the successful input encoding. Modify runtime settings?
370 System message? Simple stderr output?
372 * Rationalize Writer settings (HTML/LaTeX/PEP) -- share settings.
374 * Add an "--include file" command-line option (config setting too?),
375 equivalent to ".. include:: file" as the first line of the doc text?
376 Especially useful for character entity sets, text transform specs,
379 * Support "include" as embedded inline-compatible directive in substitution
382 .. |version| include:: version.txt
384 This document describes version |version| of ...
386 (cf. Grzegorz Adam Hankiewicz's post from 2014-10-01 in docutils-devel)
388 * Add an ``:optional: <replacement text>`` option to the "include"
389 directive? This would not throw an error for a missing file, instead a
390 warning is given and ``<replacement text>`` is used instead. It would be
391 the responsibility of the author to ensure the missing file does not lead
392 to problems later in the document.
396 + Standard rST syntax to replace Sphinx's "literalinclude"::
398 .. include:: blah.cpp
400 :optional: file ``blah.cpp`` not found
402 + Variable content taken from a file, e.g.
406 .. |version| replace:: 3.1
410 .. include:: version.txt
411 :optional: .. |version| replace:: unknown
413 This document describes version |version| of ...
415 (cf. Grzegorz Adam Hankiewicz's post from 2014-10-01 in docutils-devel)
417 * Parameterize the Reporter object or class? See the `2004-02-18
418 "rest checking and source path"`_ thread.
420 .. _2004-02-18 "rest checking and source path":
421 http://thread.gmane.org/gmane.text.docutils.user/1112
423 * Add a "disable_transforms" setting? And a dummy Writer subclass
424 that does nothing when its .write() method is called? Would allow
425 for easy syntax checking. See the `2004-02-18 "rest checking and
426 source path"`_ thread.
428 * Add a generic meta-stylesheet mechanism? An external file could
429 associate style names ("class" attributes) with specific elements.
430 Could be generalized to arbitrary output attributes; useful for HTML
431 & XMLs. Aahz implemented something like this in
432 sandbox/aahz/Effective/EffMap.py.
434 * .. _classes for table cells:
436 William Dode suggested that table cells be assigned "class"
437 attributes by columns, so that stylesheets can affect text
438 alignment. Unfortunately, there doesn't seem to be a way (in HTML
439 at least) to leverage the "colspec" elements (HTML "col" tags) by
440 adding classes to them. The resulting HTML is very verbose::
442 <td class="col1">111</td>
443 <td class="col2">222</td>
446 At the very least, it should be an option. People who don't use it
447 shouldn't be penalized by increases in their HTML file sizes.
449 Table rows could also be assigned classes (like odd/even). That
450 would be easier to implement.
452 How should it be implemented?
454 * There could be writer options (column classes & row classes) with
457 * The table directive could grow some options. Something like
458 ":cell-classes: col1 col2 col3" (either must match the number of
459 columns, or repeat to fill?) and ":row-classes: odd even" (repeat
460 to fill; body rows only, or header rows too?).
462 Probably per-table directive options are best. The "class" values
463 could be used by any writer, and applying such classes to all tables
464 in a document with writer options is too broad.
466 * Add file-specific settings support to config files, like::
471 Is this even possible? Should the criterion be the name of the
472 input file or the output file? Alternative (more explicit) syntax::
474 [source_file index.txt]
477 [dest_file index.html]
480 Or rather allow settings configuration from the rst source file
481 (see misc.settings_ directive)?
483 * The "validator" support added to OptionParser is very similar to
484 "traits_" in SciPy_. Perhaps something could be done with them?
485 (Had I known about traits when I was implementing docutils.frontend,
486 I may have used them instead of rolling my own.)
488 .. _traits: http://code.enthought.com/traits/
489 .. _SciPy: http://www.scipy.org/
491 * tools/buildhtml.py: Extend the --prune option ("prune" config
492 setting) to accept file names (generic path) in addition to
493 directories (e.g. --prune=docs/user/rst/cheatsheet.txt, which should
494 *not* be converted to HTML).
496 * Add support for _`plugins`.
498 * _`Config directories`: Currently, ~/.docutils, ./docutils.conf/, &
499 /etc/docutils.conf are read as configuration files. Proposal: allow
500 ~/.docutils to be a a configuration *directory*, along with
501 /etc/docutils/ and ./docutils.conf/. Within these directories,
502 check for config.txt files. We can also have subdirectories here,
503 for plugins, S5 themes, components (readers/writers/parsers) etc.
505 Docutils will continue to support configuration files for backwards
508 * Add support for document decorations other than headers & footers?
509 For example, top/bottom/side navigation bars for web pages. Generic
512 Seems like a bad idea as long as it isn't independent from the ouput
513 format (for example, navigation bars are only useful for web pages).
515 * docutils_update: Check for a ``Makefile`` in a directory, and run
516 ``make`` if found? This would allow for variant processing on
517 specific source files, such as running rst2s5.py instead of
520 * Add a "disable table of contents" setting? The S5 writer could set
521 it as a default. Rationale:
523 The ``contents`` (table of contents) directive must not be used
524 [in S5/HTML documents]. It changes the CSS class of headings
525 and they won't show up correctly in the screen presentation.
527 -- `Easy Slide Shows With reStructuredText & S5
528 <../user/slide-shows.html>`_
530 Analogue to the ``sectnum_xform`` setting, it could be used by the
531 latex writer to switch to a LaTeX generated ToC (currently, the latex
532 writer calls it "use_latex_toc").
534 object numbering and object references
535 --------------------------------------
537 For equations, tables & figures.
539 These would be the equivalent of DocBook's "formal" elements.
541 In LaTeX, automatic counters are implemented for sections, equations and
542 floats (figures, tables) (configurable via stylesheets or in the
543 latex-preamble). Objects can be given `reference names`_ with the
544 ``\label{<refname}`` command, ``\ref{<refname>}`` inserts the
545 corresponding number.
547 No such mechanism exists in HTML.
549 * We need _`persistent sequences`, similar to chapter and footnote
550 numbers. See `OpenOffice.org XML`_ "fields".
552 - Should the sequences be automatic or manual (user-specifyable)?
554 * It is already possible to give `reference names`_ to objects via
555 internal hyperlink targets or the "name" directive option::
559 .. figure:: image.png
563 .. figure:: image.png
566 Improve the mapping of "phrase references" to IDs/labels with
567 Literal transcription (i.e. ü -> ue, ß -> ss, å -> aa) instead of just
568 stripping the accents and other non-ASCII chars.
569 Use http://pypi.python.org/pypi/Unidecode?
571 A "table" directive has been implemented, supporting table titles.
573 Perhaps the name could derive from the title/caption?
575 .. _reference names: ../ref/rst/restructuredtext.html#reference-names
577 * We need syntax for object references. Cf. `OpenOffice.org XML`_
580 - Parameterized substitutions are too complicated
581 (cf. `or not to do`: `object references`_)
583 - An interpreted text approach is simpler and better::
585 See Figure :ref:`figure name` and Equation :ref:`eq:identity`.
587 - "equation", "figure", and "page" roles could generate appropriate
590 See :figure:`figure name` on :page:`figure name`.
592 See `Interpreted Text`_ below.
594 Reference boilerplate could be specified in the document
595 (defaulting to nothing)::
598 :prefix-ref: "Figure "
599 :prefix-caption: "Fig. "
602 The position of the role (prefix or suffix) could also be utilized
604 .. _OpenOffice.org XML: http://xml.openoffice.org/
605 .. _object references: rst/alternatives.html#object-references
607 See also the `Modified rst2html
608 <http://www.loria.fr/~rougier/coding/article/rst2html.py>`__
609 by Nicolas Rougier for a sample implementation.
618 * Add a FAQ entry about using Docutils (with reStructuredText) on a
619 server and that it's terribly slow. See the first paragraphs in
620 <http://article.gmane.org/gmane.text.docutils.user/1584>.
622 * Add document about what Docutils has previously been used for
623 (web/use-cases.txt?).
625 * Improve index in docs/user/config.txt.
631 * Complete `Docutils Runtime Settings <../api/runtime-settings.html>`_.
633 * Improve the internal module documentation (docstrings in the code).
634 Specific deficiencies listed below.
636 - docutils.parsers.rst.states.State.build_table: data structure
637 required (including StringList).
639 - docutils.parsers.rst.states: more complete documentation of parser
642 * docs/ref/doctree.txt: DTD element structural relationships,
643 semantics, and attributes. In progress; element descriptions to be
646 * Document the ``pending`` elements, how they're generated and what
649 * Document the transforms (perhaps in docstrings?): how they're used,
650 what they do, dependencies & order considerations.
652 * Document the HTML classes used by html4css1.py.
654 * Write an overview of the Docutils architecture, as an introduction
655 for developers. What connects to what, why, and how. Either update
656 PEP 258 (see PEPs_ below) or as a separate doc.
658 * Give information about unit tests. Maybe as a howto?
660 * Document the docutils.nodes APIs.
662 * Complete the docs/api/publisher.txt docs.
668 * Creating Docutils Writers
670 * Creating Docutils Readers
672 * Creating Docutils Transforms
674 * Creating Docutils Parsers
676 * Using Docutils as a Library
682 * Complete PEP 258 Docutils Design Specification.
684 - Fill in the blanks in API details.
686 - Specify the nodes.py internal data structure implementation?
688 [Tibs:] Eventually we need to have direct documentation in
689 there on how it all hangs together - the DTD is not enough
690 (indeed, is it still meant to be correct? [Yes, it is.
693 * Rework PEP 257, separating style from spec from tools, wrt Docutils?
694 See Doc-SIG from 2001-06-19/20.
702 * Analyze Tony Ibbs' PySource code.
704 * Analyze Doug Hellmann's HappyDoc project.
706 * Investigate how POD handles literate programming.
708 * Take the best ideas and integrate them into Docutils.
712 * Ask Python-dev for opinions (GvR for a pronouncement) on special
713 variables (__author__, __version__, etc.): convenience vs. namespace
714 pollution. Ask opinions on whether or not Docutils should recognize
717 * If we can detect that a comment block begins with ``##``, a la
718 JavaDoc, it might be useful to indicate interspersed section headers
719 & explanatory text in a module. For example::
721 """Module docstring."""
734 class MyException(Exception): pass
738 * Should standalone strings also become (module/class) docstrings?
739 Under what conditions? We want to prevent arbitrary strings from
740 becomming docstrings of prior attribute assignments etc. Assume
741 that there must be no blank lines between attributes and attribute
742 docstrings? (Use lineno of NEWLINE token.)
744 Triple-quotes are sometimes used for multi-line comments (such as
745 commenting out blocks of code). How to reconcile?
747 * HappyDoc's idea of using comment blocks when there's no docstring
748 may be useful to get around the conflict between `additional
749 docstrings`_ and ``from __future__ import`` for module docstrings.
750 A module could begin like this::
752 #!/usr/bin/env python
754 # :Copyright: whatever
756 """This is the public module docstring (``__doc__``)."""
758 # More docs, in comments.
759 # All comments at the beginning of a module could be
760 # accumulated as docstrings.
761 # We can't have another docstring here, because of the
762 # ``__future__`` statement.
764 from __future__ import division
766 Using the JavaDoc convention of a doc-comment block beginning with
767 ``##`` is useful though. It allows doc-comments and implementation
770 .. _additional docstrings:
771 ../peps/pep-0258.html#additional-docstrings
773 * HappyDoc uses an initial comment block to set "parser configuration
774 values". Do the same thing for Docutils, to set runtime settings on
775 a per-module basis? I.e.::
777 # Docutils:setting=value
779 Could be used to turn on/off function parameter comment recognition
780 & other marginal features. Could be used as a general mechanism to
781 augment config files and command-line options (but which takes
784 * Multi-file output should be divisible at arbitrary level.
786 * Support all forms of ``import`` statements:
788 - ``import module``: listed as "module"
789 - ``import module as alias``: "alias (module)"
790 - ``from module import identifier``: "identifier (from module)"
791 - ``from module import identifier as alias``: "alias (identifier
793 - ``from module import *``: "all identifiers (``*``) from module"
795 * Have links to colorized Python source files from API docs? And
796 vice-versa: backlinks from the colorized source files to the API
799 * In summaries, use the first *sentence* of a docstring if the first
800 line is not followed by a blank line.
803 reStructuredText Parser
804 =======================
806 Also see the `... Or Not To Do?`__ list.
808 __ rst/alternatives.html#or-not-to-do
813 * Another list problem::
819 This ends up as a definition list. This is more of a usability
822 * This case is probably meant to be a nested list, but it ends up as a
823 list inside a block-quote without an error message::
829 It should probably just be an error.
831 The problem with this is that you don't notice easily in HTML that
832 it's not a nested list but a block-quote -- there's not much of a
835 * Treat enumerated lists that are not arabic and consist of only one
836 item in a single line as ordinary paragraphs. See
837 <http://article.gmane.org/gmane.text.docutils.user/2635>.
839 * The citation syntax could use some improvements. See
840 <http://thread.gmane.org/gmane.text.docutils.user/2499> (and the
842 <http://thread.gmane.org/gmane.text.docutils.user/2499/focus=3028>,
843 and the follow-ups at
844 <http://thread.gmane.org/gmane.text.docutils.user/3087>,
845 <http://thread.gmane.org/gmane.text.docutils.user/3110>,
846 <http://thread.gmane.org/gmane.text.docutils.user/3114>),
847 <http://thread.gmane.org/gmane.text.docutils.user/2443>,
848 <http://thread.gmane.org/gmane.text.docutils.user/2715>,
849 <http://thread.gmane.org/gmane.text.docutils.user/3027>,
850 <http://thread.gmane.org/gmane.text.docutils.user/3120>,
851 <http://thread.gmane.org/gmane.text.docutils.user/3253>.
853 * The current list-recognition logic has too many false positives, as
860 Here ``V.`` is recognized as an enumerator, which leads to
861 confusion. We need to find a solution that resolves such problems
862 without complicating the spec to much.
864 See <http://thread.gmane.org/gmane.text.docutils.user/2524>.
866 * Add indirect links via citation references & footnote references.
869 `Goodger (2005)`_ is helpful.
871 .. _Goodger (2005): [goodger2005]_
872 .. [goodger2005] citation text
874 See <http://thread.gmane.org/gmane.text.docutils.user/2499>.
876 * Complain about bad URI characters
877 (http://article.gmane.org/gmane.text.docutils.user/2046) and
878 disallow internal whitespace
879 (http://article.gmane.org/gmane.text.docutils.user/2214).
881 * Create ``info``-level system messages for unnecessarily
882 backslash-escaped characters (as in ``"\something"``, rendered as
883 "something") to allow checking for errors which silently slipped
886 * Add (functional) tests for untested roles.
888 * Add test for ":figwidth: image" option of "figure" directive. (Test
889 code needs to check if PIL is available on the system.)
891 * Add support for CJK double-width whitespace (indentation) &
892 punctuation characters (markup; e.g. double-width "*", "-", "+")?
894 * Add motivation sections for constructs in spec.
896 * Support generic hyperlink references to _`targets in other
897 documents`? Not in an HTML-centric way, though (it's trivial to say
898 ``http://www.example.com/doc#name``, and useless in non-HTML
899 contexts). XLink/XPointer? ``.. baseref::``? See Doc-SIG
902 * .. _adaptable file extensions:
904 In target URLs, it would be useful to not explicitly specify the
905 file extension. If we're generating HTML, then ".html" is
906 appropriate; if PDF, then ".pdf"; etc. How about using ".*" to
907 indicate "choose the most appropriate filename extension"? For
910 .. _Another Document: another.*
912 What is to be done for output formats that don't *have* hyperlinks?
913 For example, LaTeX targeted at print. Hyperlinks may be "called
914 out", as footnotes with explicit URLs. (Don't convert the links.)
916 But then there's also LaTeX targeted at PDFs, which *can* have
917 links. Perhaps a runtime setting for "*" could explicitly provide
918 the extension, defaulting to the output file's extension.
920 Should the system check for existing files? No, not practical.
922 Handle documents only, or objects (images, etc.) also?
924 If this handles images also, how to differentiate between document
925 and image links? Element context (within "image")? Which image
926 extension to use for which document format? Again, a runtime
927 setting would suffice.
929 This may not be just a parser issue; it may need framework support.
931 Mailing list threads: `Images in both HTML and LaTeX`__ (especially
932 `this summary of Lea's objections`__), `more-universal links?`__,
933 `Output-format-sensitive link targets?`__
935 __ http://thread.gmane.org/gmane.text.docutils.user/1239
936 __ http://article.gmane.org/gmane.text.docutils.user/1278
937 __ http://thread.gmane.org/gmane.text.docutils.user/1915
938 __ http://thread.gmane.org/gmane.text.docutils.user/2438
940 Idea from Jim Fulton: an external lookup table of targets:
942 I would like to specify the extension (e.g. .txt) [in the
943 source, rather than ``filename.*``], but tell the converter to
944 change references to the files anticipating that the files will
949 .. _Another Document: another.txt
951 rst2html.py --convert-links "another.txt bar.txt" foo.txt
953 That is, name the files for which extensions should be converted.
955 Note that I want to refer to original files in the original text
956 (another.txt rather than another.txt) because I want the
957 unconverted text to stand on its own.
959 Note that in most cases, people will be able to use globs::
961 rst2html.py --convert-link-extensions-for "`echo *.txt`" foo.txt
963 It might be nice to be able to use multiple arguments, as in::
965 rst2html.py --convert-link-extensions-for *.txt -- foo.txt
969 > What is to be done for output formats
970 > that don't have hyperlinks?
972 Don't convert the links.
976 > Handle documents only, or objects
977 > (images, etc.) also?
979 No, documents only, but there really is no need for gueswork.
980 Just get the file names as command-line arguments. EIBTI
981 [explicit is better than implicit].
983 For images, we probably need separate solution (which is being
984 worked on), whereas for documents, the issue is basically
985 interlinking between reStructuredText documents. IMO, this cries
986 for support for multiple input and output files, i.e. support for
987 documents which comprise multiple files. Adding adaptable file
988 extensions seems like a kludge. // FW
990 * Implement the header row separator modification to table.el. (Wrote
991 to Takaaki Ota & the table.el mailing list on 2001-08-12, suggesting
992 support for "=====" header rows. On 2001-08-17 he replied, saying
993 he'd put it on his to-do list, but "don't hold your breath".)
995 * Fix the parser's indentation handling to conform with the stricter
996 definition in the spec. (Explicit markup blocks should be strict or
999 .. XXX What does this mean? Can you elaborate, David?
1001 * Make the parser modular. Allow syntax constructs to be added or
1002 disabled at run-time. Subclassing is probably not enough because it
1003 makes it difficult to apply multiple extensions.
1005 * Generalize the "doctest block" construct (which is overly
1006 Python-centric) to other interactive sessions? "Doctest block"
1007 could be renamed to "I/O block" or "interactive block", and each of
1008 these could also be recognized as such by the parser:
1013 A block beginning with a "$ " prompt is interpreted as a shell
1014 session interactive block. As with Doctest blocks, the
1015 interactive block ends with the first blank line, and wouldn't
1016 have to be indented.
1018 - Root shell sessions::
1021 A block beginning with a "# " prompt is interpreted as a root
1022 shell session (the user is or has to be logged in as root)
1023 interactive block. Again, the block ends with a blank line.
1025 Other standard (and unambiguous) interactive session prompts could
1026 easily be added (such as "> " for WinDOS).
1028 Tony Ibbs spoke out against this idea (2002-06-14 Doc-SIG thread
1029 "docutils feedback").
1031 * Add support for pragma (syntax-altering) directives.
1033 Some pragma directives could be local-scope unless explicitly
1034 specified as global/pragma using ":global:" options.
1036 * Support whitespace in angle-bracketed standalone URLs according to
1037 Appendix E ("Recommendations for Delimiting URI in Context") of `RFC
1040 .. _RFC 2396: http://www.rfc-editor.org/rfc/rfc2396.txt
1042 * Use the vertical spacing of the source text to determine the
1043 corresponding vertical spacing of the output?
1045 * [From Mark Nodine] For cells in simple tables that comprise a
1046 single line, the justification can be inferred according to the
1049 1. If the text begins at the leftmost column of the cell,
1050 then left justification, ELSE
1051 2. If the text begins at the rightmost column of the cell,
1052 then right justification, ELSE
1053 3. Center justification.
1055 The onus is on the author to make the text unambiguous by adding
1056 blank columns as necessary. There should be a parser setting to
1057 turn off justification-recognition (normally on would be fine).
1059 Decimal justification?
1061 All this shouldn't be done automatically. Only when it's requested
1062 by the user, e.g. with something like this::
1069 Otherwise it will break existing documents.
1071 * Generate a warning or info message for paragraphs which should have
1072 been lists, like this one::
1077 * Generalize the "target-notes" directive into a command-line option
1078 somehow? See docutils-develop 2003-02-13.
1080 * Allow a "::"-only paragraph (first line, actually) to introduce a
1081 _`literal block without a blank line`? (Idea from Paul Moore.) ::
1084 This is a literal block
1086 Is indentation enough to make the separation between a paragraph
1087 which contains just a ``::`` and the literal text unambiguous?
1088 (There's one problem with this concession: If one wants a definition
1089 list item which defines the term "::", we'd have to escape it.) It
1090 would only be reasonable to apply it to "::"-only paragraphs though.
1091 I think the blank line is visually necessary if there's text before
1094 The text in this paragraph needs separation
1095 from the literal block following::
1096 This doesn't look right.
1098 * Add new syntax for _`nested inline markup`? Or extend the parser to
1099 parse nested inline markup somehow? See the `collected notes
1100 <rst/alternatives.html#nested-inline-markup>`__.
1102 * Drop the backticks from embedded URIs with omitted reference text?
1103 Should the angle brackets be kept in the output or not? ::
1107 Probably not worth the trouble.
1109 * How about a syntax for alternative hyperlink behavior, such as "open
1110 in a new window" (as in HTML's ``<a target="_blank">``)?
1112 The MoinMoin wiki uses a caret ("^") at the beginning of the URL
1113 ("^" is not a legal URI character). That could work for both inline
1114 and explicit targets::
1116 The `reference docs <^url>`__ may be handy.
1120 This may be too specific to HTML. It hasn't been requested very
1123 * Add an option to add URI schemes at runtime.
1125 * _`Segmented lists`::
1127 : segment : segment : segment
1128 : segment : segment : very long
1130 : segment : segment : segment
1132 The initial colon (":") can be thought of as a type of bullet
1134 We could even have segment titles::
1136 :: title : title : title
1137 : segment : segment : segment
1138 : segment : segment : segment
1140 This would correspond well to DocBook's SegmentedList. Output could
1141 be tabular or "name: value" pairs, as described in DocBook's docs.
1143 * Allow backslash-escaped colons in field names::
1145 :Case Study\: Event Handling: This chapter will be dropped.
1147 * Enable grid _`tables inside XML comments`, where "``--``" ends comments.
1149 Implementation possibilities:
1151 1. Make the table syntax characters into "table" directive options.
1152 This is the most flexible but most difficult, and we probably
1153 don't need that much flexibility.
1155 2. Substitute "~" for "-" with a specialized directive option
1158 3. Make the standard table syntax recognize "~" as well as "-", even
1159 without a directive option. Individual tables would have to be
1160 internally consistent.
1162 4. Allow Unicode box characters for table markup
1163 (`feature request [6]`_)
1165 Directive options are preferable to configuration settings, because
1166 tables are document-specific. A pragma directive would be another
1167 approach, to set the syntax once for a whole document.
1169 Unicode box character markup would kill two birds with one stone.
1171 In the meantime, the list-table_ directive is a good replacement for
1172 grid tables inside XML comments.
1174 .. _feature request [6]:
1175 http://sourceforge.net/p/docutils/feature-requests/6
1176 .. _list-table: ../ref/rst/directives.html#list-table
1179 * Generalize docinfo contents (bibliographic fields): remove specific
1180 fields, and have only a single generic "field"?
1182 * _`Line numbers` and "source" in system messages:
1184 - Add "source" and "line" keyword arguments to all Reporter calls?
1185 This would require passing source/line arguments along all
1186 intermediate functions (where currently only `line` is used).
1188 Or rather specify "line" only if actually needed?
1190 Currently, `document.reporter` uses a state machine instance to
1191 determine the "source" and "line" info from
1192 `statemachine.input_lines` if not given explicitely. Except for
1193 special cases, the "line" argument is not needed because,
1194 `document.statemachine` keeps record of the current line number.
1196 - For system messages generated after the parsing is completed (i.e. by
1197 transforms or the writer) "line" info must be present in the doctree
1200 Elements' .line assignments should be checked. (Assign to .source
1201 too? Add a set_info method? To what?)
1203 The "source" (and line number in the source) can either be added
1204 explicitely to the elements or determined from the “raw” line
1205 number by `document.statemachine.get_source_and_line`.
1207 - Some line numbers in elements are not being set properly
1208 (explicitly), just implicitly/automatically. See rev. 1.74 of
1209 docutils/parsers/rst/states.py for an example of how to set.
1211 - The line numbers of definition list items are wrong::
1213 $ rst2pseudoxml.py --expose-internal-attribute line
1222 <document source="<stdin>">
1224 <definition_list_item internal:line="3">
1228 <paragraph internal:line="2">
1231 <definition_list_item internal:line="6">
1235 <paragraph internal:line="6">
1241 Quite a few nodes are getting a "None" source attribute as well. In
1242 particular, see the bodies of definition lists.
1249 Since Docutils 0.8, a "math" role and directive using LaTeX math
1250 syntax as input format is part of reStructuredText.
1254 * Use a "Transform" for math format conversions as extensively discussed in
1255 the "math directive issues" thread in May 2008
1256 (http://osdir.com/ml/text.docutils.devel/2008-05/threads.html)?
1258 * Generic "math-output" option (currently specific to HTML).
1259 (List of math-output preferences?)
1261 * Try to be compatible with `Math support in Sphinx`_?
1263 * The ``:label:`` option selects a label for the equation, by which it
1264 can be cross-referenced, and causes an equation number to be issued.
1265 In Docutils, the option ``:name:`` sets the label.
1266 Equation numbering is not implemented yet.
1268 * Option ``:nowrap:`` prevents wrapping of the given math in a
1269 math environment (you have to specify the math environment in the
1272 .. _Math support in Sphinx: http://sphinx.pocoo.org/ext/math.html
1274 * Equation numbering and references. (Should be handled in a unified way
1275 with other numbered entities like formal tables and images.)
1277 alternative input formats
1278 `````````````````````````
1280 Use a directive option to specify an alternative input format, e.g. (but not
1284 Not for hand-written code but maybe usefull when pasted in (or included
1287 For an overview of MathML implementations and tests, see, e.g.,
1288 the `mathweb wiki`_ or the `ConTeXT MathML page`_.
1290 .. _MathML: http://www.w3.org/TR/MathML2/
1291 .. _mathweb wiki: http://www.mathweb.org/wiki/MathML
1292 .. _ConTeXT MathML page: http://wiki.contextgarden.net/MathML
1296 Simple, ASCII based math input language (see also `ASCIIMath tutorial`_).
1298 * The Python module ASCIIMathML_ translates a string with ASCIIMath into a
1299 MathML tree. Used, e.g., by MultiMarkdown__.
1301 A more comprehensive implementation is ASCIIMathPython_ by
1302 Paul Trembley (also used in his sandbox projects).
1304 * For conversion to LaTeX, there is a JavaScript script at
1305 http://dlippman.imathas.com/asciimathtex/ASCIIMath2TeX.js
1307 .. _ASCIIMath: http://www1.chapman.edu/~jipsen/mathml/asciimath.html
1308 .. _ASCIIMath tutorial:
1309 http://www.wjagray.co.uk/maths/ASCIIMathTutorial.html
1310 .. _ASCIIMathML: http://pypi.python.org/pypi/asciimathml/
1311 .. _ASCIIMathPython: http://sourceforge.net/projects/asciimathpython/
1312 __ http://fletcherpenney.net/multimarkdown/
1314 `Unicode Nearly Plain Text Encoding of Mathematics`_
1315 format for lightly marked-up representation of mathematical
1316 expressions in Unicode.
1318 (Unicode Technical Note. Sole responsibility for its contents rests
1319 with the author(s). Publication does not imply any endorsement by
1320 the Unicode Consortium.)
1322 .. _Unicode Nearly Plain Text Encoding of Mathematics:
1323 http://www.unicode.org/notes/tn28/
1326 See `the culmination of a relevant discussion in 2003
1327 <http://article.gmane.org/gmane.text.docutils.user/118>`__.
1334 Which equation environments should be supported by the math directive?
1338 + numbered: `equation`
1339 + unnumbered: `equation*`
1341 * multiline (test for ``\\`` outside of a nested environment
1342 (e.g. `array` or `cases`)
1344 + numbered: `align` (number every line)
1346 (To give one common number to all lines, put them in a `split`
1347 environment. Docutils then places it in an `equation` environment.)
1349 + unnumbered: `align*`
1351 + Sphinx math also supports `gather` (checking for blank lines in
1352 the content). Docutils puts content blocks separated by blank
1353 lines in separate math-block doctree nodes. (The only difference of
1354 `gather` to two consecutive "normal" environments seems to be that
1355 page-breaks between the two are prevented.)
1357 See http://www.math.uiuc.edu/~hildebr/tex/displays.html.
1363 There is no native math support in HTML.
1366 Converters from LaTeX to MathML include
1368 * latex_math_ (Python) by Jens Jørgen Mortensen in the Docutils sandbox
1370 This is the base for Docutils latex2mathml_ module used by
1371 default with ``--math-output=MathML``.
1373 * blahtexml_ (C++), supported with ``--math-output=MathML blahtexml``.
1375 Fast conversion, support for many symbols and environments, but
1376 no "align" (or other equation-aligning) environment.
1378 * LaTeXML_ (Perl), supported with ``--math-output=MathML latexml``.
1380 Comprehensive macro support but very slow
1382 * TtM_ (C), ``--math-output=MathML ttm``, support may be removed.
1384 No "matrix", "align" and "cases" environments.
1387 * TeX4ht_ (TeX based)
1388 * itex_ (also `used in Abiword`__)
1389 * `Steve’s LATEX-to-MathML translator`_
1390 ('mini-language', javascript, Python)
1392 * `MathJax for Node`_
1395 * Write a new converter? E.g. based on:
1397 * a generic tokenizer (see e.g. a `latex-codec recipe`_,
1398 `updated latex-codec`_, )
1399 * the Unicode-Char <-> LaTeX mappings database unimathsymbols_
1401 __ http://msevior.livejournal.com/26377.html
1402 .. _MathML: http://www.w3.org/TR/MathML2/
1403 .. _latex_math: ../../../sandbox/jensj/latex_math/
1404 .. _latex2mathml: ../../docutils/math/latex2mathml.py
1405 .. _blahtexml: http://gva.noekeon.org/blahtexml/
1406 .. _LaTeXML: http://dlmf.nist.gov/LaTeXML/
1407 .. _ttm: http://hutchinson.belmont.ma.us/tth/mml/
1408 .. _TeX4ht: http://www.tug.org/applications/tex4ht/mn.html
1409 .. _MathToWeb: http://www.mathtoweb.com/
1410 .. _itex: http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html
1411 .. _Steve’s LATEX-to-MathML translator:
1412 http://www.gold-saucer.org/mathml/greasemonkey/dist/display-latex
1413 .. _latex-codec recipe:
1414 http://code.activestate.com/recipes/252124-latex-codec/
1415 .. _updated latex-codec:
1416 http://mirror.ctan.org/biblio/bibtex/utils/mab2bib/latex.py
1417 .. _unimathsymbols: http://milde.users.sourceforge.net/LUCR/Math/
1418 .. _MathJax for Node: https://github.com/mathjax/MathJax-node
1421 .. _itex: http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html
1425 format math in standard HTML enhanced by CSS rules
1426 (Overview__, `Examples and experiments`__).
1428 The ``math-output=html`` option uses the converter from eLyXer_
1429 (included with Docutils).
1431 Alternatives: LaTeX-math to HTML/CSS converters include
1434 * Hevea_ (Objective Caml)
1435 * `MathJax for Node`_
1437 __ http://www.cs.tut.fi/~jkorpela/math/
1438 __ http://www.zipcon.net/~swhite/docs/math/math.html
1439 .. _elyxer: http://elyxer.nongnu.org/
1440 .. _TtH: ttp://hutchinson.belmont.ma.us/tth/index.html
1441 .. _Hevea: http://para.inria.fr/~maranget/hevea/
1444 (PNG or SVG) like e.g. Wikipedia. (e.g. with dvisvgm_ or the
1445 pure-python MathML->SVG converter SVGMath_)
1447 * `MathJax for Node`_
1450 .. _dvisvgm: http://dvisvgm.sourceforge.net/
1451 .. _SVGMath: http://www.grigoriev.ru/svgmath/
1457 * The `OpenDocument standard`_ version 1.1 says:
1459 Mathematical content is represented by MathML 2.0
1461 However, putting MathML into an ODP file seems tricky as these
1462 (maybe outdated) links suppose:
1463 http://idippedut.dk/post/2008/01/25/Do-your-math-ODF-and-MathML.aspx
1464 http://idippedut.dk/post/2008/03/03/Now-I-get-it-ODF-and-MathML.aspx
1466 .. _OpenDocument standard:
1467 http://www.oasis-open.org/standards#opendocumentv1.1
1469 * OOoLaTeX__: "a set of macros designed to bring the power of LaTeX
1472 __ http://ooolatex.sourceforge.net/
1478 Directives below are often referred to as "module.directive", the
1479 directive function. The "module." is not part of the directive name
1480 when used in a document.
1482 * Allow for field lists in list tables. See
1483 <http://thread.gmane.org/gmane.text.docutils.devel/3392>.
1487 Unify table implementations and unify options of table directives
1488 (http://article.gmane.org/gmane.text.docutils.user/1857).
1490 * Allow directives to be added at run-time?
1492 * Use the language module for directive option names?
1494 * Add "substitution_only" and "substitution_ok" function attributes,
1495 and automate context checking?
1497 * Implement options or features on existing directives:
1499 - All directives that produce titled elements should grow implicit
1500 reference names based on the titles.
1502 - Allow the _`:trim:` option for all directives when they occur in a
1503 substitution definition, not only the unicode_ directive.
1505 .. _unicode: ../ref/rst/directives.html#unicode-character-codes
1507 - Add the "class" option to the unicode_ directive. For example, you
1508 might want to get characters or strings with borders around them.
1510 - _`images.figure`: "title" and "number", to indicate a formal
1513 - _`parts.sectnum`: "local"?, "refnum"
1515 A "local" option could enable numbering for sections from a
1516 certain point down, and sections in the rest of the document are
1517 not numbered. For example, a reference section of a manual might
1518 be numbered, but not the rest. OTOH, an all-or-nothing approach
1519 would probably be enough.
1521 The "sectnum" directive should be usable multiple times in a
1522 single document. For example, in a long document with "chapter"
1523 and "appendix" sections, there could be a second "sectnum" before
1524 the first appendix, changing the sequence used (from 1,2,3... to
1525 A,B,C...). This is where the "local" concept comes in. This part
1526 of the implementation can be left for later.
1528 A "refnum" option (better name?) would insert reference names
1529 (targets) consisting of the reference number. Then a URL could be
1530 of the form ``http://host/document.html#2.5`` (or "2-5"?). Allow
1531 internal references by number? Allow name-based *and*
1532 number-based ids at the same time, or only one or the other (which
1533 would the table of contents use)? Usage issue: altering the
1534 section structure of a document could render hyperlinks invalid.
1536 - _`parts.contents`: Add a "suppress" or "prune" option? It would
1537 suppress contents display for sections in a branch from that point
1538 down. Or a new directive, like "prune-contents"?
1540 Add an option to include topics in the TOC? Another for sidebars?
1541 The "topic" directive could have a "contents" option, or the
1542 "contents" directive" could have an "include-topics" option. See
1543 docutils-develop 2003-01-29.
1545 - _`parts.header` & _`parts.footer`: Support multiple, named headers
1546 & footers? For example, separate headers & footers for odd, even,
1547 and the first page of a document.
1549 This may be too specific to output formats which have a notion of
1554 - Add a ``:parent:`` option for setting the parent's class
1555 (http://article.gmane.org/gmane.text.docutils.devel/3165).
1559 - Option to label lines?
1561 - How about an environment variable, say RSTINCLUDEPATH or
1562 RSTPATH, for standard includes (as in ``.. include:: <name>``)?
1563 This could be combined with a setting/option to allow
1564 user-defined include directories.
1566 - Add support for inclusion by URL? ::
1569 :url: http://www.example.org/inclusion.txt
1571 - Strip blank lines from begin and end of a literal included file or
1572 file section. This would correspond to the way a literal block is
1575 As nodes.literal_block expects (and we have) the text as a string
1576 (rather than a list of lines), using a regexp seems the way.
1578 - _`misc.raw`: add a "destination" option to the "raw" directive? ::
1585 It needs thought & discussion though, to come up with a consistent
1586 set of destination labels and consistent behavior.
1588 And placing HTML code inside the <head> element of an HTML
1589 document is rather the job of a templating system.
1591 - _`body.sidebar`: Allow internal section structure? Adornment
1592 styles would be independent of the main document.
1594 That is really complicated, however, and the document model
1595 greatly benefits from its simplicity.
1597 * Implement directives. Each of the list items below begins with an
1598 identifier of the form, "module_name.directive_function_name". The
1599 directive name itself could be the same as the
1600 directive_function_name, or it could differ.
1604 It has the disadvantage that it's only easily implementable for
1605 HTML, so it's specific to one output format.
1607 (For non-HTML writers, the imagemap would have to be replaced with
1610 - _`parts.endnotes` (or "footnotes"): See `Footnote & Citation Gathering`_.
1612 - _`parts.citations`: See `Footnote & Citation Gathering`_.
1614 - _`misc.language`: Specify (= change) the language of a document at
1617 * The misc.settings_ directive suggested below offers a more generic
1620 * The language of document parts can be indicated by the "special class
1621 value" ``"language-"`` + `BCP 47`_ language code. Class arguments to
1622 the title are attached to the document's base node - hence titled
1623 documents can be given a different language at parse time. However,
1624 "language by class attribute" does not change parsing (localized
1625 directives etc.), only supporting writers.
1627 .. _BCP 47: http://www.rfc-editor.org/rfc/bcp/bcp47.txt
1630 - _`misc.settings`: Set any(?) Docutils runtime setting from within
1631 a document? Needs much thought and discussion.
1633 Security concerns need to be taken into account (it shouldn't be
1634 possible to enable ``file_insertion_enabled`` from within a
1635 document), and settings that only would have taken effect before
1636 the directive (like ``tab-width``) shouldn't be accessible either.
1638 See this sub-thread:
1639 <http://thread.gmane.org/gmane.text.docutils.user/3620/focus=3649>
1641 - _`misc.gather`: Gather (move, or copy) all instances of a specific
1642 element. A generalization of the `Footnote & Citation Gathering`_
1645 - Add a custom "directive" directive, equivalent to "role"? For
1650 .. class:: incremental
1654 "``.. incr::``" above is equivalent to "``.. class:: incremental``".
1658 .. directive:: printed-links
1664 :class: print-inline
1666 This acts like macros. The directive contents will have to be
1667 evaluated when referenced, not when defined.
1669 * Needs a better name? "Macro", "substitution"?
1670 * What to do with directive arguments & options when the
1671 macro/directive is referenced?
1673 - Make the meaning of block quotes overridable? Only a 1-shot
1674 though; doesn't solve the general problem.
1676 - _`conditional directives`:
1678 .. note:: See also the implementation in Sphinx_.
1680 Docutils already has the ability to say "use this content for
1681 Writer X" via the "raw" directive. It also does have the ability
1682 to say "use this content for any Writer other than X" via the
1683 "strip-elements with class" config value. However, using "raw"
1684 input just to select a special writer is inconvenient in many
1686 It wouldn't be difficult to get more straightforward support, though.
1688 My first idea would be to add a set of conditional directives.
1689 Let's call them "writer-is" and "writer-is-not" for discussion
1690 purposes (don't worry about implemention details). We might
1693 .. writer-is:: text-only
1709 .. figure:: protocol_stack.eps
1711 .. writer-is-not:: text-only pdf
1713 .. figure:: protocol_stack.png
1715 This could be an interface to the Filter transform
1716 (docutils.transforms.components.Filter).
1718 The ideas in `adaptable file extensions`_ above may also be
1721 SVG's "switch" statement may provide inspiration.
1723 Here's an example of a directive that could produce multiple
1724 outputs (*both* raw troff pass-through *and* a GIF, for example)
1725 and allow the Writer to select. ::
1732 %sum from i=o to inf c sup i~=~lim from {m -> inf}
1733 sum from i=0 to m sup i%
1738 - _`body.example`: Examples; suggested by Simon Hefti. Semantics as
1739 per Docbook's "example"; admonition-style, numbered, reference,
1740 with a caption/title.
1742 - _`body.index`: Index targets.
1744 See `Index Entries & Indexes
1745 <./rst/alternatives.html#index-entries-indexes>`__.
1747 - _`body.literal`: Literal block, possibly "formal" (see `object
1748 numbering and object references`_ above). Possible options:
1750 - "highlight" a range of lines
1752 - include only a specified range of lines
1754 - "number" or "line-numbers"? (since 0.9 available with "code" directive)
1756 - "styled" could indicate that the directive should check for
1757 style comments at the end of lines to indicate styling or
1760 Specific derivatives (i.e., a "python-interactive" directive)
1761 could interpret style based on cues, like the ">>> " prompt and
1762 "input()"/"raw_input()" calls.
1764 See docutils-users 2003-03-03.
1766 - _`body.listing`: Code listing with title (to be numbered
1767 eventually), equivalent of "figure" and "table" directives.
1769 - _`pysource.usage`: Extract a usage message from the program,
1770 either by running it at the command line with a ``--help`` option
1771 or through an exposed API. [Suggestion for Optik.]
1773 - _`body.float`: Generic float that can be used for figures, tables,
1774 code listings, flowcharts, ...
1776 There is a Sphinx extension by Ignacio Fernández Galván <jellby@gmail.com>
1778 I implemented something for generic floats in sphinx, and submitted a
1779 pull request that is still waiting::
1783 :caption: My caption
1785 https://github.com/sphinx-doc/sphinx/pull/1858
1791 Interpreted text is entirely a reStructuredText markup construct, a
1792 way to get around built-in limitations of the medium. Some roles are
1793 intended to introduce new doctree elements, such as "title-reference".
1794 Others are merely convenience features, like "RFC".
1796 All supported interpreted text roles must already be known to the
1797 Parser when they are encountered in a document. Whether pre-defined
1798 in core/client code, or in the document, doesn't matter; the roles
1799 just need to have already been declared. Adding a new role may
1800 involve adding a new element to the DTD and may require extensive
1801 support, therefore such additions should be well thought-out. There
1802 should be a limited number of roles.
1804 The only place where no limit is placed on variation is at the start,
1805 at the Reader/Parser interface. Transforms are inserted by the Reader
1806 into the Transformer's queue, where non-standard elements are
1807 converted. Once past the Transformer, no variation from the standard
1808 Docutils doctree is possible.
1810 An example is the Python Source Reader, which will use interpreted
1811 text extensively. The default role will be "Python identifier", which
1812 will be further interpreted by namespace context into <class>,
1813 <method>, <module>, <attribute>, etc. elements (see pysource.dtd),
1814 which will be transformed into standard hyperlink references, which
1815 will be processed by the various Writers. No Writer will need to have
1816 any knowledge of the Python-Reader origin of these elements.
1818 * Add explicit interpreted text roles for the rest of the implicit
1819 inline markup constructs: named-reference, anonymous-reference,
1820 footnote-reference, citation-reference, substitution-reference,
1821 target, uri-reference (& synonyms).
1823 * Add directives for each role as well? This would allow indirect
1826 This text contains |nested inline markup|.
1828 .. |nested inline markup| emphasis::
1830 nested ``inline`` markup
1834 - "_`raw-wrapped`" (or "_`raw-wrap`"): Base role to wrap raw text
1835 around role contents.
1837 For example, the following reStructuredText source ... ::
1839 .. role:: red(raw-formatting)
1841 :html: <font color="red">
1842 :latex: {\color{red}
1849 ... will yield the following document fragment::
1853 <inline classes="red">
1856 <raw format="latex">
1858 <inline classes="red">
1862 <raw format="latex">
1865 Possibly without the intermediate "inline" node.
1867 - _`"acronym" and "abbreviation"`: Associate the full text with a
1868 short form. Jason Diamond's description:
1870 I want to translate ```reST`:acronym:`` into ``<acronym
1871 title='reStructuredText'>reST</acronym>``. The value of the
1872 title attribute has to be defined out-of-band since you can't
1873 parameterize interpreted text. Right now I have them in a
1874 separate file but I'm experimenting with creating a directive
1875 that will use some form of reST syntax to let you define them.
1877 Should Docutils complain about undefined acronyms or
1880 What to do if there are multiple definitions? How to
1881 differentiate between CSS (Content Scrambling System) and CSS
1882 (Cascading Style Sheets) in a single document? David Priest
1885 The short answer is: you don't. Anyone who did such a thing
1886 would be writing very poor documentation indeed. (Though I
1887 note that `somewhere else in the docs`__, there's mention of
1888 allowing replacement text to be associated with the
1889 abbreviation. That takes care of the duplicate
1890 acronyms/abbreviations problem, though a writer would be
1891 foolish to ever need it.)
1893 __ `inline parameter syntax`_
1895 How to define the full text? Possibilities:
1897 1. With a directive and a definition list? ::
1904 Docstring Processing System
1906 Would this list remain in the document as a glossary, or would
1907 it simply build an internal lookup table? A "glossary"
1908 directive could be used to make the intention clear.
1909 Acronyms/abbreviations and glossaries could work together.
1911 Then again, a glossary could be formed by gathering individual
1912 definitions from around the document.
1914 2. Some kind of `inline parameter syntax`_? ::
1916 `reST <reStructuredText>`:acronym: is `WYSIWYG <what you
1917 see is what you get>`:acronym: plaintext markup.
1919 .. _inline parameter syntax:
1920 rst/alternatives.html#parameterized-interpreted-text
1922 3. A combination of 1 & 2?
1924 The multiple definitions issue could be handled by establishing
1925 rules of priority. For example, directive-based lookup tables
1926 have highest priority, followed by the first inline definition.
1927 Multiple definitions in directive-based lookup tables would
1928 trigger warnings, similar to the rules of `implicit hyperlink
1931 __ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
1933 4. Using substitutions? ::
1935 .. |reST| acronym:: reST
1936 :text: reStructuredText
1938 What do we do for other formats than HTML which do not support
1939 tool tips? Put the full text in parentheses?
1941 - "figure", "table", "listing", "chapter", "page", etc: See `object
1942 numbering and object references`_ above.
1944 - "glossary-term": This would establish a link to a glossary. It
1945 would require an associated "glossary-entry" directive, whose
1946 contents could be a definition list::
1955 This would allow entries to be defined anywhere in the document,
1956 and collected (via a "glossary" directive perhaps) at one point.
1962 [DG 2017-01-02: These are not definitive to-dos, just one developer's
1963 opinion. Added 2009-10-13 by Günter Milde, in r6178.]
1965 The number of doctree nodes can be reduced by "normalizing" some related
1966 nodes. This makes the document model and the writers somewhat simpler.
1968 * The "doctest" element should go away. The construct could simply be
1969 a front-end to generic literal blocks. We could immediately (in 0.7)
1970 remove the doctest node from the doctree, but leave the
1971 syntax in reST. The reST parser could represent doctest blocks as
1972 literal blocks with a class attribute.
1974 [DG 2017-01-02:] +0.
1976 The syntax could be left in reST (for a set period of time?).
1978 [DG 2017-01-02:] The syntax must be left in reST, practically
1979 forever. Removing it would introduce a huge backwards
1980 incompatibility. Any syntax removal must be preceded by a thorough
1981 review and planning, including a deprecation warning process. My
1982 opinion: it's not worth it.
1984 * "Normalize" special admonitions (note, hint, warning, ...) during parsing
1985 (similar to _`transforms.writer_aux.Admonitions`). There is no need to
1986 keep them as distinct elements in the doctree specification.
1988 [DG 2017-01-02:] -1: <note>{body}</> is much more concise and
1989 expressive than <admonition><title>Note</>{body}</>, and the title
1990 translation can be put off until much later in the process.
1992 Keep the special admonition directives in reStructuredText syntax?
1994 [DG 2017-01-02:] We must definitely keep the syntax. Removing it
1995 would introduce a huge backwards incompatibility.
1998 Unimplemented Transforms
1999 ========================
2001 * _`Footnote & Citation Gathering`
2003 Collect and move footnotes & citations to the end of a document or the
2004 place of a "footnotes" or "citations" directive
2005 (see `<./ref/rst/directives.html>_`)
2008 Collect all footnotes that are referenced in the document before the
2009 directive (and after an eventually preceding ``.. footnotes::``
2010 directive) and insert at this place.
2012 Allows "endnotes" at a configurable place.
2015 Collect citations that are referenced ...
2019 a) defined in the document as citation elements
2021 b) auto-generated from entries in a bibliographic database.
2023 + based on bibstuff_?
2024 + also have a look at
2026 * CrossTeX_, a backwards-compatible, improved bibtex
2027 re-implementation in Python (including HTML export).
2028 (development stalled since 2 years)
2030 * Pybtex_,a drop-in replacement for BibTeX written in Python.
2032 * BibTeX styles & (experimental) pythonic style API.
2033 * Database in BibTeX, BibTeXML and YAML formats.
2034 * full Unicode support.
2035 * Write to TeX, HTML and plain text.
2037 * `Zotero plain <http://e6h.org/%7Eegh/hg/zotero-plain/>`__
2038 supports Zotero databases and CSL_ styles with Docutils with an
2041 * `sphinxcontrib-bibtex`_ Sphinx extension with "bibliography"
2042 directive and "cite" role supporting BibTeX databases.
2044 * `Modified rst2html
2045 <http://www.loria.fr/~rougier/coding/article/rst2html.py>`__ by
2049 * Automatically insert a "References" heading?
2051 .. _CrossTeX: http://www.cs.cornell.edu/people/egs/crosstex/
2052 .. _Pybtex: http://pybtex.sourceforge.net/
2053 .. _CSL: http://www.citationstyles.org/
2054 .. _sphinxcontrib-bibtex: http://sphinxcontrib-bibtex.readthedocs.org/
2056 * _`Reference Merging`
2058 When merging two or more subdocuments (such as docstrings),
2059 conflicting references may need to be resolved. There may be:
2061 * duplicate reference and/or substitution names that need to be made
2063 * duplicate footnote numbers that need to be renumbered.
2065 Should this be done before or after reference-resolving transforms
2066 are applied? What about references from within one subdocument to
2069 * _`Document Splitting`
2071 If the processed document is written to multiple files (possibly in
2072 a directory tree), it will need to be split up. Internal references
2073 will have to be adjusted.
2075 (HTML only? Initially, yes. Eventually, anything should be
2080 - Insert a "destination" attribute into the root element of each
2081 split-out document, containing the path/filename. The Output
2082 object or Writer will recognize this attribute and split out the
2083 files accordingly. Must allow for common headers & footers,
2084 prev/next, breadcrumbs, etc.
2086 - Transform a single-root document into a document containing
2087 multiple subdocuments, recursively. The content model of the
2088 "document" element would have to change to::
2091 ( (title, subtitle?)?,
2093 (docinfo, transition?)?,
2097 (I.e., add the last line -- 0 or more document elements.)
2099 Let's look at the case of hierarchical (directories and files)
2100 HTML output. Each document element containing further document
2101 elements would correspond to a directory (with an index.html file
2102 for the content preceding the subdocuments). Each document
2103 element containing no subdocuments (i.e., structure model elements
2104 only) corresponds to a concrete file with no directory.
2106 The natural transform would be to map sections to subdocuments,
2107 but possibly only a given number of levels deep.
2111 If a document is split up, each segment will need navigation links:
2112 parent, children (small TOC), previous (preorder), next (preorder).
2113 Part of `Document Splitting`_?
2115 * _`List of System Messages`
2117 The ``system_message`` elements are inserted into the document tree,
2118 adjacent to the problems themselves where possible. Some (those
2119 generated post-parse) are kept until later, in
2120 ``document.messages``, and added as a special final section,
2121 "Docutils System Messages".
2123 Docutils could be made to generate hyperlinks to all known
2124 system_messages and add them to the document, perhaps to the end of
2125 the "Docutils System Messages" section.
2127 Fred L. Drake, Jr. wrote:
2129 I'd like to propose that both parse- and transformation-time
2130 messages are included in the "Docutils System Messages" section.
2131 If there are no objections, I can make the change.
2133 The advantage of the current way of doing things is that parse-time
2134 system messages don't require a transform; they're already in the
2135 document. This is valuable for testing (unit tests,
2136 tools/quicktest.py). So if we do decide to make a change, I think
2137 the insertion of parse-time system messages ought to remain as-is
2138 and the Messages transform ought to move all parse-time system
2139 messages (remove from their originally inserted positions, insert in
2140 System Messages section).
2142 * _`Index Generation`
2148 * Make it easier to find out fragment names (#foo-bar) of ``_`inline
2149 targets```. Currently you have to either look at the source or
2152 For example, we could add support for self-referencing targets
2153 (i.e. inline targets would [unobtrusively] link to themselves, so
2154 that you can just click them and then copy the address). Or we
2155 could add support for titles that display the fragment name (as in
2156 <http://subversion.tigris.org/mailing-list-guidelines.html>; just
2157 hover the paragraphs).
2159 Either way it should be optional and deactivated by default.
2161 This would be useful for documents like Docutils' bug list or to-do
2164 * Make the _`list compacting` logic more generic: For example, allow
2165 for literal blocks or line blocks inside of compact list items.
2167 This is not implementable as long as list compacting is done by
2168 omitting ``<p>`` tags. List compacting would need to be done by
2169 adjusting CSS margins instead.
2171 :2015-04-02: The new html writer no longer strips <p> tags but adds the
2172 class value ``simple`` to the list.
2173 Formatting is done by CSS --- configurable by a custom style
2176 Auto-compactization can be overridden by the ``open`` vs.
2177 ``compact`` class arguments.
2179 * Idea for field-list rendering: hanging indent::
2181 Field name (bold): First paragraph of field body begins
2182 with the field name inline.
2184 If the first item of a field body is not a paragraph,
2185 it would begin on the following line.
2187 :2015-04-02: The new html writer writes field-lists as definition lists
2188 with class ``field-list``.
2189 Formatting is done by CSS --- configurable by a custom style
2190 sheet. The default style sheet has some examples, including a
2191 run-in field-list style.
2193 * Add more support for <link> elements, especially for navigation
2196 The framework does not have a notion of document relationships, so
2197 probably raw.destination_ should be used.
2199 We'll have framework support for document relationships when support
2200 for `multiple output files`_ is added. The HTML writer could
2201 automatically generate <link> elements then.
2203 .. _raw.destination: misc.raw_
2205 * Base list compaction on the spacing of source list? Would require
2206 parser support. (Idea: fantasai, 16 Dec 2002, doc-sig.)
2208 * Add a tool tip ("title" attribute?) to footnote back-links
2209 identifying them as such. Text in Docutils language module.
2215 * Remove the generic style information (duplicated from html4css1.css)
2216 from pep.css to avoid redundancy.
2218 Set ``stylesheet-path`` to "html4css.css,pep.css" and the
2219 ``stylesheet-dirs`` accordingly instead. (See the xhtml11 writer for an
2226 * Add a way to begin an untitled slide.
2228 * Add a way to begin a new slide, continuation, using the same title
2229 as the previous slide? (Unnecessary?) You need that if you have a
2230 lot of items in one section which don't fit on one slide.
2232 Maybe either this item or the previous one can be realized using
2235 * Have a timeout on incremental items, so the colour goes away after 1
2238 * Add an empty, black last slide (optionally). Currently the handling
2239 of the last slide is not very nice, it re-cycles through the
2240 incremental items on the last slide if you hit space-bar after the
2243 * Add a command-line option to disable advance-on-click.
2245 * Add a speaker's master document, which would contain a small version
2246 of the slide text with speaker's notes interspersed. The master
2247 document could use ``target="whatever"`` to direct links to a
2248 separate window on a second monitor (e.g., a projector).
2250 .. Note:: This item and the following items are partially
2251 accomplished by the S5 1.2 code (currently in alpha), which has
2252 not yet been integrated into Docutils.
2254 * Speaker's notes -- how to intersperse? Could use reST comments
2255 (".."), but make them visible in the speaker's master document. If
2256 structure is necessary, we could use a "comment" directive (to avoid
2257 nonsensical DTD changes, the "comment" directive could produce an
2258 untitled topic element).
2260 The speaker's notes could (should?) be separate from S5's handout
2263 * The speaker's master document could use frames for easy navigation:
2264 TOC on the left, content on the right.
2266 - It would be nice if clicking in the TOC frame simultaneously
2267 linked to both the speaker's notes frame and to the slide window,
2268 synchronizing both. Needs JavaScript?
2270 - TOC would have to be tightly formatted -- minimal indentation.
2272 - TOC auto-generated, as in the PEP Reader. (What if there already
2273 is a "contents" directive in the document?)
2275 - There could be another frame on the left (top-left or bottom-left)
2276 containing a single "Next" link, always pointing to the next slide
2277 (synchronized, of course). Also "Previous" link? FF/Rew go to
2278 the beginning of the next/current parent section? First/Last
2279 also? Tape-player-style buttons like ``|<< << < > >> >>|``?
2284 Add epub as an output format.
2286 epub is an open file format for ebooks based on HTML, specified by the
2287 `International Digital Publishing Forum`_. Thus, documents in epub
2288 format are suited to be read with `electronic reading devices`_.
2290 Pack the output of a HTML writer and supporting files (e.g. images)
2291 into one single epub document.
2293 There are `links to two 3rd party ePub writers`__ in the Docutils link list.
2294 Test and consider moving the better one into the docutils core.
2296 __ ../user/links.html#ePub
2297 .. _International Digital Publishing Forum: http://www.idpf.org/
2298 .. _electronic reading devices:
2299 http://en.wikipedia.org/wiki/List_of_e-book_readers
2305 Also see the Problems__ section in the `latex writer documentation`_.
2307 __ ../user/latex.html#problems
2309 .. _latex writer documentation: ../user/latex.html
2312 ../../../sandbox/latex-variants/README.html
2317 * Too deeply nested lists fail: generate a warning and provide
2320 * Spaces in inline literal text::
2323 spacing between the words of this sentence (words
2324 should be grouped in pairs).
2326 Discuss the desired behaviour and implement a consistent one.
2328 * File names of included graphics (see also `grffile` package).
2330 Generate clean and configurable LaTeX source
2331 ----------------------------------------------
2333 * Check the generated source with package `nag`.
2335 Configurable placement of figure and table floats
2336 `````````````````````````````````````````````````
2338 * Special class argument to individually place figures?
2342 placement-<optional arg> -> \figure[<optional arg>]{...}
2344 e.g. ``.. class:: placement-htb``,
2349 :h: place-here-if-possible
2352 :p: place-on-extra-page
2354 e.g.: ``.. class:: place-here-if-possible place-top place-bottom``
2356 Maybe support both variants?
2359 LaTeX constructs and packages instead of re-implementations
2360 ```````````````````````````````````````````````````````````
2362 Which packages do we want to use?
2364 + base and "recommended" packages
2366 (packages that should be in a "reasonably sized and reasonably modern
2367 LaTeX installation like the `texlive-latex-recommended` Debian package,
2370 + No "fancy" or "exotic" requirements.
2372 + pointers to advanced packages and their use in the `latex writer
2375 * ``alltt`` environment for literal block.
2379 + True footnotes with LaTeX auto-numbering (as option ``--latex-footnotes``)
2380 (also for target-footnotes):
2382 - attach footnote text to footnote-symobol node
2383 - write \footnote{<footnote text>}
2384 - consider cases where LaTeX does not support footnotes
2385 (inside tables, headings, ...)?
2386 - consider multiple footnote refs to common footnote text.
2390 If the symbol you want is not one of the ones listed, you'll need to
2391 redefine ``\@fnsymbol`` and add it, e.g. perhaps like::
2393 \def\@fnsymbol#1{\ifcase#1\hbox{}\or *\or \dagger\or \ddagger\or
2394 \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger \or
2395 \ddagger\ddagger \or \mathchar"27C \else\@ctrerr\fi\relax}
2397 which would allow \symbolfootnote[10]{footnote} to have a club as its
2400 + document customization (links to how-to and packages):
2402 .. Footnote packages:
2404 :footnote: texlive-latex-recommended % savenotes environment
2405 :footmisc: texlive-latex-extra % formatting options
2406 :manyfoot: texlive-latex-extra
2407 :bigfoot: texlive-latex-extra
2408 :perpage: texlive-latex-extra
2409 :ftnxtra: new on CTAN
2410 fixes the issue of footnote inside \caption{},
2411 tabular environment and \section{} like commands.
2415 http://www2.informatik.hu-berlin.de/~ahamann/studies/footnotes.pdf
2419 `Footnotes whose texts are identical
2420 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=repfootnote>`__
2422 * label per hand or use footmisc
2424 `More than one sequence of footnotes
2425 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multfoot>`__
2429 `Footnotes in tables
2430 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footintab>`__
2432 * `tabularx` and longtable allow footnotes.
2433 * `footnote` provides a "savenotes" environment which collects all
2434 footnotes and emits them at ``end{savenotes}``
2436 `Footnotes in LaTeX section headings
2437 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftnsect>`__
2439 * Take advantage of the fact that the mandatory argument doesn't
2440 move if the optional argument is present::
2442 \section[title] {title\footnote{title ftnt}}
2444 * Use the footmisc package, with package option stable - this modifies
2445 footnotes so that they softly and silently vanish away if used in a
2450 `Footnotes numbered per page
2451 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footnpp>`__
2453 * perpage provides a general mechanism for resetting counters per page
2454 * footmisc provides a package option perpage
2456 * use `eqlist` or `enumitem` (texlive-latex-extra) for field-lists?
2458 * ``--use-latex-when-possible`` »super option« that would set the
2461 --no-section-numbering
2464 --use-latex-abstract
2465 --use-latex-footnotes
2466 --use-latex-citations
2468 ? (My preference is to default to use-latex-* whenever possible [GM])
2474 * Use italic instead of slanted for titlereference?
2476 * Start a new paragraph after lists (as currently)
2477 or continue (no blank line in source, no parindent in output)?
2481 * continue if the `compound paragraph`_ directive is used, or
2482 * force a new paragraph with an empty comment.
2484 * Sidebar handling (environment with `framed`, `marginnote`, `wrapfig`,
2487 * Use optionlist for docinfo?
2489 * Keep literal-blocks together on a page, avoid pagebreaks.
2491 Failed experiments up to now: samepage, minipage, pagebreak 1 to 4 before
2494 Should be possible with ``--literal-block-env==lstlistings`` and some
2497 * More space between title and subtitle? ::
2500 + \\[0.5em] % subtitle%
2502 .. _PSNFSS documentation:
2503 http://mirror.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf
2504 .. _compound paragraph:
2505 ../ref/rst/directives.html#compound-paragraph
2507 http://mirror.ctan.org/help/Catalogue/entries/fixltx2e.html
2512 * Improve/simplify logic to set the column width in the output.
2514 + Assumed reST line length for table width setting configurable, or
2515 + use `ltxtable` (a combination of `tabularx` (auto-width) and
2516 `longtable` (page breaks)), or
2517 + use tabularx column type ``X`` and let LaTeX decide width, or
2521 http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tabulary
2523 * From comp.text.tex (13. 4. 2011):
2525 When using fixed width columns, you should ensure that the total
2526 width does not exceed \linewidth: if the first column is p{6cm}
2527 the second one should be p{\dimexpr\linewidth-6cm-4\tabcolsep}
2528 because the glue \tabcolsep is added twice at every column edge.
2529 You may also consider to set \tabcolsep to a different value...
2531 * csv-tables do not have a colwidth.
2533 * Add more classes or options, e.g. for
2535 + column width set by latex,
2536 + horizontal alignment and rules.
2537 + long table vs. tabular (see next item).
2539 * Use tabular instead of longtable for tables in legends or generally
2542 Alternatively, default to tabular and use longtable only if specified
2543 by config setting or class argument (analogue to booktable)?
2545 * Table heads and footer for longtable (firstpage lastpage ..)?
2547 * In tools.txt the option tables right column, there should be some more
2548 spacing between the description and the next paragraph "Default:".
2550 * Paragraph separation in tables is hairy.
2551 see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=struttab
2553 - The strut solution did not work.
2554 - setting extrarowheight added ad top of row not between paragraphs in
2555 a cell. ALTHOUGH i set it to 2pt because, text is too close to the topline.
2556 - baselineskip/stretch does not help.
2558 * Should there be two hlines after table head and on table end?
2560 * Place titled tables in a float ('table' environment)?
2562 The 'table', 'csv-table', and 'list-table' directives support an (optional)
2563 table title. In analogy to the 'figure' directive this should map to a
2566 Image and figure directives
2567 ```````````````````````````
2569 * compare the test case in:
2571 + `<../../test/functional/input/data/standard.txt>`__
2572 + `<../../test/functional/expected/standalone_rst_html4css1.html>`__
2573 + `<../../test/functional/expected/standalone_rst_latex.tex>`__
2575 * The default CSS styling for HTML output (plain.css, default.css) lets
2576 text following a right- or left-aligned image float to the side of the
2579 + Use this default also for LaTeX?
2581 + Wrap text around figures/images with class argument "wrap"
2582 (like the odt writer)?
2584 Use `wrapfig` (or other recommended) package.
2586 * support more graphic formats (especially SVG, the only standard
2587 vector format for HTML)
2589 There is a `SWF package`_ at CTAN.
2592 http://mirror.ctan.org/macros/latex/contrib/flashmovie
2598 * support "figwidth" argument for figures.
2600 As the 'figwidth' argument is still ignored and the "natural width" of
2601 a figure in LaTeX is 100 % of the text width, setting the 'align'
2602 argument has currently no effect on the LaTeX output.
2605 * Let `meta` directive insert PDF-keywords into header?
2607 * Multiple author entries in docinfo (same thing as in html).
2610 * Consider supporting the "compact" option and class argument (from
2611 rst2html) as some lists look better compact and others need the space.
2613 * Better citation support
2614 (see `Footnote & Citation Gathering`_).
2616 * If ``use-latex-citations`` is used, a bibliography is inserted right at the
2617 end of the document.
2619 Put in place of the to-be-implemented "citations" directive
2620 (see `Footnote & Citation Gathering`_).
2626 The `LyX <http://www.lyx.org>`_ document processor has a comprehensive
2627 Unicode to LaTeX conversion feature with a file called ``unicodesymbols``
2628 that lists LaTeX counterparts for a wide range of Unicode characters.
2630 * Use this in the LaTeXTranslator?
2631 Think of copyright issues!
2633 * The "ucs" package has many translations in ...doc/latex/ucs/config/
2635 * The bibstuff_ tool ships a `latex_codec` Python module!
2637 .. _bibstuff: http://code.google.com/p/bibstuff/
2639 Allow choice between utf8 (standard) and utf8x (extended) encodings
2640 ```````````````````````````````````````````````````````````````````
2642 * Allow the user to select *utf8* or *utf8x* LaTeX encoding. (Docutil's
2643 output encoding becomes LaTeX's input encoding.)
2645 The `ucs` package provides extended support for UTF-8 encoding in LaTeX
2646 via the `inputenc`-option ``utf8x``. It is, however, a non-standard
2647 extension and no longer developed.
2650 a) Python has 4 names for the UTF-8 encoding (``utf_8, U8, UTF, utf8``)
2651 give a special meaning to one of the aliases,
2653 b) scan "stylesheets" and "latex-preamble" options and use ``utf8x``
2654 if it contains ``ucs``
2659 * Glyphs missing in the font are left out in the PDF without warning
2660 (e.g. ⇔ left-right double arrow in the functional test output).
2662 * Disable word-wrap (hyphenation) in literal text locally with
2663 ``providecommand{\nohyphenation}{\addfontfeatures{HyphenChar=None}}``?
2669 * ^^ LaTeX's special syntax for characters results in "strange" replacements
2670 (both with \href and \url).
2672 `file with ^^ <../strange^^name>`__:
2673 `<../strange^^name>`__
2675 * Unbalanced braces, { or }, will fail (both with \href and \url)::
2677 `file with { <../strange{name>`__
2678 `<../strange{name>`__
2680 Currently, a warning is written to the error output stream.
2682 For correct printing, we can
2684 * use the \href command with "normal" escaped name argument, or
2685 * define a url-command in the preamble ::
2687 \urldef{\fragileURLi}\nolinkurl{myself%node@gateway.net}
2689 but need to find a way to insert it as href argument.
2691 The following fails::
2693 \href{http://www.w3.org/XML/Schema^^dev}{\fragileURLi}
2695 Use %-replacement like http://nowhere/url_with%28parens%29 ?
2697 -> does not work for file paths (with pdflatex and xpdf).
2700 add-stylesheet option
2701 `````````````````````
2703 From http://article.gmane.org/gmane.text.docutils.devel/3429/
2705 The problem is that since we have a default value, we have to
2706 differentiate between adding another stylesheet and replacing the
2707 default. I suggest that the existing --stylesheet & --stylesheet-path
2708 options keep their semantics to replace the existing settings. We
2709 could introduce new --add-stylesheet & --add-stylesheet-path options,
2710 which accumulate; further --stylesheet/--stylesheet-path options would
2711 clear these lists. The stylesheet or stylesheet_path setting (only
2712 one may be set), plus the added_stylesheets and added_stylesheet_paths
2713 settings, describe the combined styles.
2715 For example, this run will have only one custom stylesheet:
2717 rstpep2html.py --stylesheet-path custom.css ...
2719 This run will use the default stylesheet, and the custom one:
2721 rstpep2html.py --add-stylesheet-path custom.css ...
2723 This run will use the default stylesheet, a custom local stylesheet,
2724 and an external stylesheet:
2726 rstpep2html.py --add-stylesheet-path custom.css \
2727 --add-stylesheet http://www.example.org/external.css ...
2729 This run will use only the second custom stylesheet:
2731 rstpep2html.py --add-stylesheet-path custom.css \
2732 --stylesheet-path second.css ...
2740 * What about if we don't know which Reader and/or Writer we are
2741 going to use? If the Reader/Writer is specified on the
2742 command-line? (Will this ever happen?)
2744 Perhaps have different types of front ends:
2746 a) _`Fully qualified`: Reader and Writer are hard-coded into the
2747 front end (e.g. ``pep2html [options]``, ``pysource2pdf
2750 b) _`Partially qualified`: Reader is hard-coded, and the Writer is
2751 specified a sub-command (e.g. ``pep2 html [options]``,
2752 ``pysource2 pdf [options]``). The Writer is known before option
2753 processing happens, allowing the OptionParser to be built
2754 dynamically. Alternatively, the Writer could be hard-coded and
2755 the Reader specified as a sub-command (e.g. ``htmlfrom pep
2758 c) _`Unqualified`: Reader and Writer are specified as subcommands
2759 (e.g. ``publish pep html [options]``, ``publish pysource pdf
2760 [options]``). A single front end would be sufficient, but
2761 probably only useful for testing purposes.
2763 d) _`Dynamic`: Reader and/or Writer are specified by options, with
2764 defaults if unspecified (e.g. ``publish --writer pdf
2765 [options]``). Is this possible? The option parser would have
2766 to be told about new options it needs to handle, on the fly.
2767 Component-specific options would have to be specified *after*
2768 the component-specifying option.
2770 Allow common options before subcommands, as in CVS? Or group all
2771 options together? In the case of the `fully qualified`_
2772 front ends, all the options will have to be grouped together
2773 anyway, so there's no advantage (we can't use it to avoid
2774 conflicts) to splitting common and component-specific options
2777 * Parameterize help text & defaults somehow? Perhaps a callback? Or
2778 initialize ``settings_spec`` in ``__init__`` or ``init_options``?
2780 * Disable common options that don't apply?
2781 (This should now be easier with ``frontend.filter_settings_spec``.)
2783 * Add ``--section-numbering`` command line option. The "sectnum"
2784 directive should override the ``--no-section-numbering`` command
2787 * Create a single dynamic_ or unqualified_ front end that can be
2794 indent-tabs-mode: nil
2795 sentence-end-double-space: t