Tags:
create new tag
, view all tags
I use TWiki quite a bit for making lists of things. I find the current input method of lists (Tab-Star-Space) to be rather awkward to type over and over again as I try rapidly brain dump things. I get focused on the input method, rather than the content.

I find this to get even worse when I'm editing an existing list, because my TABs have become translated to four spaces, so new things are lined up right, and I HATE consecutive leading spaces, especially when I press TAB and not space.

I've tried using pre-blocks, but then I loose the auto-linking of WikiWords.

So, I'd like to request a new "List Mode". I open to a number of different ways to do it, but what the best I've come up with is a new start/end tag (<wlist></wlist>). Between these tags, every line is a list item. Is this reasonable?

-- TWikiGuest (dcorbin@ieeePLEASENOSPAM.org) - 18 Mar 2001

I personally also do not like the fixed prefix of "three spaces times indent level" syntax. This is legacy spec from JosWiki.

We should enhance the syntax to allow any number of spaces (or tabs) and TWiki should figure out the correct level of indentation.

Example to type:

 * first bullet, level one (one space in this case)
 * second bullet, level one
   1 level two, numbered list (three space in this case)
   1 level two
    * level three (four space in this case)
 * back to level one
  * this would go to level one as well since it is less then level two

   * A new bullet (because of empty line), level one
      * Level two
         * Level three (to support existing spec)

At least one space (or tab) should be required so that we do not have unwanted side-effects, i.e. if we paste text into TWiki and the first char happens to be an asterisc or a number.

-- PeterThoeny - 20 Mar 2001

Another wiki tool (UseMod) uses the following convention, which avoids having to deal with spacing issues:

* level 1, item 1
** level 2, item 1.1
* level 1, item 2
** level 2, item 2.1
** level 2, item 2.2
etc.

A similar convention is used for numbered lists. Unfortunately, the two conventions cannot be intermixed (UseMod bug?) as you illustrate in your example above.

Would this be a usable alternative?

-- PaulWagner - 21 Mar 2001

Removing the spacing requirements would be a good idea, as I also agree that it is somewhat cumbersome to be sure to type those three spaces in and all that, so I suggest the following alternatives:

  • On topic edit, parse all leading spaces (of a list) into tabs, so that the user edits in this more natural convention, but revert this in topic save, so that twiki itself can keep the current convention
  • On topic save, parse all leading spaces into tabs, and then use a more natural number of tabs convention for twiki itself
  • remove the number of spaces requirement, and set a flexible number (i.e. 1-3 level 1, 4-6 level 2, etc.), this would be much easier than trying to guess the levels by previous history, as suggested before. But we still would have to keep track of the number of spaces, it would just be more forgiving of mistakes.

-- EdgarBrown - 21 Mar 2001

I double checked the generated XHTML code with w3c's validator and made some more tweaks to the code. All is now valid except for lists. XHTML requires closing tags, e.g. a single <li /> tag is not valid. This needs to be fixed, a good candidate for doing it at the time when relaxing the list syntax as described above.

-- PeterThoeny - 20 Nov 2001

I'd prefer Paul's proposal over the others, for several reasons:

  • On Windows, you cannot easily enter tabs into an edit field. (The original WikiWiki used tabs, the three-spaces convention was introduced to give Windows users a chance to edit topics.)
  • Tabs tend to indent far too far to the right.
  • Using whitespace for indenting makes it difficult to count how far you're actually indented. Stars are much easier to count (actually one doesn't count them, one compares visual appearance).

-- JoachimDurchholz - 21 Nov 2001

I'd rather not go Paul way: what is nice about wiki is that you can use the TWiki syntax in all your text documents (quick notes, emails, comments in code) for easy cut n paste. Paul syntax would seem awkward in emails to non-wikiers for instance...

I'd rather suggest allowing 2 spaces instead of three, that would make for an easier count

-- ColasNahaboo - 22 Nov 2001

I agree, both about using the TWiki syntax in other text documents, and reducing the spaces to two.

-- RandyKramer - 22 Nov 2001

The TWikiAlphaRelease produces now valid XHTML for lists. This has been verified with http://validator.w3.org/ . No change to the syntax has been made yet.

Please note that it is not valid XHTML to skip nesting levels, i.e. starting a bullet with 6 spaces is invalid. If you do that you get an empty bullet for each skipped level (this is new spec):

    • This bullet starts with nesting level two (six spaces)
    • Next bullet

To-do: Relax syntax for bullets.

-- PeterThoeny - 25 Nov 2001

<new interjected comment> I didn't see much of a problem with the above, until I realized that leaving a blank line creates the same problem. Look at these two examples -- the first with no blank lines, the second with a blank line between each item:

  • Item 1
  • Item 2
    • Item 2a
    • Item 2b

  • Item 1

  • Item 2

    • Item 2a

    • Item 2b

-- RandyKramer - 31 Dec 2001

This is because an empty line finishes a list. If you want to have a vertical spacer within a list you need to use <p />, i.e. write

   * Item 2
     <p />
      * Item 2a
        <p />
      * Item 2b

-- PeterThoeny - 31 Dec 2001

Thanks, Peter!

-- RandyKramer - 01 Jan 2002

As a followup to this (sort of) anyway, I'd like to suggest (as an RFE) a new list syntax that creates lists with spacing as discussed above). I'd see this as not replacing the existing syntax but an addition to. Further brainstorming -- maybe the syntax could be something like " *! ", " *! ", etc. -- not sure it makes sense (! often means "not") but just trying to suggest something. Ideally, I'd like to be able to create lists with 0, 1, or multiple blank lines (and indented or unindented paragraphs) between list elements and have them rendered (and numbered) correctly.

I guess I should learn more about stylesheets (CSS) -- maybe I can do what I want with stylesheets (or do they only work client side?? -- I mean, would each viewer of my wiki site have to somehow install the right stylesheet to see a page as I intend?)

-- RandyKramer - 20 Jan 2003

About two months ago, while TWiki was down because of the Sourceforge compromise, I posted a modification to TWiki.pm that supported numbered lists and headers using the ---# (or " # " syntax for lists) which is exclusively reserved in TWiki for that reason, but is currently accepted as an alternate. It was about 99% correct. I was originally going to do it as a plugin, but the problem is that the processing was stateful across the topic (meaning I'm not certain a plugin would have been appropriate). The nice thing is that it also supported include files, which meant you could create a TOC and topic that was build from multiple topics (kind of like the TOC plugin, but just uses standard TWiki syntax). The other nice thing was (this is the stateful part), it would put numbering "on hold" while it was displaying non-numbered headers. What you saw was

1.0 Introduction

1.1 Overview

2.0 Design

2.1 Backend System

2.2 Presentation Layer

2.2.1 User Flow

The numbers were automagically generated.

Unfortunately, I don't think anybody on the dev list saw this as interesting to add to the Athens release, and it's my darn fault for not posting it as a topic once TWiki was back up again.

Anyway, I think it's almost "ready for Athens", but I think Peter probably won't allow such a "radical" mod to be injected this late in the release cycle (it also has a small bug in it during TOC generation)

-- DavidWeller - 29 Nov 2001

* I think this was John T's comment above. Don't know where the sig block went to.

Sorry, John, I made a boo-boo roll eyes (sarcastic) -- I've added it (DGW)

Also under better lists would be formatting as described in FormattingListsAfterNestedListItems.

-- JohnRouillard - 18 Dec 2001

Wow. whew. OK, this isn't directly related to BetterLists, but I've started modifications to TWiki.pm to support NumberedHeadersAndLists. I've posted a lot of stuff over there, including a modified TWiki.pm (based on the version as of 19 Feb 2002). Please give it a look-see. It turned out to be more annoying to write than I expected.

-- DavidWeller - 23 Feb 2002

Did this get rolled into Beijing or is this a dead topic/implementation?? I hope so as it looks pretty interesting. I might though suggest a keyword that could be used to automatically turn existing headings into numbered without changing the syntax. Perhaps something like %LISTAUTONUM{on}% ??

Frankly I ended up at this topic because I was wondering why I couldnt create a bullet list that is NOT indented without resorting to <LI> in the twiki. Any rationale why a line that begins with an asterisk doesnt become a non-indented bulleted item??

-- JohnCavanaugh - 18 Jan 2003

Added an additional comment under my comment of 1 Jan 2002, above.

-- RandyKramer - 20 Jan 2003

Edit | Attach | Watch | Print version | History: r25 < r24 < r23 < r22 < r21 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r25 - 2008-09-02 - TWikiJanitor
 
  • 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.