I have seen that I cannot require a package twice. How can I have an option that activates the availability of colour names
\RequirePackage[dvipsnames*,svgnames,x11names]{xcolor}
But if the option is missing the style file uses this instead
\RequirePackage{xcolor}
xcolorbecause I want to use colours in my style file. Is there a more appropriate way to do this ? – Veak Oct 07 '23 at 12:55\RequirePackage{xcolor}there is no reason to define 100s of colour names you don't use, why are you using those options (it rarely makes sense to load more than one of them in any case) if you have a requirement to stick to the pre-defined svg pallette use svgnames, if you are generating postscript and want to send named rather than cmyk numbered colours to dvips use dvipsnames, if you are targetting xdvi viewer and want X11 colour names use x11names, what's the point of defining them all? but in a package just don't use the options at all. – David Carlisle Oct 07 '23 at 13:21\RequirePackage{xcolor}? Why are people warned of option clashes. Are there no internals so people can use options without too much hassle ? – Veak Oct 07 '23 at 13:45\RequirePackage{xcolor}and set up my own colour names. Would there still be a clash when users call\usepackage[svgnames]{xcolor}, then call my package ? That is my difficulty. – Veak Oct 07 '23 at 13:56\AtBeginDocument{\RequirePackage{xcolor}}so you just make sure its loaded at that point and the user can load xcolor before or after your package – David Carlisle Oct 07 '23 at 14:01\definecolor{package-thmcolor}{rgb}{.5,0,.2}....\color{package-thmcolor}– David Carlisle Oct 07 '23 at 14:51\RequirePackage{xcolor}, am I right ? Would I call it under some condition ? – Veak Oct 07 '23 at 14:55xcolorfirst, that would mean that my package fails, correct ? Have been trying to avoid that if it makes sense. – Veak Oct 07 '23 at 15:03\Requirepackage{xcolor}but without the options then. – Veak Oct 07 '23 at 16:16