[pmwiki-users] Quick way to automatically set %item value=<n>%
    christian.ridderstrom at gmail.com 
    christian.ridderstrom at gmail.com
       
    Tue Feb 14 01:18:04 CST 2006
    
    
  
Hi
I'd like to bring up two things, so I'll start with the slightly unrelated 
issue first :-)
The first issue: When I was trying to figure out how make an enumerated
list start with a specific number I had some problems locating this
markup. Does anyone have an idea of a suitable place to add some (more)
documentation of this markup:
	# %item value=<n>% Bla bla .. this is item ''n''
What I was really doing was trying to make a list like this:
	# Bla bla .. item 1 ... insert the command
	--> [@
	ls ..
	@]
	-> and then the command
	--> [@
	ls ...
	@]
	# Bla bla ... item 2
However, '->' cancels the enumeration count so I instead end up doing
	# Bla bla .. item 1 ... insert the command
	--> [@
	ls ..
	@]
	-> and then the command
	--> [@
	ls ...
	@]
	# %item value=2% Bla bla ... item 2
See http://pmwiki.org/wiki/Test/ManuallySetEnumeratedLists for an 
illustration. Perhaps we don't want '->' to reset the enumeration?
The second issue: It's error prone to write '%item value=<n>% all the time
because you manually have to track the number and change it if inserting
an item above. How about making this slightly smarter, what if this
markup:
	# %item value=#% Bla bla .. this item is nr=previous item + 1
would work instead. I imagine that implementation should be as simple as 
the '#'-markup keeping an array of numbers indicating the current number 
at the current entry. '%item value=#%' would then set the current number 
according to $CurrentItem[$itemLevel], while incrementing it.
cheers
/Christian
-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr
    
    
More information about the pmwiki-users
mailing list