我正在尝试在 manim 中使用 tikz。我使用的 manim 版本是 3feb2019。我已将必要的包添加到 tex_template 文件中。但它会抛出一个错误:
IndexError:列表索引超出范围
我不知道要解决这个错误。有人可以帮我吗?
编辑:这是我尝试渲染的代码。
# These are in the example_scenes.py file
class TikzMobject(TextMobject):
CONFIG = {
"stroke_width":3,
"fill_opacity":0,
"stroke_opacity":1
}
class TikzExample3(Scene):
def construct(self):
example_tex = TikzMobject(
r"""
\begin{tikzpicture}
\draw (-1,0)--(1,0);
\end{tikzpicture}
"""
)
self.play(Write(example_tex))
self.wait()
我已经尝试了最新版本的 manim 和 3feb 版本,但它只是抛出了同样的错误:list index out of range。我可以在输出 tex 文件中编译 tikz 代码。我使用的平台是Windows。