summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-12 22:55:50 +0000
committerKarl Berry <karl@freefriends.org>2013-12-12 22:55:50 +0000
commit58e9dc36a6522eda2493956fc1afa754ad91ed75 (patch)
tree5408b6e26e90705c672f1992ebabbf50e04a4ef1 /Master/texmf-dist/tex/latex
parent56e6621537fc012c8c61abde2fe8f1ec880f0a8d (diff)
mathastext (12dec13)
git-svn-id: svn://tug.org/texlive/trunk@32394 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/mathastext/mathastext.sty734
1 files changed, 388 insertions, 346 deletions
diff --git a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
index 116c207eda1..0900723cefe 100644
--- a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
+++ b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
@@ -20,15 +20,17 @@
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
-%%
-\ProvidesPackage{mathastext}
- [2013/09/04 v1.3a Use the text font in math mode (jfB)]
-%%
-%% Package `mathastext', for LaTeX2e.
-%% Author: Jean-Francois Burnol
+%%----------------------------------------------------------------
+%% The mathastext package (version 1.3b of December 10, 2013)
+%% Use the text font in math mode (jfB)
%% Copyright (C) 2011, 2012, 2013 by Jean-Francois Burnol
-%%
+%% Examples of use of mathastext:
+%% http://jf.burnol.free.fr/mathastext.html
+%% http://jf.burnol.free.fr/showcase.html
+%%----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage {mathastext}
+ [2013/12/11 v1.3b Use the text font in math mode (jfB)]
\newif\ifmst@XeTeX
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname XeTeXinterchartoks\endcsname\relax
@@ -47,7 +49,6 @@
\def\mst@eui{EU1}\def\mst@euii{EU2}
\newif\ifmst@goahead
\newif\ifmst@abort
-\newif\ifmst@optionalparam
\def\mst@enc{\encodingdefault}
\def\mst@fam{\familydefault}
\def\mst@ser{\seriesdefault}
@@ -522,12 +523,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\ifmst@italic\else\def\mst@ltsh{#1}\fi}
\newcommand*\MTboldvariant[1]{\def\mst@bold{#1}}
\newcommand*\MTlettershape[1]{\def\mst@ltsh{#1}}
-\@onlypreamble\MTencoding
-\@onlypreamble\MTfamily
-\@onlypreamble\MTseries
-\@onlypreamble\MTshape
-\@onlypreamble\MTboldvariant
-\@onlypreamble\MTlettershape
\let\Mathastextencoding\MTencoding
\let\Mathastextfamily\MTfamily
\let\Mathastextseries\MTseries
@@ -540,62 +535,74 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@upgreektrue\mst@itgreekfalse\def\mst@greek@select{0}}
\newcommand*\MTitGreek{\def\mst@greek@select{1}}
\newcommand*\MTupGreek{\def\mst@greek@select{2}}
-\@onlypreamble\MTitgreek
-\@onlypreamble\MTupgreek
-\@onlypreamble\MTitGreek
-\@onlypreamble\MTitGreek
\let\Mathastextitgreek\MTitgreek
\let\Mathastextupgreek\MTupgreek
\let\MathastextitGreek\MTitGreek
\let\MathastextupGreek\MTupGreek
+\@onlypreamble\MTitgreek
+\@onlypreamble\MTupgreek
+\@onlypreamble\MTitGreek
+\@onlypreamble\MTitGreek
+\@onlypreamble\Mathastextitgreek
+\@onlypreamble\Mathastextupgreek
+\@onlypreamble\MathastextitGreek
+\@onlypreamble\MathastextitGreek
\newcommand*\MTgreekfont[1]{\def\mst@greekfont{#1}}
-\@onlypreamble\MTgreekfont
\let\Mathastextgreekfont\MTgreekfont
-\newcommand*\MTWillUse[5][\empty]{
+\@onlypreamble\MTgreekfont
+\@onlypreamble\Mathastextgreekfont
+\newcommand*\MTWillUse[5][]{
\MTencoding{#2}
\MTfamily{#3}
\MTseries{#4}
\MTshape{#5}
\ifmst@italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
- \ifx\empty#1
- \else
-%% we check if optional argument was [], this does not detect [ ]
- \def\mst@tmp{#1}
- \ifx\empty\mst@tmp\else\MTlettershape{#1}\fi
- \fi
+ \edef\mst@tmp{#1}
+ \ifx\mst@tmp\empty\else\MTlettershape{#1}\fi
\Mathastext}
-\@onlypreamble\MTWillUse
\let\MathastextWillUse\MTWillUse
\let\Mathastextwilluse\MTWillUse
-\newcommand*\Mathastext[1][\empty]{
-\ifx\empty#1 % no optional argument
+\@onlypreamble\MTWillUse
+\@onlypreamble\MathastextWillUse
+\@onlypreamble\Mathastextwilluse
+\def\Mathastext {\@ifnextchar [\Mathastext@declare\Mathastext@ }
+\def\Mathastext@declare [#1]{%
+ \edef\mst@tmp{#1}%
+ \ifx\mst@tmp\empty
+ \expandafter\@firstoftwo
+ \else\expandafter\@secondoftwo
+ \fi
+ \Mathastext@
+ {\MTDeclareVersion[\mst@ltsh]{#1}{\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh}}%
+}
+\def\Mathastext@ {%
\mst@update@greeksh
- \edef\mst@encoding@normal{\mst@enc}
- \edef\mst@family@normal{\mst@fam}
- \edef\mst@series@normal{\mst@ser}
- \edef\mst@shape@normal{\mst@opsh}
- \edef\mst@ltshape@normal{\mst@ltsh}
- \edef\mst@itdefault@normal{\itdefault}
- \edef\mst@rmdefault@normal{\rmdefault}
- \edef\mst@sfdefault@normal{\sfdefault}
- \edef\mst@ttdefault@normal{\ttdefault}
- \edef\mst@boldvariant@normal{\mst@bold}
- \edef\mst@exists@skip@normal{\mst@exists@skip}
- \edef\mst@forall@skip@normal{\mst@forall@skip}
- \edef\mst@prime@skip@normal{\mst@prime@skip}
- \edef\mst@encoding@bold{\mst@enc}
- \edef\mst@family@bold{\mst@fam}
- \edef\mst@series@bold{\mst@bold}
- \edef\mst@shape@bold{\mst@opsh}
- \edef\mst@ltshape@bold{\mst@ltsh}
- \edef\mst@boldvariant@bold{\mst@bold}
- \edef\mst@itdefault@bold{\itdefault}
- \edef\mst@rmdefault@bold{\rmdefault}
- \edef\mst@sfdefault@bold{\sfdefault}
- \edef\mst@ttdefault@bold{\ttdefault}
- \edef\mst@exists@skip@bold{\mst@exists@skip}
- \edef\mst@forall@skip@bold{\mst@forall@skip}
- \edef\mst@prime@skip@bold{\mst@prime@skip}
+ \edef\mst@encoding@normal{\mst@enc}%
+ \edef\mst@family@normal{\mst@fam}%
+ \edef\mst@series@normal{\mst@ser}%
+ \edef\mst@shape@normal{\mst@opsh}%
+ \edef\mst@ltshape@normal{\mst@ltsh}%
+ \edef\mst@itdefault@normal{\itdefault}%
+ \edef\mst@rmdefault@normal{\rmdefault}%
+ \edef\mst@sfdefault@normal{\sfdefault}%
+ \edef\mst@ttdefault@normal{\ttdefault}%
+ \edef\mst@boldvariant@normal{\mst@bold}%
+ \edef\mst@exists@skip@normal{\mst@exists@skip}%
+ \edef\mst@forall@skip@normal{\mst@forall@skip}%
+ \edef\mst@prime@skip@normal{\mst@prime@skip}%
+ \edef\mst@encoding@bold{\mst@enc}%
+ \edef\mst@family@bold{\mst@fam}%
+ \edef\mst@series@bold{\mst@bold}%
+ \edef\mst@shape@bold{\mst@opsh}%
+ \edef\mst@ltshape@bold{\mst@ltsh}%
+ \edef\mst@boldvariant@bold{\mst@bold}%
+ \edef\mst@itdefault@bold{\itdefault}%
+ \edef\mst@rmdefault@bold{\rmdefault}%
+ \edef\mst@sfdefault@bold{\sfdefault}%
+ \edef\mst@ttdefault@bold{\ttdefault}%
+ \edef\mst@exists@skip@bold{\mst@exists@skip}%
+ \edef\mst@forall@skip@bold{\mst@forall@skip}%
+ \edef\mst@prime@skip@bold{\mst@prime@skip}%
\MTicinmath % does \MTmathactiveletters, \MTnoicinmath only cancels ics
\@for\mst@tmp:=it,sl\do{\ifx\mst@tmp\mst@ltshape@normal\MTnoicinmath\fi}%
\ifmst@frenchmath
@@ -608,12 +615,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\MTmathoperatorsdonotobeymathxx
\MTmathstandardletters % prior to 1.3, was \MTnoicinmath
\ifmst@asterisk\let\mst@doasterisk\relax\fi
- \def\mst@exists@skip@normal{0mu}
- \def\mst@forall@skip@normal{0mu}
- \def\mst@prime@skip@normal{0mu}
- \def\mst@exists@skip@bold{0mu}
- \def\mst@forall@skip@bold{0mu}
- \def\mst@prime@skip@bold{0mu}
+ \def\mst@exists@skip@normal{0mu}%
+ \def\mst@forall@skip@normal{0mu}%
+ \def\mst@prime@skip@normal{0mu}%
+ \def\mst@exists@skip@bold{0mu}%
+ \def\mst@forall@skip@bold{0mu}%
+ \def\mst@prime@skip@bold{0mu}%
\else % not subdued
\ifmst@italic
\ifmst@frenchmath
@@ -621,12 +628,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@forall@muskip\mst@forall@skip\relax
\mst@prime@muskip\mst@prime@skip\relax
\else
- \def\mst@exists@skip@normal{0mu}
- \def\mst@forall@skip@normal{0mu}
- \def\mst@prime@skip@normal{0mu}
- \def\mst@exists@skip@bold{0mu}
- \def\mst@forall@skip@bold{0mu}
- \def\mst@prime@skip@bold{0mu}
+ \def\mst@exists@skip@normal{0mu}%
+ \def\mst@forall@skip@normal{0mu}%
+ \def\mst@prime@skip@normal{0mu}%
+ \def\mst@exists@skip@bold{0mu}%
+ \def\mst@forall@skip@bold{0mu}%
+ \def\mst@prime@skip@bold{0mu}%
\fi
\else
\mst@exists@muskip\mst@exists@skip\relax
@@ -635,236 +642,242 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\fi
\fi
%% v1.15f
-\ifmst@nonormalbold\else
- \SetMathAlphabet{\mathnormalbold}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@boldvariant@normal}
- {\mst@ltshape@normal}
- \SetMathAlphabet{\mathnormalbold}{bold}{\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@boldvariant@bold}
- {\mst@ltshape@bold}
-\fi
+ \ifmst@nonormalbold\else
+ \SetMathAlphabet{\mathnormalbold}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@boldvariant@normal}%
+ {\mst@ltshape@normal}%
+ \SetMathAlphabet{\mathnormalbold}{bold}{\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@boldvariant@bold}%
+ {\mst@ltshape@bold}%
+ \fi
%% v1.15f adds \ifmst@default.. checks
-\ifmst@subdued\else
- \SetSymbolFont{mtletterfont}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@normal}
- {\mst@ltshape@normal}
- \SetSymbolFont{mtletterfont}{bold} {\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@ltshape@bold}
- \SetSymbolFont{mtoperatorfont}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@normal}
- {\mst@shape@normal}
- \SetSymbolFont{mtoperatorfont}{bold} {\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\ifmst@defaultbf\else
- \SetMathAlphabet{\Mathbf}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@bold}
- {\mst@shape@normal}
- \SetMathAlphabet{\Mathbf}{bold}{\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\fi\ifmst@defaultit\else
- \SetMathAlphabet{\Mathit}{normal}{\mst@encoding@normal}
- {\mst@family@normal}
- {\mst@series@normal}
- {\mst@itdefault@normal}
- \SetMathAlphabet{\Mathit}{bold}{\mst@encoding@bold}
- {\mst@family@bold}
- {\mst@series@bold}
- {\mst@itdefault@bold}
-\fi\ifmst@defaultsf\else
- \SetMathAlphabet{\Mathsf}{normal}{\mst@encoding@normal}
- {\mst@sfdefault@normal}
- {\mst@series@normal}
- {\mst@shape@normal}
- \SetMathAlphabet{\Mathsf}{bold}{\mst@encoding@bold}
- {\mst@sfdefault@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\fi\ifmst@defaulttt\else
- \SetMathAlphabet{\Mathtt}{normal}{\mst@encoding@normal}
- {\mst@ttdefault@normal}
- {\mst@series@normal}
- {\mst@shape@normal}
- \SetMathAlphabet{\Mathtt}{bold}{\mst@encoding@bold}
- {\mst@ttdefault@bold}
- {\mst@series@bold}
- {\mst@shape@bold}
-\fi\fi % de \ifmst@subdued
- \ifmst@needeuler
- \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst@boldvariant@normal}{n}
- \SetMathAlphabet{\MathEulerBold}{normal}
- {U}{zeur}{\mst@boldvariant@normal}{n}
- \SetMathAlphabet{\MathEulerBold}{bold}
- {U}{zeur}{\mst@boldvariant@normal}{n}
- \fi
- \ifmst@needsymbol\SetSymbolFont{mtpsymbol}{bold}
- {U}{psy}{\mst@boldvariant@normal}{n}
- \fi
-\ifmst@subdued\else
-\ifmst@LGRgreek
- \SetSymbolFont{mtlgrfontlower}{normal}{LGR}
- {\mst@greekfont}{\mst@series@normal}{\mst@greek@lsh}
- \SetSymbolFont{mtlgrfontlower}{bold}{LGR}
- {\mst@greekfont}{\mst@boldvariant@normal}{\mst@greek@lsh}
- \SetSymbolFont{mtlgrfontupper}{normal}{LGR}
- {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}
- \SetSymbolFont{mtlgrfontupper}{bold}{LGR}
- {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}
- \else
-\ifmst@selfGreek
- \SetSymbolFont{mtselfGreekfont}{normal}{OT1}
- {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}
- \SetSymbolFont{mtselfGreekfont}{bold}{OT1}
- {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}
-\fi\fi\fi
-\ifmst@subdued
-\typeout{** subdued mode will be activated for the normal and bold math versions}
-\else
-\typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
- ** set up to use the fonts
-\mst@encoding@normal/\mst@family@normal/\mst@series@normal%
-(\mst@boldvariant@normal)/\mst@ltshape@normal}
-\ifmst@LGRgreek\typeout{** Greek letters (\mst@greek@lsh/\mst@greek@ush)
-will use LGR/\mst@greekfont}
-\fi
-\ifmst@nodigits\else\typeout{** Other characters (digits, ...)
-and \protect\log-like names will be^^J%
-** typeset with the \mst@shape@normal\space shape.}
-\fi
-\fi
-\else % optional argument, then we rather do DeclareVersion
- \edef\mst@tmp{#1}
- \ifx\mst@tmp\empty
- \Mathastext % no infinite loop!
+ \ifmst@subdued\else
+ \SetSymbolFont{mtletterfont}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@normal}%
+ {\mst@ltshape@normal}%
+ \SetSymbolFont{mtletterfont}{bold} {\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@ltshape@bold}%
+ \SetSymbolFont{mtoperatorfont}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@normal}%
+ {\mst@shape@normal}%
+ \SetSymbolFont{mtoperatorfont}{bold} {\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \ifmst@defaultbf\else
+ \SetMathAlphabet{\Mathbf}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@bold}%
+ {\mst@shape@normal}%
+ \SetMathAlphabet{\Mathbf}{bold}{\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \fi
+ \ifmst@defaultit\else
+ \SetMathAlphabet{\Mathit}{normal}{\mst@encoding@normal}%
+ {\mst@family@normal}%
+ {\mst@series@normal}%
+ {\mst@itdefault@normal}%
+ \SetMathAlphabet{\Mathit}{bold}{\mst@encoding@bold}%
+ {\mst@family@bold}%
+ {\mst@series@bold}%
+ {\mst@itdefault@bold}%
+ \fi
+ \ifmst@defaultsf\else
+ \SetMathAlphabet{\Mathsf}{normal}{\mst@encoding@normal}%
+ {\mst@sfdefault@normal}%
+ {\mst@series@normal}%
+ {\mst@shape@normal}%
+ \SetMathAlphabet{\Mathsf}{bold}{\mst@encoding@bold}%
+ {\mst@sfdefault@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \fi
+ \ifmst@defaulttt\else
+ \SetMathAlphabet{\Mathtt}{normal}{\mst@encoding@normal}%
+ {\mst@ttdefault@normal}%
+ {\mst@series@normal}%
+ {\mst@shape@normal}%
+ \SetMathAlphabet{\Mathtt}{bold}{\mst@encoding@bold}%
+ {\mst@ttdefault@bold}%
+ {\mst@series@bold}%
+ {\mst@shape@bold}%
+ \fi
+ \fi % de \ifmst@subdued
+ \ifmst@needeuler
+ \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mst@boldvariant@normal}{n}%
+ \SetMathAlphabet{\MathEulerBold}{normal}%
+ {U}{zeur}{\mst@boldvariant@normal}{n}%
+ \SetMathAlphabet{\MathEulerBold}{bold}%
+ {U}{zeur}{\mst@boldvariant@normal}{n}%
+ \fi
+ \ifmst@needsymbol\SetSymbolFont{mtpsymbol}{bold}%
+ {U}{psy}{\mst@boldvariant@normal}{n}%
+ \fi
+ \ifmst@subdued\else
+ \ifmst@LGRgreek
+ \SetSymbolFont{mtlgrfontlower}{normal}{LGR}%
+ {\mst@greekfont}{\mst@series@normal}{\mst@greek@lsh}%
+ \SetSymbolFont{mtlgrfontlower}{bold}{LGR}%
+ {\mst@greekfont}{\mst@boldvariant@normal}{\mst@greek@lsh}%
+ \SetSymbolFont{mtlgrfontupper}{normal}{LGR}%
+ {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}%
+ \SetSymbolFont{mtlgrfontupper}{bold}{LGR}%
+ {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}%
+ \else
+ \ifmst@selfGreek
+ \SetSymbolFont{mtselfGreekfont}{normal}{OT1}%
+ {\mst@greekfont}{\mst@series@normal}{\mst@greek@ush}%
+ \SetSymbolFont{mtselfGreekfont}{bold}{OT1}%
+ {\mst@greekfont}{\mst@boldvariant@bold}{\mst@greek@ush}%
+ \fi
+ \fi
+ \fi
+ \ifmst@subdued
+ \typeout{** subdued mode will be activated for the normal and bold math versions}%
\else
- \MTDeclareVersion[\mst@ltsh]{#1}
- {\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh}
- \fi
-\fi
+ \typeout{** Latin letters in the normal (resp. bold) math versions are now^^J%
+ ** set up to use the fonts
+ \mst@encoding@normal/\mst@family@normal/\mst@series@normal%
+ (\mst@boldvariant@normal)/\mst@ltshape@normal}%
+ \ifmst@LGRgreek\typeout{** Greek letters (\mst@greek@lsh/\mst@greek@ush)
+ will use LGR/\mst@greekfont}%
+ \fi
+ \ifmst@nodigits\else
+ \typeout{** Other characters (digits, ...) and \protect\log-like names will be^^J%
+ ** typeset with the \mst@shape@normal\space shape.}%
+ \fi
+ \fi
}
-\@onlypreamble\Mathastext
\let\mathastext\Mathastext
-\newcommand*\MTDeclareVersion[6][\empty]{
- \edef\mst@version{#2}
- \DeclareMathVersion{\mst@version}
- \expandafter\edef\csname mst@encoding@\mst@version\endcsname{#3}
- \expandafter\edef\csname mst@family@\mst@version\endcsname{#4}
- \expandafter\edef\csname mst@series@\mst@version\endcsname{#5}
- \expandafter\edef\csname mst@shape@\mst@version\endcsname{#6}
- \expandafter\edef\csname mst@boldvariant@\mst@version\endcsname{\mst@bold}
- \expandafter\edef\csname mst@itdefault@\mst@version\endcsname{\itdefault}
- \expandafter\edef\csname mst@rmdefault@\mst@version\endcsname{\rmdefault}
- \expandafter\edef\csname mst@sfdefault@\mst@version\endcsname{\sfdefault}
- \expandafter\edef\csname mst@ttdefault@\mst@version\endcsname{\ttdefault}
+\@onlypreamble\Mathastext
+\@onlypreamble\mathastext
+\newcommand*\MTDeclareVersion[6][]{%
+ \def\mst@declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
+ \edef\mst@version{#2}%
+ \DeclareMathVersion{\mst@version}%
+ \MTDeclareVersion@
+}
+\newcommand*\MTDeclareVersion@[1][]{%
+ \edef\mst@tmp{#1}%
+ \ifx\mst@tmp\empty\else
+ \global\expandafter\let\csname mv@\mst@version\expandafter\endcsname
+ \csname mv@#1\endcsname
+ \typeout{** Math version \mst@version\space inherits from `#1\string'.}%
+ \fi
+ \expandafter\MTDeclareVersion@@\mst@declareversionargs
+}
+\newcommand*\MTDeclareVersion@@[6]{%
+ \expandafter\edef\csname mst@encoding@\mst@version\endcsname{#3}%
+ \expandafter\edef\csname mst@family@\mst@version\endcsname{#4}%
+ \expandafter\edef\csname mst@series@\mst@version\endcsname{#5}%
+ \expandafter\edef\csname mst@shape@\mst@version\endcsname{#6}%
+ \expandafter\edef\csname mst@boldvariant@\mst@version\endcsname{\mst@bold}%
+ \expandafter\edef\csname mst@itdefault@\mst@version\endcsname{\itdefault}%
+ \expandafter\edef\csname mst@rmdefault@\mst@version\endcsname{\rmdefault}%
+ \expandafter\edef\csname mst@sfdefault@\mst@version\endcsname{\sfdefault}%
+ \expandafter\edef\csname mst@ttdefault@\mst@version\endcsname{\ttdefault}%
\expandafter\edef\csname mst@exists@skip@\mst@version\endcsname
- {\mst@exists@skip}
+ {\mst@exists@skip}%
\expandafter\edef\csname mst@forall@skip@\mst@version\endcsname
- {\mst@forall@skip}
+ {\mst@forall@skip}%
\expandafter\edef\csname mst@prime@skip@\mst@version\endcsname
- {\mst@prime@skip}
- \mst@optionalparamfalse
- \ifx\empty#1
- \else % we check nevertheless for [] situation, will not work with [ ]
- \def\mst@tmp{#1}
- \ifx\mst@tmp\empty\else\mst@optionalparamtrue\fi
- \fi
- \ifmst@optionalparam
- \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}
- \typeout{** Latin letters in math version `#2\string' will use the font
- #3/#4/#5/#1^^J%
- ** Other characters (digits, ...) and \protect\log-like
- names will be in #6 shape.}
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1}
- \else
+ {\mst@prime@skip}%
+ \ifx\mst@tmp\empty
\ifmst@italic
- \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst@ltsh}
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst@ltsh}%
\typeout{** Latin letters in math version `#2\string' will use the font
#3/#4/#5/\mst@ltsh^^J%
** Other characters (digits, ...) and \protect\log-like names
- will be in #6 shape.}
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{\mst@ltsh}
+ will be in #6 shape.}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{\mst@ltsh}%
\else
- \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
\typeout{** Latin letters in math version `#2\string' will use the fonts
- #3/#4/#5(\mst@bold)/#6}
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#6}
+ #3/#4/#5(\mst@bold)/#6}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#6}%
\fi
+ \else
+ \SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
+ \typeout{** Latin letters in math version `#2\string' will use the font
+ #3/#4/#5/#1^^J%
+ ** Other characters (digits, ...) and \protect\log-like
+ names will be in #6 shape.}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1}%
\fi
\ifmst@nonormalbold\else
- \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst@bold}
- {\csname
- mst@ltshape@\mst@version\endcsname}
+ \SetMathAlphabet{\mathnormalbold}{#2}{#3}{#4}{\mst@bold}%
+ {\csname mst@ltshape@\mst@version\endcsname}%
\fi
- \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}
+ \SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
\ifmst@defaultbf\else\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst@bold}{#6}\fi
\ifmst@defaultit\else\SetMathAlphabet{\Mathit}{#2}{#3}{#4}{#5}{\itdefault}\fi
\ifmst@defaultsf\else\SetMathAlphabet{\Mathsf}{#2}{#3}{\sfdefault}{#5}{#6}\fi
\ifmst@defaulttt\else\SetMathAlphabet{\Mathtt}{#2}{#3}{\ttdefault}{#5}{#6}\fi
\ifmst@needeuler
- \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst@bold}{n}
+ \SetMathAlphabet{\MathEulerBold}{#2}{U}{zeur}{\mst@bold}{n}%
\fi
- \def\mst@greek@lsh@loc{\csname mst@ltshape@\mst@version\endcsname}
- \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}
- \ifmst@itgreek\def\mst@greek@lsh@loc{\itdefault}
+ \def\mst@greek@lsh@loc{\csname mst@ltshape@\mst@version\endcsname}%
+ \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}%
+ \ifmst@itgreek\def\mst@greek@lsh@loc{\itdefault}%
\def\mst@greek@ush@loc{\itdefault}\fi
- \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault}
+ \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault}%
\def\mst@greek@ush@loc{\updefault}\fi
- \ifmst@frenchmath
+ \ifmst@frenchmath
\ifmst@itgreek\else
\ifmst@upgreek\else
- \def\mst@greek@lsh@loc{\csname mst@shape@\mst@version\endcsname}
- \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}
+ \def\mst@greek@lsh@loc{\csname mst@shape@\mst@version\endcsname}%
+ \def\mst@greek@ush@loc{\csname mst@shape@\mst@version\endcsname}%
\fi\fi
+ \fi
+ \ifcase\mst@greek@select
+ \or\def\mst@greek@ush@loc{\itdefault}%
+ \or\def\mst@greek@ush@loc{\updefault}%
+ \fi
+ \ifmst@LGRgreeks
+ \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst@greek@lsh@loc}%
+ \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
+ LGR font #4}%
+ \else
+ \ifmst@selfGreeks
+ \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
+ will use OT1 font #4}%
+ \else
+ \ifmst@LGRgreek
+ \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@lsh@loc}%
+ \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
+ LGR font \mst@greekfont}%
+ \else
+ \ifmst@selfGreek
+ \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst@greekfont}{#5}{\mst@greek@ush@loc}%
+ \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
+ will use OT1 font \mst@greekfont}%
+ \fi
\fi
- \ifcase\mst@greek@select
- \or\def\mst@greek@ush@loc{\itdefault}
- \or\def\mst@greek@ush@loc{\updefault}
- \fi
- \ifmst@LGRgreeks
- \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{#4}{#5}{\mst@greek@lsh@loc}
- \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{#4}{#5}{\mst@greek@ush@loc}
- \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
- LGR font #4}
- \else
- \ifmst@selfGreeks
- \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{#4}{#5}{\mst@greek@ush@loc}
- \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
- will use OT1 font #4}
- \else
- \ifmst@LGRgreek
- \SetSymbolFont{mtlgrfontlower}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@lsh@loc}
- \SetSymbolFont{mtlgrfontupper}{#2}{LGR}{\mst@greekfont}{#5}{\mst@greek@ush@loc}
- \typeout{** Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc) will use
- LGR font \mst@greekfont}
- \else
- \ifmst@selfGreek
- \SetSymbolFont{mtselfGreekfont}{#2}{OT1}{\mst@greekfont}{#5}{\mst@greek@ush@loc}
- \typeout{** Capital Greek letters (\mst@greek@lsh@loc/\mst@greek@ush@loc)
- will use OT1 font \mst@greekfont}
- \fi\fi\fi\fi
+ \fi
+ \fi
}
-\@onlypreamble\MTDeclareVersion
\let\MathastextDeclareVersion\MTDeclareVersion
-\newcommand*\MTVersion[2][\empty]{%
+\@onlypreamble\MTDeclareVersion
+\@onlypreamble\MathastextDeclareVersion
+\newcommand*\MTVersion[2][]{%
\mathversion{#2}%
- \ifx\empty#1% no optional argument
+ \edef\mst@tmpa{#1}%
+ \ifx\mst@tmpa\empty
\def\mst@tmp{#2}%
- \else% we check nevertheless for [] situation, will not work with [ ]
- \def\mst@tmpa{#1}%
- \ifx\mst@tmpa\empty\def\mst@tmp{#2}%
- \else\def\mst@tmp{#1}%
- \fi%
- \fi%
+ \else
+ \def\mst@tmp{#1}%
+ \fi
\usefont{\csname mst@encoding@\mst@tmp\endcsname}%
{\csname mst@family@\mst@tmp\endcsname}%
{\csname mst@series@\mst@tmp\endcsname}%
@@ -928,8 +941,8 @@ and \protect\log-like names will be^^J%
\ifmst@asterisk\let\mst@doasterisk\relax\fi
\ifmst@LGRgreek\mst@restoregreek\fi
\else
- \def\mst@tmpa{bold}%
- \ifx\mst@tmp\mst@tmpa
+ \def\mst@tmpa{bold}%
+ \ifx\mst@tmp\mst@tmpa
\mst@restorealphabets
\MTmathoperatorsdonotobeymathxx
\MTnonlettersdonotobeymathxx
@@ -937,10 +950,12 @@ and \protect\log-like names will be^^J%
\MTmathstandardletters
\ifmst@asterisk\let\mst@doasterisk\relax\fi
\ifmst@LGRgreek\mst@restoregreek\fi
- \else
- \mst@setalphabets
- \ifmst@LGRgreek\mst@setuplgrgreek\fi
- \fi\fi\fi
+ \else
+ \mst@setalphabets
+ \ifmst@LGRgreek\mst@setuplgrgreek\fi
+ \fi
+ \fi
+ \fi
}
\let\MathastextVersion\MTVersion
\let\Mathastextversion\MTVersion
@@ -949,95 +964,96 @@ and \protect\log-like names will be^^J%
\Mathastext
\ifmst@eulergreek
\typeout{** Greek letters will use the Euler font. Use^^J%
-** \protect\MathastextEulerScale{<factor>} to scale the font.}
+ ** \protect\MathastextEulerScale{<factor>} to scale the font.}%
\else
\ifmst@symbolgreek
\typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
-** \protect\MathastextSymbolScale{<factor>} to scale the font.}
+ ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
\fi\fi
\def\mst@DeclareMathLetter #1{%
\DeclareMathSymbol {#1}{\mathalpha}{mtletterfont}{`#1}%
\expandafter
\DeclareMathSymbol \csname mst@#1\endcsname{\mathalpha}{mtletterfont}{`#1}%
\expandafter\mst@addtodo@az
- \expandafter #1\csname mst@#1\endcsname\mst@itcorr}
+ \expandafter #1\csname mst@#1\endcsname\mst@itcorr
+}%
\@for\mst@tmp:=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\do
- {\expandafter\mst@DeclareMathLetter\mst@tmp}
-\ifmst@frenchmath \def\mst@font@tbu{mtoperatorfont}
- \else \def\mst@font@tbu{mtletterfont}
+ {\expandafter\mst@DeclareMathLetter\mst@tmp}%
+\ifmst@frenchmath \def\mst@font@tbu{mtoperatorfont}%
+ \else \def\mst@font@tbu{mtletterfont}%
\fi
\def\mst@DeclareMathLetter #1{%
\DeclareMathSymbol {#1}{\mathalpha}{\mst@font@tbu}{`#1}%
\expandafter
\DeclareMathSymbol \csname mst@#1\endcsname{\mathalpha}{\mst@font@tbu}{`#1}%
\expandafter\mst@addtodo@AZ
- \expandafter #1\csname mst@#1\endcsname\mst@ITcorr}
+ \expandafter #1\csname mst@#1\endcsname\mst@ITcorr}%
\@for\mst@tmp:=A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z\do
- {\expandafter\mst@DeclareMathLetter\mst@tmp}
+ {\expandafter\mst@DeclareMathLetter\mst@tmp}%
\let\mst@DeclareMathLetter\relax
%%
\ifmst@nodigits\else
-\def\mst@font@tbu{mtoperatorfont}
+\def\mst@font@tbu{mtoperatorfont}%
\ifmst@symboldigits \def\mst@font@tbu{mtpsymbol} \fi
\ifmst@eulerdigits \def\mst@font@tbu{mteulervm} \fi
-\DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0}
-\DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1}
-\DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2}
-\DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3}
-\DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4}
-\DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5}
-\DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6}
-\DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7}
-\DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8}
-\DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9}
+\DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0}%
+\DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1}%
+\DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2}%
+\DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3}%
+\DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4}%
+\DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5}%
+\DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6}%
+\DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7}%
+\DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8}%
+\DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9}%
\fi
\ifmst@symboldelimiters
-\def\mst@font@tbu{mtpsymbol}
+\def\mst@font@tbu{mtpsymbol}%
\mst@endashfalse
\mst@emdashfalse
\else
-\def\mst@font@tbu{mtoperatorfont}
+\def\mst@font@tbu{mtoperatorfont}%
\fi
-\ifmst@noexclam\else\typeout{** \string! and \string?}
-\DeclareMathSymbol{!}{\mathclose}{\mst@font@tbu}{"21}
-\DeclareMathSymbol{\mst@varfam@exclam}{\mathalpha}{\mst@font@tbu}{"21}
+\ifmst@noexclam\else\typeout{** \string! and \string?}%
+\DeclareMathSymbol{!}{\mathclose}{\mst@font@tbu}{"21}%
+\DeclareMathSymbol{\mst@varfam@exclam}{\mathalpha}{\mst@font@tbu}{"21}%
\expandafter\mst@addtodo@nonletters\string!\mathclose\mst@varfam@exclam
-\DeclareMathSymbol{?}{\mathclose}{\mst@font@tbu}{"3F}
-\DeclareMathSymbol{\mst@varfam@question}{\mathalpha}{\mst@font@tbu}{"3F}
+\DeclareMathSymbol{?}{\mathclose}{\mst@font@tbu}{"3F}%
+\DeclareMathSymbol{\mst@varfam@question}{\mathalpha}{\mst@font@tbu}{"3F}%
\expandafter\mst@addtodo@nonletters\string?\mathclose\mst@varfam@question
\fi
-\def\mst@@doasterisk{\let\ast\mst@ast\mst@mathactivate*{}\mst@ast}
+\def\mst@@doasterisk{\let\ast\mst@ast\mst@mathactivate*{}\mst@ast}%
\ifmst@asterisk\typeout{** asterisk: \string\ast\space and *}
\ifmst@symbolmisc
\def\mst@bin@ast{%
- \mathbin{\mathchoice{\raisebox{-.1\height}
- {\the\textfont\symmtpsymbol\char42}}
- {\raisebox{-.1\height}
- {\the\textfont\symmtpsymbol\char42}}
- {\raisebox{-.1\height}
- {\the\scriptfont\symmtpsymbol\char42}}
- {\raisebox{-.1\height}
- {\the\scriptscriptfont\symmtpsymbol\char42}}}}
+ \mathbin{\mathchoice{\raisebox{-.1\height}%
+ {\the\textfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}%
+ {\the\textfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}%
+ {\the\scriptfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}%
+ {\the\scriptscriptfont\symmtpsymbol\char42}}}}%
\else
\def\mst@bin@ast{%
- \mathbin{\mathchoice{\raisebox{-\mst@lowerast}
- {\the\textfont\symmtoperatorfont\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\textfont\symmtoperatorfont\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptfont\symmtoperatorfont\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptscriptfont\symmtoperatorfont\char42}}}}
+ \mathbin{\mathchoice{\raisebox{-\mst@lowerast}%
+ {\the\textfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\textfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptscriptfont\symmtoperatorfont\char42}}}}%
\fi
\def\mst@varfam@ast{\ifnum\fam=\m@ne\mst@bin@ast\else
- \mathbin{\mathchoice{\raisebox{-\mst@lowerast}
- {\the\textfont\fam\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\textfont\fam\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptfont\fam\char42}}
- {\raisebox{-\mst@lowerast}
- {\the\scriptscriptfont\fam\char42}}}\fi}
+ \mathbin{\mathchoice{\raisebox{-\mst@lowerast}%
+ {\the\textfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\textfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}%
+ {\the\scriptscriptfont\fam\char42}}}\fi}%
\let\mst@doasterisk\mst@@doasterisk
\DeclareRobustCommand*{\mst@ast}{\mst@bin@ast}
\newcommand*\MTlowerast[1]{\def\mst@lowerast{#1}}
@@ -1306,40 +1322,66 @@ and \protect\log-like names will be^^J%
\newcommand*{\MTexplicitbracesobeymathxx}{\let\mst@dobraces\@firstofone}
\newcommand*{\MTexplicitbracesdonotobeymathxx}{\let\mst@dobraces\@gobble}
\MTexplicitbracesdonotobeymathxx
-\ifmst@nospecials\else\typeout{** \string\#\space\string\mathdollar\space\string\%\space\string\&\space}
-\count255=\symmtoperatorfont
-\multiply\count255 by 256
-\advance\count255 by 35
- \mathcode`\#\count255
-\advance\count255 by 1
- \mathchardef\mathdollar\count255
-\advance\count255 by 1
- \mathcode`\%\count255
-\advance\count255 by 1
- \mathcode`\&\count255
-\count255=\symmtoperatorfont
-\multiply\count255 by 256
-\advance\count255 by 28707 % = "7023
- \mathchardef\mst@varfam@mathhash\count255
-\advance\count255 by 1
- \mathchardef\mst@varfam@mathdollar\count255
-\advance\count255 by 1
- \mathchardef\mst@varfam@mathpercent\count255
-\advance\count255 by 1
- \mathchardef\mst@varfam@mathampersand\count255
-\mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
+\ifmst@nospecials\else
+ \typeout{** \string\#\space\string\mathdollar\space
+ \string\%\space\string\&\space}
+\ifmst@XeTeX
+ \XeTeXmathcode`\#="0 \symmtoperatorfont "0023 \relax
+ \XeTeXmathchardef\mathdollar="0 \symmtoperatorfont "0024 \relax
+ \XeTeXmathcode`\%="0 \symmtoperatorfont "0025 \relax
+ \XeTeXmathcode`\&="0 \symmtoperatorfont "0026 \relax
+ \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
+ \XeTeXmathcode`\#="7 \symmtoperatorfont "0023 \relax
+ \XeTeXmathchardef\mathdollar="7 \symmtoperatorfont "0024 \relax
+ \XeTeXmathcode`\%="7 \symmtoperatorfont "0025 \relax
+ \XeTeXmathcode`\&="7 \symmtoperatorfont "0026 \relax
+ }
+\else
+\ifmst@LuaTeX
+ \luatexUmathcode`\#="0 \symmtoperatorfont "0023 \relax
+ \luatexUmathchardef\mathdollar="0 \symmtoperatorfont "0024 \relax
+ \luatexUmathcode`\%="0 \symmtoperatorfont "0025 \relax
+ \luatexUmathcode`\&="0 \symmtoperatorfont "0026 \relax
+ \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
+ \luatexUmathcode`\#="7 \symmtoperatorfont "0023 \relax
+ \luatexUmathchardef\mathdollar="7 \symmtoperatorfont "0024 \relax
+ \luatexUmathcode`\%="7 \symmtoperatorfont "0025 \relax
+ \luatexUmathcode`\&="7 \symmtoperatorfont "0026 \relax
+ }
+\else
+ \count255=\symmtoperatorfont
+ \multiply\count255 by 256
+ \advance\count255 by 35
+ \mathcode`\#\count255
+ \advance\count255 by 1
+ \mathchardef\mathdollar\count255
+ \advance\count255 by 1
+ \mathcode`\%\count255
+ \advance\count255 by 1
+ \mathcode`\&\count255
+ \count255=\symmtoperatorfont
+ \multiply\count255 by 256
+ \advance\count255 by 28707 % = "7023
+ \mathchardef\mst@varfam@mathhash\count255
+ \advance\count255 by 1
+ \mathchardef\mst@varfam@mathdollar\count255
+ \advance\count255 by 1
+ \mathchardef\mst@varfam@mathpercent\count255
+ \advance\count255 by 1
+ \mathchardef\mst@varfam@mathampersand\count255
+ \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
\mathcode`\#=\mst@varfam@mathhash
\let\mathdollar\mst@varfam@mathdollar
\mathcode`\%=\mst@varfam@mathpercent
\mathcode`\&=\mst@varfam@mathampersand}
-\fi
+\fi\fi\fi
\ifmst@symbolmisc\typeout{** symbolmisc: miscellaneous math symbols from Symbol font}
\let\mst@prod\prod
-\let\defaultprod\prod
+\let\MToriginalprod\prod
\DeclareMathSymbol{\prodpsy}{\mathop}{mtpsymbol}{213}
\renewcommand*{\prod}{\ifinner\prodpsy\else\mst@prod\fi}
\let\mst@sum\sum
-\let\defaultsum\sum
+\let\MToriginalsum\sum
\DeclareMathSymbol{\sumpsy}{\mathop}{mtpsymbol}{229}
\renewcommand*{\sum}{\ifinner\sumpsy\else\mst@sum\fi}
\DeclareMathSymbol{\mst@implies}{\mathrel}{mtpsymbol}{222}