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
Standard Function Names
| arccos |
\arccos |
arcsin |
\arcsin |
arctan |
\arctan |
arg |
\arg |
| bmod |
\bmod |
cos |
\cos |
cosh |
\cosh |
cot |
\cot |
| coth |
\coth |
csc |
\csc |
deg |
\deg |
det |
\det |
| dim |
\dim |
exp |
\exp |
gcd |
\gcd |
hom |
\hom |
| inf |
\inf |
ker |
\ker |
lg |
\lg |
lim |
\lim |
| liminf |
\liminf |
limsup |
\limsup |
ln |
\ln |
log |
\log |
| max |
\max |
min |
\min |
pmod |
\pmod |
Pr |
\Pr |
| sec |
\sec |
sin |
\sin |
sinh |
\sinh |
sup |
\sup |
| tan |
\tan |
tanh |
\tanh |
|
|
|
|
Example
Code
# folder/file: tut/manim_useful_textmobject_function_001a.py
from manimlib.scene.scene import Scene
from manimlib.mobject.svg.tex_mobject import TexMobject, TextMobject
class manim_useful_textmobject_function_001a(Scene):
def construct(self):
text="\\arccos\\arcsin\\arctan\\arg\\bmod\\cos\\cosh\\cot\\coth\\csc\\deg\\det\\dim\\exp\\gcd\\hom\\inf\\cr\\ker\\lg\\lim\\liminf\\limsup\\ln\\log\\max\\min\\pmod 2\\Pr\\sec\\sin\\sinh\\sup\\tan\\tanh"
self.add(TexMobject("%s" %text.replace("\\","\\backslash ").replace("\\backslash cr","\cr")).shift([0,3,0]).scale(0.7))
self.add(TexMobject("%s" %text).shift([0,0,0]).scale(0.8))
self.add(TexMobject(r"%s" %text).shift([0,-1.5,0]).scale(0.8))
self.add(TextMobject("$%s$" %text.replace("cr","newline")).shift([0,-3,0]).scale(0.8))
Output
Greek letters
| ฮฑ ฮ |
\alpha A |
ฮฝ ฮ |
\nu N |
| ฮฒ ฮ |
\beta B |
ฮพ ฮ |
\xi\Xi |
| ฮณ ฮ |
\gamma \Gamma |
ฮฟ ฮ |
>o O |
| ฮด ฮ |
\delta \Delta |
ฯ ฮ |
\pi \Pi |
| ๐ ฮต ฮ |
\epsilon \varepsilon E |
ฯ ๐ ฮก |
\rho\varrho P |
| ฮถ ฮ |
\zeta Z |
ฯ ฮฃ |
\sigma \Sigma |
| ฮท ฮ |
\eta H |
ฯ ฮค |
\tau T |
| ฮธ ๐ ฮ |
\theta \vartheta \Theta |
ฯ
ฮฅ |
\upsilon \Upsilon |
| ฮน ฮ |
\iota I |
๐ ฯ ฮฆ |
\phi \varphi \Phi |
| ฮบ ฮ |
\kappa K |
ฯ ฮง |
\chi X |
| ฮป ฮ |
\lambda \Lambda |
ฯ ฮจ |
\psi \Psi |
| ฮผ ฮ |
\mu M |
ฯ ฮฉ |
\omega \Omega |
Example
Code
# folder/file: tut/manim_useful_textmobject_greek_001a.py
from manimlib.scene.scene import Scene
from manimlib.mobject.svg.tex_mobject import TexMobject, TextMobject
class manim_useful_textmobject_greek_001a(Scene):
def construct(self):
text="\\alpha A\\beta B\\gamma \\Gamma\\delta \\Delta\\epsilon\\varepsilon E\\zeta Z\\eta H\\theta \\vartheta \\Theta\\iota I\\kappa K\\lambda \\Lambda\\mu M\\nu N\\xi\\Xi o O\\pi \\Pi\\rho\\varrho P\\sigma \\Sigma\\tau T\\upsilon \\Upsilon\\phi \\varphi \\Phi\\chi X\\psi \\Psi\\omega \\Omega"
self.add(TexMobject("%s" %text.replace("\\zeta","\\cr\\zeta").replace("\\mu","\\cr\\mu").replace("\\tau","\\tau\\cr").replace("\\","\\backslash ").replace("\\backslash cr","\cr")).shift([0,2.5,0]).scale(0.7))
self.add(TexMobject("%s" %text).shift([0,0,0]).scale(0.8))
self.add(TexMobject(r"%s" %text).shift([0,-1.5,0]).scale(0.8))
self.add(TextMobject("$%s$" %text).shift([0,-3,0]).scale(0.8))
Output
Arrows
| โบ |
\circlearrowleft |
โป |
\circlearrowright |
โถ |
\curvearrowleft |
โท |
\curvearrowright |
| โค |
\dashleftarrow |
โค |
\dashrightarrow |
โ |
\downarrow |
โ |
\Downarrow |
| โ |
\downdownarrows |
โ |
\downharpoonleft |
โ |
\downharpoonright |
โฉ |
\hookleftarrow |
| โช |
\hookrightarrow |
โ |
\leadsto |
โ |
\leftarrow |
โ |
\Leftarrow |
| โข |
\leftarrowtail\ |
โฝ |
\leftharpoondown |
โผ |
\leftharpoonup |
โ |
\leftleftarrows |
| โ |
\leftrightarrow |
โ |
\Leftrightarrow |
โ |
\leftrightarrows |
โ |
\leftrightharpoons |
| โญ |
\leftrightsquigarrow |
โ |
\Lleftarrow |
โต |
\longleftarrow |
โธ |
\Longleftarrow |
| โท |
\longleftrightarrow |
โบ |
\Longleftrightarrow |
โผ |
\longmapsto |
โถ |
\longrightarrow |
| โน |
\Longrightarrow |
โซ |
\looparrowleft |
โฌ |
\looparrowright |
โฐ |
\Lsh |
| โฆ |
\mapsto |
โธ |
\multimap |
โ |
\nearrow |
โ |
\nleftarrow |
| โ |
\nLeftarrow |
โฎ |
\nleftrightarrow |
โ |
\nLeftrightarrow |
โ |
\nrightarrow |
| โ |
\nRightarrow |
โ |
\nwarrow |
โ |
\rightarrow |
โ |
\Rightarrow |
| โฃ |
\rightarrowtail |
โ |
\rightharpoondown |
โ |
\rightharpoonup |
โ |
\rightleftarrows |
| โ |
\rightleftharpoons |
โ |
\rightrightarrows |
โ |
\rightsquigarrow |
โ |
\Rrightarrow |
| โฑ |
\Rsh |
โ |
\searrow |
โ |
\swarrow |
โ |
\to |
| โ |
\twoheadleftarrow |
โ |
\twoheadrightarrow |
โ |
\uparrow |
โ |
\Uparrow |
| โ |
\updownarrow |
โ |
\Updownarrow |
โฟ |
\upharpoonleft |
โพ |
\upharpoonright |
| โ |
\upuparrows |
|
|
|
|
|
|
Example
Code
# folder/file: tut/manim_useful_textmobject_arrow_001a.py
from manimlib.scene.scene import Scene
from manimlib.mobject.svg.tex_mobject import TexMobject, TextMobject
class manim_useful_textmobject_arrow_001a(Scene):
def construct(self):
text="\\circlearrowleft\\circlearrowright\\curvearrowleft\\curvearrowright\\dashleftarrow\\dashrightarrow\\downarrow\\cr\\Downarrow\\downdownarrows\\downharpoonleft\\downharpoonright\\hookleftarrow\\hookrightarrow\\leadsto\\leftarrow\\cr\\Leftarrow\\leftarrowtail\\leftharpoondown\\leftharpoonup\\leftleftarrows\\leftrightarrow\\Leftrightarrow\\cr\\leftrightarrows\\leftrightharpoons\\leftrightsquigarrow\\Lleftarrow\\longleftarrow\\Longleftarrow\\longleftrightarrow\\cr\\Longleftrightarrow\\longmapsto\\longrightarrow\\Longrightarrow\\looparrowleft\\looparrowright\\Lsh\\mapsto\\multimap\\cr\\nearrow\\nleftarrow\\nLeftarrow\\nleftrightarrow\\nLeftrightarrow\\nrightarrow\\nRightarrow\\nwarrow\\rightarrow\\cr\\Rightarrow\\rightarrowtail\\rightharpoondown\\rightharpoonup\\rightleftarrows\\rightleftharpoons\\cr\\rightrightarrows\\rightsquigarrow\\Rrightarrow\\Rsh\\searrow\\swarrow\\to\\twoheadleftarrow\\cr\\twoheadrightarrow\\uparrow\\Uparrow\\updownarrow\\Updownarrow\\upharpoonleft\\upharpoonright\\upuparrows"
self.add(TexMobject("%s" %text.replace("\\","\\backslash ").replace("\\backslash cr","\cr")).shift([0,2,0]).scale(0.5))
self.add(TexMobject("%s" %text).shift([0,-2,0]).scale(0.6))
Output