35#include "jkqtmathtext/jkqtmathtext_imexport.h"
36#include "jkqtmathtext/jkqtmathtexttools.h"
241 template <
class TParser>
243 static_assert(std::is_base_of<JKQTMathTextParser, TParser>::value,
"in parse<TParser>() the type TParser has to be derived from JKQTMathTextParser to work!");
244 std::unique_ptr<TParser> p=std::unique_ptr<TParser>(
new TParser(
this));
269 void getSizeDetail(QPainter& painter,
double& width,
double& ascent,
double& descent,
double& strikeoutPos);
287 void draw(QPainter& painter, QPointF x,
bool drawBoxes=
false);
298 double draw(QPainter& painter,
double x,
double y,
bool drawBoxes=
false);
312 void draw(QPainter& painter,
unsigned int flags, QRectF rect,
bool drawBoxes=
false);
321 QPixmap
drawIntoPixmap(
bool drawBoxes=
false, QColor backgroundColor=QColor(Qt::white),
int sizeincrease=0, qreal devicePixelRatio=1.0);
331 QImage
drawIntoImage(
bool drawBoxes=
false, QColor backgroundColor=QColor(Qt::white),
int sizeincrease=0, qreal devicePixelRatio=1.0,
unsigned int resolution_dpi=96);
341 QString
toHtml(
bool* ok=
nullptr,
double fontPointSize=10);
586 bool useSTIX(
bool mathModeOnly=true,
bool useAsFallbackSymbol=true);
608 bool useXITS(
bool mathModeOnly=true,
bool useAsFallbackSymbol=true);
630 bool useFiraMath(
bool mathModeOnly=true,
bool useAsFallbackSymbol=true);
647 bool useASANA(
bool mathModeOnly=true,
bool useAsFallbackSymbol=true);
699 void loadSettings(const QSettings& settings, const QString& group=QString(
"mathtext/"));
701 void saveSettings(QSettings& settings, const QString& group=QString(
"mathtext/")) const;
BaseFontOptions getFontOptions() const
returns the options applied to the base font
QString getFontScript() const
retrieves the font to be used for text in the logical font MTEscript
double intsubsuper_xcorrection_factor
for integrals (\int , \oint , ...) the sub-/superscripts above/below the symbol have to be shifted a ...
Definition jkqtmathtext.h:971
void setOperatorsubsuperDistanceFactor(double __value)
for operators (\sum , \int , ...) where the text is placed above/below the symbol,...
double frac_nested_factor
scaling factor for font size of nominator and denominator of a nested fraction
Definition jkqtmathtext.h:1029
void setFracFactor(double __value)
scaling factor for font size of nominator and denominator of a fraction
double getOperatorsubsuperExtraSpaceFactor() const
for operators (\sum , \int , ...) where the text is placed above/below the symbol,...
friend class JKQTMathTextNode
Definition jkqtmathtext.h:196
QPair< QString, JKQTMathTextFontEncoding > getReplacementFont(const QString &nonUseFont, const QString &defaultFont, JKQTMathTextFontEncoding defaultFontEncoding) const
retrieves a replacement for the given font name nonUseFont, including its encoding....
void setFontSizePixels(double __value)
set the default font soze in pixels
void setFontPointSize(double __value)
set the default font size in points
double getBraceFactor() const
for \left / \right braces: The brace is this factor higher than the child block it surrounds
void setFontRomanAndMath(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text and math, i.e....
static QString init_caligraphicFont
initial choice for "caligraphic" font
Definition jkqtmathtext.h:1114
void setSpecialSuperShiftFactor(double __value)
relative shift of text in superscript to normal text in special superscript mode (after large previou...
void setMatrixLinewidthHeavyFactor(double factor)
width of heavy table lines, this factor is multiplied with the current font.linewidth()
static QString init_symbolFont
initial choice for "fallback symbol" font
Definition jkqtmathtext.h:1108
bool useASANA(bool mathModeOnly=true, bool useAsFallbackSymbol=true)
configures the class to use the ASANA fonts in mathmode
static QString init_serifFont
initial choice for "serif" font
Definition jkqtmathtext.h:1104
void setUnderbraceBraceSizeXFactor(double __value)
height of the brace in underbrace/overbrace, multiplied with ascent
QStringList getErrorList() const
a list that will be filled with error messages while parsing, if any error occur
double getUnderbraceBraceSizeXFactor() const
height of the brace in underbrace/overbrace, multiplied with ascent
JKQTMathTextFontEncoding getFontEncodingTypewriter() const
retrieves the encoding used for the typewriter font
void setFontTypewriter(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEtypewrite...
double getDescent(QPainter &painter)
return the descent, i.e. the distance from the baseline to the lowest part of the representation
double matrix_line_separation_factor
separation of double-lines in tables, this factor is multiplied with the font.linewidth()
Definition jkqtmathtext.h:1081
void setMatrixLineSeparationFactor(double factor)
separation of double-lines in tables, this factor is multiplied with the font.linewidth()
JKQTMathTextFontEncoding getFontEncodingCaligraphic() const
retrieves the encoding used for the caligraphic font
double operatorsubsuper_extraspace_factor
for operators (\sum , \int , ...) where the text is placed above/below the symbol,...
Definition jkqtmathtext.h:958
bool hadErrors() const
returns true when errors were registered in the system
double getSqrtHeightFactor() const
height-increase of the sqrt-symbol, as factor of the child's height
void draw(QPainter &painter, QPointF x, bool drawBoxes=false)
draw a representation to the object at the specified position x , y
QFlags< ParseOption > ParseOptions
Definition jkqtmathtext.h:217
QString getFontMathRoman() const
retrieves the font to be used for text in the logical font MTEroman
bool parse(const QString &markup, ParseOptions options=DefaultParseOptions)
parse the given math markup string, using the given parser class TParser
Definition jkqtmathtext.h:242
void setSuperShiftFactor(double __value)
relative shift of text in superscript to normal text, factor is multiplied by font....
static QString init_fracturFont
initial choice for "fraktur" font
Definition jkqtmathtext.h:1118
JKQTMathText(QObject *parent=nullptr, bool useFontsForGUI=false)
class constructor with a paren QObject parent and calls useGuiFonts() if useFontsForGUI =true
void setIntSubBesidesXCorrectionXFactor(double __value)
for integrals (\int , \oint , ...) the subscripts besides the symbol have to be shifted to the left a...
static QString BaseFontOptions2String(BaseFontOptions opt)
convert BaseFontOptions to a string (e.g. BOLD+ITALIC
void setFontMathSans(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEmathSans
void deleteParsedNode()
this function moves a delete parsedNode-call into the cpp-file, as JKQTMathTextNode is "only" forward...
void addToErrorList(const QString &error)
a list that will be filled with error messages while parsing, if any error occur
static std::mutex s_mutex
mutex to protect the static members
Definition jkqtmathtext.h:1122
bool parse(const QString &markup, DefaultParserTypes markupType=DefaultParser, ParseOptions options=DefaultParseOptions)
parse the given math markup string with a parser derived from markupType.
double getSpecialSubShiftFactor() const
relative shift of text in subscript to normal text in special superscript mode (after large previous ...
void setFontFraktur(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEfraktur
QString getFontMathSans() const
retrieves the font to be used for text in the logical font MTEsans
JKQTMathTextFontEncoding getFontEncodingMathSans() const
retrieves the encoding used for the math-mode sans-serif font
double getFontSizePixels() const
returns the currently set default font size in pixels, if it was defined in points using setFontSizeP...
QSizeF getSize(QPainter &painter)
get the size of the drawn representation. returns an invalid size if no text has been parsed.
double getAscent(QPainter &painter)
return the ascentt, i.e. the distance from the baseline to the highest part of the representation
QString getFontSans() const
retrieves the font to be used for text in the logical font MTEsans
double underbrace_separation_xfactor
additional space between the main text to the curly brace and the brace to underbrace/overbrace,...
Definition jkqtmathtext.h:1040
double draw(QPainter &painter, double x, double y, bool drawBoxes=false)
draw a representation to the object at the specified position x , y
double subsuper_size_factor
resizing factor for font size in sub-/superscript
Definition jkqtmathtext.h:929
double getSpecialSuperShiftFactor() const
relative shift of text in superscript to normal text in special superscript mode (after large previou...
void setMatrixLinewidthThinFactor(double factor)
width of thin table lines, this factor is multiplied with the current font.linewidth()
void setFallbackFontSymbols(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for symbols in the logical font font
double matrix_yPadding_factor
y-padding of two columns, this factor is multiplied with the font.width("x")
Definition jkqtmathtext.h:1101
double getDecorationWidthReductionXFactor() const
a decoration has a size, which is slightly smaller than the text- width. the width is reduced by deco...
static bool s_firstStart
used to check for the first construction of a JKQTMathText ... if true several static variables are i...
Definition jkqtmathtext.h:1120
QString toHtml(bool *ok=nullptr, double fontPointSize=10)
convert LaTeX to HTML. returns ok=true on success and ok=false else.
QPair< QString, JKQTMathTextFontEncoding > getFontData(JKQTMathTextEnvironmentFont font, bool in_math_environment=false) const
retrieve the font and encoding to be used for font, which might optionally be typeset inside a math e...
double bigmathoperator_font_factor
factor, used to increase the font size for big math operators, such as \sum , \prod ,...
Definition jkqtmathtext.h:995
void clearErrorList()
clears all registered errors (see error_list)
void setFracShiftFactor(double __value)
shift of denominator/nummerator away from central line of a frac
void setFontColor(const QColor &__value)
font color
double decoration_height_factor
size of the decorations (dot, tilde, ...), as fraction of the ascent
Definition jkqtmathtext.h:1049
BaseFontOption
options for the base font
Definition jkqtmathtext.h:347
@ BaseFontSmallCaps
output is small-caps (equivalent to placinf text in \textsc{...})
Definition jkqtmathtext.h:351
@ BaseFontItalic
output is italic (equivalent to placinf text in \textit{...})
Definition jkqtmathtext.h:349
@ BaseFontDefault
base font is used as is, without modifications
Definition jkqtmathtext.h:352
@ BaseFontBold
output is bold (equivalent to placinf text in \textbf{...})
Definition jkqtmathtext.h:348
@ BaseFontUnderlined
output is underlined (equivalent to placinf text in \underlined{...})
Definition jkqtmathtext.h:350
JKQTMathTextFontEncoding getFontEncodingBlackboard() const
retrieves the encoding used for the blackboard font
void setOperatorsubsuperSizeFactor(double __value)
like subsuper_size_factor, but for operators (\sum , \int , ...) where the text is placed above/below...
void setSqrtWidthXFactor(double __value)
width of the sqrt-symbol, as factor to width("X")
double getUnderbraceSeparationXFactor() const
additional space between the main text to the curly brace and the brace to underbrace/overbrace,...
QPicture drawIntoPicture(bool drawBoxes=false)
render the last parse result into a QPicture
const JKQTMathTextNode * getNodeTree() const
the syntax tree of JKQTMathTextNode's that was created by the last parse() call
double frac_factor
scaling factor for font size of nominator and denominator of a fraction
Definition jkqtmathtext.h:1024
double frac_shift_factor
shift of denominator/nummerator away from central line of a frac
Definition jkqtmathtext.h:1034
void useAnyUnicodeForTextOnly(QString timesFont, const QString &sansFont, JKQTMathTextFontEncoding encodingTimes=JKQTMathTextFontEncoding::MTFEUnicode, JKQTMathTextFontEncoding encodingSans=JKQTMathTextFontEncoding::MTFEUnicode)
sets timesFont (with its encoding encodingTimes ) for serif-text and sansFont (with its encoding enco...
void setFontCaligraphic(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEcaligraph...
QColor getFontColor() const
font color
void setSpecialSubShiftFactor(double __value)
relative shift of text in subscript to normal text in special superscript mode (after large previous ...
ParseOption
options for parse()
Definition jkqtmathtext.h:211
@ AllowLinebreaks
If set, linebreak (i.e. \ or \newline ) are allowed, otherwise a single line wihtout such linebreak c...
Definition jkqtmathtext.h:214
@ StartWithMathMode
if set, the parser assumes the LaTeX string is in math-mode (as if surrounded by $ )
Definition jkqtmathtext.h:213
@ AddSpaceBeforeAndAfter
If set, a little bit of space is added before and after the text.
Definition jkqtmathtext.h:212
@ DefaultParseOptions
Definition jkqtmathtext.h:215
void setBraceFactor(double __value)
for \left / \right braces: The brace is this factor higher than the child block it surrounds
double getUndersetFactor() const
scaling factor for font of underset/overset text
void setFontRomanOrSpecial(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font by parsing a special syntax defined in the description of JKQTMathTextFontSpecifier
double brace_y_shift_factor
fraction of the brace ascent that the brace is shifted downwards, when scaled
Definition jkqtmathtext.h:1044
void setOperatorsubsuperExtraSpaceFactor(double __value)
for operators (\sum , \int , ...) where the text is placed above/below the symbol,...
void setUnderbraceFactor(double __value)
scaling factor for font of underbrace/overbrace text
double sub_shift_factor
relative shift of text in subscript to normal text, factor is multiplied by font.xHeight()
Definition jkqtmathtext.h:1005
double mathoperator_width_factor
factor, used to extend the size of an operator in math mode
Definition jkqtmathtext.h:991
void setDecorationWidthReductionFactor(double __value)
a decoration has a size, which is slightly smaller than the text- width. the width is reduced by deco...
void draw(QPainter &painter, unsigned int flags, QRectF rect, bool drawBoxes=false)
draw into a rectangle rect with alignment defined in flags (see below)
double getMatrixLinewidthHeavyFactor()
width of heavy table lines, this factor is multiplied with the current font.linewidth()
static BaseFontOptions String2BaseFontOptions(const QString &s)
convert a string (generated by BaseFontOptions2String() to BaseFontOptions
double operatorsubsuper_size_factor
like subsuper_size_factor, but for operators (\sum , \int , ...) where the text is placed above/below...
Definition jkqtmathtext.h:948
void setSubsuperSizeFactor(double __value)
resizing factor for font size in sub-/superscript
double brace_factor
for \left / \right braces: The brace is this factor higher than the child block it surrounds
Definition jkqtmathtext.h:927
void setSubShiftFactor(double __value)
relative shift of text in subscript to normal text, factor is multiplied by font.xHeight()
JKQTMathTextFontEncoding getFontEncodingFallbackFontSymbols() const
retrieves the encoding used for the symbol font to be used for symbols
QString getFontBlackboard() const
retrieves the font to be used for text in the logical font MTEblackboard
double getMathoperatorWidthFactor() const
factor, used to extend the size of an operator in math mode
double getBraceYShiftFactor() const
fraction of the brace ascent that the brace is shifted downwards, when scaled
void setDecorationHeightFactor(double __value)
size of the decorations (dot, tilde, ...), as fraction of the ascent
double matrix_ySeparation_factor
y-separation of two columns, this factor is multiplied with the font.width("x")
Definition jkqtmathtext.h:1091
double sqrt_width_Xfactor
width of the sqrt-symbol, as factor to width("X")
Definition jkqtmathtext.h:1063
JKQTMathTextNodeSize getSizeDetail(QPainter &painter)
return the detailes sizes of the text
double getIntSubBesidesXCorrectionXFactor() const
for integrals (\int , \oint , ...) the subscripts besides the symbol have to be shifted to the left a...
double getMatrixLineSeparationFactor()
separation of double-lines in tables, this factor is multiplied with the font.linewidth()
void loadSettings(const QSettings &settings, const QString &group=QString("mathtext/"))
load the object settings from the given QSettings object with the given name prefix
static QString init_typewriterFont
initial choice for "typewriter" font
Definition jkqtmathtext.h:1112
void setUnderbraceSeparationXFactor(double __value)
additional space between the main text to the curly brace and the brace to underbrace/overbrace,...
bool useXITS(bool mathModeOnly=true, bool useAsFallbackSymbol=true)
configures the class to use the XITS fonts in mathmode
JKQTMathTextBlackboradDrawingMode blackboradFontMode
specifies how to draw blackboard font characters (i.e. \mathbb{N} )
Definition jkqtmathtext.h:923
double matrix_xPadding_factor
x-padding of two columns, this factor is multiplied with the font.width("x")
Definition jkqtmathtext.h:1096
QString getFallbackFontSymbols() const
retrieves the font to be used for symbols in the logical font font
double sqrt_height_factor
height-increase of the sqrt-symbol, as factor of the child's height
Definition jkqtmathtext.h:1065
double intsubbesides_xcorrection_xfactor
for integrals (\int , \oint , ...) the subscripts besides the symbol have to be shifted to the left a...
Definition jkqtmathtext.h:983
QString getFontFraktur() const
retrieves the font to be used for text in the logical font MTEfraktur
void useAnyUnicodeForMathOnly(QString timesFont, const QString &sansFont, JKQTMathTextFontEncoding encodingTimes=JKQTMathTextFontEncoding::MTFEUnicode, JKQTMathTextFontEncoding encodingSans=JKQTMathTextFontEncoding::MTFEUnicode)
sets timesFont (with its encoding encodingTimes ) for serif-text and sansFont (with its encoding enco...
double getFontPointSize() const
returns the currently set default font size in points, if it was defined in points using setFontSize(...
QImage drawIntoImage(bool drawBoxes=false, QColor backgroundColor=QColor(Qt::white), int sizeincrease=0, qreal devicePixelRatio=1.0, unsigned int resolution_dpi=96)
render the last parse result into a QImage
JKQTMathTextFontEncoding getFontEncodingScript() const
retrieves the encoding used for the script font
QMap< QString, JKQTMathTextFontEncoding > fontEncodingReplacements
acompanies fontReplacements and collects the encodings of the replacement fonts, if no entry is prese...
Definition jkqtmathtext.h:888
double matrix_linewidth_thin_factor
width of thin table lines, this factor is multiplied with the current font.linewidth()
Definition jkqtmathtext.h:1071
void addReplacementFont(const QString &nonUseFont, const QString &useFont)
add a font pair to the table with font replacements
JKQTMathTextFontEncoding getFontEncodingSans() const
retrieves the encoding used for the sans-serif font
void setFontMathRoman(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEmathRoman
double getOperatorsubsuperSizeFactor() const
like subsuper_size_factor, but for operators (\sum , \int , ...) where the text is placed above/below...
double getMatrixYSeparationFactor()
y-separation of two columns, this factor is multiplied with the font.width("x")
double fontSize
base font size in the units defined in fontSizeUnits
Definition jkqtmathtext.h:893
double getSqrtSmallFontFactor() const
scaling factor for the small font used to indicate the degree of the sqrt
void setFracNestedFactor(double __value)
scaling factor for font size of nominator and denominator of a nested fraction
JKQTMathTextNode * getNodeTree()
returns the syntax tree of JKQTMathTextNode's that was created by the last parse() call
JKQTMathTextFontEncoding getFontEncodingMathRoman() const
retrieves the encoding used for the math-mode roman font
friend class JKQTMathTextParser
Definition jkqtmathtext.h:195
void setSubsuperModeSelectionBySizeFactor(double __value)
this factor is used to determine how to typeset sub-/superscript.
double getSqrtWidthXFactor() const
width of the sqrt-symbol, as factor to width("X")
double matrix_xSeparation_factor
x-separation of two columns, this factor is multiplied with the font.width("x")
Definition jkqtmathtext.h:1086
double special_super_shift_factor
relative shift of text in superscript to normal text in special superscript mode (after large previou...
Definition jkqtmathtext.h:1011
double subsuper_mode_selection_by_size_factor
this factor is used to determine how to typeset sub-/superscript.
Definition jkqtmathtext.h:946
static QString init_blackboardFont
initial choice for "blackboard" font
Definition jkqtmathtext.h:1116
JKQTMathTextBlackboradDrawingMode getFontBlackboradMode() const
specifies how to draw blackboard font characters (i.e. \mathbb{N} )
void setFontOption(BaseFontOption opt, bool enabled=true)
en/disable the given base font option
double operatorsubsuper_distance_factor
for operators (\sum , \int , ...) where the text is placed above/below the symbol,...
Definition jkqtmathtext.h:953
QColor fontColor
font color
Definition jkqtmathtext.h:891
void setMathoperatorWidthFactor(double __value)
factor, used to extend the size of an operator in math mode
void getSizeDetail(QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos)
return the detailes sizes of the text
void setFontScript(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEscript
void setFontOptions(BaseFontOptions opts)
set (overwrite) the options applied to the base font
void setFontRoman(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEroman
double getSubsuperModeSelectionBySizeFactor() const
this factor is used to determine how to typeset sub-/superscript.
double decoration_separation_factor
separation between the text and the decorations (dot, tilde, ...), as fraction of the ascent
Definition jkqtmathtext.h:1054
double getMatrixYPaddingFactor()
y-padding of two columns, this factor is multiplied with the font.width("x")
~JKQTMathText()
class destructor
QSize getIntSize(QPainter &painter)
get the rounded (using ceil) to an integer size of the drawn representation. returns QSize(0,...
double getIntSubSuperXCorrectionFactor() const
for integrals (\int , \oint , ...) the sub-/superscripts above/below the symbol have to be shifted a ...
void setSqrtSmallFontFactor(double __value)
scaling factor for the small font used to indicate the degree of the sqrt
void setIntSubSuperXCorrectionFactor(double __value)
for integrals (\int , \oint , ...) the sub-/superscripts above/below the symbol have to be shifted a ...
void setMatrixXPaddingFactor(double factor)
x-padding of two columns, this factor is multiplied with the font.width("x")
double super_shift_factor
relative shift of text in superscript to normal text, factor is multiplied by font....
Definition jkqtmathtext.h:1000
void setUndersetFactor(double __value)
scaling factor for font of underset/overset text
QStringList error_list
a list that will be filled with error messages while parsing, if any error occur
Definition jkqtmathtext.h:875
double matrix_linewidth_heavy_factor
width of heavy table lines, this factor is multiplied with the current font.linewidth()
Definition jkqtmathtext.h:1076
void setMatrixYPaddingFactor(double factor)
y-padding of two columns, this factor is multiplied with the font.width("x")
DefaultParserTypes
lists the parser classes that are available by default (convenience interface to the templated parse(...
Definition jkqtmathtext.h:220
@ DefaultParser
Definition jkqtmathtext.h:222
@ LatexParser
use the LaTeX parser from JKQTMathTextLatexParser
Definition jkqtmathtext.h:221
double getMatrixLinewidthThinFactor()
width of thin table lines, this factor is multiplied with the current font.linewidth()
QFlags< BaseFontOption > BaseFontOptions
Definition jkqtmathtext.h:354
static QString init_scriptFont
initial choice for "script" font
Definition jkqtmathtext.h:1110
bool useSTIX(bool mathModeOnly=true, bool useAsFallbackSymbol=true)
configures the class to use the STIX fonts in mathmode
bool useGuiFonts()
configures the class to be used for GUI output, i.e. tries to find fonts that are harmonious for the ...
double getSubShiftFactor() const
relative shift of text in subscript to normal text, factor is multiplied by font.xHeight()
double special_sub_shift_factor
relative shift of text in subscript to normal text in special superscript mode (after large previous ...
Definition jkqtmathtext.h:1017
static const double ABS_MIN_LINEWIDTH
minimum linewidth allowed in a JKQTMathText (given in pt)
Definition jkqtmathtext.h:199
double getSubsuperSizeFactor() const
resizing factor for font size in sub-/superscript
double getBigMathoperatorFontFactor() const
factor, used to increase the font size for big math operators, such as \sum , \prod ,...
double underset_factor
scaling factor for font of underset/overset text
Definition jkqtmathtext.h:1038
double getFontSize() const
returns the currently set default font size in points, if it was defined in points using setFontSize(...
double getDecorationSeparationFactor() const
separation between the text and the decorations (dot, tilde, ...), as fraction of the ascent
JKQTMathTextFontEncoding getFontEncodingRoman() const
retrieves the encoding used for the roman font
void setDecorationSeparationXFactor(double __value)
separation between the text and the decorations (dot, tilde, ...), as fraction of the ascent
void setFontSpecial(const QString &fontSpec)
set font(s) from parsing a font specifier
void useAnyUnicode(QString timesFont, const QString &sansFont, JKQTMathTextFontEncoding encodingTimes=JKQTMathTextFontEncoding::MTFEUnicode, JKQTMathTextFontEncoding encodingSans=JKQTMathTextFontEncoding::MTFEUnicode)
sets timesFont (with its encoding encodingTimes ) for serif-text and sansFont (with its encoding enco...
double getUnderbraceFactor() const
scaling factor for font of underbrace/overbrace text
QPixmap drawIntoPixmap(bool drawBoxes=false, QColor backgroundColor=QColor(Qt::white), int sizeincrease=0, qreal devicePixelRatio=1.0)
render the last parse result into a QPixmap
void setBigMathoperatorFontFactor(double __value)
factor, used to increase the font size for big math operators, such as \sum , \prod ,...
void setFontSans(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEsans
QString getFontCaligraphic() const
retrieves the font to be used for text in the logical font MTEcaligraphic
static QString init_sansFont
initial choice for "sans-erif" font
Definition jkqtmathtext.h:1106
double sqrt_smallfont_factor
scaling factor for the small font used to indicate the degree of the sqrt
Definition jkqtmathtext.h:1061
QMap< QString, QString > fontReplacements
table with font replacements to use (e.g. if it is known that a certain font is not good for renderin...
Definition jkqtmathtext.h:886
double decoration_width_reduction_Xfactor
a decoration has a size, which is slightly smaller than the text- width. the width is reduced by deco...
Definition jkqtmathtext.h:1059
double getOperatorsubsuperDistanceFactor() const
for operators (\sum , \int , ...) where the text is placed above/below the symbol,...
double getDecorationHeightFactor() const
size of the decorations (dot, tilde, ...), as fraction of the ascent
QHash< JKQTMathTextEnvironmentFont, JKQTMathTextFontDefinition > fontDefinitions
stores information about the different fonts used by LaTeX markup
Definition jkqtmathtext.h:903
JKQTMathTextNode * parsedNode
the syntax tree of JKQTMathTextNode's that was created by the last parse() call
Definition jkqtmathtext.h:879
double underbrace_factor
scaling factor for font of underbrace/overbrace text
Definition jkqtmathtext.h:1036
void setFontBlackboard(const QString &fontName, JKQTMathTextFontEncoding encoding=JKQTMathTextFontEncoding::MTFEStandard)
set the font fontName and it's encoding encoding to be used for text in the logical font MTEblackboar...
JKQTMathTextFontEncoding getFontEncodingFraktur() const
retrieves the encoding used for the Fraktur font
void saveSettings(QSettings &settings, const QString &group=QString("mathtext/")) const
store the object settings to the given QSettings object with the given name prefix
double getFracNestedFactor() const
scaling factor for font size of nominator and denominator of a nested fraction
QString getFontTypewriter() const
retrieves the font to be used for text in the logical font MTEtypewriter
void setBraceYShiftFactor(double __value)
fraction of the brace ascent that the brace is shifted downwards, when scaled
double getMatrixXPaddingFactor()
x-padding of two columns, this factor is multiplied with the font.width("x")
void setFontSize(double __value)
set the default font size in points
void setSqrtHeightFactor(double __value)
height-increase of the sqrt-symbol, as factor of the child's height
bool useFiraMath(bool mathModeOnly=true, bool useAsFallbackSymbol=true)
configures the class to use the Fira Math fonts in mathmode
double underbrace_bracesize_xfactor
height of the brace in underbrace/overbrace, multiplied with ascent
Definition jkqtmathtext.h:1042
double getFracFactor() const
scaling factor for font size of nominator and denominator of a fraction
QString getFontRoman() const
retrieves the font to be used for text in the logical font MTEroman
BaseFontOptions fontOptions
additional options for the base fonts
Definition jkqtmathtext.h:897
void setFontBlackboradMode(JKQTMathTextBlackboradDrawingMode mode)
specifies how to draw blackboard font characters (i.e. \mathbb{N} )
void modifyEnvironmentFromFontSettings(JKQTMathTextEnvironment &ev) const
sets all properties of JKQTMathTextEnvironment ev from the fon settings stored in this class (e....
void setMatrixXSeparationFactor(double factor)
x-separation of two columns, this factor is multiplied with the font.width("x")
void setMatrixYSeparationFactor(double factor)
y-separation of two columns, this factor is multiplied with the font.width("x")
JKQTMathTextEnvironment::FontSizeUnit fontSizeUnits
unit of fontSize
Definition jkqtmathtext.h:895
double getFracShiftFactor() const
shift of denominator/nummerator away from central line of a frac
double getMatrixXSeparationFactor()
x-separation of two columns, this factor is multiplied with the font.width("x")
double getSuperShiftFactor() const
relative shift of text in superscript to normal text, factor is multiplied by font....
subclass representing one node in the syntax tree
Definition jkqtmathtextnode.h:37
base class for all math markup parsers used by JKQTMathText
Definition jkqtmathtextparser.h:43
subclass representing a list of nodes in the syntax tree, layed out vertically
Definition jkqtmathtextverticallistnode.h:50
#define JKQTMATHTEXT_LIB_EXPORT
Definition jkqtmathtext_imexport.h:108
JKQTMathTextEnvironmentFont
the available logical fonts (default is MTEroman)
Definition jkqtmathtexttools.h:284
JKQTMathTextBlackboradDrawingMode
used to specify how blackboard-fonts are drawn
Definition jkqtmathtexttools.h:193
JKQTMathTextFontEncoding
used to specify the font encoding used for drawing
Definition jkqtmathtexttools.h:175
@ MTFEStandard
Definition jkqtmathtexttools.h:179
@ MTFEUnicode
This assumes that symbols shall be taken from a Unicode font, which ideally offers full symbol suppor...
Definition jkqtmathtexttools.h:177
describes the current drawing environment (base fontname ...)
Definition jkqtmathtexttools.h:304
summarizes all information available on a font for a specific MTenvironmentFont
Definition jkqtmathtexttools.h:430
represents a font specifier for JKQTMathText. The font consists of two parts: the actual font and the...
Definition jkqtmathtexttools.h:96
beschreibt die Größe(n) eines Knotens
Definition jkqtmathtexttools.h:393