Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Call hyperref as last package ... –  Kurt Jun 11 '13 at 15:11
    
@Kurt Did that. No improvement. Same error! :( ! LaTeX Error: Option clash for package hyperref. –  drN Jun 11 '13 at 15:12
    
@Kurt: hyperref must be loaded before natbib and hypernat –  Herbert Jun 11 '13 at 15:24
    
Them start with commenting on package, compile. Error? Next commented package. Error? until you find the package that causes the clash. Then rearange your packages. hyperref should be the last, see the documetation of hyperref for more informations ... –  Kurt Jun 11 '13 at 15:25
    
your shown code can't produce this kind of error message. Create a complete example, which shows the error. –  Herbert Jun 11 '13 at 15:26
show 6 more comments

1 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!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.