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>`_.
77 The user interface is very difficult to use for most Windows users;
78 you can't really expect them to use the command line. We need some
79 kind of GUI that can launch rst2html.py, and save the HTML output to
80 a file, and launch a browser. What's important is that we get
81 settings to work with the GUI. So we need some way to dynamically
82 generate a list of settings for the GUI. The current settings_spec
83 for OptionParser doesn't seem to be usable for this for the
86 - It's biased toward the command line -- there are *two* options for
89 - You cannot have both a one-line description and a longer
90 description for tooltips/help-texts.
92 - It doesn't provide hints for the input type. You cannot easily
93 infer the type of a setting from its validator, because any
94 component can add new validators. In fact, it may be necessary to
95 have both a hint about the input type (e.g. string) and a
96 validator (valid ID), or it may be necessary to have a different
97 set of choices for the CLI (1, INFO, 2, ...) and for the GUI
100 - It's coupled to the OptionParser. We want to be able to change
101 the underlying system without breaking everything.
103 - It's a bunch of primitive structures. We want an extensible (thus
104 object-oriented) interface.
106 So we probably need to create a class for storing all the settings,
107 and auto-generate the OptionParser data from that.
109 I talked to Stephan Deibel about getting Docutils integrated into
110 Wing IDE. He said it's possible, and he'd be willing to help.
111 There's a scripting interface to Wing, which we'd use. We can
112 dynamically generate a list of preferences and not worry too much
113 about the rendering (from what I understood); Wing's whole GUI is
114 dynamic anyway. The interface could be made usable for other GUIs.
115 For example, we could try to get option support for DocFactory. //
118 * Allow different report levels for STDERR and system_messages inside
121 * Change the docutils-update script (in sandbox/infrastructure), to
122 support arbitrary branch snapshots.
124 * Add a generic "container" element, equivalent to "inline", to which
125 a "class" attribute can be attached. Will require a reST directive
128 * Move some general-interest sandboxes out of individuals'
129 directories, into subprojects?
131 * Add option for file (and URL) access restriction to make Docutils
132 usable in Wikis and similar applications.
134 2005-03-21: added ``file_insertion_enabled`` & ``raw_enabled``
135 settings. These partially solve the problem, allowing or disabling
136 **all** file accesses, but not limited access.
138 * Configuration file handling needs discussion:
140 - There should be some error checking on the contents of config
141 files. How much checking should be done? How loudly should
142 Docutils complain if it encounters an error/problem?
144 - Docutils doesn't complain when it doesn't find a configuration
145 file supplied with the ``--config`` option. Should it? (If yes,
148 * Internationalization:
150 - I18n needs refactoring, the language dictionaries are difficult to
151 maintain. Maybe have a look at gettext or similar tools.
153 - Language modules: in accented languages it may be useful to have
154 both accented and unaccented entries in the
155 ``bibliographic_fields`` mapping for versatility.
157 - Add a "--strict-language" option & setting: no English fallback
158 for language-dependent features.
160 - Add internationalization to _`footer boilerplate text` (resulting
161 from "--generator", "--source-link", and "--date" etc.), allowing
164 * Add validation? See http://pytrex.sourceforge.net, RELAX NG, pyRXP.
166 * In ``docutils.readers.get_reader_class`` (& ``parsers`` &
167 ``writers`` too), should we be importing "standalone" or
168 "docutils.readers.standalone"? (This would avoid importing
169 top-level modules if the module name is not in docutils/readers.
170 Potential nastiness.)
172 * Perhaps store a _`name-to-id mapping file`? This could be stored
173 permanently, read by subsequent processing runs, and updated with
174 new entries. ("Persistent ID mapping"?)
176 * Perhaps the ``Component.supports`` method should deal with
177 individual features ("meta" etc.) instead of formats ("html" etc.)?
179 * Add _`object numbering and object references` (tables & figures).
180 These would be the equivalent of DocBook's "formal" elements.
182 We may need _`persistent sequences`, such as chapter numbers. See
183 `OpenOffice.org XML`_ "fields". Should the sequences be automatic
184 or manual (user-specifyable)?
186 We need to name the objects:
188 - "name" option for the "figure" directive? ::
190 .. figure:: image.png
193 Same for the "table" directive::
195 .. table:: optional title here
205 This would also allow other options to be set, like border
206 styles. The same technique could be used for other objects.
208 A preliminary "table" directive has been implemented, supporting
209 table titles. Perhaps the name should derive from the title.
211 - The object could also be done this way::
215 .. figure:: image.png
217 This may be a more general solution, equally applicable to tables.
218 However, explicit naming using an option seems simpler to users.
220 - Perhaps the figure name could be incorporated into the figure
221 definition, as an optional inline target part of the directive
224 .. figure:: _`figure name` image.png
226 Maybe with a delimiter::
228 .. figure:: _`figure name`: image.png
230 Or some other, simpler syntax.
232 We'll also need syntax for object references. See `OpenOffice.org
233 XML`_ "reference fields":
235 - Parameterized substitutions? For example::
237 See |figure (figure name)| on |page (figure name)|.
239 .. |figure (name)| figure-ref:: (name)
240 .. |page (name)| page-ref:: (name)
242 The result would be::
244 See figure 3.11 on page 157.
246 But this would require substitution directives to be processed at
247 reference-time, not at definition-time as they are now. Or,
248 perhaps the directives could just leave ``pending`` elements
249 behind, and the transforms do the work? How to pass the data
250 through? Too complicated.
252 - An interpreted text approach is simpler and better::
254 See :figure:`figure name` on :page:`figure name`.
256 The "figure" and "page" roles could generate appropriate
257 boilerplate text. The position of the role (prefix or suffix)
258 could also be utilized.
260 See `Interpreted Text`_ below.
262 - We could leave the boilerplate text up to the document::
264 See Figure :fig:`figure name` on page :pg:`figure name`.
266 - Reference boilerplate could be specified in the document
267 (defaulting to nothing)::
270 :prefix-ref: "Figure "
271 :prefix-caption: "Fig. "
274 .. _OpenOffice.org XML: http://xml.openoffice.org/
276 * Think about _`large documents` made up of multiple subdocument
277 files. Issues: continuity (`persistent sequences`_ above),
278 cross-references (`name-to-id mapping file`_ above and `targets in
279 other documents`_ below), splitting (`document splitting`_ below).
281 When writing a book, the author probably wants to split it up into
282 files, perhaps one per chapter (but perhaps even more detailed).
283 However, we'd like to be able to have references from one chapter to
284 another, and have continuous numbering (pages and chapters, as
285 applicable). Of course, none of this is implemented yet. There has
286 been some thought put into some aspects; see `the "include"
287 directive`__ and the `Reference Merging`_ transform below.
289 When I was working with SGML in Japan, we had a system where there
290 was a top-level coordinating file, book.sgml, which contained the
291 top-level structure of a book: the <book> element, containing the
292 book <title> and empty component elements (<preface>, <chapter>,
293 <appendix>, etc.), each with filename attributes pointing to the
294 actual source for the component. Something like this::
297 <title>Title of the Book</title>
298 <preface inrefid="pr01"></preface>
299 <chapter inrefid="ch01"></chapter>
300 <chapter inrefid="ch02"></chapter>
301 <chapter inrefid="ch03"></chapter>
302 <appendix inrefid="ap01"></appendix>
305 (The "inrefid" attribute stood for "insertion reference ID".)
307 The processing system would process each component separately, but
308 it would recognize and use the book file to coordinate chapter and
309 page numbering, and keep a persistent ID to (title, page number)
310 mapping database for cross-references. Docutils could use a similar
311 system for large-scale, multipart documents.
313 __ ../ref/rst/directives.html#including-an-external-document-fragment
329 As I said earlier in chapter :chapter:`Objects.txt`, the
330 reference count gets increased every time a binding is made.
334 As I said earlier in chapter 2, the
335 reference count gets increased every time a binding is made.
337 The ToC in this form doesn't even need to be references to actual
338 reST documents; I'm simply doing it that way for a minimum of
339 future-proofing, in case I do want to add the ability to pick up
340 references within external chapters.
342 Perhaps, instead of ToC (which would overload the "contents"
343 directive concept already in use), we could use "manifest". A
344 "manifest" directive might associate local reference names with
348 intro: Introduction.txt
353 Then the sample becomes::
355 .. include:: manifest.txt
357 As I said earlier in chapter :chapter:`objects`, the
358 reference count gets increased every time a binding is made.
360 * Add support for _`multiple output files` and _`generic data
363 It should be possible for a component to **emit or reference** data
364 to be either **included or referenced** in the output document.
365 Examples of such data are stylesheets or images.
367 For this, we need a "data" object which stores the data either
368 inline or by referring to a file. The Docutils framework is
369 responsible for either:
371 * storing the data in the appropriate location (e.g. in the
372 directory of the output file, or in a user-specified directory)
373 and providing the paths of the stored files to the writer, *or*
375 * providing the data itself to the writer so that it can be embedded
376 in the output document.
378 This approach decouples data handling from the data source (which
379 can either be embedded or referenced) and the destination (which can
380 either be embedded or referenced as well).
382 See <http://article.gmane.org/gmane.text.docutils.devel/3631>.
384 * Add testing for Docutils' front end tools?
386 * Publisher: "Ordinary setup" shouldn't requre specific ordering; at
387 the very least, there ought to be error checking higher up in the
390 ``Publisher.get_settings`` requires that all components be set up
391 before it's called. Perhaps the I/O *objects* shouldn't be set, but
392 I/O *classes*. Then options are set up (``.set_options``), and
393 ``Publisher.set_io`` (or equivalent code) is called with source &
394 destination paths, creating the I/O objects.
396 Perhaps I/O objects shouldn't be instantiated until required. For
397 split output, the Writer may be called multiple times, once for each
398 doctree, and each doctree should have a separate Output object (with
399 a different path). Is the "Builder" pattern applicable here?
401 * Perhaps I/O objects should become full-fledged components (i.e.
402 subclasses of ``docutils.Component``, as are Readers, Parsers, and
403 Writers now), and thus have associated option/setting specs and
406 * Multiple file I/O suggestion from Michael Hudson: use a file-like
407 object or something you can iterate over to get file-like objects.
409 * Add an "--input-language" option & setting? Specify a different
410 language module for input (bibliographic fields, directives) than
411 for output. The "--language" option would set both input & output
414 * Auto-generate reference tables for language-dependent features?
415 Could be generated from the source modules. A special command-line
416 option could be added to Docutils front ends to do this. (Idea from
419 * Enable feedback of some kind from internal decisions, such as
420 reporting the successful input encoding. Modify runtime settings?
421 System message? Simple stderr output?
423 * Rationalize Writer settings (HTML/LaTeX/PEP) -- share settings.
425 * Merge docs/user/latex.txt info into tools.txt and config.txt.
427 * Add an "--include file" command-line option (config setting too?),
428 equivalent to ".. include:: file" as the first line of the doc text?
429 Especially useful for character entity sets, text transform specs,
432 * Parameterize the Reporter object or class? See the `2004-02-18
433 "rest checking and source path"`_ thread.
435 .. _2004-02-18 "rest checking and source path":
436 http://thread.gmane.org/gmane.text.docutils.user/1112
438 * Add a "disable_transforms" setting? And a dummy Writer subclass
439 that does nothing when its .write() method is called? Would allow
440 for easy syntax checking. See the `2004-02-18 "rest checking and
441 source path"`_ thread.
443 * Add a generic meta-stylesheet mechanism? An external file could
444 associate style names ("class" attributes) with specific elements.
445 Could be generalized to arbitrary output attributes; useful for HTML
446 & XMLs. Aahz implemented something like this in
447 sandbox/aahz/Effective/EffMap.py.
449 * .. _classes for table cells:
451 William Dode suggested that table cells be assigned "class"
452 attributes by columns, so that stylesheets can affect text
453 alignment. Unfortunately, there doesn't seem to be a way (in HTML
454 at least) to leverage the "colspec" elements (HTML "col" tags) by
455 adding classes to them. The resulting HTML is very verbose::
457 <td class="col1">111</td>
458 <td class="col2">222</td>
461 At the very least, it should be an option. People who don't use it
462 shouldn't be penalized by increases in their HTML file sizes.
464 Table rows could also be assigned classes (like odd/even). That
465 would be easier to implement.
467 How should it be implemented?
469 * There could be writer options (column classes & row classes) with
472 * The table directive could grow some options. Something like
473 ":cell-classes: col1 col2 col3" (either must match the number of
474 columns, or repeat to fill?) and ":row-classes: odd even" (repeat
475 to fill; body rows only, or header rows too?).
477 Probably per-table directive options are best. The "class" values
478 could be used by any writer, and applying such classes to all tables
479 in a document with writer options is too broad.
481 * Add file-specific settings support to config files, like::
486 Is this even possible? Should the criterion be the name of the
487 input file or the output file?
489 * The "validator" support added to OptionParser is very similar to
490 "traits_" in SciPy_. Perhaps something could be done with them?
491 (Had I known about traits when I was implementing docutils.frontend,
492 I may have used them instead of rolling my own.)
494 .. _traits: http://code.enthought.com/traits/
495 .. _SciPy: http://www.scipy.org/
497 * tools/buildhtml.py: Extend the --prune option ("prune" config
498 setting) to accept file names (generic path) in addition to
499 directories (e.g. --prune=docs/user/rst/cheatsheet.txt, which should
500 *not* be converted to HTML).
502 * Add support for _`plugins`.
504 * _`Config directories`: Currently, ~/.docutils, ./docutils.conf/, &
505 /etc/docutils.conf are read as configuration files. Proposal: allow
506 ~/.docutils to be a a configuration *directory*, along with
507 /etc/docutils/ and ./docutils.conf/. Within these directories,
508 check for config.txt files. We can also have subdirectories here,
509 for plugins, S5 themes, components (readers/writers/parsers) etc.
511 Docutils will continue to support configuration files for backwards
514 * Add support for document decorations other than headers & footers?
515 For example, top/bottom/side navigation bars for web pages. Generic
518 Seems like a bad idea as long as it isn't independent from the ouput
519 format (for example, navigation bars are only useful for web pages).
521 * docutils_update: Check for a ``Makefile`` in a directory, and run
522 ``make`` if found? This would allow for variant processing on
523 specific source files, such as running rst2s5.py instead of
526 * Add a "disable table of contents" setting? The S5 writer could set
527 it as a default. Rationale:
529 The ``contents`` (table of contents) directive must not be used
530 [in S5/HTML documents]. It changes the CSS class of headings
531 and they won't show up correctly in the screen presentation.
533 -- `Easy Slide Shows With reStructuredText & S5
534 <../user/slide-shows.html>`_
543 * Add a FAQ entry about using Docutils (with reStructuredText) on a
544 server and that it's terribly slow. See the first paragraphs in
545 <http://article.gmane.org/gmane.text.docutils.user/1584>.
547 * Add document about what Docutils has previously been used for
548 (web/use-cases.txt?).
554 * Complete `Docutils Runtime Settings <../api/runtime-settings.html>`_.
556 * Improve the internal module documentation (docstrings in the code).
557 Specific deficiencies listed below.
559 - docutils.parsers.rst.states.State.build_table: data structure
560 required (including StringList).
562 - docutils.parsers.rst.states: more complete documentation of parser
565 * docs/ref/doctree.txt: DTD element structural relationships,
566 semantics, and attributes. In progress; element descriptions to be
569 * Document the ``pending`` elements, how they're generated and what
572 * Document the transforms (perhaps in docstrings?): how they're used,
573 what they do, dependencies & order considerations.
575 * Document the HTML classes used by html4css1.py.
577 * Write an overview of the Docutils architecture, as an introduction
578 for developers. What connects to what, why, and how. Either update
579 PEP 258 (see PEPs_ below) or as a separate doc.
581 * Give information about unit tests. Maybe as a howto?
583 * Document the docutils.nodes APIs.
585 * Complete the docs/api/publisher.txt docs.
591 * Creating Docutils Writers
593 * Creating Docutils Readers
595 * Creating Docutils Transforms
597 * Creating Docutils Parsers
599 * Using Docutils as a Library
605 * Complete PEP 258 Docutils Design Specification.
607 - Fill in the blanks in API details.
609 - Specify the nodes.py internal data structure implementation?
611 [Tibs:] Eventually we need to have direct documentation in
612 there on how it all hangs together - the DTD is not enough
613 (indeed, is it still meant to be correct? [Yes, it is.
616 * Rework PEP 257, separating style from spec from tools, wrt Docutils?
617 See Doc-SIG from 2001-06-19/20.
625 * Analyze Tony Ibbs' PySource code.
627 * Analyze Doug Hellmann's HappyDoc project.
629 * Investigate how POD handles literate programming.
631 * Take the best ideas and integrate them into Docutils.
635 * Ask Python-dev for opinions (GvR for a pronouncement) on special
636 variables (__author__, __version__, etc.): convenience vs. namespace
637 pollution. Ask opinions on whether or not Docutils should recognize
640 * If we can detect that a comment block begins with ``##``, a la
641 JavaDoc, it might be useful to indicate interspersed section headers
642 & explanatory text in a module. For example::
644 """Module docstring."""
657 class MyException(Exception): pass
661 * Should standalone strings also become (module/class) docstrings?
662 Under what conditions? We want to prevent arbitrary strings from
663 becomming docstrings of prior attribute assignments etc. Assume
664 that there must be no blank lines between attributes and attribute
665 docstrings? (Use lineno of NEWLINE token.)
667 Triple-quotes are sometimes used for multi-line comments (such as
668 commenting out blocks of code). How to reconcile?
670 * HappyDoc's idea of using comment blocks when there's no docstring
671 may be useful to get around the conflict between `additional
672 docstrings`_ and ``from __future__ import`` for module docstrings.
673 A module could begin like this::
675 #!/usr/bin/env python
677 # :Copyright: whatever
679 """This is the public module docstring (``__doc__``)."""
681 # More docs, in comments.
682 # All comments at the beginning of a module could be
683 # accumulated as docstrings.
684 # We can't have another docstring here, because of the
685 # ``__future__`` statement.
687 from __future__ import division
689 Using the JavaDoc convention of a doc-comment block beginning with
690 ``##`` is useful though. It allows doc-comments and implementation
693 .. _additional docstrings:
694 ../peps/pep-0258.html#additional-docstrings
696 * HappyDoc uses an initial comment block to set "parser configuration
697 values". Do the same thing for Docutils, to set runtime settings on
698 a per-module basis? I.e.::
700 # Docutils:setting=value
702 Could be used to turn on/off function parameter comment recognition
703 & other marginal features. Could be used as a general mechanism to
704 augment config files and command-line options (but which takes
707 * Multi-file output should be divisible at arbitrary level.
709 * Support all forms of ``import`` statements:
711 - ``import module``: listed as "module"
712 - ``import module as alias``: "alias (module)"
713 - ``from module import identifier``: "identifier (from module)"
714 - ``from module import identifier as alias``: "alias (identifier
716 - ``from module import *``: "all identifiers (``*``) from module"
718 * Have links to colorized Python source files from API docs? And
719 vice-versa: backlinks from the colorized source files to the API
722 * In summaries, use the first *sentence* of a docstring if the first
723 line is not followed by a blank line.
726 reStructuredText Parser
727 =======================
729 Also see the `... Or Not To Do?`__ list.
731 __ rst/alternatives.html#or-not-to-do
733 * Another list problem::
739 This ends up as a definition list.
741 * This case is probably meant to be a nested list, but it ends up as a
742 list inside a block-quote without an error message::
748 It should probably just be an error.
750 The problem with this is that you don't notice easily in HTML that
751 it's not a nested list but a block-quote -- there's not much of a
754 * Treat enumerated lists that are not arabic and consist of only one
755 item in a single line as ordinary paragraphs. See
756 <http://article.gmane.org/gmane.text.docutils.user/2635>.
758 * The citation syntax could use some enhancements. See
759 <http://thread.gmane.org/gmane.text.docutils.user/2499> and
760 <http://thread.gmane.org/gmane.text.docutils.user/2443>.
762 * The current list-recognition logic has too many false positives, as
769 Here ``V.`` is recognized as an enumerator, which leads to
770 confusion. We need to find a solution that resolves such problems
771 without complicating the spec to much.
773 See <http://thread.gmane.org/gmane.text.docutils.user/2524>.
775 * Add indirect links via citation references & footnote references.
778 `Goodger (2005)`_ is helpful.
780 .. _Goodger (2005): [goodger2005]_
781 .. [goodger2005] citation text
783 See <http://thread.gmane.org/gmane.text.docutils.user/2499>.
785 * Change the specification so that more punctuation is allowed
786 before/after inline markup start/end string
787 (http://article.gmane.org/gmane.text.docutils.cvs/3824).
789 * Complain about bad URI characters
790 (http://article.gmane.org/gmane.text.docutils.user/2046) and
791 disallow internal whitespace
792 (http://article.gmane.org/gmane.text.docutils.user/2214).
794 * Create ``info``-level system messages for unnecessarily
795 backslash-escaped characters (as in ``"\something"``, rendered as
796 "something") to allow checking for errors which silently slipped
799 * Add (functional) tests for untested roles.
801 * Add test for ":figwidth: image" option of "figure" directive. (Test
802 code needs to check if PIL is available on the system.)
804 * Add support for CJK double-width whitespace (indentation) &
805 punctuation characters (markup; e.g. double-width "*", "-", "+")?
807 * Add motivation sections for constructs in spec.
809 * Support generic hyperlink references to _`targets in other
810 documents`? Not in an HTML-centric way, though (it's trivial to say
811 ``http://www.example.com/doc#name``, and useless in non-HTML
812 contexts). XLink/XPointer? ``.. baseref::``? See Doc-SIG
815 * .. _adaptable file extensions:
817 In target URLs, it would be useful to not explicitly specify the
818 file extension. If we're generating HTML, then ".html" is
819 appropriate; if PDF, then ".pdf"; etc. How about using ".*" to
820 indicate "choose the most appropriate filename extension"? For
823 .. _Another Document: another.*
825 What is to be done for output formats that don't *have* hyperlinks?
826 For example, LaTeX targeted at print. Hyperlinks may be "called
827 out", as footnotes with explicit URLs. (Don't convert the links.)
829 But then there's also LaTeX targeted at PDFs, which *can* have
830 links. Perhaps a runtime setting for "*" could explicitly provide
831 the extension, defaulting to the output file's extension.
833 Should the system check for existing files? No, not practical.
835 Handle documents only, or objects (images, etc.) also?
837 If this handles images also, how to differentiate between document
838 and image links? Element context (within "image")? Which image
839 extension to use for which document format? Again, a runtime
840 setting would suffice.
842 This may not be just a parser issue; it may need framework support.
844 Mailing list threads: `Images in both HTML and LaTeX`__ (especially
845 `this summary of Felix's objections`__), `more-universal links?`__,
846 `Output-format-sensitive link targets?`__
848 __ http://thread.gmane.org/gmane.text.docutils.user/1239
849 __ http://article.gmane.org/gmane.text.docutils.user/1278
850 __ http://thread.gmane.org/gmane.text.docutils.user/1915
851 __ http://thread.gmane.org/gmane.text.docutils.user/2438
853 Idea from Jim Fulton: an external lookup table of targets:
855 I would like to specify the extension (e.g. .txt) [in the
856 source, rather than ``filename.*``], but tell the converter to
857 change references to the files anticipating that the files will
862 .. _Another Document: another.txt
864 rst2html.py --convert-links "another.txt bar.txt" foo.txt
866 That is, name the files for which extensions should be converted.
868 Note that I want to refer to original files in the original text
869 (another.txt rather than another.txt) because I want the
870 unconverted text to stand on its own.
872 Note that in most cases, people will be able to use globs::
874 rst2html.py --convert-link-extensions-for "`echo *.txt`" foo.txt
876 It might be nice to be able to use multiple arguments, as in::
878 rst2html.py --convert-link-extensions-for *.txt -- foo.txt
882 > What is to be done for output formats
883 > that don't have hyperlinks?
885 Don't convert the links.
889 > Handle documents only, or objects
890 > (images, etc.) also?
892 No, documents only, but there really is no need for gueswork.
893 Just get the file names as command-line arguments. EIBTI
894 [explicit is better than implicit].
896 For images, we probably need separate solution (which is being
897 worked on), whereas for documents, the issue is basically
898 interlinking between reStructuredText documents. IMO, this cries
899 for support for multiple input and output files, i.e. support for
900 documents which comprise multiple files. Adding adaptable file
901 extensions seems like a kludge. // FW
903 * Implement the header row separator modification to table.el. (Wrote
904 to Takaaki Ota & the table.el mailing list on 2001-08-12, suggesting
905 support for "=====" header rows. On 2001-08-17 he replied, saying
906 he'd put it on his to-do list, but "don't hold your breath".)
908 * Fix the parser's indentation handling to conform with the stricter
909 definition in the spec. (Explicit markup blocks should be strict or
912 .. XXX What does this mean? Can you elaborate, David?
914 * Make the parser modular. Allow syntax constructs to be added or
915 disabled at run-time. Subclassing is probably not enough because it
916 makes it difficult to apply multiple extensions.
918 * Generalize the "doctest block" construct (which is overly
919 Python-centric) to other interactive sessions? "Doctest block"
920 could be renamed to "I/O block" or "interactive block", and each of
921 these could also be recognized as such by the parser:
926 A block beginning with a "$ " prompt is interpreted as a shell
927 session interactive block. As with Doctest blocks, the
928 interactive block ends with the first blank line, and wouldn't
931 - Root shell sessions::
934 A block beginning with a "# " prompt is interpreted as a root
935 shell session (the user is or has to be logged in as root)
936 interactive block. Again, the block ends with a blank line.
938 Other standard (and unambiguous) interactive session prompts could
939 easily be added (such as "> " for WinDOS).
941 Tony Ibbs spoke out against this idea (2002-06-14 Doc-SIG thread
942 "docutils feedback").
944 * The "doctest" element should go away. The construct could simply be
945 a front-end to generic literal blocks. We could immediately (in
946 0.4, or 0.5) remove the doctest node from the doctree, but leave the
947 syntax in reST. The reST parser could represent doctest blocks as
948 literal blocks with a class attribute. The syntax could be left in
949 reST for a set period of time.
951 * Add support for pragma (syntax-altering) directives.
953 Some pragma directives could be local-scope unless explicitly
954 specified as global/pragma using ":global:" options.
956 * Support whitespace in angle-bracketed standalone URLs according to
957 Appendix E ("Recommendations for Delimiting URI in Context") of `RFC
960 .. _RFC 2396: http://www.rfc-editor.org/rfc/rfc2396.txt
962 * Use the vertical spacing of the source text to determine the
963 corresponding vertical spacing of the output?
965 * [From Mark Nodine] For cells in simple tables that comprise a
966 single line, the justification can be inferred according to the
969 1. If the text begins at the leftmost column of the cell,
970 then left justification, ELSE
971 2. If the text begins at the rightmost column of the cell,
972 then right justification, ELSE
973 3. Center justification.
975 The onus is on the author to make the text unambiguous by adding
976 blank columns as necessary. There should be a parser setting to
977 turn off justification-recognition (normally on would be fine).
979 Decimal justification?
981 All this shouldn't be done automatically. Only when it's requested
982 by the user, e.g. with something like this::
989 Otherwise it will break existing documents.
991 * Generate a warning or info message for paragraphs which should have
992 been lists, like this one::
997 * Generalize the "target-notes" directive into a command-line option
998 somehow? See docutils-develop 2003-02-13.
1000 * Allow a "::"-only paragraph (first line, actually) to introduce a
1001 _`literal block without a blank line`? (Idea from Paul Moore.) ::
1004 This is a literal block
1006 Is indentation enough to make the separation between a paragraph
1007 which contains just a ``::`` and the literal text unambiguous?
1008 (There's one problem with this concession: If one wants a definition
1009 list item which defines the term "::", we'd have to escape it.) It
1010 would only be reasonable to apply it to "::"-only paragraphs though.
1011 I think the blank line is visually necessary if there's text before
1014 The text in this paragraph needs separation
1015 from the literal block following::
1016 This doesn't look right.
1018 * Add new syntax for _`nested inline markup`? Or extend the parser to
1019 parse nested inline markup somehow? See the `collected notes
1020 <rst/alternatives.html#nested-inline-markup>`__.
1022 * Drop the backticks from embedded URIs with omitted reference text?
1023 Should the angle brackets be kept in the output or not? ::
1027 Probably not worth the trouble.
1029 * Add _`math markup`. We should try for a general solution, that's
1030 applicable to any output format. Using a standard, such as MathML_,
1031 would be best. TeX (or itex_) would be acceptable as a *front-end*
1032 to MathML. See `the culmination of a relevant discussion
1033 <http://article.gmane.org/gmane.text.docutils.user/118>`__.
1035 Both a directive and an interpreted text role will be necessary (for
1036 each markup). Directive example::
1039 \alpha_t(i) = P(O_1, O_2, \dots O_t, q_t = S_i \lambda)
1041 The same thing inline::
1043 The equation in question is :itex:`\alpha_t(i) = P(O_1, O_2,
1044 \dots O_t, q_t = S_i \lambda)`.
1046 .. _MathML: http://www.w3.org/TR/MathML2/
1047 .. _itex: http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html
1049 * How about a syntax for alternative hyperlink behavior, such as "open
1050 in a new window" (as in HTML's ``<a target="_blank">``)? Double
1051 angle brackets might work for inline targets::
1053 The `reference docs <<url>>`__ may be handy.
1055 But what about explicit targets?
1057 The MoinMoin wiki uses a caret ("^") at the beginning of the URL
1058 ("^" is not a legal URI character). That could work for both inline
1059 and explicit targets::
1061 The `reference docs <^url>`__ may be handy.
1065 This may be too specific to HTML. It hasn't been requested very
1068 * Add an option to add URI schemes at runtime.
1070 * _`Segmented lists`::
1072 : segment : segment : segment
1073 : segment : segment : very long
1075 : segment : segment : segment
1077 The initial colon (":") can be thought of as a type of bullet
1079 We could even have segment titles::
1081 :: title : title : title
1082 : segment : segment : segment
1083 : segment : segment : segment
1085 This would correspond well to DocBook's SegmentedList. Output could
1086 be tabular or "name: value" pairs, as described in DocBook's docs.
1088 * Allow backslash-escaped colons in field names::
1090 :Case Study\: Event Handling: This chapter will be dropped.
1092 * _`footnote spaces`:
1094 When supplying the command line options
1095 --footnote-references=brackets and --use-latex-footnotes with the
1096 LaTeX writer (which might very well happen when using configuration
1097 files), the spaces in front of footnote references aren't trimmed.
1099 * Enable grid _`tables inside XML comments`, where "--" ends comments.
1100 I see three implementation possibilities:
1102 1. Make the table syntax characters into "table" directive options.
1103 This is the most flexible but most difficult, and we probably
1104 don't need that much flexibility.
1106 2. Substitute "~" for "-" with a specialized directive option
1109 3. Make the standard table syntax recognize "~" as well as "-", even
1110 without a directive option. Individual tables would have to be
1111 internally consistent.
1113 Directive options are preferable to configuration settings, because
1114 tables are document-specific. A pragma directive would be another
1115 approach, to set the syntax once for a whole document.
1117 In the meantime, the list-table_ directive is a good replacement for
1118 grid tables inside XML comments.
1120 .. _list-table: ../ref/rst/directives.html#list-table
1122 * Generalize docinfo contents (bibliographic fields): remove specific
1123 fields, and have only a single generic "field"?
1129 Directives below are often referred to as "module.directive", the
1130 directive function. The "module." is not part of the directive name
1131 when used in a document.
1133 * Make the _`directive interface` object-oriented
1134 (http://article.gmane.org/gmane.text.docutils.user/1871).
1136 * Allow for field lists in list tables. See
1137 <http://thread.gmane.org/gmane.text.docutils.devel/3392>.
1141 Unify table implementations and unify options of table directives
1142 (http://article.gmane.org/gmane.text.docutils.user/1857).
1144 * Allow directives to be added at run-time?
1146 * Use the language module for directive option names?
1148 * Add "substitution_only" and "substitution_ok" function attributes,
1149 and automate context checking?
1151 * Change directive functions to directive classes? Superclass'
1152 ``__init__()`` could handle all the bookkeeping.
1154 * Implement options or features on existing directives:
1156 - Add a "name" option to directives, to set an author-supplied
1159 - All directives that produce titled elements should grow implicit
1160 reference names based on the titles.
1162 - Allow the _`:trim:` option for all directives when they occur in a
1163 substitution definition, not only the unicode_ directive.
1165 .. _unicode: ../ref/rst/directives.html#unicode-character-codes
1167 - Add the "class" option to the unicode directive. For example, you
1168 might want to get characters or strings with borders around them.
1170 - _`images.figure`: "title" and "number", to indicate a formal
1173 - _`parts.sectnum`: "local"?, "refnum"
1175 A "local" option could enable numbering for sections from a
1176 certain point down, and sections in the rest of the document are
1177 not numbered. For example, a reference section of a manual might
1178 be numbered, but not the rest. OTOH, an all-or-nothing approach
1179 would probably be enough.
1181 The "sectnum" directive should be usable multiple times in a
1182 single document. For example, in a long document with "chapter"
1183 and "appendix" sections, there could be a second "sectnum" before
1184 the first appendix, changing the sequence used (from 1,2,3... to
1185 A,B,C...). This is where the "local" concept comes in. This part
1186 of the implementation can be left for later.
1188 A "refnum" option (better name?) would insert reference names
1189 (targets) consisting of the reference number. Then a URL could be
1190 of the form ``http://host/document.html#2.5`` (or "2-5"?). Allow
1191 internal references by number? Allow name-based *and*
1192 number-based ids at the same time, or only one or the other (which
1193 would the table of contents use)? Usage issue: altering the
1194 section structure of a document could render hyperlinks invalid.
1196 - _`parts.contents`: Add a "suppress" or "prune" option? It would
1197 suppress contents display for sections in a branch from that point
1198 down. Or a new directive, like "prune-contents"?
1200 Add an option to include topics in the TOC? Another for sidebars?
1201 The "topic" directive could have a "contents" option, or the
1202 "contents" directive" could have an "include-topics" option. See
1203 docutils-develop 2003-01-29.
1205 - _`parts.header` & _`parts.footer`: Support multiple, named headers
1206 & footers? For example, separate headers & footers for odd, even,
1207 and the first page of a document.
1209 This may be too specific to output formats which have a notion of
1214 - Add a ``:parent:`` option for setting the parent's class
1215 (http://article.gmane.org/gmane.text.docutils.devel/3165).
1219 - Option to select a range of lines?
1221 - Option to label lines?
1223 - How about an environment variable, say RSTINCLUDEPATH or
1224 RSTPATH, for standard includes (as in ``.. include:: <name>``)?
1225 This could be combined with a setting/option to allow
1226 user-defined include directories.
1228 - Add support for inclusion by URL? ::
1231 :url: http://www.example.org/inclusion.txt
1233 - _`misc.raw`: add a "destination" option to the "raw" directive? ::
1240 It needs thought & discussion though, to come up with a consistent
1241 set of destination labels and consistent behavior.
1243 And placing HTML code inside the <head> element of an HTML
1244 document is rather the job of a templating system.
1246 - _`body.sidebar`: Allow internal section structure? Adornment
1247 styles would be independent of the main document.
1249 That is really complicated, however, and the document model
1250 greatly benefits from its simplicity.
1252 * Implement directives. Each of the list items below begins with an
1253 identifier of the form, "module_name.directive_function_name". The
1254 directive name itself could be the same as the
1255 directive_function_name, or it could differ.
1259 It has the disadvantage that it's only easily implementable for
1260 HTML, so it's specific to one output format.
1262 (For non-HTML writers, the imagemap would have to be replaced with
1265 - _`parts.endnotes` (or "footnotes"): See `Footnote & Citation Gathering`_.
1267 - _`parts.citations`: See `Footnote & Citation Gathering`_.
1269 - _`misc.language`: Specify (= change) the language of a document at
1272 - _`misc.settings`: Set any(?) Docutils runtime setting from within
1273 a document? Needs much thought and discussion.
1275 - _`misc.gather`: Gather (move, or copy) all instances of a specific
1276 element. A generalization of the "endnotes" & "citations" ideas.
1278 - Add a custom "directive" directive, equivalent to "role"? For
1283 .. class:: incremental
1287 "``.. incr::``" above is equivalent to "``.. class:: incremental``".
1291 .. directive:: printed-links
1297 :class: print-inline
1299 This acts like macros. The directive contents will have to be
1300 evaluated when referenced, not when defined.
1302 * Needs a better name? "Macro", "substitution"?
1303 * What to do with directive arguments & options when the
1304 macro/directive is referenced?
1306 - Make the meaning of block quotes overridable? Only a 1-shot
1307 though; doesn't solve the general problem.
1309 - .. _conditional directives:
1311 Docutils already has the ability to say "use this content for
1312 Writer X" (via the "raw" directive), but it doesn't have the
1313 ability to say "use this content for any Writer other than X". It
1314 wouldn't be difficult to add this ability though.
1316 My first idea would be to add a set of conditional directives.
1317 Let's call them "writer-is" and "writer-is-not" for discussion
1318 purposes (don't worry about implemention details). We might
1321 .. writer-is:: text-only
1337 .. figure:: protocol_stack.eps
1339 .. writer-is-not:: text-only pdf
1341 .. figure:: protocol_stack.png
1343 This could be an interface to the Filter transform
1344 (docutils.transforms.components.Filter).
1346 The ideas in `adaptable file extensions`_ above may also be
1349 SVG's "switch" statement may provide inspiration.
1351 Here's an example of a directive that could produce multiple
1352 outputs (*both* raw troff pass-through *and* a GIF, for example)
1353 and allow the Writer to select. ::
1360 %sum from i=o to inf c sup i~=~lim from {m -> inf}
1361 sum from i=0 to m sup i%
1366 - _`body.example`: Examples; suggested by Simon Hefti. Semantics as
1367 per Docbook's "example"; admonition-style, numbered, reference,
1368 with a caption/title.
1370 - _`body.index`: Index targets.
1372 See `Index Entries & Indexes
1373 <./rst/alternatives.html#index-entries-indexes>`__.
1375 - _`body.literal`: Literal block, possibly "formal" (see `object
1376 numbering and object references`_ above). Possible options:
1378 - "highlight" a range of lines
1380 - include only a specified range of lines
1382 - "number" or "line-numbers"
1384 - "styled" could indicate that the directive should check for
1385 style comments at the end of lines to indicate styling or
1388 Specific derivatives (i.e., a "python-interactive" directive)
1389 could interpret style based on cues, like the ">>> " prompt and
1390 "input()"/"raw_input()" calls.
1392 See docutils-users 2003-03-03.
1394 - _`body.listing`: Code listing with title (to be numbered
1395 eventually), equivalent of "figure" and "table" directives.
1397 - _`colorize.python`: Colorize Python code. Fine for HTML output,
1398 but what about other formats? Revert to a literal block? Do we
1399 need some kind of "alternate" mechanism? Perhaps use a "pending"
1400 transform, which could switch its output based on the "format" in
1401 use. Use a factory function "transformFF()" which returns either
1402 "HTMLTransform()" instance or "GenericTransform" instance?
1404 If we take a Python-to-HTML pretty-printer and make it output a
1405 Docutils internal doctree (as per nodes.py) instead of HTML, then
1406 each output format's stylesheet (or equivalent) mechanism could
1407 take care of the rest. The pretty-printer code could turn this
1410 <literal_block xml:space="preserve">
1411 print 'This is Python code.'
1416 into something like this ("</>" is end-tag shorthand)::
1418 <literal_block xml:space="preserve" class="python">
1419 <keyword>print</> <string>'This is Python code.'</>
1420 <keyword>for</> <identifier>i</> <keyword
1421 >in</> <expression>range(10)</>:
1422 <keyword>print</> <expression>i</>
1425 But I'm leaning toward adding a single new general-purpose
1426 element, "phrase", equivalent to HTML's <span>. Here's the
1427 example rewritten using the generic "phrase"::
1429 <literal_block xml:space="preserve" class="python">
1430 <phrase class="keyword">print</> <phrase
1431 class="string">'This is Python code.'</>
1432 <phrase class="keyword">for</> <phrase
1433 class="identifier">i</> <phrase class="keyword">in</> <phrase
1434 class="expression">range(10)</>:
1435 <phrase class="keyword">print</> <phrase
1436 class="expression">i</>
1439 It's more verbose but more easily extensible and more appropriate
1440 for the case at hand. It allows us to edit style sheets to add
1441 support for new formats, not the Docutils code itself.
1443 Perhaps a single directive with a format parameter would be
1446 .. colorize:: python
1448 print 'This is Python code.'
1452 But directives can have synonyms for convenience. "format::
1453 python" was suggested, but "format" seems too generic.
1455 - _`pysource.usage`: Extract a usage message from the program,
1456 either by running it at the command line with a ``--help`` option
1457 or through an exposed API. [Suggestion for Optik.]
1463 Interpreted text is entirely a reStructuredText markup construct, a
1464 way to get around built-in limitations of the medium. Some roles are
1465 intended to introduce new doctree elements, such as "title-reference".
1466 Others are merely convenience features, like "RFC".
1468 All supported interpreted text roles must already be known to the
1469 Parser when they are encountered in a document. Whether pre-defined
1470 in core/client code, or in the document, doesn't matter; the roles
1471 just need to have already been declared. Adding a new role may
1472 involve adding a new element to the DTD and may require extensive
1473 support, therefore such additions should be well thought-out. There
1474 should be a limited number of roles.
1476 The only place where no limit is placed on variation is at the start,
1477 at the Reader/Parser interface. Transforms are inserted by the Reader
1478 into the Transformer's queue, where non-standard elements are
1479 converted. Once past the Transformer, no variation from the standard
1480 Docutils doctree is possible.
1482 An example is the Python Source Reader, which will use interpreted
1483 text extensively. The default role will be "Python identifier", which
1484 will be further interpreted by namespace context into <class>,
1485 <method>, <module>, <attribute>, etc. elements (see pysource.dtd),
1486 which will be transformed into standard hyperlink references, which
1487 will be processed by the various Writers. No Writer will need to have
1488 any knowledge of the Python-Reader origin of these elements.
1490 * Add explicit interpreted text roles for the rest of the implicit
1491 inline markup constructs: named-reference, anonymous-reference,
1492 footnote-reference, citation-reference, substitution-reference,
1493 target, uri-reference (& synonyms).
1495 * Add directives for each role as well? This would allow indirect
1498 This text contains |nested inline markup|.
1500 .. |nested inline markup| emphasis::
1502 nested ``inline`` markup
1506 - "_`raw-wrapped`" (or "_`raw-wrap`"): Base role to wrap raw text
1507 around role contents.
1509 For example, the following reStructuredText source ... ::
1511 .. role:: red(raw-formatting)
1513 :html: <font color="red">
1514 :latex: {\color{red}
1521 ... will yield the following document fragment::
1525 <inline classes="red">
1528 <raw format="latex">
1530 <inline classes="red">
1534 <raw format="latex">
1537 Possibly without the intermediate "inline" node.
1539 - _`"acronym" and "abbreviation"`: Associate the full text with a
1540 short form. Jason Diamond's description:
1542 I want to translate ```reST`:acronym:`` into ``<acronym
1543 title='reStructuredText'>reST</acronym>``. The value of the
1544 title attribute has to be defined out-of-band since you can't
1545 parameterize interpreted text. Right now I have them in a
1546 separate file but I'm experimenting with creating a directive
1547 that will use some form of reST syntax to let you define them.
1549 Should Docutils complain about undefined acronyms or
1552 What to do if there are multiple definitions? How to
1553 differentiate between CSS (Content Scrambling System) and CSS
1554 (Cascading Style Sheets) in a single document? David Priest
1557 The short answer is: you don't. Anyone who did such a thing
1558 would be writing very poor documentation indeed. (Though I
1559 note that `somewhere else in the docs`__, there's mention of
1560 allowing replacement text to be associated with the
1561 abbreviation. That takes care of the duplicate
1562 acronyms/abbreviations problem, though a writer would be
1563 foolish to ever need it.)
1565 __ `inline parameter syntax`_
1567 How to define the full text? Possibilities:
1569 1. With a directive and a definition list? ::
1576 Docstring Processing System
1578 Would this list remain in the document as a glossary, or would
1579 it simply build an internal lookup table? A "glossary"
1580 directive could be used to make the intention clear.
1581 Acronyms/abbreviations and glossaries could work together.
1583 Then again, a glossary could be formed by gathering individual
1584 definitions from around the document.
1586 2. Some kind of `inline parameter syntax`_? ::
1588 `reST <reStructuredText>`:acronym: is `WYSIWYG <what you
1589 see is what you get>`:acronym: plaintext markup.
1591 .. _inline parameter syntax:
1592 rst/alternatives.html#parameterized-interpreted-text
1594 3. A combination of 1 & 2?
1596 The multiple definitions issue could be handled by establishing
1597 rules of priority. For example, directive-based lookup tables
1598 have highest priority, followed by the first inline definition.
1599 Multiple definitions in directive-based lookup tables would
1600 trigger warnings, similar to the rules of `implicit hyperlink
1603 __ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
1605 4. Using substitutions? ::
1607 .. |reST| acronym:: reST
1608 :text: reStructuredText
1610 What do we do for other formats than HTML which do not support
1611 tool tips? Put the full text in parentheses?
1613 - "figure", "table", "listing", "chapter", "page", etc: See `object
1614 numbering and object references`_ above.
1616 - "glossary-term": This would establish a link to a glossary. It
1617 would require an associated "glossary-entry" directive, whose
1618 contents could be a definition list::
1627 This would allow entries to be defined anywhere in the document,
1628 and collected (via a "glossary" directive perhaps) at one point.
1631 Unimplemented Transforms
1632 ========================
1634 * _`Footnote & Citation Gathering`
1636 Collect and move footnotes & citations to the end of a document.
1637 (Separate transforms.)
1639 * _`Reference Merging`
1641 When merging two or more subdocuments (such as docstrings),
1642 conflicting references may need to be resolved. There may be:
1644 * duplicate reference and/or substitution names that need to be made
1646 * duplicate footnote numbers that need to be renumbered.
1648 Should this be done before or after reference-resolving transforms
1649 are applied? What about references from within one subdocument to
1652 * _`Document Splitting`
1654 If the processed document is written to multiple files (possibly in
1655 a directory tree), it will need to be split up. Internal references
1656 will have to be adjusted.
1658 (HTML only? Initially, yes. Eventually, anything should be
1663 - Insert a "destination" attribute into the root element of each
1664 split-out document, containing the path/filename. The Output
1665 object or Writer will recognize this attribute and split out the
1666 files accordingly. Must allow for common headers & footers,
1667 prev/next, breadcrumbs, etc.
1669 - Transform a single-root document into a document containing
1670 multiple subdocuments, recursively. The content model of the
1671 "document" element would have to change to::
1674 ( (title, subtitle?)?,
1676 (docinfo, transition?)?,
1680 (I.e., add the last line -- 0 or more document elements.)
1682 Let's look at the case of hierarchical (directories and files)
1683 HTML output. Each document element containing further document
1684 elements would correspond to a directory (with an index.html file
1685 for the content preceding the subdocuments). Each document
1686 element containing no subdocuments (i.e., structure model elements
1687 only) corresponds to a concrete file with no directory.
1689 The natural transform would be to map sections to subdocuments,
1690 but possibly only a given number of levels deep.
1694 If a document is split up, each segment will need navigation links:
1695 parent, children (small TOC), previous (preorder), next (preorder).
1696 Part of `Document Splitting`_?
1698 * _`List of System Messages`
1700 The ``system_message`` elements are inserted into the document tree,
1701 adjacent to the problems themselves where possible. Some (those
1702 generated post-parse) are kept until later, in
1703 ``document.messages``, and added as a special final section,
1704 "Docutils System Messages".
1706 Docutils could be made to generate hyperlinks to all known
1707 system_messages and add them to the document, perhaps to the end of
1708 the "Docutils System Messages" section.
1710 Fred L. Drake, Jr. wrote:
1712 I'd like to propose that both parse- and transformation-time
1713 messages are included in the "Docutils System Messages" section.
1714 If there are no objections, I can make the change.
1716 The advantage of the current way of doing things is that parse-time
1717 system messages don't require a transform; they're already in the
1718 document. This is valuable for testing (unit tests,
1719 tools/quicktest.py). So if we do decide to make a change, I think
1720 the insertion of parse-time system messages ought to remain as-is
1721 and the Messages transform ought to move all parse-time system
1722 messages (remove from their originally inserted positions, insert in
1723 System Messages section).
1725 * _`Index Generation`
1731 * Make it easier to find out fragment names (#foo-bar) of ``_`inline
1732 targets```. Currently you have to either look at the source or
1735 For example, we could add support for self-referencing targets
1736 (i.e. inline targets would [unobtrusively] link to themselves, so
1737 that you can just click them and then copy the address). Or we
1738 could add support for titles that display the fragment name (as in
1739 <http://subversion.tigris.org/mailing-list-guidelines.html>; just
1740 hover the paragraphs).
1742 Either way it should be optional and deactivated by default.
1744 This would be useful for documents like Docutils' bug list or to-do
1747 * Make the _`list compacting` logic more generic: For example, allow
1748 for literal blocks or line blocks inside of compact list items.
1750 This is not implementable as long as list compacting is done by
1751 omitting ``<p>`` tags. List compacting would need to be done by
1752 adjusting CSS margins instead.
1754 * Add support for _`multiple stylesheets`. See
1755 <http://thread.gmane.org/gmane.text.docutils.cvs/4336>.
1757 * Idea for field-list rendering: hanging indent::
1759 Field name (bold): First paragraph of field body begins
1760 with the field name inline.
1762 If the first item of a field body is not a paragraph,
1763 it would begin on the following line.
1765 * Add more support for <link> elements, especially for navigation
1768 The framework does not have a notion of document relationships, so
1769 probably raw.destination_ should be used.
1771 We'll have framework support for document relationships when support
1772 for `multiple output files`_ is added. The HTML writer could
1773 automatically generate <link> elements then.
1775 .. _raw.destination: misc.raw_
1777 * Base list compaction on the spacing of source list? Would require
1778 parser support. (Idea: fantasai, 16 Dec 2002, doc-sig.)
1780 * Add a tool tip ("title" attribute?) to footnote back-links
1781 identifying them as such. Text in Docutils language module.
1787 * Remove the generic style information (duplicated from html4css1.css)
1788 from pep.css to avoid redundancy.
1790 We need support for `multiple stylesheets`_ first, though.
1796 * Add a way to begin an untitled slide.
1798 * Add a way to begin a new slide, continuation, using the same title
1799 as the previous slide? (Unnecessary?) You need that if you have a
1800 lot of items in one section which don't fit on one slide.
1802 Maybe either this item or the previous one can be realized using
1805 * Have a timeout on incremental items, so the colour goes away after 1
1808 * Add an empty, black last slide (optionally). Currently the handling
1809 of the last slide is not very nice, it re-cycles through the
1810 incremental items on the last slide if you hit space-bar after the
1813 * Add a command-line option to disable advance-on-click.
1815 * Add a speaker's master document, which would contain a small version
1816 of the slide text with speaker's notes interspersed. The master
1817 document could use ``target="whatever"`` to direct links to a
1818 separate window on a second monitor (e.g., a projector).
1820 .. Note:: This item and the following items are partially
1821 accomplished by the S5 1.2 code (currently in alpha), which has
1822 not yet been integrated into Docutils.
1824 * Speaker's notes -- how to intersperse? Could use reST comments
1825 (".."), but make them visible in the speaker's master document. If
1826 structure is necessary, we could use a "comment" directive (to avoid
1827 nonsensical DTD changes, the "comment" directive could produce an
1828 untitled topic element).
1830 The speaker's notes could (should?) be separate from S5's handout
1833 * The speaker's master document could use frames for easy navigation:
1834 TOC on the left, content on the right.
1836 - It would be nice if clicking in the TOC frame simultaneously
1837 linked to both the speaker's notes frame and to the slide window,
1838 synchronizing both. Needs JavaScript?
1840 - TOC would have to be tightly formatted -- minimal indentation.
1842 - TOC auto-generated, as in the PEP Reader. (What if there already
1843 is a "contents" directive in the document?)
1845 - There could be another frame on the left (top-left or bottom-left)
1846 containing a single "Next" link, always pointing to the next slide
1847 (synchronized, of course). Also "Previous" link? FF/Rew go to
1848 the beginning of the next/current parent section? First/Last
1849 also? Tape-player-style buttons like ``|<< << < > >> >>|``?
1855 * Add an ``--embed-stylesheet`` (and ``--link-stylesheet``) option.
1861 * What about if we don't know which Reader and/or Writer we are
1862 going to use? If the Reader/Writer is specified on the
1863 command-line? (Will this ever happen?)
1865 Perhaps have different types of front ends:
1867 a) _`Fully qualified`: Reader and Writer are hard-coded into the
1868 front end (e.g. ``pep2html [options]``, ``pysource2pdf
1871 b) _`Partially qualified`: Reader is hard-coded, and the Writer is
1872 specified a sub-command (e.g. ``pep2 html [options]``,
1873 ``pysource2 pdf [options]``). The Writer is known before option
1874 processing happens, allowing the OptionParser to be built
1875 dynamically. Alternatively, the Writer could be hard-coded and
1876 the Reader specified as a sub-command (e.g. ``htmlfrom pep
1879 c) _`Unqualified`: Reader and Writer are specified as subcommands
1880 (e.g. ``publish pep html [options]``, ``publish pysource pdf
1881 [options]``). A single front end would be sufficient, but
1882 probably only useful for testing purposes.
1884 d) _`Dynamic`: Reader and/or Writer are specified by options, with
1885 defaults if unspecified (e.g. ``publish --writer pdf
1886 [options]``). Is this possible? The option parser would have
1887 to be told about new options it needs to handle, on the fly.
1888 Component-specific options would have to be specified *after*
1889 the component-specifying option.
1891 Allow common options before subcommands, as in CVS? Or group all
1892 options together? In the case of the `fully qualified`_
1893 front ends, all the options will have to be grouped together
1894 anyway, so there's no advantage (we can't use it to avoid
1895 conflicts) to splitting common and component-specific options
1898 * Parameterize help text & defaults somehow? Perhaps a callback? Or
1899 initialize ``settings_spec`` in ``__init__`` or ``init_options``?
1901 * Disable common options that don't apply?
1903 * Add ``--section-numbering`` command line option. The "sectnum"
1904 directive should override the ``--no-section-numbering`` command
1907 * Create a single dynamic_ or unqualified_ front end that can be
1914 indent-tabs-mode: nil
1915 sentence-end-double-space: t