Can I refer to a bibliographic entry with custom text rather a number

bibliographiesbibtexcitinghyperref

I'm working on a LaTeX document on Overleaf, with a bibliography in a .bib file. Throughout the document, I'm using \cite{key} to get a numeric link to the bibliography and do not want to change that behavior.

I want to be able to refer to a bibliographic entry in specific instances in a way that allows me to use a custom text string. For example:

This will be bring me to the right bibliography entry \cite{key}
And I want this to also bring me to the right bibliography entry \hyperref[key]{Custom Text}

So far I've tried \autoref and \hyperref, but, simply put, I don't know how to link to bibliographic items like I could with sections, tables, or figures.

As of right now, my code looks like so:

\documentclass[10pt]{iopart}
\usepackage{hyperref}
\usepackage{cite}
\begin{document}

Text that is cited \cite{SomeKey}

\bibliographystyle{IEEEtran}
\bibliography{litreview.bib}
\end{document}

litreview.bib has a bunch of entries formatted as such:

@article{SomeKey,
  title={Title},
  author={Author},
  journal={Journal},
  year={Year},
  publisher={Publisher}
}

The output looks like:

Text that is cited [1]

I want to, somewhere else in the paper, be able to \href or \hyperref to the same spot that \cite brings me to, but with my own text rather than [1].

Is there a way to link to a specific entry of the bibliography with custom text?

Best Answer

Assuming you load hyperref (and an otherwise standard setup) you can use that hyperref sets link targets to all bibliography entries. These targets can be accessed as cite.<entrykey> with \hyperlink[cite.<entrykey>]{<link text>}.

In order to get the same link colour as normal citations, we have to resort to internal commands and end up with the following.

\documentclass{article}
\usepackage{hyperref}

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

\begin{filecontents}{\jobname.bib}
@book{elk,
  author    = {Anne Elk},
  title     = {A Theory on Brontosauruses},
  year      = {1972},
  publisher = {Monthy \& Co.},
  location  = {London},
}
\end{filecontents}


\begin{document}
Lorem \cite{elk}

\citelinktext{elk}{foo}

\bibliographystyle{IEEEtran}
\bibliography{\jobname}
\end{document}

Arbitrary text with link to bib entry.

Related Question