Version: 2.0.84 (using 4.4.00 (KDE 4.4.0) "release 222", KDE:KDE4:Factory:Desktop / openSUSE_11.2) Compiler: gcc OS: Linux (i686) release 2.6.31.12-0.1-default With KDE 4.4 okular does support Forward Search with pdfs when using 'pdflatex -synctex=1' However at the moment it is not possible to configure a tool in kile which allows the forward search with okular. The reason is the following: For forward search with synctex, Okular expects the following call: okular --unique target.pdf#src:<line number>source.tex where target.pdf and source.tex may include relative or absolute paths (eg. "okular --unique subdirectory/target.pdf ..." However, Kile is configured so as to call: okular --unique file:/absolute/path/to/target.pdf#src:<line number> ./relative/path/to/source.tex There are two things wrong with this. First, there is a space after the line number and before the source information. And second, the path to the source file begins with a "./", which Okular does not seem to be able to parse. Additionally, the prefix "file:/" is unnecessary, but Okular doesn't seem to mind. The attached patch changes the relative path to the tex file to the absolute path and removes the space, as this seems to be no longer needed, as the absolute path should not start with a number. In addition it creates several tools PDFLatex/Synctex ForwardPDF QuickBuild/PDFLatex+ForwardPDF and removes PDFLatex/Modern once as this existed twice before in the correspondig file. I have tested that Forward Search works now for pdfs and still works for dvi files. However there are to my knowledge two things to be taken care of which are not implemented so far - The tools which are created are not added automatically, but only for a new user or if one reset the configured tools to the default ones - Forward Search for pdf works only for okular from KDE 4.4 on, there is no check at the moment for this as it is down for dvi for okular for KDE < 4.3 If you think the patch is the correct approach, I can try to look into these issues.
Created attachment 40748 [details] patch which allows forward search for pdf for me
Unfortunately, I'm unable to create a PDF with Synctex information easily. Could you maybe attach one? Also, it seems that Okular needs different input parameters for ForwardDVI/ForwardPDF, which is something that should be addressed in Okular in the long run, I think.
(In reply to comment #2) > Unfortunately, I'm unable to create a PDF with Synctex information easily. > Could you maybe attach one? The synctex information is not in the pdf itself, but in the document.synctex.gz file which is created when running 'pdflatex -synctex=1 document.tex' I will attach a tex-file with the correspondent synctex.gz and pdf file. > > Also, it seems that Okular needs different input parameters for > ForwardDVI/ForwardPDF, which is something that should be addressed in Okular in > the long run, I think. It does not really need different input parameters from what I can tell. Both work with okular test.(dvi|pdf)#src:<line no.>test.tex It also works if you use absolute pathes for your files or relative pathes without './'. Only when you use relative pathes with './' this works with ForwardDVI but not with ForwardPDF. I can also report this as bug/wish for okular if you think it should be fixed in okular.
Created attachment 41028 [details] example document for pdf fowars search
(In reply to comment #4) > Created an attachment (id=41028) [details] > example document for pdf fowars search Thanks for that. I've now committed a slightly modified version of your patch (revision 1095722). I think it would be good to report this as well to the Okular people as these differences between DVI/PDF forward search are probably not intended.
(In reply to comment #5) > > I think it would be good to report this as well to the Okular people as these > differences between DVI/PDF forward search are probably not intended. Just for reference the bug against okular is https://bugs.kde.org/show_bug.cgi?id=228427