5

I'm trying to print the keys of my calculators in a TeX document, thanks to these packages :

Here is a MWE :

\documentclass[a4paper,12pt]{report}

\usepackage[color=real]{graph35} % Casio calculator
\usepackage{tipfr} % TIcalculator
\begin{document}

On a Casio calculator, type \key[scale=2]{sin} ; On a TI calculator, type \Touche .

\end{document}

I get an error saying : ! LaTeX Error: Option clash for package xcolor. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.9 \RequirePackage [zerostyle=d]{newtxtt} The package xcolor has already been loaded with options: [] There has now been an attempt to load it with options [dvipsnames,table] Adding the global options: ,dvipsnames,table to your \documentclass declaration may fix this.

But even if I put ,dvipsnames,table in my documentclass declaration, there is still an error. Does anyone would know how to prevent that clash between these two packages ?

Thanks for helping !

1

2 Answers 2

6

Just swap the order so the package using xcolor options is first

enter image description here

\documentclass[a4paper,12pt]{report}

\usepackage{tipfr} % TIcalculator
\usepackage[color=real]{graph35} % Casio calculator

\begin{document}

On a Casio calculator, type \key[scale=2]{sin} ; On a TI calculator, type \Touche .

\end{document}
5

The tipfr package has

\RequirePackage[dvipsnames,table]{xcolor}

while graph35 has

\RequirePackage{tikz}

which loads xcolor without options.

Thus the order of the packages has to be reversed. If you need to pass further options to xcolor, load it with the options you need first, including dvipsnames and table.

\documentclass[a4paper,12pt]{report}

% uncomment the following if you need more options to xcolor
%\usepackage[dvipsnames,table,<other options>]{xcolor}

\usepackage{tipfr} % TIcalculator
\usepackage[color=real]{graph35} % Casio calculator

\begin{document}

On a Casio calculator, type \key[scale=2]{sin} ; On a TI calculator, type \Touche .

\end{document}

For instance, you may want to use monochrome for printing on a black-and-white printer:

\documentclass[a4paper,12pt]{report}

\usepackage[dvipsnames,table,monochrome]{xcolor}

\usepackage{tipfr} % TIcalculator
\usepackage[color=real]{graph35} % Casio calculator

\begin{document}

On a Casio calculator, type \key[scale=2]{sin} ; On a TI calculator, type \Touche .

\end{document}
2

You must log in to answer this question.

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