Skip to content

Commit

Permalink
fixes issue #22
Browse files Browse the repository at this point in the history
  • Loading branch information
daleif committed Mar 4, 2021
1 parent c371c3e commit 6fbf565
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions ANNOUNCEMENT
Expand Up @@ -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

Expand Down
28 changes: 20 additions & 8 deletions mathtools.dtx
Expand Up @@ -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
Expand Down Expand Up @@ -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.}}
Expand Down Expand Up @@ -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).

This comment has been minimized.

Copy link
@muzimuzhi

muzimuzhi Mar 4, 2021

Contributor

Always typeset opt-args in typewriter font family? For example (default, \texttt{rl} is an alias for \texttt{lr}).

This comment has been minimized.

Copy link
@daleif

daleif Mar 5, 2021

Author Collaborator

right, fixed

This comment has been minimized.

Copy link
@muzimuzhi

muzimuzhi Mar 5, 2021

Contributor

Thanks. Just for the record, fixed in d31bfe4.

% \begin{verbatim}
% \[
% V = \sum_{1\le i\le j\le n}^{\infty} V_{ij} \quad
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -5125,12 +5132,17 @@ 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}
%
Expand Down

0 comments on commit 6fbf565

Please sign in to comment.