SingleStringMathTex#

Qualified name: manim.mobject.text.tex\_mobject.SingleStringMathTex

class SingleStringMathTex(tex_string, stroke_width=0, should_center=True, height=None, organize_left_to_right=False, tex_environment='align*', tex_template=None, font_size=48, **kwargs)[source]#

Bases: manim.mobject.svg.svg_mobject.SVGMobject

Elementary building block for rendering text with LaTeX.

Tests

Check that creating a SingleStringMathTex object works:

>>> SingleStringMathTex('Test') 
SingleStringMathTex('Test')

Methods

get_tex_string

init_colors

Initializes the colors.

path_string_to_mobject

Attributes

animate

Used to animate the application of any method of self.

animation_overrides

color

depth

The depth of the mobject.

fill_color

If there are multiple colors (for gradient) this returns the first one

font_size

The font size of the tex mobject.

height

The height of the mobject.

sheen_factor

stroke_color

width

The width of the mobject.

Parameters
  • tex_string (str) –

  • stroke_width (float) –

  • should_center (bool) –

  • height (float | None) –

  • organize_left_to_right (bool) –

  • tex_environment (str) –

  • tex_template (TexTemplate | None) –

  • font_size (float) –

property font_size#

The font size of the tex mobject.

init_colors(propagate_colors=True)[source]#

Initializes the colors.

Gets called upon creation. This is an empty method that can be implemented by subclasses.