【发布时间】:2015-04-04 10:55:55
【问题描述】:
我有一个简单的 tex 文件。当我用$ pdflatex test.tex 编译它时,它会生成一个pdf。目录有可点击的链接,但它们不起作用!
页码是正确的,但是当我单击一行时,它会将我引导到错误的页面。
有人知道我该如何解决吗?
这是我的代码:
\documentclass[12pt,titlepage]{scrartcl}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{graphicx}
\usepackage[section]{placeins}
\usepackage{float}
\usepackage{amsmath}
\usepackage[autostyle=false,german=quotes]{csquotes} %% for \enquote{}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage[]{hyperref}
\title{test}
\author{me}
\date{\today}
\begin{document}
\pagenumbering{roman}
\begin{titlepage}
\maketitle
\end{titlepage}
\setcounter{section}{-1}
\section[]{Abstract}
blabla bla
\newpage
\tableofcontents
\newpage
\pagenumbering{arabic}
\part{part1}
\setcounter{section}{-1}
\section[]{Abstract}
\section{sec a 1}
bla bla
\subsection{sec a 1.1}
bla blub
\section{sec a 2}
\newpage
\part{part2}
\setcounter{section}{-1}
\section[]{Abstract}
\section{sec b 1} % the toc entry for this section points to page 1 but it is on page 2
blub blub
\section{sec b 2} % the toc entry for this section points to page 1 but it is on page 2
blub blub
\subsection{sec b 2.1} % the subsection in the toc points to the right 2nd page!
\end{document}
在这里您可以看到目录。如您所见,鼠标悬停提示表示链接指向第 1 页,但右侧的数字表示它位于第 2 页。
提前致谢。
【问题讨论】:
标签: latex tex pdflatex tableofcontents