This article will walk you through the process of configuring the LaTeX Math application.
Configuring LaTeX Math Application
You can configure the Math block template as per your requirement. To change the application configuration, go to → Manage Apps → User-installed apps → LaTeX Math → Configure. The Configure LaTeX Math page is displayed. The following are the parameters you can configure as per your requirement:
Renderer selection for math mode
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.
The LaTeX macro requires a full LaTeX implementation and will always export as PNG using the external renderer.
Parameter Name | Default | Description |
---|---|---|
Preferred output | MATHJAX | Select the renderer(s) you want to use to display your LaTeX math. The following are the available options:
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:
|
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:
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. 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. 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.
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. The following are the available options:
|
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 | #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. To reset to the default value, you must clear the existing template and then save the LaTeX Math settings. |
Math Block Reference velocity template | #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. 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.
|
Editor Placeholder Settings
This option allows you to specify how the macro placeholders are rendered for the editor.
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. 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.
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. If the executable is in the system path, the default (latex) is acceptable. |
Dvipng executable | dvipng | Specify a path to the LaTeX executable. 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. 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.
You should only update these if you are confident in your abilities.
Parameter Name | Default | Description |
---|---|---|
LaTeX header | \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. The preview package is required for correct vertical alignment of the baseline of the output. |
LaTeX footer | \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. 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. NOTE We do not collect or transmit private user data or personal identifiable information. |