# Gmail built in pdf viewer omits last symbol in an url, any idea why? [closed]

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?

• 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 '19 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 '19 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 '19 at 20:56
• 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 '19 at 22:19

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}

• 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 '19 at 20:53
• 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 '19 at 21:00
• Oh I see. Would never suspect that such clever heuristics were involved... – მამუკა ჯიბლაძე Mar 1 '19 at 21:02