• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..Today-

conf/H10-Jan-2022-106

lang/H10-Jan-2022-1610

README.mdH A D19-Apr-20162.5 KiB8059

action.phpH A D19-Apr-20161.2 KiB4124

indexnumber_icon.pngH A D19-Apr-2016250

plugin.info.txtH A D19-Apr-2016285 87

script.jsH A D19-Apr-20161.9 KiB6840

style.cssH A D19-Apr-2016159 55

syntax.phpH A D19-Apr-20163.9 KiB14477

README.md

1# Index numbers plugin
2
3This DokuWiki syntax plugin creates counters with prefixes, for numbering
4and labeling images and tables with indexes like "Tab. 1: Types of animals"
5or "Fig. 3". The content between the `idxnum` tags will be wrapped in a
6`<div>` tag in the HTML output.
7
8Individual counters and their prefix can be referenced with the
9[indexreference](https://github.com/gbirke/indexreference) plugin.
10
11## Installation
12Copy the `indexnumber` folder into the `lib/plugins` folder of your DokuWiki installation.
13
14If you want to insert specific counter names (see below), go to the Wiki
15configuration page and edit the field for index numbers configuration.
16Put each counter name on a new line.
17
18If you want to have separator chars between the index number and the description
19you can also configure that on the wiki configuration page. Note that the plugin
20inserts no space after the separator char, you'll have to enter the space yourself.
21
22## Tag syntax
23Syntax for creating a counter number is
24
25    <idxnum countername #id Description>
26       some text, {image} or |table|
27    </idxnum>
28
29`countername` is an arbitrary string like "Tab." or "Fig." that must not contain
30the "#" character. All `idxnum` tags with the same counter name will produce sequential
31numbers.
32`#id` must be a number, prefixed by the # char. Each number must be unique for the page!
33The id can be used for referencing the generated number with the indexreference plugin.
34`Description` is an arbitrary description and will be added to the output after
35the index number. You can leave out the description but if you have a description
36you **must** have an id. If the description contains angle brackets, they must be
37escaped as their entities (`&lt;` and `&gt;`).
38
39Please note that `idxnum` tags cannot be nested!
40
41### Example Page
42
43    This is the first image:
44    <idxnum Fig.>
45    {{computer.jpg}}
46    </idxnum>
47
48    This is the second image, with a description. Note that the id is arbitrary
49    <idxnum Fig. #99 A beautiful tree>
50    {{tree.jpg}}
51    </idxnum>
52
53    Interspersed table with a different counter:
54    <idxnum Tab. #1 Some numbers>
55    ^Foo^Bar^
56    |42|47|
57    |7|11|
58    |6|0|
59    </idxnum>
60
61    Third image. Note how the counter is independent from id and the table counter
62    <idxnum Fig. #4 Snowy landscape>
63    {{snow.jpg}}
64    </idxnum>
65
66## Changelog
67
68### Version 1.2
69Release for newer DokuWiki versions
70
71### Version 1.1.1
72Bugfix for Toolbar buttons
73
74### Version 1.1
75Toolbar buttons
76
77### Version 1.0
78First release
79
80