# Flushing right the pagebackrefs in the bibliography with hyperref

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

-

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}

-