2024-09-24 | Maven 3.9.9 |
2024-08-13 | Noble Numbat |
2024-06-21 | Maven 3.9.8 |
2024-02-02 | Maven 3.9.6 |
2023-10-11 | P2 repository deleted |
2023-10-10 | Maven 3.9.5 |
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.
Installation
- Download CrossReference,
- Unpack the archive in your Mediawiki directory
- add
require_once($IP.'/extensions/CrossReference/CrossReference.php');
in yourLocalSettings.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:
fig
: a figure,tab
: a table,eqn
: an equation,the
: a theorem,def
: a definition, andbib
: a bibliographical reference.
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:
<figure id="identifier"> text </figure>
<figtable id="identifier"> text </figtable>
<equation id="identifier"> text </equation>
<theorem id="identifier"> text </theorem>
<definition id="identifier"> text </definition>
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.
Example:
<figure id="fig:myobject"> <img src="../../images/arakhne.jpg" title=\"<caption>My caption</caption>"> </figure>gives:
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).
Example:
<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:
<subfigure> text </subfigure>
<subfigtable> text </subfigtable>
<subequation> text </subequation>
<subtheorem> text </subtheorem>
<subdefinition> text </subdefinition>
<xrlabel/>
All the referencable object declarations are wrappers to the tag <xrlabel/>
. This tag supports several parameters:
id="..."
: the identifier of the referencable object;group="..."
: the type of the referencable object, one of the types describes before;shownumber
: if present, display the object number between parenthesis (for backward compatibility with the original CrossReference extension);noblock
: if present, do not output the HTML <div> tags which are dedicated to referencable objects;noautocaption
: if present, do not apply default caption formatter on the given caption.
<xr/>
Tag<xr/>
takes parameters:id="..."
: the identifier of the referencable object;nolink
: if present, do not output the hyperlink.
Details
- Main authors: GALLAND Stéphane
- License: GPL
- Implementation: Php
- Stable Version: 4.0