The problem is that acl2012.sty
redefines the internal command \@lbibitem
in a way that hyperref
is not aware of one. As a result, when hyperref
is used, what gets printed is the key of the citation.
One work around is as follows. The hyperref
redefinition uses a command \@BIBLABEL
which is by standard set to the default \@biblabel
via a \providecommand*
. This is convenient, since \providecommand*
will only make the definition provide the command is not already defined. Thus what we can do is define \@BIBLABEL
before hyperref
is loaded, to produce an empty text. This is achieved by:
\makeatletter
\newcommand{\@BIBLABEL}{\@emptybiblabel}
\newcommand{\@emptybiblabel}[1]{}
\makeatother
\usepackage{hyperref}
i.e. we set \@BIBLABEL
to a command \@emptybiblabel
, which in turn just ignores its argument. This code is enclosed between \makeatletter / \makeatother
because of the symbol @
in the command names.
Putting this together in a cut-down version of the acl2012.tex
sample document gives:
\documentclass[11pt]{article}
\usepackage{acl2012}
\usepackage{times}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{url}
\makeatletter
\newcommand{\@BIBLABEL}{\@emptybiblabel}
\newcommand{\@emptybiblabel}[1]{}
\makeatother
\usepackage{hyperref}
\begin{document}
{\bf Citations}: Citations within the text appear
in parentheses as~\cite{Gusfield:97} or, if the author's name appears in
the text itself, as Gusfield~\shortcite{Gusfield:97}. Append lowercase letters to the year in cases of ambiguities. Treat double authors as in~\cite{Aho:72}, but write as in~\cite{Chandra:81} when more than two authors are involved. Collapse multiple citations as in~\cite{Gusfield:97,Aho:72}.
\begin{thebibliography}{}
\bibitem[\protect\citename{Aho and Ullman}1972]{Aho:72}
Alfred~V. Aho and Jeffrey~D. Ullman.
\newblock 1972.
\newblock {\em The Theory of Parsing, Translation and Compiling}, volume~1.
\newblock Prentice-{Hall}, Englewood Cliffs, NJ.
\bibitem[\protect\citename{Chandra \bgroup et al.\egroup }1981]{Chandra:81}
Ashok~K. Chandra, Dexter~C. Kozen, and Larry~J. Stockmeyer.
\newblock 1981.
\newblock Alternation.
\newblock {\em Journal of the Association for Computing Machinery},
28(1):114--133.
\bibitem[\protect\citename{Gusfield}1997]{Gusfield:97}
Dan Gusfield.
\newblock 1997.
\newblock {\em Algorithms on Strings, Trees and Sequences}.
\newblock Cambridge University Press, Cambridge, UK.
\end{thebibliography}
\end{document}
In the pdf
the links from the citations still lead to the corresponding citations.
Here it is. Note that biblatex
allows to emulate natbib
commands. In particular, in this mode you can always write \citep
but actually it is translated into biblatex's command \parencite
.
More importantly, the syntax is slighly different: `\bibliography{name_of_the_bibfile} in the body of the document is replaced with:
\addbibresource{name_of_the_bibfile.bib}
in the preamble
\printbibliography
in the body of the document
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\begin{filecontents}{\jobname.bib}
@article{billioandrew,
author = {Billio, M. and Getmansky, M. and Lo, A. and Pelizzon, L.},
title = {Econometric measures of connectedness and systemic risk in the finance and insurance sectors},
year = {2012},
journal = {Journal of Financial Economics},
volume = {104},
number = {3},
pages = {535--559}}
\end{filecontents}
\usepackage[backend=biber, style=apa, natbib]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{\jobname.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewbibmacro*{author}{%original
\ifnameundef{author}
{\usebibmacro{labeltitle}}
{\printnames[apaauthor][-\value{listtotal}]{author}%
\setunit*{\addspace}%
\printfield{nameaddon}%
\ifnameundef{with}
{}
{\setunit{}\addspace\mkbibparens{\printtext{\bibstring{with}\addspace}%
\printnames[apaauthor][-\value{listtotal}]{with}}
\setunit*{\addspace}}}%
\setunit{\addcomma\space}\newblock%
\usebibmacro{labelyear+extrayear}}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}
\setunit{\addspace}}%
\printfield{volume}%
\printfield{number}%
\setunit{\addspace}\newblock
\usebibmacro{issuename}%
\newunit}
\DeclareFieldFormat{yearorunkyear}{%
\ifthenelse{\iffieldequalstr{doubtfuldate}{true}}
{\mkbibbrackets{ca\adddot\addspace#1}}
{#1}}
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat[article]{volume}{\apanum{#1}}
\AtBeginBibliography{
\renewcommand*{\finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\ifthenelse{\value{liststop}>2}
{\finalandcomma\addspace}
{\addspace\&\space}}}}
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\renewcommand{\finalnamedelim}{\ \finalandcomma\addspace}%
\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{}
{\usebibmacro{postnote}%
\usebibmacro{cite:post}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
As we see in \parencite{billioandrew},…
\printbibliography
\end{document}
Best Answer
The command responsible for typesetting the back references is
\backrefxxx
, sowill do. This will make all of "backref page #" a link. If you want only the page number to be a link, do
Other variations are possible.