summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-24 21:34:48 +0000
committerKarl Berry <karl@freefriends.org>2023-02-24 21:34:48 +0000
commitdfc7b97f4a6ad4beb9f642257802dbf77173772f (patch)
tree7012ee01bce4084b012ee30ddcfbb4a66e79bb4e /Master/texmf-dist/tex/latex
parente651638b840553dada4878b1454f8de3431b1f82 (diff)
mismath (24feb23) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2022.final@66133 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/mismath/mismath.sty67
1 files changed, 25 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/latex/mismath/mismath.sty b/Master/texmf-dist/tex/latex/mismath/mismath.sty
index cf2ef7cad52..c8fda5df873 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/19 v2.4 .dtx mismath file]
+ [2023/02/24 v2.5 .dtx mismath file]
\newif\ifmm@ibrackets % initialized to false
\DeclareOption{ibrackets}{\mm@ibracketstrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{amsmath}}
@@ -61,14 +61,16 @@
\newcount\mm@charcode
\newcount\mm@charclass
+\newcount\mm@charfam
\newcount\mm@charslot
-\newcommand\@MathUp[1]{%
+\newcommand*\math@family[2]{%
+ \mm@charfam=#2
\ifluatex
\mm@charclass=\Umathcharclass`#1
%\mm@charfam=\Umathcharfam`#1
\mm@charslot=\Umathcharslot`#1
- \Umathcode`#1= \mm@charclass 0 \mm@charslot
+ \Umathcode`#1= \mm@charclass \mm@charfam \mm@charslot
\else
\mm@charcode=\mathcode`#1
% extract charclass
@@ -85,46 +87,23 @@
\mm@charslot=\@tempcntb
% construct charcode
\mm@charcode=\mm@charclass
- \advance\mm@charcode by \mm@charslot % charfam is now 0
+ \multiply\mm@charfam by "100
+ \advance\mm@charcode by \mm@charfam
+ \advance\mm@charcode by \mm@charslot
\mathcode`#1=\mm@charcode
\fi
}
-\newcommand\MathUp[1]{%
+\newcommand*\MathFamily[2]{%
\ifx\@onlypreamble\@notprerr
- \@MathUp{#1}
- \else % in the preamble
- \AtBeginDocument{\@MathUp{#1}}
+ \math@family{#1}{#2}
+ \else % before \begin{document}
+ \AtBeginDocument{\math@family{#1}{#2}}
\fi
}
-\newcommand\MathIt[1]{%
- \ifluatex
- \mm@charclass=\Umathcharclass`#1
- %\mm@charfam=\Umathcharfam`#1
- \mm@charslot=\Umathcharslot`#1
- \Umathcode`#1= \mm@charclass 1 \mm@charslot
- \else
- \mm@charcode=\mathcode`#1
- % extract charclass
- \@tempcnta=\mm@charcode
- \divide\@tempcnta by "1000
- \multiply\@tempcnta by "1000 % charclass
- \mm@charclass=\@tempcnta
- % extract charslot
- \@tempcnta=\mm@charcode
- \@tempcntb=\mm@charcode
- \divide\@tempcnta by "100
- \multiply\@tempcnta by "100 % charclass + charfam
- \advance\@tempcntb by -\@tempcnta % charslot
- \mm@charslot=\@tempcntb
- % construct charcode
- \mm@charcode=\mm@charclass
- \advance\mm@charcode by \mm@charslot
- \advance\mm@charcode by "100 % sets charfam to 1
- \mathcode`#1=\mm@charcode
- \fi
-}
+\newcommand*\MathUp[1]{\MathFamily{#1}{0}}
+\newcommand*\MathIt[1]{\MathFamily{#1}{1}}
\newcommand*\MathNumbers[1]{%
\in@{e}{#1} \ifin@ \MathUp{e} \fi
@@ -138,13 +117,13 @@
\in@{V}{#1} \ifin@ \MathUp{V} \fi
}
-\newcommand*\MathNormal[1]{
- \in@{e}{#1} \ifin@ \MathIt{e} \fi
- \in@{i}{#1} \ifin@ \MathIt{i} \fi
- \in@{j}{#1} \ifin@ \MathIt{j} \fi
- \in@{P}{#1} \ifin@ \MathIt{P} \fi
- \in@{E}{#1} \ifin@ \MathIt{E} \fi
- \in@{V}{#1} \ifin@ \MathIt{V} \fi
+\def\apply#1#2{\apply@#1#2,\apply@,}
+\def\apply@#1#2,{\ifx\apply@#2\empty
+ \else #1{#2}\afterfi@{\apply@#1}\fi}
+\def\afterfi@#1#2\fi{\fi#1}
+
+\newcommand*\MathNormal[1]{% list argument
+ \apply\MathIt{#1}
}
\newcommand{\enumber}{%
@@ -185,6 +164,7 @@
\else % in the preamble
\RequirePackage[LGR,T1]{fontenc}
\DeclareSymbolFont{UpGr}{LGR}{lmr}{m}{n}
+ \let\pi\relax
\DeclareMathSymbol{\pi}\mathalpha{UpGr}{"70}
\let\savedpi\pi
\fi
@@ -228,6 +208,9 @@
}
}{\mm@warning{norm} } % bad result with libertinust1math
+\DeclareMathAlphabet{\mathbfsfit}{\encodingdefault}{\sfdefault}{bx}{it}
+\newcommand{\tensor}{\mathbfsfit} % isomath uses \mathsfbfit
+
\mm@macro{di}{\mathop{}\!\mathup{d}}
\newcommand\probastyle{}
\let\Par\P % end of paragraph symbol