mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Add get_all_isolated_substrings
method
This commit is contained in:
parent
a4f9de1ca1
commit
dae24891fa
1 changed files with 7 additions and 0 deletions
|
@ -288,6 +288,13 @@ class MTex(VMobject):
|
|||
self.set_submobjects(new_submobjects)
|
||||
return self
|
||||
|
||||
def get_all_isolated_substrings(self):
|
||||
tex_string = self.tex_string
|
||||
return remove_list_redundancies([
|
||||
tex_string[span_tuple[0] : span_tuple[1]]
|
||||
for span_tuple in self.tex_spans_dict.keys()
|
||||
])
|
||||
|
||||
def get_parts_by_tex(self, tex):
|
||||
all_span_tuples = sorted(
|
||||
list(self.tex_spans_dict.keys()),
|
||||
|
|
Loading…
Add table
Reference in a new issue