2

I'm relativly new to Latex and might ask a stupid question... but folling thing happend: I had a perfectly working .tex-file and wanted to implement PDF-documents with the pdfpages package. As I do so my file only gives me error messages saying:

! LaTeX Error: Option clash for package graphicx.

Heres my M(not)WE:


\documentclass[a4paper,

11pt,

bibliography=totocnumbered,

listof=numbered,

captions=tableheading,

]{scrreprt}


\usepackage[ngerman]{babel}

\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc}

\usepackage{amsmath}

\usepackage{eurosym}

\usepackage{float}

\usepackage[section]{placeins}

\usepackage{url}

\usepackage{eso-pic}

\usepackage{atbegshi}

\usepackage{pdflscape}

\usepackage{ifthen}

\usepackage{calc}

\usepackage{pdfpages}


\usepackage[draft]{graphicx}

\begin{document}

Abc

\end{document}

Can anyone help me? Thanksalot :)

7

pdfpages loads also graphicx, but without options. If you want to load graphicx with an option you should either load pdfpages behind graphicx:

\documentclass[a4paper]{scrreprt}

\usepackage[draft]{graphicx}
\usepackage{pdfpages}

\begin{document}

Abc

\end{document}

or pass the option like this:

\documentclass[a4paper]{scrreprt}

\PassOptionsToPackage{draft}{graphicx}
\usepackage{pdfpages}

\begin{document}
\includegraphics{example-image}
Abc

\end{document}

Or pass the option through the documentclass

\documentclass[draft]{scrreprt}

(but then it can affect more packages).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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