乳胶目录链接到错误的部分 [英] Latex Table of Contents Links to Wrong Section

查看:89
本文介绍了乳胶目录链接到错误的部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个部分,后面是目录,如下所示:

I have a section followed by a table of contents like so:

\section{Section1}
ABC.

\addcontentsline{toc}{section}{Table of Contents}
\tableofcontents
\newpage
\addcontentsline{toc}{section}{List of Figures}
\listoffigures
\newpage

\section{Section2}
DEF.
\section{Section3}
GHI.

我的问题是,目录中的目录"和图形列表"条目(在生成的pdf中)链接到文件中的错误位置.它们都链接到页面1的第一部分.表中的输入正确(TOC表示第2页,LOF表示第3页),但是链接到错误的位置.

My issue is that the "Table of Contents" and "List of Figures" entries in the table of contents link (in the generated pdf) to the wrong place in the file. They both link to the first section section on page 1. The entry in the table is correct (TOC says page 2 and LOF says page 3), but the link goes to the wrong place.

推荐答案

您将需要使用\phantomsection命令:

\section{Section1}
ABC.
\phantomsection
\addcontentsline{toc}{section}{Table of Contents}
\tableofcontents
\newpage
\phantomsection
\addcontentsline{toc}{section}{List of Figures}
\listoffigures
\newpage

\section{Section2}
DEF.
\section{Section3}
GHI.

请参见 hyperref手册.

这篇关于乳胶目录链接到错误的部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆