DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:latexcaption

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:latexcaption [2021-11-12 00:26] – [Syntax] ben_vanplugin:latexcaption [2023-10-30 22:29] (current) Klap-in
Line 6: Line 6:
 email      : ben.vanmagill16@gmail.com email      : ben.vanmagill16@gmail.com
 type       : syntax type       : syntax
-lastupdate : 2021-11-12 +lastupdate : 2022-11-09 
-compatible : "Elenor of Tsort""Frusterick Manners""Greebo", Hogfather+compatible : Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor
 depends    :  depends    : 
 conflicts  conflicts 
-similar    : caption+similar    : caption, imagebox
 tags       : caption, figure, tables tags       : caption, figure, tables
  
Line 20: Line 20:
 ---- ----
  
-A re-write of the [[https://www.dokuwiki.org/plugin:caption|caption plugin]] from Till Biskup. New plugin due to syntax change. +A re-write of the [[plugin:caption|caption plugin]] from Till Biskup. New plugin due to syntax change. 
  
-Changes+Fixes:  
-  * No string searches to set reference links that appear before a label definition. All figure labels are stored in a global variable during syntax handling and saved in page metadata upon rendering only if a reference is used.  +  * 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.   +  * Change syntax to allow multiple classes to be used eg. left, center, right. 
-  * Add ability to have subfigures/tables. +  * Add the ability to have subfigures/tables. 
-  * Add option to change caption tag syntax.+  * Add an option to change caption tag syntax.
   * Code easy to expand to caption label more tags if needed.   * Code easy to expand to caption label more tags if needed.
   * Updated some css styles to use flexbox.   * Updated some css styles to use flexbox.
Line 38: Line 38:
  
 A simple centered figure with only a caption number. A simple centered figure with only a caption number.
-    <figure center blank|fig_label> + 
-    {{image.jpg}} +  <figure center blank|fig_label> 
-    <caption></caption> +  {{image.jpg}} 
-    </figure>+  <caption></caption> 
 +  </figure>
  
 ===== Syntax ===== ===== Syntax =====
  
-     <figure opts|fig_label> +  <figure opts|fig_label> 
-      <subfigure opts|subfig_label1> +   <subfigure opts|subfig_label1> 
-         {{image1.jpg}} +     {{image1.jpg}} 
-         <caption>subfigure caption1</caption> +     <caption>subfigure caption1</caption> 
-      </subfigure> +   </subfigure> 
-      <subfigure opts|subfig_label2> +   <subfigure opts|subfig_label2> 
-         {{image1.jpg}} +     {{image1.jpg}} 
-         <caption>subfigure caption2</caption> +     <caption>subfigure caption2</caption> 
-      </subfigure> +   </subfigure> 
-    <caption>Main Caption</caption> +   <caption>Main Caption</caption> 
-    </figure>+  </figure>
  
 It is also possible to have more than one image in a figure/subfigure to group them with one caption: It is also possible to have more than one image in a figure/subfigure to group them with one caption:
  
-    <figure center> +  <figure center> 
-        {{image1.jpg}} +    {{image1.jpg}} 
-        {{image2.jpg}} +    {{image2.jpg}} 
-     <caption>A caption</caption> +  <caption>A caption</caption> 
-    </figure>+  </figure>
  
 ====Referencing==== ====Referencing====
 +
 Reference anywhere in text using: Reference anywhere in text using:
-    {{ref>fig_label}} +  {{ref>fig_label}} 
-    +
 ====Set counter==== ====Set counter====
 +
 Set the counter anywhere on the page using: Set the counter anywhere on the page using:
-    <!-- Set the figure counter to 5 --> +  <!-- Set the figure counter to 5 --> 
-    {{setcounter>figure=5}} +  {{setcounter>figure=5}} 
  
-    <!-- Set the table counter to 3 --> +  <!-- Set the table counter to 3 --> 
-    {{setcounter>table=3}} +  {{setcounter>table=3}} 
  
 ====Example Output==== ====Example Output====
  
-{{ https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example.png |}} +{{ https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example.png?recache |}} 
-{{ https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example2.png |}}+ 
 +{{ https://raw.githubusercontent.com/bennvan/dokuwiki-plugin-latexcaption/master/example2.png?recache |}}
  
 ====Configuration==== ====Configuration====
Line 90: Line 94:
  
 Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
- 
- 
  
  
plugin/latexcaption.1636673205.txt.gz · Last modified: 2021-11-12 00:26 by ben_van

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