Skip to content

Commit f525a3d

Browse files
authored
Merge pull request #459 from cobordism/fix216
Fixes issue #216
2 parents 2289376 + 11fd4d0 commit f525a3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

manim/mobject/svg/tex_mobject.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ def __init__(self, *tex_strings, **kwargs):
157157
SingleStringMathTex.__init__(
158158
self, self.arg_separator.join(tex_strings), **kwargs
159159
)
160-
self.break_up_by_substrings()
160+
config = dict(self.CONFIG)
161+
config.update(kwargs)
162+
self.break_up_by_substrings(config)
161163
self.set_color_by_tex_to_color_map(self.tex_to_color_map)
162164

163165
if self.organize_left_to_right:
@@ -176,16 +178,14 @@ def break_up_tex_strings(self, tex_strings):
176178
split_list = [s for s in split_list if s != ""]
177179
return split_list
178180

179-
def break_up_by_substrings(self):
181+
def break_up_by_substrings(self, config):
180182
"""
181183
Reorganize existing submojects one layer
182184
deeper based on the structure of tex_strings (as a list
183185
of tex_strings)
184186
"""
185187
new_submobjects = []
186188
curr_index = 0
187-
config = dict(self.CONFIG)
188-
config["alignment"] = ""
189189
for tex_string in self.tex_strings:
190190
sub_tex_mob = SingleStringMathTex(tex_string, **config)
191191
num_submobs = len(sub_tex_mob.submobjects)

0 commit comments

Comments
 (0)