LaTex
LaTex Parameters#
Paremeters - as mentioned in Manim Community Documentation - are:
-
Constructor : -
Tex()
-MathTex()
-
Parameters :
-
run_time
: The duration of the animation- float (ex:
3
) - Optional
- Default:
DEFAULT_ANIMATION_RUN_TIME
- float (ex:
-
color
:- color (ex:
BLUE
) - Optional
- Default : (
WHITE
)
- color (ex:
-
- float (ex:
30
) - Optional
- float (ex:
-
- float (ex:
3.0
) - Optional
- float (ex:
-
height
:- integer (ex:
4
) - Optional
- integer (ex:
-
width
:- integer (ex:
2
) - Optional
- integer (ex:
Writing LaTex#
from manimlib import *
import numpy as np
class Latex1(Scene):
def construct(self):
equations = Tex(r"\frac{dy}{dx} = m_t = \tan \theta = \grave{y} = \grave{f}(x)")
self.play(Write(equations), run_time=6)
self.wait(2)
from manim import *
import numpy as np
class Latex1(Scene):
def construct(self):
equations = MathTex(r"\frac{dy}{dx} = m_t = \tan \theta = \grave{y} = \grave{f}(x)")
self.play(Write(equations), run_time=4)
self.wait(2)
Changing Color & Font Size#
from manimlib import *
import numpy as np
class LatexMath(Scene):
def construct(self):
equations = Tex(r"\frac{dy}{dx} = m_t = \tan \theta = \grave{y} = \grave{f}(x)"
, color=ORANGE, font_size=60)
self.play(Write(equations), run_time=4)
self.wait(2)
from manim import *
import numpy as np
class LatexMath(Scene):
def construct(self):
equations = MathTex(r"\frac{dy}{dx} = m_t = \tan \theta = \grave{y} = \grave{f}(x)"
, color=ORANGE, font_size=60)
self.play(Write(equations), run_time=4)
self.wait(2)