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 using XeTeX and wondering how to set the final option of the graphicx package.

I started my document with pdfTeX and the following lines:

\documentclass[a4paper, 12pt, twoside, headsepline, draft]{scrreprt}

...

\usepackage[final]{graphicx}

Then I migrated to XeTeX and got an option clash for the graphicx package. Having removed the graphicx declaration the clash vanished but so did the graphics. Doing some research I came across this and tried to change it from draft to final but unfortunately without success.

share|improve this question
    
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. In particular, those two lines alone give no error, so there must be something else causing it. –  egreg Jan 25 '13 at 13:54
add comment

1 Answer

up vote 3 down vote accepted

It is not completely clear what your problem is. The scrreprt class does not load the graphicx package so

\documentclass[draft]{scrreprt}
\usepackage[final]{graphicx}
\begin{document}
\includegraphics{mill.png}
\end{document}

should work without problems. It is likely that you are loading another package that loads the graphicx package. For example, you get an option clash error with

\documentclass[draft]{beamer}
\usepackage[final]{graphicx}
\begin{document}
\includegraphics{mill.png}
\end{document}

because beamer loads graphicx and gives it the draft option. One way to get around this problem is

\documentclass[draft]{scrreprt}
\usepackage{graphicx}
\makeatletter
\Gin@draftfalse
\makeatother
\begin{document}
\includegraphics{mill.png}
\end{document}

which sets the draft flag to false for graphicx.

share|improve this answer
    
Keep in mind that you can pass options to package which are loaded inside classes by using \PassOptionsToPackage{<options>}{<package>} before \documentclass. However, I'm not sure about the order between these and class options, so you might end up with final,draft resulting in draft because the latest option, i.e. the most right one, will prevail. –  Martin Scharrer Jan 25 '13 at 15:14
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.