#1721 Problem with option -synctex and spaces in filenames

closed
PdfTeX (104)
2012-10-17
2008-09-09
Petiard
No

If I compile (with pdflatex) the file "my file.tex" with a space in the filename, there is a problem with option -synctex:

1/ If we have -synctex>0, no file "my file.synctex.gz" is created

2/ If we have -synctex=-1, we have the error message:
pdflatex: invalid argument: my*file.synctex(busy) and the compilation stops.

F. Pétiard

Discussion

  • Holger Jeromin
    Holger Jeromin
    2009-03-25

    Fixed according to
    http://itexmac.sourceforge.net/SyncTeX.html
    1.5: Mon Oct 13 11:13:01 UTC 2008
    - There is now a workaround for the bug on pdftex (1.40.9) with space characters in file names.

    I am waiting for inclusion into miktex.

     
  • idb_winshell
    idb_winshell
    2010-01-24

    Hi Christian,

    MiKTeX 2.8 has pdftex 1.40.10 but this bug is not resolved.
    When can we expect a fix for MiKTeX ?

    Thanks Ingo

     
  • rjsomeone
    rjsomeone
    2010-03-03

    I use TeXworks, with in the standard build profile: --tex-option=-synctex=1
    For a .tex file with a space in its filename the file compiles but SyncTeX does not work and gives the following error in the log:
    SyncTeX warning: no synchronization, problem with 100216*notes.synctex.gz(busy)

    When I set --tex-option=-synctex=-1 the PDF compiles normally for filenames without spaces (and SyncTeX works), but for filenames with spaces no pdf is compiled (the compilation is aborted) and I get the following error:
    ("C:\Program Files (x86)\MiKTeX 2.8\tex\latex\base\article.cls"pdflatex.EXE: Invalid argument: 100216notes.synctex(busy)
    pdflatex.EXE: Data: 100216
    notes.synctex(busy)
    texify: pdflatex failed for some reason (see log file).

    csc, why is this bug still open after nearly 1.5 years?

     
  • @everhardt :because the bug has not been fixed, the tracker item (ticket) is still open

     
  • rjsomeone
    rjsomeone
    2010-03-04

    Thanks for your quick reaction csc.

    In the latest SyncTeX version (available on http://itexmac.sourceforge.net/SyncTeX.html), there is a function __synctex_open in syntex_parser.c, with in the comments "It manages the problem of quoted filenames that appear with pdftex an filenames containing the space character." It might be jumping to conclusions (as I didn't look into the MikTeX and SyncTeX sources that well), but wouldn't this be solved by updating SyncTeX in MikTeX?

    Again, it might be too quick, but in the SyncTeX code is stated "We assume that high level application like pdf viewers will want to embed this code as is.". I glanced through the SyncTeX files currently in MikTeX and I did not find alterations made specifically for MikTeX.
    Wouldn't this therefore be solved by replacing synctex_parser.c, synctex_parser.h and synctex_parser_local.h and adding synctex_parser_utils.c and synctex_parser_utils.h in the "Programs\TeXAndFriends\synctex" folder ?

     
  • The bug has been fixed. The fix will be made available with the
    next update cycle. You can watch the MiKTeX project page
    for further information on the next update.