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.

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}

\usepackage{ifxetex}
\ifxetex % only for xelatex
\usepackage{xltxtra} % this should load both fontspec & xunicode
\usepackage{fontspec}
\setromanfont{Helvetica Neue}
\else %
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\fi % \ifxetex

Any ideas?

EDIT:

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
3  
Why "Warning"? It is clearly labeled as Error. –  Martin Scharrer Jan 3 '12 at 14:29
add comment

2 Answers

up vote 10 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
2  
@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
add comment

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
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.