texlive[52185] Master/texmf-dist: unicode-math (26sep19)

commits+karl at tug.org commits+karl at tug.org
Thu Sep 26 23:49:25 CEST 2019


Revision: 52185
          http://tug.org/svn/texlive?view=revision&revision=52185
Author:   karl
Date:     2019-09-26 23:49:25 +0200 (Thu, 26 Sep 2019)
Log Message:
-----------
unicode-math (26sep19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md
    trunk/Master/texmf-dist/doc/latex/unicode-math/README.md
    trunk/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex
    trunk/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf
    trunk/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf
    trunk/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf
    trunk/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf
    trunk/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx
    trunk/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx
    trunk/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx
    trunk/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
    trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty
    trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty
    trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md	2019-09-26 21:49:25 UTC (rev 52185)
@@ -1,6 +1,15 @@
 CHANGE HISTORY
 ==============
 
+## v0.8p (2019/09/26)
+
+  * Remove dependency on `filehook` package. Just to simplify.
+  * Remove patch code for the `colonequals` package; now if you use that package
+    you will simply receive its standard ‘constructed’ symbols.
+  * Load `amsmath` automatically. This is not intended to save time for the user,
+    but to simplify the code logic. Users should continue to load `amsmath` explicitly IMO.
+
+
 ## v0.8o (2019/03/04)
 
   * Avoid `'Dimension too large' error` for some (unpredictable) combinations of font

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/unicode-math/README.md	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/doc/latex/unicode-math/README.md	2019-09-26 21:49:25 UTC (rev 52185)
@@ -76,7 +76,7 @@
 ------------
 
 As well as running XeTeX or LuaTeX, this package requires recent versions of the
-`lm-math`, `fontspec`, `expl3`, `xpackages`, `filehook`, and `lualatex-math` packages.
+`lm-math`, `fontspec`, `expl3`, `xpackages`, and `lualatex-math` packages.
 
 
 THANKS

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex	2019-09-26 21:49:25 UTC (rev 52185)
@@ -69,7 +69,7 @@
 after any other maths or font-related package in case it needs to overwrite
 their definitions. Here's an example using the filename syntax to load the \TeX\ Gyre Pagella Math font: (this works for both \XeLaTeX\ and \LuaLaTeX)
 \begin{Verbatim}
-\usepackage{amsmath} % if desired
+\usepackage{amsmath}
 \usepackage{unicode-math}
 \setmathfont{texgyrepagella-math.otf}
 \end{Verbatim}
@@ -78,6 +78,10 @@
 you can only switch to a different OpenType maths font using the \cs{setmathfont} command.
 If you do not load an OpenType maths font before |\begin{document}|, Latin Modern Math will be loaded automatically.
 
+Note that \pkg{amsmath} should be loaded before \pkg{unicode-math} to avoid conflicts, and
+it will be loaded automatically if not requested earlier in the preamble.
+
+
 \subsection{New commands}
 \LaTeX, since the first version of \LaTeXe, changed the math group
 selection from, say, |{\bf x}| to |\mathbf{x}|. It introduced commands
@@ -111,7 +115,7 @@
 in math and a command like |\symbf| (for the bold math font).
 
 The five new symbol font commands that behave in this way are: \cs{symup},
-\cs{symit}, \cs{symbf}, \cs{symsf}, and \cs{symit}.
+\cs{symit}, \cs{symbf}, \cs{symsf}, and \cs{symtt}.
 These commands switch to single-letter mathematical symbols
 (generally within the same OpenType font).
 

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx	2019-09-26 21:49:25 UTC (rev 52185)
@@ -9,8 +9,6 @@
 %
 % Since the mathcode of |`\-| is greater than eight bits, this piece of |\AtBeginDocument| code from \pkg{amsmath} dies if we try and set the maths font in the preamble:
 %    \begin{macrocode}
-\AtEndOfPackageFile * {amsmath}
-  {
     \tl_remove_once:Nn \@begindocumenthook
       {
         \mathchardef\std at minus\mathcode`\-\relax
@@ -38,26 +36,9 @@
 %    \end{macrocode}
 % The |subarray| environment uses inappropriate font dimensions.
 %    \begin{macrocode}
-    \@@_check_and_fix:NNnnn \subarray \cs_set:Npn { #1 }
+    \cs_set:Npn \subarray #1
       {
         \vcenter
-        \bgroup
-        \Let@
-        \restore at math@cr
-        \default at 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 at th \scriptstyle ## $
-        \hfil
-        \crcr
-      }
-      {
-        \vcenter
         \c_group_begin_token
         \Let@
         \restore at math@cr
@@ -64,15 +45,9 @@
         \default at tag
         \skip_set:Nn \baselineskip
           {
-%    \end{macrocode}
-% Here we use stack top shift + stack bottom shift, which sounds reasonable.
-%    \begin{macrocode}
             \@@_stack_num_up:N \scriptstyle
             + \@@_stack_denom_down:N \scriptstyle
           }
-%    \end{macrocode}
-% Here we use the minimum stack gap.
-%    \begin{macrocode}
         \lineskip \@@_stack_vgap:N \scriptstyle
         \lineskiplimit \lineskip
         \ialign
@@ -91,20 +66,8 @@
 % The roots need a complete rework.
 %    \begin{macrocode}
 %<*LU>
-  \@@_check_and_fix:NNnnn \plainroot@ \cs_set_nopar:Npn { #1 \of #2 }
+  \cs_set_nopar:Npn \plainroot@ #1 \of #2
     {
-      \setbox \rootbox \hbox
-        {
-          $ \m at th \scriptscriptstyle { #1 } $
-        }
-      \mathchoice
-        { \r@@@@t \displaystyle      { #2 } }
-        { \r@@@@t \textstyle         { #2 } }~
-        { \r@@@@t \scriptstyle       { #2 } }
-        { \r@@@@t \scriptscriptstyle { #2 } }
-      \egroup
-    }
-    {
       \bool_if:nTF
         {
           \@@_int_if_zero_p:n \uproot@ && \@@_int_if_zero_p:n \leftroot@
@@ -131,20 +94,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-  \@@_check_and_fix:NNnnn \r@@@@t \cs_set_nopar:Npn { #1 #2 }
-    {
-      \setboxz at h { $ \m at th #1 \sqrtsign { #2 } $ }
-      \dimen@ \ht\z@
-      \advance \dimen@ -\dp\z@
-      \setbox\@ne \hbox { $ \m at 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
 %<*LU>
     {
       \hbox_set:Nn \l_tmpa_box
@@ -197,7 +147,6 @@
       \box_use_drop:N \l_tmpa_box
     }
 %</XE>
-  }
 %    \end{macrocode}
 %
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx	2019-09-26 21:49:25 UTC (rev 52185)
@@ -7,47 +7,6 @@
 %<*package>
 %    \end{macrocode}
 %
-% \begin{macro}{\@@_check_and_fix:NNnnn}
-% \darg{command}
-% \darg{factory command}
-% \darg{parameter text}
-% \darg{expected replacement text}
-% \darg{new replacement text}
-% Tries to patch \meta{command}.
-% If \meta{command} is undefined, do nothing.
-% Otherwise it must be a macro with the given \meta{parameter text} and \meta{expected replacement text}, created by the given \meta{factory command} or equivalent.
-% In this case it will be overwritten using the \meta{parameter text} and the \meta{new replacement text for \LuaTeX} or the \meta{new replacement text for \XeTeX}, depending on the engine.
-% Otherwise issue a warning and don’t overwrite.
-%    \begin{macrocode}
-\cs_new_protected_nopar:Nn \@@_check_and_fix:NNnnn
-  {
-    \cs_if_exist:NT #1
-      {
-        \token_if_macro:NTF #1
-          {
-            \group_begin:
-            #2 \@@_tmpa:w #3 { #4 }
-            \cs_if_eq:NNTF #1 \@@_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 \@@_tmpa:w }
-                \group_end:
-              }
-          }
-          {
-            \msg_warning:nnx { unicode-math } { macro-expected }
-              { \token_to_str:N #1 }
-          }
-       }
-  }
-%    \end{macrocode}
-% \end{macro}
 %
 % \section{Patching/augmenting 3rd-party packages}
 %
@@ -60,7 +19,7 @@
 % but activates automatically so documents that might change the \cs{url}
 % font through the standard interface still work correctly.
 %    \begin{macrocode}
-\AtEndOfPackageFile * {url}
+\@@_after_package:nNn {url} \@@_patch_url:
   {
     \tl_put_left:Nn \Url at FormatString { \@@_switch_to:n {literal} }
     \tl_put_right:Nn \UrlSpecials
@@ -84,43 +43,21 @@
 % upsetting effect on legacy math alphabets.
 %    \begin{macrocode}
 %<*XE>
-\AtEndOfPackageFile * { mathtools }
+\@@_after_package:nNn { mathtools } \@@_patch_mathtools_A:
   {
-    \@@_check_and_fix:NNnnn \MT_cramped_internal:Nn \cs_set_nopar:Npn { #1 #2 }
+    \cs_set_nopar:Npn \MT_cramped_internal:Nn ##1 ##2
      {
-       \sbox \z@ { $ \m at 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@
-     }
-     {
        \hbox_set:Nn \l_tmpa_box
          {
            \color at setgroup \c_math_toggle_token \m at th
-             #1
+             ##1
              \dim_zero:N \nulldelimiterspace
-             \XeTeXradical 255 ~ 0 ~ { #2 }
+             \XeTeXradical 255 ~ 0 ~ { ##2 }
            \c_math_toggle_token \color at endgroup
          }
        \box_set_ht:Nn \l_tmpa_box
          {
-           \box_ht:N \l_tmpa_box - \@@_radical_vgap:N #1
+           \box_ht:N \l_tmpa_box - \@@_radical_vgap:N ##1
          }
        \box_use_drop:N \l_tmpa_box
      }
@@ -138,7 +75,7 @@
 %   with Unicode fonts, so we are hard coding the $5/18$ex suggested by
 %   \pkg{mathtools}’s documentation.
 %    \begin{macrocode}
-\AtEndOfPackageFile * { mathtools }
+\@@_after_package:nNn { mathtools } \@@_patch_mathtools_B:
   {
     \cs_set_eq:NN \MToverbracket  \overbracket
     \cs_set_eq:NN \MTunderbracket \underbracket
@@ -147,20 +84,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
@@ -179,17 +116,16 @@
 % \begin{macro}{\eqqcolon}
 %   \pkg{mathtools} defines several commands as combinations of colons and
 %   other characters, but with meanings incompatible to \pkg{unicode-math}.
-%   Thus we issue a warning.  Because \pkg{mathtools} uses
-%   \cmd{\providecommand} \cmd{\AtBeginDocument}, we can just define the
-%   offending commands here.
+%   Thus we issue a warning.  Note \pkg{mathtools} uses
+%   \cmd{\providecommand} \cmd{\AtBeginDocument}.
 %    \begin{macrocode}
-\AtEndOfPackageFile * { mathtools }
+\@@_after_package:nNn { mathtools } \@@_patch_mathtools_C:
   {
     \msg_warning:nn { unicode-math } { mathtools-colon }
-    \NewDocumentCommand \dblcolon { } { \Colon }
-    \NewDocumentCommand \coloneqq { } { \coloneq }
-    \NewDocumentCommand \Coloneqq { } { \Coloneq }
-    \NewDocumentCommand \eqqcolon { } { \eqcolon }
+    \DeclareDocumentCommand \dblcolon { } { \Colon }
+    \DeclareDocumentCommand \coloneqq { } { \coloneq }
+    \DeclareDocumentCommand \Coloneqq { } { \Coloneq }
+    \DeclareDocumentCommand \eqqcolon { } { \eqcolon }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -197,37 +133,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \subsection{\pkg{colonequals}}
-%
-% \begin{macro}{\ratio}
-% \begin{macro}{\coloncolon}
-% \begin{macro}{\minuscolon}
-% \begin{macro}{\colonequals}
-% \begin{macro}{\equalscolon}
-% \begin{macro}{\coloncolonequals}
-%   Similarly to \pkg{mathtools}, the \pkg{colonequals} defines several colon
-%   combinations.  Fortunately there are no name clashes, so we can just
-%   overwrite their definitions.
 %    \begin{macrocode}
-\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 }
-  }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%    \begin{macrocode}
 %</package>
 %    \end{macrocode}
 

Modified: trunk/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx	2019-09-26 21:49:25 UTC (rev 52185)
@@ -17,11 +17,26 @@
 %    \begin{macrocode}
 \RequirePackage{xparse,l3keys2e}
 \RequirePackage{fontspec}
-\RequirePackage{filehook}
 \RequirePackage{fix-cm}
+\RequirePackage{amsmath}
 %<LU>\RequirePackage{lualatex-math}
 %    \end{macrocode}
 %
+%    \begin{macrocode}
+\cs_set_protected:Npn \@@_after_package:nNn #1 #2 #3
+  {
+    \AtBeginDocument
+      {
+        \cs_new_protected:Npn #2 {#3}
+        \@ifpackageloaded {#1} {#2} {}
+      }
+  }
+\RequirePackage{xparse,l3keys2e}
+\RequirePackage{fontspec}
+\RequirePackage{fix-cm}
+%<LU>\RequirePackage{lualatex-math}
+%    \end{macrocode}
+%
 % \subsection{\pkg{expl3} variants}
 %
 % Variants needed from \pkg{expl3}:

Modified: trunk/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx	2019-09-26 21:49:25 UTC (rev 52185)
@@ -60,7 +60,7 @@
 %<base>\ProvidesExplPackage{unicode-math}
 %<package&XE>\ProvidesExplPackage{unicode-math-xetex}
 %<package&LU>\ProvidesExplPackage{unicode-math-luatex}
-%<base|package>  {2019/03/04} {0.8o} {Unicode maths in XeLaTeX and LuaLaTeX}
+%<base|package>  {2019/09/26} {0.8p} {Unicode maths in XeLaTeX and LuaLaTeX}
 %    \end{macrocode}
 %
 % Here the version and date are setup for typesetting the documentation.
@@ -67,8 +67,8 @@
 %    \begin{macrocode}
 %<*dtx>
 \date{
-  \def\filedate{2019/03/04}
-  \def\fileversion{0.8o}
+  \def\filedate{2019/09/26}
+  \def\fileversion{0.8p}
   \filedate \qquad \fileversion
 }
 %</dtx>

Modified: trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty	2019-09-26 21:49:25 UTC (rev 52185)
@@ -43,7 +43,7 @@
 %%^^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.
@@ -50,9 +50,21 @@
 
 \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 \::: }
 \cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx,Nxx}
 \cs_generate_variant:Nn \prop_get:NnNTF {cx}
@@ -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,35 +3638,8 @@
 %%^^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
+\__um_after_package:nNn {url} \__um_patch_url:
   {
-    \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}
-  {
     \tl_put_left:Nn \Url at 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 }
+    \DeclareDocumentCommand \dblcolon { } { \Colon }
+    \DeclareDocumentCommand \coloneqq { } { \coloneq }
+    \DeclareDocumentCommand \Coloneqq { } { \Coloneq }
+    \DeclareDocumentCommand \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 }
-  }
 
 %%^^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 at minus\mathcode`\-\relax
@@ -3731,20 +3704,8 @@
       }
     \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 }
+  \cs_set_nopar:Npn \plainroot@ #1 \of #2
     {
-      \setbox \rootbox \hbox
-        {
-          $ \m at th \scriptscriptstyle { #1 } $
-        }
-      \mathchoice
-        { \r@@t \displaystyle      { #2 } }
-        { \r@@t \textstyle         { #2 } }~
-        { \r@@t \scriptstyle       { #2 } }
-        { \r@@t \scriptscriptstyle { #2 } }
-      \egroup
-    }
-    {
       \bool_if:nTF
         {
           \__um_int_if_zero_p:n \uproot@ && \__um_int_if_zero_p:n \leftroot@
@@ -3767,21 +3728,8 @@
         }
        \c_group_end_token
     }
-  \__um_check_and_fix:NNnnn \r@@t \cs_set_nopar:Npn { #1 #2 }
+  \cs_set_nopar:Npn \r@@t #1 #2
     {
-      \setboxz at h { $ \m at th #1 \sqrtsign { #2 } $ }
-      \dimen@ \ht\z@
-      \advance \dimen@ -\dp\z@
-      \setbox\@ne \hbox { $ \m at 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@
-    }
-    {
       \hbox_set:Nn \l_tmpa_box
         {
           \c_math_toggle_token \m at th
@@ -3804,7 +3752,6 @@
         }
         { #2 }
     }
-  }
 
 %%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
 %%^^A%% Assorted definitions to close up.

Modified: trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty	2019-09-26 21:49:25 UTC (rev 52185)
@@ -43,7 +43,7 @@
 %%^^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 <wspr.io/unicode-math>
 %%^^A%% Assorted initialisation tasks, including some low-level function definitions.
@@ -50,8 +50,19 @@
 
 \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}
 \cs_generate_variant:Nn \prop_get:NnNTF {cx}
@@ -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,35 +3566,8 @@
 %%^^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
+\__um_after_package:nNn {url} \__um_patch_url:
   {
-    \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}
-  {
     \tl_put_left:Nn \Url at 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 }
+    \cs_set_nopar:Npn \MT_cramped_internal:Nn ##1 ##2
      {
-       \sbox \z@ { $ \m at 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@
-     }
-     {
        \hbox_set:Nn \l_tmpa_box
          {
            \color at setgroup \c_math_toggle_token \m at th
-             #1
+             ##1
              \dim_zero:N \nulldelimiterspace
-             \XeTeXradical 255 ~ 0 ~ { #2 }
+             \XeTeXradical 255 ~ 0 ~ { ##2 }
            \c_math_toggle_token \color at 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 }
+    \DeclareDocumentCommand \dblcolon { } { \Colon }
+    \DeclareDocumentCommand \coloneqq { } { \coloneq }
+    \DeclareDocumentCommand \Coloneqq { } { \Coloneq }
+    \DeclareDocumentCommand \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 }
-  }
 
 %%^^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 at minus\mathcode`\-\relax
@@ -3706,26 +3656,9 @@
         \setbox\z@\hbox{$($}%)
         \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
       }
-    \__um_check_and_fix:NNnnn \subarray \cs_set:Npn { #1 }
+    \cs_set:Npn \subarray #1
       {
         \vcenter
-        \bgroup
-        \Let@
-        \restore at math@cr
-        \default at 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 at th \scriptstyle ## $
-        \hfil
-        \crcr
-      }
-      {
-        \vcenter
         \c_group_begin_token
         \Let@
         \restore at math@cr
@@ -3748,21 +3681,8 @@
         \hfil
         \crcr
       }
-  \__um_check_and_fix:NNnnn \r@@t \cs_set_nopar:Npn { #1 #2 }
+  \cs_set_nopar:Npn \r@@t #1 #2
     {
-      \setboxz at h { $ \m at th #1 \sqrtsign { #2 } $ }
-      \dimen@ \ht\z@
-      \advance \dimen@ -\dp\z@
-      \setbox\@ne \hbox { $ \m at 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@
-    }
-    {
       \hbox_set:Nn \l_tmpa_box
         {
           \c_math_toggle_token \m at th
@@ -3787,7 +3707,6 @@
       \mkern \leftroot@ mu
       \box_use_drop:N \l_tmpa_box
     }
-  }
 
 %%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
 %%^^A%% Assorted definitions to close up.

Modified: trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty	2019-09-26 21:49:06 UTC (rev 52184)
+++ trunk/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty	2019-09-26 21:49:25 UTC (rev 52185)
@@ -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



More information about the tex-live-commits mailing list