Pavel Sanda wrote:
> http://techbase.kde.org/Schedules/KDE4/4.4_Release_Goals
> 
> * Okular: Support both inverse search and forward search for dvi and pdf

Kile 2.0.83 issues okular --unique '%target' for forward DVI search.

%target is a kile flag for the relative file name (see below).

In kile trunk, forward PDF search has been introduced by a call to
okular --unique '%absolute_target'
whereas %absolute_target holds the absolute file name:

+ QString filepath = doc->url().toLocalFile();
+ QString texfile = KUrl::relativePath(baseDir(),filepath);
+ QString relativeTarget = "file:" + targetDir() + '/' + target()
+ "#src:" + QString::number(para+1) + ' ' + texfile; // space added, for files
starting with numbers
+ QString absoluteTarget = "file:" + targetDir() + '/' + target()
+ "#src:" + QString::number(para+1) + filepath;
[...]
+ addDict("%target", relativeTarget);
+ addDict("%absolute_target", absoluteTarget);

See this commit:
http://osdir.com/ml/kde-commits/2010-02/msg10751.html

IOW, it seems we need to issue

okular --unique 'file:path/to/dvifile.dvi#src:<linenumber> texfile.tex'

and

okular --unique 'file:path/to/pdffile.pdf#src:<linenumber> 
path/to/texfile.tex'

if I read the sources correctly.

Jürgen

Reply via email to