summaryrefslogtreecommitdiff
path: root/macros/latex/required/graphics/color.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/required/graphics/color.dtx')
-rw-r--r--macros/latex/required/graphics/color.dtx38
1 files changed, 26 insertions, 12 deletions
diff --git a/macros/latex/required/graphics/color.dtx b/macros/latex/required/graphics/color.dtx
index 8de7d013a3..ad5df89a7e 100644
--- a/macros/latex/required/graphics/color.dtx
+++ b/macros/latex/required/graphics/color.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% color.dtx Copyright (C) 1994--1999 David Carlisle
-%% Copyright (C) 2005-2019 David Carlisle, LaTeX3 Project
+%% Copyright (C) 2005-2020 David Carlisle, LaTeX3 Project
%%
%% This file is part of the Standard LaTeX `Graphics Bundle'.
%% It may be distributed under the terms of the LaTeX Project Public
@@ -19,7 +19,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
- [2016/07/10 v1.1e Standard LaTeX Color (DPC)]
+ [2019/11/23 v1.2a Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
@@ -462,10 +462,10 @@
% correctly.
% \changes{v0.3a}{1994/07/20}
% {Stop command being \cs{long}, and make robust.}
-% \changes{v0.3l}{1995/12/07}
-% {Add \cs{leavevmode}}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\textcolor#1#{\@textcolor{#1}}
+\protected\def\textcolor#1#{\@textcolor{#1}}
\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
% \end{macrocode}
% \end{macro}
@@ -481,8 +481,10 @@
% {end the group even if the colour command generates an error}
% \changes{v0.3c}{1994/09/19}
% {Use \cs{color} to parse arguments}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\pagecolor{%
+\protected\def\pagecolor{%
\begingroup
\let\ignorespaces\endgroup
\let\set@color\set@page@color
@@ -497,8 +499,10 @@
%
% \changes{v1.1a}{2014/04/23}
% {add \cs{nopagecolor} graphics/3873}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\nopagecolor{%
+\protected\def\nopagecolor{%
\@ifundefined{no@page@color}{%
\PackageInfo{color}{\string\nopagecolor\space is not supported}%
}{%
@@ -533,8 +537,10 @@
% {New internal implementation of colour commands}
% \changes{v0.3f}{1994/10/04}
% {Give info about redefinitions}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\definecolor#1#2#3{%
+\protected\def\definecolor#1#2#3{%
\@ifundefined{color@#2}%
{\c@lor@error{model `#2'}}%
{\@ifundefined{\string\color @#1}{}%
@@ -589,8 +595,10 @@
% |[named]| all the time, just give the package option |usenames|, which
% will redefine |\DefineNamedColor|, so that the colour name is declared
% as a user-colour as well as a name in the `named' model.
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\DefineNamedColor#1#2#3#4{%
+\protected\def\DefineNamedColor#1#2#3#4{%
\@ifundefined{define@color@#1}%
{\c@lor@error{model `#1'}}%
{\@ifundefined{color@#3}%
@@ -684,8 +692,10 @@
% \changes{v0.2d}{1994/05/13}
% {Stop changing \cs{reset@font}. Use the new \cs{normalfont}
% instead.}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\normalcolor{\let\current@color\default@color\set@color}
+\protected\def\normalcolor{\let\current@color\default@color\set@color}
% \end{macrocode}
% \end{macro}
%
@@ -751,8 +761,10 @@
% colour specifies the \emph{background} colour of the box.
% \changes{v0.3b}{1994/09/14}
% {New implementation}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macrocode}
-\def\colorbox#1#{\color@box{#1}}
+\protected\def\colorbox#1#{\color@box{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -771,9 +783,11 @@
% colour model for both colours.
% \changes{v0.3b}{1994/09/14}
% {New implementation}
+% \changes{v1.2a}{2019/11/23}
+% {Add \cs{protected} gh/208}
% \begin{macro}{\fcolorbox}
% \begin{macrocode}
-\def\fcolorbox#1#{\color@fbox{#1}}
+\protected\def\fcolorbox#1#{\color@fbox{#1}}
% \end{macrocode}
%
% \begin{macrocode}