5 :Author: David Goodger (with input from many); open to all Docutils
7 :Contact: docutils-develop@lists.sourceforge.net
10 :Copyright: This document has been placed in the public domain.
12 .. _Docutils: http://docutils.sourceforge.net/
17 Priority items are marked with "@" symbols. The more @s, the higher
18 the priority. Items in question form (containing "?") are ideas which
19 require more thought and debate; they are potential to-do's.
21 Many of these items are awaiting champions. If you see something
22 you'd like to tackle, please do! If there's something you'd like to
23 see done but are unable to implement it yourself, please consider
24 donating to Docutils: |donate|
26 .. |donate| image:: http://images.sourceforge.net/images/project-support.jpg
27 :target: http://sourceforge.net/donate/index.php?group_id=38414
31 :alt: Support the Docutils project!
33 Please see also the Bugs_ document for a list of bugs in Docutils.
35 .. _bugs: ../../BUGS.html
38 Minimum Requirements for Python Standard Library Candidacy
39 ==========================================================
41 Below are action items that must be added and issues that must be
42 addressed before Docutils can be considered suitable to be proposed
43 for inclusion in the Python standard library.
45 Many of these are now handled by Sphinx_
47 * Support for `document splitting`_. May require some major code
50 * Support for subdocuments (see `large documents`_).
52 * `Object numbering and object references`_.
54 * `Nested inline markup`_.
56 * `Python Source Reader`_.
58 * The HTML writer needs to be rewritten (or a second HTML writer
59 added) to allow for custom classes, and for arbitrary splitting
62 * Documentation_ of the architecture. Other docs too.
66 * Suitability for `Python module documentation
67 <http://docutils.sf.net/sandbox/README.html#documenting-python>`_.
69 .. _Sphinx: http://sphinx.pocoo.org/
74 * Encoding of command line arguments can only be guessed:
76 * try UTF-8/strict first, then try the locale's encoding with
77 strict error handling, then ASCII/replace?
79 UTF-8 is almost 100% safe to try first; false positives are rare,
80 The locale's encoding with strict error handling may be a
81 reasonable compromise, but any error would indicate that the
82 locale's encoding is inappropriate. The only safe fallback is
85 * Do not decode argv before option parsing but individual string
88 +1 Allows for separate command-line vs. filesystem encodings,
89 respectively to keep file names encoded.
90 +1 Allows to configure command-line encoding in a config file,
93 Cf. <http://thread.gmane.org/gmane.text.docutils.user/2890/focus=2957>.
95 * Improve handling on Windows:
97 - Get graphical installer.
98 - Make rst2html.py an .exe file using py2exe.
102 The user interface is very difficult to use for most Windows users;
103 you can't really expect them to use the command line. We need some
104 kind of GUI that can launch rst2html.py, and save the HTML output to
105 a file, and launch a browser. What's important is that we get
106 settings to work with the GUI. So we need some way to dynamically
107 generate a list of settings for the GUI. The current settings_spec
108 for OptionParser doesn't seem to be usable for this for the
111 - It's biased toward the command line -- there are *two* options for
114 - You cannot have both a one-line description and a longer
115 description for tooltips/help-texts.
117 - It doesn't provide hints for the input type. You cannot easily
118 infer the type of a setting from its validator, because any
119 component can add new validators. In fact, it may be necessary to
120 have both a hint about the input type (e.g. string) and a
121 validator (valid ID), or it may be necessary to have a different
122 set of choices for the CLI (1, INFO, 2, ...) and for the GUI
123 (INFO, WARNING, ...).
125 - It's coupled to the OptionParser. We want to be able to change
126 the underlying system without breaking everything.
128 - It's a bunch of primitive structures. We want an extensible (thus
129 object-oriented) interface.
131 So we probably need to create a class for storing all the settings,
132 and auto-generate the OptionParser data from that.
134 I talked to Stephan Deibel about getting Docutils integrated into
135 Wing IDE. He said it's possible, and he'd be willing to help.
136 There's a scripting interface to Wing, which we'd use. We can
137 dynamically generate a list of preferences and not worry too much
138 about the rendering (from what I understood); Wing's whole GUI is
139 dynamic anyway. The interface could be made usable for other GUIs.
140 For example, we could try to get option support for DocFactory. //
143 * Allow different report levels for STDERR and system_messages inside
146 * Change the docutils-update script (in sandbox/infrastructure), to
147 support arbitrary branch snapshots.
149 * Move some general-interest sandboxes out of individuals'
150 directories, into subprojects?
152 * Add option for file (and URL) access restriction to make Docutils
153 usable in Wikis and similar applications.
155 2005-03-21: added ``file_insertion_enabled`` & ``raw_enabled``
156 settings. These partially solve the problem, allowing or disabling
157 **all** file accesses, but not limited access.
159 * Configuration_ file handling needs discussion:
161 - There should be some error checking on the contents of config
162 files. How much checking should be done? How loudly should
163 Docutils complain if it encounters an error/problem?
165 - Docutils doesn't complain when it doesn't find a configuration
166 file supplied with the ``--config`` option. Should it? (If yes,
169 * Internationalization:
171 - I18n needs refactoring, the language dictionaries are difficult to
172 maintain. Maybe have a look at gettext or similar tools.
174 (This would make a nice Google Summer of Code project)
176 - Language modules: in accented languages it may be useful to have
177 both accented and unaccented entries in the
178 ``bibliographic_fields`` mapping for versatility.
180 - Add a "--strict-language" option & setting: no English fallback
181 for language-dependent features.
183 Make this the default for output (as opposed to input)?
184 Throw an error with a helpfull message, e.g.
186 Default "contents" title for language %s missing, please specify
191 "attention" title for language %s missing, please use a generic
192 admonition with explicit title.
194 - Add internationalization to _`footer boilerplate text` (resulting
195 from "--generator", "--source-link", and "--date" etc.), allowing
199 * Add validation? See http://pytrex.sourceforge.net, RELAX NG, pyRXP.
201 * In ``docutils.readers.get_reader_class`` (& ``parsers`` &
202 ``writers`` too), should we be importing "standalone" or
203 "docutils.readers.standalone"? (This would avoid importing
204 top-level modules if the module name is not in docutils/readers.
205 Potential nastiness.)
207 * Perhaps store a _`name-to-id mapping file`? This could be stored
208 permanently, read by subsequent processing runs, and updated with
209 new entries. ("Persistent ID mapping"?)
211 * Perhaps the ``Component.supports`` method should deal with
212 individual features ("meta" etc.) instead of formats ("html" etc.)?
214 * Think about _`large documents` made up of multiple subdocument
215 files. Issues: continuity (`persistent sequences`_ above),
216 cross-references (`name-to-id mapping file`_ above and `targets in
217 other documents`_ below), splitting (`document splitting`_ below).
219 When writing a book, the author probably wants to split it up into
220 files, perhaps one per chapter (but perhaps even more detailed).
221 However, we'd like to be able to have references from one chapter to
222 another, and have continuous numbering (pages and chapters, as
223 applicable). Of course, none of this is implemented yet. There has
224 been some thought put into some aspects; see `the "include"
225 directive`__ and the `Reference Merging`_ transform below.
227 When I was working with SGML in Japan, we had a system where there
228 was a top-level coordinating file, book.sgml, which contained the
229 top-level structure of a book: the <book> element, containing the
230 book <title> and empty component elements (<preface>, <chapter>,
231 <appendix>, etc.), each with filename attributes pointing to the
232 actual source for the component. Something like this::
235 <title>Title of the Book</title>
236 <preface inrefid="pr01"></preface>
237 <chapter inrefid="ch01"></chapter>
238 <chapter inrefid="ch02"></chapter>
239 <chapter inrefid="ch03"></chapter>
240 <appendix inrefid="ap01"></appendix>
243 (The "inrefid" attribute stood for "insertion reference ID".)
245 The processing system would process each component separately, but
246 it would recognize and use the book file to coordinate chapter and
247 page numbering, and keep a persistent ID to (title, page number)
248 mapping database for cross-references. Docutils could use a similar
249 system for large-scale, multipart documents.
251 __ ../ref/rst/directives.html#including-an-external-document-fragment
267 As I said earlier in chapter :chapter:`Objects.txt`, the
268 reference count gets increased every time a binding is made.
272 As I said earlier in chapter 2, the
273 reference count gets increased every time a binding is made.
275 The ToC in this form doesn't even need to be references to actual
276 reST documents; I'm simply doing it that way for a minimum of
277 future-proofing, in case I do want to add the ability to pick up
278 references within external chapters.
280 Perhaps, instead of ToC (which would overload the "contents"
281 directive concept already in use), we could use "manifest". A
282 "manifest" directive might associate local reference names with
286 intro: Introduction.txt
291 Then the sample becomes::
293 .. include:: manifest.txt
295 As I said earlier in chapter :chapter:`objects`, the
296 reference count gets increased every time a binding is made.
298 * Add support for _`multiple output files` and _`generic data
301 It should be possible for a component to **emit or reference** data
302 to be either **included or referenced** in the output document.
303 Examples of such data are stylesheets or images.
305 For this, we need a "data" object which stores the data either
306 inline or by referring to a file. The Docutils framework is
307 responsible for either:
309 * storing the data in the appropriate location (e.g. in the
310 directory of the output file, or in a user-specified directory)
311 and providing the paths of the stored files to the writer, *or*
313 * providing the data itself to the writer so that it can be embedded
314 in the output document.
316 This approach decouples data handling from the data source (which
317 can either be embedded or referenced) and the destination (which can
318 either be embedded or referenced as well).
320 See <http://article.gmane.org/gmane.text.docutils.devel/3631>.
322 * Add testing for Docutils' front end tools?
324 * Publisher: "Ordinary setup" shouldn't requre specific ordering; at
325 the very least, there ought to be error checking higher up in the
328 ``Publisher.get_settings`` requires that all components be set up
329 before it's called. Perhaps the I/O *objects* shouldn't be set, but
330 I/O *classes*. Then options are set up (``.set_options``), and
331 ``Publisher.set_io`` (or equivalent code) is called with source &
332 destination paths, creating the I/O objects.
334 Perhaps I/O objects shouldn't be instantiated until required. For
335 split output, the Writer may be called multiple times, once for each
336 doctree, and each doctree should have a separate Output object (with
337 a different path). Is the "Builder" pattern applicable here?
339 * Perhaps I/O objects should become full-fledged components (i.e.
340 subclasses of ``docutils.Component``, as are Readers, Parsers, and
341 Writers now), and thus have associated option/setting specs and
344 * Multiple file I/O suggestion from Michael Hudson: use a file-like
345 object or something you can iterate over to get file-like objects.
347 * Add an "--input-language" option & setting? Specify a different
348 language module for input (bibliographic fields, directives) than
349 for output. The "--language" option would set both input & output
352 * Auto-generate reference tables for language-dependent features?
353 Could be generated from the source modules. A special command-line
354 option could be added to Docutils front ends to do this. (Idea from
357 * Enable feedback of some kind from internal decisions, such as
358 reporting the successful input encoding. Modify runtime settings?
359 System message? Simple stderr output?
361 * Rationalize Writer settings (HTML/LaTeX/PEP) -- share settings.
363 * Add an "--include file" command-line option (config setting too?),
364 equivalent to ".. include:: file" as the first line of the doc text?
365 Especially useful for character entity sets, text transform specs,
368 * Support "include" as embedded inline-compatible directive in substitution
371 .. |version| include:: version.txt
373 This document describes version |version| of ...
375 (cf. Grzegorz Adam Hankiewicz's post from 2014-10-01 in docutils-devel)
377 * Add an ``:optional: <replacement text>`` option to the "include"
378 directive? This would not throw an error for a missing file, instead a
379 warning is given and ``<replacement text>`` is used instead. It would be
380 the responsibility of the author to ensure the missing file does not lead
381 to problems later in the document.
385 + Standard rST syntax to replace Sphinx's "literalinclude"::
387 .. include:: blah.cpp
389 :optional: file ``blah.cpp`` not found
391 + Variable content taken from a file, e.g.
395 .. |version| replace:: 3.1
399 .. include:: version.txt
400 :optional: .. |version| replace:: unknown
402 This document describes version |version| of ...
404 (cf. Grzegorz Adam Hankiewicz's post from 2014-10-01 in docutils-devel)
406 * Parameterize the Reporter object or class? See the `2004-02-18
407 "rest checking and source path"`_ thread.
409 .. _2004-02-18 "rest checking and source path":
410 http://thread.gmane.org/gmane.text.docutils.user/1112
412 * Add a "disable_transforms" setting? And a dummy Writer subclass
413 that does nothing when its .write() method is called? Would allow
414 for easy syntax checking. See the `2004-02-18 "rest checking and
415 source path"`_ thread.
417 * Add a generic meta-stylesheet mechanism? An external file could
418 associate style names ("class" attributes) with specific elements.
419 Could be generalized to arbitrary output attributes; useful for HTML
420 & XMLs. Aahz implemented something like this in
421 sandbox/aahz/Effective/EffMap.py.
423 * .. _classes for table cells:
425 William Dode suggested that table cells be assigned "class"
426 attributes by columns, so that stylesheets can affect text
427 alignment. Unfortunately, there doesn't seem to be a way (in HTML
428 at least) to leverage the "colspec" elements (HTML "col" tags) by
429 adding classes to them. The resulting HTML is very verbose::
431 <td class="col1">111</td>
432 <td class="col2">222</td>
435 At the very least, it should be an option. People who don't use it
436 shouldn't be penalized by increases in their HTML file sizes.
438 Table rows could also be assigned classes (like odd/even). That
439 would be easier to implement.
441 How should it be implemented?
443 * There could be writer options (column classes & row classes) with
446 * The table directive could grow some options. Something like
447 ":cell-classes: col1 col2 col3" (either must match the number of
448 columns, or repeat to fill?) and ":row-classes: odd even" (repeat
449 to fill; body rows only, or header rows too?).
451 Probably per-table directive options are best. The "class" values
452 could be used by any writer, and applying such classes to all tables
453 in a document with writer options is too broad.
455 See also the `table_styling Sphinx extension`_ which defines
457 :widths: also in Docutils core (but different implementation)
458 :column-alignment: Sets per-column text alignment
459 :column-wrapping: Sets per-column text wrapping
460 :column-dividers: Add dividers between columns
461 :column-classes: Add per-column css classes.
462 :header-columns: Specify number of “stub” columns
464 .. _table_styling Sphinx extension: https://pythonhosted.org/cloud_sptheme/
465 lib/cloud_sptheme.ext.table_styling.html
467 * Add file-specific settings support to config files, like::
472 Is this even possible? Should the criterion be the name of the
473 input file or the output file? Alternative (more explicit) syntax::
475 [source_file index.txt]
478 [dest_file index.html]
481 Or rather allow settings configuration from the rst source file
482 (see misc.settings_ directive)?
484 * The "validator" support added to OptionParser is very similar to
485 "traits_" in SciPy_. Perhaps something could be done with them?
486 (Had I known about traits when I was implementing docutils.frontend,
487 I may have used them instead of rolling my own.)
489 .. _traits: http://code.enthought.com/traits/
490 .. _SciPy: http://www.scipy.org/
492 * tools/buildhtml.py: Extend the --prune option ("prune" config
493 setting) to accept file names (generic path) in addition to
494 directories (e.g. --prune=docs/user/rst/cheatsheet.txt, which should
495 *not* be converted to HTML).
497 * Add support for _`plugins`.
499 * _`Config directories`: Currently, ~/.docutils, ./docutils.conf/, &
500 /etc/docutils.conf are read as configuration_ files. Proposal: allow
501 ~/.docutils to be a a configuration *directory*, along with
502 /etc/docutils/ and ./docutils.conf/. Within these directories,
503 check for config.txt files. We can also have subdirectories here,
504 for plugins, S5 themes, components (readers/writers/parsers) etc.
506 Docutils will continue to support configuration files for backwards
509 * Add support for document decorations other than headers & footers?
510 For example, top/bottom/side navigation bars for web pages. Generic
513 Seems like a bad idea as long as it isn't independent from the ouput
514 format (for example, navigation bars are only useful for web pages).
516 * docutils_update: Check for a ``Makefile`` in a directory, and run
517 ``make`` if found? This would allow for variant processing on
518 specific source files, such as running rst2s5.py instead of
521 * Add a "disable table of contents" setting? The S5 writer could set
522 it as a default. Rationale:
524 The ``contents`` (table of contents) directive must not be used
525 [in S5/HTML documents]. It changes the CSS class of headings
526 and they won't show up correctly in the screen presentation.
528 -- `Easy Slide Shows With reStructuredText & S5
529 <../user/slide-shows.html>`_
531 Analogue to the ``sectnum_xform`` setting, it could be used by the
532 latex writer to switch to a LaTeX generated ToC (currently, the latex
533 writer calls it "use_latex_toc").
535 object numbering and object references
536 --------------------------------------
538 For equations, tables & figures.
540 These would be the equivalent of DocBook's "formal" elements.
542 In LaTeX, automatic counters are implemented for sections, equations and
543 floats (figures, tables) (configurable via stylesheets or in the
544 latex-preamble). Objects can be given `reference names`_ with the
545 ``\label{<refname}`` command, ``\ref{<refname>}`` inserts the
546 corresponding number.
548 No such mechanism exists in HTML.
550 * We need _`persistent sequences`, similar to chapter and footnote
551 numbers. See `OpenOffice.org XML`_ "fields".
553 - Should the sequences be automatic or manual (user-specifyable)?
555 * It is already possible to give `reference names`_ to objects via
556 internal hyperlink targets or the "name" directive option::
560 .. figure:: image.png
564 .. figure:: image.png
567 Improve the mapping of "phrase references" to IDs/labels with
568 Literal transcription (i.e. ü -> ue, ß -> ss, å -> aa) instead of just
569 stripping the accents and other non-ASCII chars.
570 Use http://pypi.python.org/pypi/Unidecode?
572 A "table" directive has been implemented, supporting table titles.
574 Perhaps the name could derive from the title/caption?
576 .. _reference names: ../ref/rst/restructuredtext.html#reference-names
578 * We need syntax for object references. Cf. `OpenOffice.org XML`_
581 - Parameterized substitutions are too complicated
582 (cf. `or not to do`: `object references`_)
584 - An interpreted text approach is simpler and better::
586 See Figure :ref:`figure name` and Equation :ref:`eq:identity`.
588 - "equation", "figure", and "page" roles could generate appropriate
591 See :figure:`figure name` on :page:`figure name`.
593 See `Interpreted Text`_ below.
595 Reference boilerplate could be specified in the document
596 (defaulting to nothing)::
599 :prefix-ref: "Figure "
600 :prefix-caption: "Fig. "
603 The position of the role (prefix or suffix) could also be utilized
605 .. _OpenOffice.org XML: http://xml.openoffice.org/
606 .. _object references: rst/alternatives.html#object-references
608 See also the `Modified rst2html
609 <http://www.loria.fr/~rougier/coding/article/rst2html.py>`__
610 by Nicolas Rougier for a sample implementation.
619 * Add a FAQ entry about using Docutils (with reStructuredText) on a
620 server and that it's terribly slow. See the first paragraphs in
621 <http://article.gmane.org/gmane.text.docutils.user/1584>.
623 * Add document about what Docutils has previously been used for
624 (web/use-cases.txt?).
626 * Improve index in docs/user/config.txt.
632 * Complete `Docutils Runtime Settings <../api/runtime-settings.html>`_.
634 * Improve the internal module documentation (docstrings in the code).
635 Specific deficiencies listed below.
637 - docutils.parsers.rst.states.State.build_table: data structure
638 required (including StringList).
640 - docutils.parsers.rst.states: more complete documentation of parser
643 * docs/ref/doctree.txt: DTD element structural relationships,
644 semantics, and attributes. In progress; element descriptions to be
647 * Document the ``pending`` elements, how they're generated and what
650 * Document the transforms (perhaps in docstrings?): how they're used,
651 what they do, dependencies & order considerations.
653 * Document the HTML classes used by html4css1.py.
655 * Write an overview of the Docutils architecture, as an introduction
656 for developers. What connects to what, why, and how. Either update
657 PEP 258 (see PEPs_ below) or as a separate doc.
659 * Give information about unit tests. Maybe as a howto?
661 * Document the docutils.nodes APIs.
663 * Complete the docs/api/publisher.txt docs.
669 * Creating Docutils Writers
671 * Creating Docutils Readers
673 * Creating Docutils Transforms
675 * Creating Docutils Parsers
677 * Using Docutils as a Library
683 * Complete PEP 258 Docutils Design Specification.
685 - Fill in the blanks in API details.
687 - Specify the nodes.py internal data structure implementation?
689 [Tibs:] Eventually we need to have direct documentation in
690 there on how it all hangs together - the DTD is not enough
691 (indeed, is it still meant to be correct? [Yes, it is.
694 * Rework PEP 257, separating style from spec from tools, wrt Docutils?
695 See Doc-SIG from 2001-06-19/20.
703 * Analyze Tony Ibbs' PySource code.
705 * Analyze Doug Hellmann's HappyDoc project.
707 * Investigate how POD handles literate programming.
709 * Take the best ideas and integrate them into Docutils.
713 * Ask Python-dev for opinions (GvR for a pronouncement) on special
714 variables (__author__, __version__, etc.): convenience vs. namespace
715 pollution. Ask opinions on whether or not Docutils should recognize
718 * If we can detect that a comment block begins with ``##``, a la
719 JavaDoc, it might be useful to indicate interspersed section headers
720 & explanatory text in a module. For example::
722 """Module docstring."""
735 class MyException(Exception): pass
739 * Should standalone strings also become (module/class) docstrings?
740 Under what conditions? We want to prevent arbitrary strings from
741 becomming docstrings of prior attribute assignments etc. Assume
742 that there must be no blank lines between attributes and attribute
743 docstrings? (Use lineno of NEWLINE token.)
745 Triple-quotes are sometimes used for multi-line comments (such as
746 commenting out blocks of code). How to reconcile?
748 * HappyDoc's idea of using comment blocks when there's no docstring
749 may be useful to get around the conflict between `additional
750 docstrings`_ and ``from __future__ import`` for module docstrings.
751 A module could begin like this::
753 #!/usr/bin/env python
755 # :Copyright: whatever
757 """This is the public module docstring (``__doc__``)."""
759 # More docs, in comments.
760 # All comments at the beginning of a module could be
761 # accumulated as docstrings.
762 # We can't have another docstring here, because of the
763 # ``__future__`` statement.
765 from __future__ import division
767 Using the JavaDoc convention of a doc-comment block beginning with
768 ``##`` is useful though. It allows doc-comments and implementation
771 .. _additional docstrings:
772 ../peps/pep-0258.html#additional-docstrings
774 * HappyDoc uses an initial comment block to set "parser configuration
775 values". Do the same thing for Docutils, to set runtime settings on
776 a per-module basis? I.e.::
778 # Docutils:setting=value
780 Could be used to turn on/off function parameter comment recognition
781 & other marginal features. Could be used as a general mechanism to
782 augment config files and command-line options (but which takes
785 * Multi-file output should be divisible at arbitrary level.
787 * Support all forms of ``import`` statements:
789 - ``import module``: listed as "module"
790 - ``import module as alias``: "alias (module)"
791 - ``from module import identifier``: "identifier (from module)"
792 - ``from module import identifier as alias``: "alias (identifier
794 - ``from module import *``: "all identifiers (``*``) from module"
796 * Have links to colorized Python source files from API docs? And
797 vice-versa: backlinks from the colorized source files to the API
800 * In summaries, use the first *sentence* of a docstring if the first
801 line is not followed by a blank line.
804 reStructuredText Parser
805 =======================
807 Also see the `... Or Not To Do?`__ list.
809 __ rst/alternatives.html#or-not-to-do
814 * Another list problem::
820 This ends up as a definition list. This is more of a usability
823 * This case is probably meant to be a nested list, but it ends up as a
824 list inside a block-quote without an error message::
830 It should probably just be an error.
832 The problem with this is that you don't notice easily in HTML that
833 it's not a nested list but a block-quote -- there's not much of a
836 * Treat enumerated lists that are not arabic and consist of only one
837 item in a single line as ordinary paragraphs. See
838 <http://article.gmane.org/gmane.text.docutils.user/2635>.
840 * The citation syntax could use some improvements. See
841 <http://thread.gmane.org/gmane.text.docutils.user/2499> (and the
843 <http://thread.gmane.org/gmane.text.docutils.user/2499/focus=3028>,
844 and the follow-ups at
845 <http://thread.gmane.org/gmane.text.docutils.user/3087>,
846 <http://thread.gmane.org/gmane.text.docutils.user/3110>,
847 <http://thread.gmane.org/gmane.text.docutils.user/3114>),
848 <http://thread.gmane.org/gmane.text.docutils.user/2443>,
849 <http://thread.gmane.org/gmane.text.docutils.user/2715>,
850 <http://thread.gmane.org/gmane.text.docutils.user/3027>,
851 <http://thread.gmane.org/gmane.text.docutils.user/3120>,
852 <http://thread.gmane.org/gmane.text.docutils.user/3253>.
854 * The current list-recognition logic has too many false positives, as
861 Here ``V.`` is recognized as an enumerator, which leads to
862 confusion. We need to find a solution that resolves such problems
863 without complicating the spec to much.
865 See <http://thread.gmane.org/gmane.text.docutils.user/2524>.
867 * Add indirect links via citation references & footnote references.
870 `Goodger (2005)`_ is helpful.
872 .. _Goodger (2005): [goodger2005]_
873 .. [goodger2005] citation text
875 See <http://thread.gmane.org/gmane.text.docutils.user/2499>.
877 * Complain about bad URI characters
878 (http://article.gmane.org/gmane.text.docutils.user/2046) and
879 disallow internal whitespace
880 (http://article.gmane.org/gmane.text.docutils.user/2214).
882 * Create ``info``-level system messages for unnecessarily
883 backslash-escaped characters (as in ``"\something"``, rendered as
884 "something") to allow checking for errors which silently slipped
887 * Add (functional) tests for untested roles.
889 * Add test for ":figwidth: image" option of "figure" directive. (Test
890 code needs to check if PIL is available on the system.)
892 * Add support for CJK double-width whitespace (indentation) &
893 punctuation characters (markup; e.g. double-width "*", "-", "+")?
895 * Add motivation sections for constructs in spec.
897 * Support generic hyperlink references to _`targets in other
898 documents`? Not in an HTML-centric way, though (it's trivial to say
899 ``http://www.example.com/doc#name``, and useless in non-HTML
900 contexts). XLink/XPointer? ``.. baseref::``? See Doc-SIG
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 * Add support for pragma (syntax-altering) directives.
946 Some pragma directives could be local-scope unless explicitly
947 specified as global/pragma using ":global:" options.
949 * Support whitespace in angle-bracketed standalone URLs according to
950 Appendix E ("Recommendations for Delimiting URI in Context") of `RFC
953 .. _RFC 2396: http://www.rfc-editor.org/rfc/rfc2396.txt
955 * Use the vertical spacing of the source text to determine the
956 corresponding vertical spacing of the output?
958 * [From Mark Nodine] For cells in simple tables that comprise a
959 single line, the justification can be inferred according to the
962 1. If the text begins at the leftmost column of the cell,
963 then left justification, ELSE
964 2. If the text begins at the rightmost column of the cell,
965 then right justification, ELSE
966 3. Center justification.
968 The onus is on the author to make the text unambiguous by adding
969 blank columns as necessary. There should be a parser setting to
970 turn off justification-recognition (normally on would be fine).
972 Decimal justification?
974 All this shouldn't be done automatically. Only when it's requested
975 by the user, e.g. with something like this::
982 Otherwise it will break existing documents.
984 * Generate a warning or info message for paragraphs which should have
985 been lists, like this one::
990 * Generalize the "target-notes" directive into a command-line option
991 somehow? See docutils-develop 2003-02-13.
993 * Allow a "::"-only paragraph (first line, actually) to introduce a
994 _`literal block without a blank line`? (Idea from Paul Moore.) ::
997 This is a literal block
999 Is indentation enough to make the separation between a paragraph
1000 which contains just a ``::`` and the literal text unambiguous?
1001 (There's one problem with this concession: If one wants a definition
1002 list item which defines the term "::", we'd have to escape it.) It
1003 would only be reasonable to apply it to "::"-only paragraphs though.
1004 I think the blank line is visually necessary if there's text before
1007 The text in this paragraph needs separation
1008 from the literal block following::
1009 This doesn't look right.
1011 * Add new syntax for _`nested inline markup`? Or extend the parser to
1012 parse nested inline markup somehow? See the `collected notes
1013 <rst/alternatives.html#nested-inline-markup>`__.
1015 * Drop the backticks from embedded URIs with omitted reference text?
1016 Should the angle brackets be kept in the output or not? ::
1020 Probably not worth the trouble.
1022 * How about a syntax for alternative hyperlink behavior, such as "open
1023 in a new window" (as in HTML's ``<a target="_blank">``)?
1025 The MoinMoin wiki uses a caret ("^") at the beginning of the URL
1026 ("^" is not a legal URI character). That could work for both inline
1027 and explicit targets::
1029 The `reference docs <^url>`__ may be handy.
1033 This may be too specific to HTML. It hasn't been requested very
1036 * Add an option to add URI schemes at runtime.
1038 * _`Segmented lists`::
1040 : segment : segment : segment
1041 : segment : segment : very long
1043 : segment : segment : segment
1045 The initial colon (":") can be thought of as a type of bullet
1047 We could even have segment titles::
1049 :: title : title : title
1050 : segment : segment : segment
1051 : segment : segment : segment
1053 This would correspond well to DocBook's SegmentedList. Output could
1054 be tabular or "name: value" pairs, as described in DocBook's docs.
1056 * Enable grid _`tables inside XML comments`, where "``--``" ends comments.
1058 Implementation possibilities:
1060 1. Make the table syntax characters into "table" directive options.
1061 This is the most flexible but most difficult, and we probably
1062 don't need that much flexibility.
1064 2. Substitute "~" for "-" with a specialized directive option
1067 3. Make the standard table syntax recognize "~" as well as "-", even
1068 without a directive option. Individual tables would have to be
1069 internally consistent.
1071 4. Allow Unicode box characters for table markup
1072 (`feature request [6]`_)
1074 Directive options are preferable to configuration settings, because
1075 tables are document-specific. A pragma directive would be another
1076 approach, to set the syntax once for a whole document.
1078 Unicode box character markup would kill two birds with one stone.
1080 In the meantime, the list-table_ directive is a good replacement for
1081 grid tables inside XML comments.
1083 .. _feature request [6]:
1084 http://sourceforge.net/p/docutils/feature-requests/6
1085 .. _list-table: ../ref/rst/directives.html#list-table
1088 * Generalize docinfo contents (bibliographic fields): remove specific
1089 fields, and have only a single generic "field"?
1091 * _`Line numbers` and "source" in system messages:
1093 - Add "source" and "line" keyword arguments to all Reporter calls?
1094 This would require passing source/line arguments along all
1095 intermediate functions (where currently only `line` is used).
1097 Or rather specify "line" only if actually needed?
1099 Currently, `document.reporter` uses a state machine instance to
1100 determine the "source" and "line" info from
1101 `statemachine.input_lines` if not given explicitely. Except for
1102 special cases, the "line" argument is not needed because,
1103 `document.statemachine` keeps record of the current line number.
1105 - For system messages generated after the parsing is completed (i.e. by
1106 transforms or the writer) "line" info must be present in the doctree
1109 Elements' .line assignments should be checked. (Assign to .source
1110 too? Add a set_info method? To what?)
1112 The "source" (and line number in the source) can either be added
1113 explicitely to the elements or determined from the “raw” line
1114 number by `document.statemachine.get_source_and_line`.
1116 - Some line numbers in elements are not being set properly
1117 (explicitly), just implicitly/automatically. See rev. 1.74 of
1118 docutils/parsers/rst/states.py for an example of how to set.
1120 - The line numbers of definition list items are wrong::
1122 $ rst2pseudoxml.py --expose-internal-attribute line
1131 <document source="<stdin>">
1133 <definition_list_item internal:line="3">
1137 <paragraph internal:line="2">
1140 <definition_list_item internal:line="6">
1144 <paragraph internal:line="6">
1150 Quite a few nodes are getting a "None" source attribute as well. In
1151 particular, see the bodies of definition lists.
1154 Adaptable file extensions
1155 -------------------------
1160 Should Docutils support adaptable file extensions in hyperlinks?
1162 In the rST source, sister documents are ".txt" files. If we're
1163 generating HTML, then ".html" is appropriate; if PDF, then ".pdf";
1166 Handle documents only, or objects (images, etc.) also?
1168 Different output formats support different sets of image formats (HTML
1169 supports ".svg" but not ".pdf", pdfLaTeX supports ".pdf" but not ".svg",
1170 LaTeX supports only ".eps").
1172 This is less urgent 2020 than previously, as `pdflatex` and
1173 `lualatex` are now standard and support most image formats. Also, a
1174 wrapper like `rubber`__ that provide on-the-fly image conversion
1175 depend on the "wrong" extension in the LaTeX source.
1177 __ https://pypi.org/project/rubber/
1179 At what point should the extensions be substituted?
1182 Fits well in the Docutils processing framework. (Writer-specific
1183 configuration is still possible in the respective sections of the
1184 configuration_ file.)
1187 May be simpler to code.
1189 Pre- or post-processing:
1190 Can be implemented independent of Docutils -- keeps Docutils simple.
1192 ... those who need more sophisticated filename extension
1193 tweaking can simply use regular expressions, which isn't too
1194 difficult due to the determinability of the writers. So there
1195 is no need to add a complex filename-extension-handling feature
1198 --- `Lea Wiemann in docutils-users 2004-06-04`__
1200 __ https://sourceforge.net/p/docutils/mailman/message/6918089/
1206 How about using ".*" to indicate "choose the most appropriate filename
1207 extension"? For example::
1209 .. _Another Document: another.*
1211 * My point about using ``.*`` is that any other mechanism inside reST
1212 leads to too many ambiguities in reading reST documents; at least
1213 with ``.*`` it's clear that some kind of substitution is going on.
1217 * What is to be done for output formats that don't *have* hyperlinks?
1218 For example, LaTeX targeted at print. Hyperlinks may be "called
1219 out", as footnotes with explicit URLs. (Don't convert the links.)
1221 But then there's also LaTeX targeted at PDFs, which *can* have
1222 links. Perhaps a runtime setting for "*" could explicitly provide
1223 the extension, defaulting to the output file's extension.
1225 * If this handles images also, how to differentiate between document
1226 and image links? Element context (within "image")? Which image
1227 extension to use for which document format? For HTML output, there
1228 is no reliable way of determining which extension to use (svg, png,
1229 jpg, jpeg, gif, ...).
1231 Should the system check for existing files? No, not practical (the
1232 image files may be not available when the document is processed to HTML).
1234 Mailing list threads: `Images in both HTML and LaTeX`__ (especially
1235 `this summary of Lea's objections`__).
1237 __ https://sourceforge.net/p/docutils/mailman/docutils-users/thread/40BAA4B7.5020801%40python.org/#msg6918066
1238 __ https://sourceforge.net/p/docutils/mailman/message/6918089/
1240 Chris Liechti suggests a new ``:link:`` role in `more-universal
1243 .. role:: link(rewrite)
1244 :transform: .txt|.html
1246 and then to use it::
1248 for more information see :link:`README.txt`
1250 it would be useful if it supported an additional option
1251 ``:format: html`` so that separate rules for each format can be
1252 defined. (like the "raw" role)
1254 __ https://sourceforge.net/p/docutils/mailman/message/6919484/
1257 Idea from Jim Fulton: an external lookup table of targets:
1259 I would like to specify the extension (e.g. .txt) [in the
1260 source, rather than ``filename.*``], but tell the converter to
1261 change references to the files anticipating that the files will
1266 .. _Another Document: another.txt
1268 rst2html.py --convert-links "another.txt bar.txt" foo.txt
1270 That is, name the files for which extensions should be converted.
1272 Note that I want to refer to original files in the original text
1273 (another.txt rather than another.txt) because I want the
1274 unconverted text to stand on its own.
1276 Note that in most cases, people will be able to use globs::
1278 rst2html.py --convert-link-extensions-for "`echo *.txt`" foo.txt
1280 It might be nice to be able to use multiple arguments, as in::
1282 rst2html.py --convert-link-extensions-for *.txt -- foo.txt
1284 | > Handle documents only, or objects
1285 | > (images, etc.) also?
1287 No, documents only, but there really is no need for guesswork.
1288 Just get the file names as command-line arguments. EIBTI
1289 [explicit is better than implicit].
1291 In `Patch #169`__ `Hyperlink extension rewriting`, John L. Clark
1292 suggests command line options that map to-be-changed file extensions, e.g.::
1294 rst2html --map-extension rst html --map-extension jpg png \
1297 __ https://sourceforge.net/p/docutils/patches/169/
1299 Specifying the mapping as regular expressions would make this
1300 approach more generic and easier to implement (use ``re.replace``
1301 and refer to the "re" module's documentation instead of coding and
1302 documenting a home-grown extraction and mapping procedure).
1308 Since Docutils 0.8, a "math" role and directive using LaTeX math
1309 syntax as input format is part of reStructuredText.
1313 * Use a "Transform" for math format conversions as extensively discussed in
1314 the "math directive issues" thread in May 2008
1315 (http://osdir.com/ml/text.docutils.devel/2008-05/threads.html)?
1317 * Generic `math-output setting`_ (currently specific to HTML).
1318 (List of math-output preferences?)
1320 * Try to be compatible with `Math support in Sphinx`_?
1322 * The ``:label:`` option selects a label for the equation, by which it
1323 can be cross-referenced, and causes an equation number to be issued.
1324 In Docutils, the option ``:name:`` sets the label.
1325 Equation numbering is not implemented yet.
1327 * Option ``:nowrap:`` prevents wrapping of the given math in a
1328 math environment (you have to specify the math environment in the
1331 .. _Math support in Sphinx: http://sphinx.pocoo.org/ext/math.html
1333 * Equation numbering and references. (see the section on
1334 `object numbering and object references` for equations,
1335 formal tables, and images.)
1337 .. _math-output setting: ../user/config.html#math-output
1340 alternative input formats
1341 `````````````````````````
1343 Use a directive option to specify an alternative input format, e.g. (but not
1347 Not for hand-written code but maybe usefull when pasted in (or included
1350 For an overview of MathML implementations and tests, see, e.g.,
1351 the `mathweb wiki`_ or the `ConTeXT MathML page`_.
1353 .. _MathML: http://www.w3.org/TR/MathML2/
1354 .. _mathweb wiki: http://www.mathweb.org/wiki/MathML
1355 .. _ConTeXT MathML page: http://wiki.contextgarden.net/MathML
1357 A MathML to LaTeX XSLT sheet:
1358 https://github.com/davidcarlisle/web-xslt/tree/master/pmml2tex
1362 Simple, ASCII based math input language (see also `ASCIIMath tutorial`_).
1364 * The Python module ASCIIMathML_ translates a string with ASCIIMath into a
1365 MathML tree. Used, e.g., by MultiMarkdown__.
1367 A more comprehensive implementation is ASCIIMathPython_ by
1368 Paul Trembley (also used in his sandbox projects).
1370 * For conversion to LaTeX, there is
1372 - a JavaScript script at
1373 http://dlippman.imathas.com/asciimathtex/ASCIIMath2TeX.js
1375 - The javascript `asciimath-to-latex` AsciiMath to LaTex converter at
1376 the node package manager
1377 https://www.npmjs.com/package/asciimath-to-latex
1378 and at GitHub https://github.com/tylerlong/asciimath-to-latex
1380 - a javascript and a PHP converter script at GitHub
1381 https://github.com/asciimath/asciimathml/tree/master/asciimath-based
1383 .. _ASCIIMath: http://www1.chapman.edu/~jipsen/mathml/asciimath.html
1384 .. _ASCIIMath tutorial:
1385 http://www.wjagray.co.uk/maths/ASCIIMathTutorial.html
1386 .. _ASCIIMathML: http://pypi.python.org/pypi/asciimathml/
1387 .. _ASCIIMathPython: http://sourceforge.net/projects/asciimathpython/
1388 __ http://fletcherpenney.net/multimarkdown/
1390 `Unicode Nearly Plain Text Encoding of Mathematics`_
1391 format for lightly marked-up representation of mathematical
1392 expressions in Unicode.
1394 (Unicode Technical Note. Sole responsibility for its contents rests
1395 with the author(s). Publication does not imply any endorsement by
1396 the Unicode Consortium.)
1398 .. _Unicode Nearly Plain Text Encoding of Mathematics:
1399 http://www.unicode.org/notes/tn28/
1402 See `the culmination of a relevant discussion in 2003
1403 <http://article.gmane.org/gmane.text.docutils.user/118>`__.
1410 Which equation environments should be supported by the math directive?
1414 + numbered: `equation`
1415 + unnumbered: `equation*`
1417 * multiline (test for ``\\`` outside of a nested environment
1418 (e.g. `array` or `cases`)
1420 + numbered: `align` (number every line)
1422 (To give one common number to all lines, put them in a `split`
1423 environment. Docutils then places it in an `equation` environment.)
1425 + unnumbered: `align*`
1427 + Sphinx math also supports `gather` (checking for blank lines in
1428 the content). Docutils puts content blocks separated by blank
1429 lines in separate math-block doctree nodes. (The only difference of
1430 `gather` to two consecutive "normal" environments seems to be that
1431 page-breaks between the two are prevented.)
1433 See http://www.math.uiuc.edu/~hildebr/tex/displays.html.
1439 There is no native math support in HTML.
1440 For supported math output variants see the `math-output setting`_.
1441 Add more/better alternatives?
1444 Converters from LaTeX to MathML include
1446 * TtM_ (C), ``--math-output=MathML ttm``, undocumented, may be removed.
1448 No "matrix", "align" and "cases" environments.
1451 * TeX4ht_ (TeX based)
1452 * itex_ (also `used in Abiword`__)
1453 * `Steve’s LATEX-to-MathML translator`_
1454 ('mini-language', javascript, Python)
1455 * `MathJax for Node`_
1457 * Write a new converter? E.g. based on:
1459 * a generic tokenizer (see e.g. a `latex-codec recipe`_,
1460 `updated latex-codec`_, )
1461 * the Unicode-Char <-> LaTeX mappings database unimathsymbols_
1463 __ http://msevior.livejournal.com/26377.html
1464 .. _MathML: http://www.w3.org/TR/MathML2/
1465 .. _ttm: http://hutchinson.belmont.ma.us/tth/mml/
1466 .. _TeX4ht: http://www.tug.org/applications/tex4ht/mn.html
1467 .. _MathToWeb: http://www.mathtoweb.com/
1468 .. _itex: http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html
1469 .. _Steve’s LATEX-to-MathML translator:
1470 http://www.gold-saucer.org/mathml/greasemonkey/dist/display-latex
1471 .. _latex-codec recipe:
1472 http://code.activestate.com/recipes/252124-latex-codec/
1473 .. _updated latex-codec:
1474 http://mirror.ctan.org/biblio/bibtex/utils/mab2bib/latex.py
1475 .. _unimathsymbols: http://milde.users.sourceforge.net/LUCR/Math/
1476 .. _MathJax for Node: https://github.com/mathjax/MathJax-node
1479 .. _itex: http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html
1483 format math in standard HTML enhanced by CSS rules
1484 (Overview__, `Examples and experiments`__).
1485 The ``math-output=html`` option uses the converter from eLyXer_
1486 (included with Docutils).
1488 Alternatives: LaTeX-math to HTML/CSS converters include
1491 * Hevea_ (Objective Caml)
1492 * `MathJax for Node`_
1494 __ http://www.cs.tut.fi/~jkorpela/math/
1495 __ http://www.zipcon.net/~swhite/docs/math/math.html
1496 .. _elyxer: http://elyxer.nongnu.org/
1497 .. _TtH: ttp://hutchinson.belmont.ma.us/tth/index.html
1498 .. _Hevea: http://para.inria.fr/~maranget/hevea/
1501 (PNG or SVG) like e.g. Wikipedia.
1504 * the pure-python MathML->SVG converter SVGMath_)
1505 * `MathJax for Node`_
1507 .. _dvisvgm: http://dvisvgm.sourceforge.net/
1508 .. _SVGMath: http://www.grigoriev.ru/svgmath/
1511 client side JavaScript conversion
1512 Use TeX notation in the web page and JavaScript in the displaying browser.
1513 (implemented as `math-output setting`_ "mathjax").
1515 * jqMath_ (faster and lighter than MathJax_)
1517 .. _MathJax: http://www.mathjax.org/
1518 .. _jqMath: http://mathscribe.com/author/jqmath.html
1523 * The `OpenDocument standard`_ version 1.1 says:
1525 Mathematical content is represented by MathML 2.0
1527 However, putting MathML into an ODP file seems tricky as these
1528 (maybe outdated) links suppose:
1529 http://idippedut.dk/post/2008/01/25/Do-your-math-ODF-and-MathML.aspx
1530 http://idippedut.dk/post/2008/03/03/Now-I-get-it-ODF-and-MathML.aspx
1532 .. _OpenDocument standard:
1533 http://www.oasis-open.org/standards#opendocumentv1.1
1535 * OOoLaTeX__: "a set of macros designed to bring the power of LaTeX
1538 __ http://ooolatex.sourceforge.net/
1544 Directives below are often referred to as "module.directive", the
1545 directive function. The "module." is not part of the directive name
1546 when used in a document.
1548 * Allow for field lists in list tables. See
1549 <http://thread.gmane.org/gmane.text.docutils.devel/3392>.
1553 Unify table implementations and unify options of table directives
1554 (http://article.gmane.org/gmane.text.docutils.user/1857).
1556 * Allow directives to be added at run-time?
1558 * Use the language module for directive option names?
1560 * Add "substitution_only" and "substitution_ok" function attributes,
1561 and automate context checking?
1563 * Implement options or features on existing directives:
1565 - All directives that produce titled elements should grow implicit
1566 reference names based on the titles.
1568 - Allow the _`:trim:` option for all directives when they occur in a
1569 substitution definition, not only the unicode_ directive.
1571 .. _unicode: ../ref/rst/directives.html#unicode-character-codes
1573 - Add the "class" option to the unicode_ directive. For example, you
1574 might want to get characters or strings with borders around them.
1576 - _`images.figure`: "title" and "number", to indicate a formal
1579 - _`parts.sectnum`: "local"?, "refnum"
1581 A "local" option could enable numbering for sections from a
1582 certain point down, and sections in the rest of the document are
1583 not numbered. For example, a reference section of a manual might
1584 be numbered, but not the rest. OTOH, an all-or-nothing approach
1585 would probably be enough.
1587 The "sectnum" directive should be usable multiple times in a
1588 single document. For example, in a long document with "chapter"
1589 and "appendix" sections, there could be a second "sectnum" before
1590 the first appendix, changing the sequence used (from 1,2,3... to
1591 A,B,C...). This is where the "local" concept comes in. This part
1592 of the implementation can be left for later.
1594 A "refnum" option (better name?) would insert reference names
1595 (targets) consisting of the reference number. Then a URL could be
1596 of the form ``http://host/document.html#2.5`` (or "2-5"?). Allow
1597 internal references by number? Allow name-based *and*
1598 number-based ids at the same time, or only one or the other (which
1599 would the table of contents use)? Usage issue: altering the
1600 section structure of a document could render hyperlinks invalid.
1602 - _`parts.contents`: Add a "suppress" or "prune" option? It would
1603 suppress contents display for sections in a branch from that point
1604 down. Or a new directive, like "prune-contents"?
1606 Add an option to include topics in the TOC? Another for sidebars?
1607 The "topic" directive could have a "contents" option, or the
1608 "contents" directive" could have an "include-topics" option. See
1609 docutils-develop 2003-01-29.
1611 - _`parts.header` & _`parts.footer`: Support multiple, named headers
1612 & footers? For example, separate headers & footers for odd, even,
1613 and the first page of a document.
1615 This may be too specific to output formats which have a notion of
1620 - Add a ``:parent:`` option for setting the parent's class
1621 (http://article.gmane.org/gmane.text.docutils.devel/3165).
1625 - Option to label lines?
1627 - How about an environment variable, say RSTINCLUDEPATH or
1628 RSTPATH, for standard includes (as in ``.. include:: <name>``)?
1629 This could be combined with a setting/option to allow
1630 user-defined include directories.
1632 - Add support for inclusion by URL? ::
1635 :url: http://www.example.org/inclusion.txt
1637 - Strip blank lines from begin and end of a literal included file or
1638 file section. This would correspond to the way a literal block is
1641 As nodes.literal_block expects (and we have) the text as a string
1642 (rather than a list of lines), using a regexp seems the way.
1644 - _`misc.raw`: add a "destination" option to the "raw" directive? ::
1651 It needs thought & discussion though, to come up with a consistent
1652 set of destination labels and consistent behavior.
1654 And placing HTML code inside the <head> element of an HTML
1655 document is rather the job of a templating system.
1657 - _`body.sidebar`: Allow internal section structure? Adornment
1658 styles would be independent of the main document.
1660 That is really complicated, however, and the document model
1661 greatly benefits from its simplicity.
1663 * Implement directives. Each of the list items below begins with an
1664 identifier of the form, "module_name.directive_function_name". The
1665 directive name itself could be the same as the
1666 directive_function_name, or it could differ.
1670 It has the disadvantage that it's only easily implementable for
1671 HTML, so it's specific to one output format.
1673 (For non-HTML writers, the imagemap would have to be replaced with
1676 - _`parts.endnotes` (or "footnotes"): See `Footnote & Citation Gathering`_.
1678 - _`parts.citations`: See `Footnote & Citation Gathering`_.
1680 - _`misc.language`: Specify (= change) the language of a document at
1683 * The misc.settings_ directive suggested below offers a more generic
1686 * The language of document parts can be indicated by the "special class
1687 value" ``"language-"`` + `BCP 47`_ language code. Class arguments to
1688 the title are attached to the document's base node - hence titled
1689 documents can be given a different language at parse time. However,
1690 "language by class attribute" does not change parsing (localized
1691 directives etc.), only supporting writers.
1693 .. _BCP 47: http://www.rfc-editor.org/rfc/bcp/bcp47.txt
1696 - _`misc.settings`: Set any(?) Docutils runtime setting from within
1697 a document? Needs much thought and discussion.
1699 Security concerns need to be taken into account (it shouldn't be
1700 possible to enable ``file_insertion_enabled`` from within a
1701 document), and settings that only would have taken effect before
1702 the directive (like ``tab-width``) shouldn't be accessible either.
1704 See this sub-thread:
1705 <http://thread.gmane.org/gmane.text.docutils.user/3620/focus=3649>
1707 - _`misc.gather`: Gather (move, or copy) all instances of a specific
1708 element. A generalization of the `Footnote & Citation Gathering`_
1711 - Add a custom "directive" directive, equivalent to "role"? For
1716 .. class:: incremental
1720 "``.. incr::``" above is equivalent to "``.. class:: incremental``".
1724 .. directive:: printed-links
1730 :class: print-inline
1732 This acts like macros. The directive contents will have to be
1733 evaluated when referenced, not when defined.
1735 * Needs a better name? "Macro", "substitution"?
1736 * What to do with directive arguments & options when the
1737 macro/directive is referenced?
1739 - Make the meaning of block quotes overridable? Only a 1-shot
1740 though; doesn't solve the general problem.
1742 - _`conditional directives`:
1744 .. note:: See also the implementation in Sphinx_.
1746 Docutils already has the ability to say "use this content for
1747 Writer X" via the "raw" directive. It also does have the ability
1748 to say "use this content for any Writer other than X" via the
1749 "strip-elements with class" config value. However, using "raw"
1750 input just to select a special writer is inconvenient in many
1752 It wouldn't be difficult to get more straightforward support, though.
1754 My first idea would be to add a set of conditional directives.
1755 Let's call them "writer-is" and "writer-is-not" for discussion
1756 purposes (don't worry about implemention details). We might
1759 .. writer-is:: text-only
1775 .. figure:: protocol_stack.eps
1777 .. writer-is-not:: text-only pdf
1779 .. figure:: protocol_stack.png
1781 This could be an interface to the Filter transform
1782 (docutils.transforms.components.Filter).
1784 The ideas in the `adaptable file extensions`_ section above may
1785 also be applicable here.
1787 SVG's "switch" statement may provide inspiration.
1789 Here's an example of a directive that could produce multiple
1790 outputs (*both* raw troff pass-through *and* a GIF, for example)
1791 and allow the Writer to select. ::
1798 %sum from i=o to inf c sup i~=~lim from {m -> inf}
1799 sum from i=0 to m sup i%
1804 - _`body.example`: Examples; suggested by Simon Hefti. Semantics as
1805 per Docbook's "example"; admonition-style, numbered, reference,
1806 with a caption/title.
1808 - _`body.index`: Index targets.
1810 See `Index Entries & Indexes
1811 <./rst/alternatives.html#index-entries-indexes>`__.
1813 - _`body.literal`: Literal block, possibly "formal" (see `object
1814 numbering and object references`_ above). Possible options:
1816 - "highlight" a range of lines
1818 - include only a specified range of lines
1820 - "number" or "line-numbers"? (since 0.9 available with "code" directive)
1822 - "styled" could indicate that the directive should check for
1823 style comments at the end of lines to indicate styling or
1826 Specific derivatives (i.e., a "python-interactive" directive)
1827 could interpret style based on cues, like the ">>> " prompt and
1828 "input()"/"raw_input()" calls.
1830 See docutils-users 2003-03-03.
1832 - _`body.listing`: Code listing with title (to be numbered
1833 eventually), equivalent of "figure" and "table" directives.
1835 - _`pysource.usage`: Extract a usage message from the program,
1836 either by running it at the command line with a ``--help`` option
1837 or through an exposed API. [Suggestion for Optik.]
1839 - _`body.float`: Generic float that can be used for figures, tables,
1840 code listings, flowcharts, ...
1842 There is a Sphinx extension by Ignacio Fernández Galván <jellby@gmail.com>
1844 I implemented something for generic floats in sphinx, and submitted a
1845 pull request that is still waiting::
1849 :caption: My caption
1851 https://github.com/sphinx-doc/sphinx/pull/1858
1857 Interpreted text is entirely a reStructuredText markup construct, a
1858 way to get around built-in limitations of the medium. Some roles are
1859 intended to introduce new doctree elements, such as "title-reference".
1860 Others are merely convenience features, like "RFC".
1862 All supported interpreted text roles must already be known to the
1863 Parser when they are encountered in a document. Whether pre-defined
1864 in core/client code, or in the document, doesn't matter; the roles
1865 just need to have already been declared. Adding a new role may
1866 involve adding a new element to the DTD and may require extensive
1867 support, therefore such additions should be well thought-out. There
1868 should be a limited number of roles.
1870 The only place where no limit is placed on variation is at the start,
1871 at the Reader/Parser interface. Transforms are inserted by the Reader
1872 into the Transformer's queue, where non-standard elements are
1873 converted. Once past the Transformer, no variation from the standard
1874 Docutils doctree is possible.
1876 An example is the Python Source Reader, which will use interpreted
1877 text extensively. The default role will be "Python identifier", which
1878 will be further interpreted by namespace context into <class>,
1879 <method>, <module>, <attribute>, etc. elements (see pysource.dtd),
1880 which will be transformed into standard hyperlink references, which
1881 will be processed by the various Writers. No Writer will need to have
1882 any knowledge of the Python-Reader origin of these elements.
1884 * Add explicit interpreted text roles for the rest of the implicit
1885 inline markup constructs: named-reference, anonymous-reference,
1886 footnote-reference, citation-reference, substitution-reference,
1887 target, uri-reference (& synonyms).
1889 * Add directives for each role as well? This would allow indirect
1892 This text contains |nested inline markup|.
1894 .. |nested inline markup| emphasis::
1896 nested ``inline`` markup
1900 - "_`raw-wrapped`" (or "_`raw-wrap`"): Base role to wrap raw text
1901 around role contents.
1903 For example, the following reStructuredText source ... ::
1905 .. role:: red(raw-formatting)
1907 :html: <font color="red">
1908 :latex: {\color{red}
1915 ... will yield the following document fragment::
1919 <inline classes="red">
1922 <raw format="latex">
1924 <inline classes="red">
1928 <raw format="latex">
1931 Possibly without the intermediate "inline" node.
1933 - _`"acronym" and "abbreviation"`: Associate the full text with a
1934 short form. Jason Diamond's description:
1936 I want to translate ```reST`:acronym:`` into ``<acronym
1937 title='reStructuredText'>reST</acronym>``. The value of the
1938 title attribute has to be defined out-of-band since you can't
1939 parameterize interpreted text. Right now I have them in a
1940 separate file but I'm experimenting with creating a directive
1941 that will use some form of reST syntax to let you define them.
1943 Should Docutils complain about undefined acronyms or
1946 What to do if there are multiple definitions? How to
1947 differentiate between CSS (Content Scrambling System) and CSS
1948 (Cascading Style Sheets) in a single document? David Priest
1951 The short answer is: you don't. Anyone who did such a thing
1952 would be writing very poor documentation indeed. (Though I
1953 note that `somewhere else in the docs`__, there's mention of
1954 allowing replacement text to be associated with the
1955 abbreviation. That takes care of the duplicate
1956 acronyms/abbreviations problem, though a writer would be
1957 foolish to ever need it.)
1959 __ `inline parameter syntax`_
1961 How to define the full text? Possibilities:
1963 1. With a directive and a definition list? ::
1970 Docstring Processing System
1972 Would this list remain in the document as a glossary, or would
1973 it simply build an internal lookup table? A "glossary"
1974 directive could be used to make the intention clear.
1975 Acronyms/abbreviations and glossaries could work together.
1977 Then again, a glossary could be formed by gathering individual
1978 definitions from around the document.
1980 2. Some kind of `inline parameter syntax`_? ::
1982 `reST <reStructuredText>`:acronym: is `WYSIWYG <what you
1983 see is what you get>`:acronym: plaintext markup.
1985 .. _inline parameter syntax:
1986 rst/alternatives.html#parameterized-interpreted-text
1988 3. A combination of 1 & 2?
1990 The multiple definitions issue could be handled by establishing
1991 rules of priority. For example, directive-based lookup tables
1992 have highest priority, followed by the first inline definition.
1993 Multiple definitions in directive-based lookup tables would
1994 trigger warnings, similar to the rules of `implicit hyperlink
1997 __ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
1999 4. Using substitutions? ::
2001 .. |reST| acronym:: reST
2002 :text: reStructuredText
2004 What do we do for other formats than HTML which do not support
2005 tool tips? Put the full text in parentheses?
2007 - "figure", "table", "listing", "chapter", "page", etc: See `object
2008 numbering and object references`_ above.
2010 - "glossary-term": This would establish a link to a glossary. It
2011 would require an associated "glossary-entry" directive, whose
2012 contents could be a definition list::
2021 This would allow entries to be defined anywhere in the document,
2022 and collected (via a "glossary" directive perhaps) at one point.
2028 [DG 2017-01-02: These are not definitive to-dos, just one developer's
2029 opinion. Added 2009-10-13 by Günter Milde, in r6178.]
2030 [Updated by GM 2017-02-04]
2032 The number of doctree nodes can be reduced by "normalizing" some related
2033 nodes. This makes the document model and the writers somewhat simpler.
2035 * The "doctest" element can be replaced by literal blocks with a class
2036 attribute (similar to the "code" directive output).
2037 The syntax shall be left in reST.
2039 [DG 2017-01-02:] +0.
2042 The syntax could be left in reST (for a set period of time?).
2044 [DG 2017-01-02:] The syntax must be left in reST, practically
2045 forever. Removing it would introduce a huge backwards
2046 incompatibility. Any syntax removal must be preceded by a thorough
2047 review and planning, including a deprecation warning process. My
2048 opinion: it's not worth it.
2050 * "Normalize" special admonitions (note, hint, warning, ...) during parsing
2051 (similar to _`transforms.writer_aux.Admonitions`). There is no need to
2052 keep them as distinct elements in the doctree specification.
2054 [DG 2017-01-02:] -1: <note>{body}</> is much more concise and
2055 expressive than <admonition><title>Note</>{body}</>, and the title
2056 translation can be put off until much later in the process.
2060 -0 for <admonition class=note><title>Note</>... instead of <note>:
2061 a document is rarely printed/used as doctree or XML.
2063 +1 reduce the complexity of the doctree
2064 (there is no 1:1 rST syntax element <-> doctree node mapping anyway).
2066 +2 every writer needs 9 visit_*/depart_* method pairs to handle the 9
2067 subtypes of an admonition, i.e. we could but also remove 36 redundant
2068 methods (HTML, LaTeX, Manpage, ODF).
2070 -1 the most unfortunately named of these directives will survive. [#]_
2072 .. [#] with "biblical touch" and hard to translate:
2074 :admonition: | Ermahnung; Verweis; Warnung; Rüge
2075 | (exhortation; censure; warning; reprimand, rebuke)
2078 Keep the special admonition directives in reStructuredText syntax.
2080 [DG 2017-01-02:] We must definitely keep the syntax. Removing it
2081 would introduce a huge backwards incompatibility.
2084 Unimplemented Transforms
2085 ========================
2087 * _`Footnote & Citation Gathering`
2089 Collect and move footnotes & citations to the end of a document or the
2090 place of a "footnotes" or "citations" directive
2091 (see `<./ref/rst/directives.html>_`)
2094 Collect all footnotes that are referenced in the document before the
2095 directive (and after an eventually preceding ``.. footnotes::``
2096 directive) and insert at this place.
2098 Allows "endnotes" at a configurable place.
2101 Collect citations that are referenced ...
2105 a) defined in the document as citation elements
2107 b) auto-generated from entries in a bibliographic database.
2109 + based on bibstuff_?
2110 + also have a look at
2112 * CrossTeX_, a backwards-compatible, improved bibtex
2113 re-implementation in Python (including HTML export).
2114 (development stalled since 2 years)
2116 * Pybtex_,a drop-in replacement for BibTeX written in Python.
2118 * BibTeX styles & (experimental) pythonic style API.
2119 * Database in BibTeX, BibTeXML and YAML formats.
2120 * full Unicode support.
2121 * Write to TeX, HTML and plain text.
2123 * `Zotero plain <http://e6h.org/%7Eegh/hg/zotero-plain/>`__
2124 supports Zotero databases and CSL_ styles with Docutils with an
2127 * `sphinxcontrib-bibtex`_ Sphinx extension with "bibliography"
2128 directive and "cite" role supporting BibTeX databases.
2130 * `Modified rst2html
2131 <http://www.loria.fr/~rougier/coding/article/rst2html.py>`__ by
2135 * Automatically insert a "References" heading?
2137 .. _CrossTeX: http://www.cs.cornell.edu/people/egs/crosstex/
2138 .. _Pybtex: http://pybtex.sourceforge.net/
2139 .. _CSL: http://www.citationstyles.org/
2140 .. _sphinxcontrib-bibtex: http://sphinxcontrib-bibtex.readthedocs.org/
2142 * _`Reference Merging`
2144 When merging two or more subdocuments (such as docstrings),
2145 conflicting references may need to be resolved. There may be:
2147 * duplicate reference and/or substitution names that need to be made
2149 * duplicate footnote numbers that need to be renumbered.
2151 Should this be done before or after reference-resolving transforms
2152 are applied? What about references from within one subdocument to
2155 * _`Document Splitting`
2157 If the processed document is written to multiple files (possibly in
2158 a directory tree), it will need to be split up. Internal references
2159 will have to be adjusted.
2161 (HTML only? Initially, yes. Eventually, anything should be
2166 - Insert a "destination" attribute into the root element of each
2167 split-out document, containing the path/filename. The Output
2168 object or Writer will recognize this attribute and split out the
2169 files accordingly. Must allow for common headers & footers,
2170 prev/next, breadcrumbs, etc.
2172 - Transform a single-root document into a document containing
2173 multiple subdocuments, recursively. The content model of the
2174 "document" element would have to change to::
2177 ( (title, subtitle?)?,
2179 (docinfo, transition?)?,
2183 (I.e., add the last line -- 0 or more document elements.)
2185 Let's look at the case of hierarchical (directories and files)
2186 HTML output. Each document element containing further document
2187 elements would correspond to a directory (with an index.html file
2188 for the content preceding the subdocuments). Each document
2189 element containing no subdocuments (i.e., structure model elements
2190 only) corresponds to a concrete file with no directory.
2192 The natural transform would be to map sections to subdocuments,
2193 but possibly only a given number of levels deep.
2197 If a document is split up, each segment will need navigation links:
2198 parent, children (small TOC), previous (preorder), next (preorder).
2199 Part of `Document Splitting`_?
2201 * _`List of System Messages`
2203 The ``system_message`` elements are inserted into the document tree,
2204 adjacent to the problems themselves where possible. Some (those
2205 generated post-parse) are kept until later, in
2206 ``document.messages``, and added as a special final section,
2207 "Docutils System Messages".
2209 Docutils could be made to generate hyperlinks to all known
2210 system_messages and add them to the document, perhaps to the end of
2211 the "Docutils System Messages" section.
2213 Fred L. Drake, Jr. wrote:
2215 I'd like to propose that both parse- and transformation-time
2216 messages are included in the "Docutils System Messages" section.
2217 If there are no objections, I can make the change.
2219 The advantage of the current way of doing things is that parse-time
2220 system messages don't require a transform; they're already in the
2221 document. This is valuable for testing (unit tests,
2222 tools/quicktest.py). So if we do decide to make a change, I think
2223 the insertion of parse-time system messages ought to remain as-is
2224 and the Messages transform ought to move all parse-time system
2225 messages (remove from their originally inserted positions, insert in
2226 System Messages section).
2228 * _`Index Generation`
2234 * Make it easier to find out fragment names (#foo-bar) of ``_`inline
2235 targets```. Currently you have to either look at the source or
2238 For example, we could add support for self-referencing targets
2239 (i.e. inline targets would [unobtrusively] link to themselves, so
2240 that you can just click them and then copy the address). Or we
2241 could add support for titles that display the fragment name (as in
2242 <http://subversion.tigris.org/mailing-list-guidelines.html>; just
2243 hover the paragraphs).
2245 Either way it should be optional and deactivated by default.
2247 This would be useful for documents like Docutils' bug list or to-do
2250 * Make the _`list compacting` logic more generic: For example, allow
2251 for literal blocks or line blocks inside of compact list items.
2253 This is not implementable as long as list compacting is done by
2254 omitting ``<p>`` tags. List compacting would need to be done by
2255 adjusting CSS margins instead.
2257 :2015-04-02: The new html writer no longer strips <p> tags but adds the
2258 class value ``simple`` to the list.
2259 Formatting is done by CSS --- configurable by a custom style
2262 Auto-compactization can be overridden by the ``open`` vs.
2263 ``compact`` class arguments.
2265 * Idea for field-list rendering: hanging indent::
2267 Field name (bold): First paragraph of field body begins
2268 with the field name inline.
2270 If the first item of a field body is not a paragraph,
2271 it would begin on the following line.
2273 :2015-04-02: The new html writer writes field-lists as definition lists
2274 with class ``field-list``.
2275 Formatting is done by CSS --- configurable by a custom style
2276 sheet. The default style sheet has some examples, including a
2277 run-in field-list style.
2279 * Add more support for <link> elements, especially for navigation
2282 The framework does not have a notion of document relationships, so
2283 probably raw.destination_ should be used.
2285 We'll have framework support for document relationships when support
2286 for `multiple output files`_ is added. The HTML writer could
2287 automatically generate <link> elements then.
2289 .. _raw.destination: misc.raw_
2291 * Base list compaction on the spacing of source list? Would require
2292 parser support. (Idea: fantasai, 16 Dec 2002, doc-sig.)
2294 * Add a tool tip ("title" attribute?) to footnote back-links
2295 identifying them as such. Text in Docutils language module.
2301 * Remove the generic style information (duplicated from html4css1.css)
2302 from pep.css to avoid redundancy.
2304 Set ``stylesheet-path`` to "html4css.css,pep.css" and the
2305 ``stylesheet-dirs`` accordingly instead. (See the xhtml11 writer for an
2312 * Add a way to begin an untitled slide.
2314 * Add a way to begin a new slide, continuation, using the same title
2315 as the previous slide? (Unnecessary?) You need that if you have a
2316 lot of items in one section which don't fit on one slide.
2318 Maybe either this item or the previous one can be realized using
2321 * Have a timeout on incremental items, so the colour goes away after 1
2324 * Add an empty, black last slide (optionally). Currently the handling
2325 of the last slide is not very nice, it re-cycles through the
2326 incremental items on the last slide if you hit space-bar after the
2329 * Add a command-line option to disable advance-on-click.
2331 * Add a speaker's master document, which would contain a small version
2332 of the slide text with speaker's notes interspersed. The master
2333 document could use ``target="whatever"`` to direct links to a
2334 separate window on a second monitor (e.g., a projector).
2336 .. Note:: This item and the following items are partially
2337 accomplished by the S5 1.2 code (currently in alpha), which has
2338 not yet been integrated into Docutils.
2340 * Speaker's notes -- how to intersperse? Could use reST comments
2341 (".."), but make them visible in the speaker's master document. If
2342 structure is necessary, we could use a "comment" directive (to avoid
2343 nonsensical DTD changes, the "comment" directive could produce an
2344 untitled topic element).
2346 The speaker's notes could (should?) be separate from S5's handout
2349 * The speaker's master document could use frames for easy navigation:
2350 TOC on the left, content on the right.
2352 - It would be nice if clicking in the TOC frame simultaneously
2353 linked to both the speaker's notes frame and to the slide window,
2354 synchronizing both. Needs JavaScript?
2356 - TOC would have to be tightly formatted -- minimal indentation.
2358 - TOC auto-generated, as in the PEP Reader. (What if there already
2359 is a "contents" directive in the document?)
2361 - There could be another frame on the left (top-left or bottom-left)
2362 containing a single "Next" link, always pointing to the next slide
2363 (synchronized, of course). Also "Previous" link? FF/Rew go to
2364 the beginning of the next/current parent section? First/Last
2365 also? Tape-player-style buttons like ``|<< << < > >> >>|``?
2370 Add epub as an output format.
2372 epub is an open file format for ebooks based on HTML, specified by the
2373 `International Digital Publishing Forum`_. Thus, documents in epub
2374 format are suited to be read with `electronic reading devices`_.
2376 Pack the output of a HTML writer and supporting files (e.g. images)
2377 into one single epub document.
2379 There are `links to two 3rd party ePub writers`__ in the Docutils link list.
2380 Test and consider moving the better one into the docutils core.
2382 __ ../user/links.html#ePub
2383 .. _International Digital Publishing Forum: http://www.idpf.org/
2384 .. _electronic reading devices:
2385 http://en.wikipedia.org/wiki/List_of_e-book_readers
2391 Also see the Problems__ section in the `latex writer documentation`_.
2393 __ ../user/latex.html#problems
2395 .. _latex writer documentation: ../user/latex.html
2398 ../../../sandbox/latex-variants/README.html
2403 * Too deeply nested lists fail: generate a warning and provide
2406 2017-02-09 this is fixed for enumeration in 0.13.1
2408 for others, cf. sandbox/latex-variants/tests/rst-levels.txt
2410 * File names of included graphics (see also `grffile` package).
2412 * Paragraph following field-list or table in compound is indented.
2414 This is a problem with the current DUfieldlist definition and with
2415 the use of "longtable" for tables.
2416 See `LaTeX constructs and packages instead of re-implementations`_ for
2420 Generate clean and configurable LaTeX source
2421 ----------------------------------------------
2423 * Check the generated source with package `nag`.
2425 Configurable placement of figure and table floats
2426 `````````````````````````````````````````````````
2428 * Special class argument to individually place figures?
2432 placement-<optional arg> -> \figure[<optional arg>]{...}
2434 e.g. ``.. class:: placement-htb``,
2439 :h: place-here-if-possible
2442 :p: place-on-extra-page
2444 e.g.: ``.. class:: place-here-if-possible place-top place-bottom``
2446 Maybe support both variants?
2449 LaTeX constructs and packages instead of re-implementations
2450 ```````````````````````````````````````````````````````````
2452 Which packages do we want to use?
2454 + base and "recommended" packages
2456 (packages that should be in a "reasonably sized and reasonably modern
2457 LaTeX installation like the `texlive-latex-recommended` Debian package,
2460 + No "fancy" or "exotic" requirements.
2462 + pointers to advanced packages and their use in the `latex writer
2467 + True footnotes with LaTeX auto-numbering (as option ``--latex-footnotes``)
2468 (also for target-footnotes):
2470 - attach footnote text to footnote-symobol node
2471 - write \footnote{<footnote text>}
2472 - consider cases where LaTeX does not support footnotes
2473 (inside tables, headings, ...)?
2474 - consider multiple footnote refs to common footnote text.
2478 If the symbol you want is not one of the ones listed, you'll need to
2479 redefine ``\@fnsymbol`` and add it, e.g. perhaps like::
2481 \def\@fnsymbol#1{\ifcase#1\hbox{}\or *\or \dagger\or \ddagger\or
2482 \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger \or
2483 \ddagger\ddagger \or \mathchar"27C \else\@ctrerr\fi\relax}
2485 which would allow \symbolfootnote[10]{footnote} to have a club as its
2488 + document customization (links to how-to and packages):
2490 .. Footnote packages:
2492 :footnote: texlive-latex-recommended % savenotes environment
2493 :footmisc: texlive-latex-extra % formatting options
2494 :manyfoot: texlive-latex-extra
2495 :bigfoot: texlive-latex-extra
2496 :perpage: texlive-latex-extra
2497 :ftnxtra: new on CTAN
2498 fixes the issue of footnote inside \caption{},
2499 tabular environment and \section{} like commands.
2503 http://www2.informatik.hu-berlin.de/~ahamann/studies/footnotes.pdf
2507 `Footnotes whose texts are identical
2508 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=repfootnote>`__
2510 * label per hand or use footmisc
2512 `More than one sequence of footnotes
2513 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multfoot>`__
2517 `Footnotes in tables
2518 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footintab>`__
2520 * `tabularx` and longtable allow footnotes.
2521 * `footnote` provides a "savenotes" environment which collects all
2522 footnotes and emits them at ``end{savenotes}``
2524 `Footnotes in LaTeX section headings
2525 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftnsect>`__
2527 * Take advantage of the fact that the mandatory argument doesn't
2528 move if the optional argument is present::
2530 \section[title] {title\footnote{title ftnt}}
2532 * Use the footmisc package, with package option stable - this modifies
2533 footnotes so that they softly and silently vanish away if used in a
2538 `Footnotes numbered per page
2539 <http://www.tex.ac.uk/cgi-bin/texfaq2html?label=footnpp>`__
2541 * perpage provides a general mechanism for resetting counters per page
2542 * footmisc provides a package option perpage
2544 * use `eqlist` or `enumitem` (texlive-latex-extra) for field-lists?
2546 * ``--use-latex-when-possible`` »super option« that would set the
2549 --no-section-numbering
2552 --use-latex-abstract
2553 --use-latex-footnotes
2554 --use-latex-citations
2556 ? (My preference is to default to use-latex-* whenever possible [GM])
2562 * Use italic instead of slanted for titlereference?
2564 * Start a new paragraph after lists (as currently)
2565 or continue (no blank line in source, no parindent in output)?
2569 * continue if the `compound paragraph`_ directive is used (as currently),
2571 * force a new paragraph with an empty comment.
2573 * Sidebar handling (environment with `framed`, `marginnote`, `wrapfig`,
2576 * Use optionlist for docinfo?
2578 * Keep literal-blocks together on a page, avoid pagebreaks.
2580 Failed experiments up to now: samepage, minipage, pagebreak 1 to 4 before
2583 Should be possible with ``--literal-block-env==lstlistings`` and some
2586 * More space between title and subtitle? ::
2589 + \\[0.5em] % subtitle%
2591 .. _PSNFSS documentation:
2592 http://mirror.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf
2593 .. _compound paragraph:
2594 ../ref/rst/directives.html#compound-paragraph
2596 http://mirror.ctan.org/help/Catalogue/entries/fixltx2e.html
2601 * Improve/simplify logic to set the column width in the output.
2603 + Assumed reST line length for table width setting configurable, or
2604 + use `ltxtable` (a combination of `tabularx` (auto-width) and
2605 `longtable` (page breaks)), or
2606 + use tabularx column type ``X`` and let LaTeX decide width, or
2610 http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tabulary
2612 * From comp.text.tex (13. 4. 2011):
2614 When using fixed width columns, you should ensure that the total
2615 width does not exceed \linewidth: if the first column is p{6cm}
2616 the second one should be p{\dimexpr\linewidth-6cm-4\tabcolsep}
2617 because the glue \tabcolsep is added twice at every column edge.
2618 You may also consider to set \tabcolsep to a different value...
2620 * csv-tables do not have a colwidth.
2622 * Add more classes or options, e.g. for
2624 + horizontal alignment and rules.
2625 + long table vs. tabular (see next item).
2627 * Use tabular instead of longtable for tables in legends or generally
2630 Alternatively, default to tabular and use longtable only if specified
2631 by config setting or class argument (analogue to booktable)?
2633 * Table heads and footer for longtable (firstpage lastpage ..)?
2635 * In tools.txt the option tables right column, there should be some more
2636 spacing between the description and the next paragraph "Default:".
2638 * Paragraph separation in tables is hairy.
2639 see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=struttab
2641 - The strut solution did not work.
2642 - setting extrarowheight added ad top of row not between paragraphs in
2643 a cell. ALTHOUGH i set it to 2pt because, text is too close to the topline.
2644 - baselineskip/stretch does not help.
2646 * Should there be two hlines after table head and on table end?
2648 * Place titled tables in a float ('table' environment)?
2650 The 'table', 'csv-table', and 'list-table' directives support an (optional)
2651 table title. In analogy to the 'figure' directive this should map to a
2654 Image and figure directives
2655 ```````````````````````````
2657 * compare the test case in:
2659 + `<../../test/functional/input/data/standard.txt>`__
2660 + `<../../test/functional/expected/standalone_rst_html4css1.html>`__
2661 + `<../../test/functional/expected/standalone_rst_latex.tex>`__
2663 * The default CSS styling for HTML output (plain.css, default.css) lets
2664 text following a right- or left-aligned image float to the side of the
2667 + Use this default also for LaTeX?
2669 + Wrap text around figures/images with class argument "wrap"
2670 (like the odt writer)?
2672 Use `wrapfig` (or other recommended) package.
2674 * support more graphic formats (especially SVG, the only standard
2675 vector format for HTML)
2681 * support "figwidth" argument for figures.
2683 As the 'figwidth' argument is still ignored and the "natural width" of
2684 a figure in LaTeX is 100 % of the text width, setting the 'align'
2685 argument has currently no effect on the LaTeX output.
2688 * Let `meta` directive insert PDF-keywords into header?
2690 See https://tex.stackexchange.com/questions/26529/how-can-i-generate-pdf-metadata-from-latex#26530
2691 https://tex.stackexchange.com/questions/161094/adding-custom-metadata-values-to-a-pdf-file
2695 * Multiple author entries in docinfo (same thing as in html).
2697 * Consider supporting the "compact" option and class argument (from
2698 rst2html) as some lists look better compact and others need the space.
2700 * Better citation support
2701 (see `Footnote & Citation Gathering`_).
2703 * If ``use-latex-citations`` is used, a bibliography is inserted right at the
2704 end of the document.
2706 Put in place of the to-be-implemented "citations" directive
2707 (see `Footnote & Citation Gathering`_).
2713 The `LyX <http://www.lyx.org>`_ document processor has a comprehensive
2714 Unicode to LaTeX conversion feature with a file called ``unicodesymbols``
2715 that lists LaTeX counterparts for a wide range of Unicode characters.
2717 * Use this in the LaTeXTranslator?
2718 Think of copyright issues!
2720 * The "ucs" package has many translations in ...doc/latex/ucs/config/
2722 * The bibstuff_ tool ships a `latex_codec` Python module!
2724 .. _bibstuff: http://code.google.com/p/bibstuff/
2726 Allow choice between utf8 (standard) and utf8x (extended) encodings
2727 ```````````````````````````````````````````````````````````````````
2729 * Allow the user to select *utf8* or *utf8x* LaTeX encoding. (Docutil's
2730 output encoding becomes LaTeX's input encoding.)
2732 The `ucs` package provides extended support for UTF-8 encoding in LaTeX
2733 via the `inputenc`-option ``utf8x``. It is, however, a non-standard
2734 extension and no longer developed.
2737 a) Python has 4 names for the UTF-8 encoding (``utf_8, U8, UTF, utf8``)
2738 give a special meaning to one of the aliases,
2740 b) scan "stylesheets" and "latex-preamble" options and use ``utf8x``
2741 if it contains ``ucs``
2746 * Glyphs missing in the font are left out in the PDF without warning
2747 (e.g. ⇔ left-right double arrow in the functional test output).
2749 * Disable word-wrap (hyphenation) in literal text locally with
2750 ``providecommand{\nohyphenation}{\addfontfeatures{HyphenChar=None}}``?
2756 * ^^ LaTeX's special syntax for characters results in "strange" replacements
2757 (both with \href and \url).
2759 `file with ^^ <../strange^^name>`__:
2760 `<../strange^^name>`__
2762 * Unbalanced braces, { or }, will fail (both with \href and \url)::
2764 `file with { <../strange{name>`__
2765 `<../strange{name>`__
2767 Currently, a warning is written to the error output stream.
2769 For correct printing, we can
2771 * use the \href command with "normal" escaped name argument, or
2772 * define a url-command in the preamble ::
2774 \urldef{\fragileURLi}\nolinkurl{myself%node@gateway.net}
2776 but need to find a way to insert it as href argument.
2778 The following fails::
2780 \href{http://www.w3.org/XML/Schema^^dev}{\fragileURLi}
2782 Use %-replacement like http://nowhere/url_with%28parens%29 ?
2784 -> does not work for file paths (with pdflatex and xpdf).
2787 add-stylesheet option
2788 `````````````````````
2790 From http://article.gmane.org/gmane.text.docutils.devel/3429/
2792 The problem is that since we have a default value, we have to
2793 differentiate between adding another stylesheet and replacing the
2794 default. I suggest that the existing --stylesheet & --stylesheet-path
2795 options keep their semantics to replace the existing settings. We
2796 could introduce new --add-stylesheet & --add-stylesheet-path options,
2797 which accumulate; further --stylesheet/--stylesheet-path options would
2798 clear these lists. The stylesheet or stylesheet_path setting (only
2799 one may be set), plus the added_stylesheets and added_stylesheet_paths
2800 settings, describe the combined styles.
2802 For example, this run will have only one custom stylesheet:
2804 rstpep2html.py --stylesheet-path custom.css ...
2806 This run will use the default stylesheet, and the custom one:
2808 rstpep2html.py --add-stylesheet-path custom.css ...
2810 This run will use the default stylesheet, a custom local stylesheet,
2811 and an external stylesheet:
2813 rstpep2html.py --add-stylesheet-path custom.css \
2814 --add-stylesheet http://www.example.org/external.css ...
2816 This run will use only the second custom stylesheet:
2818 rstpep2html.py --add-stylesheet-path custom.css \
2819 --stylesheet-path second.css ...
2827 * What about if we don't know which Reader and/or Writer we are
2828 going to use? If the Reader/Writer is specified on the
2829 command-line? (Will this ever happen?)
2831 Perhaps have different types of front ends:
2833 a) _`Fully qualified`: Reader and Writer are hard-coded into the
2834 front end (e.g. ``pep2html [options]``, ``pysource2pdf
2837 b) _`Partially qualified`: Reader is hard-coded, and the Writer is
2838 specified a sub-command (e.g. ``pep2 html [options]``,
2839 ``pysource2 pdf [options]``). The Writer is known before option
2840 processing happens, allowing the OptionParser to be built
2841 dynamically. Alternatively, the Writer could be hard-coded and
2842 the Reader specified as a sub-command (e.g. ``htmlfrom pep
2845 c) _`Unqualified`: Reader and Writer are specified as subcommands
2846 (e.g. ``publish pep html [options]``, ``publish pysource pdf
2847 [options]``). A single front end would be sufficient, but
2848 probably only useful for testing purposes.
2850 d) _`Dynamic`: Reader and/or Writer are specified by options, with
2851 defaults if unspecified (e.g. ``publish --writer pdf
2852 [options]``). Is this possible? The option parser would have
2853 to be told about new options it needs to handle, on the fly.
2854 Component-specific options would have to be specified *after*
2855 the component-specifying option.
2857 Allow common options before subcommands, as in CVS? Or group all
2858 options together? In the case of the `fully qualified`_
2859 front ends, all the options will have to be grouped together
2860 anyway, so there's no advantage (we can't use it to avoid
2861 conflicts) to splitting common and component-specific options
2864 * Parameterize help text & defaults somehow? Perhaps a callback? Or
2865 initialize ``settings_spec`` in ``__init__`` or ``init_options``?
2867 * Disable common options that don't apply?
2868 (This should now be easier with ``frontend.filter_settings_spec``.)
2870 * Add ``--section-numbering`` command line option. The "sectnum"
2871 directive should override the ``--no-section-numbering`` command
2874 * Create a single dynamic_ or unqualified_ front end that can be
2877 The "new" `argparse` module supports `partial parsing`_, so a
2878 generic front end may parse and remove additional options to select
2879 the reader/parser/writer and leave the remaining arguments intact
2880 for ``publish_cmdline()``.
2882 .. _partial parsing:
2883 https://docs.python.org/3/library/argparse.html#partial-parsing
2885 .. _configuration: ../user/config.html
2891 indent-tabs-mode: nil
2892 sentence-end-double-space: t