返回超链接参考书目中的整个单词

返回超链接参考书目中的整个单词

灵感来自这个答案, 我们有

\documentclass[12pt,a4paper]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
%------------------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage[colorlinks=true,pagebackref=true]{hyperref}
\hypersetup{urlcolor=blue, citecolor=red, linkcolor=blue}
\newtheorem{corollary}{Corollary}[section]

\usepackage[capitalise,noabbrev,nameinlink]{cleveref}

\begin{document}

 \begin{corollary}\label{cor}(\cite[Corollary 3]{4})
    A unilateral weighted shift $T$ on ....
 \end{corollary}

By \cref{cor}, there exists a polynomial......

\begin{thebibliography}{10}

  \bibitem{4}{W. Arendt, J.R. Goldstein, and J.A. Goldstein:} {Outgrowths
  of Hardy's inequality,} Contemp. Math. 412 (2006), pp. 51-68.

   \end{thebibliography}

   \end{document}
    \end{document} 

在此处输入图片描述

我希望当我点击 Corollary 3 这个词时,我会回到参考书目。但是用我的代码,我只能点击红色的数字 1。就像这张图片

在此处输入图片描述

答案1

如同这个答案hyperref,但我们可以利用已经为所有引用条目设置锚点的事实。

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage[colorlinks=true,pagebackref=true]{hyperref}
\hypersetup{urlcolor=blue, citecolor=red, linkcolor=blue}
\newtheorem{corollary}{Corollary}[section]

\usepackage[capitalise,noabbrev,nameinlink]{cleveref}

\makeatletter
\newcommand*{\hyperlinkcite}[2]{%
  \hyper@@link[cite]{}{cite.#1}{#2}}
\makeatother

\begin{document}
\begin{corollary}\label{cor}(\cite[\hyperlinkcite{arendt}{Corollary 3}]{arendt})
  A unilateral weighted shift $T$ on ....
\end{corollary}

By \cref{cor}, there exists a polynomial......

\begin{thebibliography}{10}

  \bibitem{arendt}{W. Arendt, J.R. Goldstein, and J.A. Goldstein:} {Outgrowths
  of Hardy's inequality,} Contemp. Math. 412 (2006), pp. 51-68.

\end{thebibliography}

\end{document}

标签编号和后注“推论 3”均在“[1,推论 3]”中链接并用红色标出

如果想要正确地做到这一点,可能必须重新定义\cite以链接后注论点,但这可能会非常棘手。

相关内容