I'm using a preamble for a (PDF) markdown document for the first time. I want to insert some png images into my PDF, but I have problem when using include_graphics in my Rmd script.

This is my preamble:

\def\Theme{Verkeersongevallen 2019}
\newtcolorbox{myquote}{colback=box_background,grow to right by=-10mm,grow to left by=-10mm, boxrule=0pt,boxsep=0pt,breakable}
\newcommand{\highlight}[1]{\begin{myquote} #1 \end{myquote}}


\lhead[RO]{\textcolor{table_blue}{\small{Vias institute}}}

When I knit the PDF, I get the following error code:! LaTeX Error: Option clash for package graphicx.

I have added this part: \usepackage[dvips,xetex]{graphicx} \usepackage{ifpdf,mla} just recently, because I had another error before (! Package xkeyval Error: 03in' undefined in families Gin'.).

Any advice would be much appreciated! Regards, Freya

  • remove [dvips,xetex], that is unneeded and contradictory. – Ulrike Fischer Mar 11 at 8:09
  • I removed this, but now I get a different error. ! LaTeX Error: Option clash for package color. – Freya Slootmans Mar 11 at 8:20
  • 1
    the errors are due to code you have not shown, you are using the HTML color model without loading xcolor so you must already have loaded it somewhere then you load it again in the code that you have shown, delete the loading of color and xcolor here – David Carlisle Mar 11 at 8:28

Your Answer

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

Browse other questions tagged or ask your own question.