Version: 1.3 (using KDE KDE 3.4.2) Installed from: Debian stable Packages OS: Linux Kdvi doesn't handle weblinks which contain parentheses correctly. Everything after '(' (including the opening parenthesis) is simply dropped. This seems not to be a problem of the LaTeX package hyperref because with -> ps -> pdf you get a file which works fine with acrobat. Here is a minimal example: \documentclass{article} \usepackage{hyperref} \begin{document} A link that contains ``(...)'', \vskip3mm \hskip5mm\href{http://dx.doi.org/10.1016/0040-6090(83)90097-4}{http://dx.doi.org/10.1016/0040-6090(83)90097-4} \vskip3mm works with Acrobat, but \textbf{not with kdvi}. \vskip2cm Without ``(...)'', a link, e.g., \vskip3mm \hskip5mm\href{http://dx.doi.org/10.1063/1.1479746}{http://dx.doi.org/10.1063/1.1479746} \vskip3mm works with both Acrobat and kdvi. \end{document}
Created attachment 16372 [details] LaTeX file
Created attachment 16373 [details] DVI file
Created attachment 16374 [details] PDF file
I have now encountered the same problem with xdvik (http://sourceforge.net/projects/xdvi). Obviously, the parser stops just before the second parenthesis, yielding "http://dx.doi.org/10.1016/0040-6090(83". Die PostScript interpreter doesn't so. As the parentheses in SDict begin [ /H /I /Border [16 16 2] /Color [0 1 1] /Action << /Subtype /URI /URI (http://dx.doi.org/10.1016/0039-6028(86)90835-6) >> /Subtype /Link H.B /ANN pdfmark end are balanced, the whole URL is extracted. I think that the behavior of kdvi and xdvik should be changed in order to fully match the syntax of PostScript.
I have written a general PostScript parser for literal text strings. Recently, the corresponding function has been integrated successfully into xdvik, cf. "https://sourceforge.net/tracker/index.php?func=detail&aid=1530667&group_id=23164&atid=377580". When using scan_ps_literal_text_string() for kdvi, one should easily get rid of the reported bug. Please consider the attached source code.
Created attachment 17196 [details] C function
Comment on attachment 17196 [details] C function a function for parsing URLs in DVI files according to PostScript specification
Dear Mr. Habl, thank you very much for the help ---and please apologize the long silence. With your help I have fixed the issue now. The bugfix will be contained in the upcoming KDE 3.5.5 release. Again, thank you very much, and keep sending in problems even though I might be slow to answer. If you'd like to help with the future development, let me know. Best, Stefan.
Dear Stefan, thank you very much for considering the bug report. Looking at special.cpp, I found a point which might be still enhanced. Up to now, it seems that the algorithm also counts escaped parentheses, i.e. \( and \). So it will fail when the link contains unbalanced escaped parentheses. Matthias.
Created attachment 17678 [details] LaTeX A new version with unbalanced escaped parentheses.
Created attachment 17679 [details] DVI A new version with unbalanced escaped parentheses.
Created attachment 17680 [details] PDF A new version with unbalanced escaped parentheses.
Dear Matthias, thanks for the additional comments. I have updated the code now; the unbalanced escaped parentheses from your example no longer cause problems. Thank you for going into this! Best, Stefan.
kdvi is no longer maintained since KDE SC 4, and its functionality is replace by okular. If the issue in this report still exists in or apply to okular in KDE SC 4.10.5 or higher, please reassign the report to okular product or create a new report against okular.