Learn about DokuWiki
Learn about DokuWiki
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to autonumbering
This plugin basically allows one to set up “magic counters” to provide numbering of items (nearly) anywhere one wants. If at some point you need to break and continue a numbered list and the list formatting plugins do not look like they would provide this easily, for example, then perhaps you can try this one!
The author strongly recommends uninstalling previous versions of this plugin before installing to prevent class name conflicts.
See the plugin in action in the Official Demo Page.
You use the
@#@ tag in order to insert an automatic counter. Every time you invoke this syntax, the counter is increased and the next number is displayed.
This creates a row of numbers starting at zero: @#@, @#@, @#@, @#@, @#@, @#@ and @#@.
Using this snippet you should see:
This creates a row of numbers starting at zero: 0, 1, 2, 3, 4, 5 and 6.
You can create your own, named counter, and assign an initial value to it. When you select a counter by name, all subsequent invocations of
@#@ syntax will refer to that counter until you decide to select another one.
Select (or create) a counter named 'houses', starting at one: @#houses=1@ Select (or create) a counter named 'trees', starting at seven: @#trees=7@ Select the 'houses' counter again, continue where it left: @#houses=@ Select the default, unnamed counter, continue where it left: @#=@
Counter names must be single words in lowercase (eg.: “
The default (unnamed) counter starts at zero. To start it at a higher value select it with a new number:
@#=5@ The following shows the number @#@, and this @#@ showed the next number. After all that comes @#@.
Half way the counter was initialized to 5, for example, you should see this:
The following shows the number 5, and this 6 showed the next number. After all that comes 7.
In the current version (2013-09) the following syntax is allowed:
@#=number@to (re)initialize the default counter.
@#@to invoke the counter and display its current value.
@#name@to select a new counter.
Initializing the counter (this produces no observable output by default):
@#=5@ // initializes with the value 5//
Invoking the counter:
The following shows the number @#@, and this @#@ showed the next number. After all that comes @#@.
Only one counter can exist in a page. Not anymore! Rejoice!
Using insertion plugins like include may break the display of the counter.
Caveats, sample snapshots and a ChangeLog are provided at the official demo site.
Issues can be submitted to the source repo's tracker (following or commenting on issues requires a login).
No questions yet?
No discussion yet?