两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 |
本站使用帮助:imagereference [2024/11/17 13:27] – 移除 - 外部编辑 (未知日期) 127.0.0.1 | 本站使用帮助:imagereference [2024/11/17 20:51] (当前版本) – 外部编辑 127.0.0.1 |
---|
| https://www.dokuwiki.org/plugin:imagereference |
| |
| ---- |
| |
| ====== Imagereference Plugin ====== |
| |
| ---- plugin ---- |
| description: Creates numbered references to images/tables in your text by unique reference names. Supports also LaTeX output. (previous authors: Martin Heinemann, Christian Moll) |
| author : G. Uitslag |
| email : klapinklapin@gmail.com |
| type : syntax |
| lastupdate : 2023-09-28 |
| compatible : Angua, Adora Belle, Weatherwax, Binky,Ponder Stibbons,Hrun,Detritus,Elenor Of Tsort,Frusterick Manners, greebo, Hogfather, Igor, Jack Jackrum |
| depends : |
| conflicts : #please report also the issue to explain what is broken |
| similar : imagebox |
| tags : media, images, references, caption, links, latex |
| |
| downloadurl: https://github.com/Klap-in/dokuwiki-plugin-imagereference/zipball/master |
| bugtracker : https://github.com/Klap-in/dokuwiki-plugin-imagereference/issues |
| sourcerepo : https://github.com/Klap-in/dokuwiki-plugin-imagereference |
| donationurl: |
| |
| screenshot_img : :plugin:imagereference_plugin_caption.png |
| ---- |
| |
| This syntax plugin enables the creation of image captions in MediaWiki style and additionally create in-text references to these images. |
| I created this plugin because we are using DokuWiki for software user manuals and we were missing the caption and image reference from LaTeX to refer to figures in your text. |
| |
| Supports also renderer/export mode 'latex'. |
| |
| ===== Usage ===== |
| Example syntax of caption and reference: |
| |
| <imgcaption label|John Doe>{{:wiki:dokuwiki-128.png}}</imgcaption> |
| |
| The Dokuwiki image can be seen in <imgref label>. |
| |
| Are displayed as:\\ |
| {{本站使用帮助:pasted:20231207-071144.png}} |
| |
| |
| ===== Syntax ===== |
| ====Caption==== |
| An image or table caption |
| <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 tablelabel| This is my other caption> |
| ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ |
| | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | |
| </tabcaption> |
| |
| ====References==== |
| |
| You can refer to the ''<imgcaption>'' and ''<tabcaption>'' objects by using |
| <imgref mynewimg> |
| <tabref tablelabel> |
| <tabref ns:otherpage#nicetable> |
| <imgref :pageinroot#bigimage> |
| ''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: |
| figure 1 |
| table 1 |
| table 5 |
| figure 3 |
| |
| |
| ====What about ## numbers?==== |
| When a reference name is not found, ''Fig. ##'' or ''table ##'' will be displayed. Please check whether your chosen reference name is correct or exists. |
| |
| ====Customizing==== |
| ===Alignments=== |
| The default alignment for ''<imgcaption>'' is inline. (At the moment ''<tabcaption>'' will always appear as a page width block, future improvements will add hopefully alignment as well.) |
| |
| You can set the alignment of an imgcaption: |
| <imgcaption image1 | Inlined caption&img>...</imgcaption> |
| <imgcaption image1 left | Left floating caption&img>...</imgcaption> |
| <tabcaption image1 right | Right floating caption&img>...</tabcaption> |
| <imgcaption image1 center| Centered block caption&img>...</imgcaption> |
| |
| |
| When ''<imgcaption>'' has no alignment specified, but when the enclosed image has, this image alignment is used. |
| |
| ===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. |
| <imgcaption image1 specialcaptionclass |Special layout>...</imgcaption> |
| <tabcaption image1 left otherclass |Nice>...</tabcaption> |
| |
| =====Installation===== |
| |
| |
| Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. |
| |
| |
| |
| =====Acknowledgment===== |
| Thanks a lot to the box plugin by Christopher Smith. And Martin Heinemann for maintenance of previous plugin version. |
| |
| |
| ===== 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/11/03** Added referring to captions on other pages. |
| * **2013/21/01** Rewritten metadata handling. Added ''%%<tabcaption..|..>%%'' and ''%%<tabref>%%''. Floats similar to images. --- Now maintenance by [[user>Klap-in|Klap-in]] |
| * **2012/09/04** Well, after a few years i updated the plugin to work with the recent dokuwiki version. The code moved to github: https://github.com/heinrichheine/dokuwiki-imagereference. If you experience any problems, do not hesitate to open a github issue. I tried to fix several problems that were written on this wiki page. For a **changelog** see [[https://github.com/heinrichheine/dokuwiki-imagereference/issues?milestone=1&state=closed|milestone 1]] |
| * **2008/09/11** Czech localisation added. Thanks to Jiri Vejda. Small bugfix in JavaScript. The toolbar buttons are now visible. |
| * **2008/09/11** localisations for English, french and German added. Toolbar buttons for creating the caption and references. |
| * **2008/08/13** included a small JavaScript which sets the right width of the box according to the image size. Also little modifications in style and syntax! |
| |
| ===== Bugs ===== |
| |
| Please report new bugs on the [[https://github.com/Klap-in/dokuwiki-plugin-imagereference/issues|issuetracker on Github]]. |
| |
| |
| ===Last commits=== |
| {{rss>https://github.com/Klap-in/dokuwiki-plugin-imagereference/commits/master.atom date 5}} |