三亩地 三亩地SAN MU DI · CODE DIARY
ARTICLE DETAIL

日记详情

真实记录编程学习的某一天,欢迎挑你感兴趣的翻一翻。

Manim - Extra LaTeX Packages

Manim - Extra LaTeX Packages

Extra LaTeX Packages

Some commands require special packages to be loaded into the TeX template. For example, to use the mathscr script, we need to add the mathrsfs package. Since this package isn’t loaded into Manim’s tex template by default, we have to add it manually.

 

from manim import *class AddPackageLatex(Scene):def construct(self):myTemplate = TexTemplate()myTemplate.add_to_preamble(r"\usepackage{mathrsfs}")tex = Tex(r"$\mathscr{H} \rightarrow \mathbb{H}$",tex_template=myTemplate,font_size=144,)self.add(tex)

 

1

 

← 返回列表