页边距中的 showindex 条目是否可以设置为可点击?

页边距中的 showindex 条目是否可以设置为可点击?
  1. 我需要帮助读者找到新术语的位置。定义并不正式,并且术语第一次使用(希望得到解释)时会以粗体显示。
  2. 我当然使用“makeindex和”和hyperref“,showindex因为我的读者很容易灰心,甚至很难在某一页找到粗体字。
  3. 的原因问题是我的问题如何将索引条目显示与被索引的文本在同一行上?似乎没有答案,所以我认为这可能是实现同一件事的另一种方法。

这个想法是,就像单击索引条目会转到索引项所在的页面一样,单击 showindex 条目会突出显示 pdf 中的粗体字,就像单击源中的字会突出显示 pdf 中该字所在的行一样。因此,似乎机制已经存在,因此这应该是可行的。

这是我在之前的问题中使用的 MWE。

% !TEX TS-program = pdflatexmk  
\documentclass{book}

    \usepackage{makeidx}
    \usepackage[hyperfootnotes=false]{hyperref}%[pdfborder={0 0 0}]

%Begin the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx 
\makeatletter
\ifHy@hyperindex
  \def\HyInd@ParenLeft{(}%
% Hook in \HyInd@@wrindex
  \let\HyInd@showidx\@empty
% Hook in \HyInd@@wrindex for package showidx
  \def\HyInd@showidx#1{%
    \@showidx{#1}%
    \if@nobreak
      \ifvmode
        \nobrak
      \fi
    \fi
  }%
% Load package showidx
  \let\siOrg@makeindex\makeindex
  \let\siOrg@@index\@index
  \let\siOrg@@wrindex\@wrindex
  \let\siOrg@index\index
  \RequirePackage{showidx}
  \let\makeindex\siOrg@makeindex
  \let\@index\siOrg@@index
  \let\@wrindex\siOrg@@wrindex
  \let\index\siOrg@index
    % rest of hyperref part
  \@ifpackageloaded{multind}{%
    \let\HyInd@org@wrindex\@wrindex
    \def\@wrindex#1#2{\HyInd@@wrindex{#1}#2||\\}%
    \def\HyInd@@wrindex#1#2|#3|#4\\{%
      \ifx\\#3\\%
        \HyInd@org@wrindex{#1}{#2|hyperpage}%
      \else
        \def\Hy@temp@A{#3}%
        \ifx\Hy@temp@A\HyInd@ParenLeft
          HyInd@org@wrindex{#1}{#2|#3hyperpage}%
        \else
          \HyInd@org@wrindex{#1}{#2|#3}%
        \fi
      \fi
    }%
  }{%
    \def\@wrindex#1{\@@wrindex#1||\\}
    \def\@@wrindex#1|#2|#3\\{%
      \ifx\\#2\\%
        \protected@write\@indexfile{}{%
          \string\indexentry{#1|hyperpage}{\thepage}%
        }%
      \else
        \def\Hy@temp@A{#2}%
        \ifx\Hy@temp@A\HyInd@ParenLeft
          \protected@write\@indexfile{}{%
             \string\indexentry{#1|#2hyperpage}{\thepage}%
          }%
        \else
          \protected@write\@indexfile{}{%
            \string\indexentry{#1|#2}{\thepage}%
          }%
        \fi
      \fi
      \endgroup
      \HyInd@showidx{#1}%
      \@esphack
    }%
  }%
\fi
\makeatother
%End the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx 

    \usepackage{cleveref}

        \newcounter{proc}
    \usepackage{tcolorbox}

%Begin the Sharpe (2013-01-18) code as modified by Schulz (2016-02-1) to have math in Showindex     
\let\oldopenparen\(
\let\oldcloseparen\)
\def\({\protect\oldopenparen}
\def\){\protect\oldcloseparen}
\newcommand{\INDEX}[1]{\index{#1}}
%End the Sharpe (2013-01-18) code as modified by Schulz (2016-02-1) to have math in Showindex               

\makeindex
\begin{document}    

Some text necessary to drown the words to be indexed. Some text necessary to drown the words to be indexed. \textbf{Oberdieck}\INDEX{Oberdieck}
Some text necessary to drown the words to be indexed. Some text necessary to drown the words to be indexed. 

\newpage

Some text necessary to drown the words to be indexed. Some text necessary to drown the words to be indexed.
\textbf{$\cup$}\INDEX{$\cup$}
Some text necessary to drown the words to be indexed. Some text necessary to drown the words to be indexed. 

\printindex
\end{document}

相关内容