This is an old revision of the document!
Table of Contents
caption Plugin
Compatible with DokuWiki
- 2024-02-06 "Kaos" unknown
- 2023-04-04 "Jack Jackrum" unknown
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" yes
Similar to latexcaption
Please refer to the plugin homepage for the original installation and documentation guide(note that instructions are only available in German).
Syntax
The plugin basically provides two different syntax elements, similar to the blockquote plugin :
<figure>…</figure> , <table>…</table> <caption>…</caption>
<caption>…</caption>
only ever be used within one of the other two environments.
Note: Illustrations always have subscripts, tables always have superscriptions. Place the caption accordingly.
Within the syntax elements, almost every other DokuWiki markup is allowed.
The caption environment provides for automatic numbering and the output of the string “figure” or “figure” (and corresponding to the tables).
Whether the abbreviated or spelled notation is to be used can be set via the configuration interface of the plugin. The respective strings are localized, localizations for German and English are currently available, others can be easily installed if necessary 1) .
Note: In DokuWiki almost everything is allowed within a <caption>
, but you should be aware that eg footnotes within a floating environment are not allowed in LaTeX. 2)
Labels and references
Since the figures and tables are automatically numbered by the plugin, there is a need to be able to refer to these figures / tables automatically in the text without having to change all references by hand each time when regrouping the figures / tables.
The original restriction by the parser that only references to already defined figures / tables were resolved has been fixed 3) .
The syntax looks like this:
<figure label> ... </ Figure> ... {{Ref> label}}
The same applies to the tables. This means that the (optional) label is defined in the opening tag of an image / table 4) and via the structure
{{Ref> label}}
referred to. The reference does not differentiate between figures and tables; without exception (like the corresponding LaTeX command \ref{}
) it outputs the corresponding number. This number is also a link to the corresponding figure / table.
Note: If a label / table has a label defined, this will be displayed as a “hover” text (“tooltip”), if you move the mouse over the respective beginning of the respective label (“image formation” n “/”). Tab [belle] m “) moves.
Example
And that's how the DokuWiki markup could look like:
<figure> {{: Stuff: kuschelpanzer.jpg | cuddle tanks}} <caption> ** The ultimate pink cuddly shell. ** Now I finally have to get one Create a caption, which also contains some // formatting //. Basically, everything is allowed ((footnotes actually?)) </caption > </figure>
And the result:
or analogously for a table:
<table> <caption> And a table heading with some ** bold text **. </caption> ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | Some text | some more text | some less text | | no idea what to write in here ||| | | But still some idea for here || </table>
Styles
The individual elements are as far as possible separately addressable and adaptable via changes to the CSS file of the plugin.
The following is an example of the XHTML code generated by the plugin, specifying the appropriate classes.
<div class = "figure" > <div class = "caption" > <span class = "captionno" > Figure 2: </ span > <span class = "captiontext" > ... </ span > </ div > </ div >
Basically, it is important to format the image subheadings and table headings so that they are as clear as possible from the surrounding body text (especially if they span multiple paragraphs, which may be less common, but may well occur).
Configuration
The DokuWiki configuration interface can be used to set whether the over / signatures begin with abbreviated or advertised “labels” (“Figure” vs. “Figure” / “Table” vs. “Tab.”).
The “labels” are initially available in German and English via the standard localization of the plugins, but can also be supplemented for other languages if required.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.