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

chr at home.se chr at home.se
Wed Jul 27 06:52:43 CDT 2005


On Wed, 27 Jul 2005, Patrick R. Michaud wrote:

> On Wed, Jul 27, 2005 at 12:37:01AM +0200, chr at home.se wrote:
> > 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
> 
> 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.

> Also, there are a couple of places where we could really use an
> explicit "new paragraph" markup.  In particular, one cannot
> presently do this:

What if we introduced a "null"-directive? Something that breaks the
function that swallows lines so to speak. It'd look like this

	%center%  This text is centered
	(:null:)
	%right% This text is right aligned

or maybe (:break:) is better than (:null:)? Or just use something like 
(:new-par:)?  In the category of charactes not available to everyone, we 
also find '§'.

> But I think using the --> markup to mean "control nesting level" as
> opposed to simply "indent" is one of the best ideas we've had on this
> topic in a very long time.  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?

> > But I think I'd prefer redefining '->' to mean increasing the 
> > nesting level, and have it indent normal paragraphs as a 
> > side/styling effect.
> 
> 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
	# Item 2. (nesting level 0)
	## Item 2.1 (nesting level 1)
	++> Paragraph, nesting level (2)
	
If we used '+>' to increase nesting level, we'd write as follows instead

	Paragraph in nesting level 0
	# Item 1. (nesting level 0)
	+> Paragraph, nesting level 1
	# Item 2. (nesting level 0)
	## Item 2.1 (nesting level 1)
	+> Paragraph, nesting level (2)

Or perhaps like this for consistency:

	Paragraph in nesting level 0
	# Item 1. (nesting level 0)
	+> Paragraph, nesting level 1
	# Item 2. (nesting level 0)
	+> # Item 2.1 (nesting level 1)
	+> Paragraph, nesting level (2)

Nah.. doesn't look very good. Anyway, hope it gives you some food for 
thought.

cheers
/Christian


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






More information about the pmwiki-users mailing list