TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having this Error when I try to compile my .tex file with xelatex:

! Package hyperref Error: Wrong DVI mode driver option `dvips',
(hyperref)                because XeTeX is running.

See the hyperref package documentation for explanation.

This is my LaTeX header

\documentclass[10pt, a4paper, dvips,]{moderncv}

\moderncvtheme[grey, roman]{classic}

\ifxetex % only for xelatex
\usepackage{xltxtra} % this should load both fontspec & xunicode
\setromanfont{Helvetica Neue}
\else %
\fi % \ifxetex

Any ideas?


I removed the 'dvips', now I get:

! Package hyperref Error: Wrong driver option `pdftex',
(hyperref)                because pdfTeX in PDF mode is not detected.

See the hyperref package documentation for explanation.

Now my first latex line

\documentclass[10pt, a4paper]{moderncv}

Any clues ?

share|improve this question
Why "Warning"? It is clearly labeled as Error. – Martin Scharrer Jan 3 '12 at 14:29
up vote 11 down vote accepted

Don't use the dvips option for the class (and any package). It will be passed to every package, like all class options, and tell these that they should use the DVIPS mode or driver. You however use apparently XeLaTeX which uses a different driver.

You should not explicitly state the driver in any case. The packages should nowadays be able to determine the correct driver themselves and stating a wrong one manually leads to exactly this kind of errors.

share|improve this answer
Except for dvipdfmx which cannot be auto-detected. – AlexG Jan 3 '12 at 15:03
I removed dvips from my options, but it's not working for another reason, I edited my post :) – Mr.Gando Jan 3 '12 at 15:22
@Mr.Gando: Your new error would actually be a new problem and which should be asked as a new question instead of changing the existing one. But the answer here is simple enough: Older versions of modernsv used the pdftex driver explicitly, making it incompatible with XeLaTeX. Simply update your version to the newest one. – Martin Scharrer Jan 3 '12 at 15:41

I have this version:

moderncv.cls    2011/12/23 v0.15.1 modern curriculum vitae document class

and do not get a problem with the driver.

share|improve this answer
Apologies for being contrary, but is this really an answer? It seems more like a comment. – qubyte Jan 3 '12 at 15:58
fwiw, the latest version is 2013/04/29 v1.5.1, which is also present in tex live. – wasteofspace Aug 21 '13 at 10:00

Your Answer


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.