Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 2 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.