A community-maintained Python framework for creating mathematical animations.
Example file for test cases
Philipp Imhof58e3ac497d56
diff --git a/example_scenes/custom_template.tex b/example_scenes/custom_template.texnew file mode 100644index 000000000..cf730f975--- /dev/null+++ b/example_scenes/custom_template.tex@@ -0,0 +1,27 @@+\documentclass[preview]{standalone}++\usepackage[english]{babel}+\usepackage{amsmath}+\usepackage{amssymb}+\usepackage[f]{esvect}+\usepackage{dsfont}+\usepackage{setspace}+\usepackage{tipa}+\usepackage{relsize}+\usepackage{textcomp}+\usepackage{mathrsfs}+\usepackage{calligra}+\usepackage{wasysym}+\usepackage{ragged2e}+\usepackage{physics}+\usepackage{xcolor}+\usepackage{microtype}+\DisableLigatures{encoding = *, family = * }+%\usepackage[UTF8]{ctex}+\linespread{1}++\begin{document}++YourTextHere++\end{document}diff --git a/example_scenes/customtex.py b/example_scenes/customtex.pynew file mode 100644index 000000000..db301c72c--- /dev/null+++ b/example_scenes/customtex.py@@ -0,0 +1,27 @@+from manim import *++# Test cases:+# 1. manim customtex.py ExampleFileScene -pl+# --> should fail, because \vv is not defined+#+# 2. manim customtex.py ExampleFileScene --tex_template custom_template.tex -pl+# --> should succeed as custom template includes package esvect (which defines \vv)+#+# 3. manim customtex.py ExampleClassScene -pl+# --> should succeed as the package esvect is included in template object++class ExampleFileScene(Scene):+ def construct(self):+ text=TexMobject(r"\vv{vb}")+ #text=TextMobject(r"$\vv{vb}$")+ self.play(Write(text))++class ExampleClassScene(Scene):+ def construct(self):+ tpl=TexTemplate()+ tpl.append_package(["esvect",["f"]])+ config.register_tex_template(tpl)++ #text=TextMobject(r"$\vv{vb}$")+ text=TexMobject(r"\vv{vb}")+ self.play(Write(text))