GNOME Bugzilla – Bug 632317
SyncSource sends the filename of the input relative to the pdf.
Last modified: 2010-11-21 15:07:14 UTC
Currently, SyncSource sends the filename of the input relative to the pdf. It would be better if SyncSource sends the uri of the input. This also makes the DBUS API more consistent since SyncView needs the URI.
Created attachment 172514 [details] [review] [shell] Send the URI of the input file instead of the filename in SyncSource.
Review of attachment 172514 [details] [review]: Arg... I just realized that behaviour of the synctex-parser depends on the version of pdflatex used to compile the file, so in some systems the filename is the complete path and in others just the relative pathm, which makes this patch obsolete. I will try to find a better solution.
That sounds bad. I see only ugly solutions to this problem. I hope it is possible to find out what convention is used by looking at the synctex.gz file
Created attachment 174115 [details] [review] [shell] Send the URI of the input file instead of the filename in SyncSource.
Actually, in the same machine pdflatex can either compile using relative pathnames or absolute pathnames (for some reason when compiling with rubber absolute pathnames are used and when compiling with plain pdflatex, relative ones are used) So the solution is just ask whether the filename of the link is absolute or not. @Carlos, I could not find a better solution to get the relative uri of the input file wrt the uri of the pdf. Other option would be to change the current_dir and use g_file_build_from_path but seems wrong.
As discussed in IRC, I tried to factor the File logic of launch_external_uri and this patch, but it does not work since g_build_filename does not work with relative paths containing '..'. so, I'd say the patch is good to go.
Comment on attachment 174115 [details] [review] [shell] Send the URI of the input file instead of the filename in SyncSource. please, push it. Thanks!.
I just pushed to git master.