Given a text with an indexed word, say minimum, is it possible to have a command, call it \DEX{}, that would print a later occurrence of that word and link it to the original occurrence? For an on-screen pdf, this would allow the reader to bypass the index by just clicking on the word s/he wants to check while \Cpageref{minimum}(\Cpageref{index:minimum}?) would allow the reader similarly to bypass the index on a printed copy.
Could this work with a word defined in a tcolorbox? In my case, though, this would be icing on the cake because, the magnum opus being written for raw beginners, most words are not formally defined, only a very few are. Besides, I already use cleveref for that. So, just asking.
Here is a MWE (Not quite minimum because I need the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx and I included a tcolorbox just in case someone wants to try it.)
\documentclass[11pt]{book}
\usepackage{makeidx}
\makeindex
\usepackage{tcolorbox}
%==================Begin HYPERREF
\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}
%Begin the Sharpe code as modified by Schulz (2016-02-1)
\let\oldopenparen\(
\let\oldcloseparen\)
\def\({\protect\oldopenparen}
\def\){\protect\oldcloseparen}
\newcommand{\INDEX}[1]{\index{#1}}
%End the Sharpe code as modified by Schulz (2016-02-1)
\newcounter{abc}%
\newtcolorbox%
[%beginForReferences
use counter= abc,
number within=chapter,
number freestyle={\noexpand\thechapter.\noexpand\arabic{\tcbcounter}~\noexpand\mytitleagree},%Used to make for LONG titles in the references.
crefname={definition}{definitions},
Crefname={Definition}{Definitions},
]%endForReferences
{greement}
[2][]%
{%
detach title,
coltitle=black,
nameref={#2},%
before upper={\tcbtitle\quad},
code={\gdef\mytitleagree{#2}},%Used to make for LONG titles in the references.
title=DEFINITION \thetcbcounter,%
#1,%Required for references.
}%
\begin{document}
A \textbf{minimum}\INDEX{minimum} of a function is blah blah.
\begin{greement}[label={abc:3-1}]{Maximum}
An input whose output is larger than the outputs of nearby inputs
\end{greement}
\newpage
A function can have more than one $\backslash$DEX\{minimum\} ($\backslash$Cpageref\{minimum\}.)
(The command $\backslash$DEX would print the word minimum and link it to the above occurrence. Hopefully, $\backslash$Cpageref would still work too.)
\printindex
\end{document}
and here is the pdf (without \newpage and without the index page). Note the swhowidx on the upper right:


minimumin the index and then 2. clicking on the page number1, why not just click on the later occurrence ofminimum? – schremmer Oct 02 '17 at 13:57