5

Is it possible to create a link to a particular bibliography item?

I'm hoping for something like:

This \hyperref[MyKey]{link} takes you to the same place as \cite{MyKey}.

A full (non-working) MWE:

\documentclass{article}
\usepackage[colorlinks,allcolors=red]{hyperref}

\begin{document}
This \hyperref[MyKey]{link} takes you to the same place as \cite{MyKey} does.

\begin{thebibliography}{9}

\bibitem{MyKey} Anne Author, Thoughts, 3001.

\end{thebibliography}
\end{document}
6

A simple solution is to set a \hypertarget in the bibliography item. The syntax is quite simple: Create the target with

\hypertarget{MyTargetKey}{}

and create a link to the target with

\hyperlink{MyTargetKey}{link text}

Everything put together:

\documentclass{article}
\usepackage[colorlinks,allcolors=red]{hyperref}

\begin{document}
This \hyperlink{MyTargetKey}{link} takes you to the same 
place as \cite{MyKey} does.

\begin{thebibliography}{9}

\bibitem{MyKey} \hypertarget{MyTargetKey}{} Anne Author, Thoughts, 3001.

\end{thebibliography}
\end{document}

If you work e.g. with BibLaTeX, this gets even more hackish, but still works. You can set the target in the author field.

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
    @BOOK{MyKey,
        AUTHOR    = {Author, \hypertarget{MyKeyH}{Anne}},
        TITLE     = {Thoughts},
        YEAR      = {3001},
    }
\end{filecontents*}

\documentclass{article}
\usepackage[colorlinks,allcolors=red]{hyperref}
\usepackage[backend=biber]{biblatex}

\addbibresource{\jobname.bib}

\begin{document}
This \hyperlink{MyKeyH}{link} takes you to the same place as \cite{MyKey} does.

\printbibliography

\end{document}

This is not a particularly nice solution, but I am not aware of a direct, elegant way.

0

I have hyperref and I use BibTeX with keys like:

@BOOK{MyKey,
     AUTHOR    = {theName, theFirstName},
     TITLE     = {Thoughts},
     YEAR      = {3001},
}

In my template at least, \hyperlink{cite.MyKey}{link} is enough to make a link work.

I might make a MWE later, but in the meantime maybe this can help someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.