[Tex/LaTex] Option clash with hyperref

arxivhyperrefoption-clashpackages

If anyone has come across this issue when dealing with uploading tex files on arxiv, their experience would be of immense help:

I am trying to upload a .tex document to arxiv. I upload my .tex file and my .eps figures and .bbl as requested.

When I process my files no pages of output are produced because of an

! LaTeX Error: Option clash for package hyperref.

Now, how do I deal with this? How exactly/with what package must I use \PassOptionsToPackage{...} or \RequirePackage{...} as done here?

My preamble is:

\documentclass[a4paper,12pt]{article}
\usepackage[margin=2.5cm,letterpaper]{geometry}
\usepackage{authblk}
\usepackage{setspace}
\usepackage{subfig}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[super,comma,sort&compress]{natbib} % enhances bibtex citations
\usepackage{hypernat}
\usepackage[english]{babel}
\usepackage[T1]{fontenc} %Useful for file names with underscores in them
\usepackage{float}
\usepackage{grffile}
\newcommand{\hilight}[1]{\colorbox{yellow}{#1}} %To highlight text
\renewcommand{\thefootnote}{\alph{footnote}} %For footnotes

Log file generated by arxiv is available here on pastebin

EDIT:

I edited my latex file and removed \usepackage{hyperref}. This definitely got rid of the ! LaTeX Error: Option clash for package hyperref. message but now the arXiv TeX compiler gives me a fatal error after several package natbib warnings for all the references.

Do I have a problem with natbib only?

Best Answer

I had to contact the folks at arXiv and they asked me to include authblk.sty setspace.sty, subfig.sty, caption.sty, caption2.sty, caption3.sty, babel.sty with my .tex document and eps figures and .bbl file.

Apparently these style files are the only packages that might be mixed versions from what we're running in our environment.

This sorted everything out and I have a submission on arXiv now!