我想将参考书目中页面的后向引用刷新到右侧。我有一个针对该citeref
包的解决方案,请参阅 MWE。但是,在使用时我该如何实现这一点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}
答案1
我认为该backref
包没有提供任何钩子,所以你必须修补它,但我认为这可以满足你的要求:
\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}