Text interpreter, specified as one of these values:
'tex'
— Interpret characters using a subset of
TeX markup.
'latex'
— Interpret characters using LaTeX
markup.
'none'
— Display literal characters.
TeX Markup
By default, MATLAB® supports a subset of TeX markup. Use TeX markup to add superscripts
and subscripts, modify the font type and color, and include special characters in
the text.
Modifiers remain in effect until the end of the text.
Superscripts and subscripts are an exception because they modify only the next character or the
characters within the curly braces. When you set the interpreter to 'tex'
,
the supported modifiers are as follows.
Modifier | Description | Example |
---|
^{ } | Superscript | 'text^{superscript}' |
_{ } | Subscript | 'text_{subscript}' |
\bf | Bold font | '\bf text' |
\it | Italic font | '\it text' |
\sl | Oblique font (usually the same as italic font) | '\sl text' |
\rm | Normal font | '\rm text' |
\fontname{specifier } | Font name — Replace
specifier with the name of
a font family. You can use this in combination with other modifiers. | '\fontname{Courier} text' |
\fontsize{specifier } | Font size —Replace
specifier with a numeric
scalar value in point units. | '\fontsize{15} text' |
\color{specifier } | Font color — Replace
specifier with one of
these colors: red , green ,
yellow , magenta ,
blue , black ,
white , gray ,
darkGreen , orange , or
lightBlue . | '\color{magenta} text' |
\color[rgb]{specifier} | Custom font color — Replace
specifier with a
three-element RGB triplet. | '\color[rgb]{0,0.5,0.5} text' |
This table lists the supported special characters for the
'tex'
interpreter.
Character Sequence | Symbol | Character Sequence | Symbol | Character Sequence | Symbol |
---|
\alpha
| α | \upsilon
| υ | \sim
| ~ |
\angle
| ∠ | \phi
| 
| \leq
| ≤ |
\ast
| *
| \chi
| χ | \infty
| ∞ |
\beta
| β | \psi
| ψ | \clubsuit
| ♣ |
\gamma
| γ | \omega
| ω | \diamondsuit
| ♦ |
\delta
| δ | \Gamma
| Γ | \heartsuit
| ♥ |
\epsilon
| ϵ | \Delta
| Δ | \spadesuit
| ♠ |
\zeta
| ζ | \Theta
| Θ | \leftrightarrow
| ↔ |
\eta
| η | \Lambda
| Λ | \leftarrow
| ← |
\theta
| θ | \Xi
| Ξ | \Leftarrow
| ⇐ |
\vartheta
| ϑ | \Pi
| Π | \uparrow
| ↑ |
\iota
| ι | \Sigma
| Σ | \rightarrow
| → |
\kappa
| κ | \Upsilon
| ϒ | \Rightarrow
| ⇒ |
\lambda
| λ | \Phi
| Φ | \downarrow
| ↓ |
\mu
| µ | \Psi
| Ψ | \circ
| º |
\nu
| ν | \Omega
| Ω | \pm
| ± |
\xi
| ξ | \forall
| ∀ | \geq
| ≥ |
\pi
| π | \exists
| ∃ | \propto
| ∝ |
\rho
| ρ | \ni
| ∍ | \partial
| ∂ |
\sigma
| σ | \cong
| ≅ | \bullet
| • |
\varsigma
| ς | \approx
| ≈ | \div
| ÷ |
\tau
| τ | \Re
| ℜ | \neq
| ≠ |
\equiv
| ≡ | \oplus
| ⊕ | \aleph
| ℵ |
\Im
| ℑ | \cup
| ∪ | \wp
| ℘ |
\otimes
| ⊗ | \subseteq
| ⊆ | \oslash
| ∅ |
\cap
| ∩ | \in
| ∈ | \supseteq
| ⊇ |
\supset
| ⊃ | \lceil
| ⌈ | \subset
| ⊂ |
\int
| ∫ | \cdot
| · | \o
| ο |
\rfloor
| ⌋ | \neg
| ¬ | \nabla
| ∇ |
\lfloor
| ⌊ | \times
| x | \ldots
| ... |
\perp
| ⊥ | \surd
| √ | \prime
| ´ |
\wedge
| ∧ | \varpi
| ϖ | \0
| ∅ |
\rceil
| ⌉ | \rangle
| 〉 | \mid
| | |
\vee
| ∨ | \langle
| 〈 | \copyright
| © |
LaTeX Markup
To use LaTeX markup, set the interpreter to 'latex'
. Use dollar
symbols around the text, for example, use '$\int_1^{20} x^2 dx$'
for inline mode or '$$\int_1^{20} x^2 dx$$'
for display
mode.
The displayed text uses the default LaTeX font style. The
FontName
, FontWeight
, and
FontAngle
properties do not have an effect. To change the
font style, use LaTeX markup.
The maximum size of the text that you can use with the LaTeX interpreter is 1200
characters. For multiline text, this reduces by about 10 characters per line.
For more information about the LaTeX system, see The LaTeX Project website at
https://www.latex-project.org/.