Usage (from version 4.0.0)
Last updated
Last updated
This app supports two types of LaTeX content. Simple content such as e = mc^2
will be rendered by MathJax engine, and more complex content that uses packages such as tikz
or chemfig
will be rendered by TeX Live engine.
In the article editor, click the Insert button, and select Other macros from the list.
In the Select macro dialog, search for "latex".
Alternatively, type { and select the LaTeX macros.
To insert simple LaTeX content please use the following macros:
LaTeX inline (MathJax engine)
LaTeX block (MathJax engine)
These macros use the MathJax engine to render content. The content is as simple as e=mc2
and does not require LaTeX preambles.
While editing a formula, you can click on the Math Editor button to open the LaTeX Math Editor. This editor will help you write LaTeX content easily with many visual hints. You can open the Math Keyboard by clicking on the keyboard icon in the right-hand corner of the Math Editor preview area. The content you write here will be filled to the Macro editor. To close the editor, click Save or Cancel button.
Click Publish to save the article. The article with LaTeX content will then be rendered.
This feature was introduced in version 5.0.0.
Sometimes you need to render complex LaTeX content such as the following one
which will be rendered as
In this case, please make use of the following macros:
(Advanced) LaTeX block (e.g. plot, chemistry formulae) using pdflatex engine
(Advanced) Inline LaTeX content (e.g. plot, chemistry formulae) using pdflatex engine
The pdflatex
and Poppler (https://poppler.freedesktop.org) must be installed and added to the PATH environment variable. The Operating System user that the Confluence server is running in must be able to use the pdflatex
without specifying its location.
We recommend installing pdflatex
using TeX Live https://www.tug.org/texlive/ (preferably) or MikTeX https://miktex.org/. All LaTeX packages should be installed to maximize the renderability.
To ensure the security of the Confluence server, this app does not allow the execution of bash commands in LaTeX content.
For a general instructions to install TeX Live and Poppler please see https://fulstech.gitbook.io/docs/latex-beautiful-math-for-confluence/confluence-data-center-and-confluence-server/how-to-install-tex-live.
To verify if pdflatex
has been installed correctly, please following these steps:
Switch to the same OS user that is running Confluence.
Create a file test.tex
with the following content.
Execute this command: pdflatex test.tex
. An PDF file with name test.pdf
should be created.
Please make sure that the following preample is used since it will exclude page headers, footers, and numbers from the output:
The following sections will show you some examples.
You can refer to existing LaTeX content. Below are the instructions.
Click on the Edit button, and provide a reference name for the LaTeX content.
Insert the Render LaTeX Reference macro.
For Page Title, inline LaTex must be wrapped inside //(...//)
and LaTex block must be wrapped inside //[...//]
.