3b1b / manim

Animation engine for explanatory math videos
MIT License
60.28k stars 5.7k forks source link

Unexpected Tex error: Xelatex error converting to xdv. #1876

Closed CaftBotti closed 1 year ago

CaftBotti commented 1 year ago

@TonyCrane I don't know why. I suddenly can't use tex.(business as usual before) There are two main methods on the internet: in constants.py, set TEX_ USE_ CTEX change to True; Replace \usepackage[UTF8]{ctex} in ctex_template.tex to the second line. But both have no effect. When i enter the code:

class Story(TeacherStudentsScene):
    def construct(self):
        self.teacher_says(
            TextMobject("I will tell you a story.")
        )

It caused this error:

Qt: Untested Windows version 6.2 detected!
xelatex: Bad parameter value.
xelatex: Data: font_mem_size

Traceback (most recent call last):
  File "c:\beibi\a\manimlib\extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "c:\beibi\a\manimlib\scene\scene.py", line 75, in __init__
    self.construct()
  File "c:\beibi\a\a.py", line 7276, in construct
    self.teacher_says(
  File "c:\beibi\a\manimlib\for_3b1b_videos\pi_creature_scene.py", line 292, in teacher_says
    return self.pi_creature_says(
  File "c:\beibi\a\manimlib\for_3b1b_videos\pi_creature_scene.py", line 130, in pi_creature_says
    self.introduce_bubble(
  File "c:\beibi\a\manimlib\for_3b1b_videos\pi_creature_scene.py", line 113, in introduce_bubble
    anims.append(PiCreatureBubbleIntroduction(
  File "c:\beibi\a\manimlib\for_3b1b_videos\pi_creature_animations.py", line 41, in __init__
    bubble = pi_creature.get_bubble(
  File "c:\beibi\a\manimlib\for_3b1b_videos\pi_creature.py", line 232, in get_bubble
    content_mob = TextMobject(*content)
  File "c:\beibi\a\manimlib\mobject\svg\tex_mobject.py", line 147, in __init__
    SingleStringTexMobject.__init__(
  File "c:\beibi\a\manimlib\mobject\svg\tex_mobject.py", line 42, in __init__
    file_name = tex_to_svg_file(
  File "c:\beibi\a\manimlib\utils\tex_file_writing.py", line 22, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "c:\beibi\a\manimlib\utils\tex_file_writing.py", line 75, in tex_to_dvi
    raise Exception(
Exception: Xelatex error converting to xdv. See log output above or the log file: c:/beibi/a/media/Tex/5c29580c7c3fcd49.log

No file "5c29580c7c3fcd49.log", but 5c29580c7c3fcd49.tex. I clicked it with TeXWorks and ran it, and business as usual! If i return to animation, it is still raising errors.

I installed CTEX, miktex and texlive and set correct paths, but no effect. How can i solve the problem?

CaftBotti commented 1 year ago

I read #570, and the result is: seem to have no effect.