====== indexnumber Plugin ====== ---- plugin ---- description: Insert numbered captions for images, tables etc. author : Gabriel Birke email : gb@birke-software.de type : syntax lastupdate : 2013-01-15 compatible : Angua, Adora Belle, Weatherwax depends : conflicts : similar : autonumbering tags : numbering, counter, index downloadurl: https://github.com/gbirke/indexnumber/archive/master.zip bugtracker : https://github.com/gbirke/indexnumber/issues sourcerepo : https://github.com/gbirke/indexnumber ---- This DokuWiki syntax plugin creates counters with prefixes, for numbering and labeling images and tables with captions like "Tab. 1: Types of animals" or "Fig. 3". The content between the ''idxnum'' tags will be wrapped in a ''
'' tag in the HTML output. Individual counters and their prefix can be referenced with the [indexreference](https://github.com/gbirke/indexreference) plugin. ===== Installation ===== Copy the ''indexnumber'' folder into the ''lib/plugins'' folder of your DokuWiki installation. If you want to insert specific counter names (see below), go to the Wiki configuration page and edit the field for index numbers configuration. Put each counter name on a new line. If you want to have separator chars between the index number and the description you can also configure that on the wiki configuration page. ===== Examples/Usage ===== This is the first image: {{computer.jpg}} This is the second image, with a description. Note that the id is arbitrary {{tree.jpg}} Interspersed table with a different counter: ^Foo^Bar^ |42|47| |7|11| |6|0| Third image. Note how the counter is independent from id and the table counter {{snow.jpg}} ===== Syntax ===== Syntax for creating a counter number is some text, {image} or |table| ''countername'' is an arbitrary string like "Tab." or "Fig." that must not contain the "#" character. All ''idxnum'' tags with the same counter name will produce sequential numbers. ''#id'' must be a number, prefixed by the # char. Each number must be unique for the page! The id can be used for referencing the generated number with the indexreference plugin. ''Description'' is an arbitrary description and will be added to the output after the index number. You can leave out the description but if you have a description you **must** have an id. If the description contains angle brackets, they must be escaped as their entities (''<'' and ''>''). Please note that ''idxnum'' tags cannot be nested! ===== Change Log ===== //Version 1.2//\\ Release compatible with Angua and later //Version 1.1.1//\\ Bugfix for Toolbar buttons //Version 1.1//\\ Toolbar buttons //Version 1.0//\\ First release ===== Discussion ===== === Merge with indexreference? === Thanks for the plugin, Gabriel, it looks very promising! I expect it will be commonly used with the [[https://github.com/gbirke/indexreference | indexreference]] plugin. Wouldn't it make sense to merge them together into a single plugin to simplify installation? Thanks again. --- [[user>rikblok|Rik Blok]] //2013/01/19 07:51// === Allow alphanumeric id? === This plugin looks like it'll help bring DokuWiki closer to a LaTeX-style document processing environment. Restricting id's to numbers could get in the way, though. In LaTeX [[https://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing | cross-reference labels]] are intentionally not numbers so that the label isn't confused with the reference number. For example, '''' could be confusing if id 1 is the fourth numbered image on the page (counter = 4). An alphanumeric label, eg. '''' would be clearer. Just a thought. Thanks! --- [[user>rikblok|Rik Blok]] //2013/01/19 07:51//