Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: latex error converting to dvi. #2084

Open
Criscraft-333 opened this issue Dec 15, 2023 · 0 comments
Open

ValueError: latex error converting to dvi. #2084

Criscraft-333 opened this issue Dec 15, 2023 · 0 comments

Comments

@Criscraft-333
Copy link

Criscraft-333 commented Dec 15, 2023

Describe the error

When trying to convert a simple Manim animation, the error mentioned above pops up.

Code and Error

Code:
Python (limits.py):

from manim import *

class LimitsAnimation(Scene):
    def construct(self):
        # Create a grid
        grid = NumberPlane()
        self.play(Create(grid))

        # Add text
        intro_text = Text("Exploring Limits of $f(x) = x^2$")
        self.play(Write(intro_text), run_time=2)

        # Plot the function
        func_graph = self.plot_function(lambda x: x**2, color=BLUE)
        func_label = MathTex("f(x) = x^2").next_to(func_graph, direction=UP)
        self.play(Create(func_graph), Write(func_label))

        # Add a table
        table_content = [["$x$", "$f(x)$"], ["1", "1"], ["0.5", "0.25"], ["0.1", "0.01"]]
        table = self.get_table(table_content)
        self.play(FadeIn(table), run_time=2)

        # Show the limit notation
        limit_notation = MathTex(r"\lim_{{x \to 0}} f(x) = 0")
        self.play(FadeIn(limit_notation), run_time=2)

        self.wait(3)

    def plot_function(self, func, color=WHITE):
        graph = self.get_graph(lambda x: func(x), color=color)
        return graph

    def get_graph(self, func, color=WHITE):
        return FunctionGraph(func, color=color)

    def get_table(self, content):
        table = Table(content, h_line=True, v_line=True, h_line_ratio=0.7, v_line_ratio=0.7)
        return table

Command:
manim -pqh limits.py LimitsAnimation

Error:
ValueError: latex error converting to dvi. See log output above or the log file: media\Tex\dd3efe062a37ad42.log
Log content:

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=latex 2023.12.1)  15 DEC 2023 11:08
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**media/Tex/dd3efe062a37ad42.tex
(./media/Tex/dd3efe062a37ad42.tex
LaTeX2e <2023-11-01>
L3 programming layer <2023-11-09>
(c:/tools/TinyTeX/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2022/10/10 v1.3b Class to compile TeX sub-files standalone
(c:/tools/TinyTeX/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2023/07/08 v1.0d unified shell escape interface for LaTeX
Package shellesc Info: Restricted shell escape enabled on input line 77.
) (c:/tools/TinyTeX/texmf-dist/tex/generic/iftex/ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
(c:/tools/TinyTeX/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
)) (c:/tools/TinyTeX/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2022/06/16 v2.9 package option processing (HA)
(c:/tools/TinyTeX/texmf-dist/tex/generic/xkeyval/xkeyval.tex (c:/tools/TinyTeX/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks17
\XKV@tempa@toks=\toks18
(c:/tools/TinyTeX/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count186
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count187
\c@sapage=\count188
(c:/tools/TinyTeX/texmf-dist/tex/latex/standalone/standalone.cfg
File: standalone.cfg 2022/10/10 v1.3b Default configuration file for 'standalone' class
) (c:/tools/TinyTeX/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(c:/tools/TinyTeX/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count189
\c@section=\count190
\c@subsection=\count191
\c@subsubsection=\count192
\c@paragraph=\count193
\c@subparagraph=\count194
\c@figure=\count195
\c@table=\count196
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
\sa@box=\box51
\sa@yoffset=\skip50
) (c:/tools/TinyTeX/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2023/11/11 v3.97 The Babel package
\babel@savecnt=\count197
\U@D=\dimen141
\l@unhyphenated=\language5
(c:/tools/TinyTeX/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@readstream=\read2
\bbl@dirlevel=\count198
Package babel Info: You haven't specified a language as a class or package
(babel)             option. I'll load 'nil'. Reported on input line 4301.
(c:/tools/TinyTeX/texmf-dist/tex/generic/babel/nil.ldf
Language: nil 2023/11/11 v3.97 Nil language
\l@nil=\language6
)) (c:/tools/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2023/05/13 v2.17o AMS math features
\@mathmargin=\skip51
For additional information on amsmath, use the `?' option.
(c:/tools/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2021/08/26 v2.01 AMS text
(c:/tools/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks19
\ex@=\dimen142
)) (c:/tools/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen143
) (c:/tools/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2022/04/08 v2.04 operator names
)
\inf@bad=\count199
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count266
\leftroot@=\count267
LaTeX Info: Redefining \overline on input line 399.
LaTeX Info: Redefining \colon on input line 410.
\classnum@=\count268
\DOTSCASE@=\count269
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box52
\strutbox@=\box53
LaTeX Info: Redefining \big on input line 722.
LaTeX Info: Redefining \Big on input line 723.
LaTeX Info: Redefining \bigg on input line 724.
LaTeX Info: Redefining \Bigg on input line 725.
\big@size=\dimen144
LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
\macc@depth=\count270
LaTeX Info: Redefining \bmod on input line 905.
LaTeX Info: Redefining \pmod on input line 910.
LaTeX Info: Redefining \smash on input line 940.
LaTeX Info: Redefining \relbar on input line 970.
LaTeX Info: Redefining \Relbar on input line 971.
\c@MaxMatrixCols=\count271
\dotsspace@=\muskip16
\c@parentequation=\count272
\dspbrk@lvl=\count273
\tag@help=\toks20
\row@=\count274
\column@=\count275
\maxfields@=\count276
\andhelp@=\toks21
\eqnshift@=\dimen145
\alignsep@=\dimen146
\tagshift@=\dimen147
\tagwidth@=\dimen148
\totwidth@=\dimen149
\lineht@=\dimen150
\@envbody=\toks22
\multlinegap=\skip52
\multlinetaggap=\skip53
\mathdisplay@stack=\toks23
LaTeX Info: Redefining \[ on input line 2953.
LaTeX Info: Redefining \] on input line 2954.
) (c:/tools/TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(c:/tools/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)) (c:/tools/TinyTeX/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
File: l3backend-dvips.def 2023-11-09 L3 backend support: dvips
\l__pdf_internal_box=\box54
\g__pdf_backend_object_int=\count277
\l__pdf_backend_content_box=\box55
\l__pdf_backend_model_box=\box56
\g__pdf_backend_annotation_int=\count278
\g__pdf_backend_link_int=\count279
\g__pdf_backend_link_sf_int=\count280
)

LaTeX Warning: Unused global option(s):
    [english].

(media/Tex/dd3efe062a37ad42.aux)
\openout1 = `dd3efe062a37ad42.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info:    ... okay on input line 7.
LaTeX Font Info:    Trying to load font information for U+msa on input line 9.
(c:/tools/TinyTeX/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info:    Trying to load font information for U+msb on input line 9.
(c:/tools/TinyTeX/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
! Missing $ inserted.
<inserted text> 
                $
l.10     f(x) = x^
                  2 
Here is how much of TeX's memory you used:
 3260 strings out of 476227
 51999 string characters out of 5794587
 1923555 words of memory out of 5000000
 25224 multiletter control sequences out of 15000+600000
 559768 words of font info for 44 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 57i,3n,71p,242b,104s stack positions out of 10000i,1000n,20000p,200000b,200000s

No pages of output.

Environment

OS System: Windows 10
manim version: Manim Community v0.18.0 master
python version: Python 3.11.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant