Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article will walk you through the process of configuring the LaTeX Math Easy Numbered Heading application. You can configure the application in the following levels:

Table of Contents
minLevel2
maxLevel2

Panel
panelIconId

...

ca67b37b-

...

d17a-

...

40e7-

...

8f28-

...

b8fdae9705cf
panelIcon:

...

number_caption:
panelIconText:

...

You can configure the Math block template as per your requirement

number_caption:
bgColor#EAE6FF

...

Configuring LaTeX Math Application

Global Level Configuration

The Global Configuration applies to all spaces. To change the application configuration, go to (blue star) Manage Apps → User-installed apps → LaTeX Math Easy Numbered Heading → Configure. The Configure LaTeX Math page configuration page for the Easy Numbered Heading application is displayed.

The following are is the parameters you can configure as per your requirementconfiguration parameters table:

Table of Contents
minLevel3
maxLevel7

...

Automatic Numbering

This option allows you to choose the default renderer for displaying your LaTeX math. For purposes such as placeholders in the editor and when exporting pages, LaTeX Math will always fall back to outputting as PNG.

Info

The LaTeX macro requires a full LaTeX implementation and will always export as PNG using the external renderer.

...

select whether numbering is enabled or disabled by default on new pages. The setting can be overridden for each space, to change go to Space Settings → Content Tools.

Parameter

Default

Description

Preferred output

MATHJAX

Select the renderer(s) you want to use to display your LaTeX math. The following are the available options:

  • PNG

  • SVG

  • MATHJAX

Info

When exporting a page (e.g. to PDF), LaTeX Math will switch to SVG, PNG, or MathML as required by the exporter. When combined with the Scroll Word exporter, this allows for exports to native Word equations.

PNG renderer

Built-in renderer (MathJax-based)

Select the default PNG renderer. The following are the available options:

  • External renderer (latex+dvipng)

  • Built-in renderer (MathJax-based)

MathJax settings

This option allows you to configure MathJax settings

...

Parameter Name

...

Default

...

Description

...

Enable MathJax context menu

...

Unchecked

...

Select the check box to display the MathJax context menu when using client-side MathJax rendering (i.e. right-click menu).

...

Font

...

TeX

...

Select the font. The following are the available font options:

  • TeX

  • STIX-Web

  • Gyre-Termes

Note

This option is only applicable if you have selected Preferred output as MATHJAX.

...

Render non-macro math

...

Unchecked

...

Check this option to render non-macro math. This will use MathJax to search for math delimited with $ $, $$ $$, \( \), and \[ \]. Any content in pages delimited by these standard LaTeX math-mode delimiters will be rendered as if it were a LaTeX Math macro.

Note

Please note that LaTeX Math will not be able to correctly migrate non-macro content to Confluence Cloud.

...

Disable $ $

...

Checked

...

Uncheck this option to avoid false positives when using the Render non-macro math option.

Font Sizes

This option allows you to configure the font size of the Confluence text and LaTeX Math text.

...

Parameter Name

...

Default

...

Description

...

Font size (Confluence text)

...

14

...

Specify the font size at which your Confluence setup renders text.

Info

This does not apply to MathJax output.

...

Font size (LaTeX Math)

...

10

...

Specify the font size for LaTeX Math exports to PDF and Word.

Automatic conversion

...

Parameter Name

...

Default

...

Description

...

Automatic conversion to math macros

...

Unchecked

...

Check this box to automatically convert old latex macros (including user macros) to newer math mode only macros where possible. No changes will be made to pages until a new version of the page is saved. This will have no effect if there are no macros to be migrated and can safely be disabled.

Feature discovery

This option provides you with tooltips on how to work with LaTeX Math.

Info
  • This feature automatically disappears after seven days.

  • If you disable this option, you will not get updates on new features.

...

Parameter Name

...

Default

...

Description

...

Feature discovery visibility

...

Checked

...

Uncheck this box to remove the feature discovery.

Templates

This option allows you to customize how the LaTeX macros are displayed.

Parameter Name

Default

Description

Horizontal alignment

Center

Specify the default horizontal alignment

Enable automatic numbering of headings

Checked

This option allows you to generate heading numbers automatically. Uncheck this box to disable automatic heading numbering.

Disable numbering for Scroll exports

Unchecked

This option is applicable only if you are using Scroll application to export. Uncheck this box to disable numbering when you export using Scroll application.

Continous numbering across all pages in space (experimental)

Unchecked

Continous numbering across all pages in export

Checked

Formatting

This option allows you to choose the format of the heading style.

The following table provides you information about the heading styles:

Parameter

Default

Append dot (period) to numbering

Checked

Check this box to add a dot to the end of the numbering.

h1

Decimal

Select the heading 1 format from the drop-down menu. The following are the available options:

Format

Example

Decimal

1. This is a heading example

Lowerlatin

a. This is a heading example

Upperlatin

A. This is a heading example

Lowergreek

α. This is a heading example

Uppergreek

Α. This is a heading example

Lowerroman

i. This is a heading example

Upperroman

I. This is a heading example

Custom

None

Select this if you do not want to number h1.

h2

Decimal

Select the heading 1 format from the drop-down menu. The following are the available options:

Status
colourBlue
titlenote
The following example uses the default value for h1.

Format

Example

Decimal

1.1. This is a heading example

Lowerlatin

1.a. This is a heading example

Upperlatin

1.A. This is a heading example

Lowergreek

1.α. This is a heading example

Uppergreek

1.Α. This is a heading example

Lowerroman

1.α. This is a heading example

Upperroman

1.Α. This is a heading example

Custom

None

Select this if you do not want to number h1.

h3

Decimal

Select the heading 1 format from the drop-down menu. The following are the available options:

Left

Status

Center

colour

  • Right

  • Number all Math Blocks

    Unchecked.

    Check this option to enable numbering on all the Math Block macros.

    The macros are numbered only if the Anchor parameter is specified. By checking this option all the macros are numbered.

    Math Block velocity template

    Code Block
    #htmlSafe()
    ## Put parenthesis around equation number:
    #if ($!captionHtml && ($!captionHtml.length()>0))
      #set ($captionHtml = "($captionHtml)")
    #end
    ##
    ## Write block equation:
    <table border=0 cellspacing=0 cellpadding=0 width=100% align="center" class="latexmath-mathblock" style="width: 100% !important;">
      <tbody><tr>
    	<td nowrap class="latexmath-numbering">$!captionHtml</td>
    	<td nowrap class="latexmath-$halign">$!latexHtml</td>
      </tr></tbody>
    </table>

    Modify the template as per your requirement.

    Info

    To reset to the default value, you must clear the existing template and then save the LaTeX Math settings.

    Math Block Reference velocity template

    Code Block
    #htmlSafe()
    #macro(doNothing)#end
    ## Add colon to page name:
    #if ($pageNameHtml && ($pageNameHtml.length()>0))
      #set ($pageNameHtml = $pageNameHtml+'<span class="latexmath-refpagejoiner">:</span>')
    #end
    ##
    <a href="$!{anchorURLHtml}" class="latexmath-mathblock-ref"$!{dataParamsHtml}>($!{pageNameHtml}$!{captionHtml})</a>#doNothing()

    Modify the template as per your requirement.

    Info

    To reset to the default value, you must clear the existing template and then save the LaTeX Math settings.

    User defined macros

    This option allows you to customize your LaTeX macros.

    ...

    Parameter Name

    ...

    Default

    ...

    Description

    ...

    User defined LaTeX macros

    ...

    None

    ...

    Custom LaTeX macros can be defined and used in all LaTeX Math macros. You can use this option to create new "commands" for frequently used combinations.

    Example:

    Enter the following command in the User defined LaTeX macros:

    \def\E#1{E = mc^{#1}}

    The above will render command \E{2} as E=mc^2.

    ...

    Editor Placeholder Settings

    This option allows you to specify how the macro placeholders are rendered for the editor.

    Info

    When the rendered images are smaller than the specified value, white space is added on the top and right.

    ...

    Parameter Name

    ...

    Default

    ...

    Description

    ...

    Minimum height

    ...

    16

    ...

    Specify the minimum height for the macro placeholder to render. This ensures that the placeholder is large enough to click on in the page editor.

    ...

    Minimum width

    ...

    6

    ...

    Specify the minimum width for the macro placeholder to render. This ensures that the placeholder is large enough to click on in the page editor.

    PNG/SVG Rendering Timeout

    This option allows you to configure the rendering timeout.

    ...

    Parameter Name

    ...

    Default

    ...

    Description

    ...

    Rendering timeout (milliseconds)

    ...

    10000

    ...

    Specify the length of the rendering timeout.

    Panel
    panelIconIdatlassian-warning
    panelIcon:warning:
    bgColor#FFFAE6

    When rendering takes longer than the specified value, the process is stopped.

    External Renderer Settings

    You can customize the general settings for the external PNG renderer. This option allows you to change the path of the LaTeX installation.

    Note

    The external renderer must be correctly configured before using the 'LaTeX' macro.

    ...

    Parameter Name

    ...

    Default

    ...

    Description

    ...

    LaTeX executable

    ...

    latex

    ...

    Specify a path to the LaTeX executable.

    Tip

    If the executable is in the system path, the default (latex) is acceptable.

    ...

    Dvipng executable

    ...

    dvipng

    ...

    Specify a path to the LaTeX executable.

    Tip

    If the executable is in the system path, the default (dvipng) is acceptable.

    ...

    Show latex macro in macro browser. This does not affect Math macros

    ...

    Unchecked

    ...

    Check this option to display the LaTeX macro in the macro browser.

    Info

    This option is disabled by default, as this macro is for a general purpose usage and not an ideal standard app usage of displaying math and equations.

    External Renderer Settings (Advanced)

    You can customize the advanced settings for the external PNG renderer.

    Warning

    You should only update these if you are confident in your abilities.

    ...

    Parameter Name

    ...

    Default

    ...

    Description

    ...

    LaTeX header

    ...

    Code Block
    \documentclass[fleqn]{article}
    \usepackage[active,amsmath,amsthm,amssymb,bm]{preview}
    \usepackage{mathtools}
    \usepackage{amsthm}
    \usepackage{amssymb}
    \usepackage{bm}
    \usepackage[utf8]{inputenc}
    \mathtoolsset{showonlyrefs}
    \pagestyle{empty}
    \begin{document}

    ...

    All LaTeX rendered as png will have this appended to the beginning.

    Info

    The preview package is required for correct vertical alignment of the baseline of the output.

    ...

    LaTeX footer

    ...

    Code Block
    \end{document}

    ...

    This will be added at the end of all LaTeX rendered as png.

    ...

    Disable preview package for LaTeX macro

    ...

    Unchecked

    ...

    Check this option to disable the preview package when using the LaTeX macro. The macro will not render properly if the preview package is disabled.

    Info

    This has no effect if the preview package is not specified in the LaTeX header.

    Help us improve the product

    Parameter Name

    Default

    Allow reporting of anonymous statistics

    Checked

    LaTeX Math application gathers and transmits some basic information like, usage data to continually improve the product. By enabling you authorize us to collect the information.

    Status
    colourBlue
    titleNOTE
    We do not collect or transmit private user data or personal identifiable information

    Blue
    titlenote
    The following example uses the default value for other heading values.

    Format

    Example

    Decimal

    1.1.1. This is a heading example

    Lowerlatin

    1.1.a. This is a heading example

    Upperlatin

    1.1.A. This is a heading example

    Lowergreek

    1.1.α. This is a heading example

    Uppergreek

    1.1.Α. This is a heading example

    Lowerroman

    1.1.i. This is a heading example

    Upperroman

    1.1.I. This is a heading example

    Custom

    None

    Select this if you do not want to number h1.

    h4

    Decimal

    Select the heading 1 format from the drop-down menu. The following are the available options:

    Status
    colourBlue
    titlenote
    The following example uses the default value for other heading values.

    Format

    Example

    Decimal

    1.1.1.1. This is a heading example

    Lowerlatin

    1.1.1.a. This is a heading example

    Upperlatin

    1.1.1.A. This is a heading example

    Lowergreek

    1.1.1.α. This is a heading example

    Uppergreek

    1.1.1.A. This is a heading example

    Lowerroman

    1.1.1.i. This is a heading example

    Upperroman

    1.1.1.I. This is a heading example

    Custom

    None

    Select this if you do not want to number h1.

    h5

    Decimal

    Select the heading 1 format from the drop-down menu. The following are the available options:

    Status
    colourBlue
    titlenote
    The following example uses the default value for other heading values.

    Format

    Example

    Decimal

    1.1.1.1.1. This is a heading example

    Lowerlatin

    1.1.1.1.a. This is a heading example

    Upperlatin

    1.1.1.1.A. This is a heading example

    Lowergreek

    1.1.1.1.α. This is a heading example

    Uppergreek

    1.1.1.1.A. This is a heading example

    Lowerroman

    1.1.1.1.i. This is a heading example

    Upperroman

    1.1.1.1.I. This is a heading example

    Custom

    None

    Select this if you do not want to number h1.

    h6

    Decimal

    Select the heading 1 format from the drop-down menu. The following are the available options:

    Status
    colourBlue
    titlenote
    The following example uses the default value for other heading values.

    Format

    Example

    Decimal

    1.1.1.1.1.1. This is a heading example

    Lowerlatin

    1.1.1.1.1.a. This is a heading example

    Upperlatin

    1.1.1.1.1.A. This is a heading example

    Lowergreek

    1.1.1.1.1.α. This is a heading example

    Uppergreek

    1.1.1.1.1.A. This is a heading example

    Lowerroman

    1.1.1.1.1.i. This is a heading example

    Upperroman

    1.1.1.1.1.I. This is a heading example

    Custom

    None

    Select this if you do not want to number h1.

    Statistics reporting

    Choose whether Easy Numbered Headings should send anonymous usage statistics so that we can continue to make relevant improvements.

    Parameter

    Default

    Description

    Allow reporting of anonymous statistics

    Checked

    Uncheck this option

    Panel
    panelIconIdca67b37b-d17a-40e7-8f28-b8fdae9705cf
    panelIcon:number_caption:
    panelIconText:number_caption:
    bgColor#EAE6FF

    Space Level Configuration

    The Space level configuration applies to a particular space that you have selected. This level configuration overrides the Global Configuration.

    To configure at space level, perform the following:

    1. Go to Space Settings → Manage Pages → Easy Numbered Heading. The Manage Pages page is displayed.

    2. Under Settings for this space, check the Use custom space configuration checkbox. The space level configuration is activated.

    3. Make the necessary configuration changes at the space level and click Save.