diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-05 20:55:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-05 20:55:21 +0000 |
commit | 910b0bd834c1c1ee74b76ba1944894746c6b86d9 (patch) | |
tree | c5ba1c8263d535e05ec6aeaf5a97909f56cc5c3b /Master/texmf-dist | |
parent | 4146adb3d1685849c396efde0ec536b1eb6c874e (diff) |
lualatex-math (5jul21)
git-svn-id: svn://tug.org/texlive/trunk@59847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf | bin | 204676 -> 207264 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/lualatex/lualatex-math/lualatex-math.dtx | 89 | ||||
-rw-r--r-- | Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty | 79 |
3 files changed, 101 insertions, 67 deletions
diff --git a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf Binary files differindex 98334afa6fe..14435039e79 100644 --- a/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf +++ b/Master/texmf-dist/doc/lualatex/lualatex-math/lualatex-math.pdf 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 3e8bbf0ea23..cde46540af9 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,7 @@ % \iffalse meta-comment % % Copyright 2011–2020 by Philipp Stephani, Joseph Wright, and Will Robertson +% Copyright 2021 Google LLC % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -31,7 +32,7 @@ %</driver> % \fi % -% \CheckSum{300} +% \CheckSum{314} % % \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 @@ -150,7 +151,7 @@ %<@@=lltxmath> \NeedsTeXFormat{LaTeX2e}[2020/02/02] \RequirePackage{expl3}[2018/06/18] -\ProvidesExplPackage{lualatex-math}{2020/09/25}{1.9}% +\ProvidesExplPackage{lualatex-math}{2021/07/05}{1.11}% {Patches for mathematics typesetting with LuaLaTeX} \RequirePackage { etoolbox } [ 2007/10/08 ] \cs_if_exist:NF \newluabytecode @@ -634,6 +635,11 @@ % 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. % +% In newer versions of \pkg{mathtools}, this issue is fixed, in which case we +% skip the patch. +% \changes{v1.10}{2021/03/28}{Skip patch if \pkg{mathtools} is recent enough} +% \changes{v1.11}{2021/07/05}{Adapt to March 2021 changes to \pkg{mathtools}} +% % \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 @@ -644,36 +650,39 @@ % single command. % \begin{macrocode} \@@_after_package_or_now:nn { mathtools } { - \@@_patch:NNnnn \MT_cramped_internal:Nn - \cs_set_nopar:Npn { #1 #2 } { - \sbox \z@ { - $ - \m@th - #1 - \nulldelimiterspace = \z@ - \radical \z@ { #2 } - $ - } - \ifx #1 \displaystyle - \dimen@ = \fontdimen 8 \textfont 3 - \advance \dimen@ .25 \fontdimen 5 \textfont 2 - \else - \dimen@ = 1.25 \fontdimen 8 - \ifx #1 \textstyle - \textfont + \@ifpackagelater { mathtools } { 2021/03/28 } { } { + \@@_patch:NNnnn \MT_cramped_internal:Nn + \cs_set_nopar:Npn { #1 #2 } { + \setbox \z@ \hbox { + $ + \m@th + #1 + \kern -\nulldelimiterspace + \radical \z@ { #2 } + $ + } + \ifx #1 \displaystyle + \dimen@ = \fontdimen 8 \textfont 3 + \advance \dimen@ .25 \fontdimen 5 \textfont 2 \else - \ifx #1 \scriptstyle - \scriptfont + \dimen@ = 1.25 \fontdimen 8 + \ifx #1 \textstyle + \textfont \else - \scriptscriptfont + \ifx #1 \scriptstyle + \scriptfont + \else + \scriptscriptfont + \fi \fi + 3 \fi - 3 - \fi - \advance \dimen@ -\ht\z@ - \ht\z@ = -\dimen@ - \box\z@ - } { + \advance \dimen@ -\ht\z@ + \ht\z@ = -\dimen@ + \ifvmode \leavevmode \fi + { } + \box\z@ + } { % \end{macrocode} % \changes{v1.4}{2014/08/18}{Added \cs{ensuremath} to work around % \href{https://github.com/phst/lualatex-math/issues/11}{issue~11}} @@ -683,9 +692,10 @@ % math mode, we use |\ensuremath| here. % \changes{v1.9}{2020/09/25}{Stop using \cs{…:D} control sequences} % \begin{macrocode} - { - \ensuremath { - \use:c { cramped \cs_to_str:N #1 } #2 + { + \ensuremath { + \use:c { cramped \cs_to_str:N #1 } #2 + } } } } @@ -701,6 +711,8 @@ % the comma character. This breaks for Unicode fonts. The incompatibility was % noticed by % \Breitfeld.\footnote{\url{https://groups.google.com/forum/\#!topic/de.comp.text.tex/Cputk-AJS5I/discussion}} +% \changes{v1.10}{2021/03/28}{Use new \Hologo{LaTeX2e} hook management if +% available} % % \begin{macro}{\mathcomma} % \pkg{icomma} defines the mathemathical character shorthand \cmd{\icomma} at @@ -708,10 +720,19 @@ % \cmd{\@begindocumenthook}. % \begin{macrocode} \@@_after_package_or_now:nn { icomma } { - \tl_replace_once:Nnn \@begindocumenthook { - \mathchardef \mathcomma \mathcode `\, + \@ifl@t@r \fmtversion { 2020/10/01 } { + \hook_gput_code:nnn { begindocument } { lualatex-math } { + \@@_set_mathchar:NN \mathcomma \, + \mathcode `\, = "8000 ~ + } + \hook_gset_rule:nnnn + { begindocument } { lualatex-math } { voids } { icomma } } { - \@@_set_mathchar:NN \mathcomma \, + \tl_replace_once:Nnn \@begindocumenthook { + \mathchardef \mathcomma \mathcode `\, + } { + \@@_set_mathchar:NN \mathcomma \, + } } } %</package> 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 888bced0b56..0c660a68fa7 100644 --- a/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty +++ b/Master/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020/02/02] \RequirePackage{expl3}[2018/06/18] -\ProvidesExplPackage{lualatex-math}{2020/09/25}{1.9}% +\ProvidesExplPackage{lualatex-math}{2021/07/05}{1.11}% {Patches for mathematics typesetting with LuaLaTeX} \RequirePackage { etoolbox } [ 2007/10/08 ] \cs_if_exist:NF \newluabytecode @@ -230,48 +230,61 @@ } } \__lltxmath_after_package_or_now:nn { mathtools } { - \__lltxmath_patch:NNnnn \MT_cramped_internal:Nn - \cs_set_nopar:Npn { #1 #2 } { - \sbox \z@ { - $ - \m@th - #1 - \nulldelimiterspace = \z@ - \radical \z@ { #2 } - $ - } - \ifx #1 \displaystyle - \dimen@ = \fontdimen 8 \textfont 3 - \advance \dimen@ .25 \fontdimen 5 \textfont 2 - \else - \dimen@ = 1.25 \fontdimen 8 - \ifx #1 \textstyle - \textfont + \@ifpackagelater { mathtools } { 2021/03/28 } { } { + \__lltxmath_patch:NNnnn \MT_cramped_internal:Nn + \cs_set_nopar:Npn { #1 #2 } { + \setbox \z@ \hbox { + $ + \m@th + #1 + \kern -\nulldelimiterspace + \radical \z@ { #2 } + $ + } + \ifx #1 \displaystyle + \dimen@ = \fontdimen 8 \textfont 3 + \advance \dimen@ .25 \fontdimen 5 \textfont 2 \else - \ifx #1 \scriptstyle - \scriptfont + \dimen@ = 1.25 \fontdimen 8 + \ifx #1 \textstyle + \textfont \else - \scriptscriptfont + \ifx #1 \scriptstyle + \scriptfont + \else + \scriptscriptfont + \fi \fi + 3 \fi - 3 - \fi - \advance \dimen@ -\ht\z@ - \ht\z@ = -\dimen@ - \box\z@ - } { - { - \ensuremath { - \use:c { cramped \cs_to_str:N #1 } #2 + \advance \dimen@ -\ht\z@ + \ht\z@ = -\dimen@ + \ifvmode \leavevmode \fi + { } + \box\z@ + } { + { + \ensuremath { + \use:c { cramped \cs_to_str:N #1 } #2 + } } } } } \__lltxmath_after_package_or_now:nn { icomma } { - \tl_replace_once:Nnn \@begindocumenthook { - \mathchardef \mathcomma \mathcode `\, + \@ifl@t@r \fmtversion { 2020/10/01 } { + \hook_gput_code:nnn { begindocument } { lualatex-math } { + \__lltxmath_set_mathchar:NN \mathcomma \, + \mathcode `\, = "8000 ~ + } + \hook_gset_rule:nnnn + { begindocument } { lualatex-math } { voids } { icomma } } { - \__lltxmath_set_mathchar:NN \mathcomma \, + \tl_replace_once:Nnn \@begindocumenthook { + \mathchardef \mathcomma \mathcode `\, + } { + \__lltxmath_set_mathchar:NN \mathcomma \, + } } } \endinput |