Tags:
create new tag
, view all tags
And most significantly of all, NumberedHeadersAndLists which actually deals with generating a a Normal (i.e. "ALR" (Arabic-Latin-Roman) Numbered indented list. It:
  1. Maintains the State of count throughout a single series of list elements
  2. Has a syntax (is " #" <- three spaces for each level increase) for numbered indented lists


List Restart

What if a list is interrupted?

The Problem

Suppose I create a Topic which has a numbered list:

   1 Point 1
   1 Point 2
   1 Point 3

which displays as

  1. Point 1
  2. Point 2
  3. Point 3

but someone come along and makes a comment on point 2 so that it now reads

   1 Point 1

Good point but ....

   1 Point 2
   1 Point 3

which displays as

  1. Point 1

Good point but ....

  1. Point 2
  2. Point 3

What we want is somwe way of restarting that list.

Syntax of Solution

This is a suggestion. I've tried to come up with something general.

A the code for a numbered list looks at the first number and starts the list from there, so we can have a list starting at 20:

   20 Item 20
   1 Item 21
   1 Item 22

(Hmmm. Looks odd.)

So the previous problem get re-written as

   1 Point 1

Good point but ....

   2 Point 2
   1 Point 3

The HTML syntax for ordered lists allows the start attribute. So we can write things like

   <ol start=2>
and
   <ol start=20>

So how does that appear in the Topic for the user editing? As I said:

   20 Item 20
   1 Item 21
   1 Item 22

Alternative syntax suggestion

Instead of putting an explicit number at the start of the list continuation, how about a short indicator, such as <cont>, to say "The 1 means numbered list, then continue the most recent list count."?

That is,

   1<cont> Item 20
   1 Item 21
   1 Item 22

Or even more briefly (for the C++ programmers in the house!):

   1++ Item 20
   1 Item 21
   1 Item 22

If you wanted the above a little less geekish, just use a single +. wink

-- StewStryker - 06 Jan 2003


List Item continuation paragraphs

The Problem

Suppose I want something to appear as
     1 Item 1.  Text about item 1
       
       Continued item 1 paragraph

     2 Item 2.

Syntax of Solution

Someone suggest something please.


Lists with other than numbers

The Problem

What if I want a list that appears as:

    a. Item 1
    b. Item 2
    c. Item 3

Syntax of Solution

This is a suggestion. I've tried to come up with something general.

The HTML syntax for ordered lists allows for the tye attribute. So we can write things like

   <ol type="a">

for the above example,
and
   <ol start="i">

If we want small roman numberals.

So how does that appear in the Topic for the user editing?

    a Item 1
    a Item 2
    a Item 3

Varations and Complications

So what if I end up editing somethign that reads

    a. Item 1
    1  Item 1.a
    a Item 2
    20 Item 2.t
    a Item 3


-- AntonAylward - 02 Jan 2003

To add comment into a list without breaking numbering, do not start new paragraph. Break a lime using %BR% variable (which is just <br /> HTML tag). You can see it here: Sandbox.SandBox22. I hope it solved basic problem (restart list numbering), for more complicated numbering schemes: just don't do it wink

I also added this tip into WikiSyntax page.

-- PeterMasiar - 03 Jan 2003

What do you mean "Just Don't Do It"! One of the uses, here at least, of a Wiki is documenting specifications and requirements. While the original might have the items in numerical order, the change requests have lots of elisions that get written up in this form.

-- AntonAylward - 03 Jan 2003

I'm in much the same situation here. Having left my holiday-work until last minute, I've set about converting our existing information into my new TWiki for deployment next week.

The first document I come across, has numbered lists, each item having a blank-line between it and the next. I really didn't expect this to be such a problem. I guess the way I'd like it would be for the numbering to continue indefinately until it's told to restart.

For example:

   1 This is the first

   1 This is the second

   Some other things here (and I want to align them with the paragraph above !!)

      1 This is a sub heading

   Some other things

      1 This is another sub heading

   1 This is the third

   1!

Where the numbering would work as expected, in sequence, and then when it reaches the 1!, it knows that the next set of numbering should start from the beginning. I wouldn't know where to start on this though - for the time being, I'm having to use the %BR%&nbsp;\ workaround.

-- MichaelKearns - 03 Jan 2003

How about using the value of the first item listed as the starting point for numbers (and letters):

   1 this is the first point

with an added comment

   2 this is the second point, started with a "2"
   2 this is the third point, started with any old number

      1.a this is point 3.a started with '[number].[letter]'
      1.a this is point 3.b, started with an "1.a"

results in:

  1. this is the first point
  2. with an added comment

  3. this is the second point, started with a "2"
  4. this is the third point, started with any old number
    1. this is point 3.a started with an '[number].[letter]'
    2. this is point 3.b, started with an "1.a"

-- MattWilkie - 06 Jan 2003

That's not far from my original suggestion.

The re-start is the key. Once you've re-started, any numer says its OK to carry on.

I note that this is perfectly in accord with the natural tendency people have to write things like...

   1 Point 1
   2 Point 2
   3 Point 3
discussion of point 3
   4 Point 4
      a Point 4.a
      b Point 4.b

and in doing so will make the Twiki syntax more transparent. "Good thinking, Batman!"

-- AntonAylward - 06 Jan 2003

So we are in agreement then. But I must be pedantic and note that the syntax for alphabetical ordered list must be either [number].[letter] or [letter]. .Otherwise a person starting a paragraph with "   A plea to all programmers to..." will become a list item. (a first line indented paragraph is desirable in book or article writing styles).

Actually now that I think about, the separation character for a. syntax should be expanded to include comment punctuation characters: a) (a) a] [a] ...etc.

-- MattWilkie - 07 Jan 2003

I can understand why you want to be pedantic.

It comes down to this: how much context does the parser-editor carry with it? If the parser can carry context then we can use the short form and see the long form.

However, we should not be thinking in terms of convenience for the programmer but rather convenience for the non-programmer user. This is of paramount importance.

My point, which I state in my BetterMarkup threads, is that we want something natural for the user. Hence we need to accompdate the people who will write:

   1  Point 1
   1. Point 1
   1) Point 1
      a  Point 1.a
      a) Point 1.a
      a. Point 1.a
      a] Point 1.a 
     (a) Point 1.a
     [a] Point 1.a
      1.a Point 1.a
      1.a) Point 1.a

As Norbert Weiner pointed out over half a century ago, misquoting Lewis Carrol, its a matter of who is to be in command, the user or the computer.

If the user can express himself freely it makes buy-in for the wiki easier. If the user is straight-jacketed to a syntax that doens't permit easy expression then it won't get used - or rather will only get used by the more programmer types who will - as you and I have done to make out points - jam HTML down its throat. Which defeats the whole purpose of the Wiki.

-- AntonAylward - 06 Jan 2003

My new user just asked for following: When breaking list with <BR> tag, I have to continue text in same line, otherwise this happens:

  1. list item #1
    try to add text after <BR> tag, without beginning new line: Good! Exactly as I wanted
try again, but started from line beginning afer entering RETURN: bad! list ended
  1. list item #2

Starting text from line beginning after newline ends list. Can we have some markup, like \\ or something, which will eat up newline and allow for nicer text formatting? What I need is to escape (prevent creating) new paragraph -- <P> tag. Is it possible?

-- PeterMasiar - 10 Jan 2003


What if a non-list text indented to the level of a list item was understood to be associated with the list item.

The following text:

   1 Point 1
   1 Point 2
   Indented comment on Point 2. Since the first non-whitespace character after a list element
has the same indentation as the list element, this TWiki paragraph is associated with Point 2.

   So is this paragraph
   1 Point 3

   |Other markup | works as well|

But outdented text would terminate the list
   1 New list

would render something like:

  1. Point 1
  2. Point 2

    Indented comment on Point 2. Since the first non-whitespace character after a list element has the same indentation as the list element, this TWiki paragraph is associated with Point 2.

    So is this paragraph

  3. Point 3
    Other markupworks as well

But outdeneted text would terminate the list

  1. New list

This would preserve one of the features I like about the current method of numbering a list, whcih is that the list number doesn't matter. (This feature lets me reorder a list by cut-and-paste list without breaking the list.) Also, this syntax would work for unordered lists. And best of all, I could imagine explaning this to users.

-- ScottGargash - 23 Nov 2003

OP (Off Point): I've wanted to do something similar, and finally learned how to do it by inserting <br />s (where you have <p> </p> pairs). I learned something, thanks!

-- RandyKramer - 23 Nov 2003

Comments aren't the only thing that can interrupt lists, and for some =
= doesn't provide a workaround. Consider tables:

   1. First Item 
| *1* | *2* || *3* |
|^| *a* | *b* |^|
   1. Second Item

produces

  1. First Item
    1 2 3
    a b
  2. Second Item

So I strongly support either the 1+ or the 1<cont> notations, or anything else that permits me to put a table as part of an item in a list.

-- NickAckerley - 25 Nov 2005

Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r19 - 2005-11-25 - FranzJosefSilli
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.