Skip to content

Support typst with manim #3339

Open
Open
@pavelzw

Description

@pavelzw

Description of proposed feature

It would be nice to have support for the typst typesetting language next to LaTeX.
https://github.com/typst/typst

How can the new feature be used?

from manim import *

complex_typst_example = \
"""$ frac(a^2, 2) $
$ vec(1, 2, delim: "[") $
$ mat(1, 2; 3, 4) $
$ lim_x =
    op("lim", limits: #true)_x $
"""

class Formula(Scene):
    def construct(self):
        s = Typst(f"This is normal text rendered with typst.")
        t = MathTypst("A = pi r^2")
        u = Typst(complex_typst_example)

        self.add(s)
        self.add(t)
        self.add(u)

See https://typst.app/docs/reference/math/ for the typst math introduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureEnhancement specifically adding a new feature (feature request should be used for issues instead)

    Type

    No type

    Projects

    Status

    🆕 New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions