![我可以在 pdflatex 中将 \usepackage{showidx} 与 \showindex \usepackage[pdftex]{hyperref} 一起使用吗?](https://linux22.com/image/404400/%E6%88%91%E5%8F%AF%E4%BB%A5%E5%9C%A8%20pdflatex%20%E4%B8%AD%E5%B0%86%20%5Cusepackage%7Bshowidx%7D%20%E4%B8%8E%20%5Cshowindex%20%5Cusepackage%5Bpdftex%5D%7Bhyperref%7D%20%E4%B8%80%E8%B5%B7%E4%BD%BF%E7%94%A8%E5%90%97%EF%BC%9F.png)
我正在写一份较长的 LaTeX 报告;直到最近还没有 hyperref 包,但是根据我的感受\nameref
,我也使用了 hyperref。
\usepackage{showidx}
不幸的是,在索引完善之前,我还将其用作辅助工具。如果没有\usepackage[pdftex]{hyperref}
定义索引,条目就会显示在正文的边框之外。但是,使用 hyperref 时,索引短语会显示在正文内,这使其非常难以阅读。
示例(无超链接):
相同部分\usepackage[pdftex]{hyperref}
:
有没有办法让 showindex 按照预期显示的方式工作?
例子(以防你需要):
\documentclass[a4paper,twoside]{report}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\usepackage{showidx}
%\usepackage[pdftex,colorlinks]{hyperref}
\makeindex
\begin{document}
\title{Demo}
\author{Me}
\date{11.11.2019}
\maketitle
%
\begin{abstract}
Dies ist ein Test-Text.\index{Text-|Test}
\end{abstract}
%
\end{document}
答案1
在 hyperref 之后加载 showidx(链接可能有误,但对于草稿来说这并不重要)。