Skip to main content

Text Objects

Text

Text(text, font="", font_size=48, **kwargs)
Regular text rendering. Example:
text = Text("Hello, World!", font_size=60, color=BLUE)

MarkupText

MarkupText(text, **kwargs)
Text with markup support (bold, italic, colors).

Tex

Tex(*tex_strings, **kwargs)
LaTeX text rendering. Example:
formula = Tex(r"E = mc^2")

MathTex

MathTex(*tex_strings, **kwargs)
Mathematical equations. Example:
equation = MathTex(
    r"\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}"
)

See Also