3b1b / 3b1b/manim

Latex Error Converting DVI problem

オープン
#610 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
93.9k
フォーク
7.7k
平均マージ
2日 13時間
マージ済み PR(30日)
4

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。