3b1b / 3b1b/manim

Latex Error Converting DVI problem

Aberta
#610 9 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
93.9k
Forks
7.7k
Merge médio
2d 13h
PRs com merge (30d)
4

Descrição

Hello, 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,

![Screen Shot 2019-06-28 at 10 55 19 PM](https://user-images.githubusercontent.com/51562821/60378926-387a7780-99f8-11e9-94fe-fdf96510e2ad.png)

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:

![Screen Shot 2019-06-28 at 10 59 49 PM](https://user-images.githubusercontent.com/51562821/60378953-a626a380-99f8-11e9-861f-3a7c3d77a4b0.png)

I can't wait to share my work if we can get through this! I appreciate everyone's consideration.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.