From 16a62a86ce859ae41ec4d7685e5bf97a96d99c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Mon, 13 Mar 2023 10:51:20 +0100 Subject: [PATCH] LaTeX: guard against non-available xcolor in setting \sphinxbox defaults --- sphinx/texinputs/sphinx.sty | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 9463701f9..e7a02bbd6 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -812,12 +812,14 @@ will be set to white}% \do{\expandafter\let\csname KV@sphinxbox@\x\expandafter\endcsname \csname KV@sphinx@box_\x\endcsname} \newcommand\sphinxboxsetup{\setkeys{sphinxbox}} -% some of these defaults got already set directly +% Some of these defaults got already set directly. +% As xcolor is perhaps not loaded we can not use =VerbatimColor syntax, +% and must use the \definecolor syntax. \sphinxboxsetup{border-width=\fboxrule, padding=\fboxsep, border-radius=\fboxsep, - border-TeXcolor=VerbatimBorderColor, - background-TeXcolor=VerbatimColor,% + border-TeXcolor={RGB}{32,32,32},% default VerbatimBorderColor + background-TeXcolor={gray}{0.95},% default VerbatimColor }% \RequirePackage{sphinxpackageboxes} \input{sphinxlatexadmonitions.sty}