[Tex/LaTex] Arxiv.org: remove borders around hyperlinks

arxivhyperrefobsoletepdftex

The answers to this question already explain how to remove the borders around hyperlinks.

However, if I submit a manuscript to Arxiv.org, it seems that their system somehow manages to override the \hypersetup command. The end result is ugly: bright green, red, and cyan boxes all around the PDF file. However, it does not just ignore all \hypersetup commands; for example, \hypersetup{pdfauthor=...} works as expected.

Does anyone happen to know any workarounds?

AFAIK, Arxiv.org uses a system that is based on Texlive 2009 and TeX::AutoTeX. I am defining \pdfoutput=1, i.e., the document is compiled using pdflatex.

Best Answer

With a lot of trial and error, I finally found a solution. This works:

\pdfoutput=1
...
\usepackage{hyperref}
...
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    citecolor=black,
    filecolor=black,
    urlcolor=black,
}

The links are invisible, there are no borders or colours. Trickery with 00README.XXX does not seem to be necessary.


Some remarks…

Any approach based on pdfborder={0 0 0} seems to fail. Options hidelinks and allcolors are not supported; the hyperref version that Arxiv.org uses is too old.

I realised that I have to enable colorlinks only after reading Ryan Reich's answer, in which he mentions that the colorlinks option and customised link colours seem to work fine.

I still do not understand exactly what is going on here—how is it possible that colorlinks disables borders while pdfborder does not work? Anyway, I guess I will just blindly copy-and-paste this fragment of code in future and forget about it. :)


Update 2022

Using the original \hypersetup from this answer, a recent upload to arXiv still compiled with bright-coloured rectangles around links. The following \hypersetup managed to get the job done:

\hypersetup{
    colorlinks=false,
    pdfborder={0 0 0},
    pdfborderstyle={/S/U/W 0},
}
  • pdfborderstyle adapted from here
  • note that pdfborder is probably redundant and ignored by arXiv
Related Question