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 have long despaired of resolving the following glitch: if I am using hyperref with amsrefs, then all \cite links to the bibliography point to the line right below where they are supposed to. Here is an example document with the bad behavior and some other links that don't have this problem. In particular, note the target on the second page, which is exactly the code used in amsrefs.sty (lines 595--597) to (apparently) produce its targets.

\documentclass{article}
\usepackage{hyperref}
\usepackage{amsrefs}
\begin{document}
 \section{First}
 \ref{s:second}, \hyperlink{text}{link}, \cite{testbib}
 \newpage

 \section{Second}
 \label{s:second}
 \csname hyper@anchorstart\endcsname{text}Text\csname hyper@anchorend \endcsname

 \section{References}
 \begin{biblist}
  \bib{testbib}{article}{author={Ryan Reich},title={Title}}
 \end{biblist}
 \newpage
\end{document} 

What is the cause of this problem? It really bugs me. I have asked this on comp.text.tex but received no useful reply. Hopefully, it is appropriate for this site.

share|improve this question
2  
It is definitely appropriate here ;-) No idea what the problem might be, though, sorry. –  David Z Aug 20 '10 at 6:50
add comment

1 Answer

up vote 11 down vote accepted

Here you go Ryan. This should fix it for you...

\usepackage{amsrefs}
\usepackage{hyperref}

\makeatletter
\renewcommand{\BibLabel}{%
  \Hy@raisedlink{\hyper@anchorstart{cite.\CurrentBib}\relax\hyper@anchorend}%
  [\thebib]%
}
\makeatother

\begin{document}...
share|improve this answer
3  
Awesome. Guess I should send another bug report to the AMS. –  Ryan Reich Aug 20 '10 at 14:37
1  
Please do report the bug: this way it will get fixed for everyone –  Joseph Wright Aug 20 '10 at 21:40
2  
@Joseph, done.. –  Geoffrey Jones Aug 20 '10 at 22:22
1  
FYI, AMS replied reporting that "the bug has been fixed, and an updated version of amsrefs installed on the ams server; it should be mirrored to ctan shortly." –  Geoffrey Jones Aug 28 '10 at 0:03
add comment

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.