summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-20 20:44:27 +0000
committerKarl Berry <karl@freefriends.org>2019-08-20 20:44:27 +0000
commitb91f083eda084808b59b93d32baee2e9d1abd7fa (patch)
tree19485dddf488d76a909729dded3760de4b9cc19a /Master/texmf-dist/tex
parenta1f71c264a5dab83905d60f7427b40f15066b92a (diff)
mathastext (20aug19)
git-svn-id: svn://tug.org/texlive/trunk@51914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/mathastext/mathastext.sty1548
1 files changed, 853 insertions, 695 deletions
diff --git a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
index db69294645c..ac3d383e246 100644
--- a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
+++ b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
@@ -23,20 +23,21 @@
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3t 2018/08/22
+%% Version: 1.3u 2019/08/20
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2018 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2011-2019 Jean-Francois Burnol <jfbu at free dot fr>
%% Examples of use of mathastext:
%% http://jf.burnol.free.fr/mathastext.html
%% http://jf.burnol.free.fr/showcase.html
%%----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage {mathastext}
- [2018/08/22 v1.3t Use the text font in math mode (JFB)]
+ [2019/08/20 v1.3u Use the text font in math mode (JFB)]
\let\mst@Umathcharnumdef\Umathcharnumdef
\let\mst@Umathcodenum \Umathcodenum
\let\mst@Umathcode \Umathcode
\let\mst@Umathchardef \Umathchardef
+ \let\mst@Umathaccent \Umathaccent
\newif\ifmst@XeTeX
\ifx\XeTeXinterchartoks\@undefined
\mst@XeTeXfalse
@@ -47,6 +48,7 @@
\let\mst@Umathcodenum \XeTeXmathcodenum
\let\mst@Umathcode \XeTeXmathcode
\let\mst@Umathchardef \XeTeXmathchardef
+ \let\mst@Umathaccent \XeTeXmathaccent
\fi
\fi
\newif\ifmst@LuaTeX
@@ -59,12 +61,13 @@
\let\mst@Umathcodenum \luatexUmathcodenum
\let\mst@Umathcode \luatexUmathcode
\let\mst@Umathchardef \luatexUmathchardef
+ \let\mst@Umathaccent \luatexUmathaccent
\fi
\fi
\newif\ifmst@XeOrLua
\ifmst@LuaTeX\mst@XeOrLuatrue\fi
\ifmst@XeTeX \mst@XeOrLuatrue\fi
-\def\mst@oti{OT1}\def\mst@ti{T1}\def\mst@lyi{LY1}
+\def\mst@oti{OT1}
\def\mst@eui{EU1}\def\mst@euii{EU2}\def\mst@tu{TU}
\def\mst@OneifUniEnc {%
\ifx \mst@tmp@enc\mst@tu 1\else
@@ -85,27 +88,22 @@
\def\mst@ltsh{\itdefault}}
\DeclareOption{frenchmath}{\mst@frenchmathtrue\mst@italictrue
\def\mst@ltsh{\itdefault}}
-%%
\newif\ifmst@endash\mst@endashtrue
\DeclareOption{endash}{\mst@endashtrue}
\DeclareOption{noendash}{\mst@endashfalse}
\newif\ifmst@emdash
\DeclareOption{emdash}{\mst@emdashtrue\mst@endashfalse}
-%%
\newif\ifmst@alldelims
\edef\mst@tmp{\encodingdefault}\ifx\mst@oti\mst@tmp\else\mst@alldelimstrue\fi
\DeclareOption{alldelims}{\mst@alldelimstrue}
\DeclareOption{nolessnomore}{\mst@alldelimsfalse}
-%% new with 1.2
\newif\ifmst@nosmalldelims
\DeclareOption{nosmalldelims}{\mst@nosmalldelimstrue}
-%%
\newif\ifmst@noplus
\DeclareOption{noplus}{\mst@noplustrue}
\newif\ifmst@nominus
\DeclareOption{nominus}{\mst@nominustrue}
\DeclareOption{noplusnominus}{\ExecuteOptions{noplus,nominus}}
-%%
\newif\ifmst@noparen
\DeclareOption{noparenthesis}{\mst@noparentrue}
\newif\ifmst@nopunct
@@ -122,10 +120,9 @@
\newif\ifmst@nospecials
\DeclareOption{nospecials}{\mst@nospecialstrue}
\newif\ifmst@basic % 1.3 to avoid unnecessary patch of amsmath \newmcodes@
-\DeclareOption{basic}{\mst@basictrue
+ \DeclareOption{basic}{\mst@basictrue
\ExecuteOptions{noparenthesis,nopunctuation,%
noplusnominus,noequal,noexclam,nospecials,nolessnomore}}
-%%
\newif\ifmst@nohbar
\DeclareOption{nohbar}{\mst@nohbartrue}
\newif\ifmst@nodigits
@@ -134,7 +131,8 @@
\DeclareOption{defaultimath}{\mst@defaultimathtrue}
\newif\ifmst@mathaccents
\DeclareOption{mathaccents}{\mst@mathaccentstrue}
-%%
+\newif\ifmst@unimathaccents % 1.3u
+ \DeclareOption{unimathaccents}{\mst@mathaccentstrue\mst@unimathaccentstrue}
\newif\ifmst@needsymbol
\newif\ifmst@symboldelimiters
\DeclareOption{symboldelimiters}{\mst@needsymboltrue\mst@symboldelimiterstrue}
@@ -148,16 +146,14 @@
\DeclareOption{symbolre}{\mst@needsymboltrue\mst@symbolretrue}
\newif\ifmst@symbolmisc
\DeclareOption{symbolmisc}{\mst@needsymboltrue\mst@symbolmisctrue}
-\DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
-\DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
-%%
+ \DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
+ \DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
\newif\ifmst@needeuler
\newif\ifmst@eulerdigits
\DeclareOption{eulerdigits}{\mst@needeulertrue\mst@eulerdigitstrue}
\newif\ifmst@eulergreek
\DeclareOption{eulergreek}{\mst@needeulertrue\mst@eulergreektrue
\mst@customgreektrue }
-%%
\newif\ifmst@selfGreek
\DeclareOption{selfGreek}{\mst@selfGreektrue\mst@customgreektrue}
\newif\ifmst@selfGreeks
@@ -168,7 +164,6 @@
\newif\ifmst@LGRgreeks
\DeclareOption{LGRgreeks}{\mst@LGRgreekstrue\mst@LGRgreektrue
\mst@customgreektrue}
-%%
\def\mst@greek@select{0}
\newif\ifmst@itgreek
\newif\ifmst@upgreek
@@ -176,7 +171,6 @@
\DeclareOption{upgreek}{\mst@upgreektrue}
\DeclareOption{itGreek}{\def\mst@greek@select{1}}
\DeclareOption{upGreek}{\def\mst@greek@select{2}}
-%%
\newif\ifmst@defaultnormal
\DeclareOption{defaultnormal}{\mst@defaultnormaltrue}
\newif\ifmst@defaultrm
@@ -293,8 +287,23 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\let\resetMathstrut@\mst@savedresetMathstrut@}%
\fi
\let\mst@the\@gobble
-}
-\newcommand*\MTnonlettersobeymathxx{%
+}%
+\def\mst@OnlyIfNotSubdued#1{%
+ \ifmst@subdued
+ \def\mst@tmpa{normal}%
+ \ifx\math@version\mst@tmpa
+ \else
+ \def\mst@tmpa{bold}%
+ \ifx\math@version\mst@tmpa
+ \else
+ #1%
+ \fi
+ \fi
+ \else
+ #1%
+ \fi
+}%
+\def\mst@nonlettersobeymathxx{%
\ifx\mst@the\the
\else
\@ifundefined{mst@savedresetMathstrut@}{}{%
@@ -314,14 +323,22 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
from amsmath replaced (for this group or environment)}}%
\fi
\let\mst@the\the
-}
-\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst@theeasy\@gobble}
-\newcommand*\MTeasynonlettersobeymathxx{\let\mst@theeasy\the}
-\MTeasynonlettersobeymathxx
-\newcommand*\MTmathactiveletters{\let\mst@thef\the \let\mst@theF\the}
-\ifmst@subdued\else\MTmathactiveletters\fi
-\newcommand*\MTmathactiveLetters{\let\mst@theF\the}
-\newcommand*\MTmathstandardletters{\let\mst@thef\@gobble \let\mst@theF\@gobble}
+}%
+\newcommand*\MTnonlettersobeymathxx
+ {\mst@OnlyIfNotSubdued\mst@nonlettersobeymathxx}%
+\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst@theeasy\@gobble}%
+\def\mst@easynonlettersobeymathxx{\let\mst@theeasy\the}%
+\newcommand*\MTeasynonlettersobeymathxx
+ {\mst@OnlyIfNotSubdued\mst@easynonlettersobeymathxx}%
+\MTeasynonlettersobeymathxx % no-op here if subdued mode
+\def\mst@mathactiveletters{\let\mst@thef\the \let\mst@theF\the}%
+\newcommand*\MTmathactiveletters
+ {\mst@OnlyIfNotSubdued\mst@mathactiveletters}%
+\MTmathactiveletters % no-op here if subdued mode
+\def\mst@mathactiveLetters{\let\mst@theF\the}%
+\newcommand*\MTmathactiveLetters
+ {\mst@OnlyIfNotSubdued\mst@mathactiveLetters}%
+\newcommand*\MTmathstandardletters{\let\mst@thef\@gobble \let\mst@theF\@gobble}%
\newcommand*\MTicinmath{%
\MTmathactiveletters
\def\mst@itcorr{\ifnum\fam=\m@ne\/\fi}%
@@ -334,45 +351,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\newcommand*\MTicalsoinmathxx{%
\ifx\mst@itcorr\@empty\else\def\mst@itcorr{\/}\fi
\ifx\mst@ITcorr\@empty\else\def\mst@ITcorr{\/}\fi}
-\AtEndOfPackage{\AtBeginDocument{%
- \everymath\expandafter{\the\everymath
- \mst@the\mst@do@nonletters \let\mst@the\@gobble
- \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
- \mst@thef\mst@do@az \let\mst@thef\@gobble
- \mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
- \everydisplay\expandafter{\the\everydisplay
- \mst@the\mst@do@nonletters \let\mst@the\@gobble
- \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
- \mst@thef\mst@do@az \let\mst@thef\@gobble
- \mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
- \MTcustomizenewmcodes
- \let\mst@imath\imath
- \let\mst@jmath\jmath
- \ifmst@subdued
- \MTeverymathoff
- \MTresetnewmcodes
- \MTnoicinmath
- \MTmathoperatorsdonotobeymathxx
- \let\inodot\mst@imath
- \let\jnodot\mst@jmath
- \mst@subduedminus
- \else
- \mst@nonsubduedminus
- \ifx\mst@itcorr\@undefined
- \def\mst@itcorr{\ifnum\fam=\m@ne\/\fi}%
- \@for\mst@tmp:=it,sl\do
- {\ifx\mst@tmp\mst@ltshape@normal\let\mst@itcorr\@empty\fi }%
- \fi
- \ifx\mst@ITcorr\@undefined
- \let\mst@ITcorr\mst@itcorr
- \ifmst@frenchmath
- \def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}%
- \@for\mst@tmp:=it,sl\do
- {\ifx\mst@tmp\mst@shape@normal\let\mst@ITcorr\@empty\fi }%
- \fi
- \fi
- \fi
-}}
\newcommand*\MTsetmathskips[3]{%
\@namedef{mst@before#1}{\ifnum\fam=\m@ne\mskip#2\relax\fi }%
\@namedef{mst@after#1}{\ifnum\fam=\m@ne\mskip#3\relax\fi }%
@@ -507,54 +485,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\let\newmcodes@\mst@originalnewmcodes@\fi}
\newcommand*\MTcustomizenewmcodes{\ifx\mst@originalnewmcodes@\undefined\else
\let\newmcodes@\mst@newmcodes@\fi}
-\ifmst@subdued
- \def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{%
- \def\mst@normalmv@letter{#2}}
- \expandafter\mst@reserved\mv@normal\@nil
- \def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{%
- \def\mst@boldmv@letter{#2}}
- \expandafter\mst@reserved\mv@bold\@nil
- \def\mst@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{%
- \def\mst@normalmv@operator{#2}}
- \expandafter\mst@reserved\mv@normal\@nil
- \def\mst@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{%
- \def\mst@boldmv@operator{#2}}
- \expandafter\mst@reserved\mv@bold\@nil
-%%
- \edef\mst@tmp@enc{\encodingdefault}
- \def\mst@reserved#1/#2/#3/#4/{\gdef\mst@debut{#1}\gdef\mst@reste{#2/#3/#4}}
- \begingroup\escapechar\m@ne
- \xdef\mst@funnyoti{\expandafter\string\csname OT1\endcsname}
- \expandafter\expandafter\expandafter
- \mst@reserved\expandafter\string\mst@normalmv@operator/
- \endgroup
- \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp@enc\mst@oti\def\mst@tmp@enc{T1}\fi\fi
- \edef\mst@normalmv@operator{\expandafter\noexpand\csname
- \if1\mst@OneifUniEnc
- \ifx\mst@debut\mst@funnyoti T1\else\mst@debut\fi
- \else
- \mst@tmp@enc
- \fi/\mst@reste\endcsname}
- \begingroup\escapechar\m@ne
- \expandafter\expandafter\expandafter
- \mst@reserved\expandafter\string\mst@boldmv@operator/
- \endgroup
- \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp@enc\mst@oti\def\mst@tmp@enc{T1}\fi\fi
- \edef\mst@boldmv@operator{\expandafter\noexpand\csname
- \if1\mst@OneifUniEnc
- \ifx\mst@debut\mst@funnyoti T1\else\mst@debut\fi
- \else
- \mst@tmp@enc
- \fi/\mst@reste\endcsname}
- \AtEndOfPackage{
- \typeout{** ...entering subdued mode...}
- \expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@letter\symmtletterfont
- \expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@letter\symmtletterfont
- \expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@operator\symmtoperatorfont
- \expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@operator\symmtoperatorfont
- \typeout{** ...done.}
- }
-\fi % fin de ce \ifmst@subdued
\DeclareSymbolFont{mtoperatorfont}{\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh}
\newcommand*{\MTmathoperatorsobeymathxx}
{\def\operator@font{\mathgroup\ifnum\fam=\m@ne\symmtoperatorfont\else\fam\fi}}
@@ -715,425 +645,8 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\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}}
\let\Mathastextgreekfont\MTgreekfont
-\@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
- \edef\mst@tmp{#1}
- \ifx\mst@tmp\empty\else\MTlettershape{#1}\fi
- \Mathastext}
-\let\MathastextWillUse\MTWillUse
-\let\Mathastextwilluse\MTWillUse
-\@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}%
- \ifmst@subdued
- \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
- \mst@exists@muskip\mst@exists@skip\relax
- \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}%
- \fi
- \else
- \mst@exists@muskip\mst@exists@skip\relax
- \mst@forall@muskip\mst@forall@skip\relax
- \mst@prime@muskip\mst@prime@skip\relax
- \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
-%% 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
-}
-\let\mathastext\Mathastext
-\@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\string' inherits from `#1\string'.}%
- \fi
- \expandafter\MTDeclareVersion@@\mst@declareversionargs
-}
-\newcommand*\MTDeclareVersion@@[6]{%
- \edef\mst@tmp{#1}%
- \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}%
- \expandafter\edef\csname mst@forall@skip@\mst@version\endcsname
- {\mst@forall@skip}%
- \expandafter\edef\csname mst@prime@skip@\mst@version\endcsname
- {\mst@prime@skip}%
- \ifx\mst@tmp\empty
- \ifmst@italic
- \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}%
- \else
- \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}%
- \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}%
- \fi
- \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}%
- \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@ush@loc{\itdefault}\fi
- \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault}%
- \def\mst@greek@ush@loc{\updefault}\fi
- \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}%
- \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
- \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
- \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
- \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
- \fi
- \fi
- \fi
- \fi
-}
-\let\MathastextDeclareVersion\MTDeclareVersion
-\@onlypreamble\MTDeclareVersion
-\@onlypreamble\MathastextDeclareVersion
-\newcommand*\MTversion {\@ifstar\MTversion@s\MTversion@ }
-\newcommand*\MTversion@s [1]{\mathversion{#1}\MTversion@@ {#1}}
-\newcommand*\MTversion@ [2][]{%
- \mathversion{#2}%
- \edef\mst@tmpa{#1}%
- \ifx\mst@tmpa\empty
- \edef\mst@tmp{#2}%
- \else
- \let\mst@tmp\mst@tmpa
- \fi
- \edef\encodingdefault {\csname mst@encoding@\mst@tmp\endcsname}%
- \edef\familydefault {\csname mst@family@\mst@tmp\endcsname}%
- \edef\seriesdefault {\csname mst@series@\mst@tmp\endcsname}%
- \edef\shapedefault {\csname mst@shape@\mst@tmp\endcsname}%
- \edef\bfdefault {\csname mst@boldvariant@\mst@tmp\endcsname}%
- \edef\itdefault {\csname mst@itdefault@\mst@tmp\endcsname}%
- \edef\rmdefault {\csname mst@rmdefault@\mst@tmp\endcsname}%
- \edef\sfdefault {\csname mst@sfdefault@\mst@tmp\endcsname}%
- \edef\ttdefault {\csname mst@ttdefault@\mst@tmp\endcsname}%
- \usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
- \MTversion@@ {#2}%
-}
-\newcommand*\MTversion@@ [1]{%
- \MTexistsdoesskip
- \MTforalldoesskip
- \MTprimedoesskip
- \edef\mst@tmp{#1}%
- \expandafter
- \mst@exists@muskip\csname mst@exists@skip@\mst@tmp\endcsname\relax
- \expandafter
- \mst@forall@muskip\csname mst@forall@skip@\mst@tmp\endcsname\relax
- \expandafter
- \mst@prime@muskip\csname mst@prime@skip@\mst@tmp\endcsname\relax
- \edef\mst@tmpa{\csname mst@ltshape@\mst@tmp\endcsname}%
- \edef\mst@tmpb{\csname mst@shape@\mst@tmp\endcsname}%
- \MTmathoperatorsobeymathxx
- \MTeverymathdefault
- \MTcustomizenewmcodes
- \@for\mst@tmpc:=it,sl\do{\ifx\mst@tmpc\mst@tmpa\MTnoicinmath\fi}%
- \ifmst@frenchmath
- \def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}%
- \@for\mst@tmpc:=it,sl\do{\ifx\mst@tmpc\mst@tmpb\MTnoICinmath\fi}%
- \fi
- \ifmst@subdued
- \def\mst@tmpa{normal}%
- \ifx\mst@tmp\mst@tmpa
- \mst@restorealphabets
- \MTstandardgreek
- \MTmathoperatorsdonotobeymathxx
- \MTnormalexists
- \MTnormalforall
- \MTeverymathoff
- \MTresetnewmcodes
- \let\inodot\mst@imath
- \let\jnodot\mst@jmath
- \mst@subduedminus
- \else
- \def\mst@tmpa{bold}%
- \ifx\mst@tmp\mst@tmpa
- \mst@restorealphabets
- \MTstandardgreek
- \MTmathoperatorsdonotobeymathxx
- \MTnormalexists
- \MTnormalforall
- \MTeverymathoff
- \MTresetnewmcodes
- \let\inodot\mst@imath
- \let\jnodot\mst@jmath
- \mst@subduedminus
- \else
- \mst@setalphabets
- \MTcustomgreek
- \let\inodot\mst@inodot
- \let\jnodot\mst@jnodot
- \mst@nonsubduedminus
- \fi
- \fi
- \else
- \MTcustomgreek % new with 1.3d
- \fi
-}
-\let\MathastextVersion\MTversion
-\let\Mathastextversion\MTversion
-\let\MTVersion\MTversion
-\let\mathastextversion\MTversion
-\Mathastext
-\ifmst@eulergreek
- \typeout{** Greek letters will use the Euler font. Use \protect\MathastextEulerScale{<factor>} to scale the
- font.}%
- \ifmst@subdued{\typeout{** (subdued mode: normal and bold math
- version with default Greek letters.)}}\fi
-\else
-\ifmst@symbolgreek
- \typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
- ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
- \ifmst@subdued{\typeout{** (subdued mode: normal and bold math
- version with default Greek letters.)}}\fi
-\fi\fi
\def\mst@DeclareMathLetter #1{%
\DeclareMathSymbol {#1}{\mathalpha}{mtletterfont}{`#1}%
\expandafter
@@ -1154,7 +667,6 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\@tfor\mst@tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do
{\expandafter\mst@DeclareMathLetter\mst@tmp}%
\let\mst@DeclareMathLetter\relax
-%%
\ifmst@nodigits\else
\def\mst@font@tbu{mtoperatorfont}%
\ifmst@symboldigits \def\mst@font@tbu{mtpsymbol} \fi
@@ -1276,113 +788,81 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\cleaders\hbox{$\mkern-2mu\relbar\mkern-2mu$}\hfill
\mkern-7mu\mathord{\relbar}$}
\fi
-\def\mst@dothe@endashstuff{\edef\mst@tmp@enc{\encodingdefault}
-\if1\mst@OneifUniEnc
- \AtBeginDocument{% Unicode engines and font
- \mst@Umathcode`\-=2 \symmtoperatorfont "\mst@unicodeminus\relax
- \mst@Umathchardef\mst@varfam@minus=7 \symmtoperatorfont "\mst@unicodeminus\relax
- }
-\else
-\ifx\mst@tmp@enc\mst@ti % T1
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{21}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}{21}
-\else
-\ifx\mst@tmp@enc\mst@oti % OT1
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{123}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}{123}
-\else
-\ifx\mst@tmp@enc\mst@lyi % LY1
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{150}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}{150}
-\else % make sure we have neither xetex nor luatex
- \ifmst@XeOrLua\mst@aborttrue
- \else
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textendash\endcsname}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textendash\endcsname}
- \fi
-\fi\fi\fi\fi}
-\def\mst@dothe@emdashstuff{\edef\mst@tmp@enc{\encodingdefault}
-\if1\mst@OneifUniEnc
- \AtBeginDocument{% Unicode engine and font
- \mst@Umathcode`\-=2 \symmtoperatorfont "2014\relax
- \mst@Umathchardef\mst@varfam@minus=7 \symmtoperatorfont "2014\relax
- }
-\else
-\ifx\mst@tmp@enc\mst@ti % T1
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{22}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}{22}
-\else
-\ifx\mst@tmp@enc\mst@oti % OT1
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{124}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}{124}
-\else
-\ifx\mst@tmp@enc\mst@lyi % LY1
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}{151}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}{151}
-\else % make sure we have neither xetex nor luatex
- \ifmst@XeOrLua\mst@aborttrue
- \else
- \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textemdash\endcsname}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\mst@tmp@enc\string\textemdash\endcsname}
- \fi
-\fi\fi\fi\fi}
\let\mst@subduedminus\empty
\let\mst@nonsubduedminus\empty
-\ifmst@nominus\else\typeout{** minus as endash}
- \edef\mst@tmp@enc{\encodingdefault}
- \ifmst@XeOrLua
- \if1\mst@OneifUniEnc\expandafter\AtBeginDocument
- \else\expandafter\@firstofone
- \fi
- {\edef\mst@subduedminus
- {\mst@Umathcodenum`\noexpand\-=\the\mst@Umathcodenum`\-\relax}}%
+\def\mst@dothe@endashstuff#1#2#3{%
+ \edef\mst@tmp@enc{#3}%
+ \if1\mst@OneifUniEnc
+ \mst@Umathchardef#1=2 \symmtoperatorfont "\mst@unicodeminus\relax
+ \mst@Umathchardef#2=7 \symmtoperatorfont "\mst@unicodeminus\relax
\else
- \edef\mst@subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
- \fi
- \mst@abortfalse
- \ifmst@endash\mst@dothe@endashstuff\else
- \ifmst@emdash\mst@dothe@emdashstuff\else
- \if1\mst@OneifUniEnc\expandafter\AtBeginDocument
- \else\expandafter\@firstofone
- \fi
- {\DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D}%
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{\mst@font@tbu}{"2D}}%
- \fi\fi
- \ifmst@abort
- \DeclareMathSymbol{-}{\mathbin}{\mst@font@tbu}{"2D}
- \DeclareMathSymbol{\mst@varfam@minus}{\mathalpha}{\mst@font@tbu}{"2D}
- \fi
- \expandafter\mst@addtodo@nonletters\string-\mathbin\mst@varfam@minus
- \ifmst@XeOrLua
- \if1\mst@OneifUniEnc\expandafter\AtBeginDocument
- \else\expandafter\@firstofone
- \fi
- {\edef\mst@nonsubduedminus
- {\mst@Umathcodenum`\noexpand\-=\the\mst@Umathcodenum`\-\relax}}%
+ \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
+ {\csname\mst@tmp@enc\string\textendash\endcsname}
+ \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
+ {\csname\mst@tmp@enc\string\textendash\endcsname}
+ \fi}% mst@dothe@endashstuff
+\def\mst@dothe@emdashstuff#1#2#3{%
+ \edef\mst@tmp@enc{#3}%
+ \if1\mst@OneifUniEnc
+ \mst@Umathchardef#1=2 \symmtoperatorfont "2014\relax
+ \mst@Umathchardef#2=7 \symmtoperatorfont "2014\relax
\else
- \edef\mst@nonsubduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
- \fi
+ \DeclareMathSymbol{#1}{\mathbin}{mtoperatorfont}
+ {\csname\mst@tmp@enc\string\textemdash\endcsname}
+ \DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
+ {\csname\mst@tmp@enc\string\textemdash\endcsname}
+ \fi}% mst@dothe@emdashstuff
+\def\mst@dothe@hyphenstuff#1#2{%
+ \DeclareMathSymbol{#1}{\mathbin}{\mst@font@tbu}{"2D}%
+ \DeclareMathSymbol{#2}{\mathalpha}{\mst@font@tbu}{"2D}%
+}%
+\def\mst@varfam@minus{\@nameuse{mst@varfam@minus@mv\math@version}}%
+\ifmst@nominus\else
+ \expandafter\mst@addtodo@nonletters\string-\mathbin\mst@varfam@minus
+ \def\mst@nonsubduedminus{%
+ \edef\mst@tmp@enc{\csname mst@encoding@\math@version\endcsname}%
+ \if1\mst@OneifUniEnc
+ \mst@Umathcode`\-=\expandafter
+ % Working around a bug (or feature...) of XeTeX/LuaTeX: afaict it is
+ % impossible to use straightforwardly in extended mathcode assignments
+ % a control sequence as created by \Umathchardef.
+ % This is counter-intuitive and breaks expectations.
+ \mst@UmathchardefWorkAround@i
+ \csname mst@minus@mv\math@version\endcsname
+ \relax
+ \else
+ \mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
+ \fi
+ }% \mst@nonsubduedminus
+\fi
+\def\mst@UmathchardefWorkAround@i
+ {\expandafter\mst@UmathchardefWorkAround@ii\meaning}%
+\def\mst@UmathchardefWorkAround@ii#1"{"}%
+\let\mst@subduedhbar\@empty
+\let\mst@nonsubduedhbar\@empty
+\ifmst@nohbar\else
+ \def\mst@subduedhbar{\let\hbar\mst@original@hbar}%
+ \def\mst@nonsubduedhbar{%
+ \expandafter\let\expandafter\hbar
+ \csname mst@hbar@mv\math@version\endcsname
+ }%
\fi
-%%\def\hbar{{\mathchar'26\mkern-9muh}} % (original definition from latex.ltx)
\def\mst@mathrlap{\mathpalette\mst@mathrlapinternal}
\def\mst@mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
-\def\mst@dothe@hbarstuff{\edef\mst@tmp@enc{\encodingdefault}
-\if1\mst@OneifUniEnc
- % Unicode engine and font
- \mst@Umathchardef\hbar="7 \symmtletterfont "0127 \relax %% or 210F?
-\else % I must leave open the T1, OT1 possibility also for XeTeX or LuaTeX
- \ifx\mst@ti\mst@tmp@enc
- \DeclareMathAccent{\mst@ltbar}{\mathalpha}{mtletterfont}{9}
- \else %% assume OT1. Bad idea? Should not provoke an error anyhow
- \DeclareMathAccent{\mst@ltbar}{\mathalpha}{mtletterfont}{22}
- \fi
- \def\hbar{\mst@mathrlap{\mst@ltbar{\ }}h}
-\fi }
-\ifmst@nohbar\else\typeout{** \string\hbar}\mst@dothe@hbarstuff\fi
+\def\mst@dothe@hbarstuff#1#2#3{%
+ \edef\mst@tmp@enc{#3}%
+ \if1\mst@OneifUniEnc % Unicode engine and font
+ \mst@Umathchardef#1="7 \symmtletterfont "0127 \relax %% or 210F?
+ \else
+ \begingroup
+ \def\@text@composite##1\@text@composite##2{##2}%
+ \let\add@accent\@firstoftwo
+ \DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
+ {\csname\mst@tmp@enc\string\=\endcsname{}}%
+ \endgroup
+ \def#1{\mst@mathrlap{#2{\ }}\mst@h}%
+ \fi
+}% end of \mst@dothe@hbarstuff
\ifmst@noplus\else\typeout{** \string+ and \string=}
\DeclareMathSymbol{+}{\mathbin}{\mst@font@tbu}{"2B}
\DeclareMathSymbol{\mst@varfam@plus}{\mathalpha}{\mst@font@tbu}{"2B}
@@ -1871,7 +1351,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\let\mst@origdigamma\digamma
\let\mst@origpartial\partial
\let\mst@origwp\wp
- \let\mst@origell\ell }
+ \let\mst@origell\ell }% \MTrecordstandardgreek
\MTrecordstandardgreek
\renewcommand*{\MTstandardgreek}{%
\let\Alpha\mst@origAlpha
@@ -1933,7 +1413,7 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\let\partial\mst@origpartial
\let\wp\mst@origwp
\let\ell\mst@origell
-}
+}% \MTstandardgreek
\renewcommand*{\MTcustomgreek}{%
\let\Alpha\mst@Alpha
\let\Beta\mst@Beta
@@ -1998,79 +1478,635 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\ifmst@symbolgreek\else\let\ell\mst@ell\fi
\fi
\fi
-}
+}% \MTcustomgreek
\fi
\let\Mathastextstandardgreek\MTstandardgreek
\let\Mathastextcustomgreek\MTcustomgreek
\ifmst@subdued\else\MTcustomgreek\fi
-\edef\mst@tmp@enc{\encodingdefault}
-\mst@goaheadtrue
-\if1\mst@OneifUniEnc
- % Unicode engine and font
- \mst@Umathchardef\inodot="7 \symmtletterfont "0131 \relax
- \mst@Umathchardef\jnodot="7 \symmtletterfont "0237 \relax
-\else
-\ifx\mst@tmp@enc\mst@ti % T1
- \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{25}
- \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{26}
-\else
-\ifx\mst@tmp@enc\mst@oti % OT1
- \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
- \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
-\else
-\ifx\mst@tmp@enc\mst@lyi % LY1
- \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
- \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
-\else
- \ifmst@XeOrLua\mst@goaheadfalse\else
- \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}
-{\expandafter\the\expandafter\csname\mst@tmp@enc\string\i\endcsname}
- \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}
-{\expandafter\the\expandafter\csname\mst@tmp@enc\string\j\endcsname}
- \fi
-\fi\fi\fi\fi
-\let\mst@inodot\inodot
-\let\mst@jnodot\jnodot
+\def\mst@subduedinodot{%
+ \let\inodot\mst@original@imath
+ \let\jnodot\mst@original@jmath
+}%
+\def\mst@nonsubduedinodot{%
+ \expandafter\let\expandafter\inodot
+ \csname mst@inodot@mv\math@version\endcsname
+ \expandafter\let\expandafter\jnodot
+ \csname mst@jnodot@mv\math@version\endcsname
+}%
+\def\mst@dothe@inodotstuff#1#2#3{%
+ \edef\mst@tmp@enc{#3}%
+ \if1\mst@OneifUniEnc
+ % Unicode engine and font
+ \mst@Umathchardef#1="7 \symmtletterfont "0131 \relax
+ \mst@Umathchardef#2="7 \symmtletterfont "0237 \relax
+ \else
+ \DeclareMathSymbol{#1}{\mathalpha}{mtletterfont}
+ {\csname\mst@tmp@enc\string\i\endcsname}
+ \DeclareMathSymbol{#2}{\mathalpha}{mtletterfont}
+ {\csname\mst@tmp@enc\string\j\endcsname}
+ \fi}% \mst@dothe@inodotstuff
\ifmst@defaultimath\else\typeout{** \string\imath\space and \string\jmath\space}
- \ifmst@goahead
\AtEndOfPackage{\AtBeginDocument{%
\renewcommand*{\imath}{\inodot}%
\renewcommand*{\jmath}{\jnodot}%
}}%
- \fi
\fi
-\edef\mst@tmp@enc{\encodingdefault} %% rather one too many than sorry
-\ifmst@mathaccents\typeout{** math accents}
-\ifx\mst@ti\mst@tmp@enc
-\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{1}
-\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{0}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{4}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{3}
-\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{9}
-\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{8}
-\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{7}
-\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{2}
-\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{10}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{6}
-\else
-\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{19}
-\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{18}
-\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{127}
-\DeclareMathAccent{\tilde}{\mathalpha}{mtoperatorfont}{126}
-\DeclareMathAccent{\bar}{\mathalpha}{mtoperatorfont}{22}
-\DeclareMathAccent{\breve}{\mathalpha}{mtoperatorfont}{21}
-\DeclareMathAccent{\check}{\mathalpha}{mtoperatorfont}{20}
-\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{94}
-\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{95}
-\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{23}
- \ifx\mst@lyi\mst@tmp@enc % LY1 encoding
- \DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{5}
+\let\mst@subduedmathaccents\@empty
+\let\mst@nonsubduedmathaccents\@empty
+\ifmst@mathaccents
+\def\mst@subduedmathaccents{%
+ \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+ {dot}{ddot}{mathring}{hat}{tilde}%
+ \do
+ {\expandafter\let\csname\@tempa\expandafter\endcsname
+ \csname mst@original@\@tempa\endcsname}%
+}%
+\def\mst@nonsubduedmathaccents{%
+ \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+ {dot}{ddot}{mathring}{hat}{tilde}%
+ \do
+ {\expandafter\let\csname\@tempa\expandafter\endcsname
+ \csname mst@\@tempa @mv\math@version\endcsname}%
+}%
+\def\mst@dothe@mathaccentsstuff#1#2{%
+ \begingroup
+ \edef\mst@tmp@enc{#2}%
+ \def\@text@composite##1\@text@composite##2{##2}%
+ \let\add@accent\@firstoftwo
+ \let\add@unicode@accent\@firstoftwo
+ \if1\mst@OneifUniEnc
+ \ifmst@unimathaccents
+ % \` -> \grave
+ \expandafter\xdef\csname mst@grave@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\`\endcsname{}\relax}%
+ % \' -> \acute
+ \expandafter\xdef\csname mst@acute@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\'\endcsname{}\relax}%
+ % \v -> \check
+ \expandafter\xdef\csname mst@check@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\v\endcsname{}\relax}%
+ % \u -> \breve
+ \expandafter\xdef\csname mst@breve@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\u\endcsname{}\relax}%
+ % \= -> \bar
+ \expandafter\xdef\csname mst@bar@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\=\endcsname{}\relax}%
+ % \. -> \dot
+ \expandafter\xdef\csname mst@dot@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\.\endcsname{}\relax}%
+ % \" -> \ddot
+ \expandafter\xdef\csname mst@ddot@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\"\endcsname{}\relax}%
+ % \r -> \mathring
+ \expandafter\xdef\csname mst@mathring@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\r\endcsname{}\relax}%
+ % \^ -> \hat
+ \expandafter\xdef\csname mst@hat@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\^\endcsname{}\relax}%
+ % \~ -> \tilde
+ \expandafter\xdef\csname mst@tilde@mv#1\endcsname
+ {\mst@Umathaccent
+ 7
+ \number\symmtoperatorfont\space
+ \csname#2\string\~\endcsname{}\relax}%
+ \else
+ \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+ {dot}{ddot}{mathring}{hat}{tilde}%
+ \do
+ {\expandafter\gdef\csname mst@\@tempa @mv#1\expandafter\endcsname
+ \expandafter{\csname mst@original@\@tempa\endcsname}}%
+ \fi
+ \else
+ % \` -> \grave
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\`\endcsname{}}
+ % \' -> \acute
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@acute@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\'\endcsname{}}
+ % \v -> \check
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@check@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\v\endcsname{}}
+ % \u -> \breve
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@breve@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\u\endcsname{}}
+ % \= -> \bar
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@bar@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\=\endcsname{}}
+ % \. -> \dot
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@dot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\.\endcsname{}}
+ % \" -> \ddot
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@ddot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\"\endcsname{}}
+ % \r -> \mathring
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@mathring@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\r\endcsname{}}
+ % \^ -> \hat
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@hat@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\^\endcsname{}}
+ % \~ -> \tilde
+ \expandafter\DeclareMathAccent\expandafter
+ {\csname mst@tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
+ {\csname#2\string\~\endcsname{}}
+ \fi
+ \endgroup
+}%
+\fi % \ifmst@mathaccents
+\newcommand*\MTDeclareVersion[6][]{%
+ \edef\mst@declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
+ \edef\mst@version{#2}%
+ \DeclareMathVersion{\mst@version}%
+ \MTDeclareVersion@
+}% \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\string' inherits from `#1\string'.}%
+ \fi
+ \expandafter\MTDeclareVersion@@\mst@declareversionargs
+}% \MTDeclareVersion@
+\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}%
+ \expandafter\edef\csname mst@forall@skip@\mst@version\endcsname
+ {\mst@forall@skip}%
+ \expandafter\edef\csname mst@prime@skip@\mst@version\endcsname
+ {\mst@prime@skip}%
+ \def\mst@tmp{#1}%
+ \ifx\mst@tmp\empty
+ \ifmst@italic
+ \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}%
+ \else
+ \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}%
+ \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}%
+ \fi
+ \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}%
+ \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@ush@loc{\itdefault}%
+ \fi
+ \ifmst@upgreek\def\mst@greek@lsh@loc{\updefault}%
+ \def\mst@greek@ush@loc{\updefault}%
+ \fi
+ \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}%
+ \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
\else
- \ifx\mst@oti\mst@tmp@enc\else
- \typeout{** mathastext: math accents have been assumed to be^^J%
- ** as in OT1 encoding.}
+ \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
+ \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
+ \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\ifmst@subdued ^^J** (in non subdued versions)\fi}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \edef\mst@tmp{\expandafter\noexpand\csname mst@hbar@mv#2\endcsname
+ \expandafter\noexpand\csname mst@ltbar@mv#2\endcsname}%
+ \expandafter\mst@dothe@hbarstuff\mst@tmp{#3}%
+ \edef\mst@tmp{\expandafter\noexpand\csname mst@inodot@mv#2\endcsname
+ \expandafter\noexpand\csname mst@jnodot@mv#2\endcsname}%
+ \expandafter\mst@dothe@inodotstuff\mst@tmp{#3}%
+ \ifmst@mathaccents
+ \mst@dothe@mathaccentsstuff{#2}{#3}%
+ \fi
+ \edef\mst@tmp{\expandafter\noexpand\csname mst@minus@mv#2\endcsname
+ \expandafter\noexpand\csname mst@varfam@minus@mv#2\endcsname}%
+ \ifmst@endash
+ \expandafter\mst@dothe@endashstuff\mst@tmp{#3}%
+ \else
+ \ifmst@emdash
+ \expandafter\mst@dothe@emdashstuff\mst@tmp{#3}%
+ \else
+ \expandafter\mst@dothe@hyphenstuff\mst@tmp
+ \fi
+ \fi
+}% \MTDeclareVersion@@
+\let\MathastextDeclareVersion\MTDeclareVersion
+\newcommand*\MTversion {\@ifstar\MTversion@s\MTversion@ }
+\newcommand*\MTversion@s [1]{\mathversion{#1}\MTversion@@ }
+\newcommand*\MTversion@ [2][]{%
+ \mathversion{#2}% defines \math@version as expanded #2
+ \edef\mst@tmpa{#1}%
+ \ifx\mst@tmpa\empty
+ \let\mst@tmp\math@version
+ \else
+ \let\mst@tmp\mst@tmpa
+ \fi
+ \edef\encodingdefault {\csname mst@encoding@\mst@tmp\endcsname}%
+ \edef\familydefault {\csname mst@family@\mst@tmp\endcsname}%
+ \edef\seriesdefault {\csname mst@series@\mst@tmp\endcsname}%
+ \edef\shapedefault {\csname mst@shape@\mst@tmp\endcsname}%
+ \edef\bfdefault {\csname mst@boldvariant@\mst@tmp\endcsname}%
+ \edef\itdefault {\csname mst@itdefault@\mst@tmp\endcsname}%
+ \edef\rmdefault {\csname mst@rmdefault@\mst@tmp\endcsname}%
+ \edef\sfdefault {\csname mst@sfdefault@\mst@tmp\endcsname}%
+ \edef\ttdefault {\csname mst@ttdefault@\mst@tmp\endcsname}%
+ \usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
+ \MTversion@@
+}% \MTversion@
+\newcommand*\MTversion@@ {%
+ \MTexistsdoesskip
+ \MTforalldoesskip
+ \MTprimedoesskip
+ \mst@exists@muskip\csname mst@exists@skip@\math@version\endcsname\relax
+ \mst@forall@muskip\csname mst@forall@skip@\math@version\endcsname\relax
+ \mst@prime@muskip\csname mst@prime@skip@\math@version\endcsname\relax
+ \edef\mst@tmpa{\csname mst@ltshape@\math@version\endcsname}%
+ \edef\mst@tmpb{\csname mst@shape@\math@version\endcsname}%
+ \MTmathoperatorsobeymathxx
+ \MTeverymathdefault
+ \MTcustomizenewmcodes
+ \@for\mst@tmpc:=it,sl\do{\ifx\mst@tmpc\mst@tmpa\MTnoicinmath\fi}%
+ \ifmst@frenchmath
+ \def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}%
+ \@for\mst@tmpc:=it,sl\do{\ifx\mst@tmpc\mst@tmpb\MTnoICinmath\fi}%
+ \fi
+ \ifmst@subdued
+ \def\mst@tmpa{normal}%
+ \ifx\math@version\mst@tmpa
+ \mst@restorealphabets
+ \MTstandardgreek
+ \MTmathoperatorsdonotobeymathxx
+ \MTnormalexists
+ \MTnormalforall
+ \MTeverymathoff
+ \MTresetnewmcodes
+ \mst@subduedhbar
+ \mst@subduedinodot
+ \mst@subduedmathaccents
+ \mst@subduedminus
+ \else
+ \def\mst@tmpa{bold}%
+ \ifx\math@version\mst@tmpa
+ \mst@restorealphabets
+ \MTstandardgreek
+ \MTmathoperatorsdonotobeymathxx
+ \MTnormalexists
+ \MTnormalforall
+ \MTeverymathoff
+ \MTresetnewmcodes
+ \mst@subduedhbar
+ \mst@subduedinodot
+ \mst@subduedmathaccents
+ \mst@subduedminus
+ \else
+ \mst@setalphabets
+ \MTcustomgreek
+ \mst@nonsubduedhbar
+ \mst@nonsubduedinodot
+ \mst@nonsubduedmathaccents
+ \mst@nonsubduedminus
+ \fi
+ \fi
+ \else
+ \MTcustomgreek % new with 1.3d
+ \mst@nonsubduedhbar
+ \mst@nonsubduedinodot
+ \mst@nonsubduedmathaccents
+ \mst@nonsubduedminus
+ \fi
+}% \MTversion@@
+\let\MathastextVersion\MTversion
+\let\Mathastextversion\MTversion
+\let\MTVersion\MTversion
+\let\mathastextversion\MTversion
+\newcommand*\MTWillUse[5][]{
+ \MTencoding{#2}
+ \MTfamily{#3}
+ \MTseries{#4}
+ \MTshape{#5}
+ \ifmst@italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
+ \edef\mst@tmp{#1}
+ \ifx\mst@tmp\empty\else\MTlettershape{#1}\fi
+ \Mathastext}
+\let\MathastextWillUse\MTWillUse
+\let\Mathastextwilluse\MTWillUse
+\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}}%
+}% \Mathastext@declare
+\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}%
+ \ifmst@subdued
+ \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
+ \mst@exists@muskip\mst@exists@skip\relax
+ \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}%
\fi
+ \else
+ \mst@exists@muskip\mst@exists@skip\relax
+ \mst@forall@muskip\mst@forall@skip\relax
+ \mst@prime@muskip\mst@prime@skip\relax
+ \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
+%% 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
+ \ifmst@nohbar\else
+ \typeout{** \string\hbar}%
+ \mst@dothe@hbarstuff
+ \mst@hbar@mvnormal\mst@ltbar@mvnormal\mst@encoding@normal
+ \let\mst@hbar@mvbold\mst@hbar@mvnormal
+ \fi
+ \mst@dothe@inodotstuff\inodot\jnodot\mst@encoding@normal
+ \let\mst@inodot@mvnormal\inodot
+ \let\mst@inodot@mvbold\inodot
+ \let\mst@jnodot@mvnormal\jnodot
+ \let\mst@jnodot@mvbold\jnodot
+ \ifmst@mathaccents
+ \typeout{** math accents}%
+ \mst@dothe@mathaccentsstuff{normal}\mst@encoding@normal
+ \fi
+ \ifmst@nominus\else
+ \typeout{** minus as endash}%
+ \ifmst@endash
+ \mst@dothe@endashstuff\mst@minus@mvnormal\mst@varfam@minus@mvnormal
+ \mst@encoding@normal
+ \mst@dothe@endashstuff\mst@minus@mvbold\mst@varfam@minus@mvbold
+ \mst@encoding@normal
+ \else
+ \ifmst@emdash
+ \mst@dothe@emdashstuff\mst@minus@mvnormal\mst@varfam@minus@mvnormal
+ \mst@encoding@normal
+ \mst@dothe@emdashstuff\mst@minus@mvbold\mst@varfam@minus@mvbold
+ \mst@encoding@normal
+ \else
+ \mst@dothe@hyphenstuff\mst@minus@mvnormal\mst@varfam@minus@mvnormal
+ \let\mst@minus@mvbold\mst@minus@mvnormal
+ \let\mst@varfam@minus@mvbold\mst@varfam@minus@mvnormal
+ \fi
+ \fi
+ \fi
+}% \Mathastext@
+\let\mathastext\Mathastext
+\Mathastext
+\ifmst@eulergreek
+ \typeout{** Greek letters will use the Euler font. Use \protect\MathastextEulerScale{<factor>} to scale the
+ font.}%
+ \ifmst@subdued{\typeout{** (subdued mode: normal and bold math
+ version with default Greek letters.)}}\fi
+\else
+\ifmst@symbolgreek
+ \typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
+ ** \protect\MathastextSymbolScale{<factor>} to scale the font.}%
+ \ifmst@subdued{\typeout{** (subdued mode: normal and bold math
+ version with default Greek letters.)}}\fi
\fi\fi
\ifmst@defaultsizes\else
\providecommand\@xxxpt{29.86}
@@ -2118,6 +2154,128 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\MTicinmath
\MTfixfonts
}%
+\AtBeginDocument{%
+ \everymath\expandafter{\the\everymath
+ \mst@the\mst@do@nonletters \let\mst@the\@gobble
+ \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
+ \mst@thef\mst@do@az \let\mst@thef\@gobble
+ \mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
+ \everydisplay\expandafter{\the\everydisplay
+ \mst@the\mst@do@nonletters \let\mst@the\@gobble
+ \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
+ \mst@thef\mst@do@az \let\mst@thef\@gobble
+ \mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
+ \MTcustomizenewmcodes
+ \let\mst@original@hbar\hbar
+ \let\mst@original@imath\imath
+ \let\mst@original@jmath\jmath
+ \@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
+ {dot}{ddot}{mathring}{hat}{tilde}%
+ \do
+ {\expandafter\let\csname mst@original@\@tempa\expandafter\endcsname
+ \csname \@tempa\endcsname}%
+ \ifmst@XeOrLua
+ \edef\mst@subduedminus
+ {\mst@Umathcodenum`\noexpand\-=\the\mst@Umathcodenum`\-\relax}%
+ \else
+ \edef\mst@subduedminus{\mathcode`\noexpand\-=\the\mathcode`\-\relax}%
+ \fi
+ \ifmst@subdued
+ \MTeverymathoff
+ \MTresetnewmcodes
+ \MTnoicinmath
+ \MTmathoperatorsdonotobeymathxx
+ %\mst@subduedhbar
+ \let\inodot\imath
+ \let\jnodot\jmath
+ %\mst@subduedmathaccents
+ \mst@subduedminus
+ \else
+ \mst@nonsubduedhbar
+ \mst@nonsubduedmathaccents
+ \mst@nonsubduedminus
+ \ifx\mst@itcorr\@undefined
+ \def\mst@itcorr{\ifnum\fam=\m@ne\/\fi}%
+ \@for\mst@tmp:=it,sl\do
+ {\ifx\mst@tmp\mst@ltshape@normal\let\mst@itcorr\@empty\fi }%
+ \fi
+ \ifx\mst@ITcorr\@undefined
+ \let\mst@ITcorr\mst@itcorr
+ \ifmst@frenchmath
+ \def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}%
+ \@for\mst@tmp:=it,sl\do
+ {\ifx\mst@tmp\mst@shape@normal\let\mst@ITcorr\@empty\fi }%
+ \fi
+ \fi
+ \fi
+}% \AtBeginDocument
+\ifmst@subdued
+\AtBeginDocument{%
+ \def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{%
+ \def\mst@normalmv@letter{#2}}%
+ \expandafter\mst@reserved\mv@normal\@nil
+ \def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{%
+ \def\mst@boldmv@letter{#2}}%
+ \expandafter\mst@reserved\mv@bold\@nil
+ \def\mst@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{%
+ \def\mst@normalmv@operator{#2}}%
+ \expandafter\mst@reserved\mv@normal\@nil
+ \def\mst@reserved#1\getanddefine@fonts\symoperators#2#3\@nil{%
+ \def\mst@boldmv@operator{#2}}%
+ \expandafter\mst@reserved\mv@bold\@nil
+ \edef\mst@tmp@enc{\mst@encoding@normal}%
+ \def\mst@reserved#1/#2/#3/#4/{\gdef\mst@debut{#1}\gdef\mst@reste{#2/#3/#4}}%
+ \begingroup\escapechar\m@ne
+ \xdef\mst@funnyoti{\expandafter\string\csname OT1\endcsname}%
+ \expandafter\expandafter\expandafter
+ \mst@reserved\expandafter\string\mst@normalmv@operator/%
+ \endgroup
+ \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp@enc\mst@oti\def\mst@tmp@enc{T1}\fi\fi
+ \edef\mst@normalmv@operator{\expandafter\noexpand\csname
+ \if1\mst@OneifUniEnc
+ \ifx\mst@debut\mst@funnyoti T1\else\mst@debut\fi
+ \else
+ \mst@tmp@enc
+ \fi/\mst@reste\endcsname}%
+ \edef\mst@tmp@enc{\mst@encoding@bold}%
+ \begingroup\escapechar\m@ne
+ \expandafter\expandafter\expandafter
+ \mst@reserved\expandafter\string\mst@boldmv@operator/%
+ \endgroup
+ \ifx\mst@debut\mst@funnyoti\ifx\mst@tmp@enc\mst@oti\def\mst@tmp@enc{T1}\fi\fi
+ \edef\mst@boldmv@operator{\expandafter\noexpand\csname
+ \if1\mst@OneifUniEnc
+ \ifx\mst@debut\mst@funnyoti T1\else\mst@debut\fi
+ \else
+ \mst@tmp@enc
+ \fi/\mst@reste\endcsname}%
+ \typeout{** ...entering subdued mode...}%
+ \expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@letter\symmtletterfont
+ \expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@letter\symmtletterfont
+ \expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@operator\symmtoperatorfont
+ \expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@operator\symmtoperatorfont
+ \typeout{** ...done.}%
+}% \AtBeginDocument
+\fi % \ifmst@subdued
+\expandafter \gdef \expandafter \@preamblecmds \expandafter {\@preamblecmds
+\do\MTitgreek
+\do\MTupgreek
+\do\MTitGreek
+\do\MTitGreek
+\do\Mathastextitgreek
+\do\Mathastextupgreek
+\do\MathastextitGreek
+\do\MathastextitGreek
+\do\MTgreekfont
+\do\Mathastextgreekfont
+\do\MTDeclareVersion
+\do\MathastextDeclareVersion
+\do\MTWillUse
+\do\MathastextWillUse
+\do\Mathastextwilluse
+\do\Mathastext
+\do\mathastext
+}
\endinput
%%
%% End of file `mathastext.sty'.