[latex3-commits] [git/LaTeX3-latex3-mathtools] master: fixes issue #22 (6fbf565)
daleif
daleif at math.au.dk
Thu Mar 4 12:08:57 CET 2021
Repository : https://github.com/latex3/mathtools
On branch : master
Link : https://github.com/latex3/mathtools/commit/6fbf565ed13b9d49f347cb38f6036f92eabf3dd7
>---------------------------------------------------------------
commit 6fbf565ed13b9d49f347cb38f6036f92eabf3dd7
Author: daleif <daleif at math.au.dk>
Date: Thu Mar 4 12:08:57 2021 +0100
fixes issue #22
>---------------------------------------------------------------
6fbf565ed13b9d49f347cb38f6036f92eabf3dd7
ANNOUNCEMENT | 2 ++
mathtools.dtx | 26 +++++++++++++++++++-------
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/ANNOUNCEMENT b/ANNOUNCEMENT
index 80c2352..459ca76 100644
--- a/ANNOUNCEMENT
+++ b/ANNOUNCEMENT
@@ -4,6 +4,8 @@ For mathtools.dtx:
* fixed issue #18, thanks to RuixiZhang42
* fixed issue #20 (via https://tex.stackexchange.com/a/252412/3929)
+* fixed issue #22
+
For mhsetup.dtx
diff --git a/mathtools.dtx b/mathtools.dtx
index 63ed322..d616584 100644
--- a/mathtools.dtx
+++ b/mathtools.dtx
@@ -81,7 +81,7 @@ This is a generated file.
Copyright (C) 2002-2011 by Morten Hoegholm
Copyright (C) 2012-2019 by Lars Madsen
-Copyright (C) 2020 by Lars Madsen, the LaTeX3 project
+Copyright (C) 2020- by Lars Madsen, the LaTeX3 project
This work may be distributed and/or modified under the
@@ -321,7 +321,7 @@ colorlinks,
%
% \GetFileInfo{mathtools.drv}
%
-% \CheckSum{3333}
+% \CheckSum{3340}
%
% \title{The \pkg{mathtools} package\thanks{This file has version number
% \fileversion, last revised \filedate.}}
@@ -704,8 +704,8 @@ colorlinks,
% To make things easier, \pkg{mathtools} provides a
% \cs{smashoperator} command, which simply ignores the width of the
% sub- and superscript. It also takes an optional argument,
-% \texttt{l}, \texttt{r}, or \texttt{lr} (default), denoting which
-% side of the operator should be ignored (smashed).
+% \texttt{l}, \texttt{r}, or \texttt{lr} (default, rl is an alias for
+% lr), denoting which side of the operator should be ignored (smashed).
% \begin{verbatim}
% \[
% V = \sum_{1\le i\le j\le n}^{\infty} V_{ij} \quad
@@ -4919,12 +4919,19 @@ colorlinks,
% specialized commands \cs{MT_smop_smash_l:NNNNN},
% \cs{MT_smop_smash_r:NNNNN}, or the default
% \cs{MT_smop_smash_lr:NNNNN}.
+% \changes{v1.25}{2021/03/04}{Verify that opt arg corresponds to
+% something predefined}
% \begin{macrocode}
\newcommand*\smashoperator[2][lr]{
- \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}}
- \toks@{#2}
- \expandafter\MT_smop_get_args:wwwNnNn
+ \@ifundefined{MT_smop_smash_#1:NNNNN}{
+ \PackageError{mathtools}{Opt~ arg~ '#1'~ for~ \@backslashchar smashoperator~
+ is~ not~ supported.\MessageBreak Use~ l,~r~or~lr~ (default)}{}
+ }{
+ \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}}
+ \toks@{#2}
+ \expandafter\MT_smop_get_args:wwwNnNn
\the\toks@\@nil\@nil\@nil\@nil\@nil\@nil\@@nil
+ }
}
% \end{macrocode}
% \end{macro}
@@ -5125,11 +5132,16 @@ colorlinks,
}
% \end{macrocode}
% The `lr' variant
+% \changes{v1.25}{2021/03/04}{add `rl' as an alias for `lr'}
% \begin{macrocode}
\def\MT_smop_smash_lr:NNNNN #1#2#3#4#5{
\MT_smop_needed_args:NNNNN #1#2#3#4#5
}
% \end{macrocode}
+% Add `rl' as an alias for `lr'
+% \begin{macrocode}
+\MH_let:NwN \MT_smop_smash_rl:NNNNN \MT_smop_smash_lr:NNNNN
+% \end{macrocode}
%
%
% \subsection{Adjusting limits}
More information about the latex3-commits
mailing list.