The Adaptavist Group LogoDocumentation

LaTeX Formatting

The LaTeX Formatting macro can be used to convert LaTeX (a document preparation system) mathematical language to HTML. This can be useful for displaying mathematical/scientific equations on a page, or formatting in a certain style.

Note: This macro requires some previous knowledge of using LaTeX and LaTeX Mathematics. It may also be useful to review the documentation for MathJax, which enables the conversion between LaTeX and HTML and provides a range of informative examples on using the language.

Add LaTeX to your page

The LaTeX Formatting macro can be used to convert LaTeX (a document preparation system) mathematical language to HTML. This can be useful for displaying mathematical/scientific equations on a page, or formatting in a certain style.

This macro requires some previous knowledge of using LaTeX and LaTeX Mathematics. It may also be useful to review the documentation for MathJax, which enables the conversion between LaTeX and HTML and provides a range of informative examples on using the language.

  1. Navigate to the page you want to edit.
  2. Click Edit.
  3. Click the position where you want to add LaTeX content.
  4. Click Insert More Content → Other Macros.
  5. Select the LaTeX Formatting macro from the Macro Browser.
  6. Select your desired alignment options, or use the default settings.
    Parameter Description Type Default Required
    Block Equation AlignmentSpecify the alignment of block equations on the pageenumcenter
    Text AlignmentSpecify the alignment of text/inline equations on the pageenumleft
  7. Click Insert. The macro placeholder displays.
  8. Enter the mathematical LaTeX inside the macro body. Multiple LaTeX formulae or equations can be included inside a single macro, and multiple macros can be included within a page.
  9. Save the page to view the rendered LaTeX formatting.
CAUTION: Due to a Confluence limitation, the Export to PDF functionality does not work for content created with the LaTex Formatting macro. If you want to preserve your content in PDF format, we recommend that you use your browser's built-in functionality to print to PDF.

Block vs inline formatting

There are two ways in which LaTeX can be displayed on the page using this macro: Block and Inline.

Inline

To display an Inline equation, a single dollar sign must be placed on either side of the LaTeX within the macro,

Published ResultPublished result showing an inline LaTeX equation rendered within a line of text

Block

To display a block equation, a double dollar sign must be placed either side of the LaTeX within the macro, e.g.

Published Result

Examples

Matrix and array

You can use an array to format equations similar to the following example.
\begin{array}{lcl}
z & = & a \\
& = & a \\
f(x,y,z) & = & x + y + z
\end{array}

Published Result

A matrix can be applied to arrange a formula in columns with different delimiters such as the centred bracketed matrix below.
\begin{bmatrix}
\alpha& \beta^{*}\\
\gamma^{*}& \delta
\end{bmatrix}

Published Result

Color formatting

Styling of LaTeX with color can be achieved by using a color parameter, e.g.

Published Result

Packages

To provide extra functionality for the LaTeX Formatting macro, a number of LaTeX packages have been included. These include mhChem, and Physics.

mhChem package

For more guidance on using this package check the package documentation.

Published Result

Physics Package

For more guidance on using this package check the package documentation.

Published Result

Export LaTeX to PDF

Due to a Confluence limitation, the Export to PDF functionality does not work for content created with the LaTeX macros. If you want to preserve your content in PDF format, we recommend that you use your browser's built-in functionality to print to PDF.

Search documentation

Start typing to search the docs.