Fix VerbatimHighlightColor key declared non-sphinx-prefixed colour name

This commit is contained in:
jfbu 2017-12-11 23:09:19 +01:00
parent f95464baf3
commit 43e6f1aa96
2 changed files with 8 additions and 8 deletions

View File

@ -261,6 +261,11 @@ The available styling options
.. versionadded:: 1.6.6 .. versionadded:: 1.6.6
.. note::
Starting with this colour key, and for all others coming next, the actual
names declared to "color" or "xcolor" are prefixed with "sphinx".
``verbatimsep`` ``verbatimsep``
default ``\fboxsep``. The separation between code lines and the frame. default ``\fboxsep``. The separation between code lines and the frame.
@ -282,11 +287,6 @@ The available styling options
default ``{rgb}{0,0,0}`` (black). The colour for the two horizontal rules default ``{rgb}{0,0,0}`` (black). The colour for the two horizontal rules
used by Sphinx in LaTeX for styling a :dudir:`note` type admonition. used by Sphinx in LaTeX for styling a :dudir:`note` type admonition.
.. note::
The actual colour names declared to "color" or "xcolor" are prefixed with
"sphinx".
``noteborder``, ``hintborder``, ``importantborder``, ``tipborder`` ``noteborder``, ``hintborder``, ``importantborder``, ``tipborder``
default ``0.5pt``. The width of the two horizontal rules. default ``0.5pt``. The width of the two horizontal rules.

View File

@ -311,8 +311,6 @@
\sphinxDeclareColorOption{OuterLinkColor}{{rgb}{0.216,0.439,0.388}} \sphinxDeclareColorOption{OuterLinkColor}{{rgb}{0.216,0.439,0.388}}
\sphinxDeclareColorOption{VerbatimColor}{{rgb}{1,1,1}} \sphinxDeclareColorOption{VerbatimColor}{{rgb}{1,1,1}}
\sphinxDeclareColorOption{VerbatimBorderColor}{{rgb}{0,0,0}} \sphinxDeclareColorOption{VerbatimBorderColor}{{rgb}{0,0,0}}
% also no prefix for this one, for consistency (sigh). Color as in minted!
\sphinxDeclareColorOption{VerbatimHighlightColor}{{rgb}{0.878,1,1}}
% now the colours defined with "sphinx" prefix in their names % now the colours defined with "sphinx" prefix in their names
\newcommand*{\sphinxDeclareSphinxColorOption}[2]{% \newcommand*{\sphinxDeclareSphinxColorOption}[2]{%
% set the initial default % set the initial default
@ -320,6 +318,8 @@
% set the key handler. The "value" ##1 must be acceptable by \definecolor. % set the key handler. The "value" ##1 must be acceptable by \definecolor.
\define@key{sphinx}{#1}{\definecolor{sphinx#1}##1}% \define@key{sphinx}{#1}{\definecolor{sphinx#1}##1}%
}% }%
% Default color chosen to be as in minted.sty LaTeX package!
\sphinxDeclareSphinxColorOption{VerbatimHighlightColor}{{rgb}{0.878,1,1}}
% admonition boxes, "light" style % admonition boxes, "light" style
\sphinxDeclareSphinxColorOption{noteBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{noteBorderColor}{{rgb}{0,0,0}}
\sphinxDeclareSphinxColorOption{hintBorderColor}{{rgb}{0,0,0}} \sphinxDeclareSphinxColorOption{hintBorderColor}{{rgb}{0,0,0}}
@ -858,7 +858,7 @@
\ifin@ \ifin@
\edef\sphinx@restorefboxsep{\fboxsep\the\fboxsep\relax}% \edef\sphinx@restorefboxsep{\fboxsep\the\fboxsep\relax}%
\fboxsep\z@ \fboxsep\z@
\colorbox{VerbatimHighlightColor}% \colorbox{sphinxVerbatimHighlightColor}%
{\sphinx@restorefboxsep\sphinx@FancyVerbFormatLine{#1}}% {\sphinx@restorefboxsep\sphinx@FancyVerbFormatLine{#1}}%
\else \else
\sphinx@FancyVerbFormatLine{#1}% \sphinx@FancyVerbFormatLine{#1}%