summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-22 22:26:34 +0000
committerKarl Berry <karl@freefriends.org>2015-09-22 22:26:34 +0000
commit834fbf692e502b3f10cee9adcbb9d7833874b8c5 (patch)
tree6f0cfc2a8476bd9696f71083cefa988bf52930dc /Master/texmf-dist
parentaa040bf06e9ffb30895fc92178a8f1aa44fda1de (diff)
lualatex-math (22sep15)
git-svn-id: svn://tug.org/texlive/trunk@38436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST23
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math-de.pdfbin79513 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdfbin205673 -> 198032 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.pdfbin62019 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma-unicode.pdfbin4528 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma.pdfbin17267 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-alloc.pdfbin15889 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-style.pdfbin29757 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.pdfbin29834 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.pdfbin3912 -> 0 bytes
-rw-r--r--Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx286
-rw-r--r--Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.ins1
-rw-r--r--Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua7
-rw-r--r--Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty81
14 files changed, 106 insertions, 292 deletions
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST b/Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST
new file mode 100644
index 00000000000..51b5eeab06d
--- /dev/null
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/MANIFEST
@@ -0,0 +1,23 @@
+This work consists of the non-derived files
+
+README
+README.rst
+MANIFEST
+Makefile
+lualatex-math.dtx
+lualatex-math.ins
+lualatex-math.el
+
+and the derived files
+
+lualatex-math.sty
+lualatex-math.lua
+test-kernel-style.tex
+test-amsmath.tex
+test-unicode.tex
+test-icomma.tex
+test-icomma-unicode.tex
+lualatex-math.drv
+lualatex-math-de.drv
+lualatex-math.pdf
+lualatex-math-de.pdf
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math-de.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math-de.pdf
deleted file mode 100644
index 33face4e6a5..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math-de.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf
index 1d5aa43bccf..9f7f16f250b 100644
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf
+++ b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.pdf
deleted file mode 100644
index bb6ff362c66..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-amsmath.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma-unicode.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma-unicode.pdf
deleted file mode 100644
index 3180400e688..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma-unicode.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma.pdf
deleted file mode 100644
index f9198ece1be..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-icomma.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-alloc.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-alloc.pdf
deleted file mode 100644
index 0f363d9748a..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-alloc.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-style.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-style.pdf
deleted file mode 100644
index acee933d16d..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel-style.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.pdf
deleted file mode 100644
index ec3d5aadb03..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-kernel.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.pdf
deleted file mode 100644
index 33150568af3..00000000000
--- a/Master/texmf-dist/doc/lualatex/lualatex-math/test-unicode.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx b/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx
index 5521bf077d2..8ab515ed55b 100644
--- a/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx
+++ b/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 2011–2014 by Philipp Stephani
+% Copyright 2011–2015 by Philipp Stephani
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -37,7 +37,7 @@
%</driver>
% \fi
%
-% \CheckSum{965}
+% \CheckSum{868}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -173,8 +173,8 @@
% cannot be controlled. As a matter of course, the \thispackage package
% needs \hologo{LuaLaTeX} to function; it will produce error messages and
% refuse to load under other engines and formats. The package depends on the
-% \pkg{expl3} bundle, the \pkg{etoolbox} package, the \pkg{luatexbase} bundle
-% and the \pkg{filehook} package. The \thispackage package is independent of
+% \pkg{expl3} bundle, the \pkg{etoolbox} package and the
+% \pkg{filehook} package. The \thispackage package is independent of
% the \pkg{unicode-math} package; the fixes provided here are valid for both
% Unicode and legacy math typesetting.
%
@@ -187,8 +187,8 @@
% usual with \hologo{LaTeX}.
%
% One user-visible change is that the new
-% \DescribeMacros{\mathstyle\luatexmathstyle}\cmd{\mathstyle} primitive
-% (usually called \cmd{\luatexmathstyle} in \hologo{LuaLaTeX}) should work in
+% \DescribeMacros{\mathstyle}\cmd{\mathstyle} primitive
+% should work in
% all cases after the \thispackage package has been loaded, provided you use
% the high-level macros \DescribeMacros{\frac\binom\genfrac}\cmd{\frac},
% \cmd{\binom}, and \cmd{\genfrac}. The fraction-like \hologo{TeX}
@@ -206,8 +206,8 @@
% sobald das Paket geladen wird. Selbstverständlich funktioniert das
% \thispackage-Paket nur unter \hologo{LuaLaTeX}; für andere Engines oder
% Formate bricht das Laden mit einer Fehlermeldung ab. Das Paket hängt von
-% der \pkg{expl3}-Sammlung, dem \pkg{etoolbox}-Paket, der
-% \pkg{luatexbase}-Sammlung und dem \pkg{filehook}-Paket ab. Das
+% der \pkg{expl3}-Sammlung, dem \pkg{etoolbox}-Paket
+% und dem \pkg{filehook}-Paket ab. Das
% \thispackage-Paket ist unabhängig vom \pkg{unicode-math}-Paket; die hier
% zur Verfügung gestellten Korrekturen sind sowohl für Unicode"~ als auch für
% herkömmlichen Mathematiksatz gültig.
@@ -221,8 +221,8 @@
% werden, lädst, können Probleme auftreten, wie bei \hologo{LaTeX} üblich.
%
% Eine für den Benutzer sichtbare Änderung besteht darin, dass der neue
-% primitive Befehl \DescribeMacros{\mathstyle\luatexmathstyle}|\mathstyle|
-% (in \hologo{LuaLaTeX} allgemein als |\luatexmathstyle| bekannt) in allen
+% primitive Befehl \DescribeMacros{\mathstyle}|\mathstyle|
+% in allen
% Fällen funktionieren sollte, nachdem \thispackage geladen wurde, unter der
% Bedingung, dass die High-Level-Makros
% \DescribeMacros{\frac\binom\genfrac}|\frac|, |\binom| und |\genfrac|
@@ -236,6 +236,11 @@
%
%
% \section{Implementation of the \hologo{LaTeX2e} package}
+%
+% \changes{v1.4a}{2015/08/24}{Use \pkg{expl3} versions of \hologo{LuaTeX}
+% math primitives}
+% \changes{v1.4a}{2015/08/24}{Avoid \cs{RequireLuaModule}}
+% \changes{v1.4a}{2015/09/16}{Load \pkg{luatexbase} only if required}
%
% \subsection{Requirements}
%
@@ -243,13 +248,14 @@
%<*package>
%<@@=lltxmath>
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\RequirePackage{expl3}[2012/08/14]
-\ProvidesExplPackage{lualatex-math}{2014/08/18}{1.4}%
+\RequirePackage{expl3}[2015/09/07]
+\ProvidesExplPackage{lualatex-math}{2015/09/22}{1.4a}%
{Patches for mathematics typesetting with LuaLaTeX}
\RequirePackage { etoolbox } [ 2007/10/08 ]
-\RequirePackage { luatexbase } [ 2010/05/27 ]
+\cs_if_exist:NF \newluabytecode
+ { \RequirePackage { luatexbase } [ 2010/05/27 ] }
\RequirePackage { filehook } [ 2011/03/09 ]
-\RequireLuaModule { lualatex-math } [ 2013/08/03 ]
+\directlua{require("lualatex-math")}
% \end{macrocode}
%
% \begin{macro}{\@@_restore_catcode:N}
@@ -286,22 +292,6 @@
% \end{macrocode}
% \end{l3message}
%
-% \begin{l3message}{different-meanings}
-% Issued when two control sequences have different meanings, but should not.
-% \begin{macrocode}
-\msg_new:nnnn { lualatex-math } { different-meanings } {
- I've~ expected~ the~ control~ sequences \\
- #1~ and~ #3 \\
- to~ have~ the~ same~ meaning,~ but~ their~ meanings~ are~ different.
-} {
- The~ meaning~ of~ #1~ is: \\
- #2 \\
- The~ meaning~ of~ #3~ is: \\
- #4
-}
-% \end{macrocode}
-% \end{l3message}
-%
% \begin{l3message}{macro-expected}
% Issued when trying to patch a non-macro. The first argument must be the
% detokenized macro name.
@@ -341,16 +331,14 @@
% \subsection{Initialization}
%
% Unless we are running under \hologo{LuaTeX}, we issue an error and quit
-% immediately. Loading the \pkg{luatexbase} module will already have produced
-% an error, but we issue another one for clarity.
+% immediately.
% \begin{macrocode}
-\luatex_if_engine:F {
+\sys_if_engine_luatex:F {
\msg_error:nn { lualatex-math } { luatex-required }
\endinput
}
% \end{macrocode}
%
-%
% \subsection{Patching}
%
% \begin{macro}{\@@_temp:w}
@@ -360,37 +348,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\luatexUmathcode}
-% \begin{macro}{\luatexUmathcodenum}
-% \begin{macro}{\luatexUmathchardef}
-% We need the extended versions of \cmd{\mathcode} and \cmd{\mathchardef}.
-% The command \cmd{\luatexbase@ensure@primitive}\marg{name} makes sure that
-% the \hologo{LuaTeX} primitive \cs{\meta{name}} is available under the
-% qualified name \cs{luatex\meta{name}}.
-% \begin{macrocode}
-\luatexbase@ensure@primitive { Umathcode }
-\luatexbase@ensure@primitive { Umathcodenum }
-\luatexbase@ensure@primitive { Umathchardef }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@@_assert_eq:NN}
-% The macro \cmd{\@@_assert_eq:NN}\meta{first command}\meta{second command}
-% tests whether the control sequences \meta{first command} and \meta{second
-% command} have the same meaning, and prints an error message if they do not.
-% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_assert_eq:NN #1 #2 {
- \cs_if_eq:NNF #1 #2 {
- \msg_error:nnxxxx { lualatex-math } { different-meanings }
- { \token_to_str:N #1 } { \token_to_meaning:N #1 }
- { \token_to_str:N #2 } { \token_to_meaning:N #2 }
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_patch:NNnnn}
% \begin{macro}{\@@_patch:cNnnn}
% The auxiliary macro \cmd{\@@_patch:NNnnn}\meta{command}\meta{factory
@@ -443,10 +400,11 @@
% used here}
% \changes{v1.3a}{2014/06/18}{\pkg{l3kernel} has (currently) dropped
% \cs{lua_now_x:n}}
+% \changes{v1.4a}{2015/08/24}{\cs{lua_now_x:n} is back}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_set_mathchar:NN #1 #2 {
- \luatexUmathchardef #1
- \luatex_directlua:D {
+ \utex_mathchardef:D #1
+ \lua_now_x:n {
lualatex.math.print_class_fam_slot( \int_eval:n { `#2 } )
}
\scan_stop:
@@ -459,37 +417,8 @@
%
% \changes{v0.3}{2011/08/07}{Patched math group allocation to gain access to
% all families}
-% In \hologo{LuaTeX}, we have 256 math families at our disposal. Therefore we
-% modify the \hologo{LaTeX} allocation macros \cmd{\newfam} and
-% \cmd{\new@mathgroup} accordingly.
-%
-% First we test whether \cmd{\newfam} and \cmd{\new@mathgroup} are equal.
-% \begin{macrocode}
-\@@_assert_eq:NN \newfam \new@mathgroup
-% \end{macrocode}
-%
-% \begin{macro}{\new@mathgroup}
-% It is enough to modify the maximum number of families known to the
-% allocation system; the macro \cmd{\alloc@} takes care of the rest. This
-% would work even if the \pkg{etex} package weren’t loaded.
-% \begin{macrocode}
-\@@_patch:NNnnn \new@mathgroup \cs_set_nopar:Npn { } {
-%<@@=>
- \alloc@ 8 \mathgroup \chardef \sixt@@n
-%<@@=lltxmath>
-} {
- \alloc@ 8 \mathgroup \chardef \c_two_hundred_fifty_six
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newfam}
-% We have to reset \cmd{\newfam} to equal \cmd{\new@mathgroup}.
-% \begin{macrocode}
-\cs_set_eq:NN \newfam \new@mathgroup
-% \end{macrocode}
-% \end{macro}
-%
+% \changes{v1.4}{2015/04/04}{Removed patch for math group allocation; the
+% kernel itself now supports all available math families}
% \Hologo{LuaTeX} enables access to the current mathematical style via the
% \cmd{\mathstyle} primitive. For this to work, fraction-like constructs (\eg,
% \meta{numerator} \cmd{\over} \meta{denominator}) have to be enclosed in a
@@ -497,14 +426,6 @@
% \hologo{plainTeX} remnants \cmd{\choose}, \cmd{\brack} and \cmd{\brace}
% should be discouraged.
%
-% \begin{macro}{\luatexUstack}
-% First we make sure that we can use the \cmd{\Ustack} primitive (under the
-% name \cmd{\luatexUstack}).
-% \begin{macrocode}
-\luatexbase@ensure@primitive { Ustack }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\frac}
% Here we assume that nobody except \pkg{amsmath} redefines \cmd{\frac}.
% This is obviously not the case, but we ignore other packages (\eg,
@@ -523,7 +444,7 @@
% To do: do we need the additional set of braces around \cmd{\Ustack}?
% \begin{macrocode}
{
- \luatexUstack { \group_begin: #1 \group_end: \over #2 }
+ \utex_stack:D { \group_begin: #1 \group_end: \over #2 }
}
}
}
@@ -545,34 +466,6 @@
% \cmd{\Ustack} primitive.
% \end{itemize}
%
-% \begin{macro}{\luatexalignmark}
-% \begin{macro}{\luatexUstartmath}
-% \begin{macro}{\luatexUstopmath}
-% We use the primitives corresponding to the alignment mark (\verb+#+) and to
-% the inline math switches; this is more semantical and might lead to better
-% error messages.
-% \begin{macrocode}
-\luatexbase@ensure@primitive { alignmark }
-\luatexbase@ensure@primitive { Ustartmath }
-\luatexbase@ensure@primitive { Ustopmath }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\luatexUmathstacknumup}
-% \begin{macro}{\luatexUmathstackdenomdown}
-% \begin{macro}{\luatexUmathstackvgap}
-% Now we require the font parameters we will use.
-% \begin{macrocode}
-\luatexbase@ensure@primitive { Umathstacknumup }
-\luatexbase@ensure@primitive { Umathstackdenomdown }
-\luatexbase@ensure@primitive { Umathstackvgap }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{\c_@@_std_minus_mathcode_int}
% \begin{macro}{\c_@@_std_equal_mathcode_int}
% These constants contain the standard \hologo{TeX} mathematical codes for
@@ -600,7 +493,7 @@
% \begin{macrocode}
\cs_new_nopar:Npn \@@_char_dim:NN #1 #2 {
#1 \textfont
- \luatex_directlua:D {
+ \lua_now_x:n {
lualatex.math.print_fam_slot( \int_eval:n { `#2 } )
}
}
@@ -645,8 +538,8 @@
% \end{macro}
% Finally, we restore the original mathematical codes of the two signs.
% \begin{macrocode}
- \luatexUmathcodenum `\- \l_@@_minus_mathchar
- \luatexUmathcodenum `\= \l_@@_equal_mathchar
+ \utex_mathcodenum:D `\- \l_@@_minus_mathchar
+ \utex_mathcodenum:D `\= \l_@@_equal_mathchar
}
}
% \end{macrocode}
@@ -733,19 +626,19 @@
\restore@math@cr
\default@tag
\skip_set:Nn \baselineskip {
- \luatexUmathstacknumup \scriptstyle
- + \luatexUmathstackdenomdown \scriptstyle
+ \utex_stacknumup:D \scriptstyle
+ + \utex_stackdenomdown:D \scriptstyle
}
- \lineskip \luatexUmathstackvgap \scriptstyle
+ \lineskip \utex_stackvgap:D \scriptstyle
\lineskiplimit \lineskip
\ialign
\c_group_begin_token
\token_if_eq_meaning:NNT c #1 { \hfil }
- \luatexUstartmath
+ \utex_startmath:D
\m@th
\scriptstyle
- \luatexalignmark \luatexalignmark
- \luatexUstopmath
+ \luatex_alignmark:D \luatex_alignmark:D
+ \utex_stopmath:D
\hfil
\crcr
}
@@ -763,7 +656,7 @@
}
} {
{
- \luatexUstack { \group_begin: #1 \group_end: \@@over #2 }
+ \utex_stack:D { \group_begin: #1 \group_end: \@@over #2 }
%<@@=lltxmath>
}
}
@@ -782,7 +675,7 @@
} {
{
#1 {
- \luatexUstack {
+ \utex_stack:D {
\group_begin: #4 \group_end: #2 #3 \scan_stop: #5
}
}
@@ -822,7 +715,7 @@
\char_set_mathcode:nn { `\' } { 39 }
\char_set_mathcode:nn { `\* } { 42 }
\char_set_mathcode:nn { `\. } { "613A }
- \int_compare:nNnF { \luatexUmathcodenum `\- } = { 45 } {
+ \int_compare:nNnF { \utex_mathcodenum:D `\- } = { 45 } {
\@@_set_mathchar:NN \std@minus \-
}
\char_set_mathcode:nn { `\- } { 45 }
@@ -841,23 +734,6 @@
% internal version use a hack involving a null radical. \Hologo{LuaTeX} has
% primitives for setting material in cramped mode, so we make use of them.
%
-% \begin{macro}{\luatexcrampeddisplaystyle}
-% \begin{macro}{\luatexcrampedtextstyle}
-% \begin{macro}{\luatexcrampedscriptstyle}
-% \begin{macro}{\luatexcrampedscriptscriptstyle}
-% First we make sure that the needed primitives for cramped styles are
-% available.
-% \begin{macrocode}
-\luatexbase@ensure@primitive { crampeddisplaystyle }
-\luatexbase@ensure@primitive { crampedtextstyle }
-\luatexbase@ensure@primitive { crampedscriptstyle }
-\luatexbase@ensure@primitive { crampedscriptscriptstyle }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{\MT_cramped_internal:Nn}
% The macro \cmd{\MT_cramped_internal:Nn}\meta{style}\marg{expression}
% typesets the \meta{expression} in the cramped style corresponding to the
@@ -908,7 +784,7 @@
% \begin{macrocode}
{
\ensuremath {
- \use:c { luatexcramped \cs_to_str:N #1 } #2
+ \use:c { luatex_cramped \cs_to_str:N #1 :D } #2
}
}
}
@@ -946,13 +822,12 @@
%
% For the Lua module, we use the standard \pkg{luatexbase-modutils} template.
% \changes{v1.3}{2013/08/03}{Stop using the deprecated \func{module} function}
+% \changes{v1.4a}{2015/08/24}{Load all of \pkg{luatexbase}}
% \begin{macrocode}
%<*lua>
-require("luatexbase.modutils")
-require("luatexbase.cctb")
lualatex = lualatex or {}
lualatex.math = lualatex.math or {}
-local err, warn, info, log = luatexbase.provides_module({
+luatexbase.provides_module({
name = "lualatex-math",
date = "2013/08/03",
version = 1.3,
@@ -970,8 +845,11 @@ local err, warn, info, log = luatexbase.provides_module({
local unpack = unpack or table.unpack
% \end{macrocode}
% \end{function}
+% \changes{v1.4a}{2015/08/24}{Pcik up new name for string catcode table
+% where available}
% \begin{macrocode}
-local cctb = luatexbase.catcodetables
+local cctb = luatexbase.catcodetables or
+ {string = luatexbase.registernumber("catcodetable@string")}
% \end{macrocode}
%
% \begin{function}{print_fam_slot}
@@ -1013,7 +891,7 @@ return lualatex.math
%
% \section{Test files}
%
-% Finally six small test files—but not a real test suite.
+% Finally a few small test files—but not a real test suite.
%
%
% \subsection{Common definitions}
@@ -1204,7 +1082,7 @@ return lualatex.math
% \meta{expression}.
% \begin{macrocode}
\NewDocumentCommand \AssertMathStyle { m } {
- \AssertIntEqual { \luatexmathstyle } { #1 }
+ \AssertIntEqual { \luatex_mathstyle:D } { #1 }
}
% \end{macrocode}
% \end{macro}
@@ -1216,14 +1094,14 @@ return lualatex.math
% argument specification \texttt{n}.
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_assert_cramped:Nx #1 #2 {
- \int_set:Nn \l_@@_tmpa_int { \luatexmathstyle }
+ \int_set:Nn \l_@@_tmpa_int { \luatex_mathstyle:D }
\bool_if:nTF {
\int_compare_p:nNn { \l_@@_tmpa_int } > { \c_minus_one }
&&
#1 { \l_@@_tmpa_int }
} {
\@@_pass:x {
- \exp_not:N \luatexmathstyle
+ \exp_not:N \luatex_mathstyle:D
\c_@@_equal_tl
\int_use:N \l_@@_tmpa_int
\c_space_tl
@@ -1231,7 +1109,7 @@ return lualatex.math
}
} {
\@@_fail:x {
- \exp_not:N \luatexmathstyle
+ \exp_not:N \luatex_mathstyle:D
\c_@@_equal_tl
\int_use:N \l_@@_tmpa_int
\c_space_tl
@@ -1325,7 +1203,7 @@ end
\NewDocumentCommand \AssertNoSpace { s m } {
\hbox_set:Nn \l_@@_tmpa_box { #2 }
\int_if_odd:nTF {
- \luatex_directlua:D {
+ \lua_now_x:n {
local~ b = tex.getbox(\int_use:N \l_@@_tmpa_box)
if~ contains_space(b.head,
\IfBooleanTF { #1 } { "nonzero" } { nil }) then~
@@ -1363,7 +1241,7 @@ end
\hbox_set:Nn \l_@@_tmpa_box { #1 }
\hbox_set:Nn \l_@@_tmpb_box { $ \mskip #2 \m@th $ }
\int_if_odd:nTF {
- \luatex_directlua:D {
+ \lua_now_x:n {
local~ b = tex.getbox(\int_use:N \l_@@_tmpa_box)
local~ s = tex.getbox(\int_use:N \l_@@_tmpb_box)
if~ contains_space(b.head, s.width) then~
@@ -1393,62 +1271,12 @@ end
% \end{macro}
%
%
-% \subsection{\Hologo{LaTeX2e} kernel, allocation of math families}
-%
% \changes{v0.3}{2011/08/07}{Added test file for modified family allocation
% scheme}
-% The \hologo{LaTeX2e} kernel itself allocates four families (also known as
-% \enquote{math groups} in \hologo{LaTeX} parlance). Therefore we should still
-% be able to allocate 252 families. We do this alternately with \cmd{\newfam},
-% \cmd{\new@mathgroup} and \cmd{\DeclareSymbolFont}.
+% \changes{v1.4}{2015/04/04}{Removed test file for modified family allocation
+% scheme}
% \changes{v1.2}{2013/01/13}{Replace removed macro \cs{chk_if_free_cs:N}}
% \changes{v1.2}{2013/01/13}{Track renaming of \cs{int_step_inline:nnnn}}
-% \begin{macrocode}
-%<*test-kernel-alloc>
-\usepackage{lualatex-math}
-\makeatletter
-\ExplSyntaxOn
-\int_step_inline:nnnn { \c_four } { \c_one } {
- \c_two_hundred_fifty_five - \c_one
-} {
- \int_case:nnn { \int_mod:nn { #1 } { \c_three } } {
- { \c_zero } {
- \int_new:N \g_@@_family_int
- \newfam \g_@@_family_int
- \AssertIntEqual { \g_@@_family_int } { #1 }
- \cs_undefine:N \g_@@_family_int
- }
- { \c_one } {
- \int_new:N \g_@@_mathgroup_int
- \new@mathgroup \g_@@_mathgroup_int
- \AssertIntEqual { \g_@@_mathgroup_int } { #1 }
- \cs_undefine:N \g_@@_mathgroup_int
- }
- { \c_two } {
- \DeclareSymbolFont { Test #1 } { OT1 } { cmr } { m } { n }
- \exp_args:Nc \AssertIntEqual { sym Test #1 } { #1 }
- }
- } {
- \@@_fail:x { This~ cannot~ happen }
- }
-}
-\DeclareSymbolFont { Test 255 } { OT1 } { cmr } { bx } { it }
-\DeclareSymbolFontAlphabet { \TestAlphabet } { Test 255 }
-\exp_args:Nc \AssertIntEqual { sym Test 255 }
- { \c_two_hundred_fifty_five }
-\ExplSyntaxOff
-\makeatother
-\begin{document}
-\[
-\TestAlphabet{
- abc
- \AssertIntEqual{\fam}{255}
- \AssertIntEqual{\mathgroup}{255}
-}
-\]
-\end{document}
-%</test-kernel-alloc>
-% \end{macrocode}
%
%
% \subsection{\Hologo{LaTeX2e} kernel, \cs{mathstyle} primitive}
@@ -1458,6 +1286,7 @@ end
% \begin{macrocode}
%<*test-kernel-style>
\usepackage{lualatex-math}
+\directlua{tex.enableprimitives("luatex",tex.extraprimitives("luatex"))}
\begin{document}
\begin{displaymath}
\AssertMathStyle{0} \sqrt{\AssertMathStyle{1}}
@@ -1510,6 +1339,7 @@ end
% \begin{macrocode}
%<*test-amsmath>
\usepackage{lualatex-math}
+\directlua{tex.enableprimitives("luatex",tex.extraprimitives("luatex"))}
\newsavebox{\testbox}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.ins b/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.ins
index 7424ea3a49e..5f477d21390 100644
--- a/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.ins
+++ b/Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.ins
@@ -42,7 +42,6 @@ LaTeX version 2009/09/24 or later.
\generate{
\file{lualatex-math.sty}{\from{lualatex-math.dtx}{package}}
- \file{test-kernel-alloc.tex}{\from{lualatex-math.dtx}{test,test-kernel-alloc}}
\file{test-kernel-style.tex}{\from{lualatex-math.dtx}{test,test-kernel-style}}
\file{test-amsmath.tex}{\from{lualatex-math.dtx}{test,test-amsmath}}
\file{test-unicode.tex}{\from{lualatex-math.dtx}{test,test-unicode}}
diff --git a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua
index b31a4e7ca1f..2513e7b1452 100644
--- a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua
+++ b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.lua
@@ -20,11 +20,9 @@
-- and version 1.3c or later is part of all distributions of
-- LaTeX version 2009/09/24 or later.
--
-require("luatexbase.modutils")
-require("luatexbase.cctb")
lualatex = lualatex or {}
lualatex.math = lualatex.math or {}
-local err, warn, info, log = luatexbase.provides_module({
+luatexbase.provides_module({
name = "lualatex-math",
date = "2013/08/03",
version = 1.3,
@@ -33,7 +31,8 @@ local err, warn, info, log = luatexbase.provides_module({
licence = "LPPL v1.3+"
})
local unpack = unpack or table.unpack
-local cctb = luatexbase.catcodetables
+local cctb = luatexbase.catcodetables or
+ {string = luatexbase.registernumber("catcodetable@string")}
function lualatex.math.print_fam_slot(char)
local code = tex.getmathcode(char)
local class, family, slot = unpack(code)
diff --git a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
index d3851714038..1d65880ae36 100644
--- a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
+++ b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty
@@ -21,13 +21,14 @@
%% LaTeX version 2009/09/24 or later.
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\RequirePackage{expl3}[2012/08/14]
-\ProvidesExplPackage{lualatex-math}{2014/08/18}{1.4}%
+\RequirePackage{expl3}[2015/09/07]
+\ProvidesExplPackage{lualatex-math}{2015/09/22}{1.4a}%
{Patches for mathematics typesetting with LuaLaTeX}
\RequirePackage { etoolbox } [ 2007/10/08 ]
-\RequirePackage { luatexbase } [ 2010/05/27 ]
+\cs_if_exist:NF \newluabytecode
+ { \RequirePackage { luatexbase } [ 2010/05/27 ] }
\RequirePackage { filehook } [ 2011/03/09 ]
-\RequireLuaModule { lualatex-math } [ 2013/08/03 ]
+\directlua{require("lualatex-math")}
\cs_new_nopar:Npn \__lltxmath_restore_catcode:N #1 {
\char_set_catcode:nn { \int_eval:n { `#1 } }
{ \char_value_catcode:n { `#1 } }
@@ -40,16 +41,6 @@
The~ lualatex-math~ package~ requires~ LuaTeX. \\
I~ will~ stop~ loading~ now.
}
-\msg_new:nnnn { lualatex-math } { different-meanings } {
- I've~ expected~ the~ control~ sequences \\
- #1~ and~ #3 \\
- to~ have~ the~ same~ meaning,~ but~ their~ meanings~ are~ different.
-} {
- The~ meaning~ of~ #1~ is: \\
- #2 \\
- The~ meaning~ of~ #3~ is: \\
- #4
-}
\msg_new:nnn { lualatex-math } { macro-expected } {
I've~ expected~ that~ #1~ is~ a~ macro,~ but~ it~ isn't.
}
@@ -62,21 +53,11 @@
\msg_new:nnn { lualatex-math } { patch-macro } {
I'm~ going~ to~ patch~ macro~ #1.
}
-\luatex_if_engine:F {
+\sys_if_engine_luatex:F {
\msg_error:nn { lualatex-math } { luatex-required }
\endinput
}
\cs_new_eq:NN \__lltxmath_temp:w \prg_do_nothing:
-\luatexbase@ensure@primitive { Umathcode }
-\luatexbase@ensure@primitive { Umathcodenum }
-\luatexbase@ensure@primitive { Umathchardef }
-\cs_new_protected_nopar:Npn \__lltxmath_assert_eq:NN #1 #2 {
- \cs_if_eq:NNF #1 #2 {
- \msg_error:nnxxxx { lualatex-math } { different-meanings }
- { \token_to_str:N #1 } { \token_to_meaning:N #1 }
- { \token_to_str:N #2 } { \token_to_meaning:N #2 }
- }
-}
\cs_new_protected_nopar:Npn \__lltxmath_patch:NNnnn #1 #2 #3 #4 #5 {
\cs_if_exist:NT #1 {
\token_if_macro:NTF #1 {
@@ -101,20 +82,12 @@
}
\cs_generate_variant:Nn \__lltxmath_patch:NNnnn { c }
\cs_new_protected_nopar:Npn \__lltxmath_set_mathchar:NN #1 #2 {
- \luatexUmathchardef #1
- \luatex_directlua:D {
+ \utex_mathchardef:D #1
+ \lua_now_x:n {
lualatex.math.print_class_fam_slot( \int_eval:n { `#2 } )
}
\scan_stop:
}
-\__lltxmath_assert_eq:NN \newfam \new@mathgroup
-\__lltxmath_patch:NNnnn \new@mathgroup \cs_set_nopar:Npn { } {
- \alloc@ 8 \mathgroup \chardef \sixt@@n
-} {
- \alloc@ 8 \mathgroup \chardef \c_two_hundred_fifty_six
-}
-\cs_set_eq:NN \newfam \new@mathgroup
-\luatexbase@ensure@primitive { Ustack }
\AtEndPreamble {
\@ifpackageloaded { amsmath } { } {
\__lltxmath_patch:NNnnn \frac \cs_set_nopar:Npn { #1 #2 } {
@@ -123,22 +96,16 @@
}
} {
{
- \luatexUstack { \group_begin: #1 \group_end: \over #2 }
+ \utex_stack:D { \group_begin: #1 \group_end: \over #2 }
}
}
}
}
-\luatexbase@ensure@primitive { alignmark }
-\luatexbase@ensure@primitive { Ustartmath }
-\luatexbase@ensure@primitive { Ustopmath }
-\luatexbase@ensure@primitive { Umathstacknumup }
-\luatexbase@ensure@primitive { Umathstackdenomdown }
-\luatexbase@ensure@primitive { Umathstackvgap }
\int_const:Nn \c__lltxmath_std_minus_mathcode_int { "2200 }
\int_const:Nn \c__lltxmath_std_equal_mathcode_int { "303D }
\cs_new_nopar:Npn \__lltxmath_char_dim:NN #1 #2 {
#1 \textfont
- \luatex_directlua:D {
+ \lua_now_x:n {
lualatex.math.print_fam_slot( \int_eval:n { `#2 } )
}
}
@@ -152,8 +119,8 @@
\AtEndOfPackageFile { amsmath } {
\cs_set_eq:NN \std@minus \l__lltxmath_minus_mathchar
\cs_set_eq:NN \std@equal \l__lltxmath_equal_mathchar
- \luatexUmathcodenum `\- \l__lltxmath_minus_mathchar
- \luatexUmathcodenum `\= \l__lltxmath_equal_mathchar
+ \utex_mathcodenum:D `\- \l__lltxmath_minus_mathchar
+ \utex_mathcodenum:D `\= \l__lltxmath_equal_mathchar
}
}
\AtEndOfPackageFile * { amsmath } {
@@ -203,19 +170,19 @@
\restore@math@cr
\default@tag
\skip_set:Nn \baselineskip {
- \luatexUmathstacknumup \scriptstyle
- + \luatexUmathstackdenomdown \scriptstyle
+ \utex_stacknumup:D \scriptstyle
+ + \utex_stackdenomdown:D \scriptstyle
}
- \lineskip \luatexUmathstackvgap \scriptstyle
+ \lineskip \utex_stackvgap:D \scriptstyle
\lineskiplimit \lineskip
\ialign
\c_group_begin_token
\token_if_eq_meaning:NNT c #1 { \hfil }
- \luatexUstartmath
+ \utex_startmath:D
\m@th
\scriptstyle
- \luatexalignmark \luatexalignmark
- \luatexUstopmath
+ \luatex_alignmark:D \luatex_alignmark:D
+ \utex_stopmath:D
\hfil
\crcr
}
@@ -225,7 +192,7 @@
}
} {
{
- \luatexUstack { \group_begin: #1 \group_end: \@@over #2 }
+ \utex_stack:D { \group_begin: #1 \group_end: \@@over #2 }
}
}
\__lltxmath_patch:NNnnn \@genfrac \cs_set_nopar:Npn {
@@ -237,7 +204,7 @@
} {
{
#1 {
- \luatexUstack {
+ \utex_stack:D {
\group_begin: #4 \group_end: #2 #3 \scan_stop: #5
}
}
@@ -261,7 +228,7 @@
\char_set_mathcode:nn { `\' } { 39 }
\char_set_mathcode:nn { `\* } { 42 }
\char_set_mathcode:nn { `\. } { "613A }
- \int_compare:nNnF { \luatexUmathcodenum `\- } = { 45 } {
+ \int_compare:nNnF { \utex_mathcodenum:D `\- } = { 45 } {
\__lltxmath_set_mathchar:NN \std@minus \-
}
\char_set_mathcode:nn { `\- } { 45 }
@@ -270,10 +237,6 @@
}
}
\group_end:
-\luatexbase@ensure@primitive { crampeddisplaystyle }
-\luatexbase@ensure@primitive { crampedtextstyle }
-\luatexbase@ensure@primitive { crampedscriptstyle }
-\luatexbase@ensure@primitive { crampedscriptscriptstyle }
\AtEndOfPackageFile * { mathtools } {
\__lltxmath_patch:NNnnn \MT_cramped_internal:Nn
\cs_set_nopar:Npn { #1 #2 } {
@@ -307,7 +270,7 @@
} {
{
\ensuremath {
- \use:c { luatexcramped \cs_to_str:N #1 } #2
+ \use:c { luatex_cramped \cs_to_str:N #1 :D } #2
}
}
}