summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3names.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3names.dtx105
1 files changed, 73 insertions, 32 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
index 55b9165bfeb..b2e834d843c 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3names.dtx
@@ -33,13 +33,14 @@
%%
%% -----------------------------------------------------------------------
%
-%<*package>
-\RequirePackage{l3bootstrap}[2012/07/15]
-\GetIdInfo$Id: l3names.dtx 4640 2014-01-04 16:03:52Z joseph $
- {L3 Namespace for primitives}
-%</package>
%<*driver>
\documentclass[full]{l3doc}
+%</driver>
+%<*driver|package>
+\GetIdInfo$Id: l3names.dtx 4728 2014-05-04 13:25:37Z joseph $
+ {L3 Namespace for primitives}
+%</driver|package>
+%<*driver>
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -102,11 +103,9 @@
%<*initex|package>
% \end{macrocode}
%
+% No prefix substitution here.
% \begin{macrocode}
-%<*package>
-\ProvidesExplPackage
- {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
-%</package>
+%<@@=>
% \end{macrocode}
%
% The code here simply renames all of the primitives to new, internal,
@@ -596,8 +595,10 @@
\__kernel_primitive:NN \directlua \luatex_directlua:D
\__kernel_primitive:NN \initcatcodetable \luatex_initcatcodetable:D
\__kernel_primitive:NN \latelua \luatex_latelua:D
+ \__kernel_primitive:NN \luaescapestring \luatex_luaescapestring:D
\__kernel_primitive:NN \luatexversion \luatex_luatexversion:D
\__kernel_primitive:NN \savecatcodetable \luatex_savecatcodetable:D
+ \__kernel_primitive:NN \Uchar \luatex_Uchar:D
% \end{macrocode}
% Slightly more awkward are the directional primitives in \LuaTeX{}. These
% come from Omega \emph{via} Aleph, but we do not support those engines and
@@ -614,39 +615,79 @@
% \begin{macrocode}
\tex_endgroup:D
% \end{macrocode}
-%
+% If the underlying engine is Lua\TeX{} then the \tn{pdfstrcmp} primitive
+% is emulated as \cs{expl_pdfstrcmp} as part of the bootstrap process.
+% That can be detected as \cs{pdftex_strcmp:D} will not be defined: is
+% that is the case, copy the code and then remove the temporary emulation.
+% \begin{macrocode}
+\etex_ifdefined:D \pdftex_strcmp:D
+\tex_else:D
+ \tex_let:D \pdftex_strcmp:D \expl_pdfstrcmp
+ \tex_let:D \expl_pdfstrcmp \tex_undefined:D
+\tex_fi:D
+% \end{macrocode}
+%
% \LaTeXe{} will have moved a few primitives, so these are sorted out.
+% A convenient test for \LaTeXe{} is the \cs{@@end} saved primitive.
% \begin{macrocode}
%<*package>
-\tex_let:D \tex_end:D \@@end
-\tex_let:D \tex_everydisplay:D \frozen@everydisplay
-\tex_let:D \tex_everymath:D \frozen@everymath
-\tex_let:D \tex_hyphen:D \@@hyph
-\tex_let:D \tex_input:D \@@input
-\tex_let:D \tex_italiccorrection:D \@@italiccorr
-\tex_let:D \tex_underline:D \@@underline
+\etex_ifdefined:D \@@end
+ \tex_let:D \tex_end:D \@@end
+ \tex_let:D \tex_everydisplay:D \frozen@everydisplay
+ \tex_let:D \tex_everymath:D \frozen@everymath
+ \tex_let:D \tex_hyphen:D \@@hyph
+ \tex_let:D \tex_input:D \@@input
+ \tex_let:D \tex_italiccorrection:D \@@italiccorr
+ \tex_let:D \tex_underline:D \@@underline
% \end{macrocode}
-% That is also true for the \pkg{luatex} package for \LaTeXe{}.
+% That is also true for the \LuaTeX{} primitives under \LaTeXe{}.
% \begin{macrocode}
-\tex_let:D \luatex_catcodetable:D \luatexcatcodetable
-\tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable
-\tex_let:D \luatex_latelua:D \luatexlatelua
-\tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
+ \tex_let:D \luatex_catcodetable:D \luatexcatcodetable
+ \tex_let:D \luatex_initcatcodetable:D \luatexinitcatcodetable
+ \tex_let:D \luatex_latelua:D \luatexlatelua
+ \tex_let:D \luatex_luaescapestring:D \luatexluaescapestring
+ \tex_let:D \luatex_savecatcodetable:D \luatexsavecatcodetable
+ \tex_let:D \luatex_Uchar:D \luatexUchar
% \end{macrocode}
% Which also covers those slightly odd ones.
% \begin{macrocode}
-\tex_let:D \luatex_bodydir:D \luatexbodydir
-\tex_let:D \luatex_mathdir:D \luatexmathdir
-\tex_let:D \luatex_pagedir:D \luatexpagedir
-\tex_let:D \luatex_pardir:D \luatexpardir
-\tex_let:D \luatex_textdir:D \luatextextdir
+ \tex_let:D \luatex_bodydir:D \luatexbodydir
+ \tex_let:D \luatex_mathdir:D \luatexmathdir
+ \tex_let:D \luatex_pagedir:D \luatexpagedir
+ \tex_let:D \luatex_pardir:D \luatexpardir
+ \tex_let:D \luatex_textdir:D \luatextextdir
+\tex_fi:D
% \end{macrocode}
-% Finally, in package mode with \LuaTeX{} the \cs{pdfstrcmp} primitive will
-% be emulated as \cs{pdf@strcmp}.
+%
+% For Con\TeX{}t, two tests are needed. Both Mark~II and Mark~IV move several
+% primitives: these are all covered by the first test, again using \cs{end}
+% as a marker. For Mark~IV, a few more primitives are moved: they are
+% implemented using some Lua code in the current Con\TeX{}t.
% \begin{macrocode}
-\etex_ifdefined:D \pdftex_strcmp:D
-\tex_else:D
- \tex_let:D \pdftex_strcmp:D \pdf@strcmp
+\etex_ifdefined:D \normalend
+ \tex_let:D \tex_outer:D \normalouter
+ \tex_let:D \tex_input:D \normalinput
+ \tex_let:D \tex_end:D \normalend
+ \tex_let:D \tex_language:D \normallanguage
+ \tex_let:D \tex_vcenter:D \normalvcneter
+ \tex_let:D \tex_over:D \normalover
+ \tex_let:D \tex_mathop:D \normalmathop
+ \tex_let:D \tex_month:D \normalmonth
+ \tex_let:D \tex_everyjob:D \normaleveryjob
+ \tex_let:D \etex_unexpanded:D \normalunexpanded
+\tex_fi:D
+\etex_ifdefined:D \normalitaliccorrection
+ \tex_let:D \tex_hoffset:D \normalhoffset
+ \tex_let:D \tex_italiccorrection:D \normalitaliccorrection
+ \tex_let:D \tex_voffset:D \normalvoffset
+ \tex_let:D \etex_showtokens:D \normalshowtokens
+ \tex_let:D \luatex_bodydir:D \spac_directions_normal_body_dir
+ \tex_let:D \luatex_pagedir:D \spac_directions_normal_page_dir
+\tex_fi:D
+\etex_ifdefined:D \normalleft
+ \tex_let:D \tex_left:D \normalleft
+ \tex_let:D \tex_middle:D \normalmiddle
+ \tex_let:D \tex_right:D \normalright
\tex_fi:D
%</package>
% \end{macrocode}