[Okular-devel] [PATCH] Re: how to invoke okular with inverse search with pdf?

Albert Astals Cid aacid at kde.org
Wed Dec 23 23:08:52 CET 2009


A Dimecres 26 Agost 2009 09:14:37, Oliver Heins va escriure:
> Hello Jochen,
> 
> thank you very much for the help.  Forward Search now works with okular,
> within the limitations of the two bugs.

Hi dudes, how did this issue end up, is it solved or still needs some work?

> 
> Jochen Trumpf <Jochen.Trumpf at anu.edu.au> writes:
> > (defun Okular-make-url () (concat
> >   "file://"
> >   (expand-file-name (funcall file (TeX-output-extension) t))
> >   "#src:"
> >   (TeX-current-line)
> >   (TeX-current-file-name-master-relative)))
> 
> There is a little problem with your emacs-setup: If you have tex-files
> in subfolders, the fully qualified url is calculated wrong.  For
> instance, I have the main document ./diss.tex which includes several
> files from ./Chapters/.  When I start forward-search from emacs, I will
> get something like
> 
> okular --unique
>  file:///home/kde-devel/diss/Chapters/diss.pdf#src:231Chapters/Chapter11.te
> x
> 
> This should be
> 
> okular --unique
>  file:///home/kde-devel/diss/diss.pdf#src:231Chapters/Chapter11.tex
> 
> It looks to me, like a default directory for `expand-file-name' should
> be set, probably from `TeX-master-file'.  This seems to do the job:
> 
> (defun Okular-make-url () (concat
>    "file://"
>    (expand-file-name (funcall file (TeX-output-extension) t)
>                      (file-name-directory (TeX-master-file)))
>    "#src:"
>    (TeX-current-line)
>    (TeX-current-file-name-master-relative)))
> 
> Best regards,
>  olli
> 


More information about the Okular-devel mailing list