Skip to content

Commit ff886f6

Browse files
author
Aron Fischer
committed
make rebuild() private
1 parent 3809689 commit ff886f6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

manim/utils/tex.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ def __init__(
7777
if post_doc_commands is not None
7878
else TexTemplate.default_post_doc_commands
7979
)
80-
self.rebuild()
80+
self._rebuild\(\)
8181

82-
def rebuild(self):
82+
def _rebuild(self):
83+
""" Assembles a fully formed tex document (documentclass, preamble, body ...) and stores it as self.body """
8384
self.body = (
8485
self.documentclass
8586
+ "\n"
@@ -108,7 +109,7 @@ def add_to_preamble(self, txt, prepend=False):
108109
self.preamble = txt + "\n" + self.preamble
109110
else:
110111
self.preamble += "\n" + txt
111-
self.rebuild()
112+
self._rebuild\(\)
112113

113114
def add_to_document(self, txt):
114115
"""Adds txt to the TeX template just after \\begin{document}, e.g. ``\\boldmath``
@@ -119,7 +120,7 @@ def add_to_document(self, txt):
119120
String containing the text to be added.
120121
"""
121122
self.post_doc_commands += "\n" + txt + "\n"
122-
self.rebuild()
123+
self._rebuild\(\)
123124

124125
def get_texcode_for_expression(self, expression):
125126
"""Inserts expression verbatim into TeX template.

0 commit comments

Comments
 (0)