# Option clash for package adjustbox [duplicate]

Problem:

I am getting the error message Option clash for package adjustbox. and am wondering what could be wrong? Any advice how to figure out which of the other packages are generating this error?

Minimal Working Example:

\documentclass{article}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{ragged2e}
\usepackage{fancyvrb}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{cellspace, graphicx, makecell}
\usepackage{xparse}
\usepackage{cellspace,tabularx}

\begin{document}

On pc it looks like \tabwin\nobreakspace and on Mac it looks like \tab.

\end{document}


## marked as duplicate by Heiko Oberdiek, user11232, Svend Tveskæg, user13907, clemensAug 30 '15 at 13:56

• Use \documentclass[export]{article} and then \usepackage{adjustbox} . – user11232 Aug 30 '15 at 11:33
• The issue arises because adjustbox is also loaded (indirectly) by tikz. Either issue the instruction \usepackage[export]{adjustbox} before \usepackage{tikz} or, better still, follow Harish's advice to provide the global option export to the \documentclass option. That way, you won't have to worry about how to sequence the loading of these two packages. – Mico Aug 30 '15 at 11:39
• Thanks for the explanation Mico and for the solution @HarishKumar – kexxcream Aug 30 '15 at 11:40
• Are you aware you're trying to load cellspace and graphicx twice? (Not that it would matter much but things like this just clutter the preamble…) – clemens Aug 30 '15 at 12:00
• @clemens Would you care to elaborate and suggest what I could do to improve the preamble? – kexxcream Aug 30 '15 at 12:04

adjustbox is explicitly loaded by menukeys, without any options. You can either set the option as an option to \documentclass, or use
\PassOptionsToPackage{export}{adjustbox}

in the preamble. Also, needless to load adjustbox if you load menukeys.
Comment aside, don't load cellspace twice.
• It is not needless to load adjustbox explicitly. The fact that the current version of menukeys loads adjustbox is just an implementation detail, which can change in later versions. – Heiko Oberdiek Aug 30 '15 at 11:57