Skip to content

Commit

Permalink
unprotect \xcolor@
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Dec 10, 2023
1 parent dec409b commit 160bb9f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions dvips.def
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[2023/12/09 v3.2a Graphics/color driver for dvips]
\def\GPT@space{ }
\ifx\xcolor@\@undefined
\protected\def\xcolor@#1#2#3#4{#2}
\def\xcolor@#1#2#3#4{#2}
\fi
\def\c@lor@arg#1{%
\dimen@#1\p@
Expand All @@ -30,22 +30,22 @@
\fi}
\def\color@gray#1#2{%
\c@lor@arg{#2}%
\edef#1{\xcolor@{}{gray #2}{\detokenize{gray}}{#2}}%
\edef#1{\noexpand\xcolor@{}{gray #2}{\detokenize{gray}}{#2}}%
}
\def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
\def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
\c@lor@arg{#4}%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#5{\xcolor@{}{cmyk #1 #2 #3 #4}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
\edef#5{\noexpand\xcolor@{}{cmyk #1 #2 #3 #4}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
}
\def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
\def\c@lor@@rgb#1,#2,#3\@@#4{%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#4{\xcolor@{}{rgb #1 #2 #3}{\detokenize{rgb}}{#1,#2,#3}}%
\edef#4{\noexpand\xcolor@{}{rgb #1 #2 #3}{\detokenize{rgb}}{#1,#2,#3}}%
}
\def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
\def\c@lor@@RGB#1,#2,#3\@@#4{%
Expand All @@ -63,7 +63,7 @@
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#4{\xcolor@{}{hsb #1 #2 #3}{\detokenize{hsb}}{#1,#2,#3}}%
\edef#4{\noexpand\xcolor@{}{hsb #1 #2 #3}{\detokenize{hsb}}{#1,#2,#3}}%
}
\def\color@named#1#2{\c@lor@@named#2,,\@@#1}
\def\c@lor@@named#1,#2,#3\@@#4{%
Expand Down
8 changes: 4 additions & 4 deletions luatex.def
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[2023/12/09 v1.3a Graphics/color driver for luatex]
\def\GPT@space{ }
\ifx\xcolor@\@undefined
\protected\def\xcolor@#1#2#3#4{#2}
\def\xcolor@#1#2#3#4{#2}
\fi
\def\c@lor@arg#1{%
\dimen@#1\p@
Expand All @@ -33,22 +33,22 @@
\fi}
\def\color@gray#1#2{%
\c@lor@arg{#2}%
\edef#1{\xcolor@{}{#2 g #2 G}{\detokenize{gray}}{#2}}%
\edef#1{\noexpand\xcolor@{}{#2 g #2 G}{\detokenize{gray}}{#2}}%
}
\def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
\def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
\c@lor@arg{#4}%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#5{\xcolor@{}{#1 #2 #3 #4 k #1 #2 #3 #4 K}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
\edef#5{\noexpand\xcolor@{}{#1 #2 #3 #4 k #1 #2 #3 #4 K}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
}
\def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
\def\c@lor@@rgb#1,#2,#3\@@#4{%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#4{\xcolor@{}{#1 #2 #3 rg #1 #2 #3 RG}{\detokenize{rgb}}{#1,#2,#3}}%
\edef#4{\noexpand\xcolor@{}{#1 #2 #3 rg #1 #2 #3 RG}{\detokenize{rgb}}{#1,#2,#3}}%
}
\def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
\def\c@lor@@RGB#1,#2,#3\@@#4{%
Expand Down
8 changes: 4 additions & 4 deletions pdftex.def
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[2023/12/09 v1.3a Graphics/color driver for pdftex]
\def\GPT@space{ }
\ifx\xcolor@\@undefined
\protected\def\xcolor@#1#2#3#4{#2}
\def\xcolor@#1#2#3#4{#2}
\fi
\def\c@lor@arg#1{%
\dimen@#1\p@
Expand All @@ -33,22 +33,22 @@
\fi}
\def\color@gray#1#2{%
\c@lor@arg{#2}%
\edef#1{\xcolor@{}{#2 g #2 G}{\detokenize{gray}}{#2}}%
\edef#1{\noexpand\xcolor@{}{#2 g #2 G}{\detokenize{gray}}{#2}}%
}
\def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
\def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
\c@lor@arg{#4}%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#5{\xcolor@{}{#1 #2 #3 #4 k #1 #2 #3 #4 K}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
\edef#5{\noexpand\xcolor@{}{#1 #2 #3 #4 k #1 #2 #3 #4 K}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
}
\def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
\def\c@lor@@rgb#1,#2,#3\@@#4{%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#4{\xcolor@{}{#1 #2 #3 rg #1 #2 #3 RG}{\detokenize{rgb}}{#1,#2,#3}}%
\edef#4{\noexpand\xcolor@{}{#1 #2 #3 rg #1 #2 #3 RG}{\detokenize{rgb}}{#1,#2,#3}}%
}
\def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
\def\c@lor@@RGB#1,#2,#3\@@#4{%
Expand Down
10 changes: 5 additions & 5 deletions xetex.def
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[2023/12/09 v5.1a Graphics/color driver for xetex]
\def\GPT@space{ }
\ifx\xcolor@\@undefined
\protected\def\xcolor@#1#2#3#4{#2}
\def\xcolor@#1#2#3#4{#2}
\fi
\def\c@lor@arg#1{%
\dimen@#1\p@
Expand All @@ -30,22 +30,22 @@
\fi}
\def\color@gray#1#2{%
\c@lor@arg{#2}%
\edef#1{\xcolor@{}{gray #2}{\detokenize{gray}}{#2}}%
\edef#1{\noexpand\xcolor@{}{gray #2}{\detokenize{gray}}{#2}}%
}
\def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
\def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
\c@lor@arg{#4}%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#5{\xcolor@{}{cmyk #1 #2 #3 #4}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
\edef#5{\noexpand\xcolor@{}{cmyk #1 #2 #3 #4}{\detokenize{cmyk}}{#1,#2,#3,#4}}%
}
\def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
\def\c@lor@@rgb#1,#2,#3\@@#4{%
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#4{\xcolor@{}{rgb #1 #2 #3}{\detokenize{rgb}}{#1,#2,#3}}%
\edef#4{\noexpand\xcolor@{}{rgb #1 #2 #3}{\detokenize{rgb}}{#1,#2,#3}}%
}
\def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
\def\c@lor@@RGB#1,#2,#3\@@#4{%
Expand All @@ -63,7 +63,7 @@
\c@lor@arg{#1}%
\c@lor@arg{#2}%
\c@lor@arg{#3}%
\edef#4{\xcolor@{}{hsb #1 #2 #3}{\detokenize{hsb}}{#1,#2,#3}}%
\edef#4{\noexpand\xcolor@{}{hsb #1 #2 #3}{\detokenize{hsb}}{#1,#2,#3}}%
}
\def\color@named#1#2{\c@lor@@named#2,,\@@#1}
\def\c@lor@@named#1,#2,#3\@@#4{%
Expand Down

0 comments on commit 160bb9f

Please sign in to comment.