# Hyperref prepends citation key before bibliography entry

I'm currently writing a research paper with the AAAI style files. Here is what a minimal document that replicates the problem looks like:

\documentclass{article}
\usepackage{aaai18}
\begin{document}

\cite{DBLP:journals/corr/abs-1810-04805}

\begin{thebibliography}{}
\bibitem[\protect\citeauthoryear{Devlin \bgroup et al\mbox.\egroup
}{2018}]{DBLP:journals/corr/abs-1810-04805}
Devlin, J.; Chang, M.; Lee, K.; and Toutanova, K.
\newblock 2018.
\newblock {BERT:} pre-training of deep bidirectional transformers for language
understanding.
\newblock {\em CoRR} abs/1810.04805.
\end{thebibliography}

\end{document}


But here's what it looks like if I add a \usepackage{hyperref}:

The link from the citation to the bibliography entry works fine. But I don't like that the citation key (in this example [Devlin et al. 2018]) is prepended in front of the reference. How can I turn this "feature" off? I'm open to modifying the style file if that's necessary.

• In which order do you load hyperref and aaai? – samcarter_is_at_topanswers.xyz Jan 30 '19 at 17:05
• Are you sure it should not be \nocite{DBLP:journals/corr/abs-1810-04805}? – AndiW Jan 31 '19 at 11:56
• @samcarter See my comment on the answer below. If you load hyperref before aaai18 it will not prepend the citation key, but the link won't work. If you load it after, the link works but you get the bad behavior from the screenshot in the question. @AndiW Why would it be \nocite? This is just a minimal example, normally I would use this in a sentence, e.g. Recently, BERT \cite{...} has achieved great results.. – Lukas Schmelzeisen Jan 31 '19 at 12:49

It works if you load hyperref before the AAAI package:

\documentclass{article}
\usepackage{hyperref}
\usepackage{aaai18}
\begin{document}

\cite{DBLP:journals/corr/abs-1810-04805}

\begin{thebibliography}{}
\bibitem[\protect\citeauthoryear{Devlin \bgroup et al\mbox.\egroup
}{2018}]{DBLP:journals/corr/abs-1810-04805}
Devlin, J.; Chang, M.; Lee, K.; and Toutanova, K.
\newblock 2018.
\newblock {BERT:} pre-training of deep bidirectional transformers for language
understanding.
\newblock {\em CoRR} abs/1810.04805.
\end{thebibliography}

\end{document}

• While this does give the expected output, for some reason the links no longer work. So if you click on the citation it will now take you to the top of the document instead of the bibliography entry whereas previously it did. – Lukas Schmelzeisen Jan 31 '19 at 11:08