[Tex/LaTex] Publishing to Arxiv with Hyperlinks

arxivbibliographiesbibtexurls

In addressing this question the first thing to note is that everything works, compiles and displays correctly on my computer. However, when I go to upload my document to arXiv.org sometimes things change. In particular, publishing URLs in a bibliography to the arXiv.org is (apparently) very difficult.

Issue 1: Bibliography not showing up at all.

Issue 1 Solved: Publishing to Arxiv using Biblatex-Biber

Issue 2: Bibliography displays urls outside the border of the document. It doesn't wrap the text of the url in a bibliography item. Again, it works fine on my computer, just not on the website arXiv.org.

Issue 2 Solved: Line breaks of long URLs in biblatex bibliography?

Issue 3: With the setup from the first two issues, I now have a new problem. If a URL wraps to a new line, like this

[5] Author. Title. PhD thesis. Place, May 2011. url: http://aaaaaaaaaaa.a
    aaaaaaa/aaaaaaa.aaaaaaaa/aaaaaaa.aaa.aaaaaa.

arXiv.org disables the hyperlink. Again, hyperlinks are not disabled and work perfectly fine on my system. But wrapped urls on arXiv.org no longer have hyperlinks. If a bibliography item looks like

[6] Author. Title. PhD thesis. Place, May 2011. DOI: aaaa.aaa/a.aaa.aa

so that it does not break, the the hyperlink stays intact.

How do I solve issue 3? I am surprised that this is not a more common issue, considering the extensive use of the arXiv.

MWE:

test.TEX

%Document Type
\documentclass[reqno]{amsart}
%Bibliography Commands
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=numeric-comp,firstinits=true,backend=bibtex,%backref=true,
]{biblatex}
\bibliography{test.bib}
\DeclareFieldFormat[article,book,incollection,phdthesis,misc]{volume}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{publisher}{\textnormal{#1}}
\DeclareFieldFormat[article,book,phdthesis]{title}{\mkbibemph{#1}}
\setcounter{biburlnumpenalty}{7000}
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
%Packages
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{enumerate}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{tikz,caption}
\usetikzlibrary{arrows,shapes,trees}
\usepackage{verbatim}
\usepackage{url}
\usepackage[hyperindex,breaklinks]{hyperref}
\hypersetup{linkcolor=blue, citecolor=red, colorlinks=true}
\usepackage{array}
\begin{document}
Reference \cite{one} and \cite{two}. 
\printbibliography
\end{document}

test.BIB

@ARTICLE{one,
url = {http://www.google.com}}
@Article{two,
url = {https://tex.stackexchange.com/questions/182523/publishing-to-arxiv-with-hyperlinks?noredirect=1#comment420451_182523}}

If you compile this on a local system it works fine. But if you try to publish this to the arXiv, it no longer has a hyperlink for the second item.

Best Answer

With the MWE I can see that arXiv was processing your submission with latex instead of pdflatex. You can force pdflatex by including a line

\pdfoutput=1

within the first 5 lines of your submission, in which case everything seems to work. See the arXiv help on this point.