MediaWiki Extension CrossReference

CrossReference is an extension of MediaWiki to create automatically numbered cross references on a wiki page with LaTeX style.

CrossReference provides tags to declare objects as referencable objects: figure, table... Then because these referencable objects have identifiers, they may be referenced somewhere in the text.


  1. Download CrossReference,
  2. Unpack the archive in your Mediawiki directory
  3. add
    in your LocalSettings.php.

Declare Referencable Objects

A referencable object is an object which has an identifier, and may have a caption.

Several types of referencable objects are supported:

Each of these types have a dedicated HTML tag to declare an object instance, except for the bibliography which is not supported by this extension:

In the text describing the referencable object, the tag <caption/> may enclose the caption of the object. This caption will be render near the referencable object and will appear in all the references in the text.


<figure id="fig:myobject">
<img src="../../images/arakhne.jpg" title=\"<caption>My caption</caption>">

Add Referencable in Text

Somewhere on the page, you can put the following to reference the element:
<xr id="identifier"> text in the link </xr>
where identifier is the code of the referencable object to reference. The given text is put back in the reference hyper link. If this text is not given, the default text is used (basically the object number).


<xr id="fig:myobject">
gives: "Figure 1".

Advanced Usage

Subfigures, subtables...

When a figure is the composition of a set of subfigures, CrossReference extension make you able to define a number and caption for each subfigure.

The inner components must be enclosed by a tag which is corresponding to the enclosing components, ie. subfigure in a figure, subfigtable in a figtable... The inner tags do not take parameter:


All the referencable object declarations are wrappers to the tag <xrlabel/>. This tag supports several parameters:


Tag <xr/> takes parameters: