3b1b / 3b1b/manim

LaTeX/ManimGL error while launching

Open
#1,606 8 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
93.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

I'm trying to launch the first example scene and everything else works but LaTeX. I get these cramped words, no further animation and an error.
![Ekrānuzņēmums (284)](https://user-images.githubusercontent.com/88856383/129264435-2a29ae1d-6b41-43f5-911f-d0e37fa6d92d.png)

Code:

from manimlib import *
import numpy as np

class OpeningManimExample(Scene):
def construct(self):
intro_words = Text("""
The original motivation for manim was to
better illustrate mathematical functions
as transformations.
""")
intro_words.to_edge(UP)

self.play(Write(intro_words))
self.wait(2)

# Linear transform
grid = NumberPlane((-10, 10), (-5, 5))
matrix = [[1, 1], [0, 1]]
linear_transform_words = VGroup(
Text("This is what the matrix"),
IntegerMatrix(matrix, include_background_rectangle=True),
Text("looks like")
)
linear_transform_words.arrange(RIGHT)
linear_transform_words.to_edge(UP)
linear_transform_words.set_stroke(BLACK, 10, background=True)

self.play(
ShowCreation(grid),
FadeTransform(intro_words, linear_transform_words)
)
self.wait()
self.play(grid.animate.apply_matrix(matrix), run_time=3)
self.wait()

# Complex map
c_grid = ComplexPlane()
moving_c_grid = c_grid.copy()
moving_c_grid.prepare_for_nonlinear_transform()
c_grid.set_stroke(BLUE_E, 1)
c_grid.add_coordinate_labels(font_size=24)
complex_map_words = TexText("""
Or thinking of the plane as $\\mathds{C}$,\\\\
this is the map $z \\rightarrow z^2$
""")
complex_map_words.to_corner(UR)
complex_map_words.set_stroke(BLACK, 5, background=True)

self.play(
FadeOut(grid),
Write(c_grid, run_time=3),
FadeIn(moving_c_grid),
FadeTransform(linear_transform_words, complex_map_words),
)
self.wait()
self.play(
moving_c_grid.animate.apply_complex_function(lambda z: z**2),
run_time=6,
)
self.wait(2)

Error:

PS C:\Users\Ab> cd manim
PS C:\Users\Ab\manim> manimgl example_scenes.py OpeningManimExample
Warning: Using the default configuration file, which you can modify in c:\users\Ab\manim\manimlib\default_config.yml
If you want to create a local configuration file, you can create a file named custom_config.yml, or run manimgl --config
ERROR:root:left[\begin{array}{c}\quad \\\quad \\\end{array}\right]"

LaTeX Error! Not a worry, it happens to the best of us.

Traceback (most recent call last):
File "C:\Users\Ab\AppData\Local\Programs\Python\Python39\Scripts\manimgl-script.py", line 33, in
File "c:\users\Ab\manim\manimlib\__main__.py", line 17, in main
scene.run()
File "c:\users\Ab\manim\manimlib\scene\scene.py", line 75, in run
self.construct()
File "example_scenes.py", line 29, in construct
IntegerMatrix(matrix, include_background_rectangle=True),
File "c:\users\Ab\manim\manimlib\mobject\matrix.py", line 81, in __init__
self.add_brackets()
File "c:\users\Ab\manim\manimlib\mobject\matrix.py", line 111, in add_brackets
bracket_pair = Tex("".join([
File "c:\users\Ab\manim\manimlib\mobject\svg\tex_mobject.py", line 163, in __init__
super().__init__(full_string, **kwargs)
File "c:\users\Ab\manim\manimlib\mobject\svg\tex_mobject.py", line 42, in __init__
filename = tex_to_svg_file(full_tex)
File "c:\users\Ab\manim\manimlib\utils\tex_file_writing.py", line 52, in tex_to_svg_file
tex_to_svg(tex_file_content, svg_file)
File "c:\users\Ab\manim\manimlib\utils\tex_file_writing.py", line 60, in tex_to_svg
svg_file = dvi_to_svg(tex_to_dvi(tex_file))
File "c:\users\Ab\manim\manimlib\utils\tex_file_writing.py", line 94, in tex_to_dvi
with open(log_file, "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\AB~1\\AppData\\Local\\Temp\\Tex\\c3372cf5b2620435.log'

I've changes username here, but it is valid(only latin letters).

I'm using
- Windows 10
- Python 3.9.6.
- Newest ManimGL (cloned from this GitHub)
- basic MikTex (6/8/2021)
- all other necessary things (ffmpeg etc.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.