# Tex Equation Editor

This dialog is activated by selecting the Add Equation... command from the Graph menu.

It can be used in order to add a Tex formatted equation to the plot layer. The equation is rendered under the form of a bitmap image created by a third party tool. Two image generation methods are available: a web service (which requires a working internet connection) or a locally installed LaTeX compiler, the latter method being strongly recommended since it provides more flexibility.

The web service used by QtiPlot up to release 0.9.9.10 was provided by MathTran (http://mathtran.org/). Since the beggining of May 2017 this web service seems to have been discontinued, therefore starting with release 0.9.9.11 QtiPlot uses the services of another website: CodeCogs. This server brings the possibility to set a transparent background for the equation by checking the Transparent box.

If you have installed a LaTeX compiler on your computer you don't need to enter document/equation environment commands since QtiPlot automatically does it for you: it creates a temporary file which contains either the following hardcoded preamble:

\documentclass{article}
\pagestyle{empty}


or a custom preamble that is read from a user defined file path (since one might want to use particular LaTeX packages).

The following code is then appended to the temporary .tex file:

\begin{document}
\huge{\\mbox{$text in the editor window$}}
\end{document}


The paths for both the LaTeX compiler and the custom preamble file can be set via the File Locations tab of the Preferences dialog.

The generation method using a local compiler allows for compilation of complete LaTeX documents and not just of equation markup, so that you can fully customize the image output in terms of font size, text color and background color. Using this method you can also force a transparent background for the equation by checking the Transparent box.