Tex
For
TextMobject object, the input is plain text therefore Latex letters and symbols are denoted by a $⋯$ pair. But for
TexMobject object, the input is Latex code and plain text is entered as Latex code \text{⋯}.
Tex Symbol
Miscellaneous Symbols
Å | \AA |
∠ | \angle |
‵ | \backprime |
\ | \backslash |
⋂ | \bigcap |
⋃ | \bigcup |
⨀ | \bigodot |
⨁ | \bigoplus |
⨂ | \bigotimes |
★ | \bigstar |
⨄ | \biguplus |
⋁ | \bigvee |
⋀ | \bigwedge |
∎ |
\blacksquare |
▴ | \blacktriangle |
▾ | \blacktriangledown |
⋯ | \cdots |
✓ | \checkmark |
® | \circledR |
Ⓢ | \circledS |
♣ | \clubsuit |
∁ | \complement |
∐ | \coprod |
© | \copyright |
⋱ | \ddots |
♢ | \diamondsuit |
↓ | \downarrow |
⇓ | \Downarrow |
ℓ | \ell |
∅ | \emptyset |
ð | \eth |
∃ | \exists |
Ⅎ | \Finv |
♭ | \flat |
∀ | \forall |
⅁ | \Game |
ħ | \hbar |
♡ | \heartsuit |
ℏ | \hslash |
… | \ldots |
⨌ | \iiiint |
∭ | \iiint |
∬ | \iint |
ℑ(𝕀) |
\Im |
ı | \imath |
∞ | \infty |
∫ | \int |
ȷ | \jmath |
⟨ | \langle |
⌈ | \lceil |
⌊ | \lfloor |
⌞ | \llcorner |
⌟ | \lrcorner |
∡ | \measuredangle |
∇ |
\nabla |
♮ | \natural |
¬ |
\neg |
∯ | \oiint |
∮ | \oint |
¶ | \P |
∂ | \partial |
′ | \prime |
∏ | \prod |
⟩ | \rangle |
⌉ | \rceil |
ℜ(ℝ) |
\Re |
⌋ | \rfloor |
§ | \S |
♯ | \sharp |
♠ | \spadesuit |
∢ | \sphericalangle |
◻ |
\square |
ß | \ss |
∑ | \sum |
√ |
\surd |
∆ |
\triangle |
▿ | \triangledown |
⌜ | \ulcorner |
↑ | \uparrow |
⇑ | \Uparrow |
⌝ | \urcorner |
∅ | \varnothing |
▵ | \vartriangle |
⋮ | \vdots |
| | \vert |
‖ | \Vert |
℘ | \wp |
¥ | \yen |
Example
Code
# folder/file: tut/manim_useful_textmobject_misc_001a.py
from manimlib.scene.scene import Scene
from manimlib.mobject.svg.tex_mobject import TexMobject, TextMobject
class manim_useful_textmobject_misc_001a(Scene):
def construct(self):
text="\\AA\\angle\\backprime\\backslash\\bigcap\\bigcup\\bigodot\\bigoplus\\bigotimes\\bigstar\\biguplus\\bigvee\\cr\\bigwedge\\blacksquare\\blacktriangle\\blacktriangledown\\cdots\\checkmark\\circledR\\circledS\\clubsuit\\complement\\coprod\\copyright\\ddots\\cr\\diamondsuit\\downarrow\\Downarrow\\ell\\emptyset\\eth\\exists\\Finv\\flat\\forall\\Game\\hbar\\heartsuit\\hslash\\ldots\\iiiint\\iiint\\iint\\cr\\Im\\imath\\infty\\int\\jmath\\langle\\lceil\\lfloor\\llcorner\\lrcorner\\measuredangle\\nabla\\natural\\neg\\oiint\\oint\\cr\\P\\partial\\prime\\prod\\rangle\\rceil\\Re\\rfloor\\S\\sharp\\spadesuit\\sphericalangle\\square\\ss\\sum\\surd\\triangle\\triangledown\\ulcorner\\cr\\uparrow\\Uparrow\\urcorner\\varnothing\\vartriangle\\vdots\\vert\\Vert\\wp\\yen"
self.add(TexMobject("%s" %text.replace("\\","\\backslash ").replace("\\backslash cr","\cr")).shift([0,2,0]).scale(0.4))
self.add(TexMobject("%s" %text).shift([0,-2,0]).scale(0.4))
Output
Miscellaneous Accents
| \textacutemacron a |
| \textacutemacron A |
| \textacutewedge a |
| \textacutewedge A |
| \textadvancing a |
| \textadvancing A |
| \textbottomtiebar a |
| \textbottomtiebar A |
| \textbrevemacron a |
| \textbrevemacron A |
| \textcircumacute a |
| \textcircumacute A |
| \textcircumdot a |
| \textcircumdot A |
| \textdotacute a |
| \textdotacute A |
| \textdotbreve a |
| \textdotbreve A |
| \textdoublegrave a |
| \textdoublegrave A |
| \textdoublevbaraccent a |
| \textdoublevbaraccent A |
| \textfallrise a |
| \textfallrise A |
| \textgravecircum a |
| \textgravecircum A |
| \textgravedot a |
| \textgravedot A |
| \textgravemacron a |
| \textgravemacron A |
| \textgravemid a |
| \textgravemid A |
| \texthighrise a |
| \texthighrise A |
| \textinvsubbridge a |
| \textinvsubbridge A |
| \textlowering a |
| \textlowering A |
| \textlowrise a |
| \textlowrise A |
| \textmidacute a |
| \textmidacute A |
| \textovercross a |
| \textovercross A |
| \textoverw a |
| \textoverw A |
| \textpolhook a |
| \textpolhook A |
| \textraising a |
| \textraising A |
| \textretracting a |
| \textretracting A |
| \textringmacron a |
| \textringmacron A |
| \textrisefall a |
| \textrisefall A |
| \textroundcap a |
| \textroundcap A |
| \textseagull a |
| \textseagull A |
| \textsubacute a |
| \textsubacute A |
| \textsubarch a |
| \textsubarch A |
| \textsubbar a |
| \textsubbar A |
| \textsubbridge a |
| \textsubbridge A |
| \textsubcircum a |
| \textsubcircum A |
| \textsubdot a |
| \textsubdot A |
| \textsubgrave a |
| \textsubgrave A |
| \textsublhalfring a |
| \textsublhalfring A |
| \textsubplus a |
| \textsubplus A |
| \textsubrhalfring a |
| \textsubrhalfring A |
| \textsubring a |
| \textsubring A |
| \textsubsquare a |
| \textsubsquare A |
| \textsubtilde a |
| \textsubtilde A |
| \textsubumlaut a |
| \textsubumlaut A |
| \textsubw a |
| \textsubw A |
| \textsubwedge a |
| \textsubwedge A |
| \textsuperimposetilde a |
| \textsuperimposetilde A |
| \textsyllabic a |
| \textsyllabic A |
| \texttildedot a |
| \texttildedot A |
| \texttoptiebar a |
| \texttoptiebar A |
| \textvbaraccent a |
| \textvbaraccent A |
| |
| |
Example
Code
# folder/file: tut/manim_useful_textmobject_misc_002a.py
from manimlib.scene.scene import Scene
from manimlib.mobject.svg.tex_mobject import TexMobject, TextMobject
class manim_useful_textmobject_misc_002a(Scene):
def construct(self):
text="\\textacutemacron a\\textacutemacron A\\textacutewedge a\\textacutewedge A\\textadvancing a\\textadvancing A\\textbottomtiebar a\\textbottomtiebar A\\cr\\textbrevemacron a\\textbrevemacron A\\textcircumacute a\\textcircumacute A\\textcircumdot a\\textcircumdot A\\textdotacute a\\textdotacute A\\cr\\textdotbreve a\\textdotbreve A\\textdoublegrave a\\textdoublegrave A\\textdoublevbaraccent a\\textdoublevbaraccent A\\textfallrise a\\textfallrise A\\cr\\textgravecircum a\\textgravecircum A\\textgravedot a\\textgravedot A\\textgravemacron a\\textgravemacron A\\textgravemid a\\textgravemid A\\cr\\texthighrise a\\texthighrise A\\textinvsubbridge a\\textinvsubbridge A\\textlowering a\\textlowering A\\textlowrise a\\textlowrise A\\textmidacute a\\cr\\textmidacute A\\textovercross a\\textovercross A\\textoverw a\\textoverw A\\textpolhook a\\textpolhook A\\textraising a\\textraising A\\textretracting a\\cr\\textretracting A\\textringmacron a\\textringmacron A\\textrisefall a\\textrisefall A\\textroundcap a\\textroundcap A\\textseagull a\\textseagull A\\cr\\textsubacute a\\textsubacute A\\textsubarch a\\textsubarch A\\textsubbar a\\textsubbar A\\textsubbridge a\\textsubbridge A\\textsubcircum a\\textsubcircum A\\cr\\textsubdot a\\textsubdot A\\textsubgrave a\\textsubgrave A\\textsublhalfring a\\textsublhalfring A\\textsubplus a\\textsubplus A\\textsubrhalfring a\\cr\\textsubrhalfring A\\textsubring a\\textsubring A\\textsubsquare a\\textsubsquare A\\textsubtilde a\\textsubtilde A\\textsubumlaut a\\textsubumlaut A\\cr\\textsubw a\\textsubw A\\textsubwedge a\\textsubwedge A\\textsuperimposetilde a\\textsuperimposetilde A\\textsyllabic a\\textsyllabic A\\cr\\texttildedot a\\texttildedot A\\texttoptiebar a\\texttoptiebar A\\textvbaraccent a\\textvbaraccent A"
self.add(TexMobject("%s" %text.replace("\\","\\backslash ").replace("\\backslash cr","\cr").replace(" a","\\ a").replace(" A","\\ A")).shift([0,2,0]).scale(0.4))
self.add(TexMobject("%s" %text).shift([0,-1.75,0]).scale(0.4))
Output