mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Replace TexText with MTexText
This commit is contained in:
parent
6d5b980d4a
commit
e357885da0
4 changed files with 5 additions and 5 deletions
|
@ -700,7 +700,7 @@ OpeningManimExample
|
||||||
moving_c_grid.prepare_for_nonlinear_transform()
|
moving_c_grid.prepare_for_nonlinear_transform()
|
||||||
c_grid.set_stroke(BLUE_E, 1)
|
c_grid.set_stroke(BLUE_E, 1)
|
||||||
c_grid.add_coordinate_labels(font_size=24)
|
c_grid.add_coordinate_labels(font_size=24)
|
||||||
complex_map_words = TexText("""
|
complex_map_words = MTexText("""
|
||||||
Or thinking of the plane as $\\mathds{C}$,\\\\
|
Or thinking of the plane as $\\mathds{C}$,\\\\
|
||||||
this is the map $z \\rightarrow z^2$
|
this is the map $z \\rightarrow z^2$
|
||||||
""")
|
""")
|
||||||
|
|
|
@ -47,7 +47,7 @@ class OpeningManimExample(Scene):
|
||||||
moving_c_grid.prepare_for_nonlinear_transform()
|
moving_c_grid.prepare_for_nonlinear_transform()
|
||||||
c_grid.set_stroke(BLUE_E, 1)
|
c_grid.set_stroke(BLUE_E, 1)
|
||||||
c_grid.add_coordinate_labels(font_size=24)
|
c_grid.add_coordinate_labels(font_size=24)
|
||||||
complex_map_words = TexText("""
|
complex_map_words = MTexText("""
|
||||||
Or thinking of the plane as $\\mathds{C}$,\\\\
|
Or thinking of the plane as $\\mathds{C}$,\\\\
|
||||||
this is the map $z \\rightarrow z^2$
|
this is the map $z \\rightarrow z^2$
|
||||||
""")
|
""")
|
||||||
|
|
|
@ -170,7 +170,7 @@ class Thumbnail(GraphScene):
|
||||||
# adding manim
|
# adding manim
|
||||||
picture = Group(*self.mobjects)
|
picture = Group(*self.mobjects)
|
||||||
picture.scale(0.6).to_edge(LEFT, buff=SMALL_BUFF)
|
picture.scale(0.6).to_edge(LEFT, buff=SMALL_BUFF)
|
||||||
manim = TexText("Manim").set_height(1.5) \
|
manim = MTexText("Manim").set_height(1.5) \
|
||||||
.next_to(picture, RIGHT) \
|
.next_to(picture, RIGHT) \
|
||||||
.shift(DOWN * 0.7)
|
.shift(DOWN * 0.7)
|
||||||
self.add(manim)
|
self.add(manim)
|
||||||
|
|
|
@ -10,7 +10,7 @@ from manimlib.mobject.geometry import Rectangle
|
||||||
from manimlib.mobject.mobject import Mobject
|
from manimlib.mobject.mobject import Mobject
|
||||||
from manimlib.mobject.svg.brace import Brace
|
from manimlib.mobject.svg.brace import Brace
|
||||||
from manimlib.mobject.svg.mtex_mobject import MTex
|
from manimlib.mobject.svg.mtex_mobject import MTex
|
||||||
from manimlib.mobject.svg.tex_mobject import TexText
|
from manimlib.mobject.svg.mtex_mobject import MTexText
|
||||||
from manimlib.mobject.types.vectorized_mobject import VGroup
|
from manimlib.mobject.types.vectorized_mobject import VGroup
|
||||||
from manimlib.utils.color import color_gradient
|
from manimlib.utils.color import color_gradient
|
||||||
from manimlib.utils.iterables import listify
|
from manimlib.utils.iterables import listify
|
||||||
|
@ -52,7 +52,7 @@ class SampleSpace(Rectangle):
|
||||||
buff: float = MED_SMALL_BUFF
|
buff: float = MED_SMALL_BUFF
|
||||||
) -> None:
|
) -> None:
|
||||||
# TODO, should this really exist in SampleSpaceScene
|
# TODO, should this really exist in SampleSpaceScene
|
||||||
title_mob = TexText(title)
|
title_mob = MTexText(title)
|
||||||
if title_mob.get_width() > self.get_width():
|
if title_mob.get_width() > self.get_width():
|
||||||
title_mob.set_width(self.get_width())
|
title_mob.set_width(self.get_width())
|
||||||
title_mob.next_to(self, UP, buff=buff)
|
title_mob.next_to(self, UP, buff=buff)
|
||||||
|
|
Loading…
Add table
Reference in a new issue