unit
Last modified by Josué Tille on 2026/04/29 15:21
The unit Confluence macro is converted to the mathjax macro which requires MathJax Macro.
What to use in XWiki
How this macro would be implemented in XWiki and comparison with the corresponding feature
See MathJaxMacro.
Import details
Details on how (well) this Confluence macro is imported
No parameter is returned. The content is converted as follows.
If the content starts with --uriencoded--, that part is removed, occurences of + are replaced with %2B, and the result is then URL-decoded.
Then, "{{/" is replaced with "{{ /". This prevents any clash with the XWiki syntax to close the mathjax macro and happens to lead to equivalent results in LaTeX.
Then, for inline macros (mathinline and unit), the content is returned surrounded with "\(" and "\)" and the conversion is done.
Then, if an anchor parameter is present:
- if the content doesn't start with \begin, the content is surrounded with \begin{aligned} and \end{aligned}
- a \label{anchor} line is inserted right after the \begin line (where anchor is the anchor parameter value.