/*!
\defgroup jkqtmathtext_supportedlatex Supported LaTeX-Subset
\ingroup jkqtmathtext_general
\tableofcontents
\section JKQTMathTextSuppoertedLaTeXMathTextMode Switch between Math- and Text-Mode
These LaTeX-instructions allow to switch between math and text-mode:
- \c $...$ , \c \\ensuremath{...} , \c \\equation{...} : inside is math-mode
- \c \\text{...} , \c \\mbox{...} , \c \\ensuretext{...} : switches from math back to text-mode (or stays in text-mode)
.
The following image shows the difference between text- and math-mode:
\image html jkqtmathtext/jkqtmathtext_mathmode_and_textmode.png
In text mode the text is rendered normally. In math mode the rendering is changed:
- normal text is typeset in an italic font
- numbers, parantheses ... are typeset in an upright font
- operators are typeset with additional space around them
.
\section JKQTMathTextSuppoertedLaTeXFontProps Font Properties
The supported LaTeX subset is listes below. Please note that some commands are used differently than in actual LaTeX.
For example \c \\bf is just a renamed form of \c \\textbf and used as \c \\bf{...} and NOT as \c {\\bf...} .
- \c \\bf{...} \c \\textbf{...} \c \\mathbf{...}: draw the contained text in bold face \image html jkqtmathtext/jkqtmathtext_bold.png
- \c \\it{...} \c \\textit{...} \c \\mathit{...} : draw the contained text in italic face \image html jkqtmathtext/jkqtmathtext_italic.png
- \c \\rm{...} \c \\textrm{...} \c \\mathrm{...} \c \\mbox{...} : draw the contained text in normal upright roman font face \image html jkqtmathtext/jkqtmathtext_fonts.png
- \c \\sf{...} \c \\textsf{...} \c \\mathsf{...} : draw the contained text in normal upright sans-serif font face \image html jkqtmathtext/jkqtmathtext_fonts.png
- \c \\script{...} \c \\textscript{...} \c \\mathscript{...} : draw the contained text in a script font face \image html jkqtmathtext/jkqtmathtext_fonts.png
- \c \\sc{...} : draw the text in small caps \image html jkqtmathtext/jkqtmathtext_sc.png
- \c \\ul{...} \c \\underline{...} \c \\underlined{...} : draw the text with underlining \image html jkqtmathtext/jkqtmathtext_ul.png
- \c \\ol{...} \c \\overline{...} \c \\overlined{...} : draw the text with overlining \image html jkqtmathtext/jkqtmathtext_ol.png
- \c \\tt{...} \c \\texttt{...} \c \\mathtt{...} : draw text in typewriter font \image html jkqtmathtext/jkqtmathtext_fonts.png
- \c \\textcolor{color}{...} \c \\color{color} \c \\mathcolor{color}{...} : draw colored text \image html jkqtmathtext/jkqtmathtext_colored.png
- \c \\userfont{font}{...} : draw text in a user-specific font, available on the system \image html jkqtmathtext/jkqtmathtext_userfont.png (generated by default, \\userfont{Arial}{Arial}, \\userfont{Comic Sans MS}{Comic Sans MS}
)
- \c \\sout{...} : strike out the text \image html jkqtmathtext/MTDstrike.png
- \c \\cancel{...} : slanted strike out the text \image html jkqtmathtext/MTDcancel.png
- \c \\bcancel{...} : back-strike out the text \image html jkqtmathtext/MTDbcancel.png
- \c \\xcancel{...} : x-strike out the text \image html jkqtmathtext/MTDxcancel.png
.
\section JKQTMathTextSuppoertedLaTeXBoxes Boxes
These instructions draw boxes in various ways:
- \c \\boxed{...} : draw text with a box around it \image html jkqtmathtext/jkqtmathtext_boxed.png
- \c \\doublebox{...} : draw text with a rounded box around it \image html jkqtmathtext/jkqtmathtext_doublebox.png
- \c \\ovalbox{...} : draw text with a rounded box around it \image html jkqtmathtext/jkqtmathtext_ovalboxed.png
- \c \\Ovalbox{...} : draw a thick oval box \image html jkqtmathtext/jkqtmathtext_oovalbox.png
- \c \\dashbox{...} , \c \\dbox{...} : draw a dashed box \image html jkqtmathtext/jkqtmathtext_dashbox.png
- \c \\dottedbox{...} : draw a dottted box \image html jkqtmathtext/jkqtmathtext_dottedbox.png
- \c \\ovaldoublebox{...} : draw a double oval box \image html jkqtmathtext/jkqtmathtext_doubleovalbox.png
- \c \\colorbox{bordercolor}{...} : draw a colored box \image html jkqtmathtext/jkqtmathtext_colorbox.png
- \c \\shaded{backgroundcolor}{...} : draw a filled box \image html jkqtmathtext/jkqtmathtext_shaded.png
- \c \\fcolorbox{bordercolor}{backgroundcolor}{...} : draw a colored, filled box \image html jkqtmathtext/jkqtmathtext_fcolorbox.png
- \c \\colorbox{color}{...} : draw a colored box around text \image html jkqtmathtext/jkqtmathtext_colorbox.png
.
\section JKQTMathTextSuppoertedLaTeXVerbatim Verbatim Text
Sometimes it is necessary to typeset text withou interpreting it as LaTeX markup. These instructions are implemented for that:
- \\verb!...!
: interpret enclosed text between \c ! as verbose. Instead of \ ! you can choose ANY character! \image html jkqtmathtext/jkqtmathtext_verb.png generated by \\verb!\\LaTeX{} is not pares inside \\verb~..~! outside {\\backslash}verb
- \\begin{verbatim}...\\end{verbatim}
: interpret enclosed multi-line text as verbatim. \image html jkqtmathtext/jkqtmathtext_verbatim.png generated by outside\\begin{verbatim}\ninside \\LaTeX verbatim\n 2nd verbaimline\n\t3rd line\n\\end{verbatim}
- \\begin{lstlisting}...\\end{lstlisting}
: actually menat for highlighted code, for now this is the same as \c \\begin{verbatim}...\\end{verbatim}. \image html jkqtmathtext/jkqtmathtext_lstlisting.png generated by outside\\begin{lstlisting}\nint main() {\n printf("Hello World\\n");\n}\n\\end{lstlisting}
- \\begin{verbatim*}...\\end{verbatim*}
: interpret enclosed multi-line text as verbatim. Print with visible whitespace and tab characters \image html jkqtmathtext/jkqtmathtext_verbatimast.png generated by outside\\begin{verbatim*}\ninside \\LaTeX verbatim\n 2nd verbaimline\n\t3rd line\n\\end{verbatim*}
.
\section JKQTMathTextSuppoertedLaTeXSymbols Symbols and special characters
These instructions draw boxes in various ways:
- \c \\alpha ... : display the according greek letter \image html jkqtmathtext/jkqtmathtext_greek.png
- \c \\charDECIMAL and \c \\char\"HEX and \c \\char\'OCTAL : draws a unicode character from its 32-bit codepoint \image html jkqtmathtext/jkqtmathtext_char.png (generated by A: \\char65, circonflex: \\char\"109 accent: \\char\'351
)
- \c \\unicode{HEX} and \c \\usym{HEX} : draws a unicode character from its 32-bit codepoint \image html jkqtmathtext/jkqtmathtext_unicode.png (generated by star: \\unicode{2605}, circonflex: \\unicode{109} emoticons: \\usym{1F440} \\usym{1F929}
)
- \c \\utfeight{HEX} : draws a unicode character from its UTF-8 encoding \image html jkqtmathtext/jkqtmathtext_utf8.png (generated by star: \\utfeight{e29885} emoticons \\utfeight{F09F9881} \\utfeight{f09f98bb}
)
- \c \\{ / \\} : display opening/closing brace
- \c \\_ : display underscore
- \c \\sum \c \\prod \c \\int ... : plot special symbol. Note that depending on the fontEncoding the available
symbols may differ (there are not all symbols defined in the MS Windows Symbol
font!). Best coverage should be given by Unicode font encoding with a good
unicode font installed!
\image html jkqtmathtext/jkqtmathtext_symbols.png
- \c - : draw a hyphen \image html jkqtmathtext/jkqtmathtext_hyphen.png
- \c -- : draw an en-dash \image html jkqtmathtext/jkqtmathtext_endash.png
- \c --- : draw an em-dash \image html jkqtmathtext/jkqtmathtext_emdash.png
- \\vec{x} \\dot{x} \\ddot{x} \\overline{x} \\underline{x} \\hat{x} \\tilde{x} \\uul{x} \\ool{x} \\bar{x} \\arrow{x} \\widehat{x} \\widetilde{x} ...
: Decorations over/under symbols \image html jkqtmathtext/jkqtmathtext_mathdeco.png
.
\section JKQTMathTextSuppoertedLaTeXTextAlignment Environments for Multi-line text
Several environments are supported that allow to layout text with linebreaks and different alignemnts:
- $\\begin{document} ... \\\\ ... \\end{document}$
\image html jkqtmathtext/jkqtmathtext_beginflushleft.png
- $\\begin{flushleft} ... \\\\ ... \\end{flushleft}$
\image html jkqtmathtext/jkqtmathtext_beginflushleft.png
- $\\begin{flushright} ... \\\\ ... \\end{flushright}$
\image html jkqtmathtext/jkqtmathtext_beginflushright.png
- $\\begin{center} ... \\\\ ... \\end{center}$
\image html jkqtmathtext/jkqtmathtext_begincenter.png
- $\\begin{framed} ... \\\\ ... \\end{framed}$
\image html jkqtmathtext/jkqtmathtext_beginframed.png
- $\\begin{shaded} ... \\\\ ... \\end{shaded}$
\image html jkqtmathtext/jkqtmathtext_beginshaded.png
- $\\begin{snugshade} ... \\\\ ... \\end{snugshade}$
\image html jkqtmathtext/jkqtmathtext_beginsnugshade.png
.
\section JKQTMathTextSuppoertedLaTeXMathSupport Supported Mathematical Constructs
\subsection JKQTMathTextSuppoertedLaTeXSubSuper Sub- and Superscript
The standard LaTeX sub-/superscript instructions (i.e. \c text_{sub} or \c text^{super} ) are supported:
- \c ^{...} \c _{...} : display the contents of braces in superscript/subscript \image html jkqtmathtext/jkqtmathtext_supersub.png
Special subscript/superscript typesetting applies, when the sub/super follows \c \\sum \c \\Prod ...: \image html jkqtmathtext/jkqtmathtext_specialsubsuper.png
.
\subsection JKQTMathTextSuppoertedLaTeXBraces Braces/Parantheses ...
Braces in math mode are adjusted in size, so they are a small bit (factor \c brace_factor ) larger than the contents.
To enable this you have to write braces with \c \\left and \c \\right. These types of braces are defined (slight
differences to LaTeX standard):
- \c \\left( \c \\right) : default meaning (), \image html jkqtmathtext/jkqtmathtext_brace_round.png
- \c \\left[ \c \\right] : default meaning [], \image html jkqtmathtext/jkqtmathtext_brace_rect.png
- \c \\left\\{ \c \\right\\} : default meaning {}, \image html jkqtmathtext/jkqtmathtext_brace_curly.png
- \c \\left\\langle \c \\right\\rangle : "averaging" braces , \image html jkqtmathtext/jkqtmathtext_brace_tri.png
- \c \\left\\lfloor \c \\right\\rfloor : floor braces , \image html jkqtmathtext/jkqtmathtext_brace_floor.png
- \c \\left\\lceil \c \\right\\rceil : ceil braces , \image html jkqtmathtext/jkqtmathtext_brace_ceil.png
- \c \\left| \c \\right| : absolute value braces | |, \image html jkqtmathtext/jkqtmathtext_bracejkqtmathtext_brace_ucorner_oneline.png
- \c \\left\\| \c \\right\\| \endcode : norm braces || ||, \image html jkqtmathtext/jkqtmathtext_brace_dblline.png
- \c \\left\\llcorner \c \\right\\lrcorner : lower corner braces , \image html jkqtmathtext/jkqtmathtext_brace_lcorner.png
- \c \\left\\ulcorner \c \\right\\urcorner : upper corner braces , \image html jkqtmathtext/.png
- You can use \c \\left. or \c \\right. to have only right or only left brace
.
In additional fixed-size parantheses are available with the following family of instructions:
- \c \\bigl([\\{\\langle... , \c \\big([\\{\\langle... and \c \\bigr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_big.png
- \c \\Bigl([\\{\\langle... , \c \\Big([\\{\\langle... and \c \\Bigr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_bbig.png
- \c \\biggl([\\{\\langle... , \c \\bigg([\\{\\langle... and \c \\biggr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_bigg.png
- \c \\Biggl([\\{\\langle... , \c \\Bigg([\\{\\langle... and \c \\Biggr)]\\}\\rangle... \image html jkqtmathtext/jkqtmathtext_brace_bbigg.png
.
They use the same rendering code as the standard \c \\left and \c \\right instructions. Here is an example:
\image html jkqtmathtext/jkqtmathtext_brace_bigfamily.png generated by $\Biggl\langle\biggl\{\Bigl[\bigl( r^{123}\bigr)\Bigr]\biggr\}\Biggr\rangle$
\subsection JKQTMathTextSuppoertedLaTeXRoots Roots
There are also instructions that allow to write roots:
- $\\sqrt{1+\\sqrt{1+x}}$
\image html jkqtmathtext/jkqtmathtext_sqrt.png
- $\\sqrt[3]{1+\\sqrt[3]{1+x}}$
\image html jkqtmathtext/jkqtmathtext_cbrt.png
.
\subsection JKQTMathTextSuppoertedLaTeXUnderOver Undersetting, Oversetting, Underbraces, Overbraces ...
There are also instructions that allow to under/overset braces, arrows, ...:
- $\\underbrace{x+x+...+x}{k\\ \\mathrm{times}}$
\image html jkqtmathtext/jkqtmathtext_brace_underbrace.png
- $\\overbrace{x+x+...+x}{k\\ \\mathrm{times}}$
\image html jkqtmathtext/jkqtmathtext_brace_overbrace.png
- $\\underbracket{x+x+...+x}{k\\ \\mathrm{times}}$
\image html jkqtmathtext/MTFMunderbracket.png
- $\\overbracket{x+x+...+x}{k\\ \\mathrm{times}}$
\image html jkqtmathtext/MTFMoverbracket.png
- $\\overset{main}{over}$
\image html jkqtmathtext/jkqtmathtext_brace_overset.png
- $\\underset{main}{under}$
\image html jkqtmathtext/jkqtmathtext_brace_underset.png
.
\subsection JKQTMathTextSuppoertedLaTeXFrac Fraction Type Instructions
Several Matrix/Array-typed LaTeX instructions are supported:
- $\\frac{...}{...}$
\image html jkqtmathtext/MTFMfrac.png
- $\\tfrac{...}{...}$
(70% smaller font) \image html jkqtmathtext/MTFMtfrac.png
- $\\dfrac{...}{...}$
\image html jkqtmathtext/MTFMdfrac.png
- $\\sfrac{...}{...}$
\image html jkqtmathtext/MTFMsfrac.png
- $\\stfrac{...}{...}$
(70% smaller font) \image html jkqtmathtext/MTFMstfrac.png
.
\subsection JKQTMathTextSuppoertedLaTeXMatrix Matrix/Array Type Instructions
Several Matrix/Array-typed LaTeX instructions are supported:
- $\\stackrel{...}{...}$ $\\binom{...}{...}$
\image html jkqtmathtext/jkqtmathtext_brace_stackrel.png
- $\\begin{cases} ... & ... \\\\ ... & ... \\end{cases}$
\image html jkqtmathtext/jkqtmathtext_brace_begincases.png
- $\\begin{array} a & b & ...\\\\ c & d & ...\\end{array}$
$\\begin{matrix} a & b & ...\\\\ c & d & ...\\end{matrix}$
\image html jkqtmathtext/jkqtmathtext_array.png
- $\\begin{pmatrix} a & b & ...\\\\ c & d & ...\\end{pmatrix}$
\image html jkqtmathtext/jkqtmathtext_pmatrix.png
- $\\begin{bmatrix} a & b & ...\\\\ c & d & ...\\end{bmatrix}$
\image html jkqtmathtext/jkqtmathtext_bmatrix.png
- $\\begin{Bmatrix} a & b & ...\\\\ c & d & ...\\end{Bmatrix}$
\image html jkqtmathtext/jkqtmathtext_bbmatrix.png
- $\\begin{vmatrix} a & b & ...\\\\ c & d & ...\\end{vmatrix}$
\image html jkqtmathtext/jkqtmathtext_vmatrix.png
- $\\begin{Vmatrix} a & b & ...\\\\ c & d & ...\\end{Vmatrix}$
\image html jkqtmathtext/jkqtmathtext_vvmatrix.png
- $\\substack[lrc]{...\\\\...}$
\image html jkqtmathtext/jkqtmathtext_substack.png
- $\\lsubstack{...\\\\...}$
\image html jkqtmathtext/jkqtmathtext_lsubstack.png
- $\\rsubstack{...\\\\...}$
\image html jkqtmathtext/jkqtmathtext_rsubstack.png
.
*/