通过以下样式文件我得到了Package xcolor Error: Undefined color
RawSienna'。`
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{test-xcolor-galex}[2022/10/03 Andromeda Galaxy Package]
%% Deferred colours (with asterisk) for dvipsnames
\RequirePackage[dvipsnames*,svgnames,x11names]{xcolor}
\definecolors{Lavender}
\renewcommand{\seriesdefault}{\bfdefault}
\boldmath
\catcode`-=11 % make "hyphen" (-) a letter
\newcommand{\teora-pigment}{RawSienna}
\newcommand{\teora-pigm-name}{green!72!black}
\newtheorem{teora}{\color{\teora-pigment}{Theorem}}[section]
\catcode`-=12 % make "hyphen" (-) a letter
这是文件
\documentclass[b5paper,12pt]{article}
\usepackage[body={13cm,18cm}]{geometry}
%% Language Tools
\usepackage[italian,french,spanish,icelandic,english]{babel}
\usepackage{test-xcolor-galex}
\usepackage{countriesofeurope}
\begin{document}
aueaoe
\section{Teor}
\begin{teora}
Test
\end{teora}
%% \Iceland
\end{document}
答案1
一个更简单的例子是
\documentclass{article}
\RequirePackage[dvipsnames*,svgnames,x11names]{xcolor}
\definecolors{Lavender}
\begin{document}
\color{RawSienna} abc
\end{document}
这使
! Package xcolor Error: Undefined color `RawSienna'.
因为您没有定义颜色。我想不出有什么理由用这么多预定义的颜色名称加载 xcolor,但是既然您已经定义了,那么您也可以通过声明来避免错误RawSienna
:
\documentclass{article}
\RequirePackage[dvipsnames*,svgnames,x11names]{xcolor}
\definecolors{Lavender,RawSienna}
\begin{document}
\color{RawSienna} abc
\end{document}