DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:autonumbering

This is an old revision of the document!


Autonumbering Plugin

Compatible with DokuWiki

2012-01-25c "Angua", 2012-10-13 "Adora Belle", 2013-05-10a "Weatherwax", 2017-02-19 "Frusterick Manners"

plugin This plugin allows the use of multiples counters with multiples levels, within the same page.

Last updated on
2017-03-20
Provides
Syntax
Repository
Source

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 dokupp, indexnumber

Tagged with counter, level, numbering

Known Issues

This plugin doesn't work in headlines and this can't be fixed.

See forum: https://forum.dokuwiki.org/thread/9334

Syntax and Use

Base

Syntax: ~~#~~

  • Where ~~#~~ will be replaced by a number, auto incremented, and saved in a common counter.

Example:

Example number ~~#~~
Example number ~~#~~
Example number ~~#~~
--------------------
Result:
Example number 1
Example number 2
Example number 3

Explicit counter ID

Syntax: ~~#@COUNTERID~~

  • Where COUNTERID is an alphanumeric identificator, including unserscore, and starting with a @. This allows the use of multiple counters.

Example:

First counter = ~~#@ctr_ONE~~
First counter = ~~#@ctr_ONE~~
First counter = ~~#@ctr_ONE~~
Second counter = ~~#@ctr_TWO~~
Second counter = ~~#@ctr_TWO~~
First counter = ~~#@ctr_ONE~~
--------------------
Result:
First counter = 1
First counter = 2
First counter = 3
Second counter = 1
Second counter = 2
First counter = 4

Forced numbering

Syntax: ~~#NUM~~

  • Where NUM is a positive number that will be the begining of the auto incrementation from there.

Example:

Counter = ~~#~~
Counter = ~~#6~~
Counter = ~~#~~
--------------------
Result:
Counter = 1
Counter = 6
Counter = 7

Multiple levels

Syntax: ~~#.#~~

  • Where .# represent a sublevel and can be repeated as much as needed.

Example:

Level = ~~#~~
Level = ~~#.#~~
Level = ~~#.#.#~~
Level = ~~#.#.#~~
Level = ~~#.#~~
Level = ~~#.#.#~~
Level = ~~#.#.#~~
Level = ~~#~~
--------------------
Result:
Level = 1
Level = 1.1
Level = 1.1.1
Level = 1.1.2
Level = 1.2
Level = 1.2.1
Level = 1.2.2
Level = 2

Text level

Syntax: ~~TEXT.#~~

  • Where TEXT is alphabetic (without number) and will be reproduce in the number. Only # is an auto incremented number.
  • Note: When using text in a level, it will be implicitly used as counter ID if no counter ID have been set explicitly (see « Explicit counter ID » above). In case of multiple levels with text, they will be concatenated to form a single counter ID. In the example below, the counter ID will be « KungFu ».

Example 1:

~~Kung.Fu.#~~
~~Kung.Fu.#~~
~~Kung.Fu.#~~
--------------------
Result:
Kung.Fu.1
Kung.Fu.2
Kung.Fu.3

FAQ

Discussion

I republished this plugin as I found it useful. The original code is by Patrice Bonneau

plugin/autonumbering.1490023050.txt.gz · Last modified: 2017-03-20 16:17 by 84.226.72.171

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki