JKQTPlotter an extensive Qt4/Qt5 Plotter framework (including a fast variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
JKQTMathText LaTeX-Renderer for Qt

This group contains JKQTMathText, a self-contained LaTeX-renderer for Qt. It is used to renderer labels in JKQTPlotter, but can be used independently. The class does not depend on any library, except Qt. In particular it actually parses a LaTeX string and draws it in pure C++. It does NOT rely on an installed LaTeX for the rendering! More...

Collaboration diagram for JKQTMathText LaTeX-Renderer for Qt:

## Modules

JKQTMathText Render-Tree Items

## Classes

struct  JKQTMathText::FontDefinition
summarizes all information available on a font for a specific MTenvironmentFont More...

class  JKQTMathText
this class parses a LaTeX string and can then draw the contained text/equation onto a QPainter More...

class  JKQTMathTextLabel
A QLabel-derived class that draws an equation with LaTeX markup using JKQTMathText. More...

class  JKQTMathText::MTbraceNode
subclass representing a brace node More...

class  JKQTMathText::MTdecoratedNode
subclass representing a decorated text m (e.g. \vec \hat ...) node More...

struct  JKQTMathText::MTenvironment
describes the current drawing environment (base fontname ...) More...

class  JKQTMathText::MTfracNode
subclass representing a \frac node More...

class  JKQTMathText::MTinstruction1Node
subclass representing an instruction node with exactly one argument in the syntax tree More...

class  JKQTMathText::MTlistNode
subclass representing a list of nodes in the syntax tree More...

class  JKQTMathText::MTmatrixNode
subclass representing a \begin{matrix} node More...

class  JKQTMathText::MTnode
subclass representing one node in the syntax tree More...

struct  JKQTMathText::MTnodeSize
beschreibt die Größe eines Knotens More...

class  JKQTMathText::MTplainTextNode
subclass representing one text node in the syntax tree More...

class  JKQTMathText::MTsqrtNode
subclass representing a sqrt node More...

class  JKQTMathText::MTsubscriptNode
subclass representing an subscript node with exactly one argument in the syntax tree More...

class  JKQTMathText::MTsuperscriptNode
subclass representing an superscript node with exactly one argument in the syntax tree More...

class  JKQTMathText::MTsymbolNode
subclass representing one symbol (e.g. \alpha , \cdot ...) node in the syntax tree More...

class  JKQTMathText::MTtextNode
subclass representing one text node in the syntax tree More...

class  JKQTMathText::MTwhitespaceNode
subclass representing one whitepsace node in the syntax tree More...

struct  JKQTMathText::MTsymbolNode::SymbolProps

struct  JKQTMathText::tbrData

struct  JKQTMathText::tbrDataH

## Macros

#define JKQTMATHTEXT_LIB_EXPORT

## Functions

JKQTMATHTEXT_LIB_EXPORT void initJKQTMathTextResources ()
initialized Qt-ressources necessary for JKQTMathText More...

## Detailed Description

This group contains JKQTMathText, a self-contained LaTeX-renderer for Qt. It is used to renderer labels in JKQTPlotter, but can be used independently. The class does not depend on any library, except Qt. In particular it actually parses a LaTeX string and draws it in pure C++. It does NOT rely on an installed LaTeX for the rendering!

Examples for the usage of this class can be found here:

## ◆ JKQTMathText::MTsymbolNode::SymbolProps

 struct JKQTMathText::MTsymbolNode::SymbolProps
Class Members
char bold 0: leave bold setting as is, >0: set bold, <0 set bold to false
bool drawBar indicates whether to draw a bar (like for \hbar )
bool exactAscent
bool extendWidthInMathmode
QString font font to use for output
double fontFactor magnification factor for the font size
bool heightIsAscent
char italic 0: leave italic setting as is, >0: set italic, <0 set italic to false
QString symbol the symbol name supplied to the constructor
double yfactor this corrects the y position of a symbol: draws at y <- y+ height*yfactor)

## ◆ JKQTMATHTEXT_LIB_EXPORT

 #define JKQTMATHTEXT_LIB_EXPORT

This define allows to export functions and classes from the jkqtcommon-library when building a dynamic/shared library. Usage is as follows:

#include "jkqtmathtext/jkqtmathtext_imexport.h"
class JKQTMATHTEXT_LIB_EXPORT exportedClassName {
...
};
JKQTMATHTEXT_LIB_EXPORT void exportedFunctionName();

These macros append the appropriate __declspec(dllexport) and __declspec(dllimport) to the function/class body and thus tell windows compilers to export these sysmbols from the shared library, or import them from a shared library.

Note that these attributes are only necessary on windows systems!

These macros are controlled by two other macros:

• JKQTMATHTEXT_LIB_IN_DLL declares that the application should link against a shared version of JKQTMathText, i.e. JKQTMathTextSharedLib_XYZ . This needs to be defined while compiling the library and while compiling any application linking against JKQTMathTextSharedLib_XYZ.
• JKQTMATHTEXT_LIB_EXPORT_LIBRARY is only defined while compiling JKQTMathText into JKQTMathTextSharedLib_XYZ and ensures thet the symbols are exported. If it is not defined (e.g. while compiling an application), the symbols are imported

## ◆ initJKQTMathTextResources()

 JKQTMATHTEXT_LIB_EXPORT void initJKQTMathTextResources ( )

initialized Qt-ressources necessary for JKQTMathText

JKQTMATHTEXT_LIB_EXPORT
#define JKQTMATHTEXT_LIB_EXPORT
Definition: jkqtmathtext_imexport.h:98