单字符串数学公式¶
限定名称: 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)[来源]¶
基础类:
SVGMobject用于使用LaTeX渲染文本的基本构建块。
测试
检查创建
SingleStringMathTex对象是否有效:>>> SingleStringMathTex('Test') SingleStringMathTex('Test')
方法
get_tex_string初始化颜色。
属性
animate用于动画化
self的任何方法的应用。animation_overridescolordepthmobject的深度。
fill_color如果有多种颜色(用于渐变),则返回第一个颜色
tex mobject 的字体大小。
hash_seed表示生成的mobject点结果的唯一哈希值。
heightmobject的高度。
n_points_per_curvesheen_factorstroke_colorwidthmobject的宽度。
- 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)
- _original__init__(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)¶
初始化自身。有关准确的签名,请参阅 help(type(self))。
- 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)
- _remove_stray_braces(tex)[来源]¶
使
MathTex对不匹配的大括号具有弹性。当TeX代码中的大括号分布在多个参数中时,这一点很重要,例如,
MathTex(r"e^{i", r"\tau} = 1")。
- property font_size¶
tex mobject 的字体大小。