# Slides template in LyX generates option clash for package graphicx [closed]

The slides template in LyX is generating an error even with a very simple example (that is, a single slide with a *.pdf plot)

The source, provided below, generates this error:

! LaTeX Error: Option clash for package graphicx.

with the following description:

The package graphicx has already been loaded with options: [] There has now been an attempt to load it with options [dvips] Adding the global options: ,dvips to your \documentclass declaration may fix this. Try typing to proceed.

Is there something simple I've missed? Is there a solution I can enact inside the LyX gui?

% Preview source code
%% Do not edit unless you really know what you are doing.
\documentclass[landscape,english]{slides}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Linux Biolinum}
\setsansfont[Mapping=tex-text]{Linux Biolinum}
\setcounter{secnumdepth}{1}
\setcounter{tocdepth}{1}
\usepackage[dvips]{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newcounter{slidetype}
\setcounter{slidetype}{0}
\newif\ifLyXsNoCenter
\LyXsNoCenterfalse
\newcommand{\noslidecentering}{
\LyXsNoCentertrue%
}
\newcommand{\slidecentering}{
\LyXsNoCenterfalse%
}
\newcommand{\lyxendslide}[1]{
\ifLyXsNoCenter%
\vfill%
\fi%
\ifcase \value{slidetype}%
\or % no action for 0
\end{slide} \or%
\end{overlay} \or%
\end{note}%
\fi%
\setcounter{slidetype}{0}
\visible
}
\AtEndDocument{\lyxendslide{.}}
\newcommand{\lyxnewslide}[1]{
\lyxendslide{.}
\setcounter{slidetype}{1}
\begin{slide}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% Uncomment to print out only slides and overlays
%
%\onlyslides{\slides}

% Uncomment to print out only notes
%
%\onlynotes{\notes}

\makeatother

\usepackage{xunicode}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\begin{document}

\lyxnewslide{}

Test slide.

\includegraphics[width=5cm,height=5cm]{../../../../plot}
\end{document}


## closed as off-topic by yo', David Carlisle, Werner, user31729, user13907 Aug 27 '14 at 18:08

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• just delete \usepackage[dvips]{graphicx} which is generating the error – David Carlisle Aug 27 '14 at 12:09
• I exported to source latex, made the change you suggested, re-imported to Lyx and now everything works perfectly. Thanks so much for your assistance. – tomw Aug 27 '14 at 13:24
• This question appears to be off-topic because the problem is too localized: it is too specific to be useful to any future visitors. – yo' Aug 27 '14 at 17:46
• I'll defer to you, but I think this is a general problem. Simply inserting a *.pdf file into the default LyX Slides template replicates this error. – tomw Aug 27 '14 at 18:18