A community-maintained Python framework for creating mathematical animations.
tweaks to docstrings
Aron Fischerc0b1576e84a3
diff --git a/manim/utils/tex.py b/manim/utils/tex.pyindex 087cc5b5a..d72851422 100644--- a/manim/utils/tex.py+++ b/manim/utils/tex.py@@ -100,7 +100,7 @@ class TexTemplate:"""Adds stuff to the TeX template's preamble (e.g. definitions, packages). Text can be inserted at the beginning or at the end of the preamble.Parameters----------- txt : :class:`str`+ txt : :class:`string`String containing the text to be added, e.g. ``\\usepackage{hyperref}``prepend : Optional[:class:`bool`], optionalWhether the text should be added at the beginning of the preample, i.e. right after ``\\documentclass``. Default is to add it at the end of the preample, i.e. right before ``\\begin{document}``@@ -116,7 +116,7 @@ class TexTemplate:Parameters----------- txt : :class:`str`+ txt : :class:`string`String containing the text to be added."""self.post_doc_commands += "\n" + txt + "\n"@@ -127,12 +127,12 @@ class TexTemplate:Parameters----------- expression : :class:`str`+ expression : :class:`string`The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``Returns-------- :class:`str`+ :class:`string`LaTeX code based on current template, containing the given ``expression`` and ready for typesetting"""return self.body.replace(self.placeholder_text, expression)@@ -142,14 +142,14 @@ class TexTemplate:Parameters----------- expression : :class:`str`+ expression : :class:`string`The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``environment : :class:`str`The string containing the environment in which the expression should be typeset, e.g. ``align*``Returns-------- :class:`str`+ :class:`string`LaTeX code based on template, containing the given expression inside its environment, ready for typesetting"""begin = r"\begin{" + environment + "}"diff --git a/manim/utils/tex_templates.py b/manim/utils/tex_templates.pyindex 1c509168c..9e984193e 100644--- a/manim/utils/tex_templates.py+++ b/manim/utils/tex_templates.py@@ -27,10 +27,11 @@ class TexTemplateLibrary(object):"""A collection of basic TeX template objects- Usage- ------ As a value for the keyword argument tex_template of Tex() and MathTex() mobjects- Tex("My TeX code", tex_template=TexTemplateLibrary.ctex)+ Examples+ --------+ Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::++ ``Tex("My TeX code", tex_template=TexTemplateLibrary.ctex)``"""@@ -900,9 +901,10 @@ class TexFontTemplates(object):These templates are specifically designed to allow you to typeset formulae and mathematics usingdifferent fonts. They are based on the mathastext LaTeX package.- Usage- ------ As a value for the keyword argument tex_template of Tex() and MathTex() mobjects+ Examples+ ---------+ Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::+``Tex("My TeX code", tex_template=TexFontTemplates.comic_sans)``Notes