You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ManimCE 0.18.0 (if I remember correctly) the mandatory parameters of tex_environments could be added directly in the argument's string using braces, then in 0.18.1 a problem started to occur that the first brace was doubled up by Manim. This is still persistent in 0.19.0.
Expected behavior
Manim should not add an additional opening brace in the environments when given in this form:
tex_environment="{minipage}{7cm}"
How to reproduce the issue
Code for reproducing the problem
pre ManimCE 0.18.1
classtextex_old(Scene):
defconstruct(self):
t1=Tex(r"This is plain text mode\\ in two centered lines.").to_edge(UP, buff=0)
self.add(t1)
t2=Tex(
r"This is a longer text block in a so-called minipage environment allowing for justified margins. And just because I can I also throw in some math $E=mc^2$.",
tex_environment="{minipage}{7cm}"
).set_color(YELLOW).scale_to_fit_width(8).next_to(t1,DOWN)
self.add(t1,t2)
now fails because it creates this LaTeX file (watch out for \begin{{minipage}{7cm}):
\documentclass[preview]{standalone}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{{minipage}{7cm}
This is a longer text block in a so-called minipage environment allowing for justified margins. And just because I can I also throw in some math $E=mc^2$.
\end{{minipage}
\end{document}
since 0.18.1 there are two non-intuitive workarounds:
a) omitting the opening brace in the argument tex_environment="minipage}{7cm}"
classtextex_newA(Scene):
defconstruct(self):
t1=Tex(r"This is plain text mode\\ in two centered lines.").to_edge(UP, buff=0)
self.add(t1)
t2=Tex(
r"This is a longer text block in a so-called minipage environment allowing for justified margins. And just because I can I also throw in some math $E=mc^2$.",
tex_environment="minipage}{7cm}"
).set_color(YELLOW).scale_to_fit_width(8).next_to(t1,DOWN)
self.add(t1,t2)
b) giving the parameters in braces at the beginning of the LaTeX string itself:
classtextex_newB(Scene):
defconstruct(self):
t1=Tex(r"This is plain text mode\\ in two centered lines.").to_edge(UP, buff=0)
self.add(t1)
t2=Tex(
r"{7cm}This is a longer text block in a so-called minipage environment allowing for justified margins. And just because I can I also throw in some math $E=mc^2$.",
tex_environment="minipage"
).set_color(YELLOW).scale_to_fit_width(8).next_to(t1,DOWN)
self.add(t1,t2)
The text was updated successfully, but these errors were encountered:
Description of bug / unexpected behavior
In ManimCE 0.18.0 (if I remember correctly) the mandatory parameters of
tex_environment
s could be added directly in the argument's string using braces, then in 0.18.1 a problem started to occur that the first brace was doubled up by Manim. This is still persistent in 0.19.0.Expected behavior
Manim should not add an additional opening brace in the environments when given in this form:
How to reproduce the issue
Code for reproducing the problem
pre ManimCE 0.18.1now fails because it creates this LaTeX file (watch out for
\begin{{minipage}{7cm}
):since 0.18.1 there are two non-intuitive workarounds:
a) omitting the opening brace in the argument
tex_environment="minipage}{7cm}"
b) giving the parameters in braces at the beginning of the LaTeX string itself:
The text was updated successfully, but these errors were encountered: