5 :Author: David Goodger (with input from many); open to all Docutils
7 :Contact: goodger@python.org
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 * Support for `document splitting`_. May require some major code
48 * Support for subdocuments (see `large documents`_).
50 * `Object numbering and object references`_.
52 * `Nested inline markup`_.
54 * `Python Source Reader`_.
56 * The HTML writer needs to be rewritten (or a second HTML writer
57 added) to allow for custom classes, and for arbitrary splitting
60 * Documentation_ of the architecture. Other docs too.
64 * A LaTeX writer making use of (La)TeX's power, so that the rendering
65 of the resulting documents is more easily customizable. (Similar to
66 what you wrote about a new HTML Writer.)
68 * Suitability for `Python module documentation
69 <http://docutils.sf.net/sandbox/README.html#documenting-python>`_.
75 * Encoding of command line arguments can only be guessed:
77 * try UTF-8/strict first, then try the locale's encoding with
78 strict error handling, then ASCII/replace?
80 UTF-8 is almost 100% safe to try first; false positives are rare,
81 The locale's encoding with strict error handling may be a
82 reasonable compromise, but any error would indicate that the
83 locale's encoding is inappropriate. The only safe fallback is
86 * Do not decode argv before option parsing but individual string
89 +1 Allows for separate command-line vs. filesystem encodings,
90 respectively to keep file names encoded.
91 +1 Allows to configure command-line encoding in a config file,
94 Cf. <http://thread.gmane.org/gmane.text.docutils.user/2890/focus=2957>.
96 * Improve handling on Windows:
98 - Get graphical installer.
99 - Make rst2html.py an .exe file using py2exe.
103 The user interface is very difficult to use for most Windows users;
104 you can't really expect them to use the command line. We need some
105 kind of GUI that can launch rst2html.py, and save the HTML output to
106 a file, and launch a browser. What's important is that we get
107 settings to work with the GUI. So we need some way to dynamically
108 generate a list of settings for the GUI. The current settings_spec
109 for OptionParser doesn't seem to be usable for this for the
112 - It's biased toward the command line -- there are *two* options for
115 - You cannot have both a one-line description and a longer
116 description for tooltips/help-texts.
118 - It doesn't provide hints for the input type. You cannot easily
119 infer the type of a setting from its validator, because any
120 component can add new validators. In fact, it may be necessary to
121 have both a hint about the input type (e.g. string) and a
122 validator (valid ID), or it may be necessary to have a different
123 set of choices for the CLI (1, INFO, 2, ...) and for the GUI
124 (INFO, WARNING, ...).
126 - It's coupled to the OptionParser. We want to be able to change
127 the underlying system without breaking everything.
129 - It's a bunch of primitive structures. We want an extensible (thus
130 object-oriented) interface.
132 So we probably need to create a class for storing all the settings,
133 and auto-generate the OptionParser data from that.
135 I talked to Stephan Deibel about getting Docutils integrated into
136 Wing IDE. He said it's possible, and he'd be willing to help.
137 There's a scripting interface to Wing, which we'd use. We can
138 dynamically generate a list of preferences and not worry too much
139 about the rendering (from what I understood); Wing's whole GUI is
140 dynamic anyway. The interface could be made usable for other GUIs.
141 For example, we could try to get option support for DocFactory. //
144 * Allow different report levels for STDERR and system_messages inside
147 * Change the docutils-update script (in sandbox/infrastructure), to
148 support arbitrary branch snapshots.
150 * Move some general-interest sandboxes out of individuals'
151 directories, into subprojects?
153 * Add option for file (and URL) access restriction to make Docutils
154 usable in Wikis and similar applications.
156 2005-03-21: added ``file_insertion_enabled`` & ``raw_enabled``
157 settings. These partially solve the problem, allowing or disabling
158 **all** file accesses, but not limited access.
160 * Configuration file handling needs discussion:
162 - There should be some error checking on the contents of config
163 files. How much checking should be done? How loudly should
164 Docutils complain if it encounters an error/problem?
166 - Docutils doesn't complain when it doesn't find a configuration
167 file supplied with the ``--config`` option. Should it? (If yes,
170 * Internationalization:
172 - I18n needs refactoring, the language dictionaries are difficult to
173 maintain. Maybe have a look at gettext or similar tools.
175 (This would make a nice Google Summer of Code project)
177 - Language modules: in accented languages it may be useful to have
178 both accented and unaccented entries in the
179 ``bibliographic_fields`` mapping for versatility.
181 - Add a "--strict-language" option & setting: no English fallback
182 for language-dependent features.
184 Make this the default for output (as opposed to input)?
185 Throw an error with a helpfull message, e.g.
187 Default "contents" title for language %s missing, please specify
192 "attention" title for language %s missing, please use a generic
193 admonition with explicit title.
195 - Add internationalization to _`footer boilerplate text` (resulting
196 from "--generator", "--source-link", and "--date" etc.), allowing
200 * Add validation? See http://pytrex.sourceforge.net, RELAX NG, pyRXP.
202 * In ``docutils.readers.get_reader_class`` (& ``parsers`` &
203 ``writers`` too), should we be importing "standalone" or
204 "docutils.readers.standalone"? (This would avoid importing
205 top-level modules if the module name is not in docutils/readers.
206 Potential nastiness.)
208 * Perhaps store a _`name-to-id mapping file`? This could be stored
209 permanently, read by subsequent processing runs, and updated with
210 new entries. ("Persistent ID mapping"?)
212 * Perhaps the ``Component.supports`` method should deal with
213 individual features ("meta" etc.) instead of formats ("html" etc.)?
215 * Add _`object numbering and object references` (tables & figures).
216 These would be the equivalent of DocBook's "formal" elements.
218 We may need _`persistent sequences`, such as chapter numbers. See
219 `OpenOffice.org XML`_ "fields". Should the sequences be automatic
220 or manual (user-specifyable)?
222 We need to name the objects:
224 - "name" option for the "figure" directive? ::
226 .. figure:: image.png
229 Same for the "table" directive::
231 .. table:: optional title here
241 This would also allow other options to be set, like border
242 styles. The same technique could be used for other objects.
244 A preliminary "table" directive has been implemented, supporting
245 table titles. Perhaps the name should derive from the title.
247 - The object could also be done this way::
251 .. figure:: image.png
253 This may be a more general solution, equally applicable to tables.
254 However, explicit naming using an option seems simpler to users.
256 - Perhaps the figure name could be incorporated into the figure
257 definition, as an optional inline target part of the directive
260 .. figure:: _`figure name` image.png
262 Maybe with a delimiter::
264 .. figure:: _`figure name`: image.png
266 Or some other, simpler syntax.
268 We'll also need syntax for object references. See `OpenOffice.org
269 XML`_ "reference fields":
271 - Parameterized substitutions? For example::
273 See |figure (figure name)| on |page (figure name)|.
275 .. |figure (name)| figure-ref:: (name)
276 .. |page (name)| page-ref:: (name)
278 The result would be::
280 See figure 3.11 on page 157.
282 But this would require substitution directives to be processed at
283 reference-time, not at definition-time as they are now. Or,
284 perhaps the directives could just leave ``pending`` elements
285 behind, and the transforms do the work? How to pass the data
286 through? Too complicated.
288 - An interpreted text approach is simpler and better::
290 See :figure:`figure name` on :page:`figure name`.
292 The "figure" and "page" roles could generate appropriate
293 boilerplate text. The position of the role (prefix or suffix)
294 could also be utilized.
296 See `Interpreted Text`_ below.
298 - We could leave the boilerplate text up to the document::
300 See Figure :fig:`figure name` on page :pg:`figure name`.
302 - Reference boilerplate could be specified in the document
303 (defaulting to nothing)::
306 :prefix-ref: "Figure "
307 :prefix-caption: "Fig. "
310 .. _OpenOffice.org XML: http://xml.openoffice.org/
312 * Think about _`large documents` made up of multiple subdocument
313 files. Issues: continuity (`persistent sequences`_ above),
314 cross-references (`name-to-id mapping file`_ above and `targets in
315 other documents`_ below), splitting (`document splitting`_ below).
317 When writing a book, the author probably wants to split it up into
318 files, perhaps one per chapter (but perhaps even more detailed).
319 However, we'd like to be able to have references from one chapter to
320 another, and have continuous numbering (pages and chapters, as
321 applicable). Of course, none of this is implemented yet. There has
322 been some thought put into some aspects; see `the "include"
323 directive`__ and the `Reference Merging`_ transform below.
325 When I was working with SGML in Japan, we had a system where there
326 was a top-level coordinating file, book.sgml, which contained the
327 top-level structure of a book: the <book> element, containing the
328 book <title> and empty component elements (<preface>, <chapter>,
329 <appendix>, etc.), each with filename attributes pointing to the
330 actual source for the component. Something like this::
333 <title>Title of the Book</title>
334 <preface inrefid="pr01"></preface>
335 <chapter inrefid="ch01"></chapter>
336 <chapter inrefid="ch02"></chapter>
337 <chapter inrefid="ch03"></chapter>
338 <appendix inrefid="ap01"></appendix>
341 (The "inrefid" attribute stood for "insertion reference ID".)
343 The processing system would process each component separately, but
344 it would recognize and use the book file to coordinate chapter and
345 page numbering, and keep a persistent ID to (title, page number)
346 mapping database for cross-references. Docutils could use a similar
347 system for large-scale, multipart documents.
349 __ ../ref/rst/directives.html#including-an-external-document-fragment
365 As I said earlier in chapter :chapter:`Objects.txt`, the
366 reference count gets increased every time a binding is made.
370 As I said earlier in chapter 2, the
371 reference count gets increased every time a binding is made.
373 The ToC in this form doesn't even need to be references to actual
374 reST documents; I'm simply doing it that way for a minimum of
375 future-proofing, in case I do want to add the ability to pick up
376 references within external chapters.
378 Perhaps, instead of ToC (which would overload the "contents"
379 directive concept already in use), we could use "manifest". A
380 "manifest" directive might associate local reference names with
384 intro: Introduction.txt
389 Then the sample becomes::
391 .. include:: manifest.txt
393 As I said earlier in chapter :chapter:`objects`, the
394 reference count gets increased every time a binding is made.
396 * Add support for _`multiple output files` and _`generic data
399 It should be possible for a component to **emit or reference** data
400 to be either **included or referenced** in the output document.
401 Examples of such data are stylesheets or images.
403 For this, we need a "data" object which stores the data either
404 inline or by referring to a file. The Docutils framework is
405 responsible for either:
407 * storing the data in the appropriate location (e.g. in the
408 directory of the output file, or in a user-specified directory)
409 and providing the paths of the stored files to the writer, *or*
411 * providing the data itself to the writer so that it can be embedded
412 in the output document.
414 This approach decouples data handling from the data source (which
415 can either be embedded or referenced) and the destination (which can
416 either be embedded or referenced as well).
418 See <http://article.gmane.org/gmane.text.docutils.devel/3631>.
420 * Add testing for Docutils' front end tools?
422 * Publisher: "Ordinary setup" shouldn't requre specific ordering; at
423 the very least, there ought to be error checking higher up in the
426 ``Publisher.get_settings`` requires that all components be set up
427 before it's called. Perhaps the I/O *objects* shouldn't be set, but
428 I/O *classes*. Then options are set up (``.set_options``), and
429 ``Publisher.set_io`` (or equivalent code) is called with source &
430 destination paths, creating the I/O objects.
432 Perhaps I/O objects shouldn't be instantiated until required. For
433 split output, the Writer may be called multiple times, once for each
434 doctree, and each doctree should have a separate Output object (with
435 a different path). Is the "Builder" pattern applicable here?
437 * Perhaps I/O objects should become full-fledged components (i.e.
438 subclasses of ``docutils.Component``, as are Readers, Parsers, and
439 Writers now), and thus have associated option/setting specs and
442 * Multiple file I/O suggestion from Michael Hudson: use a file-like
443 object or something you can iterate over to get file-like objects.
445 * Add an "--input-language" option & setting? Specify a different
446 language module for input (bibliographic fields, directives) than
447 for output. The "--language" option would set both input & output
450 * Auto-generate reference tables for language-dependent features?
451 Could be generated from the source modules. A special command-line
452 option could be added to Docutils front ends to do this. (Idea from
455 * Enable feedback of some kind from internal decisions, such as
456 reporting the successful input encoding. Modify runtime settings?
457 System message? Simple stderr output?
459 * Rationalize Writer settings (HTML/LaTeX/PEP) -- share settings.
461 * Merge docs/user/latex.txt info into tools.txt and config.txt?
463 * Add an "--include file" command-line option (config setting too?),
464 equivalent to ".. include:: file" as the first line of the doc text?
465 Especially useful for character entity sets, text transform specs,
468 * Parameterize the Reporter object or class? See the `2004-02-18
469 "rest checking and source path"`_ thread.
471 .. _2004-02-18 "rest checking and source path":
472 http://thread.gmane.org/gmane.text.docutils.user/1112
474 * Add a "disable_transforms" setting? And a dummy Writer subclass
475 that does nothing when its .write() method is called? Would allow
476 for easy syntax checking. See the `2004-02-18 "rest checking and
477 source path"`_ thread.
479 * Add a generic meta-stylesheet mechanism? An external file could
480 associate style names ("class" attributes) with specific elements.
481 Could be generalized to arbitrary output attributes; useful for HTML
482 & XMLs. Aahz implemented something like this in
483 sandbox/aahz/Effective/EffMap.py.
485 * .. _classes for table cells:
487 William Dode suggested that table cells be assigned "class"
488 attributes by columns, so that stylesheets can affect text
489 alignment. Unfortunately, there doesn't seem to be a way (in HTML
490 at least) to leverage the "colspec" elements (HTML "col" tags) by
491 adding classes to them. The resulting HTML is very verbose::
493 <td class="col1">111</td>
494 <td class="col2">222</td>
497 At the very least, it should be an option. People who don't use it
498 shouldn't be penalized by increases in their HTML file sizes.
500 Table rows could also be assigned classes (like odd/even). That
501 would be easier to implement.
503 How should it be implemented?
505 * There could be writer options (column classes & row classes) with
508 * The table directive could grow some options. Something like
509 ":cell-classes: col1 col2 col3" (either must match the number of
510 columns, or repeat to fill?) and ":row-classes: odd even" (repeat
511 to fill; body rows only, or header rows too?).
513 Probably per-table directive options are best. The "class" values
514 could be used by any writer, and applying such classes to all tables
515 in a document with writer options is too broad.
517 * Add file-specific settings support to config files, like::
522 Is this even possible? Should the criterion be the name of the
523 input file or the output file? Alternative (more explicit) syntax::
525 [source_file index.txt]
528 [dest_file index.html]
531 Or rather allow settings configuration from the rst source file?
533 * The "validator" support added to OptionParser is very similar to
534 "traits_" in SciPy_. Perhaps something could be done with them?
535 (Had I known about traits when I was implementing docutils.frontend,
536 I may have used them instead of rolling my own.)
538 .. _traits: http://code.enthought.com/traits/
539 .. _SciPy: http://www.scipy.org/
541 * tools/buildhtml.py: Extend the --prune option ("prune" config
542 setting) to accept file names (generic path) in addition to
543 directories (e.g. --prune=docs/user/rst/cheatsheet.txt, which should
544 *not* be converted to HTML).
546 * Add support for _`plugins`.
548 * _`Config directories`: Currently, ~/.docutils, ./docutils.conf/, &
549 /etc/docutils.conf are read as configuration files. Proposal: allow
550 ~/.docutils to be a a configuration *directory*, along with
551 /etc/docutils/ and ./docutils.conf/. Within these directories,
552 check for config.txt files. We can also have subdirectories here,
553 for plugins, S5 themes, components (readers/writers/parsers) etc.
555 Docutils will continue to support configuration files for backwards
558 * Add support for document decorations other than headers & footers?
559 For example, top/bottom/side navigation bars for web pages. Generic
562 Seems like a bad idea as long as it isn't independent from the ouput
563 format (for example, navigation bars are only useful for web pages).
565 * docutils_update: Check for a ``Makefile`` in a directory, and run
566 ``make`` if found? This would allow for variant processing on
567 specific source files, such as running rst2s5.py instead of
570 * Add a "disable table of contents" setting? The S5 writer could set
571 it as a default. Rationale:
573 The ``contents`` (table of contents) directive must not be used
574 [in S5/HTML documents]. It changes the CSS class of headings
575 and they won't show up correctly in the screen presentation.
577 -- `Easy Slide Shows With reStructuredText & S5
578 <../user/slide-shows.html>`_
580 Analogue to the ``sectnum_xform`` setting, it could be used by the
581 latex writer to switch to a LaTeX generated ToC (currently, the latex
582 writer calls it "use_latex_toc").
590 * Add a FAQ entry about using Docutils (with reStructuredText) on a
591 server and that it's terribly slow. See the first paragraphs in
592 <http://article.gmane.org/gmane.text.docutils.user/1584>.
594 * Add document about what Docutils has previously been used for
595 (web/use-cases.txt?).
597 * Improve index in docs/user/config.txt.
603 * Complete `Docutils Runtime Settings <../api/runtime-settings.html>`_.
605 * Improve the internal module documentation (docstrings in the code).
606 Specific deficiencies listed below.
608 - docutils.parsers.rst.states.State.build_table: data structure
609 required (including StringList).
611 - docutils.parsers.rst.states: more complete documentation of parser
614 * docs/ref/doctree.txt: DTD element structural relationships,
615 semantics, and attributes. In progress; element descriptions to be
618 * Document the ``pending`` elements, how they're generated and what
621 * Document the transforms (perhaps in docstrings?): how they're used,
622 what they do, dependencies & order considerations.
624 * Document the HTML classes used by html4css1.py.
626 * Write an overview of the Docutils architecture, as an introduction
627 for developers. What connects to what, why, and how. Either update
628 PEP 258 (see PEPs_ below) or as a separate doc.
630 * Give information about unit tests. Maybe as a howto?
632 * Document the docutils.nodes APIs.
634 * Complete the docs/api/publisher.txt docs.
640 * Creating Docutils Writers
642 * Creating Docutils Readers
644 * Creating Docutils Transforms
646 * Creating Docutils Parsers
648 * Using Docutils as a Library
654 * Complete PEP 258 Docutils Design Specification.
656 - Fill in the blanks in API details.
658 - Specify the nodes.py internal data structure implementation?
660 [Tibs:] Eventually we need to have direct documentation in
661 there on how it all hangs together - the DTD is not enough
662 (indeed, is it still meant to be correct? [Yes, it is.
665 * Rework PEP 257, separating style from spec from tools, wrt Docutils?
666 See Doc-SIG from 2001-06-19/20.
674 * Analyze Tony Ibbs' PySource code.
676 * Analyze Doug Hellmann's HappyDoc project.
678 * Investigate how POD handles literate programming.
680 * Take the best ideas and integrate them into Docutils.
684 * Ask Python-dev for opinions (GvR for a pronouncement) on special
685 variables (__author__, __version__, etc.): convenience vs. namespace
686 pollution. Ask opinions on whether or not Docutils should recognize
689 * If we can detect that a comment block begins with ``##``, a la
690 JavaDoc, it might be useful to indicate interspersed section headers
691 & explanatory text in a module. For example::
693 """Module docstring."""
706 class MyException(Exception): pass
710 * Should standalone strings also become (module/class) docstrings?
711 Under what conditions? We want to prevent arbitrary strings from
712 becomming docstrings of prior attribute assignments etc. Assume
713 that there must be no blank lines between attributes and attribute
714 docstrings? (Use lineno of NEWLINE token.)
716 Triple-quotes are sometimes used for multi-line comments (such as
717 commenting out blocks of code). How to reconcile?
719 * HappyDoc's idea of using comment blocks when there's no docstring
720 may be useful to get around the conflict between `additional
721 docstrings`_ and ``from __future__ import`` for module docstrings.
722 A module could begin like this::
724 #!/usr/bin/env python
726 # :Copyright: whatever
728 """This is the public module docstring (``__doc__``)."""
730 # More docs, in comments.
731 # All comments at the beginning of a module could be
732 # accumulated as docstrings.
733 # We can't have another docstring here, because of the
734 # ``__future__`` statement.
736 from __future__ import division
738 Using the JavaDoc convention of a doc-comment block beginning with
739 ``##`` is useful though. It allows doc-comments and implementation
742 .. _additional docstrings:
743 ../peps/pep-0258.html#additional-docstrings
745 * HappyDoc uses an initial comment block to set "parser configuration
746 values". Do the same thing for Docutils, to set runtime settings on
747 a per-module basis? I.e.::
749 # Docutils:setting=value
751 Could be used to turn on/off function parameter comment recognition
752 & other marginal features. Could be used as a general mechanism to
753 augment config files and command-line options (but which takes
756 * Multi-file output should be divisible at arbitrary level.
758 * Support all forms of ``import`` statements:
760 - ``import module``: listed as "module"
761 - ``import module as alias``: "alias (module)"
762 - ``from module import identifier``: "identifier (from module)"
763 - ``from module import identifier as alias``: "alias (identifier
765 - ``from module import *``: "all identifiers (``*``) from module"
767 * Have links to colorized Python source files from API docs? And
768 vice-versa: backlinks from the colorized source files to the API
771 * In summaries, use the first *sentence* of a docstring if the first
772 line is not followed by a blank line.
775 reStructuredText Parser
776 =======================
778 Also see the `... Or Not To Do?`__ list.
780 __ rst/alternatives.html#or-not-to-do
782 * Recognize unicode whitespace and punctuation. See
783 <http://thread.gmane.org/gmane.text.docutils.user/2765>.
785 * Allow embedded references and not only embedded URIs: ```link text
786 <reference_>`_``; see the second half of
787 <http://article.gmane.org/gmane.text.docutils.devel/3738>.
789 * Another list problem::
795 This ends up as a definition list. This is more of a usability
798 * This case is probably meant to be a nested list, but it ends up as a
799 list inside a block-quote without an error message::
805 It should probably just be an error.
807 The problem with this is that you don't notice easily in HTML that
808 it's not a nested list but a block-quote -- there's not much of a
811 * Treat enumerated lists that are not arabic and consist of only one
812 item in a single line as ordinary paragraphs. See
813 <http://article.gmane.org/gmane.text.docutils.user/2635>.
815 * The citation syntax could use some improvements. See
816 <http://thread.gmane.org/gmane.text.docutils.user/2499> (and the
818 <http://thread.gmane.org/gmane.text.docutils.user/2499/focus=3028>,
819 and the follow-ups at
820 <http://thread.gmane.org/gmane.text.docutils.user/3087>,
821 <http://thread.gmane.org/gmane.text.docutils.user/3110>,
822 <http://thread.gmane.org/gmane.text.docutils.user/3114>),
823 <http://thread.gmane.org/gmane.text.docutils.user/2443>,
824 <http://thread.gmane.org/gmane.text.docutils.user/2715>,
825 <http://thread.gmane.org/gmane.text.docutils.user/3027>,
826 <http://thread.gmane.org/gmane.text.docutils.user/3120>,
827 <http://thread.gmane.org/gmane.text.docutils.user/3253>.
829 * The current list-recognition logic has too many false positives, as
836 Here ``V.`` is recognized as an enumerator, which leads to
837 confusion. We need to find a solution that resolves such problems
838 without complicating the spec to much.
840 See <http://thread.gmane.org/gmane.text.docutils.user/2524>.
842 * Add indirect links via citation references & footnote references.
845 `Goodger (2005)`_ is helpful.
847 .. _Goodger (2005): [goodger2005]_
848 .. [goodger2005] citation text
850 See <http://thread.gmane.org/gmane.text.docutils.user/2499>.
852 * Change the specification so that more punctuation is allowed
853 before/after inline markup start/end string
854 (http://article.gmane.org/gmane.text.docutils.cvs/3824).
856 * Complain about bad URI characters
857 (http://article.gmane.org/gmane.text.docutils.user/2046) and
858 disallow internal whitespace
859 (http://article.gmane.org/gmane.text.docutils.user/2214).
861 * Create ``info``-level system messages for unnecessarily
862 backslash-escaped characters (as in ``"\something"``, rendered as
863 "something") to allow checking for errors which silently slipped
866 * Add (functional) tests for untested roles.
868 * Add test for ":figwidth: image" option of "figure" directive. (Test
869 code needs to check if PIL is available on the system.)
871 * Add support for CJK double-width whitespace (indentation) &
872 punctuation characters (markup; e.g. double-width "*", "-", "+")?
874 * Add motivation sections for constructs in spec.
876 * Support generic hyperlink references to _`targets in other
877 documents`? Not in an HTML-centric way, though (it's trivial to say
878 ``http://www.example.com/doc#name``, and useless in non-HTML
879 contexts). XLink/XPointer? ``.. baseref::``? See Doc-SIG
882 * .. _adaptable file extensions:
884 In target URLs, it would be useful to not explicitly specify the
885 file extension. If we're generating HTML, then ".html" is
886 appropriate; if PDF, then ".pdf"; etc. How about using ".*" to
887 indicate "choose the most appropriate filename extension"? For
890 .. _Another Document: another.*
892 What is to be done for output formats that don't *have* hyperlinks?
893 For example, LaTeX targeted at print. Hyperlinks may be "called
894 out", as footnotes with explicit URLs. (Don't convert the links.)
896 But then there's also LaTeX targeted at PDFs, which *can* have
897 links. Perhaps a runtime setting for "*" could explicitly provide
898 the extension, defaulting to the output file's extension.
900 Should the system check for existing files? No, not practical.
902 Handle documents only, or objects (images, etc.) also?
904 If this handles images also, how to differentiate between document
905 and image links? Element context (within "image")? Which image
906 extension to use for which document format? Again, a runtime
907 setting would suffice.
909 This may not be just a parser issue; it may need framework support.
911 Mailing list threads: `Images in both HTML and LaTeX`__ (especially
912 `this summary of Lea's objections`__), `more-universal links?`__,
913 `Output-format-sensitive link targets?`__
915 __ http://thread.gmane.org/gmane.text.docutils.user/1239
916 __ http://article.gmane.org/gmane.text.docutils.user/1278
917 __ http://thread.gmane.org/gmane.text.docutils.user/1915
918 __ http://thread.gmane.org/gmane.text.docutils.user/2438
920 Idea from Jim Fulton: an external lookup table of targets:
922 I would like to specify the extension (e.g. .txt) [in the
923 source, rather than ``filename.*``], but tell the converter to
924 change references to the files anticipating that the files will
929 .. _Another Document: another.txt
931 rst2html.py --convert-links "another.txt bar.txt" foo.txt
933 That is, name the files for which extensions should be converted.
935 Note that I want to refer to original files in the original text
936 (another.txt rather than another.txt) because I want the
937 unconverted text to stand on its own.
939 Note that in most cases, people will be able to use globs::
941 rst2html.py --convert-link-extensions-for "`echo *.txt`" foo.txt
943 It might be nice to be able to use multiple arguments, as in::
945 rst2html.py --convert-link-extensions-for *.txt -- foo.txt
949 > What is to be done for output formats
950 > that don't have hyperlinks?
952 Don't convert the links.
956 > Handle documents only, or objects
957 > (images, etc.) also?
959 No, documents only, but there really is no need for gueswork.
960 Just get the file names as command-line arguments. EIBTI
961 [explicit is better than implicit].
963 For images, we probably need separate solution (which is being
964 worked on), whereas for documents, the issue is basically
965 interlinking between reStructuredText documents. IMO, this cries
966 for support for multiple input and output files, i.e. support for
967 documents which comprise multiple files. Adding adaptable file
968 extensions seems like a kludge. // FW
970 * Implement the header row separator modification to table.el. (Wrote
971 to Takaaki Ota & the table.el mailing list on 2001-08-12, suggesting
972 support for "=====" header rows. On 2001-08-17 he replied, saying
973 he'd put it on his to-do list, but "don't hold your breath".)
975 * Fix the parser's indentation handling to conform with the stricter
976 definition in the spec. (Explicit markup blocks should be strict or
979 .. XXX What does this mean? Can you elaborate, David?
981 * Make the parser modular. Allow syntax constructs to be added or
982 disabled at run-time. Subclassing is probably not enough because it
983 makes it difficult to apply multiple extensions.
985 * Generalize the "doctest block" construct (which is overly
986 Python-centric) to other interactive sessions? "Doctest block"
987 could be renamed to "I/O block" or "interactive block", and each of
988 these could also be recognized as such by the parser:
993 A block beginning with a "$ " prompt is interpreted as a shell
994 session interactive block. As with Doctest blocks, the
995 interactive block ends with the first blank line, and wouldn't
998 - Root shell sessions::
1001 A block beginning with a "# " prompt is interpreted as a root
1002 shell session (the user is or has to be logged in as root)
1003 interactive block. Again, the block ends with a blank line.
1005 Other standard (and unambiguous) interactive session prompts could
1006 easily be added (such as "> " for WinDOS).
1008 Tony Ibbs spoke out against this idea (2002-06-14 Doc-SIG thread
1009 "docutils feedback").
1011 * Add support for pragma (syntax-altering) directives.
1013 Some pragma directives could be local-scope unless explicitly
1014 specified as global/pragma using ":global:" options.
1016 * Support whitespace in angle-bracketed standalone URLs according to
1017 Appendix E ("Recommendations for Delimiting URI in Context") of `RFC
1020 .. _RFC 2396: http://www.rfc-editor.org/rfc/rfc2396.txt
1022 * Use the vertical spacing of the source text to determine the
1023 corresponding vertical spacing of the output?
1025 * [From Mark Nodine] For cells in simple tables that comprise a
1026 single line, the justification can be inferred according to the
1029 1. If the text begins at the leftmost column of the cell,
1030 then left justification, ELSE
1031 2. If the text begins at the rightmost column of the cell,
1032 then right justification, ELSE
1033 3. Center justification.
1035 The onus is on the author to make the text unambiguous by adding
1036 blank columns as necessary. There should be a parser setting to
1037 turn off justification-recognition (normally on would be fine).
1039 Decimal justification?
1041 All this shouldn't be done automatically. Only when it's requested
1042 by the user, e.g. with something like this::
1049 Otherwise it will break existing documents.
1051 * Generate a warning or info message for paragraphs which should have
1052 been lists, like this one::
1057 * Generalize the "target-notes" directive into a command-line option
1058 somehow? See docutils-develop 2003-02-13.
1060 * Allow a "::"-only paragraph (first line, actually) to introduce a
1061 _`literal block without a blank line`? (Idea from Paul Moore.) ::
1064 This is a literal block
1066 Is indentation enough to make the separation between a paragraph
1067 which contains just a ``::`` and the literal text unambiguous?
1068 (There's one problem with this concession: If one wants a definition
1069 list item which defines the term "::", we'd have to escape it.) It
1070 would only be reasonable to apply it to "::"-only paragraphs though.
1071 I think the blank line is visually necessary if there's text before
1074 The text in this paragraph needs separation
1075 from the literal block following::
1076 This doesn't look right.
1078 * Add new syntax for _`nested inline markup`? Or extend the parser to
1079 parse nested inline markup somehow? See the `collected notes
1080 <rst/alternatives.html#nested-inline-markup>`__.
1082 * Drop the backticks from embedded URIs with omitted reference text?
1083 Should the angle brackets be kept in the output or not? ::
1087 Probably not worth the trouble.
1089 * How about a syntax for alternative hyperlink behavior, such as "open
1090 in a new window" (as in HTML's ``<a target="_blank">``)?
1092 The MoinMoin wiki uses a caret ("^") at the beginning of the URL
1093 ("^" is not a legal URI character). That could work for both inline
1094 and explicit targets::
1096 The `reference docs <^url>`__ may be handy.
1100 This may be too specific to HTML. It hasn't been requested very
1103 * Add an option to add URI schemes at runtime.
1105 * _`Segmented lists`::
1107 : segment : segment : segment
1108 : segment : segment : very long
1110 : segment : segment : segment
1112 The initial colon (":") can be thought of as a type of bullet
1114 We could even have segment titles::
1116 :: title : title : title
1117 : segment : segment : segment
1118 : segment : segment : segment
1120 This would correspond well to DocBook's SegmentedList. Output could
1121 be tabular or "name: value" pairs, as described in DocBook's docs.
1123 * Allow backslash-escaped colons in field names::
1125 :Case Study\: Event Handling: This chapter will be dropped.
1127 * Enable grid _`tables inside XML comments`, where "--" ends comments.
1128 I see three implementation possibilities:
1130 1. Make the table syntax characters into "table" directive options.
1131 This is the most flexible but most difficult, and we probably
1132 don't need that much flexibility.
1134 2. Substitute "~" for "-" with a specialized directive option
1137 3. Make the standard table syntax recognize "~" as well as "-", even
1138 without a directive option. Individual tables would have to be
1139 internally consistent.
1141 Directive options are preferable to configuration settings, because
1142 tables are document-specific. A pragma directive would be another
1143 approach, to set the syntax once for a whole document.
1145 In the meantime, the list-table_ directive is a good replacement for
1146 grid tables inside XML comments.
1148 .. _list-table: ../ref/rst/directives.html#list-table
1150 * Generalize docinfo contents (bibliographic fields): remove specific
1151 fields, and have only a single generic "field"?
1157 We need a generic solution, that's applicable to any output format.
1158 Using a standard, such as MathML_, would be best. (For an overview of
1159 MathML implementations and tests, see e.g. the `mathweb wiki`_ or
1160 the `ConTeXT MathML page`_
1162 .. _MathML: http://www.w3.org/TR/MathML2/
1163 .. _mathweb wiki: http://www.mathweb.org/wiki/MathML
1164 .. _ConTeXT MathML page: http://wiki.contextgarden.net/MathML
1168 MathML in its full XML form was never thought to be usable as an
1169 input format: for a start it is far too verbose as necessitated by
1170 its intention to be expressive.
1172 -- http://www.w3.org/Math/Roadmap/
1174 Hence, with MathML, a different input format is needed. OTOH, LaTeX
1175 math syntax can be used for both, input and internal storage.
1181 * intended for input by a human, widely used, and well documented.
1183 * convertible to all supported output formats (building on
1184 existing extensions like `latex_math`_ (LaTeX2MathML) or the `math
1185 support in Sphinx`_ (see below for `HTML output`_).
1187 * Used for input and storage by the `Math support in Sphinx`_.
1189 * Unicode input similar to the "unicode-math" package for
1190 XeTeX/LuaTeX provides for a improved readability.
1192 * The backtick (GRAVE ACCENT, 0x60) cannot be used in a math role.
1193 Fortunately, it is not required in LaTeX math mode, as the
1194 ``\grave`` macro is used instead of ``\```.
1197 Used, e.g., by MultiMarkdown__
1199 .. _ASCIIMathML: http://www1.chapman.edu/~jipsen/mathml/asciimath.html
1200 __ http://fletcherpenney.net/multimarkdown/
1203 `Unicode Nearly Plain Text Encoding of Mathematics`_
1204 format for lightly marked-up representation of mathematical
1205 expressions in Unicode.
1207 (Unicode Technical Note. Sole responsibility for its contents rests
1208 with the author(s). Publication does not imply any endorsement by
1209 the Unicode Consortium.)
1211 .. _Unicode Nearly Plain Text Encoding of Mathematics:
1212 http://www.unicode.org/notes/tn28/
1214 See `the culmination of a relevant discussion
1215 <http://article.gmane.org/gmane.text.docutils.user/118>`__.
1218 Try to be compatible with `Math support in Sphinx`_?
1220 * When the math is only one line of text, it can also be given as a
1223 * Supports multiple equations, which should be separated by a blank
1226 * The ``:label:`` option selects a label for the equation, by which it
1227 can be cross-referenced, and causes an equation number to be issued.
1229 * Option ``:nowrap:`` prevents wrapping of the given math in a
1230 math environment (you have to specify the math environment in the
1233 .. _Math support in Sphinx: http://sphinx.pocoo.org/ext/math.html
1239 Which equation environments should be supported by the math directive?
1243 + numbered: `equation`
1244 + unnumbered: `equation*`
1246 * multiline (test for ``\\`` outside of a nested environment
1247 (e.g. `array` or `cases`)
1249 + numbered: `align` (number every line)
1251 (To give one common number to all lines, put them in a `split`
1252 environment. Docutils then places it in an `equation` environment.)
1254 + unnumbered: `align*`
1256 + Sphinx math also supports `gather` (checking for blank lines in
1259 See http://www.math.uiuc.edu/~hildebr/tex/displays.html.
1265 There is no native math support in HTML.
1268 Converters from LaTeX to MathML include
1270 * latex_math_ (Python) by Jens Jørgen Mortensen in the Docutils sandbox
1273 * TeX4ht_ (TeX based)
1275 * itex_ (also `used in Abiword`__)
1276 * TtM_ (C, non free, free binary for Linux) with an `online-trial page`__
1277 * `Steve’s LATEX-to-MathML translator`_
1278 ('mini-language', javascript, Python)
1280 latex_math_ is the base for the current latex2mathml_ module used
1281 with ``--math-output=MathML``.
1283 * Write a new converter based on:
1285 * a generic tokenizer (see e.g. a `latex-codec recipe`_,
1286 `updated latex-codec`_, )
1287 * the Unicode-Char <-> LaTeX mappings database unimathsymbols_
1289 __ http://msevior.livejournal.com/26377.html
1290 __ http://hutchinson.belmont.ma.us/tth/mml/ttmmozform.html
1291 .. _latex_math: ../../../sandbox/jensj/latex_math/
1292 .. _latex2mathml: ../../docutils/math/latex2mathml.py
1293 .. _Blahtex: http://gva.noekeon.org/blahtexml/
1294 .. _MathToWeb: http://www.mathtoweb.com/
1295 .. _TeX4ht: http://www.tug.org/applications/tex4ht/mn.html
1296 .. _LaTeXML: http://dlmf.nist.gov/LaTeXML/
1297 .. _itex: http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html
1298 .. _ttm: http://hutchinson.belmont.ma.us/tth/mml/
1299 .. _Steve’s LATEX-to-MathML translator:
1300 http://www.gold-saucer.org/mathml/greasemonkey/dist/display-latex
1301 .. _latex-codec recipe:
1302 http://code.activestate.com/recipes/252124-latex-codec/
1303 .. _updated latex-codec:
1304 http://mirror.ctan.org/biblio/bibtex/utils/mab2bib/latex.py
1305 .. _unimathsymbols: http://milde.users.sourceforge.net/LUCR/Math/
1308 .. _itex: http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html
1312 format math in standard HTML enhanced by CSS rules
1313 (Overview__, `Examples and experiments`__).
1315 LaTeX-math to HTML/CSS converters include
1318 * Hevea_ (Objective Caml)
1321 __ http://www.cs.tut.fi/~jkorpela/math/
1322 __ http://www.zipcon.net/~swhite/docs/math/math.html
1323 .. _TtH: ttp://hutchinson.belmont.ma.us/tth/index.html
1324 .. _Hevea: http://para.inria.fr/~maranget/hevea/
1325 .. _elyxer: http://elyxer.nongnu.org/
1328 (PNG or SVG) like e.g. Wikipedia. (e.g. with dvisvgm_ or the
1329 pure-python MathML->SVG converter SVGMath_)
1331 .. _dvisvgm: http://dvisvgm.sourceforge.net/
1332 .. _SVGMath: http://www.grigoriev.ru/svgmath/
1338 * MathML_ can be imported by the Math module.
1340 However, putting MathML into an ODP file seems tricky:
1341 http://idippedut.dk/post/2008/01/25/Do-your-math-ODF-and-MathML.aspx
1342 http://idippedut.dk/post/2008/03/03/Now-I-get-it-ODF-and-MathML.aspx
1345 * OOoLaTeX__: "a set of macros designed to bring the power of LaTeX
1348 __ http://ooolatex.sourceforge.net/
1354 Directives below are often referred to as "module.directive", the
1355 directive function. The "module." is not part of the directive name
1356 when used in a document.
1358 * Make the _`directive interface` object-oriented
1359 (http://article.gmane.org/gmane.text.docutils.user/1871).
1361 * Allow for field lists in list tables. See
1362 <http://thread.gmane.org/gmane.text.docutils.devel/3392>.
1366 Unify table implementations and unify options of table directives
1367 (http://article.gmane.org/gmane.text.docutils.user/1857).
1369 * Allow directives to be added at run-time?
1371 * Use the language module for directive option names?
1373 * Add "substitution_only" and "substitution_ok" function attributes,
1374 and automate context checking?
1376 * Change directive functions to directive classes? Superclass'
1377 ``__init__()`` could handle all the bookkeeping.
1379 * Implement options or features on existing directives:
1381 - Add a "name" option to directives, to set an author-supplied
1384 - All directives that produce titled elements should grow implicit
1385 reference names based on the titles.
1387 - Allow the _`:trim:` option for all directives when they occur in a
1388 substitution definition, not only the unicode_ directive.
1390 .. _unicode: ../ref/rst/directives.html#unicode-character-codes
1392 - Add the "class" option to the unicode directive. For example, you
1393 might want to get characters or strings with borders around them.
1395 - _`images.figure`: "title" and "number", to indicate a formal
1398 - _`parts.sectnum`: "local"?, "refnum"
1400 A "local" option could enable numbering for sections from a
1401 certain point down, and sections in the rest of the document are
1402 not numbered. For example, a reference section of a manual might
1403 be numbered, but not the rest. OTOH, an all-or-nothing approach
1404 would probably be enough.
1406 The "sectnum" directive should be usable multiple times in a
1407 single document. For example, in a long document with "chapter"
1408 and "appendix" sections, there could be a second "sectnum" before
1409 the first appendix, changing the sequence used (from 1,2,3... to
1410 A,B,C...). This is where the "local" concept comes in. This part
1411 of the implementation can be left for later.
1413 A "refnum" option (better name?) would insert reference names
1414 (targets) consisting of the reference number. Then a URL could be
1415 of the form ``http://host/document.html#2.5`` (or "2-5"?). Allow
1416 internal references by number? Allow name-based *and*
1417 number-based ids at the same time, or only one or the other (which
1418 would the table of contents use)? Usage issue: altering the
1419 section structure of a document could render hyperlinks invalid.
1421 - _`parts.contents`: Add a "suppress" or "prune" option? It would
1422 suppress contents display for sections in a branch from that point
1423 down. Or a new directive, like "prune-contents"?
1425 Add an option to include topics in the TOC? Another for sidebars?
1426 The "topic" directive could have a "contents" option, or the
1427 "contents" directive" could have an "include-topics" option. See
1428 docutils-develop 2003-01-29.
1430 - _`parts.header` & _`parts.footer`: Support multiple, named headers
1431 & footers? For example, separate headers & footers for odd, even,
1432 and the first page of a document.
1434 This may be too specific to output formats which have a notion of
1439 - Add a ``:parent:`` option for setting the parent's class
1440 (http://article.gmane.org/gmane.text.docutils.devel/3165).
1444 - Option to label lines?
1446 - How about an environment variable, say RSTINCLUDEPATH or
1447 RSTPATH, for standard includes (as in ``.. include:: <name>``)?
1448 This could be combined with a setting/option to allow
1449 user-defined include directories.
1451 - Add support for inclusion by URL? ::
1454 :url: http://www.example.org/inclusion.txt
1456 - Strip blank lines from begin and end of a literal included file or
1457 file section. This would correspond to the way a literal block is
1460 As nodes.literal_block expects (and we have) the text as a string
1461 (rather than a list of lines), using a regexp seems the way.
1463 - _`misc.raw`: add a "destination" option to the "raw" directive? ::
1470 It needs thought & discussion though, to come up with a consistent
1471 set of destination labels and consistent behavior.
1473 And placing HTML code inside the <head> element of an HTML
1474 document is rather the job of a templating system.
1476 - _`body.sidebar`: Allow internal section structure? Adornment
1477 styles would be independent of the main document.
1479 That is really complicated, however, and the document model
1480 greatly benefits from its simplicity.
1482 * Implement directives. Each of the list items below begins with an
1483 identifier of the form, "module_name.directive_function_name". The
1484 directive name itself could be the same as the
1485 directive_function_name, or it could differ.
1489 It has the disadvantage that it's only easily implementable for
1490 HTML, so it's specific to one output format.
1492 (For non-HTML writers, the imagemap would have to be replaced with
1495 - _`parts.endnotes` (or "footnotes"): See `Footnote & Citation Gathering`_.
1497 - _`parts.citations`: See `Footnote & Citation Gathering`_.
1499 - _`misc.language`: Specify (= change) the language of a document at
1502 - _`misc.settings`: Set any(?) Docutils runtime setting from within
1503 a document? Needs much thought and discussion.
1505 Security concerns need to be taken into account (it shouldn't be
1506 possible to enable ``file_insertion_enabled`` from within a
1507 document), and settings that only would have taken effect before
1508 the directive (like ``tab-width``) shouldn't be accessible either.
1510 See this sub-thread:
1511 <http://thread.gmane.org/gmane.text.docutils.user/3620/focus=3649>
1513 - _`misc.gather`: Gather (move, or copy) all instances of a specific
1514 element. A generalization of the "endnotes" & "citations" ideas.
1516 - Add a custom "directive" directive, equivalent to "role"? For
1521 .. class:: incremental
1525 "``.. incr::``" above is equivalent to "``.. class:: incremental``".
1529 .. directive:: printed-links
1535 :class: print-inline
1537 This acts like macros. The directive contents will have to be
1538 evaluated when referenced, not when defined.
1540 * Needs a better name? "Macro", "substitution"?
1541 * What to do with directive arguments & options when the
1542 macro/directive is referenced?
1544 - Make the meaning of block quotes overridable? Only a 1-shot
1545 though; doesn't solve the general problem.
1547 - .. _conditional directives:
1549 Docutils already has the ability to say "use this content for
1550 Writer X" (via the "raw" directive), but it doesn't have the
1551 ability to say "use this content for any Writer other than X". It
1552 wouldn't be difficult to add this ability though.
1554 My first idea would be to add a set of conditional directives.
1555 Let's call them "writer-is" and "writer-is-not" for discussion
1556 purposes (don't worry about implemention details). We might
1559 .. writer-is:: text-only
1575 .. figure:: protocol_stack.eps
1577 .. writer-is-not:: text-only pdf
1579 .. figure:: protocol_stack.png
1581 This could be an interface to the Filter transform
1582 (docutils.transforms.components.Filter).
1584 The ideas in `adaptable file extensions`_ above may also be
1587 SVG's "switch" statement may provide inspiration.
1589 Here's an example of a directive that could produce multiple
1590 outputs (*both* raw troff pass-through *and* a GIF, for example)
1591 and allow the Writer to select. ::
1598 %sum from i=o to inf c sup i~=~lim from {m -> inf}
1599 sum from i=0 to m sup i%
1604 - _`body.example`: Examples; suggested by Simon Hefti. Semantics as
1605 per Docbook's "example"; admonition-style, numbered, reference,
1606 with a caption/title.
1608 - _`body.index`: Index targets.
1610 See `Index Entries & Indexes
1611 <./rst/alternatives.html#index-entries-indexes>`__.
1613 - _`body.literal`: Literal block, possibly "formal" (see `object
1614 numbering and object references`_ above). Possible options:
1616 - "highlight" a range of lines
1618 - include only a specified range of lines
1620 - "number" or "line-numbers"
1622 - "styled" could indicate that the directive should check for
1623 style comments at the end of lines to indicate styling or
1626 Specific derivatives (i.e., a "python-interactive" directive)
1627 could interpret style based on cues, like the ">>> " prompt and
1628 "input()"/"raw_input()" calls.
1630 See docutils-users 2003-03-03.
1632 - _`body.listing`: Code listing with title (to be numbered
1633 eventually), equivalent of "figure" and "table" directives.
1635 - _`colorize.python`: Colorize Python code. Fine for HTML output,
1636 but what about other formats? Revert to a literal block? Do we
1637 need some kind of "alternate" mechanism? Perhaps use a "pending"
1638 transform, which could switch its output based on the "format" in
1639 use. Use a factory function "transformFF()" which returns either
1640 "HTMLTransform()" instance or "GenericTransform" instance?
1642 If we take a Python-to-HTML pretty-printer and make it output a
1643 Docutils internal doctree (as per nodes.py) instead of HTML, then
1644 each output format's stylesheet (or equivalent) mechanism could
1645 take care of the rest. The pretty-printer code could turn this
1648 <literal_block xml:space="preserve">
1649 print 'This is Python code.'
1654 into something like this ("</>" is end-tag shorthand)::
1656 <literal_block xml:space="preserve" class="python">
1657 <keyword>print</> <string>'This is Python code.'</>
1658 <keyword>for</> <identifier>i</> <keyword
1659 >in</> <expression>range(10)</>:
1660 <keyword>print</> <expression>i</>
1663 But I'm leaning toward adding a single new general-purpose
1664 element, "phrase", equivalent to HTML's <span>. Here's the
1665 example rewritten using the generic "phrase"::
1667 <literal_block xml:space="preserve" class="python">
1668 <phrase class="keyword">print</> <phrase
1669 class="string">'This is Python code.'</>
1670 <phrase class="keyword">for</> <phrase
1671 class="identifier">i</> <phrase class="keyword">in</> <phrase
1672 class="expression">range(10)</>:
1673 <phrase class="keyword">print</> <phrase
1674 class="expression">i</>
1677 It's more verbose but more easily extensible and more appropriate
1678 for the case at hand. It allows us to edit style sheets to add
1679 support for new formats, not the Docutils code itself.
1681 Perhaps a single directive with a format parameter would be
1684 .. colorize:: python
1686 print 'This is Python code.'
1690 But directives can have synonyms for convenience. "format::
1691 python" was suggested, but "format" seems too generic.
1693 - _`pysource.usage`: Extract a usage message from the program,
1694 either by running it at the command line with a ``--help`` option
1695 or through an exposed API. [Suggestion for Optik.]
1701 Interpreted text is entirely a reStructuredText markup construct, a
1702 way to get around built-in limitations of the medium. Some roles are
1703 intended to introduce new doctree elements, such as "title-reference".
1704 Others are merely convenience features, like "RFC".
1706 All supported interpreted text roles must already be known to the
1707 Parser when they are encountered in a document. Whether pre-defined
1708 in core/client code, or in the document, doesn't matter; the roles
1709 just need to have already been declared. Adding a new role may
1710 involve adding a new element to the DTD and may require extensive
1711 support, therefore such additions should be well thought-out. There
1712 should be a limited number of roles.
1714 The only place where no limit is placed on variation is at the start,
1715 at the Reader/Parser interface. Transforms are inserted by the Reader
1716 into the Transformer's queue, where non-standard elements are
1717 converted. Once past the Transformer, no variation from the standard
1718 Docutils doctree is possible.
1720 An example is the Python Source Reader, which will use interpreted
1721 text extensively. The default role will be "Python identifier", which
1722 will be further interpreted by namespace context into <class>,
1723 <method>, <module>, <attribute>, etc. elements (see pysource.dtd),
1724 which will be transformed into standard hyperlink references, which
1725 will be processed by the various Writers. No Writer will need to have
1726 any knowledge of the Python-Reader origin of these elements.
1728 * Add explicit interpreted text roles for the rest of the implicit
1729 inline markup constructs: named-reference, anonymous-reference,
1730 footnote-reference, citation-reference, substitution-reference,
1731 target, uri-reference (& synonyms).
1733 * Add directives for each role as well? This would allow indirect
1736 This text contains |nested inline markup|.
1738 .. |nested inline markup| emphasis::
1740 nested ``inline`` markup
1744 - "_`raw-wrapped`" (or "_`raw-wrap`"): Base role to wrap raw text
1745 around role contents.
1747 For example, the following reStructuredText source ... ::
1749 .. role:: red(raw-formatting)
1751 :html: <font color="red">
1752 :latex: {\color{red}
1759 ... will yield the following document fragment::
1763 <inline classes="red">
1766 <raw format="latex">
1768 <inline classes="red">
1772 <raw format="latex">
1775 Possibly without the intermediate "inline" node.
1777 - _`"acronym" and "abbreviation"`: Associate the full text with a
1778 short form. Jason Diamond's description:
1780 I want to translate ```reST`:acronym:`` into ``<acronym
1781 title='reStructuredText'>reST</acronym>``. The value of the
1782 title attribute has to be defined out-of-band since you can't
1783 parameterize interpreted text. Right now I have them in a
1784 separate file but I'm experimenting with creating a directive
1785 that will use some form of reST syntax to let you define them.
1787 Should Docutils complain about undefined acronyms or
1790 What to do if there are multiple definitions? How to
1791 differentiate between CSS (Content Scrambling System) and CSS
1792 (Cascading Style Sheets) in a single document? David Priest
1795 The short answer is: you don't. Anyone who did such a thing
1796 would be writing very poor documentation indeed. (Though I
1797 note that `somewhere else in the docs`__, there's mention of
1798 allowing replacement text to be associated with the
1799 abbreviation. That takes care of the duplicate
1800 acronyms/abbreviations problem, though a writer would be
1801 foolish to ever need it.)
1803 __ `inline parameter syntax`_
1805 How to define the full text? Possibilities:
1807 1. With a directive and a definition list? ::
1814 Docstring Processing System
1816 Would this list remain in the document as a glossary, or would
1817 it simply build an internal lookup table? A "glossary"
1818 directive could be used to make the intention clear.
1819 Acronyms/abbreviations and glossaries could work together.
1821 Then again, a glossary could be formed by gathering individual
1822 definitions from around the document.
1824 2. Some kind of `inline parameter syntax`_? ::
1826 `reST <reStructuredText>`:acronym: is `WYSIWYG <what you
1827 see is what you get>`:acronym: plaintext markup.
1829 .. _inline parameter syntax:
1830 rst/alternatives.html#parameterized-interpreted-text
1832 3. A combination of 1 & 2?
1834 The multiple definitions issue could be handled by establishing
1835 rules of priority. For example, directive-based lookup tables
1836 have highest priority, followed by the first inline definition.
1837 Multiple definitions in directive-based lookup tables would
1838 trigger warnings, similar to the rules of `implicit hyperlink
1841 __ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
1843 4. Using substitutions? ::
1845 .. |reST| acronym:: reST
1846 :text: reStructuredText
1848 What do we do for other formats than HTML which do not support
1849 tool tips? Put the full text in parentheses?
1851 - "figure", "table", "listing", "chapter", "page", etc: See `object
1852 numbering and object references`_ above.
1854 - "glossary-term": This would establish a link to a glossary. It
1855 would require an associated "glossary-entry" directive, whose
1856 contents could be a definition list::
1865 This would allow entries to be defined anywhere in the document,
1866 and collected (via a "glossary" directive perhaps) at one point.
1872 The number of doctree nodes can be reduced by "normalizing" some related
1873 nodes. This makes the document model and the writers somewhat simpler.
1875 * The "doctest" element should go away. The construct could simply be
1876 a front-end to generic literal blocks. We could immediately (in 0.7)
1877 remove the doctest node from the doctree, but leave the
1878 syntax in reST. The reST parser could represent doctest blocks as
1879 literal blocks with a class attribute. The syntax could be left in
1880 reST (for a set period of time?).
1882 * Always use _`transforms.writer_aux.Admonitions` to "normalize" special
1883 admonitions (note, hint, warning, ...). There is no need to keep them in
1884 the doctree specification.
1886 Keep the special admonition directives in reStructuredText syntax?
1888 * _`Line numbers` and "source" in system messages:
1890 - Add "source" and "line" keyword arguments to all Reporter calls?
1891 This would require passing source/line arguments along all
1892 intermediate functions (where currently only `line` is used).
1894 Or rather specify "line" only if actually needed?
1896 Currently, `document.reporter` uses a state machine instance to
1897 determine the "source" and "line" info from
1898 `statemachine.input_lines` if not given explicitely. Except for
1899 special cases, the "line" argument is not needed because,
1900 `document.statemachine` keeps record of the current line number.
1902 - For system messages generated after the parsing is completed (i.e. by
1903 transforms or the writer) "line" info must be present in the doctree
1906 Elements' .line assignments should be checked. (Assign to .source
1907 too? Add a set_info method? To what?)
1909 The "source" (and line number in the source) can either be added
1910 explicitely to the elements or determined from the “raw” line
1911 number by `document.statemachine.get_source_and_line`.
1913 - Some line numbers in elements are not being set properly
1914 (explicitly), just implicitly/automatically. See rev. 1.74 of
1915 docutils/parsers/rst/states.py for an example of how to set.
1917 - The line numbers of definition list items are wrong::
1919 $ rst2pseudoxml.py --expose-internal-attribute line
1928 <document source="<stdin>">
1930 <definition_list_item internal:line="3">
1934 <paragraph internal:line="2">
1937 <definition_list_item internal:line="6">
1941 <paragraph internal:line="6">
1947 Quite a few nodes are getting a "None" source attribute as well. In
1948 particular, see the bodies of definition lists.
1952 Unimplemented Transforms
1953 ========================
1955 * _`Footnote & Citation Gathering`
1957 Collect and move footnotes & citations to the end of a document or the
1958 place of a "footnotes" or "citations" directive
1959 (see `<./ref/rst/directives.html>_`)
1962 Collect all footnotes that are referenced in the document before the
1963 directive (and after an eventually preceding ``.. footnotes::``
1964 directive) and insert at this place.
1966 Allows "endnotes" at a configurable place.
1969 Collect citations that are referenced ...
1973 a) defined in the document as citation elements
1975 b) auto-generated from entries in a bibliographic database.
1977 + based on bibstuff_?
1978 + also have a look at
1980 * CrossTeX_, a backwards-compatible, improved bibtex
1981 re-implementation in Python (including HTML export).
1982 (development stalled since 2 years)
1984 * Pybtex_,a drop-in replacement for BibTeX written in Python.
1986 * BibTeX styles & (experimental) pythonic style API.
1987 * Database in BibTeX, BibTeXML and YAML formats.
1988 * full Unicode support.
1989 * Write to TeX, HTML and plain text.
1991 * Automatically insert a "References" heading?
1993 .. _CrossTeX: http://www.cs.cornell.edu/people/egs/crosstex/
1994 .. _Pybtex: http://pybtex.sourceforge.net/
1996 * _`Reference Merging`
1998 When merging two or more subdocuments (such as docstrings),
1999 conflicting references may need to be resolved. There may be:
2001 * duplicate reference and/or substitution names that need to be made
2003 * duplicate footnote numbers that need to be renumbered.
2005 Should this be done before or after reference-resolving transforms
2006 are applied? What about references from within one subdocument to
2009 * _`Document Splitting`
2011 If the processed document is written to multiple files (possibly in
2012 a directory tree), it will need to be split up. Internal references
2013 will have to be adjusted.
2015 (HTML only? Initially, yes. Eventually, anything should be
2020 - Insert a "destination" attribute into the root element of each
2021 split-out document, containing the path/filename. The Output
2022 object or Writer will recognize this attribute and split out the
2023 files accordingly. Must allow for common headers & footers,
2024 prev/next, breadcrumbs, etc.
2026 - Transform a single-root document into a document containing
2027 multiple subdocuments, recursively. The content model of the
2028 "document" element would have to change to::
2031 ( (title, subtitle?)?,
2033 (docinfo, transition?)?,
2037 (I.e., add the last line -- 0 or more document elements.)
2039 Let's look at the case of hierarchical (directories and files)
2040 HTML output. Each document element containing further document
2041 elements would correspond to a directory (with an index.html file
2042 for the content preceding the subdocuments). Each document
2043 element containing no subdocuments (i.e., structure model elements
2044 only) corresponds to a concrete file with no directory.
2046 The natural transform would be to map sections to subdocuments,
2047 but possibly only a given number of levels deep.
2051 If a document is split up, each segment will need navigation links:
2052 parent, children (small TOC), previous (preorder), next (preorder).
2053 Part of `Document Splitting`_?
2055 * _`List of System Messages`
2057 The ``system_message`` elements are inserted into the document tree,
2058 adjacent to the problems themselves where possible. Some (those
2059 generated post-parse) are kept until later, in
2060 ``document.messages``, and added as a special final section,
2061 "Docutils System Messages".
2063 Docutils could be made to generate hyperlinks to all known
2064 system_messages and add them to the document, perhaps to the end of
2065 the "Docutils System Messages" section.
2067 Fred L. Drake, Jr. wrote:
2069 I'd like to propose that both parse- and transformation-time
2070 messages are included in the "Docutils System Messages" section.
2071 If there are no objections, I can make the change.
2073 The advantage of the current way of doing things is that parse-time
2074 system messages don't require a transform; they're already in the
2075 document. This is valuable for testing (unit tests,
2076 tools/quicktest.py). So if we do decide to make a change, I think
2077 the insertion of parse-time system messages ought to remain as-is
2078 and the Messages transform ought to move all parse-time system
2079 messages (remove from their originally inserted positions, insert in
2080 System Messages section).
2082 * _`Index Generation`
2086 Convert quotes and dashes to typographically correct entities.
2087 Sphinx does this with ``smartypants.py``.
2089 Write a generic version that uses Unicode chars
2090 (let the writer replace these if required).
2095 * Make it easier to find out fragment names (#foo-bar) of ``_`inline
2096 targets```. Currently you have to either look at the source or
2099 For example, we could add support for self-referencing targets
2100 (i.e. inline targets would [unobtrusively] link to themselves, so
2101 that you can just click them and then copy the address). Or we
2102 could add support for titles that display the fragment name (as in
2103 <http://subversion.tigris.org/mailing-list-guidelines.html>; just
2104 hover the paragraphs).
2106 Either way it should be optional and deactivated by default.
2108 This would be useful for documents like Docutils' bug list or to-do
2111 * Make the _`list compacting` logic more generic: For example, allow
2112 for literal blocks or line blocks inside of compact list items.
2114 This is not implementable as long as list compacting is done by
2115 omitting ``<p>`` tags. List compacting would need to be done by
2116 adjusting CSS margins instead.
2118 * Idea for field-list rendering: hanging indent::
2120 Field name (bold): First paragraph of field body begins
2121 with the field name inline.
2123 If the first item of a field body is not a paragraph,
2124 it would begin on the following line.
2126 * Add more support for <link> elements, especially for navigation
2129 The framework does not have a notion of document relationships, so
2130 probably raw.destination_ should be used.
2132 We'll have framework support for document relationships when support
2133 for `multiple output files`_ is added. The HTML writer could
2134 automatically generate <link> elements then.
2136 .. _raw.destination: misc.raw_
2138 * Base list compaction on the spacing of source list? Would require
2139 parser support. (Idea: fantasai, 16 Dec 2002, doc-sig.)
2141 * Add a tool tip ("title" attribute?) to footnote back-links
2142 identifying them as such. Text in Docutils language module.
2148 * Remove the generic style information (duplicated from html4css1.css)
2149 from pep.css to avoid redundancy.
2151 Needs support for multiple stylesheets in the PEP writer
2152 (is this inherited from HTML?).
2158 * Add a way to begin an untitled slide.
2160 * Add a way to begin a new slide, continuation, using the same title
2161 as the previous slide? (Unnecessary?) You need that if you have a
2162 lot of items in one section which don't fit on one slide.
2164 Maybe either this item or the previous one can be realized using
2167 * Have a timeout on incremental items, so the colour goes away after 1
2170 * Add an empty, black last slide (optionally). Currently the handling
2171 of the last slide is not very nice, it re-cycles through the
2172 incremental items on the last slide if you hit space-bar after the
2175 * Add a command-line option to disable advance-on-click.
2177 * Add a speaker's master document, which would contain a small version
2178 of the slide text with speaker's notes interspersed. The master
2179 document could use ``target="whatever"`` to direct links to a
2180 separate window on a second monitor (e.g., a projector).
2182 .. Note:: This item and the following items are partially
2183 accomplished by the S5 1.2 code (currently in alpha), which has
2184 not yet been integrated into Docutils.
2186 * Speaker's notes -- how to intersperse? Could use reST comments
2187 (".."), but make them visible in the speaker's master document. If
2188 structure is necessary, we could use a "comment" directive (to avoid
2189 nonsensical DTD changes, the "comment" directive could produce an
2190 untitled topic element).
2192 The speaker's notes could (should?) be separate from S5's handout
2195 * The speaker's master document could use frames for easy navigation:
2196 TOC on the left, content on the right.
2198 - It would be nice if clicking in the TOC frame simultaneously
2199 linked to both the speaker's notes frame and to the slide window,
2200 synchronizing both. Needs JavaScript?
2202 - TOC would have to be tightly formatted -- minimal indentation.
2204 - TOC auto-generated, as in the PEP Reader. (What if there already
2205 is a "contents" directive in the document?)
2207 - There could be another frame on the left (top-left or bottom-left)
2208 containing a single "Next" link, always pointing to the next slide
2209 (synchronized, of course). Also "Previous" link? FF/Rew go to
2210 the beginning of the next/current parent section? First/Last
2211 also? Tape-player-style buttons like ``|<< << < > >> >>|``?
2216 Add epub as an output format.
2218 Pack the output of a HTML writer and supporting files (e.g. images)
2219 into one single epub document.
2221 epub is an open file format for ebooks based on HTML, specified by the
2222 `International Digital Publishing Forum`_. Thus, documents in epub
2223 format are suited to be read with `electronic reading devices`_. The
2224 epub format comprises:
2226 * `Open Publication Structure (OPS)
2227 <http://www.idpf.org/2007/ops/OPS_2.0_final_spec.html>`_
2228 * `Open Packaging Format (OPF)
2229 <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html>`_
2230 * `OEBPS Container Format (OCF)
2231 <http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm>`_
2235 There is a project for epub support with sphinx providing a
2236 (hopefully) reusable framework.
2238 .. _rst2epub: http://bitbucket.org/wierob/rst2epub/
2239 .. _International Digital Publishing Forum: http://www.idpf.org/
2240 .. _electronic reading devices:
2241 http://en.wikipedia.org/wiki/List_of_e-book_readers
2243 Also, the plasTeX_ Python package has an EPUB renderer:
2245 It simply calls the XHTML renderer and does the epub packaging in
2248 .. _plasTeX: http://plastex.sourceforge.net/
2254 Also see the Problems__ section in the `latex writer documentation`_.
2256 __ ../user/latex.html#problems
2258 .. _latex writer documentation: ../user/latex.html
2261 ../../../sandbox/latex-variants/README.html
2266 * A multirow cell in a table expects empty cells in the spanned rows while
2267 the doctree contains only the remaining cells ("Exchange Table Model", see
2268 docs/ref/soextblx.dtd).
2270 Needs bookkeeping of "open" multirow cells (how many how long) and
2271 insertion of additional '&'s.
2273 See `<../../test/functional/input/data/latex.txt>`__
2275 * Too deeply nested lists fail: generate a warning and provide
2278 * Spaces in inline literal text::
2281 spacing between the words of this sentence (words
2282 should be grouped in pairs).
2284 Discuss the desired behaviour and implement a consistent one.
2286 * An enumerated list in the docinfo fails (\newcounter definition inside
2289 * File names of included graphics (see also `grffile` package).
2291 Generate clean and configurable LaTeX source
2292 ----------------------------------------------
2294 * Check the generated source with package `nag`.
2296 Configurable placement of figure and table floats
2297 `````````````````````````````````````````````````
2299 * Special class argument to individually place figures?
2303 placement-<optional arg> -> \figure[<optional arg>]{...}
2305 e.g. ``.. class:: placement-htb``,
2310 :h: place-here-if-possible
2313 :p: place-on-extra-page
2315 e.g.: ``.. class:: place-here-if-possible place-top place-bottom``
2317 Maybe support both variants?
2320 LaTeX constructs and packages instead of re-implementations
2321 ```````````````````````````````````````````````````````````
2323 Which packages do we want to use?
2325 + base and "recommended" packages
2327 (packages that should be in a "reasonably sized and reasonably modern
2328 LaTeX installation like the `texlive-latex-recommended` Debian package,
2331 + No "fancy" or "exotic" requirements.
2333 + pointers to advanced packages and their use in the `latex writer
2336 * ``alltt`` environment for literal block.
2340 + True footnotes with LaTeX auto-numbering (as option ``--latex-footnotes``)
2341 (also for target-footnotes):
2343 - attach footnote text to footnote-symobol node
2344 - write \footnote{<footnote text>}
2345 - consider cases where LaTeX does not support footnotes
2346 (inside tables, headings, ...)?
2347 - consider multiple footnote refs to common footnote text.
2351 If the symbol you want is not one of the ones listed, you'll need to
2352 redefine ``\@fnsymbol`` and add it, e.g. perhaps like::
2354 \def\@fnsymbol#1{\ifcase#1\hbox{}\or *\or \dagger\or \ddagger\or
2355 \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger \or
2356 \ddagger\ddagger \or \mathchar"27C \else\@ctrerr\fi\relax}
2358 which would allow \symbolfootnote[10]{footnote} to have a club as its
2361 + document customization (links to how-to and packages):
2363 .. Footnote packages:
2365 :footnote: texlive-latex-recommended % savenotes environment
2366 :footmisc: texlive-latex-extra % formatting options
2367 :manyfoot: texlive-latex-extra
2368 :bigfoot: texlive-latex-extra
2369 :perpage: texlive-latex-extra
2370 :ftnxtra: new on CTAN
2371 fixes the issue of footnote inside \caption{},
2372 tabular environment and \section{} like commands.
2376 http://www2.informatik.hu-berlin.de/~ahamann/studies/footnotes.pdf
2380 `Footnotes whose texts are identical
2381 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=repfootnote>`__
2383 * label per hand or use footmisc
2385 `More than one sequence of footnotes
2386 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multfoot>`__
2390 `Footnotes in tables
2391 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footintab>`__
2393 * `tabularx` and longtable allow footnotes.
2394 * `footnote` provides a "savenotes" environment which collects all
2395 footnotes and emits them at ``end{savenotes}``
2397 `Footnotes in LaTeX section headings
2398 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftnsect>`__
2400 * Take advantage of the fact that the mandatory argument doesn't
2401 move if the optional argument is present::
2403 \section[title] {title\footnote{title ftnt}}
2405 * Use the footmisc package, with package option stable - this modifies
2406 footnotes so that they softly and silently vanish away if used in a
2411 `Footnotes numbered per page
2412 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footnpp>`__
2414 * perpage provides a general mechanism for resetting counters per page
2415 * footmisc provides a package option perpage
2417 * enumeration environment, field list
2419 * use `mdwlist` from texlive-latex-recommended?
2421 * use `eqlist` (texlive-latex-extra) for field-lists?
2424 * ``--use-latex-when-possible`` »super option« that would set the
2427 --no-section-numbering
2430 --use-latex-abstract
2431 --use-latex-footnotes
2432 --use-latex-citations
2434 ? (My preference is to default to use-latex-* whenever possible [GM])
2440 * Use italic instead of slanted for titlereference?
2442 * Start a new paragraph after lists (as currently)
2443 or continue (no blank line in source, no parindent in output)?
2447 * continue if the `compound paragraph`_ directive is used, or
2448 * force a new paragraph with an empty comment.
2450 * Sidebar handling (environment with `framed`, `marginnote`, `wrapfig`,
2453 * Use optionlist for docinfo?
2455 * Keep literal-blocks together on a page, avoid pagebreaks.
2457 Failed experiments up to now: samepage, minipage, pagebreak 1 to 4 before
2460 Should be possible with ``--literal-block-env==lstlistings`` and some
2463 * More space between title and subtitle? ::
2466 + \\[0.5em] % subtitle%
2468 .. _PSNFSS documentation:
2469 http://mirror.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf
2470 .. _compound paragraph:
2471 ../ref/rst/directives.html#compound-paragraph
2473 http://mirror.ctan.org/help/Catalogue/entries/fixltx2e.html
2478 * Improve/simplify logic to set the column width in the output.
2480 + Assumed reST line length for table width setting configurable, or
2481 + use `ltxtable` (a combination of `tabularx` (auto-width) and
2482 `longtable` (page breaks)), or
2483 + use tabularx column type ``X`` and let LaTeX decide width, or
2487 http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tabulary
2489 * From comp.text.tex (13. 4. 2011):
2491 When using fixed width columns, you should ensure that the total
2492 width does not exceed \linewidth: if the first column is p{6cm}
2493 the second one should be p{\dimexpr\linewidth-6cm-4\tabcolsep}
2494 because the glue \tabcolsep is added twice at every column edge.
2495 You may also consider to set \tabcolsep to a different value...
2497 * csv-tables do not have a colwidth.
2499 * Add more classes or options, e.g. for
2501 + column width set by latex,
2502 + horizontal alignment and rules.
2503 + long table vs. tabular (see next item).
2505 * Use tabular instead of longtable for tables in legends or generally
2508 Alternatively, default to tabular and use longtable only if specified
2509 by config setting or class argument (analogue to booktable)?
2511 * Table heads and footer for longtable (firstpage lastpage ..)?
2513 * In tools.txt the option tables right column, there should be some more
2514 spacing between the description and the next paragraph "Default:".
2516 * Paragraph separation in tables is hairy.
2517 see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=struttab
2519 - The strut solution did not work.
2520 - setting extrarowheight added ad top of row not between paragraphs in
2521 a cell. ALTHOUGH i set it to 2pt because, text is too close to the topline.
2522 - baselineskip/stretch does not help.
2524 * Should there be two hlines after table head and on table end?
2526 * Place titled tables in a float ('table' environment)?
2528 The 'table', 'csv-table', and 'list-table' directives support an (optional)
2529 table title. In analogy to the 'figure' directive this should map to a
2532 Image and figure directives
2533 ```````````````````````````
2535 * compare the test case in:
2537 + `<../../test/functional/input/data/standard.txt>`__
2538 + `<../../test/functional/expected/standalone_rst_html4css1.html>`__
2539 + `<../../test/functional/expected/standalone_rst_latex.tex>`__
2541 * According to the HTML standard
2542 http://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG a right- or
2543 left-aligned image should be floated alongside the paragraph.
2545 + Use this default also for LaTeX?
2547 + Wrap text around figures/images with class argument "wrap"
2548 (like the odt writer)?
2550 Use `wrapfig` (or other recommended) package.
2552 * support more graphic formats (especially SVG, the only standard
2553 vector format for HTML)
2555 There is a `SWF package`_ at CTAN.
2558 http://mirror.ctan.org/macros/latex/contrib/flashmovie
2564 * support "figwidth" argument for figures.
2566 As the 'figwidth' argument is still ignored and the "natural width" of
2567 a figure in LaTeX is 100 % of the text width, setting the 'align'
2568 argument has currently no effect on the LaTeX output.
2571 * Let `meta` directive insert PDF-keywords into header?
2573 * Multiple author entries in docinfo (same thing as in html).
2576 * Consider supporting the "compact" option and class argument (from
2577 rst2html) as some lists look better compact and others need the space.
2579 * Better citation support
2580 (see `Footnote & Citation Gathering`_).
2582 * If ``use-latex-citations`` is used, a bibliography is inserted right at the
2583 end of the document.
2585 Put in place of the to-be-implemented "citations" directive
2586 (see `Footnote & Citation Gathering`_).
2592 The `LyX <http://www.lyx.org>`_ document processor has a comprehensive
2593 Unicode to LaTeX conversion feature with a file called ``unicodesymbols``
2594 that lists LaTeX counterparts for a wide range of Unicode characters.
2596 * Use this in the LaTeXTranslator?
2597 Think of copyright issues!
2599 * The "ucs" package has many translations in ...doc/latex/ucs/config/
2601 * The bibstuff_ tool ships a `latex_codec` Python module!
2603 .. _bibstuff: http://code.google.com/p/bibstuff/
2605 Allow choice between utf8 (standard) and utf8x (extended) encodings
2606 ```````````````````````````````````````````````````````````````````
2608 * Allow the user to select *utf8* or *utf8x* LaTeX encoding. (Docutil's
2609 output encoding becomes LaTeX's input encoding.)
2611 The `ucs` package provides extended support for UTF-8 encoding in LaTeX
2612 via the `inputenc`-option ``utf8x``. It is, however, a non-standard
2613 extension and no longer developed.
2616 a) Python has 4 names for the UTF-8 encoding (``utf_8, U8, UTF, utf8``)
2617 give a special meaning to one of the aliases,
2619 b) scan "stylesheets" and "latex-preamble" options and use ``utf8x``
2620 if it contains ``ucs``
2625 * Glyphs missing in the font are left out in the PDF without warning
2626 (e.g. ⇔ left-right double arrow in the functional test output).
2628 * Disable word-wrap (hyphenation) in literal text locally with
2629 ``providecommand{\nohyphenation}{\addfontfeatures{HyphenChar=None}}``?
2635 * ^^ LaTeX's special syntax for characters results in "strange" replacements
2636 (both with \href and \url).
2638 `file with ^^ <../strange^^name>`__:
2639 `<../strange^^name>`__
2641 * Unbalanced braces, { or }, will fail (both with \href and \url)::
2643 `file with { <../strange{name>`__
2644 `<../strange{name>`__
2646 Currently, a warning is written to the error output stream.
2648 For correct printing, we can
2650 * use the \href command with "normal" escaped name argument, or
2651 * define a url-command in the preamble ::
2653 \urldef{\fragileURLi}\nolinkurl{myself%node@gateway.net}
2655 but need to find a way to insert it as href argument.
2657 The following fails::
2659 \href{http://www.w3.org/XML/Schema^^dev}{\fragileURLi}
2661 Use %-replacement like http://nowhere/url_with%28parens%29 ?
2663 -> does not work for file paths (with pdflatex and xpdf).
2666 add-stylesheet option
2667 `````````````````````
2669 From http://article.gmane.org/gmane.text.docutils.devel/3429/
2671 The problem is that since we have a default value, we have to
2672 differentiate between adding another stylesheet and replacing the
2673 default. I suggest that the existing --stylesheet & --stylesheet-path
2674 options keep their semantics to replace the existing settings. We
2675 could introduce new --add-stylesheet & --add-stylesheet-path options,
2676 which accumulate; further --stylesheet/--stylesheet-path options would
2677 clear these lists. The stylesheet or stylesheet_path setting (only
2678 one may be set), plus the added_stylesheets and added_stylesheet_paths
2679 settings, describe the combined styles.
2681 For example, this run will have only one custom stylesheet:
2683 rstpep2html.py --stylesheet-path custom.css ...
2685 This run will use the default stylesheet, and the custom one:
2687 rstpep2html.py --add-stylesheet-path custom.css ...
2689 This run will use the default stylesheet, a custom local stylesheet,
2690 and an external stylesheet:
2692 rstpep2html.py --add-stylesheet-path custom.css \
2693 --add-stylesheet http://www.example.org/external.css ...
2695 This run will use only the second custom stylesheet:
2697 rstpep2html.py --add-stylesheet-path custom.css \
2698 --stylesheet-path second.css ...
2706 * What about if we don't know which Reader and/or Writer we are
2707 going to use? If the Reader/Writer is specified on the
2708 command-line? (Will this ever happen?)
2710 Perhaps have different types of front ends:
2712 a) _`Fully qualified`: Reader and Writer are hard-coded into the
2713 front end (e.g. ``pep2html [options]``, ``pysource2pdf
2716 b) _`Partially qualified`: Reader is hard-coded, and the Writer is
2717 specified a sub-command (e.g. ``pep2 html [options]``,
2718 ``pysource2 pdf [options]``). The Writer is known before option
2719 processing happens, allowing the OptionParser to be built
2720 dynamically. Alternatively, the Writer could be hard-coded and
2721 the Reader specified as a sub-command (e.g. ``htmlfrom pep
2724 c) _`Unqualified`: Reader and Writer are specified as subcommands
2725 (e.g. ``publish pep html [options]``, ``publish pysource pdf
2726 [options]``). A single front end would be sufficient, but
2727 probably only useful for testing purposes.
2729 d) _`Dynamic`: Reader and/or Writer are specified by options, with
2730 defaults if unspecified (e.g. ``publish --writer pdf
2731 [options]``). Is this possible? The option parser would have
2732 to be told about new options it needs to handle, on the fly.
2733 Component-specific options would have to be specified *after*
2734 the component-specifying option.
2736 Allow common options before subcommands, as in CVS? Or group all
2737 options together? In the case of the `fully qualified`_
2738 front ends, all the options will have to be grouped together
2739 anyway, so there's no advantage (we can't use it to avoid
2740 conflicts) to splitting common and component-specific options
2743 * Parameterize help text & defaults somehow? Perhaps a callback? Or
2744 initialize ``settings_spec`` in ``__init__`` or ``init_options``?
2746 * Disable common options that don't apply?
2747 (This should now be easier with ``frontend.filter_settings_spec``.)
2749 * Add ``--section-numbering`` command line option. The "sectnum"
2750 directive should override the ``--no-section-numbering`` command
2753 * Create a single dynamic_ or unqualified_ front end that can be
2760 indent-tabs-mode: nil
2761 sentence-end-double-space: t