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