Content Formatting Macros for Confluence Server and DC

# 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.

 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.

## Usage

1. Go to the form you wish to edit.

2. Click Edit.

3. Click Insert More Content, and select Other Macros.

4. After arriving at the Macro Browser, search and select the LaTeX Formatting Macro from the list.

5. Complete the desired fields.

Parameter Description Type Default Required

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

6. Once the LaTeX Formatting Macro has been added to a page, any mathematical LaTeX entered inside the macro will be displayed on page load.

1. Multiple LaTeX formulas or equations can be included inside a single macro, and multiple macros can be included within a page.

 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. These are Block and Inline. In order to display, for example, an Inline equation, a single dollar sign must be placed either side of the LaTeX within the macro.

### Inline

The above LaTeX code shows some inline text, between the single dollar signs, and an inline equation, following the backslash. This will be displayed as seen below.

### Block

The above LaTeX code shows a block equation. This will be displayed as seen below.

## Examples

### Using the LaTeX Formatting Macro

Below are the parameters that can be set for the macro.

To use the macro, simply include it on a page and insert the LaTeX to be displayed, as shown below using Matrix and Array examples.

### Colour Formatting

Styling of LaTeX and regular text within the macro can be done using the following technique.

This will be displayed as seen below.

### 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.

Below are some examples of using these packages.

Unit Package:

mhChem Package:

Physics Package: