Latex Error Converting DVI problem
See original GitHub issueHello, I have been choogling along with manim and am struggling like many to get the text functional. I managed to implement the changes suggested in #36 which is reiterated in several other threads. I am still able to run commands such as
python3 ./manim.py example_scenes.py SquareToCircle -pl
However, I am experiencing an error message relating to the fix involving TEX_DIR that I am unsure how to fix. I tried pointing directly to the Tex directory within manim but didn’t think that was consistent with the advice here either. My current tex_file_writing.py looks like:
def tex_to_dvi(tex_file):
result = tex_file.replace(".tex", ".xdv")
if not os.path.exists(result):
commands = [
"xelatex",
"-no-pdf",
"-interaction=batchmode",
"-halt-on-error",
"-output-directory=" TEX_DIR,
tex_file,
">",
get_null()
]
exit_code = os.system(" ".join(commands))
if exit_code != 0:
log_file = tex_file.replace(".tex", ".log")
raise Exception(
"Latex error converting to dvi."
"See log output above or the log file: %s" % log_file)
return result
def dvi_to_svg(dvi_file, regen_if_exists=False):
"""
Converts a dvi, which potentially has multiple slides, into a
directory full of enumerated pngs corresponding with these slides.
Returns a list of PIL Image objects for these images sorted as they
where in the dvi
"""
result = dvi_file.replace(".xdv", ".svg")
if not os.path.exists(result):
commands = [
"dvisvgm",
dvi_file,
"-n",
"-v",
"0",
"-o",
result,
">",
get_null()
]
os.system(" ".join(commands))
return result
But, when I attempt to run
python3 ./manim.py example_scenes.py Write Stuff -pl
as a test,
This is all I can muster. I can still run code not involving text. I tried messing around and removing the TEX_DIR portion, which yields the following message:
I can’t wait to share my work if we can get through this! I appreciate everyone’s consideration.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
I am running manim on OS X and I just cloned the repo and everything works fine (if you have all the dependencies right). I think you might have a wrong version of LaTeX. Did you install MikTeX or MacTeX? I’ve installed MacTeX by
brew cask install mactex
. If you don’t have MacTeX, try installing and trying again. And also, revert yourtex_file_writing.py
file to the latest one from https://github.com/3b1b/manim/blob/master/manimlib/utils/tex_file_writing.pyi am having same problem. please help at #623