Created attachment 64270 [details] Example tex file Version: 0.12.5 (using KDE 4.6.5) OS: Linux I use okular to look at dvi files that I create with LaTeX. Unfortunately, the table of contents shown by okular does not contain any hierarchy. All chapter, section, subsection titles appear in one long list. The information must be in the dvi file, however, because if I use dvipdf to create a pdf file, the latter is shown with a proper hierarchical toc. Reproducible: Always Steps to Reproduce: Take any tex file that uses the hyperref package, run latex on it. Actual Results: Toc is shown by okular, but without a hierarchy Expected Results: Toc should be hierarchical
Created attachment 64271 [details] The dvi file I get when running latex on the demo tex file
Git commit 83df127ac057d98e6e4f67e07074675c8830198a by Albert Astals Cid. Committed on 06/10/2011 at 13:09. Pushed by aacid into branch 'KDE/4.7'. Fix creation of the TOC tree for dvi files The old code assumed the number of children would be "-NUMBER " while this file has "-NUMBER/" so what we do now is looping after the - until we find a non digit All this code would better be done using a regexp and not that many section calls but i did not want to touch it more than needed BUGS: 283447 FIXED-IN: 4.7.3 M +9 -2 generators/dvi/dviRenderer_prescan.cpp http://commits.kde.org/okular/83df127ac057d98e6e4f67e07074675c8830198a
Git commit 9d6926f9b8d5b4128ec317d6c4ee6fce5de20626 by Albert Astals Cid. Committed on 06/10/2011 at 13:09. Pushed by aacid into branch 'master'. Fix creation of the TOC tree for dvi files The old code assumed the number of children would be "-NUMBER " while this file has "-NUMBER/" so what we do now is looping after the - until we find a non digit All this code would better be done using a regexp and not that many section calls but i did not want to touch it more than needed BUGS: 283447 FIXED-IN: 4.7.3 (cherry picked from commit 83df127ac057d98e6e4f67e07074675c8830198a) M +9 -2 generators/dvi/dviRenderer_prescan.cpp http://commits.kde.org/okular/9d6926f9b8d5b4128ec317d6c4ee6fce5de20626
Thanks! Btw I can help you test if you want to try the regexp after all.