Tex doesn't work with animations
Muaath5 opened this issue · 1 comments
Muaath5 commented
Describe the error
When I animate Tex
object, it doesn't get affected.
Code and Error
Code:
from manim import *
class displayEquations(Scene):
def construct(self):
# Create Tex objects
first_line = Text('Manim also allows you')
second_line = Text('to show beautiful math equations')
equation = Tex('$d\\left(p, q\\right)=d\\left(q, p\\right)=\\sqrt{(q_1-p_1)^2+(q_2-p_2)^2+...+(q_n-p_n)^2}=\\sqrt{\\sum_{i=1}^n\\left(q_i-p_i\\right)^2}$')
# Position second line underneath first line
second_line.next_to(first_line, DOWN)
# Displaying text and equation
self.play(Write(first_line), Write(second_line))
self.wait(1)
self.play(ReplacementTransform(first_line, equation), FadeOut(second_line))
self.wait(3)
Copied from here: https://github.com/TannerGilbert/Manim-Examples/blob/master/displaying_equations.py
Error:
No animation, here is the sample video. and here is mine:
displayEquations.mp4
Environment
OS System: Windows 11
manim version: Manim Community v0.18.1
python version: 3.10.11
MikTex version: MiKTeX-pdfTeX 4.19 (MiKTeX 24.4)
3b1b commented
It looks like you're using the Manim Community version, so you may want to raise the issue there. This repo is the 3b1b version.
I tried you're scene on this version and it seemed to work fine, though you need to remove the dollar signs from the Tex argument.