summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx41
1 files changed, 35 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
index f15f704a2c9..66f51af2d2a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3bootstrap.dtx
@@ -145,7 +145,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
-\GetIdInfo$Id: l3bootstrap.dtx 5608 2015-05-20 15:29:10Z joseph $
+\GetIdInfo$Id: l3bootstrap.dtx 5634 2015-06-24 14:51:22Z joseph $
{L3 Bootstrap code}
%</driver|package>
%<*driver>
@@ -291,11 +291,40 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\else
- \directlua{tex.enableprimitives ('', tex.extraprimitives ( ))}
+ \directlua{tex.enableprimitives("", tex.extraprimitives())}
\fi
%</initex>
% \end{macrocode}
%
+% Depending on the versions available, the \LaTeX{} format may not have
+% the raw |\Umath| primitive names available. We fix that globally:
+% it should cause no issues. Older \LuaTeX{} versions do not have
+% a pre-built table of the primitive names here so sort one out
+% ourselves. These end up globally-defined but at that is true with
+% a newer format anyway and as they all start |\U| this should be
+% reasonably safe.
+% \begin{macrocode}
+%<*package>
+\begingroup
+ \expandafter\ifx\csname directlua\endcsname\relax
+ \else
+ \directlua{%
+ local i
+ local t = { }
+ for _,i in pairs(tex.extraprimitives("luatex")) do
+ if string.match(i,"^U") then
+ if not string.match(i,"^Uchar$") then
+ table.insert(t,i)
+ end
+ end
+ end
+ tex.enableprimitives("", t)
+ }%
+ \fi
+\endgroup
+%</package>
+% \end{macrocode}
+%
% \subsection{The \tn{pdfstrcmp} primitive with \XeTeX{} and \LuaTeX{}}
%
% Only \pdfTeX{} has a primitive called \tn{pdfstrcmp}. The \XeTeX{}
@@ -334,13 +363,13 @@
\def\tempa
{%
l3kernel = l3kernel or { }
- function l3kernel.strcmp (A, B)
+ function l3kernel.strcmp(A, B)
if A == B then
- tex.write ("0")
+ tex.write("0")
elseif A < B then
- tex.write ("-1")
+ tex.write("-1")
else
- tex.write ("1")
+ tex.write("1")
end
end
}