diff options
author | Karl Berry <karl@freefriends.org> | 2019-09-26 21:49:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-09-26 21:49:25 +0000 |
commit | 6b5aee18d53170454bf65845519f0bd0345c0788 (patch) | |
tree | d8a116d5578a4a388825649e8c4e0dcd71c4b455 /Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty | |
parent | df42b39352bb8ffd623c43a39225b9d869e698e3 (diff) |
unicode-math (26sep19)
git-svn-id: svn://tug.org/texlive/trunk@52185 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty | 119 |
1 files changed, 33 insertions, 86 deletions
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 <wspr.io/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 <wspr.io/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 <wspr.io/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 <wspr.io/unicode-math> %%^^A%% Assorted definitions to close up. |