2

I'd like to flush the back references to pages in my bibliography to the right. I have a solution for the citeref package, see the MWE. But how can I achieve this when using hyperref?

\documentclass{article}

%% This works fine:
\usepackage{citeref}
\makeatletter
\@ifpackageloaded{citeref}{
\def\bibitempages#1{\newblock \hglue\fill\mbox{[#1]}}}
\makeatother

%% But how to flush the pagerefs right with hyperref?
% \usepackage[pagebackref]{hyperref}


\begin{document}

Citing~\cite{Test2013}.

\bibliographystyle{alpha}
\begin{thebibliography}{TT13}

  \bibitem[TT13]{Test2013}
  Test, Arthur, and Test, Betsy.
  \newblock \emph{Some obscure ramblings}.
  \newblock Nature
  \textbf{1}: 1--13, 2013

\end{thebibliography}

\end{document}
2

I don't think the backref package provides any hooks, so you have to patch it, but I think this does what you want:

\documentclass{article}
\usepackage[pagebackref]{hyperref}

\makeatletter
\let\oldBR@backref=\BR@backref
\renewcommand{\BR@backref}{\hfill\oldBR@backref}
\makeatother

\begin{document}

Citing~\cite{Test2013}.

\bibliographystyle{alpha}
\begin{thebibliography}{TT13}

  \bibitem[TT13]{Test2013}
  Test, Arthur, and Test, Betsy.
  \newblock \emph{Some obscure ramblings}.
  \newblock Nature
  \textbf{1}: 1--13, 2013

\end{thebibliography}

\end{document}

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.