From 6b5aee18d53170454bf65845519f0bd0345c0788 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 26 Sep 2019 21:49:25 +0000 Subject: unicode-math (26sep19) git-svn-id: svn://tug.org/texlive/trunk@52185 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/unicode-math/unicode-math-luatex.sty | 119 +++++----------- .../tex/latex/unicode-math/unicode-math-xetex.sty | 155 +++++---------------- .../tex/latex/unicode-math/unicode-math.sty | 2 +- 3 files changed, 71 insertions(+), 205 deletions(-) (limited to 'Master/texmf-dist/tex/latex/unicode-math') diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty index 1da955739d6..15c2acd6122 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty @@ -43,14 +43,26 @@ %%^^A%% Metadata for the package code, including files and versioning \ProvidesExplPackage{unicode-math-luatex} - {2019/03/04} {0.8o} {Unicode maths in XeLaTeX and LuaLaTeX} + {2019/09/26} {0.8p} {Unicode maths in XeLaTeX and LuaLaTeX} %%^^A%% um-code-opening.dtx -- part of UNICODE-MATH %%^^A%% Assorted initialisation tasks, including some low-level function definitions. \RequirePackage{xparse,l3keys2e} \RequirePackage{fontspec} -\RequirePackage{filehook} +\RequirePackage{fix-cm} +\RequirePackage{amsmath} +\RequirePackage{lualatex-math} +\cs_set_protected:Npn \__um_after_package:nNn #1 #2 #3 + { + \AtBeginDocument + { + \cs_new_protected:Npn #2 {#3} + \@ifpackageloaded {#1} {#2} {} + } + } +\RequirePackage{xparse,l3keys2e} +\RequirePackage{fontspec} \RequirePackage{fix-cm} \RequirePackage{lualatex-math} \cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } @@ -672,13 +684,13 @@ } \__um_msg_new:nn {no-main-font} { - No main maths font has been set up yet.\\If you simply want ^^e2^^80^^98the default^^e2^^80^^99, use: \\ + No main maths font has been set up yet.\\If you simply want ‘the default’, use: \\ \iow_indent:n {\token_to_str:N\setmathfont{latinmodern-math.otf}} } \__um_msg_new:nn {not-ot-math} { The first font loaded by unicode-math must be an OpenType Math font (with script=math). - If you simply want ^^e2^^80^^98the default^^e2^^80^^99 before loading supplementary fonts over the top for certain + If you simply want ‘the default’ before loading supplementary fonts over the top for certain ranges, use: \\ \iow_indent:n {\token_to_str:N\setmathfont{latinmodern-math.otf}} } @@ -3626,34 +3638,7 @@ %%^^A%% um-code-compat.dtx -- part of UNICODE-MATH %%^^A%% Compatibility with 3rd party packages. -\cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnn - { - \cs_if_exist:NT #1 - { - \token_if_macro:NTF #1 - { - \group_begin: - #2 \__um_tmpa:w #3 { #4 } - \cs_if_eq:NNTF #1 \__um_tmpa:w - { - \msg_info:nnx { unicode-math } { patch-macro } { \token_to_str:N #1 } - \group_end: - #2 #1 #3 { #5 } - } - { - \msg_warning:nnxxx { unicode-math } { wrong-meaning } - { \token_to_str:N #1 } { \token_to_meaning:N #1 } - { \token_to_meaning:N \__um_tmpa:w } - \group_end: - } - } - { - \msg_warning:nnx { unicode-math } { macro-expected } - { \token_to_str:N #1 } - } - } - } -\AtEndOfPackageFile * {url} +\__um_after_package:nNn {url} \__um_patch_url: { \tl_put_left:Nn \Url@FormatString { \__um_switch_to:n {literal} } \tl_put_right:Nn \UrlSpecials @@ -3664,7 +3649,7 @@ \do \& { \mathchar`\& } } } -\AtEndOfPackageFile * { mathtools } +\__um_after_package:nNn { mathtools } \__um_patch_mathtools_B: { \cs_set_eq:NN \MToverbracket \overbracket \cs_set_eq:NN \MTunderbracket \underbracket @@ -3673,20 +3658,20 @@ { \msg_warning:nn { unicode-math } { mathtools-overbracket } - \cs_set:Npn \downbracketfill #1 #2 + \cs_set:Npn \downbracketfill ##1 ##2 { \tl_set:Nn \l_MT_bracketheight_fdim {.27ex} - \downbracketend {#1} {#2} - \leaders \vrule \@height #1 \@depth \z@ \hfill - \downbracketend {#1} {#2} + \downbracketend {##1} {##2} + \leaders \vrule \@height ##1 \@depth \z@ \hfill + \downbracketend {##1} {##2} } - \cs_set:Npn \upbracketfill #1 #2 + \cs_set:Npn \upbracketfill ##1 ##2 { \tl_set:Nn \l_MT_bracketheight_fdim {.27ex} - \upbracketend {#1} {#2} - \leaders \vrule \@height \z@ \@depth #1 \hfill - \upbracketend {#1} {#2} + \upbracketend {##1} {##2} + \leaders \vrule \@height \z@ \@depth ##1 \hfill + \upbracketend {##1} {##2} } \cs_set_eq:NN \Uoverbracket \overbracket @@ -3695,30 +3680,18 @@ \cs_set_eq:NN \underbracket \MTunderbracket } } -\AtEndOfPackageFile * { mathtools } +\__um_after_package:nNn { mathtools } \__um_patch_mathtools_C: { \msg_warning:nn { unicode-math } { mathtools-colon } - \NewDocumentCommand \dblcolon { } { \Colon } - \NewDocumentCommand \coloneqq { } { \coloneq } - \NewDocumentCommand \Coloneqq { } { \Coloneq } - \NewDocumentCommand \eqqcolon { } { \eqcolon } - } -\AtEndOfPackageFile * { colonequals } - { - \msg_warning:nn { unicode-math } { colonequals } - \RenewDocumentCommand \ratio { } { \mathratio } - \RenewDocumentCommand \coloncolon { } { \Colon } - \RenewDocumentCommand \minuscolon { } { \dashcolon } - \RenewDocumentCommand \colonequals { } { \coloneq } - \RenewDocumentCommand \equalscolon { } { \eqcolon } - \RenewDocumentCommand \coloncolonequals { } { \Coloneq } + \DeclareDocumentCommand \dblcolon { } { \Colon } + \DeclareDocumentCommand \coloneqq { } { \coloneq } + \DeclareDocumentCommand \Coloneqq { } { \Coloneq } + \DeclareDocumentCommand \eqqcolon { } { \eqcolon } } %%^^A%% um-code-amsmath.dtx -- part of UNICODE-MATH %%^^A%% Compatibility with amsmath. -\AtEndOfPackageFile * {amsmath} - { \tl_remove_once:Nn \@begindocumenthook { \mathchardef\std@minus\mathcode`\-\relax @@ -3731,19 +3704,7 @@ } \cs_set:Npn \@cdots {\mathinner{\unicodecdots}} \cs_set_eq:NN \dotsb@ \cdots - \__um_check_and_fix:NNnnn \plainroot@ \cs_set_nopar:Npn { #1 \of #2 } - { - \setbox \rootbox \hbox - { - $ \m@th \scriptscriptstyle { #1 } $ - } - \mathchoice - { \r@@t \displaystyle { #2 } } - { \r@@t \textstyle { #2 } }~ - { \r@@t \scriptstyle { #2 } } - { \r@@t \scriptscriptstyle { #2 } } - \egroup - } + \cs_set_nopar:Npn \plainroot@ #1 \of #2 { \bool_if:nTF { @@ -3767,20 +3728,7 @@ } \c_group_end_token } - \__um_check_and_fix:NNnnn \r@@t \cs_set_nopar:Npn { #1 #2 } - { - \setboxz@h { $ \m@th #1 \sqrtsign { #2 } $ } - \dimen@ \ht\z@ - \advance \dimen@ -\dp\z@ - \setbox\@ne \hbox { $ \m@th #1 \mskip \uproot@ mu $ } - \advance \dimen@ by 1.667 \wd\@ne - \mkern -\leftroot@ mu - \mkern 5mu - \raise .6\dimen@ \copy\rootbox - \mkern -10mu - \mkern \leftroot@ mu - \boxz@ - } + \cs_set_nopar:Npn \r@@t #1 #2 { \hbox_set:Nn \l_tmpa_box { @@ -3804,7 +3752,6 @@ } { #2 } } - } %%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH %%^^A%% Assorted definitions to close up. diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty index a1461f7a112..ef94a2d76f0 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty @@ -43,14 +43,25 @@ %%^^A%% Metadata for the package code, including files and versioning \ProvidesExplPackage{unicode-math-xetex} - {2019/03/04} {0.8o} {Unicode maths in XeLaTeX and LuaLaTeX} + {2019/09/26} {0.8p} {Unicode maths in XeLaTeX and LuaLaTeX} %%^^A%% um-code-opening.dtx -- part of UNICODE-MATH %%^^A%% Assorted initialisation tasks, including some low-level function definitions. \RequirePackage{xparse,l3keys2e} \RequirePackage{fontspec} -\RequirePackage{filehook} +\RequirePackage{fix-cm} +\RequirePackage{amsmath} +\cs_set_protected:Npn \__um_after_package:nNn #1 #2 #3 + { + \AtBeginDocument + { + \cs_new_protected:Npn #2 {#3} + \@ifpackageloaded {#1} {#2} {} + } + } +\RequirePackage{xparse,l3keys2e} +\RequirePackage{fontspec} \RequirePackage{fix-cm} \cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } \cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx,Nxx} @@ -664,13 +675,13 @@ } \__um_msg_new:nn {no-main-font} { - No main maths font has been set up yet.\\If you simply want ^^e2^^80^^98the default^^e2^^80^^99, use: \\ + No main maths font has been set up yet.\\If you simply want ‘the default’, use: \\ \iow_indent:n {\token_to_str:N\setmathfont{latinmodern-math.otf}} } \__um_msg_new:nn {not-ot-math} { The first font loaded by unicode-math must be an OpenType Math font (with script=math). - If you simply want ^^e2^^80^^98the default^^e2^^80^^99 before loading supplementary fonts over the top for certain + If you simply want ‘the default’ before loading supplementary fonts over the top for certain ranges, use: \\ \iow_indent:n {\token_to_str:N\setmathfont{latinmodern-math.otf}} } @@ -3555,34 +3566,7 @@ %%^^A%% um-code-compat.dtx -- part of UNICODE-MATH %%^^A%% Compatibility with 3rd party packages. -\cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnn - { - \cs_if_exist:NT #1 - { - \token_if_macro:NTF #1 - { - \group_begin: - #2 \__um_tmpa:w #3 { #4 } - \cs_if_eq:NNTF #1 \__um_tmpa:w - { - \msg_info:nnx { unicode-math } { patch-macro } { \token_to_str:N #1 } - \group_end: - #2 #1 #3 { #5 } - } - { - \msg_warning:nnxxx { unicode-math } { wrong-meaning } - { \token_to_str:N #1 } { \token_to_meaning:N #1 } - { \token_to_meaning:N \__um_tmpa:w } - \group_end: - } - } - { - \msg_warning:nnx { unicode-math } { macro-expected } - { \token_to_str:N #1 } - } - } - } -\AtEndOfPackageFile * {url} +\__um_after_package:nNn {url} \__um_patch_url: { \tl_put_left:Nn \Url@FormatString { \__um_switch_to:n {literal} } \tl_put_right:Nn \UrlSpecials @@ -3593,48 +3577,26 @@ \do \& { \mathchar`\& } } } -\AtEndOfPackageFile * { mathtools } +\__um_after_package:nNn { mathtools } \__um_patch_mathtools_A: { - \__um_check_and_fix: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 - \else - \ifx #1 \scriptstyle - \scriptfont - \else - \scriptscriptfont - \fi - \fi - 3 - \fi - \advance \dimen@ -\ht\z@ - \ht\z@ = -\dimen@ - \box\z@ - } + \cs_set_nopar:Npn \MT_cramped_internal:Nn ##1 ##2 { \hbox_set:Nn \l_tmpa_box { \color@setgroup \c_math_toggle_token \m@th - #1 + ##1 \dim_zero:N \nulldelimiterspace - \XeTeXradical 255 ~ 0 ~ { #2 } + \XeTeXradical 255 ~ 0 ~ { ##2 } \c_math_toggle_token \color@endgroup } \box_set_ht:Nn \l_tmpa_box { - \box_ht:N \l_tmpa_box - \__um_radical_vgap:N #1 + \box_ht:N \l_tmpa_box - \__um_radical_vgap:N ##1 } \box_use_drop:N \l_tmpa_box } } -\AtEndOfPackageFile * { mathtools } +\__um_after_package:nNn { mathtools } \__um_patch_mathtools_B: { \cs_set_eq:NN \MToverbracket \overbracket \cs_set_eq:NN \MTunderbracket \underbracket @@ -3643,20 +3605,20 @@ { \msg_warning:nn { unicode-math } { mathtools-overbracket } - \cs_set:Npn \downbracketfill #1 #2 + \cs_set:Npn \downbracketfill ##1 ##2 { \tl_set:Nn \l_MT_bracketheight_fdim {.27ex} - \downbracketend {#1} {#2} - \leaders \vrule \@height #1 \@depth \z@ \hfill - \downbracketend {#1} {#2} + \downbracketend {##1} {##2} + \leaders \vrule \@height ##1 \@depth \z@ \hfill + \downbracketend {##1} {##2} } - \cs_set:Npn \upbracketfill #1 #2 + \cs_set:Npn \upbracketfill ##1 ##2 { \tl_set:Nn \l_MT_bracketheight_fdim {.27ex} - \upbracketend {#1} {#2} - \leaders \vrule \@height \z@ \@depth #1 \hfill - \upbracketend {#1} {#2} + \upbracketend {##1} {##2} + \leaders \vrule \@height \z@ \@depth ##1 \hfill + \upbracketend {##1} {##2} } \cs_set_eq:NN \Uoverbracket \overbracket @@ -3665,30 +3627,18 @@ \cs_set_eq:NN \underbracket \MTunderbracket } } -\AtEndOfPackageFile * { mathtools } +\__um_after_package:nNn { mathtools } \__um_patch_mathtools_C: { \msg_warning:nn { unicode-math } { mathtools-colon } - \NewDocumentCommand \dblcolon { } { \Colon } - \NewDocumentCommand \coloneqq { } { \coloneq } - \NewDocumentCommand \Coloneqq { } { \Coloneq } - \NewDocumentCommand \eqqcolon { } { \eqcolon } - } -\AtEndOfPackageFile * { colonequals } - { - \msg_warning:nn { unicode-math } { colonequals } - \RenewDocumentCommand \ratio { } { \mathratio } - \RenewDocumentCommand \coloncolon { } { \Colon } - \RenewDocumentCommand \minuscolon { } { \dashcolon } - \RenewDocumentCommand \colonequals { } { \coloneq } - \RenewDocumentCommand \equalscolon { } { \eqcolon } - \RenewDocumentCommand \coloncolonequals { } { \Coloneq } + \DeclareDocumentCommand \dblcolon { } { \Colon } + \DeclareDocumentCommand \coloneqq { } { \coloneq } + \DeclareDocumentCommand \Coloneqq { } { \Coloneq } + \DeclareDocumentCommand \eqqcolon { } { \eqcolon } } %%^^A%% um-code-amsmath.dtx -- part of UNICODE-MATH %%^^A%% Compatibility with amsmath. -\AtEndOfPackageFile * {amsmath} - { \tl_remove_once:Nn \@begindocumenthook { \mathchardef\std@minus\mathcode`\-\relax @@ -3706,24 +3656,7 @@ \setbox\z@\hbox{$($}%) \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@ } - \__um_check_and_fix:NNnnn \subarray \cs_set:Npn { #1 } - { - \vcenter - \bgroup - \Let@ - \restore@math@cr - \default@tag - \baselineskip \fontdimen 10~ \scriptfont \tw@ - \advance \baselineskip \fontdimen 12~ \scriptfont \tw@ - \lineskip \thr@@ \fontdimen 8~ \scriptfont \thr@@ - \lineskiplimit \lineskip - \ialign - \bgroup - \ifx c #1 \hfil \fi - $ \m@th \scriptstyle ## $ - \hfil - \crcr - } + \cs_set:Npn \subarray #1 { \vcenter \c_group_begin_token @@ -3748,20 +3681,7 @@ \hfil \crcr } - \__um_check_and_fix:NNnnn \r@@t \cs_set_nopar:Npn { #1 #2 } - { - \setboxz@h { $ \m@th #1 \sqrtsign { #2 } $ } - \dimen@ \ht\z@ - \advance \dimen@ -\dp\z@ - \setbox\@ne \hbox { $ \m@th #1 \mskip \uproot@ mu $ } - \advance \dimen@ by 1.667 \wd\@ne - \mkern -\leftroot@ mu - \mkern 5mu - \raise .6\dimen@ \copy\rootbox - \mkern -10mu - \mkern \leftroot@ mu - \boxz@ - } + \cs_set_nopar:Npn \r@@t #1 #2 { \hbox_set:Nn \l_tmpa_box { @@ -3787,7 +3707,6 @@ \mkern \leftroot@ mu \box_use_drop:N \l_tmpa_box } - } %%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH %%^^A%% Assorted definitions to close up. diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty index 5e5a1b7f361..26759e8d0a9 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty @@ -24,7 +24,7 @@ \RequirePackage{expl3} \ProvidesExplPackage{unicode-math} - {2019/03/04} {0.8o} {Unicode maths in XeLaTeX and LuaLaTeX} + {2019/09/26} {0.8p} {Unicode maths in XeLaTeX and LuaLaTeX} \sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } \sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } \sys_if_engine_pdftex:T -- cgit v1.2.3