Reference Macro for the Numbered Content Applications

Last modified by Manuel Leduc on 2024/12/03 20:54

cogProvides a macro to reference numbered contents.
Recommended
TypeJAR
CategoryMacro
Developed by

Manuel Leduc, Michael Hamann

Active Installs13
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

14.10+

Installable with the Extension Manager

Description

The reference macro allows to make references to numbered contents. Currently, references can be made to Numbered Headings, Numbered Paragraphs, and Numbered Figures. This application is part of the Numbered Content.

Note: This macro is an alternative to Numbered Reference Macro

Reference Macro

Parameters

NameOptionalAllowed valuesDefault valueDescriptionDeprecated
idfalse (unless figure or section is defined) Any StringN/AId to link tono
figuretrueAny StringN/AId of the figure to link to (currently an alias of id)yes
sectiontrueAny StringN/AId of the section to link to (currently an alias of id)yes
typetrueAny StringType of the figureyes

figure and section are deprecated aliases of id, and type is an unused and deprecated property. All those are subject to removal and it's advise to avoid using them.

Example

= Title 1 =

See Figure {{reference id="Porto"/}}, and {{reference id="Typo"/}}.

== Title 2 ==

Please see section {{reference id="HTitle1"/}}.

{{figure}}
[[image:beach.png||width="200"]]

{{figureCaption}}
{{id name="Porto"/}}Porto das Dunas - By Mario Gogh
{{/figureCaption}}
{{/figure}}

Numbered Content 1.3+

Instead of specifying the id in the caption as shown in the example above, the id for the reference can also be specified on the image itself:

[[image:circles.png||height="200" width="200" id="Circles"]]

XWiki 14.2+ The automatically generated image ids can also be used to reference a figure.
The advantage of using an id on the image is that the browser will directly jump to the image instead of the caption when clicking on the reference link.

Release Notes

1.10.3

1.10.2 and 1.8.6

1.10.1

1.10.0

1.9.3

1.9.2

1.9.1

1.9

1.8.4

1.8.3

1.8.2

1.8.1

1.8

  • The minimal XWiki dependency is now 14.10
  • Translations: Japanese, German

1.7.1

Translations: Japanese

1.7

1.6

1.5

1.4

1.3

1.2

Breaking change The parameter used to skip numbering (data-numbered-headings-skip) is now replaced by data-xwiki-rendering-protected.

1.1

1.0

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.

Dependencies

Dependencies for this extension (org.xwiki.contrib.numbered.content:application-numbered-content-reference-macro 1.10.3):

  • org.xwiki.platform:xwiki-platform-localization-api 14.10
  • org.xwiki.contrib.numbered.content:application-numbered-content-headings-api 1.10.3
  • org.xwiki.contrib.numbered.content:application-numbered-content-figures-api 1.10.3
  • org.xwiki.rendering:xwiki-rendering-macro-message 14.10

Get Connected