Versions Compared

Key

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

...

Both latex and divpng are included in many TeX distributions.

Installation

Tex installation

Linux/Ubuntu Notes

...

Finally, if you peeked at the simple.tex file contents, don't be discouraged by its complexity. The LaTeX plug-in simplifies the code you'll need to add to your wiki mark-up.

Data Center

You will need to ensure that you have installed the following binaries on each confluence application node

  • dvipng

  • texlive-base

These can be installed via the following commands (aws example):

Code Block
sudo apt-get install dvipng
sudo apt-get install texlive texlive-base

To verify if the binaries are working you can sftp put the following file  simple.tex and type the following:

Code Block
latex simple.tex
dvipng simple.dvi

The result should be a generated a file named simple.png containing a familiar equation (E=mc^2). Then view the image if it’s a local instance. Which you can view by sftp getting the png file from application node → bastion node → local machine.

Windows Notes

Some Windows users have had difficulty getting dvipng to work. In response to this problem, James Matheson has graciously contributed a mimetex-based version of the plug-in: mimetex-plugin.zip. Thanks, James!

Note that to use the above mimetex version, you will need to ensure that you have a copy of mimetex.exe in the system path. You can find a copy of mimetex.exe in the Mimetex download package at http://www.forkosh.com/mimetex.exe/windows/mimetex.zip.

...

Shared home Setup

Once you've tested your TeX installation as above, follow these steps to install and configure the LaTeX plug-in. (Note that CONFLUENCE_HOME_DIR should be replaced with the directory specified in your confluence-init.properties file).

...

Data Center

The shared home directory on a confluence application node can be found via the following command

Code Block
cd /media/atl/confluence/shared-home/

If there is no latex folder within this directory then create one. Within your latex directory add the following files to the directly via sftp from your local machine → bastion node → application node in AWS or directly to your shared-home/latex directory:

Server

  1. Create a directory called CONFLUENCE_HOME_DIR/shared-home/latex
    and copy the following files into it:

...

Note

Please do not specify an output file for the dvipng parameters in latex.properties, as this disables the LaTeX macro!

...

Marketplace Download

Finally Install the latest version of the add-on using the Confluence Plug-in Manager or manually download from the Atlassian Marketplace and install.

Configuration

Go to Confluence Administration>Add-ons>Manage add-ons and click the Configure button for the LaTeX Plugin. You will see the add-on configuration screen.

...

Setting

Description

Latex Paths Configuration

Enter the full path to the latex and dvipng commands.  For example, if you are using a Linux environment it may look something like the below. 

Image Modified

Latex deactivated

Allows Latex to be disabled. Set to NO to enable. For the first time of use the Latex app, Latex is disabled by default. If you are an existing user then Latex will be enabled.

Use MathJax Engine

The MathJax engine will now render previously created Latex macros and when creating a new macros.

We are working on enabling a low level macro migration from native latex rendering to a MathJax powered output. Whilst we work on that, we have the following feature that will cause current native latex macros to be temporarily rendered by MathJax (no changes to your page content, it can be turned off at any time). We welcome feedback on this through support@thepluginpeople.com!

This feature will show you how the native Latex macros will look like using the MathJax engine. This functionality allows you to preview the macros in two ways:

  • on the submitted page

  • by creating a new macro in the preview mode

By disabling this functionality you will get back to using Latex engine to render the native Latex macros

4. Save the configuration when done.

...

In your wiki mark-up, use the parameter-free {latex} macro to wrap your LaTeX code. For example, to generate the same equation you saw in the simple.tex test above, your wiki mark-up would look like:

Older Confluence versions

Newer Confluence versions


Code Block
{latex}
\( E=mc^{2} \)
{latex}


Image Modified


When the page is previewed or published, the macro should now render the following in your Confluence page:

...