[latex3-commits] [l3svn] branch master updated: Ready driver code for minor adjustment to xetex.def

noreply at latex-project.org noreply at latex-project.org
Mon May 29 14:48:50 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  ea0b2d7   Ready driver code for minor adjustment to xetex.def
ea0b2d7 is described below

commit ea0b2d7a81a16f959b8f9c0697b916fbc22e1f93
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon May 29 13:48:29 2017 +0100

    Ready driver code for minor adjustment to xetex.def
---
 l3kernel/l3drivers.dtx |   22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 3793baa..75b1b5a 100644
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -1047,21 +1047,29 @@
 %
 % \begin{macro}[int]{\@@_color_ensure_current:}
 % \begin{macro}[aux]{\@@_color_reset:}
-%   The \LaTeXe{} driver uses \texttt{dvips}-like specials so there has to
-%   be a change of set up if \pkg{color} is loaded.
+%   Older \LaTeXe{} drivers uses \texttt{dvips}-like specials so there has to
+%   be a change of set up if \pkg{color} is loaded and if the current color
+%   doesn't match the pattern expected for |dvipdfmx|.
 %    \begin{macrocode}
 %<*package>
 \AtBeginDocument
   {
     \@ifpackageloaded { color }
       {
-        \cs_set_protected:Npn \@@_color_ensure_current:
+        \cs_set_protected:Npn \@@_tmp:w #1 [ #2 ] #3 \q_stop
           {
-            \tex_special:D { color~push~\l_@@_color_current_tl }
-            \group_insert_after:N \@@_color_reset:
+            \tl_if_empty:nT {#2}
+              {
+                \cs_set_protected:Npn \@@_color_ensure_current:
+                  {
+                    \tex_special:D { color~push~\l_@@_color_current_tl }
+                    \group_insert_after:N \@@_color_reset:
+                  }
+                \cs_set_protected:Npn \@@_color_reset:
+                  { \tex_special:D { color~pop } }
+              }
           }
-        \cs_set_protected:Npn \@@_color_reset:
-          { \tex_special:D { color~pop } }
+        \exp_after:wN \@@_tmp:w \current at color [ ] \q_stop
       }
       { }
   }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list