SyncTeX, file names with spaces and other funny characters
Hi,
there is actually a bug when SyncTeX has to manage spaces in file names.
This bug only appears in pdfTeX, but not in XeTeX.
Here it is:
xetex --synctex=1 "my file"
creates a file named <my file.synctex.gz>, whereas
pdftex --synctex=1 "my file"
creates a file named <"my file".synctex.gz>. Note that the 2 quote
chars are considered by pdftex part of the name.
This difference is due to some "normalize_quotes" function being used
differently in XeTeX and pdfTeX.
As usual, it is really difficult to understand how TeX handles things
internally.
This is why I submit you my simple fix before texlive is updated, you
may have a better approach.
The fix is simply to rely on the output_file_name (instead of the
jobname), remove the terminating path extension and append to one
required by SyncTeX.
It works for the very simple tests I could think of.
Do you agree?
BTW, it is natural to ask whether different but similar problems may
occur.
Assuming the funny file named
The fix is simply to rely on the output_file_name (instead of the jobname), remove the terminating path extension and append to one required by SyncTeX. It works for the very simple tests I could think of. Sounds ok to me, FWIW. After all, the synctex file is an output file. Unbalanced quotes in argument tes"t.tex Are there reasons for such a discrimination? Olaf implemented a quoting mechanism some years ago, mainly to handle filenames with spaces. http://www.tug.org/texinfohtml/web2c.html#g_t_005cinput-filenames There is no way to quote the quotes, although I evidently failed to update the doc when Olaf told me that. karl
participants (2)
-
karl@freefriends.org
-
LAURENS Jérôme