6

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}
0
7

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.

2
3

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.

3
  • 1
    I tried your idea inside a command I was defining: \hyperlink{cite.#2}{\citeyear{#2}} but the link took me to the first page rather than the bibliography entry. I really don't want to use \hypertarget, how can I fix this? – Felipe Apr 27 '20 at 18:19
  • 1
    This worked for me. – b-fg May 6 '20 at 11:06
  • Worked for me too. – marnix 5 hours ago

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.
https://tex.stackexchange.com/questions/285710/hyperref-link-to-bibliography-entry?noredirect=1
tex.stackexchange.com
crawl=CC-MAIN-2021-25
178604
application/http; msgtype=response
sha1:VKVLDCUTM7GHQTSTTYXNOHYI6GCOZV2W
<urn:uuid:7c83b319-9434-4bb8-9abb-5dd70646d30a>
2021-06-20T01:51:50Z
151.101.129.69
text/html
sha1:7TXYNDQW55GQPKEJQTVW2YOOVOIQCAVE
<urn:uuid:b603f173-7612-44ad-af75-f1a1229e69e7>
https://tex.stackexchange.com/questions/285710/hyperref-link-to-bibliography-entry?noredirect=1
response
<urn:uuid:5993bb0e-95c4-41b8-b6cb-e74c753f86b0>
isPartOf: CC-MAIN-2021-25
publisher: Common Crawl
description: Wide crawl of the web for June 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-232.ec2.internal
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/