Skip to content

Commit c0b1576

Browse files
author
Aron Fischer
committed
tweaks to docstrings
1 parent bfcd0d0 commit c0b1576

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

manim/utils/tex.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def add_to_preamble(self, txt, prepend=False):
100100
"""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.
101101
Parameters
102102
----------
103-
txt : :class:`str`
103+
txt : :class:`string`
104104
String containing the text to be added, e.g. ``\\usepackage{hyperref}``
105105
prepend : Optional[:class:`bool`], optional
106106
Whether 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 @@ def add_to_document(self, txt):
116116
117117
Parameters
118118
----------
119-
txt : :class:`str`
119+
txt : :class:`string`
120120
String containing the text to be added.
121121
"""
122122
self.post_doc_commands += "\n" + txt + "\n"
@@ -127,12 +127,12 @@ def get_texcode_for_expression(self, expression):
127127
128128
Parameters
129129
----------
130-
expression : :class:`str`
130+
expression : :class:`string`
131131
The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``
132132
133133
Returns
134134
-------
135-
:class:`str`
135+
:class:`string`
136136
LaTeX code based on current template, containing the given ``expression`` and ready for typesetting
137137
"""
138138
return self.body.replace(self.placeholder_text, expression)
@@ -142,14 +142,14 @@ def get_texcode_for_expression_in_env(self, expression, environment):
142142
143143
Parameters
144144
----------
145-
expression : :class:`str`
145+
expression : :class:`string`
146146
The string containing the expression to be typeset, e.g. ``$\\sqrt{2}$``
147147
environment : :class:`str`
148148
The string containing the environment in which the expression should be typeset, e.g. ``align*``
149149
150150
Returns
151151
-------
152-
:class:`str`
152+
:class:`string`
153153
LaTeX code based on template, containing the given expression inside its environment, ready for typesetting
154154
"""
155155
begin = r"\begin{" + environment + "}"

manim/utils/tex_templates.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ class TexTemplateLibrary(object):
2727
"""
2828
A collection of basic TeX template objects
2929
30-
Usage
31-
-----
32-
As a value for the keyword argument tex_template of Tex() and MathTex() mobjects
33-
Tex("My TeX code", tex_template=TexTemplateLibrary.ctex)
30+
Examples
31+
--------
32+
Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::
33+
34+
``Tex("My TeX code", tex_template=TexTemplateLibrary.ctex)``
3435
3536
"""
3637

@@ -900,9 +901,10 @@ class TexFontTemplates(object):
900901
These templates are specifically designed to allow you to typeset formulae and mathematics using
901902
different fonts. They are based on the mathastext LaTeX package.
902903
903-
Usage
904-
-----
905-
As a value for the keyword argument tex_template of Tex() and MathTex() mobjects
904+
Examples
905+
---------
906+
Normal usage as a value for the keyword argument tex_template of Tex() and MathTex() mobjects::
907+
906908
``Tex("My TeX code", tex_template=TexFontTemplates.comic_sans)``
907909
908910
Notes

0 commit comments

Comments
 (0)