[latex3-commits] [git/LaTeX3-latex3-mathtools] master: Fixes for issue #17 (bc8e1b2)

daleif daleif at math.au.dk
Thu Mar 18 11:19:41 CET 2021


Repository : https://github.com/latex3/mathtools
On branch  : master
Link       : https://github.com/latex3/mathtools/commit/bc8e1b29f32b7d6ebb248ef401e3f29ba1977dde

>---------------------------------------------------------------

commit bc8e1b29f32b7d6ebb248ef401e3f29ba1977dde
Author: daleif <daleif at math.au.dk>
Date:   Thu Mar 18 11:19:41 2021 +0100

    Fixes for issue #17


>---------------------------------------------------------------

bc8e1b29f32b7d6ebb248ef401e3f29ba1977dde
 ANNOUNCEMENT  |  6 +++---
 mathtools.dtx | 45 +++++++++++++++++++++++++++++++--------------
 2 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/ANNOUNCEMENT b/ANNOUNCEMENT
index 8790fa5..21b0762 100644
--- a/ANNOUNCEMENT
+++ b/ANNOUNCEMENT
@@ -2,11 +2,13 @@ Announcement release 2021/xx/xx
 
 For mathtools.dtx:
 
-* fixed issue #18, thanks to RuixiZhang42
+* fixed issue #18, thanks to Ruixi Zhang
 * fixed issue #20 (via https://tex.stackexchange.com/a/252412/3929)
 * fixed issue #22 
 * fixed issue #21, suggestions for documentation by Rimole.
 * fixed issue #19
+* fixed issue #17, thanks to Ruixi Zhang and David Carlisle
+
 
 For mhsetup.dtx
 
@@ -15,7 +17,6 @@ For mhsetup.dtx
   alignments. Solution provided by Phelype Oleinik
 
 
-
 Announcement release 2020/03/24
 
 * mathtools and empheq is now hosted at https://github.com/latex3/mathtools 
@@ -38,7 +39,6 @@ Announcement release 2020/03/24
   (issues #5, #6 and #8)
 
 
-
 Announcement release 2020/01/17
 
 * a few typos in the manual (from  Mike Dworski)
diff --git a/mathtools.dtx b/mathtools.dtx
index 9c017fb..dd5b05e 100644
--- a/mathtools.dtx
+++ b/mathtools.dtx
@@ -321,7 +321,7 @@ colorlinks,
 %
 %  \GetFileInfo{mathtools.drv}
 %
-%  \CheckSum{3350}
+%  \CheckSum{3364}
 %
 %  \title{The \pkg{mathtools} package\thanks{This file has version number
 %  \fileversion, last revised \filedate.}}
@@ -1967,11 +1967,11 @@ colorlinks,
 %
 %  Thus
 %  \begin{quote}
-%    \cs{DeclarePairedDelimiter}\marg{cmd}\marg{left_delim}\marg{right_delim}
+%   \cs{DeclarePairedDelimiter}\marg{cmd}\marg{left_delim}\marg{right_delim}
 %  \end{quote}
 %  is the same thing as
 %  \begin{quote}
-%    \cs{DeclarePairedDelimiterX}\marg{cmd}\verb|[1]|\marg{left_delim}\marg{right_delim}\verb|{#1}|
+%   \cs{DeclarePairedDelimiterX}\marg{cmd}\texttt{[1]}\marg{left_delim}\marg{right_delim}\rlap{\texttt{\{\#1\}}}
 %  \end{quote}
 %  %
 %  Let us do some examples. First we want to prepare a macro for inner
@@ -2936,12 +2936,12 @@ colorlinks,
 %   \url{https://www.tug.org/TUGboat/tb22-4/tb72perlS.pdf}.
 % \bibitem{Ams99} American Mathematical Society and Michael Downes,
 %   \emph{Technical notes on the \pkg{amsmath} package}. Version 2.0,
-%   1999/10/29. Available from CTAN as
+%   1999/10/29. Available via
 %   \url{http://mirrors.ctan.org/macros/latex/required/amsmath/technote.pdf}.
 % \bibitem{Ams00} Frank Mittelbach, Rainer Sch\"opf, Michael Downes,
 %   David M.~Jones and David Carlisle, \emph{The \pkg{amsmath}
 %   package}. Version 2.17e, 2020/01/20. Maintained by the \LaTeX3
-%   project.  Available from CTAN as file
+%   project.  Available as file
 %   \url{http://mirrors.ctan.org/macros/latex/required/amsmath/amsmath.dtx}.
 %  \bibitem{A-W:MG04}
 %    Frank Mittelbach and Michel Goossens.
@@ -2951,13 +2951,13 @@ colorlinks,
 %    With Johannes Braams, David Carlisle, and Chris Rowley.
 %
 %  \bibitem{Carl99} David Carlisle, \emph{The \pkg{keyval} Package}.
-%    Version 1.15, 2014/10/28.  Available from CTAN via
+%    Version 1.15, 2014/10/28.  Available via
 %    \url{https://ctan.org/pkg/keyval}.
 %
 %  \bibitem{Voss:2004} Herbert Vo\ss, \emph{Math mode}. Version 2.47,
-%    2014/01/30.  Available from CTAN as
+%    2014/01/30.  Available as
 %    \url{http://mirrors.ctan.org/obsolete/info/math/voss/mathmode/Mathmode.pdf}. Please
-%    note that the author sees the document as obsolete.
+%    note that the author has marked the document as \emph{obsolete}.
 %  
 %   \bibitem{Swanson} 
 %     Ellen Swanson,
@@ -2966,9 +2966,9 @@ colorlinks,
 %     Updated by Arlene O'Sean and Antoinette Schleyer. Available from
 %     the AMS at \url{https://www.ams.org/arc/styleguide/mit-2.pdf}.
 %
-%   \bibitem{TBT}
-%   Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician's Reference}, 2007. 
-%   Freely available at \url{https://ctan.org/pkg/texbytopic}.
+%   \bibitem{TBT} Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician's
+%     Reference}, 2007.  The book is available at
+%     \url{https://ctan.org/pkg/texbytopic}.
 %  \end{thebibliography}
 %
 %
@@ -4159,7 +4159,13 @@ colorlinks,
     \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
     \lineskiplimit\lineskip
     \ialign\bgroup\ifx c##1\hfil\fi
-    $\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
+%    \end{macrocode}
+% \changes{v1.25}{2021/03/18}{use \cs{MT_cramped_internal:Nn} instead,
+% see issue \#17}
+% Here we should use the proper cramped internal macro
+%    \begin{macrocode}
+    %% $\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
+    \span\MT_cramped_internal:Nn \scriptstyle {####}%
     \hfil\crcr
   }{%
     \crcr\egroup\egroup
@@ -5920,8 +5926,12 @@ colorlinks,
 %  issuing a non-existing radical.
 % \changes{v1.25}{2020/12/16}{Don't set \cs{nulldelimiterspace} to
 % zero, back kern intead, solves issue \#18}
+% \changes{v1.25}{2021/03/18}{placed \cs{sbox}\cs{z@} by
+% \cs{setbox}\cs{z@}\cs{hbox} to better handle expansion in
+% \env{crampedsubarray}, see issue \#17}
 %    \begin{macrocode}
-  \sbox\z@{$\m at th#1\kern-\nulldelimiterspace\radical\z@{#2}$}
+  %% \sbox\z@{$\m at th#1\kern-\nulldelimiterspace\radical\z@{#2}$}
+  \setbox\z@\hbox{$\m at th#1\kern-\nulldelimiterspace\radical\z@{#2}$}
 %    \end{macrocode}
 %  Then make sure the height is correct.
 %    \begin{macrocode}
@@ -6023,7 +6033,14 @@ colorlinks,
   \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
   \lineskiplimit\lineskip
   \ialign\bgroup\ifx c#1\hfil\fi
-  $\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+%    \end{macrocode}
+% Though here we ought to use the proper cramped internal macro, as
+% otherwise there will be a slight difference in vertical spacing
+% \changes{v1.25}{2021/03/18}{Added \cs{MT_cramped_internal:Nn}, see
+% issue \#17}
+%    \begin{macrocode}
+  %%$\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+  \span\MT_cramped_internal:Nn \scriptstyle {##}%
   \hfil\crcr%
 }{%
 \crcr\egroup\egroup





More information about the latex3-commits mailing list.