Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

BasicTexTemplate does not need to be a class

Aron Fischer8e6957470874
diff --git a/manim/utils/tex_templates.py b/manim/utils/tex_templates.py
index cca663a28..44e442ffb 100644
--- a/manim/utils/tex_templates.py
+++ b/manim/utils/tex_templates.py
@@ -11,17 +11,14 @@ from .tex import *
# This file makes TexTemplateLibrary and TexFontTemplates available for use in manim Tex and MathTex objects.
-class BasicTexTemplate(TexTemplate):
- """A simple Tex Template with only basic AMS packages"""
-
- def __init__(self, *args, **kwargs):
- basic_headers = r"""
+def BasicTexTemplate():
+ """ Returns a simple Tex Template with only basic AMS packages"""
+ preamble = r"""
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
"""
- preamble = kwargs.pop("preamble", basic_headers)
- super().__init__(*args, preamble=preamble, **kwargs)
+ return TexTemplate(preamble=preamble)
# TexTemplateLibrary