question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with Latex code

See original GitHub issue

Currently, I’m planning using manim for my project about math inspired by 3Blue1Brown’s Linear Algebra on youtube. After I had installed manim, I try to run and figure out how the code in old project of 3b1b works and get stuck in converting TexMobject to dvi. Exception: Latex error converting to dvi. See log output above or the log file: ./media/Tex/1a918a0dd1827c14.log Here are two functions of TrackBasisVectorsExample class in an old project eola.

    def write_linear_map_rule(self):
        rule = TexMobject([
            "\\text{Transformed}\\vec{\\textbf{v}}",
            " = %s"%self.v_coord_strings[0],
            "(\\text{Transformed}\\hat{\\imath})",
            "+%s"%self.v_coord_strings[1],
            "(\\text{Transformed}\\hat{\\jmath})",
        ])
    def get_v_definition(self):
        v_def = TexMobject([
            "\\vec{\\textbf{v}}",
            " = %s"%self.v_coord_strings[0],
            "\\hat{\\imath}",
            "+%s"%self.v_coord_strings[1],
            "\\hat{\\jmath}",
        ])

and here is part of output of log file 1a918a0dd1827c14.log:

LaTeX Font Info:    Try loading font information for U+msa on input line 24.
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
) (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg
File: mt-msa.cfg 2006/02/04 v1.1 microtype config. file: AMS symbols (a) (RS)
)
LaTeX Font Info:    Try loading font information for U+msb on input line 24.
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
) (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg
File: mt-msb.cfg 2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS)
)
LaTeX Font Info:    Try loading font information for U+rsfs on input line 24.
(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/ursfs.fd
File: ursfs.fd 1998/03/24 rsfs font definition file (jk)
)
LaTeX Font Info:    Try loading font information for U+wasy on input line 24.
(/usr/share/texlive/texmf-dist/tex/latex/wasysym/uwasy.fd
File: uwasy.fd 2003/10/30 v2.0 Wasy-2 symbol font definitions
)
! Missing } inserted.
<inserted text> 
                }
l.26 \end{align*}
                  
Here is how much of TeX's memory you used:
 14964 strings out of 492983
 265524 string characters out of 6134921
 335729 words of memory out of 5000000
 18398 multiletter control sequences out of 15000+600000
 534419 words of font info for 40 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 39i,9n,56p,10423b,275s stack positions out of 5000i,500n,10000p,200000b,80000s

No pages of output.

Environments I run manim on Ubuntu 18.04. I have read some posts in Issues tag and installed texlive package so I think I have enough package to be able to run Latex. There might be some problem with Latex code and I’m new to Latex. Is there any way to fix this ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
TonyCranecommented, May 22, 2020

@Tony031218 I try your idea and change

rule = TexMobject(
    "\\text{Transformed}\\vec{\\textbf{v}}",
    " = %s"%self.v_coord_strings[0],
    "(\\text{Transformed}\\hat{\\imath})",
    "+%s"%self.v_coord_strings[1],
    "(\\text{Transformed}\\hat{\\jmath})",
)

to

        a = self.v_coord_strings[0] #
        b = self.v_coord_strings[1] #
        rule = TexMobject([
            "\\text{Transformed}\\vec{\\textbf{v}}",
            " = %s"%a,
            "(\\text{Transformed}\\hat{\\imath})",
            "+%s"%b,
            "(\\text{Transformed}\\hat{\\jmath})",
        ])

But still get the same error

Here you still use TexMobject([ ... ]), so it get the same error. TexMobject need to receive some strings not a list.

0reactions
icesonatacommented, May 22, 2020

Problem solved, I change the wrong syntax command from \end{arary} to \end{array} and it worked smoothly. I also found out some useful command such as {bmatrix} which gives you [] or {pmatrix} which gives you () .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tips and Tricks for Troubleshooting LaTeX
Error messages are shown in red. They are usually more problematic and prevent the document from properly compiling, or indicate a bigger problem....
Read more >
Where is the error in my LaTeX codes? - TeX
To wit, the following code compiles fine as a LaTeX document: \documentclass{article} \usepackage{amsmath} % for 'vmatrix' environment ...
Read more >
Common Issues with LaTeX Code Display
Common Issues with LaTeX Code Display · One possible reason is that the macro is not supported by MathJax. · Another possibility is...
Read more >
The Problems of LaTeX
"Code" is the right word, I have to compile a LaTeX document then start a separate program to see it. Collaboration: The very...
Read more >
10.36. Problem Written in LaTeX
10.36.1. Create a Problem Written in LaTeX¶ · Enable the policy key in your course. · In the unit where you want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found