DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:imagereference

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:imagereference [2014-02-04 14:36] Klap-inplugin:imagereference [2023-09-28 17:05] (current) Klap-in
Line 1: Line 1:
-====== Imagereference plugin ======+====== Imagereference Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 6: Line 6:
 email      : klapinklapin@gmail.com email      : klapinklapin@gmail.com
 type       : syntax type       : syntax
-lastupdate : 2014-02-04 +lastupdate : 2023-09-28 
-compatible : Angua, Adora Belle, Weatherwax, Binky+compatible : Angua, Adora Belle, Weatherwax, Binky,Ponder Stibbons,Hrun,Detritus,Elenor Of Tsort,Frusterick Manners, greebo, Hogfather, Igor, Jack Jackrum
 depends    :  depends    : 
 conflicts  :  #please report also the issue to explain what is broken conflicts  :  #please report also the issue to explain what is broken
Line 17: Line 17:
 sourcerepo : https://github.com/Klap-in/dokuwiki-plugin-imagereference sourcerepo : https://github.com/Klap-in/dokuwiki-plugin-imagereference
 donationurl:  donationurl: 
 +
 +screenshot_img : :plugin:imagereference_plugin_caption.png
 ---- ----
  
Line 25: Line 27:
  
 ===== Usage ===== ===== Usage =====
-  <imgcaption image1|John Doe>{{:wiki:dokuwiki-128.png}}</imgcaption>+Example syntax of caption and reference: 
 + 
 +  <imgcaption label|John Doe>{{:wiki:dokuwiki-128.png}}</imgcaption>
      
-  The Dokuwiki image can be seen in <imgref image1>.+  The Dokuwiki image can be seen in <imgref label>.
      
-{{http://santec.tudor.lu/_media/team/heinemann/imgref_plugin.png?w=&h=&cache=cache}} +Are displayed as:\\ 
- +{{:plugin:imagereference_plugin_caption.png|Example of a caption and a reference}}
  
  
Line 37: Line 40:
 ====Caption==== ====Caption====
 An image or table caption An image or table caption
-  <imgcaption image1| This is my little caption>{{:my_image.png}}</imgcaption>+  <imgcaption mynewimg| This is my little caption>{{:my_image.png}}</imgcaption> 
 + 
 +  <imgcaption mynewimg2>{{:my_image.png|Title of the image is set in the caption if not set in caption yet}}</imgcaption>
  
-  <tabcaption table1| This is my other caption>+  <tabcaption tablelabel| This is my other caption>
   ^ Heading 1      ^ Heading 2       ^ Heading 3          ^   ^ Heading 1      ^ Heading 2       ^ Heading 3          ^
   | Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        |   | Row 1 Col 1    | Row 1 Col 2     | Row 1 Col 3        |
Line 46: Line 51:
 ====References==== ====References====
 You can refer to the ''<imgcaption>'' and ''<tabcaption>'' objects by using You can refer to the ''<imgcaption>'' and ''<tabcaption>'' objects by using
-  <imgref image1+  <imgref mynewimg
-  <tabref table1>+  <tabref tablelabel>
   <tabref ns:otherpage#nicetable>   <tabref ns:otherpage#nicetable>
   <imgref :pageinroot#bigimage>   <imgref :pageinroot#bigimage>
-''image1'', ''table1'' and ''nicetable'' are the reference names of the caption object. They are filtered and counted and the ''<imgref>'' and ''<tabref>''tag will create a link to its referred object. When the object is on another page you needs to prefix by the namespace, pagename and a ''#'' e.g. ''ns:otherpage#nicetable''. The created links looks like: +''mynewimg'', ''tablelabel'' and ''nicetable'' are the labels of the caption object. You need to use an unique label for each image. They are filtered and counted and the ''<imgref>'' and ''<tabref>''tag will create a link to its referred object. When the object is on another page you needs to prefix it by the namespace, pagename and a ''#'' e.g. ''ns:otherpage#nicetable''. The created links looks like: 
-  Fig. +  figure 
-  Tab. +  table 
-  Tab. +  table 
-  Fig. 3+  figure 3
      
  
Line 62: Line 67:
 ====Customizing==== ====Customizing====
 ===Alignments=== ===Alignments===
-The default alignment for ''<imgcaption>'' is inline and for ''<tabcaption>''left floating block.+The default alignment for ''<imgcaption>'' is inline. (At the moment ''<tabcaption>'' will always appear as page width block, future improvements will add hopefully alignment as well.)
  
 You can set the alignment of an imgcaption: You can set the alignment of an imgcaption:
-  <imgcaption image1 left  | Left floating caption>...</imgcaption> +  <imgcaption image1       | Inlined caption&img>...</imgcaption> 
-  <tabcaption image1 right | Right floating caption>...</tabcaption> +  <imgcaption image1 left  | Left floating caption&img>...</imgcaption> 
-  <imgcaption image1 center| Centered block caption>...</imgcaption>+  <tabcaption image1 right | Right floating caption&img>...</tabcaption> 
 +  <imgcaption image1 center| Centered block caption&img>...</imgcaption>
  
  
Line 73: Line 79:
  
 ===Custom classes=== ===Custom classes===
-Beside the alignment classes (left,right and center) of this plugin, you can also add your own classes, which you can use in your own CSS customisations.+Beside the alignment classes (left, right and center) of this plugin, you can also add your own classes, which you can use in your own CSS customisations.
   <imgcaption image1 specialcaptionclass |Special layout>...</imgcaption>   <imgcaption image1 specialcaptionclass |Special layout>...</imgcaption>
   <tabcaption image1 left otherclass     |Nice>...</tabcaption>   <tabcaption image1 left otherclass     |Nice>...</tabcaption>
Line 80: Line 86:
  
  
-Copy link from download button above and use plugin manager in your wiki to install. Or to install the plugin manually, download the source to your plugin folder, ''lib/plugins'' and extract its contents in a folder named //imagereference// +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
  
Line 89: Line 95:
  
 ===== Versions ===== ===== Versions =====
 +  * **2014/3/11** Implements suggestion: Move target of the references to top of image/table, instead of the caption at the bottom of image/table.
 +  * **2014/2/4** Added support for [[Graphviz]] plugin
   * **2013/8/10** Fix numbering in preview. Some fiddling with wrapper of images/tables.   * **2013/8/10** Fix numbering in preview. Some fiddling with wrapper of images/tables.
   * **2013/11/03** Added referring to captions on other pages.   * **2013/11/03** Added referring to captions on other pages.
plugin/imagereference.1391521010.txt.gz · Last modified: 2014-02-04 14:36 by Klap-in

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