From bfd9c01262f3a2c8b686844bb935c8c5e32b52fc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 2 Mar 2023 21:05:24 +0000 Subject: mismath (2mar23) git-svn-id: svn://tug.org/texlive/trunk@66310 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/mismath/mismath.sty | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/tex/latex/mismath') diff --git a/Master/texmf-dist/tex/latex/mismath/mismath.sty b/Master/texmf-dist/tex/latex/mismath/mismath.sty index c8fda5df873..ec445540693 100644 --- a/Master/texmf-dist/tex/latex/mismath/mismath.sty +++ b/Master/texmf-dist/tex/latex/mismath/mismath.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{mismath} - [2023/02/24 v2.5 .dtx mismath file] + [2023/03/01 v2.6 .dtx mismath file] \newif\ifmm@ibrackets % initialized to false \DeclareOption{ibrackets}{\mm@ibracketstrue} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{amsmath}} @@ -31,6 +31,7 @@ \@ifpackageloaded{mathtools}{}{\RequirePackage{mathtools}} \@ifpackageloaded{esvect}{}{\RequirePackage[b]{esvect}} \RequirePackage{ifthen} +\RequirePackage{xparse} % for \NewDocumentCommand \RequirePackage{xspace} \RequirePackage{iftex} \ifmm@ibrackets\RequirePackage{ibrackets}\fi @@ -44,13 +45,12 @@ \newcommand\mm@macro[2]{ \@ifundefined{#1}{ \expandafter\def\csname #1\endcsname{#2} - }{\\mm@warning{#1}} + }{\mm@warning{#1}} } -\newcommand\mm@operator[3][]{% - \ifthenelse{\equal{#1}{}}{\def\tempa{#3}}{\def\tempa{#1}} - \@ifundefined{\tempa}{ +\NewDocumentCommand\mm@operator{O{#3}mm}{% + \@ifundefined{#1}{ \DeclareMathOperator{#2}{#3} - }{\mm@warning{\tempa}} + }{\mm@warning{#1}} } \providecommand{\mathup}[1]{{\operatorfont #1}} % also in kpfonts @@ -264,7 +264,9 @@ \mm@macro{mathset}{\mathbf} \mm@macro{R}{\ensuremath{\mathset{R}}\xspace} -\mm@macro{C}{\ensuremath{\mathset{C}}\xspace} +\AtBeginDocument{\@ifpackagewith{babel}{russian}{\mm@warning{C} + }{\mm@macro{C}{\ensuremath{\mathset{C}}\xspace}} +} \mm@macro{N}{\ensuremath{\mathset{N}}\xspace} \mm@macro{Z}{\ensuremath{\mathset{Z}}\xspace} \mm@macro{Q}{\ensuremath{\mathset{Q}}\xspace} @@ -283,7 +285,7 @@ \providecommand*{\hlbar}[1]{\overline{\vphantom{t}#1}}}{ \mm@warning{hlbar} } \newcommand\@eqdef{\stackrel{\mathup{def}}{=}} -\newcommand\@@eqdef{\stackrel{\Delta}{=}} +\newcommand\@@eqdef{\stackrel{\mathrm{\Delta}}{=}} \mm@macro{eqdef}{\@ifstar{\@@eqdef}{\@eqdef}} \mm@macro{unbr}{\underbrace} \mm@macro{iif}{if and only if\xspace} -- cgit v1.2.3