0

Have included the following in my style file

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{andromeda}[2022/10/03 Andromeda Package]

\newif\ifCountryMaps
\CountryMapsfalse

\newif\ifScienTech
\ScienTechfalse

%% Options set boolean flags to true
\DeclareOption{CountryMaps}{\CountryMapstrue}
\DeclareOption{ScienTech}{\ScienTechtrue}

%% process the options before checking if the booleans are true
\ProcessOptions

%% Load Country Maps
\ifCountryMaps
  \RequirePackage{countriesofeurope}
\fi

%% Load Science and Technology Packages
\ifScienTech
  \RequirePackage{gensymb}
  \RequirePackage{wasysym}
  \RequirePackage{ifsym}
  \RequirePackage{textcomp}
  \RequirePackage{steinmetz}
  \RequirePackage{emf}
  \RequirePackage{fontawesome}
  \RequirePackage{utfsym}
  \RequirePackage{keystroke}
  \RequirePackage{svrsymbols}
\fi

\RequirePackage{etoolbox} % Programming tools

%% Deferred colours (with asterisk) for dvipsnames
\RequirePackage[dvipsnames*,svgnames,x11names]{xcolor}
\definecolors{Lavender}

%% Bold typeface
\renewcommand{\seriesdefault}{\bfdefault}
\boldmath

And getting

! LaTeX Error: Option clash for package xcolor.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.110 \definecolors
                 {Lavender}
5
  • 1
    learn to make a complete example. Oct 3, 2022 at 22:11
  • Some other package you load before doing \usepackage[...]{xcolor} already loads xcolor with different options.
    – egreg
    Oct 3, 2022 at 22:38
  • If I have \usepackage[CountryMaps]{andromeda} followed by \usepackage{userndr} and userndr has \usepackage{andromeda}. Would that be a problem?
    – Veak
    Oct 3, 2022 at 22:45
  • I introspected a bit more and a problem seems to occur with this command \newcommand{\teo-teora-pigment}{RawSienna}.
    – Veak
    Oct 3, 2022 at 22:57
  • @konmi no you have already loaded xcolor as egreg said above so you get an error from \RequrePackage I Oct 3, 2022 at 23:02

1 Answer 1

0

You provided no test file but

\documentclass{article}
\usepackage[ScienTech]{andromeda}
\begin{document}

\end{document}

shows in the log:

 (/usr/local/texlive/2022/texmf-dist/tex/latex/utfsym/utfsym.sty
Package: utfsym 2022/04/17 Use TikZ to support icons from Unicode blocks

(/usr/local/texlive/2022/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2022-09-28 L3 programming layer (loader) 

(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2022-09-28 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count198
\l__pdf_internal_box=\box52
))
Package: l3keys2e 2022-06-22 LaTeX2e option processing using LaTeX3 keys
) (/usr/local/texlive/2022/texmf-dist/tex/latex/xcolor/xcolor.sty

showing xcolor is already loaded (with no options) via utfym.sty

So you get an option clash from

\RequirePackage[dvipsnames*,svgnames,x11names]{xcolor}

You could load xcolor with options earlier, or better load fewer potentially clashing packages,

You must log in to answer this question.

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