[pmwiki-users] Re: Numbered lists and multi-paragraph

chr at home.se chr at home.se
Tue Jul 26 17:37:01 CDT 2005


On Mon, 25 Jul 2005, DaveG wrote:

> Longer term I think we're actually talking about two different problems 
> here:
> 1. How to continue an indent format across paragraphs (possibly more 
>    generically stated as how to force any format across paragraph 
>    breaks).
> 
> 2. How to indicate multiple levels of varying indent numbering.

It's a nice thought to separate these issues. I'd phrase it like this 
however:

1. How to continue writing an item over several lines without having
   to use lots of line continuation characters such as '\'.

2. How to indicate that an element/block should be indented one or
   more levels and therefore not break an enumerated list.

> > So, the approach I'm currently leaning towards is making PmWiki smart
> > enough to know when leading spaces mean "preformatted text", and when
> > they mean "continue something within the current list item".  

I'm glad to hear it (unfortunately I haven't had time to finish my 
description/documenation of how this should work). It'd be really good to 
have something that did this though...

Anyway, as for the second case with the enumerated list, I was reminded of
how easy it is in Lyx to create arbitrarily compliated list. The principle
was that each "element" had a "nesting level". So when you wanted a
paragraph of normal text to not break a list, you simply increased the
nesting level of that paragraph. As a side effect, this also indented the
paragraph by default. Taking inspiration from there, maybe we could do it
with this kind of markup:

----------------
# First item
-> Nested paragraph - does *not* break enumeration (due to the '->')
# Second item

This paragraph is not indented, it therefore breaks the enumeration.

# First item. (1.)
  This line belongs to the first item.
-> Also a nested paragraph, does not break enumeration
## Item 1.1.
--> Twice nested parapgrah, does not break ...
## Item 1.2
-> Par. only nested once, thus breaks one of the enumerations
## Item 1.1 - again!
# Item (2.)
----------------

We don't necessarily have to use '->' to indicate nesting, we could use 
'=>' instead for instance. But I think I'd prefer redefining '->' to mean 
increasing the nesting level, and have it indent normal paragraphs as a 
side/styling effect.

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr







More information about the pmwiki-users mailing list