Have a look at the following example, please.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{my.sty}
\RequirePackage{xcolor}
\end{filecontents}
\RequirePackage{my}
\usepackage[cmyk]{xcolor}
\begin{document}
Content
\end{document}
I expect this to compile, but it reports an option clash. I thought there could be only an option clash if I try to load a package with different options and that there's no clash if the package is loaded multiple times and one time with options. Is that wrong?
I know that I could fix this by changing the order of my
and xcolor
but I can think about cases where I can’t influence the order (e.g. my
is loaded internally by the document class).
I found \RequirePackage without option clashes because of the package loading order? where Herbert gave the solution to split the package loading, which won’t work in my case. And I asked catoptions causes option clash with xcolor, which is possibly a duplicate, a few minutes ago …