带有进一步dvipdf的Latex:段落级别的书签层次结构不正确



TeX文件由dvipdfm编译为dvi。我已经使用这种技术大约20年了。一切都还好,直到我需要段落级别。目录是正确的,hyperref s正在工作,但pdf文件中段落的书签是不正确的:每个段落书签都包含下一个作为子级别的书签。源代码(文件test.tex(如下:

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}

文件test.toc(由LaTeX自动生成(如下:

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}

文件test.out(由LaTeX自动生成(如下:

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

提前谢谢你的任何想法。

段落书签出现某些奇怪行为的原因是我在section中使用了paragraph,跳过了两个级别:subsectionsubsubsection。因此,package hyperref将这种级别差距视为一个问题,并尝试解决它,每一步将书签级别提升1(且仅提升1(。我在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.

不幸的是,唯一找到的补救方法是使用分段命令跳过级别;在我的情况下,我需要使用subsection而不是'\paration'。hyperref的这种奇怪之处在许多资料中都有描述,例如,请参阅此处。

最新更新