- \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 \\textcal{...} \c \\mathcal{...} : draw the contained text in caligraphic font face \image html jkqtmathtext/jkqtmathtext_cal.png
- \c \\textfrak{...} \c \\mathfrak{...} : draw the contained text in fraktur font face \image html jkqtmathtext/jkqtmathtext_frak.png
- \c \\textscript{...} \c \\mathscript{...} : draw the contained text in script font face \image html jkqtmathtext/jkqtmathtext_script.png
- \c \\textbb{...} \c \\mathbb{...} : draw the contained text in blackboard font face \image html jkqtmathtext/jkqtmathtext_bb.png
The class JKQTMathText also supports simulating blackboard fonts, if they are not available as an actual font on the system. Then the example would look like this: \image html jkqtmathtext/jkqtmathtext_bb_sim.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 \\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 <code>default, \\userfont{Arial}{Arial}, \\userfont{Comic Sans MS}{Comic Sans MS}</code> )
- \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:
- <code>\\verb!...!</code>: interpret enclosed text between \c ! as verbose. Instead of \ ! you can choose ANY character! \image html jkqtmathtext/jkqtmathtext_verb.png generated by <code>\\verb!\\LaTeX{} is not pares inside \\verb~..~! outside {\\backslash}verb</code>
- <code>\\begin{verbatim}...\\end{verbatim}</code>: interpret enclosed multi-line text as verbatim. \image html jkqtmathtext/jkqtmathtext_verbatim.png
\endcode
- <code>\\begin{lstlisting}...\\end{lstlisting}</code>: actually menat for highlighted code, for now this is the same as \c \\begin{verbatim}...\\end{verbatim}. \image html jkqtmathtext/jkqtmathtext_lstlisting.png
- <code>\\begin{verbatim*}...\\end{verbatim*}</code>: interpret enclosed multi-line text as verbatim. Print with visible whitespace and tab characters \image html jkqtmathtext/jkqtmathtext_verbatimast.png
\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 <code>A: \\char65, circonflex: \\char\"109 accent: \\char\'351</code>)
- \c \\unicode{HEX} and \c \\usym{HEX} : draws a unicode character from its 32-bit codepoint \image html jkqtmathtext/jkqtmathtext_unicode.png (generated by <code>star: \\unicode{2605}, circonflex: \\unicode{109} emoticons: \\usym{1F440} \\usym{1F929}</code>)
- \c \\utfeight{HEX} : draws a unicode character from its UTF-8 encoding \image html jkqtmathtext/jkqtmathtext_utf8.png (generated by <code>star: \\utfeight{e29885} emoticons \\utfeight{F09F9881} \\utfeight{f09f98bb}</code>)
- The usual LaTeX-accent commands are also implemented here and work as expected in text-mode, provided the matching unicode characters are available in the current font.
\image html jkqtmathtext/jkqtmathtext_textaccents.png
- In math-mode the text-accent commands do not work. here you have to use the math-mode commands:
\image html jkqtmathtext/jkqtmathtext_mathaccents.png
- You can use \c \\left. or \c \\right. to have only right or only left brace , \image html jkqtmathtext/jkqtmathtext_brace_dot.png generated by <code>{\\backslash}left.: $\\left. a\\cdot x^2\\right)$\\ \\ \\ \\ \\ {\\backslash}right.: $\\left( a\\cdot x^2\\right.$</code>
\image html jkqtmathtext/jkqtmathtext_brace_bigfamily.png generated by <code> $\\Biggl\\langle\\biggl\\{\\Bigl[\\bigl( r^{123}\\bigr)\\Bigr]\\biggr\\}\\Biggr\\rangle$</code>
- <code>$\\begin{array} a & b & ...\\\\ c & d & ...\\end{array}$</code> <code>$\\begin{matrix} a & b & ...\\\\ c & d & ...\\end{matrix}$</code> \image html jkqtmathtext/jkqtmathtext_array.png
- <code>$\\begin{pmatrix} a & b & ...\\\\ c & d & ...\\end{pmatrix}$</code> \image html jkqtmathtext/jkqtmathtext_pmatrix.png
- <code>$\\begin{bmatrix} a & b & ...\\\\ c & d & ...\\end{bmatrix}$</code> \image html jkqtmathtext/jkqtmathtext_bmatrix.png
- <code>$\\begin{Bmatrix} a & b & ...\\\\ c & d & ...\\end{Bmatrix}$</code> \image html jkqtmathtext/jkqtmathtext_bbmatrix.png
- <code>$\\begin{vmatrix} a & b & ...\\\\ c & d & ...\\end{vmatrix}$</code> \image html jkqtmathtext/jkqtmathtext_vmatrix.png
- <code>$\\begin{Vmatrix} a & b & ...\\\\ c & d & ...\\end{Vmatrix}$</code> \image html jkqtmathtext/jkqtmathtext_vvmatrix.png
- <code>$\\substack[lrc]{...\\\\...}$</code> \image html jkqtmathtext/jkqtmathtext_substack.png
- <code>$\\lsubstack{...\\\\...}$</code> \image html jkqtmathtext/jkqtmathtext_lsubstack.png
- <code>$\\rsubstack{...\\\\...}$</code> \image html jkqtmathtext/jkqtmathtext_rsubstack.png