Inline preview fails with something like
Process started: latex -src -interaction=nonstopmode "nS2711".tex Process started: dvipng --follow -T tight -D 120 "nS2711".dvi Process exited with error(s)
if
\input
statements.To reproduce unpack minimal-example.tar.gz
.
Inside ./dir,with,comma/test,compiletest.tex
previewing the equation failed. Viewing the log file of the temporary latex file in /tmp/
shows that the header file couldn't be found.
Inside ./normal-dir (paren whitespace okay)/test,compiletest.tex
preview of the equation succeeded.
The same effect is seen when the directory name contains ";", "{" or "}", indicating that some shell command might be incorrectly quoted, though curiously whitespace and parentheses are fine.
Workaround: Rename directories...
Forgot to mention:
- Linux Mint 14.04 32bit
- Compiling the latest .tar.gz release did not change the behaviour.
The reason for the failure is as follows: Since the preview is compiled in a temporary directory, one has to provide the paths for additional inputs. We do this by adding the path of the original document to TEXINPUTS (i.e. .
/dir,with,comma/
in your case).Appartently, kpathsea does not handle such paths correctly, as can be seen with the following debug code:
The result shows that the comma is replaced by a colon and thus the path is broken:
This is a problem with kpathsea and there doesn't seem to be a solution.
Note: Found the same question here
Note 2: It works with MikTeX on windows because MikTeX does not rely on kpathsea but has a path search of its own.