A community-maintained Python framework for creating mathematical animations.
fix the problem that --tex_template flag didn't handle. (#969)
yalikes8f4506da4346
diff --git a/manim/_config/utils.py b/manim/_config/utils.pyindex 54e556214..9acc033bb 100644--- a/manim/_config/utils.py+++ b/manim/_config/utils.py@@ -699,6 +699,10 @@ class ManimConfig(MutableMapping):if hasattr(args, "media_dir") and args.media_dir:self.media_dir = args.media_dir+ # Handle --tex_template+ if args.tex_template:+ self.tex_template = TexTemplateFromFile(tex_filename=args.tex_template)+return selfdef digest_file(self, filename: str) -> "ManimConfig":diff --git a/manim/utils/tex.py b/manim/utils/tex.pyindex 6804e1040..19120f8ec 100644--- a/manim/utils/tex.py+++ b/manim/utils/tex.py@@ -265,7 +265,7 @@ class TexTemplateFromFile(TexTemplate):"""def __init__(self, **kwargs):- self.template_file = kwargs.pop("filename", "tex_template.tex")+ self.template_file = kwargs.pop("tex_filename", "tex_template.tex")super().__init__(**kwargs)def _rebuild(self):