Numbered Reference Macro
Provides numbered headings, figures and tables and references to them |
Type | JAR |
Category | Macro |
Developed by | |
Active Installs | 69 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Compatibility | Since v1.2 requires XWiki 10.2RC1+ |
Table of contents
Description
Provides numbered headings, figures and tables. Also allows to create reference links to those numbered elements.
Numbered Headings
Example usage:
= heading A =
= heading B =
{{include reference="NumberedHeadings.Test.WebHome"/}}
== heading C ==
== {{id name="D"/}}heading D ==
=== heading E ===
= heading F =
Generates the following when viewing the page:
Avoiding Numbering
XWiki 1.4+
It's possible to avoid numbering of a specific heading by setting the data-xwiki-rendering-protected parameter on the heading block (or on a wrapping group block). For example:
= heading A =
or
= heading A =
)))
Numbered Figures & Tables
Example usage:
{{figure}}
[[image:http://www.clker.com/cliparts/3/m/v/Y/E/V/small-red-apple-md.png||width=100]]
{{figureCaption}}{{id name="f1"/}}An image{{/figureCaption}}
{{/figure}}
See table {{reference figure="t1"/}}.
{{figure}}
|a|b
|c|d
{{figureCaption}}{{id name="t1"/}}A table{{/figureCaption}}
{{/figure}}
Generates the following when viewing the page (with this CSS used):
Translations
The Numbered Figure transformation generate some labels which can be internationalized. The following translation keys are used:
- transformation.numberedReferences.figurePrefix
- transformation.numberedReferences.tablePrefix
Default English translations:
transformation.numberedReferences.tablePrefix = Table {0}:
Limitations
- When using the {{reference}} macro to reference a heading, the section value must point to either an auto-generated heading anchor or the name parameter of an {{id}} macro located inside the heading.
- When using the {{reference}} macro to reference a figure or table, the figure and table values must point to the name parameter of an {{id}} macro located inside the {{figureCaption}} macro.
- The elements are numbered thanks to several Rendering Transformations and at the moment of writing, Transformations are global. Thus if you activate this transformation on your wiki, you'll get numbered elements for all pages of your wiki and subwikis.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Release Notes
v1.4
v1.3.5
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3
v1.2
v1.1
v1.0
Dependencies
Dependencies for this extension (org.xwiki.contrib:macro-numbered-references 1.4):
- org.xwiki.rendering:xwiki-rendering-api 10.11
- org.xwiki.rendering:xwiki-rendering-transformation-macro 10.11
- org.xwiki.platform:xwiki-platform-localization-api 10.11
- org.xwiki.rendering:xwiki-rendering-macro-figure 10.11