[latex3-commits] [l3svn] branch master updated: Add \tracingfonts to known primitives

noreply at latex-project.org noreply at latex-project.org
Fri Mar 11 21:05:09 CET 2016


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  7b4ec71   Add \tracingfonts to known primitives
7b4ec71 is described below

commit 7b4ec719185228e0b87be6b928c3828eb98d06bd
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Mar 11 20:04:27 2016 +0000

    Add \tracingfonts to known primitives
    
    This one is a little tricky as it overlaps with a kernel
    name.
---
 l3kernel/l3names.dtx                    |   20 ++++++++++++++++++++
 l3kernel/testfiles/m3token004.tlg       |    9 ++++++---
 l3kernel/testfiles/m3token004.xetex.tlg |    6 +++---
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/l3kernel/l3names.dtx b/l3kernel/l3names.dtx
index 7fbcb14..b348254 100644
--- a/l3kernel/l3names.dtx
+++ b/l3kernel/l3names.dtx
@@ -903,6 +903,7 @@
   \__kernel_primitive:NN \saveboxresource             \pdftex_pdfxform:D
   \__kernel_primitive:NN \saveimageresource           \pdftex_pdfximage:D
   \__kernel_primitive:NN \setrandomseed               \pdftex_setrandomseed:D
+  \__kernel_primitive:NN \tracingfonts                \pdftex_tracingfonts:D
   \__kernel_primitive:NN \uniformdeviate              \pdftex_uniformdeviate:D
 %    \end{macrocode}
 % The set of Unicode math primitives were introduced by \XeTeX{} and \LuaTeX{}
@@ -1128,6 +1129,25 @@
   \tex_let:D \tex_input:D                \@@input
   \tex_let:D \tex_italiccorrection:D     \@@italiccorr
   \tex_let:D \tex_underline:D            \@@underline
+%    \end{macrocode}
+% Some tidying up is needed for \tn{(pdf)tracingfonts}. Newer \LuaTeX{} has
+% this simply as \tn{tracingfonts}, but that will have been overwritten by
+% the \LaTeXe{} kernel. So any spurious definition has to be removed, then
+% the real version saved either from the \pdfTeX{} name or from \LuaTeX{}.
+% In the latter case, we leave \tn{@@tracingfonts} available: this might
+% be useful and almost all \LaTeXe{} users will have \pkg{expl3} loaded by
+% \pkg{fontspec}. (We follow the usual kernel convention that |@@| is used
+% for saved primitives.)
+%   \begin{macrocode}
+  \tex_let:D \pdftex_tracingfonts:D \tex_undefined:D
+  \etex_ifdefined:D \pdftracingfonts
+    \tex_let:D \pdftex_tracingfonts:D \pdftracingfonts
+  \tex_else:D
+    \etex_ifdefined:D \luatex_directlua:D
+      \luatex_directlua:D { tex.enableprimitives("@@", {"tracingfonts"}) }
+      \tex_let:D \pdftex_tracingfonts:D \luatextracingfonts
+    \tex_fi:D
+  \tex_fi:D
 \tex_fi:D
 %    \end{macrocode}
 % That is also true for the \LuaTeX{} primitives under \LaTeXe{}
diff --git a/l3kernel/testfiles/m3token004.tlg b/l3kernel/testfiles/m3token004.tlg
index f4a43b1..b7ac723 100644
--- a/l3kernel/testfiles/m3token004.tlg
+++ b/l3kernel/testfiles/m3token004.tlg
@@ -11,15 +11,18 @@ T \end
 TEST 2: token_if_primitive, with usual escapechar
 ============================================================
 \g__file_internal_ior=\read1
-(l3names.def - end tex_end:D everydisplay everymath input underline) 
+(l3names.def - end tex_end:D everydisplay everymath input underline
+tracingfonts) 
 ============================================================
 ============================================================
 TEST 3: token_if_primitive, with unprintable escapechar
 ============================================================
-(l3names.def - end tex_end:D everydisplay everymath input underline) 
+(l3names.def - end tex_end:D everydisplay everymath input underline
+tracingfonts) 
 ============================================================
 ============================================================
 TEST 4: token_if_primitive, with space escapechar
 ============================================================
-(l3names.def - end tex_end:D everydisplay everymath input underline) 
+(l3names.def - end tex_end:D everydisplay everymath input underline
+tracingfonts) 
 ============================================================
diff --git a/l3kernel/testfiles/m3token004.xetex.tlg b/l3kernel/testfiles/m3token004.xetex.tlg
index c47bf8d..35610fa 100644
--- a/l3kernel/testfiles/m3token004.xetex.tlg
+++ b/l3kernel/testfiles/m3token004.xetex.tlg
@@ -12,17 +12,17 @@ TEST 2: token_if_primitive, with usual escapechar
 ============================================================
 \g__file_internal_ior=\read1
 (l3names.def - end tex_end:D everydisplay everymath input underline
-pdfmapfile pdfmapline) 
+pdfmapfile pdfmapline tracingfonts) 
 ============================================================
 ============================================================
 TEST 3: token_if_primitive, with unprintable escapechar
 ============================================================
 (l3names.def - end tex_end:D everydisplay everymath input underline
-pdfmapfile pdfmapline) 
+pdfmapfile pdfmapline tracingfonts) 
 ============================================================
 ============================================================
 TEST 4: token_if_primitive, with space escapechar
 ============================================================
 (l3names.def - end tex_end:D everydisplay everymath input underline
-pdfmapfile pdfmapline) 
+pdfmapfile pdfmapline tracingfonts) 
 ============================================================

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


More information about the latex3-commits mailing list