[Doc-SIG] Auto-Numbered Enumerated Lists (reStructuredText)

Tony J Ibbs (Tibs) tony@lsl.co.uk
Mon, 29 Apr 2002 09:55:48 +0100


Another alternative for auto-numbered lists, sort-of similar to the way
we handle footnotes at the moment, is to allow::

   #1. First item.
   #3. Aha - I edited this in later.
   #2. Second item.

This requires the user to ensure that list items are still unique -
probably a good thing. I would suggest that it *not* be possible to have
two adjacent lists with this mechanism - so the problems David describes
with the list::

       1. Item 1.

       1. Unintentional duplicate of item 1.

       2. Item 2.

would not be allowed - one would have to place a comment (or some other
"breaking" text) between the two item 1.s to get two lists. I don't see
that as a particularly onerous restriction.

Presumably one would also allow::

    #a. The first item

    #1. This *is* a new list.

to mean two lists, though.

As a side-effect, would we then allow people to assume that such items
could be referred to? Consider the following::

    We have a list.

      1. The first item
      2. The second item
      3. The third item

    In item 2, we see the middle item.

With autonumbering, such a textual reference is more problematical - but
maybe we could allow::

    We have a list.

      #1. The first item
      #3. The second item
      #2. The third item

    In item #3_, we see the middle item.

(and no, I realise that syntax is likely to be wrong, but it's the
*concept* I'm interested in).

On the other hand, I'm actually agnostic on whether we need autonumbered
lists at all - but then I'm the sort of person who will go back and
adjust indentation in a long document to make it look pretty, anyway, so
I'm maybe not the best person to judge!

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
Well we're safe now....thank God we're in a bowling alley.
- Big Bob (J.T. Walsh) in "Pleasantville"
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)