Menu

#1138 Inline preview fails with comma in directory path

None
wont-fix
nobody
None
5*
2014-11-06
2014-11-03
Anonymous
No

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

  1. The directory path contains commas (whitespace, parenthesis don't matter).
  2. The header contains \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...

1 Attachments

Discussion

  • Klaus

    Klaus - 2014-11-03

    Forgot to mention:
    - Linux Mint 14.04 32bit
    - Compiling the latest .tar.gz release did not change the behaviour.

     
  • Tim Hoffmann

    Tim Hoffmann - 2014-11-06

    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:

    export TEXINPUTS=/home/tim/txs/tests/comma/dir,with,comma:.:
    export KPATHSEA_DEBUG=8`
    cd /tmp
    latex hBL6335.tex
    

    The result shows that the comma is replaced by a colon and thus the path is broken:

    kdebug:Search path for tex files (from TEXINPUTS environment variable)
    kdebug:  = /home/tim/txs/tests/comma/dir:with:comma:.: (... and more paths)
    

    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.

     
  • Tim Hoffmann

    Tim Hoffmann - 2014-11-06
    • status: open --> wont-fix
    • Group: -->
     

Log in to post a comment.