Numbered Figures Application

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

cogProvides the User Interface for Numbered Figures.
Recommended
TypeXAR
CategoryApplication
Developed by

Manuel Leduc, Michael Hamann

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

14.10+

Installable with the Extension Manager

Description

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.

Examples

== Image ==

Using the figure and figureCaption macros:

{{figure}}
[[image:http://www.clker.com/cliparts/3/m/v/Y/E/V/small-red-apple-md.png||width="100"]]

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

Or using the links syntax:

[[An image>>image:http://www.clker.com/cliparts/3/m/v/Y/E/V/small-red-apple-md.png||width="100"]]

== Table ==

{{figure}}
|a|b
|c|d

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

Counters

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.

Example

  • 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"}}
[[image:Polynomial_of_degree_three.png]]

{{figureCaption}}
Polynomial of degree three
{{/figureCaption}}
{{/figure}}

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

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

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

numbered-figure-macro.png

Configuration

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

xwiki.properties

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.

XObjects

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 xwiki.properties 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

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). 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

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