summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-14 21:07:53 +0000
committerKarl Berry <karl@freefriends.org>2017-11-14 21:07:53 +0000
commit8c82df0007c957004cc2268b49ccf3ceca914f58 (patch)
treeae29044a1727ceb31a488437f43cde1a31e6e007 /Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
parent4bd2a337b834181c967e774caddf57b3f747e127 (diff)
l3 (14nov17)
git-svn-id: svn://tug.org/texlive/trunk@45802 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3dvips.def')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3dvips.def37
1 files changed, 31 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
index eed9fcf2658..046edf1d5a7 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3dvips.def
@@ -22,20 +22,45 @@
\ProvidesExplFile
{l3dvips.def}{2017/03/18}{}
{L3 Experimental driver: dvips}
+\cs_new_protected:Npn \__driver_color_pickup:N #1 { }
\AtBeginDocument
{
\@ifpackageloaded { color }
{
- \cs_new_protected:Npn \__driver_color_pickup:
- { \tl_set:Nx \l__color_current_tl { \current@color } }
+ \cs_set_protected:Npn \__driver_color_pickup:N #1
+ {
+ \exp_args:NV \tl_if_head_is_space:nTF \current@color
+ {
+ \tl_set:Nx #1
+ {
+ spot ~
+ \exp_after:wN \use:n \current@color \c_space_tl 1
+ }
+ }
+ { \exp_after:wN \__driver_color_pickup_aux:w \current@color \q_stop #1 }
+ }
+ \cs_new_protected:Npn \__driver_color_pickup_aux:w #1 ~ #2 \q_stop #3
+ { \tl_set:Nn #3 { #1 ~ #2 } }
}
- { \cs_new_protected:Npn \__driver_color_pickup: { } }
+ { }
}
-\cs_new_protected:Npn \__driver_color_ensure_current:
+\cs_new_protected:Npn \__driver_color_select:n #1
{
- \__driver_color_pickup:
- \tex_special:D { color~push~\l__color_current_tl }
+ \tex_special:D
+ {
+ color~push~
+ \cs_if_exist_use:cF
+ { __driver_color_convert_ \__driver_convert_model:w #1 \q_stop :n }
+ { \use:n }
+ {#1}
+ }
}
+\cs_generate_variant:Nn \__driver_color_select:n { V }
+\cs_new:Npn \__driver_convert_model:w #1 ~ #2 \q_stop {#1}
+\cs_new:Npn \__driver_color_convert_spot:n #1
+ { \__driver_color_convert_spot:w #1 \q_stop }
+\cs_new:Npn \__driver_color_convert_spot:w #1 ~ #2 ~ #3 \q_stop
+ { \c_space_tl #2 }
\cs_new_protected:Npn \__driver_color_reset:
{ \tex_special:D { color~pop } }
\cs_new_protected:Npn \__driver_literal:n #1