[pmwiki-users] Nesting elements (Was: Numbered lists ...)

Patrick R. Michaud pmichaud at pobox.com
Wed Jul 27 07:25:34 CDT 2005


On Wed, Jul 27, 2005 at 01:52:43PM +0200, chr at home.se wrote:
> > A couple of quick observations... first, we already have a -> markup,
> > although I'm not opposed to changing it for something like this,
> > and second, it seems a little odd to me that "->" (two characters)
> > results in the same nesting level as '#' (one character).
> 
> Oh, I think that'll be difficult.. unless you'd want to use '+' for this. 
> But that seems like a *bad* idea...
> 
> 	# Item 1.
> 	+ Nested paragraph
> 	# Item 2.

Oh, I had forgotten about plus!  John Rankin and I had actually played
with this a bit back in very early devel days of PmWiki 2.  I'm trying
to think if '+' would break anything here...

> > If we could eliminate the character count
> > mismatch I'd be all over it.  As it is I'm hoping for something slightly
> > better (but may not hold my breath for it and might just go with ->).
> 
> Would '+>' be an alternative?

Well, it still have the same problem as '->' in that it's two characters
to indicate the first-level indent.

> > As opposed to phrasing this as "increase nesting level" I think we 
> > should simply say that --> is "move to nesting level", using any 
> > existing open block at that level if it exists, and creating new 
> > indented nested levels if it doesn't.
> 
> I'm not quite sure I understand here with the open blocks and that..
> However, we have two choices here.
> * Use markup that explicitly sets the nesting level (move to...)
> * Use markup that *changes* the nesting level (increase from previous...)
> 
> Let's assume '+>' (arbitrarily chosen) is the markup. If it is for setting
> a nesting level, where 0 is the base nesting level, it'd look like this:
>
> 	Paragraph in nesting level 0
> 	# Item 1. (nesting level 0)
> 	+> Paragraph, nesting level 1
> ...

Hmmm, I think we're talking about two different items -- I'm not
really concerned with "nesting level" as much as I am with "indent
level".  I think I'd prefer to talk about indent levels (because
that's how authors will invariably see it).  Still using +> as an
arbitrary choice of marker...

    # Item 1 (indent level 1)
    +> Paragraph, indent level 1
    +> Paragraph, indent level 1
    # Item 2 (indent level 1) 

> If we used '+>' to increase nesting level, we'd write as follows instead

What you say as "increase nesting level" I prefer to think of as "continue
at current indent level"...

    Paragraph at left margin
    # Item 1 (indent level 1)
    +> Paragraph (indent level 1)
    # Item 2 (indent level 1)
    ## Item 2.1 (indent level 2)
    +> Paragraph (indent level 2)

The downside of +> as "continue at current level" is that there's not
a way to get back to a previous level -- i.e., one can't get the last
paragraph above back at indent level 1.

Still, + has some possibilities:

    # Item 1 (indent level 1)
    + Paragraph at indent level 1
    ## Item 1.1 (indent level 2)
    ++ Paragraph (indent level 2)
    + Paragraph (indent level 1)
    # Item 2 (indent level 1)

However, somehow I think I still like the '->' markup best for this;
it already exists (less for authors to learn) and it already looks like 
exactly what it does.  Thus:

    # Item 1 (indent level 1)
    -> Paragraph at indent level 1
    ## Item 1.1 (indent level 2)
    --> Paragraph at indent level 2
    -> Paragraph at indent level 1
    # Item 2 (indent level 1)

Comments?

Pm




More information about the pmwiki-users mailing list