====== latexcaption Plugin ====== ---- plugin ---- description: Adds syntax for latex-like figure captions and numbering author : Ben van Magill, Till Biskup email : ben.vanmagill16@gmail.com type : syntax lastupdate : 2022-11-09 compatible : Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor depends : conflicts : similar : caption, imagebox tags : caption, figure, tables downloadurl: https://github.com/bennvan/dokuwiki-plugin-latexcaption/zipball/master bugtracker : https://github.com/bennvan/dokuwiki-plugin-latexcaption/issues sourcerepo : https://github.com/bennvan/dokuwiki-plugin-latexcaption screenshot_img : https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example2.png ---- A re-write of the [[plugin:caption|caption plugin]] from Till Biskup. New plugin due to syntax change. Fixes: * No string searches to set reference links that appear before a label definition. * Change syntax to allow multiple classes to be used eg. left, center, right. * Add the ability to have subfigures/tables. * Add an option to change caption tag syntax. * Code easy to expand to caption label more tags if needed. * Updated some css styles to use flexbox. All documentation for this plugin can be found at [[https://github.com/bennvan/dokuwiki-plugin-latexcaption]] ===== Examples/Usage ===== The plugin provides two different syntax elements, similar to the [[plugin:blockquote|blockquote plugin]]. One for the outer block/tag (figure, subfigure, table, subtable, codeblock, fileblock), and one for the caption. A caption cannot be used outside one of the main blocks. A simple centered figure with only a caption number.
{{image.jpg}}
===== Syntax =====
{{image1.jpg}} subfigure caption1 {{image1.jpg}} subfigure caption2 Main Caption
It is also possible to have more than one image in a figure/subfigure to group them with one caption:
{{image1.jpg}} {{image2.jpg}} A caption
====Referencing==== Reference anywhere in text using: {{ref>fig_label}} ====Set counter==== Set the counter anywhere on the page using: {{setcounter>figure=5}} {{setcounter>table=3}} ====Example Output==== {{ https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example.png?recache |}} {{ https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example2.png?recache |}} ====Configuration==== * Signatures begin with abbreviated or advertised "labels" ("Figure" vs. "Fig." / "Table" vs. "Tab."). * Caption tag syntax to avoid conflicts with bootswrapper plugin. ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.