Additional Latex Languages and packages

Summary

With our Latex app it utilises the Latex packages that are installed on the system in order to render the content within the confluence pages. This means that to use specific packages/languages you will need to ensure that they are installed within the system.

Below are the steps that are needed to install additional languages or packages and how to configure our app to use these new packages.

The below steps are for Confluence that is installed on Linux. If using Windows or Mac then the steps may be different.

Install Additional package/language

This method needs to have Latex already installed. The following instructions are for texlive latex. If using a different latex then you may require different methods.

  1. Check if the relevant package is already installed. If the package is installed then you can skip this step as only need to configure the confluence directory to use the package.

    1. In the below example the kotex-plain package would be found within /usr/share/texlive/texmf-dist/tex/plain (Maybe different for other packages).

  2. Install the relevant package into Latex on your system.

    1. Below is an example of how to install the Korean language package and update texlive to find the new packages. This can be adapted to install any other language or package.

    2. sudo apt-get install texlive-lang-korean sudo texhash
  3. Once installed, check if the additional package is correctly installed. On Linux, you will find the kotex-plain package within /usr/share/texlive/texmf-dist/tex/plain.

Select Package to be used within Confluence directory

Note: There may be some files within <home-dir>/shared-home. These are not used by our Latex plugin so you will need to ensure the below files are placed within <home-dir>/shared-home/latex.

  1. To use the new packages you will need to go to <home-dir>/shared-home/latex and add the following files

    1. latex.properties

    2. latexheader.tex

    3. latexfooter.tex

  2. Once installed here you will then need to update the latexheader.tex file to include the package that is required.

    1. For example \usepackage{kotex} will use the Kotex package which is needed for the Korean language to rendered.

Below shows the latexheader.tex file before and after the change:

Before:

\documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{bm} \newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command \newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command \newcommand{\T}{\text{T}} % Transpose \pagestyle{empty} \begin{document}

After:

\documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{bm} \usepackage{kotex} \newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command \newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command \newcommand{\T}{\text{T}} % Transpose \pagestyle{empty} \begin{document}

Now the package has been added and referenced for use, you will now need to go through every page that uses the Latex macro and press Edit on the page and then Publish the page. This will cause the Latex macro to re-render the content and as a result will also use the new packages.

For example below shows using Korean within the latex macro:

Edit screen

Published view