summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mismath/mismath.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-11 21:06:43 +0000
committerKarl Berry <karl@freefriends.org>2022-11-11 21:06:43 +0000
commitc9df90cbc0cb5c0858461bad4a0b595d6a789f97 (patch)
treeb261b1dd15c6c67956071349deb588af8ee7df40 /Master/texmf-dist/tex/latex/mismath/mismath.sty
parent5090a02614237b6512f8e3f788efb16f8664d162 (diff)
mismath (11nov22)
git-svn-id: svn://tug.org/texlive/trunk@64993 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mismath/mismath.sty')
-rw-r--r--Master/texmf-dist/tex/latex/mismath/mismath.sty59
1 files changed, 37 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/mismath/mismath.sty b/Master/texmf-dist/tex/latex/mismath/mismath.sty
index f9e1ac47978..d399666a1d9 100644
--- a/Master/texmf-dist/tex/latex/mismath/mismath.sty
+++ b/Master/texmf-dist/tex/latex/mismath/mismath.sty
@@ -22,10 +22,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2022/10/25 v1.10 .dtx mismath file]
-%% \CheckSum{430}
-
-
+ [2022/11/11 v2.0 .dtx mismath file]
+%% \CheckSum{440}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{amsmath}}
\ProcessOptions \relax
\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
@@ -33,7 +31,7 @@
\RequirePackage{ifthen}
\RequirePackage{xspace}
\RequirePackage{mathtools}
-{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}} % the \bslash command
+{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}} % \bslash command
\newcommand\@mwarning[1]{
\PackageWarningNoLine{mismath}{
Command \bslash #1 already exist and will not be redefined}
@@ -55,30 +53,47 @@
}
}
-\providecommand{\mathup}[1]{{\operatorfont #1}} % exist also in kpfonts
+\providecommand{\mathup}[1]{{\operatorfont #1}} % also in kpfonts
\@mmacro{e}{\mathup{e}}
\AtBeginDocument{\let\oldi\i \let\oldj\j
\renewcommand{\i}{\TextOrMath{\oldi}{\mathup{i}}}
\renewcommand{\j}{\TextOrMath{\oldj}{\mathup{j}}} }
\newcommand{\enumber}{
- \AtBeginDocument{\DeclareMathSymbol{e}\mathalpha{operators}{`e}} }
+ \AtBeginDocument{\DeclareMathSymbol{e}\mathalpha{operators}{`e}}}
\newcommand{\inumber}{
- \AtBeginDocument{\DeclareMathSymbol{i}\mathalpha{operators}{`i}} }
+ \AtBeginDocument{\DeclareMathSymbol{i}\mathalpha{operators}{`i}}}
\newcommand{\jnumber}{
- \AtBeginDocument{\DeclareMathSymbol{j}\mathalpha{operators}{`j}} }
-\newcommand*{\pinumber}[1][Euler]{
- \@ifpackageloaded{upgreek}{}{\usepackage[#1]{upgreek}}
+ \AtBeginDocument{\DeclareMathSymbol{j}\mathalpha{operators}{`j}}}
+\newcommand*{\pinumber}[1][defaultpi]{
\@ifundefined{itpi}{\let\itpi\pi}{\@mwarning{itpi}}
- \renewcommand{\pi}{\uppi} }
+ \ifthenelse{\equal{#1}{defaultpi}}{
+ \usepackage[LGR,T1]{fontenc}
+ \DeclareSymbolFont{UpGr}{LGR}{lmr}{m}{n}
+ \DeclareMathSymbol{\pi}\mathalpha{UpGr}{"70}
+ }{
+ \@ifundefined{#1}{
+ \PackageWarningNoLine{mismath}{
+ \bslash pinumber command has changed since v2.0,
+ \MessageBreak
+ option #1 must be a command name \MessageBreak
+ (look at the documentation),
+ but command \bslash #1 is undefined, \MessageBreak
+ I cannot use it for replacement to \bslash pi.
+ \MessageBreak
+ Perhaps a missing package}
+ }{\renewcommand{\pi}{\csname #1\endcsname}}
+ }
+}
\newboolean{arrowvect}
\setboolean{arrowvect}{true}
\newcommand{\arrowvect}{\setboolean{arrowvect}{true}}
\newcommand{\boldvect}{\setboolean{arrowvect}{false}}
-\newcommand{\boldvectcommand}{\boldsymbol} % needs bm package
-\@mmacro{vect}{\ifthenelse{\boolean{arrowvect}}{\vv}{\boldvectcommand}}
-\newcommand*{\hvect}[1]{\vv{\vphantom{h}#1}}
+\newcommand{\boldvectcommand}{\boldsymbol} % from amsbsy package
+\@mmacro{vect}{\ifthenelse{\boolean{arrowvect}}{
+ \vv}{\boldvectcommand}}
+\newcommand*{\hvect}[1]{\vect{\vphantom{t}#1}}
\newcommand*{\hvec}[1]{\vec{\vphantom{t}#1}}
\newcommand*{\@norm}[1]{
@@ -91,8 +106,9 @@
\mbox{\tiny\raisebox{1pt}{$\Vert$}} #1
\mbox{\tiny\raisebox{1pt}{$\Vert$}} }
\@ifundefined{norm}{\providecommand*{\norm}[1]{
- \mathchoice{\@norm{#1}}{\@norm{#1}}{\@@norm{#1}}{\@@@norm{#1}} }}{
- \@mwarning{norm} }
+ \mathchoice{\@norm{#1}}{\@norm{#1}}{\@@norm{#1}}{\@@@norm{#1}}
+ }
+ }{\@mwarning{norm} } % bad result with libertinust1math
\@mmacro{di}{\mathop{}\!\mathup{d}}
\newcommand\probastyle{}
@@ -166,20 +182,19 @@
\@mmacro{lbar}{\overline}
\@ifundefined{hlbar}{
- \providecommand*{\hlbar}[1]{\overline{\vphantom{h}#1}}}{
+ \providecommand*{\hlbar}[1]{\overline{\vphantom{t}#1}}}{
\@mwarning{hlbar} }
\@mmacro{eqdef}{\stackrel{\mathup{def}}{=}}
\@mmacro{unbr}{\underbrace}
\@mmacro{iif}{if and only if\xspace}
-\@mmacro{mul}{\mathord{\times}}
\@mmacro{then}{\ \Longrightarrow \ \mbox{} }
\@ifundefined{txt}{
\providecommand*{\txt}[1]{\quad\text{#1}\quad} }{
\@mwarning{txt} }
-\@ifundefined{paren}{
- \providecommand*{\paren}[1]{\mathopen{\left(#1\right)}} }{
- \@mwarning{paren} }
+\@mmacro{mul}{\mathord{\times}}
+\PackageWarningNoLine{mismath}{Command \bslash paren
+ is no longer supported}
\@ifundefined{pow}{
\providecommand*{\pow}[2]{\left( #1 \right)^{\!#2}} }{
\@mwarning{pow} }