3

When trying to load I get the error message 'Option clash for package xcolor'. I have already understood that this is because other packages I loaded before also automatically load this package. All I need to know is which package does this, such that I can put the 'xcolor' option in the command. My preamable is below.

\documentclass[a4paper,12pt]{report}
\usepackage{graphicx}
\usepackage[backend=biber, natbib=true, style=authoryear]{biblatex}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{smartdiagram}
\usepackage{amsfonts}
\usepackage[table,xcdraw]{xcolor}
\usepackage{float}
\smartdiagramset{circular distance=4cm,
font=\normalsize,
text width=2.5cm,
arrow line width=0.2cm
}
\newsavebox{\mybox}
\savebox{\mybox}{%
\smartdiagram[circular diagram]{Insured \\ policy holder,Insurer \\ company}
}
1
  • 1
    First , you don't need \usepackage{tikz} as tikz is loaded by smartdiagram, so remove it. Second, load \usepackage[table,xcdraw]{xcolor} before \usepackage{smartdiagram}
    – user11232
    Commented Apr 13, 2015 at 12:26

1 Answer 1

4

Finding out which package loads what is often a daunting task. Instead pass the options before document class. If there is still an option clash then you cannot use that option together with the other package loading. Also smartdiagram -> tikz -> {graphicx,xcolor}.

\PassOptionsToPackage{table,xcdraw}{xcolor}
\documentclass[a4paper,12pt]{report}
\usepackage[backend=biber, natbib=true, style=authoryear]{biblatex}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath,amsfonts}
\usepackage{smartdiagram}
\usepackage{float}

\smartdiagramset{circular distance=4cm,
font=\normalsize,
text width=2.5cm,
arrow line width=0.2cm
}
\newsavebox{\mybox}
\savebox{\mybox}{%
\smartdiagram[circular diagram]{Insured \\ policy holder,Insurer \\ company}
}
\begin{document}
.
\end{document}
2
  • Or pass conflicting options to \documentclass as I've discovered today
    – Ignasi
    Commented Apr 13, 2015 at 15:23
  • It's the case one has to do that when loading pstricks and xcolor with options that are not loaded by pstricks.
    – Bernard
    Commented Apr 13, 2015 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .