LaTeX for the Figure Macro
LaTeX specific code for the Figure macro |
Type | JAR |
Category | API |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Compatibility | XWiki 14.9+ |
Table of contents
Description
This page describes the LaTeX output produced when this extension is installed, based on the Figure Macro configuration and the page content.
Example
{{figure type="graph"}}
[[image:Help.Applications.Contributors.Charlie Chaplin@Charlie_Chaplin_portrait.png]]
{{figureCaption}}
This is Charlie Chaplin
{{/figureCaption}}
{{/figure}}
== Inline Figure With Caption ==
{{figure type="lemma"}}
{{figureCaption}}
Geometry Lemma
{{/figureCaption}}
Given two line segments whose lengths are ##a## and ##b## respectively there is a real number ##r## such that ##b=ra##.
{{/figure}}
== Inline Figure No Caption ==
{{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}}
XWiki Page result
LaTeX Export result
Block Figure Export
Unless the type of the figure is of type figure or table, which are build in LaTeX by default, exporting a figure with style block will affect the export in different ways:
- Import: \usepackage{newfloat} is added to the list of packages
- Prelude: A new floating floating environment is generated for the configured block figure types (e.g., \DeclareFloatingEnvironment{graph})
- FigureBlock: The figure block is slightly adapted: the name of the environment matched the id of the figure type, and a \captionsetup is inserted before the caption, allowing the label to be displayed in the right locale. For instance\begin{graph}[h]
Block Figure Content.
\captionsetup{name=Graph}
\caption[Block Figure Caption.]{Block Figure Caption.}
\end{graph}
Inline Figure Export
When the type of the figure is block, the export is affects in the following ways:
- Prelude: A \newtheorem declaration is done for each inline figure (e.g., \newtheorem{lemma}{Lemma}}}
- FigureBlock:
- When the figure contains a caption, the content of the caption is moved as the parameter of the block, for instance:\begin{lemma}[Inline Figure Caption]
Inline Figure Content.
\end{lemma} - Otherwise, the block does not have a parameter, for instance:\begin{lemma}
Figure Content
\end{lemma}
- When the figure contains a caption, the content of the caption is moved as the parameter of the block, for instance:
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:figure-latex 15.4.4):
- org.xwiki.contrib:figure-macro 15.4.4
- org.xwiki.contrib.latex:latex-syntax 1.25
- org.xwiki.platform:xwiki-platform-uiextension-api 14.10