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

时间:2018-11-18 00:07:51

标签: pdf latex

TeX文件由dvipdfm编译为dvi。我已经使用这种技术大约20年了。一切正常,直到我需要段落级别。目录是正确的,hyperref可以使用,但是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

提前感谢任何想法。

1 个答案:

答案 0 :(得分:0)

段落书签出现某些奇怪行为的原因是,我在concert_id中使用了\paragraph跳过了两个级别:\section\subsection。因此,程序包hyperref将此类级别差距视为一个问题并尝试解决,每步将书签级别提升1(并且仅提升1)。我在test.log中收到了这些警告:

\subsubsection

...

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.

不幸的是,唯一找到的解决方法是使用分段命令witjout跳过级别;就我而言,我需要使用Package hyperref Warning: Difference (2) between bookmark levels is greater (hyperref) than one, level fixed on input line 32. 而不是'\ paragraph`。 hyperref的这种奇怪之处在许多资料中都有描述,例如here