Latex with further dvipdf: incorrect bookmark hierarchy for paragraph level












0















TeX file is compiled to dvi by dvipdfm. I've been using such technique about 20 years. Everything was Ok until I need paragraph level. Table of contents is correct, hyperref s are working, but bookmarks in pdf-file for paragraphs are incorrect: each paragraph bookmark contains the next one as sublevel. The source code (file test.tex) is following:



documentclass[12pt,a4paper,sumlimits,intlimits,namelimits,openany,twoside]{book}

usepackage[T2A]{fontenc}
usepackage[utf8]{inputenc}
usepackage[greek,english]{babel}
usepackage{makeidx,multicol,ifthen,verbatim,layout}

selectlanguage{english}

usepackage[hyperindex,bookmarksnumbered,%colorlinks,
dvipdfmx,bookmarks]{hyperref}
usepackage{amsmath,amsthm,amsfonts,amssymb}

numberwithin{paragraph}{chapter}

begin{document}
setcounter{secnumdepth}4%setcounter{tocdepth}{4}
setcounter{tocdepth}4
tableofcontents
newpage

chapter{The Lebesgue theory}
section{Set functions}
paragraph{Definition (ring)}
paragraph{Definition (additive set function)}
paragraph{Theorem (continuity of additive set function)}

section{Construction of the Lebesgue measure}
paragraph{Definition (ring of elementary sets)}
paragraph{Definition (regular set function)}
end{document}


File test.toc (generated automatically by LaTeX) is following:



babel@toc {english}{}
babel@toc {english}{}
contentsline {chapter}{numberline {1}The Lebesgue theory}{2}{chapter.1}
contentsline {section}{numberline {1.1}Set functions}{2}{section.1.1}
contentsline {paragraph}{numberline {1.1}Definition (ring)}{2}{paragraph.1.1}
contentsline {paragraph}{numberline {1.2}Definition (additive set function)}{2}{paragraph.1.2}
contentsline {paragraph}{numberline {1.3}Theorem (continuity of additive set function)}{2}{paragraph.1.3}
contentsline {section}{numberline {1.2}Construction of the Lebesgue measure}{2}{section.1.2}
contentsline {paragraph}{numberline {1.1}Definition (ring of elementary sets)}{2}{paragraph.1.1}
contentsline {paragraph}{numberline {1.2}Definition (regular set function)}{2}{paragraph.1.2}


File test.out (generated automatically by LaTeX) is following:



BOOKMARK [0][-]{chapter.1}{1 The Lebesgue theory}{}% 1
BOOKMARK [1][-]{section.1.1}{1.1 Set functions}{chapter.1}% 2
BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring)}{section.1.1}% 3
BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (additive set function)}{paragraph.1.1}% 4
BOOKMARK [4][-]{paragraph.1.3}{1.3 Theorem (continuity of additive set function)}{paragraph.1.2}% 5
BOOKMARK [1][-]{section.1.2}{1.2 Construction of the Lebesgue measure}{chapter.1}% 6
BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring of elementary sets)}{section.1.2}% 7
BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (regular set function)}{paragraph.1.1}% 8


Thanks in advance for any idea.










share|improve this question



























    0















    TeX file is compiled to dvi by dvipdfm. I've been using such technique about 20 years. Everything was Ok until I need paragraph level. Table of contents is correct, hyperref s are working, but bookmarks in pdf-file for paragraphs are incorrect: each paragraph bookmark contains the next one as sublevel. The source code (file test.tex) is following:



    documentclass[12pt,a4paper,sumlimits,intlimits,namelimits,openany,twoside]{book}

    usepackage[T2A]{fontenc}
    usepackage[utf8]{inputenc}
    usepackage[greek,english]{babel}
    usepackage{makeidx,multicol,ifthen,verbatim,layout}

    selectlanguage{english}

    usepackage[hyperindex,bookmarksnumbered,%colorlinks,
    dvipdfmx,bookmarks]{hyperref}
    usepackage{amsmath,amsthm,amsfonts,amssymb}

    numberwithin{paragraph}{chapter}

    begin{document}
    setcounter{secnumdepth}4%setcounter{tocdepth}{4}
    setcounter{tocdepth}4
    tableofcontents
    newpage

    chapter{The Lebesgue theory}
    section{Set functions}
    paragraph{Definition (ring)}
    paragraph{Definition (additive set function)}
    paragraph{Theorem (continuity of additive set function)}

    section{Construction of the Lebesgue measure}
    paragraph{Definition (ring of elementary sets)}
    paragraph{Definition (regular set function)}
    end{document}


    File test.toc (generated automatically by LaTeX) is following:



    babel@toc {english}{}
    babel@toc {english}{}
    contentsline {chapter}{numberline {1}The Lebesgue theory}{2}{chapter.1}
    contentsline {section}{numberline {1.1}Set functions}{2}{section.1.1}
    contentsline {paragraph}{numberline {1.1}Definition (ring)}{2}{paragraph.1.1}
    contentsline {paragraph}{numberline {1.2}Definition (additive set function)}{2}{paragraph.1.2}
    contentsline {paragraph}{numberline {1.3}Theorem (continuity of additive set function)}{2}{paragraph.1.3}
    contentsline {section}{numberline {1.2}Construction of the Lebesgue measure}{2}{section.1.2}
    contentsline {paragraph}{numberline {1.1}Definition (ring of elementary sets)}{2}{paragraph.1.1}
    contentsline {paragraph}{numberline {1.2}Definition (regular set function)}{2}{paragraph.1.2}


    File test.out (generated automatically by LaTeX) is following:



    BOOKMARK [0][-]{chapter.1}{1 The Lebesgue theory}{}% 1
    BOOKMARK [1][-]{section.1.1}{1.1 Set functions}{chapter.1}% 2
    BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring)}{section.1.1}% 3
    BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (additive set function)}{paragraph.1.1}% 4
    BOOKMARK [4][-]{paragraph.1.3}{1.3 Theorem (continuity of additive set function)}{paragraph.1.2}% 5
    BOOKMARK [1][-]{section.1.2}{1.2 Construction of the Lebesgue measure}{chapter.1}% 6
    BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring of elementary sets)}{section.1.2}% 7
    BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (regular set function)}{paragraph.1.1}% 8


    Thanks in advance for any idea.










    share|improve this question

























      0












      0








      0








      TeX file is compiled to dvi by dvipdfm. I've been using such technique about 20 years. Everything was Ok until I need paragraph level. Table of contents is correct, hyperref s are working, but bookmarks in pdf-file for paragraphs are incorrect: each paragraph bookmark contains the next one as sublevel. The source code (file test.tex) is following:



      documentclass[12pt,a4paper,sumlimits,intlimits,namelimits,openany,twoside]{book}

      usepackage[T2A]{fontenc}
      usepackage[utf8]{inputenc}
      usepackage[greek,english]{babel}
      usepackage{makeidx,multicol,ifthen,verbatim,layout}

      selectlanguage{english}

      usepackage[hyperindex,bookmarksnumbered,%colorlinks,
      dvipdfmx,bookmarks]{hyperref}
      usepackage{amsmath,amsthm,amsfonts,amssymb}

      numberwithin{paragraph}{chapter}

      begin{document}
      setcounter{secnumdepth}4%setcounter{tocdepth}{4}
      setcounter{tocdepth}4
      tableofcontents
      newpage

      chapter{The Lebesgue theory}
      section{Set functions}
      paragraph{Definition (ring)}
      paragraph{Definition (additive set function)}
      paragraph{Theorem (continuity of additive set function)}

      section{Construction of the Lebesgue measure}
      paragraph{Definition (ring of elementary sets)}
      paragraph{Definition (regular set function)}
      end{document}


      File test.toc (generated automatically by LaTeX) is following:



      babel@toc {english}{}
      babel@toc {english}{}
      contentsline {chapter}{numberline {1}The Lebesgue theory}{2}{chapter.1}
      contentsline {section}{numberline {1.1}Set functions}{2}{section.1.1}
      contentsline {paragraph}{numberline {1.1}Definition (ring)}{2}{paragraph.1.1}
      contentsline {paragraph}{numberline {1.2}Definition (additive set function)}{2}{paragraph.1.2}
      contentsline {paragraph}{numberline {1.3}Theorem (continuity of additive set function)}{2}{paragraph.1.3}
      contentsline {section}{numberline {1.2}Construction of the Lebesgue measure}{2}{section.1.2}
      contentsline {paragraph}{numberline {1.1}Definition (ring of elementary sets)}{2}{paragraph.1.1}
      contentsline {paragraph}{numberline {1.2}Definition (regular set function)}{2}{paragraph.1.2}


      File test.out (generated automatically by LaTeX) is following:



      BOOKMARK [0][-]{chapter.1}{1 The Lebesgue theory}{}% 1
      BOOKMARK [1][-]{section.1.1}{1.1 Set functions}{chapter.1}% 2
      BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring)}{section.1.1}% 3
      BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (additive set function)}{paragraph.1.1}% 4
      BOOKMARK [4][-]{paragraph.1.3}{1.3 Theorem (continuity of additive set function)}{paragraph.1.2}% 5
      BOOKMARK [1][-]{section.1.2}{1.2 Construction of the Lebesgue measure}{chapter.1}% 6
      BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring of elementary sets)}{section.1.2}% 7
      BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (regular set function)}{paragraph.1.1}% 8


      Thanks in advance for any idea.










      share|improve this question














      TeX file is compiled to dvi by dvipdfm. I've been using such technique about 20 years. Everything was Ok until I need paragraph level. Table of contents is correct, hyperref s are working, but bookmarks in pdf-file for paragraphs are incorrect: each paragraph bookmark contains the next one as sublevel. The source code (file test.tex) is following:



      documentclass[12pt,a4paper,sumlimits,intlimits,namelimits,openany,twoside]{book}

      usepackage[T2A]{fontenc}
      usepackage[utf8]{inputenc}
      usepackage[greek,english]{babel}
      usepackage{makeidx,multicol,ifthen,verbatim,layout}

      selectlanguage{english}

      usepackage[hyperindex,bookmarksnumbered,%colorlinks,
      dvipdfmx,bookmarks]{hyperref}
      usepackage{amsmath,amsthm,amsfonts,amssymb}

      numberwithin{paragraph}{chapter}

      begin{document}
      setcounter{secnumdepth}4%setcounter{tocdepth}{4}
      setcounter{tocdepth}4
      tableofcontents
      newpage

      chapter{The Lebesgue theory}
      section{Set functions}
      paragraph{Definition (ring)}
      paragraph{Definition (additive set function)}
      paragraph{Theorem (continuity of additive set function)}

      section{Construction of the Lebesgue measure}
      paragraph{Definition (ring of elementary sets)}
      paragraph{Definition (regular set function)}
      end{document}


      File test.toc (generated automatically by LaTeX) is following:



      babel@toc {english}{}
      babel@toc {english}{}
      contentsline {chapter}{numberline {1}The Lebesgue theory}{2}{chapter.1}
      contentsline {section}{numberline {1.1}Set functions}{2}{section.1.1}
      contentsline {paragraph}{numberline {1.1}Definition (ring)}{2}{paragraph.1.1}
      contentsline {paragraph}{numberline {1.2}Definition (additive set function)}{2}{paragraph.1.2}
      contentsline {paragraph}{numberline {1.3}Theorem (continuity of additive set function)}{2}{paragraph.1.3}
      contentsline {section}{numberline {1.2}Construction of the Lebesgue measure}{2}{section.1.2}
      contentsline {paragraph}{numberline {1.1}Definition (ring of elementary sets)}{2}{paragraph.1.1}
      contentsline {paragraph}{numberline {1.2}Definition (regular set function)}{2}{paragraph.1.2}


      File test.out (generated automatically by LaTeX) is following:



      BOOKMARK [0][-]{chapter.1}{1 The Lebesgue theory}{}% 1
      BOOKMARK [1][-]{section.1.1}{1.1 Set functions}{chapter.1}% 2
      BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring)}{section.1.1}% 3
      BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (additive set function)}{paragraph.1.1}% 4
      BOOKMARK [4][-]{paragraph.1.3}{1.3 Theorem (continuity of additive set function)}{paragraph.1.2}% 5
      BOOKMARK [1][-]{section.1.2}{1.2 Construction of the Lebesgue measure}{chapter.1}% 6
      BOOKMARK [2][-]{paragraph.1.1}{1.1 Definition (ring of elementary sets)}{section.1.2}% 7
      BOOKMARK [3][-]{paragraph.1.2}{1.2 Definition (regular set function)}{paragraph.1.1}% 8


      Thanks in advance for any idea.







      pdf latex






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 18 '18 at 0:07









      SpectorskySpectorsky

      18410




      18410
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The reason of some strange behaviour of paragraph bookmarks is that I used paragraph within section skipping two levels: subsection and subsubsection. So, package hyperref treats such level gap as a problem and try to fix it, lifting bookmark level by 1 (and only by 1) per each step. I've got these warning in test.log:



          Chapter 1.

          Package hyperref Warning: Difference (3) between bookmark levels is greater
          (hyperref) than one, level fixed on input line 26.


          Package hyperref Warning: Difference (2) between bookmark levels is greater
          (hyperref) than one, level fixed on input line 27.


          Package hyperref Warning: Difference (3) between bookmark levels is greater
          (hyperref) than one, level fixed on input line 31.


          ...



          Package hyperref Warning: Difference (2) between bookmark levels is greater
          (hyperref) than one, level fixed on input line 32.


          Unfortunately, the only found remedy is to use sectioning command witjout skipping levels; in my case, I need to use subsection instead of 'paragraph`.
          This oddity of hyperref is described in many sources, see e.g. here.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53356764%2flatex-with-further-dvipdf-incorrect-bookmark-hierarchy-for-paragraph-level%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            The reason of some strange behaviour of paragraph bookmarks is that I used paragraph within section skipping two levels: subsection and subsubsection. So, package hyperref treats such level gap as a problem and try to fix it, lifting bookmark level by 1 (and only by 1) per each step. I've got these warning in test.log:



            Chapter 1.

            Package hyperref Warning: Difference (3) between bookmark levels is greater
            (hyperref) than one, level fixed on input line 26.


            Package hyperref Warning: Difference (2) between bookmark levels is greater
            (hyperref) than one, level fixed on input line 27.


            Package hyperref Warning: Difference (3) between bookmark levels is greater
            (hyperref) than one, level fixed on input line 31.


            ...



            Package hyperref Warning: Difference (2) between bookmark levels is greater
            (hyperref) than one, level fixed on input line 32.


            Unfortunately, the only found remedy is to use sectioning command witjout skipping levels; in my case, I need to use subsection instead of 'paragraph`.
            This oddity of hyperref is described in many sources, see e.g. here.






            share|improve this answer




























              0














              The reason of some strange behaviour of paragraph bookmarks is that I used paragraph within section skipping two levels: subsection and subsubsection. So, package hyperref treats such level gap as a problem and try to fix it, lifting bookmark level by 1 (and only by 1) per each step. I've got these warning in test.log:



              Chapter 1.

              Package hyperref Warning: Difference (3) between bookmark levels is greater
              (hyperref) than one, level fixed on input line 26.


              Package hyperref Warning: Difference (2) between bookmark levels is greater
              (hyperref) than one, level fixed on input line 27.


              Package hyperref Warning: Difference (3) between bookmark levels is greater
              (hyperref) than one, level fixed on input line 31.


              ...



              Package hyperref Warning: Difference (2) between bookmark levels is greater
              (hyperref) than one, level fixed on input line 32.


              Unfortunately, the only found remedy is to use sectioning command witjout skipping levels; in my case, I need to use subsection instead of 'paragraph`.
              This oddity of hyperref is described in many sources, see e.g. here.






              share|improve this answer


























                0












                0








                0







                The reason of some strange behaviour of paragraph bookmarks is that I used paragraph within section skipping two levels: subsection and subsubsection. So, package hyperref treats such level gap as a problem and try to fix it, lifting bookmark level by 1 (and only by 1) per each step. I've got these warning in test.log:



                Chapter 1.

                Package hyperref Warning: Difference (3) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 26.


                Package hyperref Warning: Difference (2) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 27.


                Package hyperref Warning: Difference (3) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 31.


                ...



                Package hyperref Warning: Difference (2) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 32.


                Unfortunately, the only found remedy is to use sectioning command witjout skipping levels; in my case, I need to use subsection instead of 'paragraph`.
                This oddity of hyperref is described in many sources, see e.g. here.






                share|improve this answer













                The reason of some strange behaviour of paragraph bookmarks is that I used paragraph within section skipping two levels: subsection and subsubsection. So, package hyperref treats such level gap as a problem and try to fix it, lifting bookmark level by 1 (and only by 1) per each step. I've got these warning in test.log:



                Chapter 1.

                Package hyperref Warning: Difference (3) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 26.


                Package hyperref Warning: Difference (2) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 27.


                Package hyperref Warning: Difference (3) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 31.


                ...



                Package hyperref Warning: Difference (2) between bookmark levels is greater
                (hyperref) than one, level fixed on input line 32.


                Unfortunately, the only found remedy is to use sectioning command witjout skipping levels; in my case, I need to use subsection instead of 'paragraph`.
                This oddity of hyperref is described in many sources, see e.g. here.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 18 '18 at 13:23









                SpectorskySpectorsky

                18410




                18410






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53356764%2flatex-with-further-dvipdf-incorrect-bookmark-hierarchy-for-paragraph-level%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud

                    Zucchini