Tex Equation Editor

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

Figure 5-197. The Tex Equation Editor.

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 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 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:


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:

\huge{\\mbox{$text in the editor window$}}

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.

In order to customise the font sizes used by the local compiler (Tiny, Small, Normal, Large and Huge) you need to define a preamble file containing the code bellow:


Figure 5-198. The Tex Equation Editor: compilation of complete LaTeX documents.