15

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?

6
  • your shown code can't produce this kind of error message. Create a complete example, which shows the error.
    – user2478
    Jun 11, 2013 at 15:26
  • 1
    @Herbert That is the problem. when I run latex on my .tex file: no errors, no grief! However when I upload my latex file to arxiv: all kinds of errors! Will try to put together a minimum working example but I daresay this might be an arxiv related issue.
    – dearN
    Jun 11, 2013 at 15:32
  • @drN: Then do not load hyperref. I suppose it is done by the documentclass or something else.
    – user2478
    Jun 11, 2013 at 15:34
  • @Herbert Yes. I am modifying my document to work without hyperref. Lets see what transpires!
    – dearN
    Jun 11, 2013 at 15:46
  • drN, if you have found an answer to your question then by all means post it as an answer!
    – Scott H.
    Jun 11, 2013 at 19:24

4 Answers 4

11

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!

3
  • 1
    Where do I find all these style files? Oct 12, 2015 at 6:57
  • 2
    @ErelSegal-Halevi On Linux, you can use locate caption.sty to find /usr/local/texlive/2015/texmf-dist/tex/latex/caption/caption.sty. Nov 29, 2015 at 14:25
  • setspace.sty did it for me. May 3, 2016 at 15:12
6

I got the same problem but the solution was entirely different.

Initially, the arXiv submission failed. I did a search for "error" and found the phrase "! LaTeX Error: Option clash for package hyperref." so I thought this was the cause.

But, it turned out that the submission failed because of an unrelated problem - I forgot to upload one of the graphic files. Once I uploaded that file, I got a message saying "Submission processed OK". I still see the error message "! LaTeX Error: Option clash for package hyperref.", but the PDF is created OK and I can proceed with the submission to arXiv.

3
  • 1
    This just happened to me again. I got the "Option clash for package hyperref" error, but the real error was related to natbib. Nov 7, 2016 at 18:46
  • 1
    Thanks for taking the time to provide this answer. The same issue. Forgot a pic. Same cryptic error.
    – user75422
    Mar 26, 2018 at 11:58
  • thanks, this worked for me. Apr 20, 2019 at 14:50
2

I was using acmart.cls and had the review option enabled:

\documentclass[sigconf,review]{acmart}

Removed review, and arxiv was happy:

\documentclass[sigconf]{acmart}
1
  • Welcome to TeX.SX! Since the OP uses the document class article that does not know about option review, I have doubts that this answers the question. Jun 2, 2017 at 22:38
0

I had this problem and after removing natbib got resolved. Clearly, this solution won't work for papers that need to use natbib.

1
  • I realized that I did not need natbib in my article. I removed it and arXiv was able to process my files. As I say in the answer, this will not work for everyone, but since it resolved my problem, there is a chance that it may resolve others' too.
    – Taha
    Feb 18, 2016 at 2:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .