我使用了以下代码,可以链接参考文献、符号列表,但无法链接论文中的目录。我希望获得论文的完整链接 PDF。请帮助我……
\usepackage[%
%\ifpdf
pdftex,
%\else
% dvipdf,
%\fi
% ps2pdf, % using ps2pdf vs pdftex
% colorlinks=true, % color the words instead of use a colored box
% urlcolor=blue, % \href{...}{...} external (URL)
% filecolor=blue, % \href{...} local file
% linkcolor=black, % \ref{...} and \pageref{...}
% citecolor=black, % \cite{}
pdfborder={0 0 0}, % for removing borders around links
letterpaper=true,
plainpages=false,
% plainpages boolean true
% Forces page anchors to be named by the arabic form of the page number,
% rather than the formatted form.
breaklinks=true,
% breaklinks boolean false
% Allows link text to break across lines; since this cannot be accommodated in
% PDF, it is only set true by default if the pdftex driver is used. This makes
% links on multiple lines into different PDF links to the same target.
pagebackref=true,
% Adds ?backlink? text to the end of each item in the bibliography, as a list
% of section numbers. This can only work properly if there is a blank line
% after each \bibitem.
bookmarksnumbered=true,
% bookmarksnumbered boolean false
% If Acrobat bookmarks are requested, include section numbers.
bookmarksopen=true,
% bookmarksopen boolean false
% If Acrobat bookmarks are requested, show them with all the subtrees expanded.
pdftitle={PhD Thesis},
pdfauthor={Jonathan M. McCune},
pdfsubject={Carnegie Mellon University},
pdfkeywords={},
pdfpagelabels=true,
pdfpagemode=UseOutlines % None, UseThumbs, UseOutlines, FullScreen
]{hyperref}
答案1
您可能是指目录不在书签(大纲)中。目录是否应该有自己的条目尚有争议。但对于书签,我认为没问题,因为它们只是导航帮助。我利用这个机会评论了一些选项设置。可以使用示例所示hyperref
设置其他书签,请参阅文档。为避免链接到错误的页面,\pdfbookmark 位于同一页面上非常重要。确保前面有分页符会使操作更容易。\pdfbookmark
hyperref
\documentclass{article}
\usepackage[
% Some remarks:
% * drivers like 'pdftex' that can be detected automatically
% are not necessary
% * breaklinks is rather an internal option.
% If a driver does not support it, then forcing the option
% let the text break across lines, but also the link
% areas are "broken". If the driver supports the option,
% then the option is enabled anyway.
% * Information entries should be set outside,
% because LaTeX expands the package options,
% hyperref does not like them, if they are
% prematurely expanded.
% * Hyperref has a new option for hiding links: hidelinks
hidelinks,
letterpaper,
pagebackref,
bookmarksopen,
bookmarksnumbered,
]{hyperref}
\hypersetup{
pdfauthor={...},
% ...
}
% Adding package bookmark improves bookmarks handling.
% More features and faster updated bookmarks.
\usepackage{bookmark}
\begin{document}
Title
\newpage% or \cleardoublepage
% \pdfbookmark[<level>]{<title>}{<dest>}
\pdfbookmark[section]{\contentsname}{toc}
\tableofcontents
\section{Introduction}
\section{Main}
\end{document}
答案2
我也遇到过同样的问题。我的修复有点混乱,但对我来说还是有用的。希望这对你有帮助
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Table of contents}
\tableofcontents
\cleardoublepage
(请注意,为了打印目的,我\cleardoublepage
确保每个新部分都从奇数页开始)