mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 14:47:44 +00:00
Add a debugging method
This commit is contained in:
parent
88d863c1d7
commit
744916507c
1 changed files with 8 additions and 0 deletions
|
|
@ -335,6 +335,7 @@ class MTex(VMobject):
|
|||
return self
|
||||
|
||||
def assign_submob_tex_strings(self):
|
||||
# Not sure whether this is the best practice...
|
||||
tex_string = self.tex_string
|
||||
label_dict = {
|
||||
tex_span.label: (span_tuple, tex_span.containing_labels)
|
||||
|
|
@ -461,6 +462,13 @@ class MTex(VMobject):
|
|||
for span_tuple in self.tex_spans_dict.keys()
|
||||
])
|
||||
|
||||
def print_tex_strings_of_submobjects(self):
|
||||
# For debugging
|
||||
# Working with `index_labels()`
|
||||
print(f"Submobjects of \"{self.get_tex()}\":")
|
||||
for i, submob in enumerate(self.submobjects):
|
||||
print(f"{i}: \"{submob.get_tex()}\"")
|
||||
|
||||
|
||||
class MTexText(MTex):
|
||||
CONFIG = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue