A community-maintained Python framework for creating mathematical animations.
Yet some formatting changes to docstrings
Philipp Imhof0cc768eb5565
diff --git a/manim/utils/tex.py b/manim/utils/tex.pyindex 8c2d08830..a20eb7c99 100644--- a/manim/utils/tex.py+++ b/manim/utils/tex.py@@ -103,37 +103,28 @@ class TexTemplate:----------txt : :class:`str`String containing the text to be added, e.g. ``\\usepackage{siunitx}``- Returns- -------- None"""self.preamble = txt + "\n" + self.preambleself.rebuild()def add_to_preamble(self, txt):- """Adds txt to the TeX template preamble just before \begin{document}+ """Adds txt to the TeX template preamble just before \\begin{document}Parameters----------txt : :class:`str`String containing the text to be added, e.g. ``\\usepackage{hyperref}``- Returns- -------- None"""self.preamble += "\n" + txtself.rebuild()def add_to_document(self, txt):- """Adds txt to the TeX template just after \begin{document}+ """Adds txt to the TeX template just after \\begin{document}Parameters----------txt : :class:`str`String containing the text to be added.- Returns- -------- None"""self.post_doc_commands += "\n" + txt + "\n"self.rebuild()@@ -145,6 +136,7 @@ class TexTemplate:----------expression : :class:`str`The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``+Returns-------:class:`str`@@ -161,6 +153,7 @@ class TexTemplate: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`diff --git a/manim/utils/tex_file_writing.py b/manim/utils/tex_file_writing.pyindex a19e5740b..d40b5efde 100644--- a/manim/utils/tex_file_writing.py+++ b/manim/utils/tex_file_writing.py@@ -32,6 +32,7 @@ def tex_to_svg_file(expression, environment=None, tex_template=None):The string containing the environment in which the expression should be typeset, e.g. ``align*``tex_template : Optional[:class:`TexTemplate`], optionalTemplate class used to typesetting. If not set, use default template set via `config["tex_template"]`+Returns-------:class:`str`@@ -58,6 +59,7 @@ def generate_tex_file(expression, environment=None, tex_template=None):The string containing the environment in which the expression should be typeset, e.g. ``align*``tex_template : Optional[:class:`TexTemplate`], optionalTemplate class used to typesetting. If not set, use default template set via `config["tex_template"]`+Returns-------:class:`string`@@ -91,6 +93,7 @@ def tex_compilation_command(tex_compiler, output_format, tex_file, tex_dir):File name of TeX file to be typeset.tex_dir : :class:`str`Path to the directory where compiler output will be stored.+Returns-------:class:`str`@@ -140,6 +143,7 @@ def compile_tex(tex_file, tex_compiler, output_format):String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex``output_format : :class:`str`String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf``+Returns-------:class:`str`@@ -177,6 +181,7 @@ def convert_to_svg(dvi_file, extension, regen_if_exists=False, page=1):Setting if SVG has to be regenerated even if it already exists.page : Optional[:class:`int`], optionalPage to be converted if input file is multi-page.+Returns-------:class:`str`