我在 上创建了一个页面Index
,其中显示了与索引词相对应的页码。现在,我想插入指向这些页面的超链接(以便更轻松地导航到这些页面)。
这是我的 MWE(取自互联网):
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\makeindex
\begin{document}
\section{Introduction}
In this example several keywords\index{keywords} will be used
which are important and deserve to appear in the Index\index{Index}.
Terms like generate\index{generate} and some\index{others} will
also show up.
\printindex
\end{document}
有谁能够帮助我?
答案1
只需使用\usepackage{hyperref}
,或许加上一些选项,它就会自动将超链接添加到索引页面。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\usepackage{hyperref}%
\makeindex
\begin{document}
\section{Introduction}
In this example several keywords\index{keywords} will be used
which are important and deserve to appear in the Index\index{Index}.
Terms like generate\index{generate} and some\index{others} will
also show up.
\printindex
\end{document}