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
When running ManimGL with MiKTeX on Windows, the LaTeX subprocess fails due to the -no-pdf option, which is not supported by certain versions of MiKTeX. This results in an error during LaTeX compilation, preventing the rendering of scenes that use LaTeX, such as Tex or MathTex.
with the above code i got the following error which is not related to the issue
in full_tex_to_svg
raise LatexError(error_str or "LaTeX compilation failed")
manimlib.utils.tex_file_writing.LatexError: LaTeX compilation failed
Code Snippet:
In the following path: Lib\site-packages\manimlib\utils\tex_file_writing.py, inside the full_tex_to_svg method, it creates a subprocess and the -no-pdf option is passed as an argument:
#the manimgl source code inside the full_tex_to_svg methodprocess=subprocess.run(
[
compiler,
'no-pdf', #where the issue comes from"-interaction=batchmode",
"-halt-on-error",
f"-output-directory={temp_dir}",
tex_path
],
capture_output=True,
text=True
)
How to solve the problem and why it's happening
Since ManimGL uses the latex command to create the SVG file, the output of the latex command is never going to be a PDF file, so the no-pdf option is not recognized. To have a PDF file as output, you should use the pdflatex command.
To overcome the issue, you need to remove the -no-pdf argument in the full_tex_to_svg method located inside the Lib\site-packages\manimlib\utils\tex_file_writing.py file, and the issue should be resolved.
Faced this too. I did more or less the same workaround.
In manimlib/utils/tex_file_writing.py you can delete line 108: "*(['-no-pdf'] if compiler == "xelatex" else []),"
Still facing this error even after removing the -no-pdf argument. Could the problem be that I am only using the 24.1 version? available on the MikTeX site.
Still facing this error even after removing the -no-pdf argument. Could the problem be that I am only using the 24.1 version? available on the MikTeX site.
Describe the bug
When running ManimGL with MiKTeX on Windows, the LaTeX subprocess fails due to the
-no-pdf
option, which is not supported by certain versions of MiKTeX. This results in an error during LaTeX compilation, preventing the rendering of scenes that use LaTeX, such as Tex or MathTex.Error:
with the above code i got the following error which is not related to the issue
Code Snippet:
In the following path:
Lib\site-packages\manimlib\utils\tex_file_writing.py
, inside thefull_tex_to_svg
method, it creates a subprocess and the-no-pdf
option is passed as an argument:How to solve the problem and why it's happening
Since ManimGL uses the
latex
command to create the SVG file, the output of thelatex
command is never going to be a PDF file, so theno-pdf
option is not recognized. To have a PDF file as output, you should use thepdflatex
command.To overcome the issue, you need to remove the
-no-pdf
argument in thefull_tex_to_svg
method located inside theLib\site-packages\manimlib\utils\tex_file_writing.py
file, and the issue should be resolved.Additional context
Environment:
Operating System: Windows 10
ManimGL Version: 1.7.2
MiKTeX Version: 24.4
Python Version: 3.x
The text was updated successfully, but these errors were encountered: