文档内的自动超链接?

文档内的自动超链接?

我是 TeX 的新手(并且我仍在努力了解它。)

我想知道是否有一个包可以在我正在编写的文档中自动创建链接 - 例如从目录到特定部分的超链接,或对书目数据的引用?

谢谢!

答案1

hyperref软件包将自动生成目录和引文的超链接。请务必将以下内容添加\usepackage{hyperref}到文档序言中加载任何其他软件包,因为这hyperref会对 LaTeX 的内部结构造成一些严重的改变 - 有一些例外,详见哪些包应该在 hyperref 之后加载而不是之前加载?

示例文档可能如下所示

\documentclass{article}
\usepackage{lipsum}
% add any other packages here.
\usepackage{hyperref}

\title{My Document}
\author{A. U. Thor}

\begin{document}
\maketitle
\tableofcontents

\section{A Section}
This section will automatically be added to the table of contents, as normal. The table of
contents entry for this section will automatically hyperlink to it. Also, a PDF bookmark
will be added.

\section{Another Section}
\lipsum

\end{document}

相关内容