Numbered Figures Application

Last modified by Michael Hamann on 2024/04/01 00:09

cogProvides the User Interface for Numbered Figures.
Developed by

Manuel Leduc, Michael Hamann

Active Installs15
0 Votes
LicenseGNU Lesser General Public License 2.1


Installable with the Extension Manager


Provides the User Interface for Numbered Figures. This application is part of the Numbered Content.

Numbering Activation

To activate figures numbering on a Space or a Page, a NumberedFigures.Code.NumberedFiguresClass XObject can be added, and its status field set to Activated.
To deactivate figures numbering, the same steps can be followed, but the status field must be set to Deactivated.

Once figures numbering activated, nothing specific is required. Every figureCaption contained in a figure will be prefixed with $Label$ $Counter$: where $Label$ is the label of the figure type, and $Counter$ an integer value, incremented for each figure type sharing the same counter with the current figure. Every figureCaption contained in the same figure will have the same number.
See the counters section for more explanations about counters.
See the Figure Macro documentation for more details on figure types use and configuration.


== Image ==

Using the figure and figureCaption macros:


{{figureCaption}}An image{{/figureCaption}}

Or using the links syntax:

[[An image>>image:||width="100"]]

== Table ==


{{figureCaption}}A table{{/figureCaption}}


How do they work?

Each figure is associated with a type. By default, this type is used as the counter, and each new figure of the same type increments the corresponding counter.
But it is also possible to define a common counter for several types. For instance, if we associate the counter math with the figure types lemma and proof, then whenever a lemma or a proof is encountered, the math counter is incremented. This means that if there are three figures of type lemma, proof, lemma in a document, their prefixes would be respectively Lemma 1, Proof 2, Lemma 3.


  • A block type graph is configured
  • Two inline types theorem and lemma are configured
  • A counter math containing theorem and lemma is configured
  • Numbered Figures are activated on the page
{{figure type="graph"}}

Polynomial of degree three

{{figure type="theorem"}}
Pythagorean theorem

Let ##f## be a function whose derivative exists in every point, then ##f## is  a continuous function.

{{figure type="lemma"}}
Given two line segments whose lengths are ##a## and ##b## respectively there is a real number ##r## such that ##b=ra##.



- the figure and table types cannot be part of a new counter
- a counter cannot contains figure of different styles

To associate several counters to a single counter, the numbered.figures.counters key can be used with the numbered.figures.counters = COUNTER = TYPES format. COUNTER is the id of the counter, and TYPES the comma separated list of type ids.

numbered.figures.counters = math = lemma\,proof

Note that counters added that way are used by default on all the wikis of the farm.


Counters can be configured locally by defining NumberedFigures.Code.NumberedFiguresCounterConfigurationClass XObjects in the NumberedFigures.Code.NumberedFiguresCounterConfiguration page.
Whenever at least of counter is found locally, the values from are ignored for the current wiki.

Known Limitations

XWiki <13.4-rc1

Numbered Headings can be installed on XWiki 13.10+ but has some limitations when used on version lower than 13.4-rc-1.

Numbering on WYSIWYG

While numbering works fine in the in-place editor, it is not the case when editing in WYSIWYG mode. This means that while numbering will work fine on view mode, no visual feedback is shown to the user.

Release Notes












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


Translations: Japanese







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



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). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki


Dependencies for this extension (org.xwiki.contrib.numbered.content:application-numbered-content-figures-ui 1.10.1):

  • org.xwiki.contrib.numbered.content:application-numbered-content-figures-api 1.10.1
  • org.xwiki.contrib:figure-macro 15.4.2
  • org.xwiki.platform:xwiki-platform-localization-macro 14.10

Get Connected