2

Using amsrefs, I want to refer to an answer on mathoverflow. That site has automated amsrefs entry creation option. When I use it, everything goes fine, and the pdf file contains correct link. However when I send the file by gmail and open it in gmail with either Chrome or Firefox (latest build, on Windows 10), there is a problem with that link. If I copy it and paste elsewhere it is correct, but if I click on it, I am taken to a wrong address: instead of https://mathoverflow.net/q/313198 I get https://mathoverflow.net/q/31319 which is an entirely different page.

MWE: produce a pdf from

\documentclass{amsart}

\usepackage{amsrefs}

\begin{document}

$\binom nk$

\begin{biblist}
\bib{E}{misc}{
author={Noam D. Elkies (https://mathoverflow.net/users/14830/noam-d-elkies)},
note={URL: https://mathoverflow.net/q/313198 (version: 2018-10-19)}
}
\end{biblist}
\end{document} 

send it to, say, yourself via gmail and open it from within the gmail pdf viewer.

Let me add that with any other math command that I tried in place of that $\binom nk$ the error disappears.

What can I do?

closed as off-topic by Werner, Phelype Oleinik, Sebastiano, Stefan Pinnow, Mensch Mar 1 at 23:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Werner, Phelype Oleinik, Sebastiano, Stefan Pinnow, Mensch
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    If you want a link in the PDF you should mark it with \url{....} and use hyperref your PDF has no link just some text so you are relying on the pdf reader to make a non-standard guess that something that looks like a link is a link. – David Carlisle Mar 1 at 20:36
  • I'm able to verify this. However, if you download the file and use a dedicated PDF viewer, the links work as expected. This is therefore dependent on the Gmail PDF viewer and not something to do with (La)TeX. Weird though... – Werner Mar 1 at 20:47
  • @DavidCarlisle I see, thanks. But is not it strange that this guess is influenced by the presence of $\binom nk$ nearby? Because other kinds of commands (like $\frac nk$ for example) do not cause this error. – მამუკა ჯიბლაძე Mar 1 at 20:56
  • 1
    If you ask how to construct a latex file which has a link, that's on topic and Ulrike's answer is the answer. If you ask about your browsers (or gmails) heuristics for guessing links in plain text pdf with no link fields, then really that's off topic, the fact that the pdf was made by tex isn't relevant you'd presumably get the same if the pdf was made by word or whatever. – David Carlisle Mar 1 at 21:17
  • 1
    Even more odd is that is a redirected address since mathoverflow.net/q/313198 leads to mathoverflow.net/questions/313191/… HOWEVER back to your issue you could try adding an extra / so it starts https://mathoverflow.net/q/313198/ then if gmail trims it back like this comment box did (hence the quotes) it will still redirect like mathoverflow.net/q/313198 does !! – user170109 Mar 1 at 22:19
4

You should use hyperref and \url if you want real links:

\documentclass{amsart}

\usepackage{amsrefs}
\usepackage{hyperref}
\begin{document}

$\binom nk$

\begin{biblist}
\bib{E}{misc}{
author={Noam D. Elkies (https://mathoverflow.net/users/14830/noam-d-elkies)},
note={URL: \url{https://mathoverflow.net/q/313198} (version: 2018-10-19)}
}
\end{biblist}
\end{document} 

enter image description here

  • Yes it works that way, thank you. However let me point out that without that $\binom nk$ it also worked without hyperref and without the \url{...} – მამუკა ჯიბლაძე Mar 1 at 20:53
  • 1
    Without hyperref the pdf viewer has to guess where links are by looking in the page stream - it is quite possible that this heuristic fails if you add or remove stuff to the page. – Ulrike Fischer Mar 1 at 21:00
  • Oh I see. Would never suspect that such clever heuristics were involved... – მამუკა ჯიბლაძე Mar 1 at 21:02

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