mirror of
https://github.com/3b1b/manim.git
synced 2026-04-26 03:00:23 -04:00
Add a debugging method
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user