Versions Compared

Key

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

...

Welcome


Latex is an app for Atlassian Confluence that allows to render and display complex mathematical notation in web browsers. Our native Latex add-on had only one availability to render the macro by using the TEX - typesetting system. However, since the Latex 1.6.0 version, it has additional functionality which is calling MathJax, which is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.

About how-to configure Latex and MathaJax, please review the following pages:

Tip

This plug-in can be installed and updated via Confluence's built-in Find new add-ons section under Confluence Administration, or via the LaTeX Plugin listing on the Atlassian Marketplace website.

Info

In order to make this add-on available for current versions of Confluence, ownership has been taken on by The Plugin People.  The reference to Stepstone remains to give kudos to the original authors

...

Summary

A plug-in for displaying LaTeX in Confluence.  It requires a TeX distribution to be installed separately on the server to function.

Prerequisites

  1. You must have a working version of TeX installed on your Confluence server

  2. The commands latex and dvipng must be reachable by the $PATH system environment variable.

Both latex and divpng are included in many TeX distributions.

Installation

Linux/Ubuntu Notes

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

...

Code Block
latex simple.tex
dvipng simple.dvi

...

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.

Installation

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

...

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

...

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

...

Go to Confluence Administration>Add-ons>Manage add-ons and click the Configure button for the LaTeX Plugin

...

Configuration

...

Note

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

Usage

Note

Do not use the 'Rich Text' editor to write LaTeX markup. The rich text editor escapes some of the LaTeX characters, generating unpredictable output.

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}

...

Common problems

Error formatting macro

...

Code Block
Error formatting macro: latex: java.lang.NullPointerException

( E=mc^
Unknown macro: {2}

)

Making Markup larger?

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

Unable to find DVI conversion log file

This is often the result of the paths for the latex and dvipng commands not being correctly configured in the add-on's configuration screen. First however, check that these commands are working correctly outside of Confluence (see the above Linux installation notes for an example of how to do this). Once you have confirmed that they are working correctly:

  • Go to Confluence administration>Manage add-ons and expand the LaTeX Plugin section

  • Click Configure

  • Verify that the correct paths to the commands have been entered

  • Click Save (this is important to do even if the paths have not been modified to ensure the configuration is saved)

Logging

To turn logging on, add the following text to CONFLUENCE_INSTALL_DIR/confluence/WEB-INF/classes/log4j.properties (replace CONFLUENCE_INSTALL_DIR with your actual installation directory):

Code Block
####
# LaTeX debug messages
####
log4j.logger.com.stepstonetech.confluence.plugins.latex=DEBUG,confluencelog
log4j.additivity.com.stepstonetech.confluence.plugins.latex=false

...

Compatibility

Please see the complete version history for a complete picture of compatibility with Confluence: https://marketplace.atlassian.com/apps/207/latex-plugin/version-history.

Tips & Tricks

If you would like to reuse Latex statements several times on a page, or across multiple pages, you may like to start a Latex statement library. Create a page specifically for storing statements and add a child page for each statement. Then use the [Include Page macro|DOC:Include Page Macro] to embed those statement pages wherever they are needed.

EULA

This software is licensed under the provisions of the Standard EULA from the Atlassian Marketplace Terms of Use as a Marketplace Product.

The "Standard EULA" is reproduced here for convenience. In this case, the "Publisher" is The Plugin People Ltd:

(i) The Publisher is the licensor of the Marketplace Product and Atlassian is not a party to the Publisher EULA or this Standard EULA, as applicable.

(ii) If the Marketplace Product does not include a Publisher EULA that specifies Marketplace Product license rights, Publisher grants you a limited, worldwide, non-exclusive, non-transferable and non-sublicensable license to download and use the Marketplace Product only on hardware systems owned, leased or controlled by you.

(iii) Licenses granted by Publisher are granted subject to the condition that you must ensure the maximum number of Authorized Users that are able to access and use the Marketplace Product concurrently is equal to the number of User Licenses for which the necessary fees have been paid to Atlassian and/or its authorized partners (each, an "Atlassian Expert"). You may purchase additional User Licenses at any time on payment of the appropriate fees to Atlassian or an Atlassian Expert. "User License" means a license granted under this EULA to you to permit an Authorized User to use the Marketplace Product. The number of User Licenses granted to you is dependent on the fees paid by you. "Authorized User" means a person who accesses and uses a Marketplace Product under the EULA and for which the necessary fees have been paid to Atlassian and/or an Atlassian Expert.

(iv) Any information that Publisher collects from you or your device will be subject to any Publisher EULA, privacy notice, or similar terms that the Publisher provides to you, and will not be subject to the Atlassian Privacy Policy (unless Atlassian is the Publisher).

(v) You may not modify, reverse engineer, decompile or disassemble the Marketplace Product in whole or in part, or create any derivative works from or sublicense any rights in the Marketplace Product, unless otherwise expressly authorized in writing by Publisher.

(vi) The Marketplace Product is protected by copyright and other intellectual property laws and treaties. Unless otherwise expressly stated in the Publisher EULA, Publisher or its licensors own all title, copyright and other intellectual property rights in the Marketplace Product, and the Marketplace Product is licensed to you directly by the Publisher, not sold.

...

.