3b1b / manim

Animation engine for explanatory math videos
MIT License
69.82k stars 6.16k forks source link

Not being able to run 'OpeningManimExample': 'Latex error converting to dvi.' #719

Open SlenderThreads opened 5 years ago

SlenderThreads commented 5 years ago

I'm attempting to use Manim (Youtuber 3Blue1Brown python's library) to animate. I have installed the necessary software including the newest versions of MikTex and python. I'm able to run the SquareToCircle and the WriteStuff animation, but whenever I try to run OpeningManimExample I get the following error:

File "C:\Animation Programs\Manim\manim_3_feb\manimlib\extract_scene.py", lin 153, in main scene = SceneClass(**scene_kwargs) File "C:\Animation Programs\Manim\manim_3_feb\manimlib\scene\scene.py", line 4, in __init__ self.construct() File "example_scenes.py", line 18, in construct title = TextMobject("This is some \\LaTeX") File "C:\Animation Programs\Manim\manim_3_feb\manimlib\mobject\svg\tex_mobjec .py", line 190, in __init__ self, self.arg_separator.join(tex_strings), **kwargs File "C:\Animation Programs\Manim\manim_3_feb\manimlib\mobject\svg\tex_mobjec .py", line 91, in __init__ self.template_tex_file_body File "C:\Animation Programs\Manim\manim_3_feb\manimlib\utils\tex_file_writing py", line 19, in tex_to_svg_file dvi_file = tex_to_dvi(tex_file) File "C:\Animation Programs\Manim\manim_3_feb\manimlib\utils\tex_file_writing py", line 67, in tex_to_dvi "See log output above or the log file: %s" % log_file) Exception: Latex error converting to dvi. See log output above or the log file: C:\Animation Programs\Manim\manim_3_feb\manimlib\files\Tex\cc8b128e228b77ce.log

There is no such .log file, however there is a .tex file in the exact same folder with the exact same name. The .tex file reads (opening in NotePad):

\documentclass[preview]{standalone} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage{dsfont} \usepackage{setspace} \usepackage{tipa} \usepackage{relsize} \usepackage{textcomp} \usepackage{mathrsfs} \usepackage{calligra} \usepackage{wasysym} \usepackage{ragged2e} \usepackage{physics} \usepackage{xcolor} \usepackage{textcomp} \usepackage{microtype} \DisableLigatures{encoding = *, family = * } %\usepackage[UTF8]{ctex} \linespread{1} \begin{document} \centering This is some \LaTeX \end{document}

Opening the terminal at C:\Animation Programs\Manim\manim_3_feb\manimlib and inputting latex tex_template.tex (as I was suggested to do in this post) gives:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7140 64-bit) entering extended mode (tex_template.tex LaTeX2e <2018-12-01> ("C:\Program Files\MiKTeX 2.9\tex/latex/standalone\standalone.cls" Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan dalone ("C:\Program Files\MiKTeX 2.9\tex/latex/tools\shellesc.sty") ("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\ifluatex.sty") ("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\ifpdf.sty") ("C:\Program Files\MiKTeX 2.9\tex/generic/ifxetex\ifxetex.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/xkeyval\xkeyval.sty" ("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkeyval.tex" ("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkvutils.tex" ("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\keyval.tex")))) ("C:\Program Files\MiKTeX 2.9\tex/latex/standalone\standalone.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls" Document Class: article 2018/09/03 v1.4i Standard LaTeX document class ("C:\Program Files\MiKTeX 2.9\tex/latex/base\size10.clo")) ("C:\Program Files\MiKTeX 2.9\tex/latex/preview\preview.sty" ("C:\Program Files\MiKTeX 2.9\tex/generic/luatex85\luatex85.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/preview\prtightpage.def"))) ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.sty" ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\switch.def") ************************************** Local config file bblopts.cfg used* ("C:\Program Files\MiKTeX 2.9\tex/latex/arabi\bblopts.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/babel-english\english.ldf" ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.def" ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\txtbabel.def")))) ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsmath.sty" For additional information on amsmath, use the '?' option. ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amstext.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsgen.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsbsy.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsopn.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\amssymb.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\amsfonts.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/doublestroke\dsfont.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/setspace\setspace.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/tipa\tipa.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/base\fontenc.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/tipa\t3enc.def") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ot1enc.def"))) ("C:\Program Files\MiKTeX 2.9\tex/latex/relsize\relsize.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\textcomp.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1enc.def" ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1enc.dfu"))) ("C:\Program Files\MiKTeX 2.9\tex/latex/jknappen\mathrsfs.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/fundus-calligra\calligra.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/wasysym\wasysym.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/ms\ragged2e.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/ms\everysel.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/physics\physics.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/l3packages/xparse\xparse.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3-code.tex") ("C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-dvips.def")))) ("C:\Program Files\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-def\dvips.def")) ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\microtype.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\microtype-pdftex.def") ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\microtype.cfg")) (tex_template.aux) ("C:\Program Files\MiKTeX 2.9\tex/latex/tipa\t3cmr.fd") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1cmr.fd") Preview: Fontsize 10pt ABD: EverySelectfont initializing macros ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\mt-cmr.cfg") Preview: Tightpage 0 0 0 0 [1] (tex_template.aux) ) Output written on tex_template.dvi (1 page, 6808 bytes). Transcript written on tex_template.log.

I would really appreciate any help.

Elteoremadebeethoven commented 5 years ago

Try to run the .tex file (cc8b128e228b77ce.tex) with

pdflatex cc8b128e228b77ce.tex

That sould export a .pdf file. If not, show me your PATH variables.

SlenderThreads commented 5 years ago

Doing as you suggested, the following appears in the terminal:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7140 64-bit) entering extended mode (cc8b128e228b77ce.tex LaTeX2e <2018-12-01> ("C:\Program Files\MiKTeX 2.9\tex/latex/standalone\standalone.cls" Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan dalone ("C:\Program Files\MiKTeX 2.9\tex/latex/tools\shellesc.sty") ("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\ifluatex.sty") ("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\ifpdf.sty") ("C:\Program Files\MiKTeX 2.9\tex/generic/ifxetex\ifxetex.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/xkeyval\xkeyval.sty" ("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkeyval.tex" ("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkvutils.tex" ("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\keyval.tex")))) ("C:\Program Files\MiKTeX 2.9\tex/latex/standalone\standalone.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls" Document Class: article 2018/09/03 v1.4i Standard LaTeX document class ("C:\Program Files\MiKTeX 2.9\tex/latex/base\size10.clo")) ("C:\Program Files\MiKTeX 2.9\tex/latex/preview\preview.sty" ("C:\Program Files\MiKTeX 2.9\tex/generic/luatex85\luatex85.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/preview\prtightpage.def"))) ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.sty" ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\switch.def") *************************************n* Local config file bblopts.cfg used * ("C:\Program Files\MiKTeX 2.9\tex/latex/arabi\bblopts.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/babel-english\english.ldf" ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\babel.def" ("C:\Program Files\MiKTeX 2.9\tex/generic/babel\txtbabel.def")))) ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsmath.sty" For additional information on amsmath, use the '?' option. ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amstext.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsgen.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsbsy.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/amsmath\amsopn.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\amssymb.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\amsfonts.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/doublestroke\dsfont.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/setspace\setspace.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/tipa\tipa.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/base\fontenc.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/tipa\t3enc.def") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ot1enc.def"))) ("C:\Program Files\MiKTeX 2.9\tex/latex/relsize\relsize.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\textcomp.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1enc.def" ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1enc.dfu"))) ("C:\Program Files\MiKTeX 2.9\tex/latex/jknappen\mathrsfs.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/fundus-calligra\calligra.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/wasysym\wasysym.sty") ("C:\Program Files\MiKTeX 2.9\tex/latex/ms\ragged2e.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/ms\everysel.sty")) ("C:\Program Files\MiKTeX 2.9\tex/latex/physics\physics.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/l3packages/xparse\xparse.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/l3kernel\expl3-code.tex") ("C:\Program Files\MiKTeX 2.9\tex/latex/l3backend\l3backend-pdfmode.def")))) ("C:\Program Files\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/graphics-def\pdftex.def")) ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\microtype.sty" ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\microtype-pdftex.def") ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\microtype.cfg")) (cc8b128e228b77ce.aux) ("C:\Program Files\MiKTeX 2.9\tex/latex/tipa\t3cmr.fd") ("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1cmr.fd") Preview: Fontsize 10pt Preview: PDFoutput 1 ABD: EverySelectfont initializing macros ("C:\Program Files\MiKTeX 2.9\tex/context/base/mkii\supp-pdf.mkii" [Loading MPS to PDF converter (version 2006.09.02).] ) ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\mt-cmr.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsa.fd") ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\mt-msa.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsb.fd") ("C:\Program Files\MiKTeX 2.9\tex/latex/microtype\mt-msb.cfg") ("C:\Program Files\MiKTeX 2.9\tex/latex/jknappen\ursfs.fd") ("C:\Program Files\MiKTeX 2.9\tex/latex/wasysym\uwasy.fd") Preview: Tightpage 0 0 0 0 [1{C:/Users/Me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] (cc8b128e228b77ce.aux) )<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfont s/cm/cmr10.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7 .pfb> Output written on cc8b128e228b77ce.pdf (1 page, 20345 bytes). Transcript written on cc8b128e228b77ce.log.

A .pdf that reads "This is some LATEX" is created in the same folder as the .tex file. I'm not sure if it is possible to upload a file in a github issue, so I uploaded the .pdf to my Drive in case you need to see it.

zavden commented 5 years ago

Please show the variables in your PATH.

SlenderThreads commented 5 years ago

Sorry for the late response. It's been a busy couple of weeks.

C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\NoteBook FanControl\;C:\Program Files (x86)\Skype\Phone\;C:\Users\Me\AppData\Local\Programs\Python\Python37-32;C:\Users\Me\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Animation Programs\SoX\sox-14-4-2\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR\;C:\Animation Programs\FFmpeg\bin

DzyubSpirit commented 5 years ago

Maybe #734 fixes that?