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.

## Instructions

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.

ParameterDescriptionTypeDefaultRequired

Block Equation Alignment

Specify the alignment of block equations on the page

enum

center Text Alignment

Specify the alignment of text/inline equations on the page

enum

left 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. 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 either side of the LaTeX within the macro, e.g. $ax^2 + bx + c = 0$.  Block

To display a block equation, a double dollar sign must be placed either side of the LaTeX within the macro, e.g. $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$.  ## 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}
TEXT A matrix can be applied to arrange a formula in columns with different delimiters such as the centered bracketed matrix below.

\begin{bmatrix}
\alpha& \beta^{*}\\
\gamma^{*}& \delta
\end{bmatrix}
TEXT ### Color formatting

Styling of LaTeX with color can be achieved by using a color parameter, e.g.  $\color{red}{ax^2 + 1 + 55 + bx + c =0}$.  ### Packages

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

Unit package  mhChem package  Physics package  