Manim Latex 轉換為 dvi 時出錯

Manim Latex 轉換為 dvi 時出錯

由於轉換 dvi 時出錯,我無法在 Manim 上使用 Latex。我看到了關於此的其他帖子,我更改了代碼,但它仍然不起作用。這是我的程式碼: from manim import *
class dvi_error(Scene): def Construction(self): t = MathTex(r"$y = x^2$") t.scale(2) self.add(t) self .等待()

它有這個錯誤訊息:

資訊 將 $y = x^2$ 寫入 media\Tex\88663fadf5843031.tex tex_file_writing.py:107 錯誤 LaTeX 編譯錯誤:LaTeX 錯誤:找不到檔案「standalone.cls」。 tex_file_writing.py:312 錯誤 錯誤上下文: tex_file_writing.py:346 -> \documentclass[preview]{standalone}

                         \usepackage[english]{babel}
                         \usepackage{amsmath}

                INFO     You do not have package standalone.cls installed.                                       tex_file_writing.py:356                    INFO     Install standalone.cls it using your LaTeX package manager, or check for typos.         tex_file_writing.py:356                    ERROR    LaTeX compilation error: Emergency stop.                                                tex_file_writing.py:312
                ERROR    Context of error:                                                                       tex_file_writing.py:346                             -> \documentclass[preview]{standalone}

                         \usepackage[english]{babel}
                         \usepackage{amsmath}

[...] ValueError:轉換為 dvi 時乳膠錯誤。請參閱上面的日誌輸出或日誌檔案:media\Tex\88663fadf5843031.log

我已經成功安裝了 LaTeX(它在命令提示字元中為我提供了版本,並且無需包含數學元素的文字即可工作)。我也嘗試過用 Tex 替換 MathTex 或使用兩個美元符號而不是一個,但沒有任何效果。我該怎麼辦?

相關內容