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.

    latex 01
  5. Complete the desired fields.

    Parameter Description Type Default Required

    Block Equation Alignment

    Specify the alignment of block equations on the page

    enum

    center

    error

    Text Alignment

    Specify the alignment of text/inline equations on the page

    enum

    left

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

      latex 02

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

latex 03

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.

latex 04

Block

latex 05

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

latex 06

Examples

Using the LaTeX Formatting Macro

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

latex 07

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.

latex 08
latex 09

Colour Formatting

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

latex 10

This will be displayed as seen below.

latex 11

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:

latex 12
latex 13

mhChem Package:

latex 14
latex 15

Physics Package:

latex 16
latex 17