BibTeX Amsref – Fix Arxiv ID Link Display Issues

amsrefsarxivbibdeskbibtexurl

I use BibDesk to manage my references for the standard AMS article. Here's a typical Bibentry

@article{Braverman:ab,
    Author = {Alexander Braverman and Pavel Etingof},
    Date-Added = {2018-04-13 00:34:57 +0000},
    Date-Modified = {2018-04-28 05:17:44 +0000},
    Eprint = {math/0409441},
    Title = {{Instanton counting via affine Lie algebras II: from Whittaker vectors to the Seiberg-Witten prepotential}},
    Url = {https://arxiv.org/pdf/math/0409441},
    Bdsk-Url-1 = {https://arxiv.org/abs/math/0409441},
    Bdsk-Url-2 = {https://arxiv.org/pdf/math/0409441}}

So there are both URL and Eprint fields. In the output I get this

Alexander Braverman and Pavel Etingof, Instanton counting via affine Lie algebras II: from Whittaker vectors to the Seiberg-Witten prepotential, available at math/0409441.

where arxiv ID math/0409441 is clickable, but the browser thinks that math/0409441 is the full path, so it cannot open the page. I could add by hand the complete url

https://arxiv.org/pdf/math/0409441

but then I'll have 100+ https://…. in my reference list which makes no sense. They add half a page or so to the paper and obscure the view of the reference list.

What is a quick fix without changing every entry (I have hundreds) so that only the arxiv ID will be displayed, and yet, when I click on it the browser would know where to go? Equivalently, how to hide https://arxiv.org/pdf/ ?

Best Answer

amsrefs uses the command \eprint to format the eprint field, its standard definition is \newcommand{\eprint}[1]{\url{#1}}. You can redefine the command to your liking. Assuming you load hyperref

\renewcommand{\eprint}[1]{\href{https://arxiv.org/abs/#1}{arXiv:#1}}

links all eprints to their arXiv page, but only displays the short "arXiv:math/0409441" designator in the bibliography.