~ubuntu-branches/ubuntu/karmic/python-docutils/karmic

« back to all changes in this revision

Viewing changes to docs/dev/todo.txt

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
======================
 
2
 Docutils_ To Do List
 
3
======================
 
4
 
 
5
:Author: David Goodger (with input from many); open to all Docutils
 
6
         developers
 
7
:Contact: goodger@python.org
 
8
:Date: $Date: 2005-12-23 00:46:16 +0100 (Fri, 23 Dec 2005) $
 
9
:Revision: $Revision: 4229 $
 
10
:Copyright: This document has been placed in the public domain.
 
11
 
 
12
.. _Docutils: http://docutils.sourceforge.net/
 
13
 
 
14
.. contents::
 
15
 
 
16
 
 
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.
 
20
 
 
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|
 
25
 
 
26
.. |donate| image:: http://images.sourceforge.net/images/project-support.jpg
 
27
   :target: http://sourceforge.net/donate/index.php?group_id=38414
 
28
   :align: middle
 
29
   :width: 88
 
30
   :height: 32
 
31
   :alt: Support the Docutils project!
 
32
 
 
33
Please see also the Bugs_ document for a list of bugs in Docutils.
 
34
 
 
35
.. _bugs: ../../BUGS.html
 
36
 
 
37
 
 
38
Release 0.4
 
39
===========
 
40
 
 
41
We should get Docutils 0.4 out soon, but we shouldn't just cut a
 
42
"frozen snapshot" release.  Here's a list of features (achievable in
 
43
the short term) to include:
 
44
 
 
45
* [DONE in rev. 3901] Move support files to docutils/writers/support.
 
46
 
 
47
* [DONE in rev. 4163] Convert ``docutils/writers/support/*`` into
 
48
  individual writer packages.
 
49
 
 
50
* [DONE in rev. 3901] Remove docutils.transforms.html.StylesheetCheck
 
51
  (no longer needed because of the above change).
 
52
 
 
53
* [DONE in rev. 3962] Incorporate new branch policy into the docs.
 
54
  ("Development strategy" thread on Docutils-develop)
 
55
 
 
56
* [DONE in rev. 4152] Added East-Asian double-width character support.
 
57
 
 
58
* [DONE in rev. 4156] Merge the S5 branch.
 
59
 
 
60
Anything else?
 
61
 
 
62
Once released,
 
63
 
 
64
* Tag it and create a maintenance branch (perhaps "maint-0-4").
 
65
 
 
66
* Declare that:
 
67
 
 
68
  - Docutils 0.4.x is the last version that will support Python 2.1
 
69
    (and perhaps higher?)
 
70
 
 
71
  - Docutils 0.4.x is the last version that will support (make
 
72
    compromises for) Netscape Navigator 4
 
73
 
 
74
 
 
75
Minimum Requirements for Python Standard Library Candidacy
 
76
==========================================================
 
77
 
 
78
Below are action items that must be added and issues that must be
 
79
addressed before Docutils can be considered suitable to be proposed
 
80
for inclusion in the Python standard library.
 
81
 
 
82
* Support for `document splitting`_.  May require some major code
 
83
  rework.
 
84
 
 
85
* Support for subdocuments (see `large documents`_).
 
86
 
 
87
* `Object numbering and object references`_.
 
88
 
 
89
* `Nested inline markup`_.
 
90
 
 
91
* `Python Source Reader`_.
 
92
 
 
93
* The HTML writer needs to be rewritten (or a second HTML writer
 
94
  added) to allow for custom classes, and for arbitrary splitting
 
95
  (stack-based?).
 
96
 
 
97
* Documentation_ of the architecture.  Other docs too.
 
98
 
 
99
* Plugin support.
 
100
 
 
101
* A LaTeX writer making use of (La)TeX's power, so that the rendering
 
102
  of the resulting documents is more easily customizable.  (Similar to
 
103
  what you wrote about a new HTML Writer.)
 
104
 
 
105
* Suitability for `Python module documentation
 
106
  <http://docutils.sf.net/sandbox/README.html#documenting-python>`_.
 
107
 
 
108
 
 
109
General
 
110
=======
 
111
 
 
112
* Allow different report levels for STDERR and system_messages inside
 
113
  the document?
 
114
 
 
115
* Change the docutils-update script (in sandbox/infrastructure), to
 
116
  support arbitrary branch snapshots.
 
117
 
 
118
* Add a generic "container" element, equivalent to "inline", to which
 
119
  a "class" attribute can be attached.  Will require a reST directive
 
120
  also.
 
121
 
 
122
* Move some general-interest sandboxes out of individuals'
 
123
  directories, into subprojects?
 
124
 
 
125
* Add option for file (and URL) access restriction to make Docutils
 
126
  usable in Wikis and similar applications.
 
127
 
 
128
  2005-03-21: added ``file_insertion_enabled`` & ``raw_enabled``
 
129
  settings.  These partially solve the problem, allowing or disabling
 
130
  **all** file accesses, but not limited access.
 
131
 
 
132
* Configuration file handling needs discussion:
 
133
 
 
134
  - There should be some error checking on the contents of config
 
135
    files.  How much checking should be done?  How loudly should
 
136
    Docutils complain if it encounters an error/problem?
 
137
 
 
138
  - Docutils doesn't complain when it doesn't find a configuration
 
139
    file supplied with the ``--config`` option.  Should it?  (If yes,
 
140
    error or warning?)
 
141
 
 
142
* Internationalization:
 
143
 
 
144
  - I18n needs refactoring, the language dictionaries are difficult to
 
145
    maintain.  Maybe have a look at gettext or similar tools.
 
146
 
 
147
  - Language modules: in accented languages it may be useful to have
 
148
    both accented and unaccented entries in the
 
149
    ``bibliographic_fields`` mapping for versatility.
 
150
 
 
151
  - Add a "--strict-language" option & setting: no English fallback
 
152
    for language-dependent features.
 
153
 
 
154
  - Add internationalization to _`footer boilerplate text` (resulting
 
155
    from "--generator", "--source-link", and "--date" etc.), allowing
 
156
    translations.
 
157
 
 
158
* Add validation?  See http://pytrex.sourceforge.net, RELAX NG, pyRXP.
 
159
 
 
160
* In ``docutils.readers.get_reader_class`` (& ``parsers`` &
 
161
  ``writers`` too), should we be importing "standalone" or
 
162
  "docutils.readers.standalone"?  (This would avoid importing
 
163
  top-level modules if the module name is not in docutils/readers.
 
164
  Potential nastiness.)
 
165
 
 
166
* Perhaps store a _`name-to-id mapping file`?  This could be stored
 
167
  permanently, read by subsequent processing runs, and updated with
 
168
  new entries.  ("Persistent ID mapping"?)
 
169
 
 
170
* Perhaps the ``Component.supports`` method should deal with
 
171
  individual features ("meta" etc.) instead of formats ("html" etc.)?
 
172
 
 
173
* Add _`object numbering and object references` (tables & figures).
 
174
  These would be the equivalent of DocBook's "formal" elements.
 
175
 
 
176
  We may need _`persistent sequences`, such as chapter numbers.  See
 
177
  `OpenOffice.org XML`_ "fields".  Should the sequences be automatic
 
178
  or manual (user-specifyable)?
 
179
 
 
180
  We need to name the objects:
 
181
 
 
182
  - "name" option for the "figure" directive? ::
 
183
 
 
184
        .. figure:: image.png
 
185
           :name: image's name
 
186
 
 
187
    Same for the "table" directive::
 
188
 
 
189
        .. table:: optional title here
 
190
           :name: table's name
 
191
 
 
192
           =====  =====
 
193
             x    not x
 
194
           =====  =====
 
195
           True   False
 
196
           False  True
 
197
           =====  =====
 
198
 
 
199
    This would also allow other options to be set, like border
 
200
    styles.  The same technique could be used for other objects.
 
201
 
 
202
    A preliminary "table" directive has been implemented, supporting
 
203
    table titles.  Perhaps the name should derive from the title.
 
204
 
 
205
  - The object could also be done this way::
 
206
 
 
207
        .. _figure name:
 
208
 
 
209
        .. figure:: image.png
 
210
 
 
211
    This may be a more general solution, equally applicable to tables.
 
212
    However, explicit naming using an option seems simpler to users.
 
213
 
 
214
  - Perhaps the figure name could be incorporated into the figure
 
215
    definition, as an optional inline target part of the directive
 
216
    argument::
 
217
 
 
218
        .. figure:: _`figure name` image.png
 
219
 
 
220
    Maybe with a delimiter::
 
221
 
 
222
        .. figure:: _`figure name`: image.png
 
223
 
 
224
    Or some other, simpler syntax.
 
225
 
 
226
  We'll also need syntax for object references.  See `OpenOffice.org
 
227
  XML`_ "reference fields":
 
228
 
 
229
  - Parameterized substitutions?  For example::
 
230
 
 
231
        See |figure (figure name)| on |page (figure name)|.
 
232
 
 
233
        .. |figure (name)| figure-ref:: (name)
 
234
        .. |page (name)| page-ref:: (name)
 
235
 
 
236
    The result would be::
 
237
 
 
238
        See figure 3.11 on page 157.
 
239
 
 
240
    But this would require substitution directives to be processed at
 
241
    reference-time, not at definition-time as they are now.  Or,
 
242
    perhaps the directives could just leave ``pending`` elements
 
243
    behind, and the transforms do the work?  How to pass the data
 
244
    through?  Too complicated.
 
245
 
 
246
  - An interpreted text approach is simpler and better::
 
247
 
 
248
        See :figure:`figure name` on :page:`figure name`.
 
249
 
 
250
    The "figure" and "page" roles could generate appropriate
 
251
    boilerplate text.  The position of the role (prefix or suffix)
 
252
    could also be utilized.
 
253
 
 
254
    See `Interpreted Text`_ below.
 
255
 
 
256
  - We could leave the boilerplate text up to the document::
 
257
 
 
258
        See Figure :fig:`figure name` on page :pg:`figure name`.
 
259
 
 
260
  - Reference boilerplate could be specified in the document
 
261
    (defaulting to nothing)::
 
262
 
 
263
        .. fignum::
 
264
           :prefix-ref: "Figure "
 
265
           :prefix-caption: "Fig. "
 
266
           :suffix-caption: :
 
267
 
 
268
  .. _OpenOffice.org XML: http://xml.openoffice.org/
 
269
 
 
270
* Think about _`large documents` made up of multiple subdocument
 
271
  files.  Issues: continuity (`persistent sequences`_ above),
 
272
  cross-references (`name-to-id mapping file`_ above and `targets in
 
273
  other documents`_ below), splitting (`document splitting`_ below).
 
274
 
 
275
  When writing a book, the author probably wants to split it up into
 
276
  files, perhaps one per chapter (but perhaps even more detailed).
 
277
  However, we'd like to be able to have references from one chapter to
 
278
  another, and have continuous numbering (pages and chapters, as
 
279
  applicable).  Of course, none of this is implemented yet.  There has
 
280
  been some thought put into some aspects; see `the "include"
 
281
  directive`__ and the `Reference Merging`_ transform below.
 
282
 
 
283
  When I was working with SGML in Japan, we had a system where there
 
284
  was a top-level coordinating file, book.sgml, which contained the
 
285
  top-level structure of a book: the <book> element, containing the
 
286
  book <title> and empty component elements (<preface>, <chapter>,
 
287
  <appendix>, etc.), each with filename attributes pointing to the
 
288
  actual source for the component.  Something like this::
 
289
 
 
290
      <book id="bk01">
 
291
      <title>Title of the Book</title>
 
292
      <preface inrefid="pr01"></preface>
 
293
      <chapter inrefid="ch01"></chapter>
 
294
      <chapter inrefid="ch02"></chapter>
 
295
      <chapter inrefid="ch03"></chapter>
 
296
      <appendix inrefid="ap01"></appendix>
 
297
      </book>
 
298
 
 
299
  (The "inrefid" attribute stood for "insertion reference ID".)
 
300
 
 
301
  The processing system would process each component separately, but
 
302
  it would recognize and use the book file to coordinate chapter and
 
303
  page numbering, and keep a persistent ID to (title, page number)
 
304
  mapping database for cross-references.  Docutils could use a similar
 
305
  system for large-scale, multipart documents.
 
306
 
 
307
  __ ../ref/rst/directives.html#including-an-external-document-fragment
 
308
 
 
309
  Aahz's idea:
 
310
 
 
311
      First the ToC::
 
312
 
 
313
          .. ToC-list::
 
314
              Introduction.txt
 
315
              Objects.txt
 
316
              Data.txt
 
317
              Control.txt
 
318
 
 
319
      Then a sample use::
 
320
 
 
321
          .. include:: ToC.txt
 
322
 
 
323
          As I said earlier in chapter :chapter:`Objects.txt`, the
 
324
          reference count gets increased every time a binding is made.
 
325
 
 
326
      Which produces::
 
327
 
 
328
          As I said earlier in chapter 2, the
 
329
          reference count gets increased every time a binding is made.
 
330
 
 
331
      The ToC in this form doesn't even need to be references to actual
 
332
      reST documents; I'm simply doing it that way for a minimum of
 
333
      future-proofing, in case I do want to add the ability to pick up
 
334
      references within external chapters.
 
335
 
 
336
  Perhaps, instead of ToC (which would overload the "contents"
 
337
  directive concept already in use), we could use "manifest".  A
 
338
  "manifest" directive might associate local reference names with
 
339
  files::
 
340
 
 
341
      .. manifest::
 
342
         intro: Introduction.txt
 
343
         objects: Objects.txt
 
344
         data: Data.txt
 
345
         control: Control.txt
 
346
 
 
347
  Then the sample becomes::
 
348
 
 
349
      .. include:: manifest.txt
 
350
 
 
351
      As I said earlier in chapter :chapter:`objects`, the
 
352
      reference count gets increased every time a binding is made.
 
353
 
 
354
* Add support for _`multiple output files`.
 
355
 
 
356
* Add testing for Docutils' front end tools?
 
357
 
 
358
* Publisher: "Ordinary setup" shouldn't requre specific ordering; at
 
359
  the very least, there ought to be error checking higher up in the
 
360
  call chain.  [Aahz]
 
361
 
 
362
  ``Publisher.get_settings`` requires that all components be set up
 
363
  before it's called.  Perhaps the I/O *objects* shouldn't be set, but
 
364
  I/O *classes*.  Then options are set up (``.set_options``), and
 
365
  ``Publisher.set_io`` (or equivalent code) is called with source &
 
366
  destination paths, creating the I/O objects.
 
367
 
 
368
  Perhaps I/O objects shouldn't be instantiated until required.  For
 
369
  split output, the Writer may be called multiple times, once for each
 
370
  doctree, and each doctree should have a separate Output object (with
 
371
  a different path).  Is the "Builder" pattern applicable here?
 
372
 
 
373
* Perhaps I/O objects should become full-fledged components (i.e.
 
374
  subclasses of ``docutils.Component``, as are Readers, Parsers, and
 
375
  Writers now), and thus have associated option/setting specs and
 
376
  transforms.
 
377
 
 
378
* Multiple file I/O suggestion from Michael Hudson: use a file-like
 
379
  object or something you can iterate over to get file-like objects.
 
380
 
 
381
* Add an "--input-language" option & setting?  Specify a different
 
382
  language module for input (bibliographic fields, directives) than
 
383
  for output.  The "--language" option would set both input & output
 
384
  languages.
 
385
 
 
386
* Auto-generate reference tables for language-dependent features?
 
387
  Could be generated from the source modules.  A special command-line
 
388
  option could be added to Docutils front ends to do this.  (Idea from
 
389
  Engelbert Gruber.)
 
390
 
 
391
* Enable feedback of some kind from internal decisions, such as
 
392
  reporting the successful input encoding.  Modify runtime settings?
 
393
  System message?  Simple stderr output?
 
394
 
 
395
* Rationalize Writer settings (HTML/LaTeX/PEP) -- share settings.
 
396
 
 
397
* Merge docs/user/latex.txt info into tools.txt and config.txt.
 
398
 
 
399
* Add an "--include file" command-line option (config setting too?),
 
400
  equivalent to ".. include:: file" as the first line of the doc text?
 
401
  Especially useful for character entity sets, text transform specs,
 
402
  boilerplate, etc.
 
403
 
 
404
* Parameterize the Reporter object or class?  See the `2004-02-18
 
405
  "rest checking and source path"`_ thread.
 
406
 
 
407
  .. _2004-02-18 "rest checking and source path":
 
408
     http://thread.gmane.org/gmane.text.docutils.user/1112
 
409
 
 
410
* Add a "disable_transforms" setting?  And a dummy Writer subclass
 
411
  that does nothing when its .write() method is called?  Would allow
 
412
  for easy syntax checking.  See the `2004-02-18 "rest checking and
 
413
  source path"`_ thread.
 
414
 
 
415
* Add a generic meta-stylesheet mechanism?  An external file could
 
416
  associate style names ("class" attributes) with specific elements.
 
417
  Could be generalized to arbitrary output attributes; useful for HTML
 
418
  & XMLs.  Aahz implemented something like this in
 
419
  sandbox/aahz/Effective/EffMap.py.
 
420
 
 
421
* .. _classes for table cells:
 
422
 
 
423
  William Dode suggested that table cells be assigned "class"
 
424
  attributes by columns, so that stylesheets can affect text
 
425
  alignment.  Unfortunately, there doesn't seem to be a way (in HTML
 
426
  at least) to leverage the "colspec" elements (HTML "col" tags) by
 
427
  adding classes to them.  The resulting HTML is very verbose::
 
428
 
 
429
      <td class="col1">111</td>
 
430
      <td class="col2">222</td>
 
431
      ...
 
432
 
 
433
  At the very least, it should be an option.  People who don't use it
 
434
  shouldn't be penalized by increases in their HTML file sizes.
 
435
 
 
436
  Table rows could also be assigned classes (like odd/even).  That
 
437
  would be easier to implement.
 
438
 
 
439
  How should it be implemented?
 
440
 
 
441
  * There could be writer options (column classes & row classes) with
 
442
    standard values.
 
443
 
 
444
  * The table directive could grow some options.  Something like
 
445
    ":cell-classes: col1 col2 col3" (either must match the number of
 
446
    columns, or repeat to fill?)  and ":row-classes: odd even" (repeat
 
447
    to fill; body rows only, or header rows too?).
 
448
 
 
449
  Probably per-table directive options are best.  The "class" values
 
450
  could be used by any writer, and applying such classes to all tables
 
451
  in a document with writer options is too broad.
 
452
 
 
453
* Add file-specific settings support to config files, like::
 
454
 
 
455
      [file index.txt]
 
456
      compact-lists: no
 
457
 
 
458
  Is this even possible?  Should the criterion be the name of the
 
459
  input file or the output file?
 
460
 
 
461
* The "validator" support added to OptionParser is very similar to
 
462
  "traits_" in SciPy_.  Perhaps something could be done with them?
 
463
  (Had I known about traits when I was implementing docutils.frontend,
 
464
  I may have used them instead of rolling my own.)
 
465
 
 
466
  .. _traits: http://code.enthought.com/traits/
 
467
  .. _SciPy: http://www.scipy.org/
 
468
 
 
469
* tools/buildhtml.py: Extend the --prune option ("prune" config
 
470
  setting) to accept file names (generic path) in addition to
 
471
  directories (e.g. --prune=docs/user/rst/cheatsheet.txt, which should
 
472
  *not* be converted to HTML).
 
473
 
 
474
* Add support for _`plugins`.
 
475
 
 
476
* _`Config directories`: Currently, ~/.docutils, ./docutils.conf/, &
 
477
  /etc/docutils.conf are read as configuration files.  Proposal: allow
 
478
  ~/.docutils to be a a configuration *directory*, along with
 
479
  /etc/docutils/ and ./docutils.conf/.  Within these directories,
 
480
  check for config.txt files.  We can also have subdirectories here,
 
481
  for plugins, S5 themes, components (readers/writers/parsers) etc.
 
482
 
 
483
  Docutils will continue to support configuration files for backwards
 
484
  compatibility.
 
485
 
 
486
* Add support for document decorations other than headers & footers?
 
487
  For example, top/bottom/side navigation bars for web pages.  Generic
 
488
  decorations?
 
489
 
 
490
  Seems like a bad idea as long as it isn't independent from the ouput
 
491
  format (for example, navigation bars are only useful for web pages).
 
492
 
 
493
* docutils_update: Check for a ``Makefile`` in a directory, and run
 
494
  ``make`` if found?  This would allow for variant processing on
 
495
  specific source files, such as running rst2s5.py instead of
 
496
  rst2html.py.
 
497
 
 
498
* Add a "disable table of contents" setting?  The S5 writer could set
 
499
  it as a default.  Rationale:
 
500
 
 
501
      The ``contents`` (table of contents) directive must not be used
 
502
      [in S5/HTML documents].  It changes the CSS class of headings
 
503
      and they won't show up correctly in the screen presentation.
 
504
 
 
505
      -- `Easy Slide Shows With reStructuredText & S5
 
506
      <../user/slide-shows.html>`_
 
507
 
 
508
 
 
509
Documentation
 
510
=============
 
511
 
 
512
User Docs
 
513
---------
 
514
 
 
515
* Add a FAQ entry about using Docutils (with reStructuredText) on a
 
516
  server and that it's terribly slow.  See the first paragraphs in
 
517
  <http://article.gmane.org/gmane.text.docutils.user/1584>.
 
518
 
 
519
* Add document about what Docutils has previously been used for
 
520
  (web/use-cases.txt?).
 
521
 
 
522
 
 
523
Developer Docs
 
524
--------------
 
525
 
 
526
* Complete `Docutils Runtime Settings <../api/runtime-settings.html>`_.
 
527
 
 
528
* Improve the internal module documentation (docstrings in the code).
 
529
  Specific deficiencies listed below.
 
530
 
 
531
  - docutils.parsers.rst.states.State.build_table: data structure
 
532
    required (including StringList).
 
533
 
 
534
  - docutils.parsers.rst.states: more complete documentation of parser
 
535
    internals.
 
536
 
 
537
* docs/ref/doctree.txt: DTD element structural relationships,
 
538
  semantics, and attributes.  In progress; element descriptions to be
 
539
  completed.
 
540
 
 
541
* Document the ``pending`` elements, how they're generated and what
 
542
  they do.
 
543
 
 
544
* Document the transforms (perhaps in docstrings?): how they're used,
 
545
  what they do, dependencies & order considerations.
 
546
 
 
547
* Document the HTML classes used by html4css1.py.
 
548
 
 
549
* Write an overview of the Docutils architecture, as an introduction
 
550
  for developers.  What connects to what, why, and how.  Either update
 
551
  PEP 258 (see PEPs_ below) or as a separate doc.
 
552
 
 
553
* Give information about unit tests.  Maybe as a howto?
 
554
 
 
555
* Document the docutils.nodes APIs.
 
556
 
 
557
* Complete the docs/api/publisher.txt docs.
 
558
 
 
559
 
 
560
How-Tos
 
561
-------
 
562
 
 
563
* Creating Docutils Writers
 
564
 
 
565
* Creating Docutils Readers
 
566
 
 
567
* Creating Docutils Transforms
 
568
 
 
569
* Creating Docutils Parsers
 
570
 
 
571
* Using Docutils as a Library
 
572
 
 
573
 
 
574
PEPs
 
575
----
 
576
 
 
577
* Complete PEP 258 Docutils Design Specification.
 
578
 
 
579
  - Fill in the blanks in API details.
 
580
 
 
581
  - Specify the nodes.py internal data structure implementation?
 
582
 
 
583
        [Tibs:] Eventually we need to have direct documentation in
 
584
        there on how it all hangs together - the DTD is not enough
 
585
        (indeed, is it still meant to be correct?  [Yes, it is.
 
586
        --DG]).
 
587
 
 
588
* Rework PEP 257, separating style from spec from tools, wrt Docutils?
 
589
  See Doc-SIG from 2001-06-19/20.
 
590
 
 
591
 
 
592
Python Source Reader
 
593
====================
 
594
 
 
595
General:
 
596
 
 
597
* Analyze Tony Ibbs' PySource code.
 
598
 
 
599
* Analyze Doug Hellmann's HappyDoc project.
 
600
 
 
601
* Investigate how POD handles literate programming.
 
602
 
 
603
* Take the best ideas and integrate them into Docutils.
 
604
 
 
605
Miscellaneous ideas:
 
606
 
 
607
* Ask Python-dev for opinions (GvR for a pronouncement) on special
 
608
  variables (__author__, __version__, etc.): convenience vs. namespace
 
609
  pollution.  Ask opinions on whether or not Docutils should recognize
 
610
  & use them.
 
611
 
 
612
* If we can detect that a comment block begins with ``##``, a la
 
613
  JavaDoc, it might be useful to indicate interspersed section headers
 
614
  & explanatory text in a module.  For example::
 
615
 
 
616
      """Module docstring."""
 
617
 
 
618
      ##
 
619
      # Constants
 
620
      # =========
 
621
 
 
622
      a = 1
 
623
      b = 2
 
624
 
 
625
      ##
 
626
      # Exception Classes
 
627
      # =================
 
628
 
 
629
      class MyException(Exception): pass
 
630
 
 
631
      # etc.
 
632
 
 
633
* Should standalone strings also become (module/class) docstrings?
 
634
  Under what conditions?  We want to prevent arbitrary strings from
 
635
  becomming docstrings of prior attribute assignments etc.  Assume
 
636
  that there must be no blank lines between attributes and attribute
 
637
  docstrings?  (Use lineno of NEWLINE token.)
 
638
 
 
639
  Triple-quotes are sometimes used for multi-line comments (such as
 
640
  commenting out blocks of code).  How to reconcile?
 
641
 
 
642
* HappyDoc's idea of using comment blocks when there's no docstring
 
643
  may be useful to get around the conflict between `additional
 
644
  docstrings`_ and ``from __future__ import`` for module docstrings.
 
645
  A module could begin like this::
 
646
 
 
647
      #!/usr/bin/env python
 
648
      # :Author: Me
 
649
      # :Copyright: whatever
 
650
 
 
651
      """This is the public module docstring (``__doc__``)."""
 
652
 
 
653
      # More docs, in comments.
 
654
      # All comments at the beginning of a module could be
 
655
      # accumulated as docstrings.
 
656
      # We can't have another docstring here, because of the
 
657
      # ``__future__`` statement.
 
658
 
 
659
      from __future__ import division
 
660
 
 
661
  Using the JavaDoc convention of a doc-comment block beginning with
 
662
  ``##`` is useful though.  It allows doc-comments and implementation
 
663
  comments.
 
664
 
 
665
  .. _additional docstrings:
 
666
     ../peps/pep-0258.html#additional-docstrings
 
667
 
 
668
* HappyDoc uses an initial comment block to set "parser configuration
 
669
  values".  Do the same thing for Docutils, to set runtime settings on
 
670
  a per-module basis?  I.e.::
 
671
 
 
672
      # Docutils:setting=value
 
673
 
 
674
  Could be used to turn on/off function parameter comment recognition
 
675
  & other marginal features.  Could be used as a general mechanism to
 
676
  augment config files and command-line options (but which takes
 
677
  precedence?).
 
678
 
 
679
* Multi-file output should be divisible at arbitrary level.
 
680
 
 
681
* Support all forms of ``import`` statements:
 
682
 
 
683
  - ``import module``: listed as "module"
 
684
  - ``import module as alias``: "alias (module)"
 
685
  - ``from module import identifier``: "identifier (from module)"
 
686
  - ``from module import identifier as alias``: "alias (identifier
 
687
    from module)"
 
688
  - ``from module import *``: "all identifiers (``*``) from module"
 
689
 
 
690
* Have links to colorized Python source files from API docs?  And
 
691
  vice-versa: backlinks from the colorized source files to the API
 
692
  docs!
 
693
 
 
694
* In summaries, use the first *sentence* of a docstring if the first
 
695
  line is not followed by a blank line.
 
696
 
 
697
 
 
698
reStructuredText Parser
 
699
=======================
 
700
 
 
701
Also see the `... Or Not To Do?`__ list.
 
702
 
 
703
__ rst/alternatives.html#or-not-to-do
 
704
 
 
705
* Treat enumerated lists that are not arabic and consist of only one
 
706
  item in a single line as ordinary paragraphs.  See
 
707
  <http://article.gmane.org/gmane.text.docutils.user/2635>.
 
708
 
 
709
* The citation syntax could use some enhancements.  See
 
710
  <http://thread.gmane.org/gmane.text.docutils.user/2499> and
 
711
  <http://thread.gmane.org/gmane.text.docutils.user/2443>.
 
712
 
 
713
* The current list-recognition logic has too many false positives, as
 
714
  in ::
 
715
 
 
716
      * Aorta
 
717
      * V. cava superior
 
718
      * V. cava inferior
 
719
 
 
720
  Here ``V.`` is recognized as an enumerator, which leads to
 
721
  confusion.  We need to find a solution that resolves such problems
 
722
  without complicating the spec to much.
 
723
 
 
724
  See <http://thread.gmane.org/gmane.text.docutils.user/2524>.
 
725
 
 
726
* Add indirect links via citation references & footnote references.
 
727
  Example::
 
728
 
 
729
      `Goodger (2005)`_ is helpful.
 
730
 
 
731
      .. _Goodger (2005): [goodger2005]_
 
732
      .. [goodger2005] citation text
 
733
 
 
734
  See <http://thread.gmane.org/gmane.text.docutils.user/2499>.
 
735
 
 
736
* Allow multiple block quotes, only separated by attributions
 
737
  (http://article.gmane.org/gmane.text.docutils.devel/2985), e.g.::
 
738
 
 
739
      quote 1
 
740
 
 
741
      ---Attrib 1
 
742
 
 
743
      quote 2
 
744
 
 
745
      ---Attrib 2
 
746
 
 
747
* Change the specification so that more punctuation is allowed
 
748
  before/after inline markup start/end string
 
749
  (http://article.gmane.org/gmane.text.docutils.cvs/3824).
 
750
 
 
751
* Complain about bad URI characters
 
752
  (http://article.gmane.org/gmane.text.docutils.user/2046) and
 
753
  disallow internal whitespace
 
754
  (http://article.gmane.org/gmane.text.docutils.user/2214).
 
755
 
 
756
* Create ``info``-level system messages for unnecessarily
 
757
  backslash-escaped characters (as in ``"\something"``, rendered as
 
758
  "something") to allow checking for errors which silently slipped
 
759
  through.
 
760
 
 
761
* Add (functional) tests for untested roles.
 
762
 
 
763
* Add test for ":figwidth: image" option of "figure" directive.  (Test
 
764
  code needs to check if PIL is available on the system.)
 
765
 
 
766
* Add support for CJK double-width whitespace (indentation) &
 
767
  punctuation characters (markup; e.g. double-width "*", "-", "+")?
 
768
 
 
769
* Add motivation sections for constructs in spec.
 
770
 
 
771
* Support generic hyperlink references to _`targets in other
 
772
  documents`?  Not in an HTML-centric way, though (it's trivial to say
 
773
  ``http://www.example.com/doc#name``, and useless in non-HTML
 
774
  contexts).  XLink/XPointer?  ``.. baseref::``?  See Doc-SIG
 
775
  2001-08-10.
 
776
 
 
777
* .. _adaptable file extensions:
 
778
 
 
779
  In target URLs, it would be useful to not explicitly specify the
 
780
  file extension.  If we're generating HTML, then ".html" is
 
781
  appropriate; if PDF, then ".pdf"; etc.  How about using ".*" to
 
782
  indicate "choose the most appropriate filename extension"?  For
 
783
  example::
 
784
 
 
785
      .. _Another Document: another.*
 
786
 
 
787
  What is to be done for output formats that don't *have* hyperlinks?
 
788
  For example, LaTeX targeted at print.  Hyperlinks may be "called
 
789
  out", as footnotes with explicit URLs.
 
790
 
 
791
  But then there's also LaTeX targeted at PDFs, which *can* have
 
792
  links.  Perhaps a runtime setting for "*" could explicitly provide
 
793
  the extension, defaulting to the output file's extension.
 
794
 
 
795
  Should the system check for existing files?  No, not practical.
 
796
 
 
797
  Handle documents only, or objects (images, etc.) also?
 
798
 
 
799
  If this handles images also, how to differentiate between document
 
800
  and image links?  Element context (within "image")?  Which image
 
801
  extension to use for which document format?  Again, a runtime
 
802
  setting would suffice.
 
803
 
 
804
  This may not be just a parser issue; it may need framework support.
 
805
 
 
806
  Mailing list threads: `Images in both HTML and LaTeX`__ (especially
 
807
  `this summary of Felix's objections`__), `more-universal links?`__,
 
808
  `Output-format-sensitive link targets?`__
 
809
 
 
810
  __ http://thread.gmane.org/gmane.text.docutils.user/1239
 
811
  __ http://article.gmane.org/gmane.text.docutils.user/1278
 
812
  __ http://thread.gmane.org/gmane.text.docutils.user/1915
 
813
  __ http://thread.gmane.org/gmane.text.docutils.user/2438
 
814
 
 
815
* Implement the header row separator modification to table.el.  (Wrote
 
816
  to Takaaki Ota & the table.el mailing list on 2001-08-12, suggesting
 
817
  support for "=====" header rows.  On 2001-08-17 he replied, saying
 
818
  he'd put it on his to-do list, but "don't hold your breath".)
 
819
 
 
820
* Fix the parser's indentation handling to conform with the stricter
 
821
  definition in the spec.  (Explicit markup blocks should be strict or
 
822
  forgiving?)
 
823
 
 
824
  .. XXX What does this mean?  Can you elaborate, David?
 
825
 
 
826
* Make the parser modular.  Allow syntax constructs to be added or
 
827
  disabled at run-time.  Subclassing is probably not enough because it
 
828
  makes it difficult to apply multiple extensions.
 
829
 
 
830
* Generalize the "doctest block" construct (which is overly
 
831
  Python-centric) to other interactive sessions?  "Doctest block"
 
832
  could be renamed to "I/O block" or "interactive block", and each of
 
833
  these could also be recognized as such by the parser:
 
834
 
 
835
  - Shell sessions::
 
836
 
 
837
        $ cat example1.txt
 
838
        A block beginning with a "$ " prompt is interpreted as a shell
 
839
        session interactive block.  As with Doctest blocks, the
 
840
        interactive block ends with the first blank line, and wouldn't
 
841
        have to be indented.
 
842
 
 
843
  - Root shell sessions::
 
844
 
 
845
        # cat example2.txt
 
846
        A block beginning with a "# " prompt is interpreted as a root
 
847
        shell session (the user is or has to be logged in as root)
 
848
        interactive block.  Again, the block ends with a blank line.
 
849
 
 
850
  Other standard (and unambiguous) interactive session prompts could
 
851
  easily be added (such as "> " for WinDOS).
 
852
 
 
853
  Tony Ibbs spoke out against this idea (2002-06-14 Doc-SIG thread
 
854
  "docutils feedback").
 
855
 
 
856
* The "doctest" element should go away.  The construct could simply be
 
857
  a front-end to generic literal blocks.  We could immediately (in
 
858
  0.4, or 0.5) remove the doctest node from the doctree, but leave the
 
859
  syntax in reST.  The reST parser could represent doctest blocks as
 
860
  literal blocks with a class attribute.  The syntax could be left in
 
861
  reST for a set period of time.
 
862
 
 
863
* Add support for pragma (syntax-altering) directives.
 
864
 
 
865
  Some pragma directives could be local-scope unless explicitly
 
866
  specified as global/pragma using ":global:" options.
 
867
 
 
868
* Support whitespace in angle-bracketed standalone URLs according to
 
869
  Appendix E ("Recommendations for Delimiting URI in Context") of `RFC
 
870
  2396`_.
 
871
 
 
872
  .. _RFC 2396: http://www.rfc-editor.org/rfc/rfc2396.txt
 
873
 
 
874
* Use the vertical spacing of the source text to determine the
 
875
  corresponding vertical spacing of the output?
 
876
 
 
877
* [From Mark Nodine]  For cells in simple tables that comprise a
 
878
  single line, the justification can be inferred according to the
 
879
  following rules:
 
880
 
 
881
  1. If the text begins at the leftmost column of the cell,
 
882
     then left justification, ELSE
 
883
  2. If the text begins at the rightmost column of the cell,
 
884
     then right justification, ELSE
 
885
  3. Center justification.
 
886
 
 
887
  The onus is on the author to make the text unambiguous by adding
 
888
  blank columns as necessary.  There should be a parser setting to
 
889
  turn off justification-recognition (normally on would be fine).
 
890
 
 
891
  Decimal justification?
 
892
 
 
893
  All this shouldn't be done automatically.  Only when it's requested
 
894
  by the user, e.g. with something like this::
 
895
 
 
896
      .. table::
 
897
         :auto-indent:
 
898
 
 
899
         (Table goes here.)
 
900
 
 
901
  Otherwise it will break existing documents.
 
902
 
 
903
* Generate a warning or info message for paragraphs which should have
 
904
  been lists, like this one::
 
905
 
 
906
      1. line one
 
907
      3. line two
 
908
 
 
909
* Generalize the "target-notes" directive into a command-line option
 
910
  somehow?  See docutils-develop 2003-02-13.
 
911
 
 
912
* Allow a "::"-only paragraph (first line, actually) to introduce a
 
913
  _`literal block without a blank line`?  (Idea from Paul Moore.) ::
 
914
 
 
915
      ::
 
916
          This is a literal block
 
917
 
 
918
  Is indentation enough to make the separation between a paragraph
 
919
  which contains just a ``::`` and the literal text unambiguous?
 
920
  (There's one problem with this concession: If one wants a definition
 
921
  list item which defines the term "::", we'd have to escape it.)  It
 
922
  would only be reasonable to apply it to "::"-only paragraphs though.
 
923
  I think the blank line is visually necessary if there's text before
 
924
  the "::"::
 
925
 
 
926
      The text in this paragraph needs separation
 
927
      from the literal block following::
 
928
          This doesn't look right.
 
929
 
 
930
* Add new syntax for _`nested inline markup`?  Or extend the parser to
 
931
  parse nested inline markup somehow?  See the `collected notes
 
932
  <rst/alternatives.html#nested-inline-markup>`__.
 
933
 
 
934
* Drop the backticks from embedded URIs with omitted reference text?
 
935
  Should the angle brackets be kept in the output or not? ::
 
936
 
 
937
      <file_name>_
 
938
 
 
939
  Probably not worth the trouble.
 
940
 
 
941
* Add _`math markup`.  We should try for a general solution, that's
 
942
  applicable to any output format.  Using a standard, such as MathML_,
 
943
  would be best.  TeX (or itex_) would be acceptable as a *front-end*
 
944
  to MathML.  See `the culmination of a relevant discussion
 
945
  <http://article.gmane.org/gmane.text.docutils.user/118>`__.
 
946
 
 
947
  Both a directive and an interpreted text role will be necessary (for
 
948
  each markup).  Directive example::
 
949
 
 
950
      .. itex::
 
951
         \alpha_t(i) = P(O_1, O_2, \dots O_t, q_t = S_i \lambda)
 
952
 
 
953
  The same thing inline::
 
954
 
 
955
      The equation in question is :itex:`\alpha_t(i) = P(O_1, O_2,
 
956
      \dots O_t, q_t = S_i \lambda)`.
 
957
 
 
958
  .. _MathML: http://www.w3.org/TR/MathML2/
 
959
  .. _itex: http://pear.math.pitt.edu/mathzilla/itex2mmlItex.html
 
960
 
 
961
* How about a syntax for alternative hyperlink behavior, such as "open
 
962
  in a new window" (as in HTML's ``<a target="_blank">``)?  Double
 
963
  angle brackets might work for inline targets::
 
964
 
 
965
      The `reference docs <<url>>`__ may be handy.
 
966
 
 
967
  But what about explicit targets?
 
968
 
 
969
  The MoinMoin wiki uses a caret ("^") at the beginning of the URL
 
970
  ("^" is not a legal URI character).  That could work for both inline
 
971
  and explicit targets::
 
972
 
 
973
      The `reference docs <^url>`__ may be handy.
 
974
 
 
975
      .. _name: ^url
 
976
 
 
977
  This may be too specific to HTML.  It hasn't been requested very
 
978
  often either.
 
979
 
 
980
* Add an option to add URI schemes at runtime.
 
981
 
 
982
* _`Segmented lists`::
 
983
 
 
984
      : segment : segment : segment
 
985
      : segment : segment : very long
 
986
        segment
 
987
      : segment : segment : segment
 
988
 
 
989
  The initial colon (":") can be thought of as a type of bullet
 
990
 
 
991
  We could even have segment titles::
 
992
 
 
993
      :: title  : title   : title
 
994
      : segment : segment : segment
 
995
      : segment : segment : segment
 
996
 
 
997
  This would correspond well to DocBook's SegmentedList.  Output could
 
998
  be tabular or "name: value" pairs, as described in DocBook's docs.
 
999
 
 
1000
* Allow backslash-escaped colons in field names::
 
1001
 
 
1002
      :Case Study\: Event Handling: This chapter will be dropped.
 
1003
 
 
1004
* _`footnote spaces`:
 
1005
 
 
1006
  When supplying the command line options
 
1007
  --footnote-references=brackets and --use-latex-footnotes with the
 
1008
  LaTeX writer (which might very well happen when using configuration
 
1009
  files), the spaces in front of footnote references aren't trimmed.
 
1010
 
 
1011
* Enable grid _`tables inside XML comments`, where "--" ends comments.
 
1012
  I see three implementation possibilities:
 
1013
 
 
1014
  1. Make the table syntax characters into "table" directive options.
 
1015
     This is the most flexible but most difficult, and we probably
 
1016
     don't need that much flexibility.
 
1017
 
 
1018
  2. Substitute "~" for "-" with a specialized directive option
 
1019
     (e.g. ":tildes:").
 
1020
 
 
1021
  3. Make the standard table syntax recognize "~" as well as "-", even
 
1022
     without a directive option.  Individual tables would have to be
 
1023
     internally consistent.
 
1024
 
 
1025
  Directive options are preferable to configuration settings, because
 
1026
  tables are document-specific.  A pragma directive would be another
 
1027
  approach, to set the syntax once for a whole document.
 
1028
 
 
1029
  In the meantime, the list-table_ directive is a good replacement for
 
1030
  grid tables inside XML comments.
 
1031
 
 
1032
  .. _list-table: ../ref/rst/directives.html#list-table
 
1033
 
 
1034
* Generalize docinfo contents (bibliographic fields): remove specific
 
1035
  fields, and have only a single generic "field"?
 
1036
 
 
1037
 
 
1038
Directives
 
1039
----------
 
1040
 
 
1041
Directives below are often referred to as "module.directive", the
 
1042
directive function.  The "module." is not part of the directive name
 
1043
when used in a document.
 
1044
 
 
1045
* Make the _`directive interface` object-oriented
 
1046
  (http://article.gmane.org/gmane.text.docutils.user/1871).
 
1047
 
 
1048
* Allow for field lists in list tables.  See
 
1049
  <http://thread.gmane.org/gmane.text.docutils.devel/3392>.
 
1050
 
 
1051
* .. _unify tables:
 
1052
 
 
1053
  Unify table implementations and unify options of table directives
 
1054
  (http://article.gmane.org/gmane.text.docutils.user/1857).
 
1055
 
 
1056
* Allow directives to be added at run-time?
 
1057
 
 
1058
* Use the language module for directive option names?
 
1059
 
 
1060
* Add "substitution_only" and "substitution_ok" function attributes,
 
1061
  and automate context checking?
 
1062
 
 
1063
* Change directive functions to directive classes?  Superclass'
 
1064
  ``__init__()`` could handle all the bookkeeping.
 
1065
 
 
1066
* Implement options or features on existing directives:
 
1067
 
 
1068
  - Add a "name" option to directives, to set an author-supplied
 
1069
    identifier?
 
1070
 
 
1071
  - All directives that produce titled elements should grow implicit
 
1072
    reference names based on the titles.
 
1073
 
 
1074
  - Allow the _`:trim:` option for all directives when they occur in a
 
1075
    substitution definition, not only the unicode_ directive.
 
1076
 
 
1077
    .. _unicode: ../ref/rst/directives.html#unicode-character-codes
 
1078
 
 
1079
  - _`images.figure`: "title" and "number", to indicate a formal
 
1080
    figure?
 
1081
 
 
1082
  - _`parts.sectnum`: "local"?, "refnum"
 
1083
 
 
1084
    A "local" option could enable numbering for sections from a
 
1085
    certain point down, and sections in the rest of the document are
 
1086
    not numbered.  For example, a reference section of a manual might
 
1087
    be numbered, but not the rest.  OTOH, an all-or-nothing approach
 
1088
    would probably be enough.
 
1089
 
 
1090
    The "sectnum" directive should be usable multiple times in a
 
1091
    single document.  For example, in a long document with "chapter"
 
1092
    and "appendix" sections, there could be a second "sectnum" before
 
1093
    the first appendix, changing the sequence used (from 1,2,3... to
 
1094
    A,B,C...).  This is where the "local" concept comes in.  This part
 
1095
    of the implementation can be left for later.
 
1096
 
 
1097
    A "refnum" option (better name?) would insert reference names
 
1098
    (targets) consisting of the reference number.  Then a URL could be
 
1099
    of the form ``http://host/document.html#2.5`` (or "2-5"?).  Allow
 
1100
    internal references by number?  Allow name-based *and*
 
1101
    number-based ids at the same time, or only one or the other (which
 
1102
    would the table of contents use)?  Usage issue: altering the
 
1103
    section structure of a document could render hyperlinks invalid.
 
1104
 
 
1105
  - _`parts.contents`: Add a "suppress" or "prune" option?  It would
 
1106
    suppress contents display for sections in a branch from that point
 
1107
    down.  Or a new directive, like "prune-contents"?
 
1108
 
 
1109
    Add an option to include topics in the TOC?  Another for sidebars?
 
1110
    The "topic" directive could have a "contents" option, or the
 
1111
    "contents" directive" could have an "include-topics" option.  See
 
1112
    docutils-develop 2003-01-29.
 
1113
 
 
1114
  - _`parts.header` & _`parts.footer`: Support multiple, named headers
 
1115
    & footers?  For example, separate headers & footers for odd, even,
 
1116
    and the first page of a document.
 
1117
 
 
1118
    This may be too specific to output formats which have a notion of
 
1119
    "pages".
 
1120
 
 
1121
  - _`misc.class`:
 
1122
 
 
1123
    - Add a ``:parent:`` option for setting the parent's class
 
1124
      (http://article.gmane.org/gmane.text.docutils.devel/3165).
 
1125
 
 
1126
  - _`misc.include`:
 
1127
 
 
1128
    - Option to select a range of lines?
 
1129
 
 
1130
    - Option to label lines?
 
1131
 
 
1132
    - How about an environment variable, say RSTINCLUDEPATH or
 
1133
      RSTPATH, for standard includes (as in ``.. include:: <name>``)?
 
1134
      This could be combined with a setting/option to allow
 
1135
      user-defined include directories.
 
1136
 
 
1137
    - Add support for inclusion by URL? ::
 
1138
 
 
1139
          .. include::
 
1140
             :url: http://www.example.org/inclusion.txt
 
1141
 
 
1142
  - _`misc.raw`: add a "destination" option to the "raw" directive? ::
 
1143
 
 
1144
        .. raw:: html
 
1145
           :destination: head
 
1146
 
 
1147
           <link ...>
 
1148
 
 
1149
    It needs thought & discussion though, to come up with a consistent
 
1150
    set of destination labels and consistent behavior.
 
1151
 
 
1152
    And placing HTML code inside the <head> element of an HTML
 
1153
    document is rather the job of a templating system.
 
1154
 
 
1155
  - _`body.sidebar`: Allow internal section structure?  Adornment
 
1156
    styles would be independent of the main document.
 
1157
 
 
1158
    That is really complicated, however, and the document model
 
1159
    greatly benefits from its simplicity.
 
1160
 
 
1161
* Implement directives.  Each of the list items below begins with an
 
1162
  identifier of the form, "module_name.directive_function_name".  The
 
1163
  directive name itself could be the same as the
 
1164
  directive_function_name, or it could differ.
 
1165
 
 
1166
  - _`html.imagemap`
 
1167
 
 
1168
    It has the disadvantage that it's only easily implementable for
 
1169
    HTML, so it's specific to one output format.
 
1170
 
 
1171
    (For non-HTML writers, the imagemap would have to be replaced with
 
1172
    the image only.)
 
1173
 
 
1174
  - _`parts.endnotes` (or "footnotes"): See `Footnote & Citation Gathering`_.
 
1175
 
 
1176
  - _`parts.citations`: See `Footnote & Citation Gathering`_.
 
1177
 
 
1178
  - _`misc.language`: Specify (= change) the language of a document at
 
1179
    parse time.
 
1180
 
 
1181
  - _`misc.settings`: Set any(?) Docutils runtime setting from within
 
1182
    a document?  Needs much thought and discussion.
 
1183
 
 
1184
  - _`misc.gather`: Gather (move, or copy) all instances of a specific
 
1185
    element.  A generalization of the "endnotes" & "citations" ideas.
 
1186
 
 
1187
  - Add a custom "directive" directive, equivalent to "role"?  For
 
1188
    example::
 
1189
 
 
1190
        .. directive:: incr
 
1191
 
 
1192
           .. class:: incremental
 
1193
 
 
1194
        .. incr::
 
1195
 
 
1196
        "``.. incr::``" above is equivalent to "``.. class:: incremental``".
 
1197
 
 
1198
    Another example::
 
1199
 
 
1200
        .. directive:: printed-links
 
1201
 
 
1202
           .. topic:: Links
 
1203
              :class: print-block
 
1204
 
 
1205
              .. target-notes::
 
1206
                 :class: print-inline
 
1207
 
 
1208
    This acts like macros.  The directive contents will have to be
 
1209
    evaluated when referenced, not when defined.  
 
1210
 
 
1211
    * Needs a better name?  "Macro", "substitution"?
 
1212
    * What to do with directive arguments & options when the
 
1213
      macro/directive is referenced?
 
1214
 
 
1215
  - .. _conditional directives:
 
1216
 
 
1217
    Docutils already has the ability to say "use this content for
 
1218
    Writer X" (via the "raw" directive), but it doesn't have the
 
1219
    ability to say "use this content for any Writer other than X".  It
 
1220
    wouldn't be difficult to add this ability though.
 
1221
 
 
1222
    My first idea would be to add a set of conditional directives.
 
1223
    Let's call them "writer-is" and "writer-is-not" for discussion
 
1224
    purposes (don't worry about implemention details).  We might
 
1225
    have::
 
1226
 
 
1227
         .. writer-is:: text-only
 
1228
 
 
1229
            ::
 
1230
 
 
1231
                +----------+
 
1232
                |   SNMP   |
 
1233
                +----------+
 
1234
                |   UDP    |
 
1235
                +----------+
 
1236
                |    IP    |
 
1237
                +----------+
 
1238
                | Ethernet |
 
1239
                +----------+
 
1240
 
 
1241
         .. writer-is:: pdf
 
1242
 
 
1243
            .. figure:: protocol_stack.eps
 
1244
 
 
1245
         .. writer-is-not:: text-only pdf
 
1246
 
 
1247
            .. figure:: protocol_stack.png
 
1248
 
 
1249
    This could be an interface to the Filter transform
 
1250
    (docutils.transforms.components.Filter).
 
1251
 
 
1252
    The ideas in `adaptable file extensions`_ above may also be
 
1253
    applicable here.
 
1254
 
 
1255
    SVG's "switch" statement may provide inspiration.
 
1256
 
 
1257
    Here's an example of a directive that could produce multiple
 
1258
    outputs (*both* raw troff pass-through *and* a GIF, for example)
 
1259
    and allow the Writer to select. ::
 
1260
 
 
1261
        .. eqn::
 
1262
 
 
1263
           .EQ
 
1264
           delim %%
 
1265
           .EN
 
1266
           %sum from i=o to inf c sup i~=~lim from {m -> inf}
 
1267
           sum from i=0 to m sup i%
 
1268
           .EQ
 
1269
           delim off
 
1270
           .EN
 
1271
 
 
1272
  - _`body.example`: Examples; suggested by Simon Hefti.  Semantics as
 
1273
    per Docbook's "example"; admonition-style, numbered, reference,
 
1274
    with a caption/title.
 
1275
 
 
1276
  - _`body.index`: Index targets.
 
1277
 
 
1278
    See `Index Entries & Indexes
 
1279
    <./rst/alternatives.html#index-entries-indexes>`__.
 
1280
 
 
1281
  - _`body.literal`: Literal block, possibly "formal" (see `object
 
1282
    numbering and object references`_ above).  Possible options:
 
1283
 
 
1284
    - "highlight" a range of lines
 
1285
 
 
1286
    - include only a specified range of lines
 
1287
 
 
1288
    - "number" or "line-numbers"
 
1289
 
 
1290
    - "styled" could indicate that the directive should check for
 
1291
      style comments at the end of lines to indicate styling or
 
1292
      markup.
 
1293
 
 
1294
      Specific derivatives (i.e., a "python-interactive" directive)
 
1295
      could interpret style based on cues, like the ">>> " prompt and
 
1296
      "input()"/"raw_input()" calls.
 
1297
 
 
1298
    See docutils-users 2003-03-03.
 
1299
 
 
1300
  - _`body.listing`: Code listing with title (to be numbered
 
1301
    eventually), equivalent of "figure" and "table" directives.
 
1302
 
 
1303
  - _`colorize.python`: Colorize Python code.  Fine for HTML output,
 
1304
    but what about other formats?  Revert to a literal block?  Do we
 
1305
    need some kind of "alternate" mechanism?  Perhaps use a "pending"
 
1306
    transform, which could switch its output based on the "format" in
 
1307
    use.  Use a factory function "transformFF()" which returns either
 
1308
    "HTMLTransform()" instance or "GenericTransform" instance?
 
1309
 
 
1310
    If we take a Python-to-HTML pretty-printer and make it output a
 
1311
    Docutils internal doctree (as per nodes.py) instead of HTML, then
 
1312
    each output format's stylesheet (or equivalent) mechanism could
 
1313
    take care of the rest.  The pretty-printer code could turn this
 
1314
    doctree fragment::
 
1315
 
 
1316
         <literal_block xml:space="preserve">
 
1317
         print 'This is Python code.'
 
1318
         for i in range(10):
 
1319
             print i
 
1320
         </literal_block>
 
1321
 
 
1322
    into something like this ("</>" is end-tag shorthand)::
 
1323
 
 
1324
         <literal_block xml:space="preserve" class="python">
 
1325
         <keyword>print</> <string>'This is Python code.'</>
 
1326
         <keyword>for</> <identifier>i</> <keyword
 
1327
         >in</> <expression>range(10)</>:
 
1328
             <keyword>print</> <expression>i</>
 
1329
         </literal_block>
 
1330
 
 
1331
    But I'm leaning toward adding a single new general-purpose
 
1332
    element, "phrase", equivalent to HTML's <span>.  Here's the
 
1333
    example rewritten using the generic "phrase"::
 
1334
 
 
1335
        <literal_block xml:space="preserve" class="python">
 
1336
        <phrase class="keyword">print</> <phrase
 
1337
         class="string">'This is Python code.'</>
 
1338
        <phrase class="keyword">for</> <phrase
 
1339
         class="identifier">i</> <phrase class="keyword">in</> <phrase
 
1340
         class="expression">range(10)</>:
 
1341
            <phrase class="keyword">print</> <phrase
 
1342
             class="expression">i</>
 
1343
        </literal_block>
 
1344
 
 
1345
    It's more verbose but more easily extensible and more appropriate
 
1346
    for the case at hand.  It allows us to edit style sheets to add
 
1347
    support for new formats, not the Docutils code itself.
 
1348
 
 
1349
    Perhaps a single directive with a format parameter would be
 
1350
    better::
 
1351
 
 
1352
        .. colorize:: python
 
1353
 
 
1354
           print 'This is Python code.'
 
1355
           for i in range(10):
 
1356
               print i
 
1357
 
 
1358
    But directives can have synonyms for convenience.  "format::
 
1359
    python" was suggested, but "format" seems too generic.
 
1360
 
 
1361
  - _`pysource.usage`: Extract a usage message from the program,
 
1362
    either by running it at the command line with a ``--help`` option
 
1363
    or through an exposed API.  [Suggestion for Optik.]
 
1364
 
 
1365
 
 
1366
Interpreted Text
 
1367
----------------
 
1368
 
 
1369
Interpreted text is entirely a reStructuredText markup construct, a
 
1370
way to get around built-in limitations of the medium.  Some roles are
 
1371
intended to introduce new doctree elements, such as "title-reference".
 
1372
Others are merely convenience features, like "RFC".
 
1373
 
 
1374
All supported interpreted text roles must already be known to the
 
1375
Parser when they are encountered in a document.  Whether pre-defined
 
1376
in core/client code, or in the document, doesn't matter; the roles
 
1377
just need to have already been declared.  Adding a new role may
 
1378
involve adding a new element to the DTD and may require extensive
 
1379
support, therefore such additions should be well thought-out.  There
 
1380
should be a limited number of roles.
 
1381
 
 
1382
The only place where no limit is placed on variation is at the start,
 
1383
at the Reader/Parser interface.  Transforms are inserted by the Reader
 
1384
into the Transformer's queue, where non-standard elements are
 
1385
converted.  Once past the Transformer, no variation from the standard
 
1386
Docutils doctree is possible.
 
1387
 
 
1388
An example is the Python Source Reader, which will use interpreted
 
1389
text extensively.  The default role will be "Python identifier", which
 
1390
will be further interpreted by namespace context into <class>,
 
1391
<method>, <module>, <attribute>, etc. elements (see pysource.dtd),
 
1392
which will be transformed into standard hyperlink references, which
 
1393
will be processed by the various Writers.  No Writer will need to have
 
1394
any knowledge of the Python-Reader origin of these elements.
 
1395
 
 
1396
* Add explicit interpreted text roles for the rest of the implicit
 
1397
  inline markup constructs: named-reference, anonymous-reference,
 
1398
  footnote-reference, citation-reference, substitution-reference,
 
1399
  target, uri-reference (& synonyms).
 
1400
 
 
1401
* Add directives for each role as well?  This would allow indirect
 
1402
  nested markup::
 
1403
 
 
1404
      This text contains |nested inline markup|.
 
1405
 
 
1406
      .. |nested inline markup| emphasis::
 
1407
 
 
1408
         nested ``inline`` markup
 
1409
 
 
1410
* Implement roles:
 
1411
 
 
1412
  - "_`raw-wrapped`" (or "_`raw-wrap`"): Base role to wrap raw text
 
1413
    around role contents.
 
1414
 
 
1415
    For example, the following reStructuredText source ... ::
 
1416
 
 
1417
        .. role:: red(raw-formatting)
 
1418
           :prefix:
 
1419
               :html: <font color="red">
 
1420
               :latex: {\color{red}
 
1421
           :suffix:
 
1422
               :html: </font>
 
1423
               :latex: }
 
1424
 
 
1425
        colored :red:`text`
 
1426
 
 
1427
    ... will yield the following document fragment::
 
1428
 
 
1429
        <paragraph>
 
1430
            colored
 
1431
            <inline classes="red">
 
1432
                <raw format="html">
 
1433
                    <font color="red">
 
1434
                <raw format="latex">
 
1435
                    {\color{red}
 
1436
                <inline classes="red">
 
1437
                    text
 
1438
                <raw format="html">
 
1439
                    </font>
 
1440
                <raw format="latex">
 
1441
                    }
 
1442
 
 
1443
    Possibly without the intermediate "inline" node.
 
1444
 
 
1445
  - "acronym" and "abbreviation": Associate the full text with a short
 
1446
    form.  Jason Diamond's description:
 
1447
 
 
1448
        I want to translate ```reST`:acronym:`` into ``<acronym
 
1449
        title='reStructuredText'>reST</acronym>``.  The value of the
 
1450
        title attribute has to be defined out-of-band since you can't
 
1451
        parameterize interpreted text.  Right now I have them in a
 
1452
        separate file but I'm experimenting with creating a directive
 
1453
        that will use some form of reST syntax to let you define them.
 
1454
 
 
1455
    Should Docutils complain about undefined acronyms or
 
1456
    abbreviations?
 
1457
 
 
1458
    What to do if there are multiple definitions?  How to
 
1459
    differentiate between CSS (Content Scrambling System) and CSS
 
1460
    (Cascading Style Sheets) in a single document?  David Priest
 
1461
    responds,
 
1462
 
 
1463
        The short answer is: you don't.  Anyone who did such a thing
 
1464
        would be writing very poor documentation indeed.  (Though I
 
1465
        note that `somewhere else in the docs`__, there's mention of
 
1466
        allowing replacement text to be associated with the
 
1467
        abbreviation.  That takes care of the duplicate
 
1468
        acronyms/abbreviations problem, though a writer would be
 
1469
        foolish to ever need it.)
 
1470
 
 
1471
        __ `inline parameter syntax`_
 
1472
 
 
1473
    How to define the full text?  Possibilities:
 
1474
 
 
1475
    1. With a directive and a definition list? ::
 
1476
 
 
1477
           .. acronyms::
 
1478
 
 
1479
              reST
 
1480
                  reStructuredText
 
1481
              DPS
 
1482
                  Docstring Processing System
 
1483
 
 
1484
       Would this list remain in the document as a glossary, or would
 
1485
       it simply build an internal lookup table?  A "glossary"
 
1486
       directive could be used to make the intention clear.
 
1487
       Acronyms/abbreviations and glossaries could work together.
 
1488
 
 
1489
       Then again, a glossary could be formed by gathering individual
 
1490
       definitions from around the document.
 
1491
 
 
1492
    2. Some kind of `inline parameter syntax`_? ::
 
1493
 
 
1494
           `reST <reStructuredText>`:acronym: is `WYSIWYG <what you
 
1495
           see is what you get>`:acronym: plaintext markup.
 
1496
 
 
1497
       .. _inline parameter syntax:
 
1498
          rst/alternatives.html#parameterized-interpreted-text
 
1499
 
 
1500
    3. A combination of 1 & 2?
 
1501
 
 
1502
       The multiple definitions issue could be handled by establishing
 
1503
       rules of priority.  For example, directive-based lookup tables
 
1504
       have highest priority, followed by the first inline definition.
 
1505
       Multiple definitions in directive-based lookup tables would
 
1506
       trigger warnings, similar to the rules of `implicit hyperlink
 
1507
       targets`__.
 
1508
 
 
1509
       __ ../ref/rst/restructuredtext.html#implicit-hyperlink-targets
 
1510
 
 
1511
    4. Using substitutions? ::
 
1512
 
 
1513
           .. |reST| acronym:: reST
 
1514
              :text: reStructuredText
 
1515
 
 
1516
    What do we do for other formats than HTML which do not support
 
1517
    tool tips?  Put the full text in parentheses?
 
1518
 
 
1519
  - "figure", "table", "listing", "chapter", "page", etc: See `object
 
1520
    numbering and object references`_ above.
 
1521
 
 
1522
  - "glossary-term": This would establish a link to a glossary.  It
 
1523
    would require an associated "glossary-entry" directive, whose
 
1524
    contents could be a definition list::
 
1525
 
 
1526
        .. glossary-entry::
 
1527
 
 
1528
           term1
 
1529
               definition1
 
1530
           term2
 
1531
               definition2
 
1532
 
 
1533
    This would allow entries to be defined anywhere in the document,
 
1534
    and collected (via a "glossary" directive perhaps) at one point.
 
1535
 
 
1536
 
 
1537
Unimplemented Transforms
 
1538
========================
 
1539
 
 
1540
* _`Footnote & Citation Gathering`
 
1541
 
 
1542
  Collect and move footnotes & citations to the end of a document.
 
1543
  (Separate transforms.)
 
1544
 
 
1545
* _`Reference Merging`
 
1546
 
 
1547
  When merging two or more subdocuments (such as docstrings),
 
1548
  conflicting references may need to be resolved.  There may be:
 
1549
 
 
1550
  * duplicate reference and/or substitution names that need to be made
 
1551
    unique; and/or
 
1552
  * duplicate footnote numbers that need to be renumbered.
 
1553
 
 
1554
  Should this be done before or after reference-resolving transforms
 
1555
  are applied?  What about references from within one subdocument to
 
1556
  inside another?
 
1557
 
 
1558
* _`Document Splitting`
 
1559
 
 
1560
  If the processed document is written to multiple files (possibly in
 
1561
  a directory tree), it will need to be split up.  Internal references
 
1562
  will have to be adjusted.
 
1563
 
 
1564
  (HTML only?  Initially, yes.  Eventually, anything should be
 
1565
  splittable.)
 
1566
 
 
1567
  Ideas:
 
1568
 
 
1569
  - Insert a "destination" attribute into the root element of each
 
1570
    split-out document, containing the path/filename.  The Output
 
1571
    object or Writer will recognize this attribute and split out the
 
1572
    files accordingly.  Must allow for common headers & footers,
 
1573
    prev/next, breadcrumbs, etc.
 
1574
 
 
1575
  - Transform a single-root document into a document containing
 
1576
    multiple subdocuments, recursively.  The content model of the
 
1577
    "document" element would have to change to::
 
1578
 
 
1579
        <!ELEMENT document
 
1580
            ( (title, subtitle?)?,
 
1581
              decoration?,
 
1582
              (docinfo, transition?)?,
 
1583
              %structure.model;,
 
1584
              document* )>
 
1585
 
 
1586
    (I.e., add the last line -- 0 or more document elements.)
 
1587
 
 
1588
    Let's look at the case of hierarchical (directories and files)
 
1589
    HTML output.  Each document element containing further document
 
1590
    elements would correspond to a directory (with an index.html file
 
1591
    for the content preceding the subdocuments).  Each document
 
1592
    element containing no subdocuments (i.e., structure model elements
 
1593
    only) corresponds to a concrete file with no directory.
 
1594
 
 
1595
    The natural transform would be to map sections to subdocuments,
 
1596
    but possibly only a given number of levels deep.
 
1597
 
 
1598
* _`Navigation`
 
1599
 
 
1600
  If a document is split up, each segment will need navigation links:
 
1601
  parent, children (small TOC), previous (preorder), next (preorder).
 
1602
  Part of `Document Splitting`_?
 
1603
 
 
1604
* _`List of System Messages`
 
1605
 
 
1606
  The ``system_message`` elements are inserted into the document tree,
 
1607
  adjacent to the problems themselves where possible.  Some (those
 
1608
  generated post-parse) are kept until later, in
 
1609
  ``document.messages``, and added as a special final section,
 
1610
  "Docutils System Messages".
 
1611
 
 
1612
  Docutils could be made to generate hyperlinks to all known
 
1613
  system_messages and add them to the document, perhaps to the end of
 
1614
  the "Docutils System Messages" section.
 
1615
 
 
1616
  Fred L. Drake, Jr. wrote:
 
1617
 
 
1618
      I'd like to propose that both parse- and transformation-time
 
1619
      messages are included in the "Docutils System Messages" section.
 
1620
      If there are no objections, I can make the change.
 
1621
 
 
1622
  The advantage of the current way of doing things is that parse-time
 
1623
  system messages don't require a transform; they're already in the
 
1624
  document.  This is valuable for testing (unit tests,
 
1625
  tools/quicktest.py).  So if we do decide to make a change, I think
 
1626
  the insertion of parse-time system messages ought to remain as-is
 
1627
  and the Messages transform ought to move all parse-time system
 
1628
  messages (remove from their originally inserted positions, insert in
 
1629
  System Messages section).
 
1630
 
 
1631
* _`Index Generation`
 
1632
 
 
1633
 
 
1634
HTML Writer
 
1635
===========
 
1636
 
 
1637
* Add support for _`multiple stylesheets`.  See
 
1638
  <http://thread.gmane.org/gmane.text.docutils.cvs/4336>.
 
1639
 
 
1640
* Idea for field-list rendering: hanging indent::
 
1641
 
 
1642
      Field name (bold): First paragraph of field body begins
 
1643
          with the field name inline.
 
1644
 
 
1645
          If the first item of a field body is not a paragraph,
 
1646
          it would begin on the following line.
 
1647
 
 
1648
* Add more support for <link> elements, especially for navigation
 
1649
  bars.
 
1650
 
 
1651
  The framework does not have a notion of document relationships, so
 
1652
  probably raw.destination_ should be used.
 
1653
 
 
1654
  We'll have framework support for document relationships when support
 
1655
  for `multiple output files`_ is added.  The HTML writer could
 
1656
  automatically generate <link> elements then.
 
1657
 
 
1658
  .. _raw.destination: misc.raw_
 
1659
 
 
1660
* Base list compaction on the spacing of source list?  Would require
 
1661
  parser support.  (Idea: fantasai, 16 Dec 2002, doc-sig.)
 
1662
 
 
1663
* Add a tool tip ("title" attribute?) to footnote back-links
 
1664
  identifying them as such.  Text in Docutils language module.
 
1665
 
 
1666
 
 
1667
PEP/HTML Writer
 
1668
===============
 
1669
 
 
1670
* Remove the generic style information (duplicated from html4css1.css)
 
1671
  from pep.css to avoid redundancy.
 
1672
 
 
1673
  We need support for `multiple stylesheets`_ first, though.
 
1674
 
 
1675
 
 
1676
LaTeX writer
 
1677
============
 
1678
 
 
1679
* Add an ``--embed-stylesheet`` (and ``--link-stylesheet``) option.
 
1680
 
 
1681
 
 
1682
HTML SlideShow Writer
 
1683
=====================
 
1684
 
 
1685
Add a Writer for presentations, derivative of the HTML Writer.  Given
 
1686
an input document containing one section per slide, the output would
 
1687
consist of a master document for the speaker, and a slide file (or set
 
1688
of filess, one (or more) for each slide).  Each slide would contain
 
1689
the slide text (large, stylesheet-controlled) and images, plus "next"
 
1690
and "previous" links in consistent places.  The speaker's master
 
1691
document would contain a small version of the slide text with
 
1692
speaker's notes interspersed.  The master document could use
 
1693
``target="whatever"`` to direct links to a separate window on a second
 
1694
monitor (e.g., a projector).
 
1695
 
 
1696
Ideas:
 
1697
 
 
1698
* Base the output on |S5|_.  I discovered |S5| a few weeks before it
 
1699
  appeared on Slashdot, after writing most of this section.  It turns
 
1700
  out that |S5| does most of what I wanted.
 
1701
 
 
1702
  Chris Liechti has `integrated S5 with the HTML writer
 
1703
  <http://homepage.hispeed.ch/py430/python/index.html#rst2s5>`__.
 
1704
 
 
1705
  .. |S5| replace:: S\ :sup:`5`
 
1706
  .. _S5: http://www.meyerweb.com/eric/tools/s5/
 
1707
 
 
1708
Below, "[S5]" indicates that |S5| already implements the feature or
 
1709
may implement all or part of the feature.  "[S5 1.1]" indicates that
 
1710
|S5| version 1.1 implements the feature (a preview of the 1.1 beta is
 
1711
available in the `S5 testbed`_).
 
1712
 
 
1713
.. _S5 testbed: http://meyerweb.com/eric/tools/s5/testbed/
 
1714
 
 
1715
Features & issues:
 
1716
 
 
1717
* [S5 1.1] Incremental slides, where each slide adds to the one before
 
1718
  (ticking off items in a list, delaying display of later items).  The
 
1719
  speaker's master document would list each transition in the TOC and
 
1720
  provide links in the content.
 
1721
 
 
1722
  * Use transitions to separate stages.  Problem with transitions is
 
1723
    that they can't be used everywhere -- not, for example, within a
 
1724
    list (see the example below).
 
1725
 
 
1726
  * Use a special directive to separate stages.  Possible names:
 
1727
    pause, delay, break, cut, continue, suspend, hold, stay, stop.
 
1728
    Should the directive be available in all contexts (and ineffectual
 
1729
    in all but SlideShow context), or added at runtime by the
 
1730
    SlideShow Writer?  Probably such a "pause" directive should only
 
1731
    be available for slide shows; slide shows are too much of a
 
1732
    special case to justify adding a directive (and node?) to the
 
1733
    core.
 
1734
 
 
1735
    The directive could accept text content, which would be rendered
 
1736
    while paused but would disappear when the slide is continued (the
 
1737
    text could also be a link to the next slide).  In the speaker's
 
1738
    master document, the text "paused:" could appear, prefixed to the
 
1739
    directive text.
 
1740
 
 
1741
  * Use a special directive or class to declare incremental content.
 
1742
    This works best with the S5 ideas.  For example::
 
1743
 
 
1744
        Slide Title
 
1745
        ===========
 
1746
 
 
1747
        .. incremental::
 
1748
 
 
1749
           * item one
 
1750
           * item two
 
1751
           * item three
 
1752
 
 
1753
    Add an option to make all bullet lists implicitly incremental?
 
1754
 
 
1755
* Speaker's notes -- how to intersperse?  Could use reST comments
 
1756
  (".."), but make them visible in the speaker's master document.  If
 
1757
  structure is necessary, we could use a "comment" directive (to avoid
 
1758
  nonsensical DTD changes, the "comment" directive could produce an
 
1759
  untitled topic element).
 
1760
 
 
1761
  The speaker's notes could (should?) be separate from S5's handout
 
1762
  content.
 
1763
 
 
1764
* The speaker's master document could use frames for easy navigation:
 
1765
  TOC on the left, content on the right.
 
1766
 
 
1767
  - It would be nice if clicking in the TOC frame simultaneously
 
1768
    linked to both the speaker's notes frame and to the slide window,
 
1769
    synchronizing both.  Needs JavaScript?
 
1770
 
 
1771
  - TOC would have to be tightly formatted -- minimal indentation.
 
1772
 
 
1773
  - TOC auto-generated, as in the PEP Reader.  (What if there already
 
1774
    is a "contents" directive in the document?)
 
1775
 
 
1776
  - There could be another frame on the left (top-left or bottom-left)
 
1777
    containing a single "Next" link, always pointing to the next slide
 
1778
    (synchronized, of course).  Also "Previous" link?  FF/Rew go to
 
1779
    the beginning of the next/current parent section?  First/Last
 
1780
    also?  Tape-player-style buttons like ``|<<  <<  <  >  >>  >>|``?
 
1781
 
 
1782
* [S5]  Need to support templating of some kind, for uniform slide
 
1783
  layout.  S5 handles this via CSS.
 
1784
 
 
1785
  Build in support for limited features?  E.g., top/bottom or
 
1786
  left/right banners, images on each page, background color and/or
 
1787
  image, etc.
 
1788
 
 
1789
* [S5?]  One layout for all slides, or allow some variation?
 
1790
 
 
1791
      While S5 seems to support only one style per HTML file, it's
 
1792
      pretty easy to split a presentation in different files and
 
1793
      insert a hyperlink to the last slide of the first part and load
 
1794
      the second part by a click on it.
 
1795
 
 
1796
      -- Chris Liechti
 
1797
 
 
1798
* For nested sections, do we show the section's ancestry on each
 
1799
  slide?  Optional?  No -- leave the implementation to someone who
 
1800
  wants it.
 
1801
 
 
1802
* [S5]  Stylesheets for slides:
 
1803
 
 
1804
  - Tweaked for different resolutions, 1024x768 etc.
 
1805
  - Some layout elements have fixed positions.
 
1806
  - Text must be quite large.
 
1807
  - Allow 10 lines of text per slide?  15?
 
1808
  - Title styles vary by level, but not so much?
 
1809
 
 
1810
* [not required with S5.]  Need a transform to number slides for
 
1811
  output filenames?, and for hyperlinks?
 
1812
 
 
1813
* Directive to begin a new, untitled (blank) slide?
 
1814
 
 
1815
* Directive to begin a new slide, continuation, using the same title
 
1816
  as the previous slide?  (Unnecessary?)
 
1817
 
 
1818
* Have a timeout on incremental items, so the colour goes away after 1
 
1819
  second.
 
1820
 
 
1821
Here's an example that I was hoping to show at PyCon DC 2005::
 
1822
 
 
1823
    ========================
 
1824
     The Docutils SlideShow
 
1825
    ========================
 
1826
 
 
1827
    Welcome To The Docutils SlideShow!
 
1828
    ==================================
 
1829
 
 
1830
    .. pause::
 
1831
 
 
1832
    David Goodger
 
1833
 
 
1834
    goodger@python.org
 
1835
 
 
1836
    http://python.net/~goodger
 
1837
 
 
1838
    .. (introduce yourself)
 
1839
 
 
1840
       Hi, I'm David Goodger from Montreal, Canada.
 
1841
 
 
1842
       I've been working on Docutils since 2000.
 
1843
       Time flies!
 
1844
 
 
1845
    .. pause::
 
1846
 
 
1847
    Docutils
 
1848
 
 
1849
    http://docutils.sourceforge.net
 
1850
 
 
1851
    .. I also volunteer as a Python Enhancement Proposal (or PEP)
 
1852
       editor.
 
1853
 
 
1854
    .. SlideShow is a new feature of Docutils.  This presentation was
 
1855
       written using the Docutils SlideShow system.  The slides you
 
1856
       are seeing are HTML, rendered by a standard Mozilla Firefox
 
1857
       browser.
 
1858
 
 
1859
 
 
1860
    The Docutils SlideShow System
 
1861
    =============================
 
1862
 
 
1863
    .. The Docutils SlideShow System provides
 
1864
 
 
1865
    Easy and open presentations.
 
1866
 
 
1867
 
 
1868
    Features
 
1869
    ========
 
1870
 
 
1871
    * reStructuredText-based input files.
 
1872
 
 
1873
      .. reStructuredText is a what-you-see-is-what-you-get
 
1874
         plaintext format.  Easy to read & write, non-proprietary,
 
1875
         editable in your favourite text editor.
 
1876
 
 
1877
      .. Parsers for other markup languages can be added to Docutils.
 
1878
         In the future, I hope some are.
 
1879
 
 
1880
      .. pause:: ...
 
1881
 
 
1882
    * Stylesheet-driven HTML output.
 
1883
 
 
1884
      .. The format of all elements of the output slides are
 
1885
         controlled by CSS (cascading stylesheets).
 
1886
 
 
1887
      .. pause:: ...
 
1888
 
 
1889
    * Works with any modern browser.
 
1890
 
 
1891
      .. that supports CSS, frames, and JavaScript.
 
1892
         Tested with Mozilla Firefox.
 
1893
 
 
1894
      .. pause:: ...
 
1895
 
 
1896
    * Works on any OS.
 
1897
 
 
1898
 
 
1899
    Etc.
 
1900
    ====
 
1901
 
 
1902
    That's as far as I got, but you get the idea...
 
1903
 
 
1904
 
 
1905
Front-End Tools
 
1906
===============
 
1907
 
 
1908
* What about if we don't know which Reader and/or Writer we are
 
1909
  going to use?  If the Reader/Writer is specified on the
 
1910
  command-line?  (Will this ever happen?)
 
1911
 
 
1912
  Perhaps have different types of front ends:
 
1913
 
 
1914
  a) _`Fully qualified`: Reader and Writer are hard-coded into the
 
1915
     front end (e.g. ``pep2html [options]``, ``pysource2pdf
 
1916
     [options]``).
 
1917
 
 
1918
  b) _`Partially qualified`: Reader is hard-coded, and the Writer is
 
1919
     specified a sub-command (e.g. ``pep2 html [options]``,
 
1920
     ``pysource2 pdf [options]``).  The Writer is known before option
 
1921
     processing happens, allowing the OptionParser to be built
 
1922
     dynamically.  Alternatively, the Writer could be hard-coded and
 
1923
     the Reader specified as a sub-command (e.g. ``htmlfrom pep
 
1924
     [options]``).
 
1925
 
 
1926
  c) _`Unqualified`: Reader and Writer are specified as subcommands
 
1927
     (e.g. ``publish pep html [options]``, ``publish pysource pdf
 
1928
     [options]``).  A single front end would be sufficient, but
 
1929
     probably only useful for testing purposes.
 
1930
 
 
1931
  d) _`Dynamic`: Reader and/or Writer are specified by options, with
 
1932
     defaults if unspecified (e.g. ``publish --writer pdf
 
1933
     [options]``).  Is this possible?  The option parser would have
 
1934
     to be told about new options it needs to handle, on the fly.
 
1935
     Component-specific options would have to be specified *after*
 
1936
     the component-specifying option.
 
1937
 
 
1938
  Allow common options before subcommands, as in CVS?  Or group all
 
1939
  options together?  In the case of the `fully qualified`_
 
1940
  front ends, all the options will have to be grouped together
 
1941
  anyway, so there's no advantage (we can't use it to avoid
 
1942
  conflicts) to splitting common and component-specific options
 
1943
  apart.
 
1944
 
 
1945
* Parameterize help text & defaults somehow?  Perhaps a callback?  Or
 
1946
  initialize ``settings_spec`` in ``__init__`` or ``init_options``?
 
1947
 
 
1948
* Disable common options that don't apply?
 
1949
 
 
1950
* Add ``--section-numbering`` command line option.  The "sectnum"
 
1951
  directive should override the ``--no-section-numbering`` command
 
1952
  line option then.
 
1953
 
 
1954
* Create a single dynamic_ or unqualified_ front end that can be
 
1955
  installed?
 
1956
 
 
1957
 
 
1958
..
 
1959
   Local Variables:
 
1960
   mode: indented-text
 
1961
   indent-tabs-mode: nil
 
1962
   sentence-end-double-space: t
 
1963
   fill-column: 70
 
1964
   End: