[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use l3color in l3coffins if available (1c51fa2a7)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Jul 20 12:29:02 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/1c51fa2a7505abaab07976047907808b7120d51e
>---------------------------------------------------------------
commit 1c51fa2a7505abaab07976047907808b7120d51e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Jul 20 11:29:02 2020 +0100
Use l3color in l3coffins if available
At present, this needs things to be delayed until
\AtBeginDocument: that will change once we integrate
l3color into the kernel.
>---------------------------------------------------------------
1c51fa2a7505abaab07976047907808b7120d51e
l3kernel/l3coffins.dtx | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/l3kernel/l3coffins.dtx b/l3kernel/l3coffins.dtx
index 8c9f29e93..46edd8d99 100644
--- a/l3kernel/l3coffins.dtx
+++ b/l3kernel/l3coffins.dtx
@@ -2242,8 +2242,20 @@
% \begin{macro}{\@@_color:n}
% Calls \tn{color}, and otherwise does nothing if \tn{color} is not defined.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_color:n #1
- { \cs_if_exist:NT \color { \color {#1} } }
+\cs_if_exist:NTF \AtBeginDocument
+ { \AtBeginDocument }
+ { \use:n }
+ {
+ \cs_new_protected:Npx \@@_color:n #1
+ {
+ \cs_if_exist:NTF \color_select:n
+ { \color_select:n {#1} }
+ {
+ \cs_if_exist:NT \color
+ { \exp_not:N \color {#1} }
+ }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.