ipython
ipython copied to clipboard
latex_to_png fails on windows
The latex_to_png command fails in the method latex_to_png_dvipng. The reason is the temporary file that is generated, contains a ~ in the path, which is not accepted by the latex command.
The temporary file generated is 'C:\\Users\\EENDEB~1\\AppData\\Local\\Temp\\tmpxefqozm3\\tmp.tex'
The command that fails is:
subprocess.check_call(
["latex", "-halt-on-error", tmpfile,
cwd=workdir, stdout=devnull, stderr=devnull)
Locally I can fix this by changing the command to
subprocess.check_call(
["latex", "-halt-on-error", os.path.split(tmpfile)[-1]],
cwd=workdir, stdout=devnull, stderr=devnull)
(only the last part is required, since the cwd is also set).
To make this work some other calls need to be modified as well
I think you should do a pull request to fix this.