summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mathastext
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-08 01:03:45 +0000
committerKarl Berry <karl@freefriends.org>2011-02-08 01:03:45 +0000
commit857b001f5aa27f3e073ac96ef12ee842248762bb (patch)
tree0a6f29492a071e9671355d248412fd8916ea7c67 /Master/texmf-dist/tex/latex/mathastext
parent374087c5ca5704662336227756f2fd1a155a1ab4 (diff)
mathastext 1.12 (7feb11)
git-svn-id: svn://tug.org/texlive/trunk@21336 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathastext')
-rw-r--r--Master/texmf-dist/tex/latex/mathastext/mathastext.sty306
1 files changed, 196 insertions, 110 deletions
diff --git a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
index 8991a2c7aab..bf57a16bcf1 100644
--- a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
+++ b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
@@ -31,7 +31,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mathastext.sty}
- [2011/02/01 1.1 Use the text font in simple mathematics]
+ [2011/02/06 1.11 Use the text font in simple mathematics]
\def\mt@font@info@off{
\let\m@stext@info\@font@info
\let\m@stext@warning\@font@warning
@@ -41,6 +41,12 @@
\let\@font@info\m@stext@info
\let\@font@warning\m@stext@warning}
\mt@font@info@off
+ \edef\m@stextenc{\encodingdefault}
+ \edef\m@stextfam{\familydefault}
+ \edef\m@stextser{\seriesdefault}
+ \edef\m@stextsh{\shapedefault}
+ \edef\m@stextbold{\bfdefault}
+ \edef\m@stextshletter{\shapedefault}
\newif\ifmt@need@euler\mt@need@eulerfalse
\newif\ifmt@need@symbol\mt@need@symbolfalse
\newif\ifmt@defaultnormal\mt@defaultnormalfalse
@@ -48,18 +54,30 @@
\newif\ifmt@defaultbf\mt@defaultbffalse
\newif\ifmt@defaultsizes\mt@defaultsizesfalse
\newif\ifmt@twelve\mt@twelvefalse
-\newif\ifmt@endash\mt@endashfalse
+%% new behavior in v1.11:
+\newif\ifmt@endash\mt@endashtrue
\newif\ifmt@emdash\mt@emdashfalse
\def\mt@oti{OT1}\def\mt@ti{T1}
-\DeclareOption{noparenthesis}{\let\mtno@paren\@empty}
-\DeclareOption{nopunctuation}{\let\mtno@punct\@empty}
-%% new in v1.1:
+\def\mt@eui{EU1}\def\mt@euii{EU2}
+\newif\ifmt@alldelims
+\ifx\mt@oti\m@stextenc\mt@alldelimsfalse\else\mt@alldelimstrue\fi
+%% new or modified in v1.11:
+\DeclareOption{fouriervec}{\let\mt@fouriervec\@empty}
+\DeclareOption{nolessnomore}{\mt@alldelimsfalse}
\DeclareOption{endash}{\mt@endashtrue}
\DeclareOption{emdash}{\mt@emdashtrue}
+\DeclareOption{noendash}{\mt@endashfalse}
+\DeclareOption{symboldelimiters}{\mt@need@symboltrue
+ \let\mt@symboldelimiters\@empty}
+%% new in v1.1:
+\DeclareOption{italic}{\let\mt@italic\@empty\edef\m@stextshletter{\itdefault}}
+\DeclareOption{frenchmath}{\let\mt@frenchmath\@empty}
\DeclareOption{noplus}{\let\mtno@plus\@empty}
\DeclareOption{nominus}{\let\mtno@minus\@empty}
\DeclareOption{nohbar}{\let\mtno@hbar\@empty}
%%
+\DeclareOption{noparenthesis}{\let\mtno@paren\@empty}
+\DeclareOption{nopunctuation}{\let\mtno@punct\@empty}
\DeclareOption{noplusnominus}{\ExecuteOptions{noplus,nominus}}
\DeclareOption{noequal}{\let\mtno@equal\@empty}
\DeclareOption{noexclam}{\let\mtno@exclam\@empty}
@@ -69,7 +87,7 @@
nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareOption{nodigits}{\let\mtno@digits\@empty}
\DeclareOption{defaultimath}{\let\mt@defaultimath\@empty}
-\DeclareOption{alldelims}{\let\mt@alldelims\@empty}
+\DeclareOption{alldelims}{\mt@alldelimstrue}
\DeclareOption{mathaccents}{\let\mt@mathaccents\@empty}
\DeclareOption{selfGreek}{\let\mt@selfGreek\@empty}
\DeclareOption{selfgreek}{\let\mt@selfGreek\@empty}
@@ -82,8 +100,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareOption{symbolmisc}{\mt@need@symboltrue
\let\mt@symbolmisc\@empty}
\DeclareOption{symbol}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}}
-\DeclareOption{symbolmax}{\ExecuteOptions{symbolgreek,symbolmisc,symbolre}
- \let\mt@symbolmax\@empty}
+\DeclareOption{symbolmax}{\ExecuteOptions{symbol,symboldelimiters}}
\DeclareOption{eulerdigits}{\mt@need@eulertrue\let\mt@eulerdigits\@empty}
\DeclareOption{eulergreek}{\mt@need@eulertrue\let\mt@eulergreek\@empty}
\DeclareOption{defaultnormal}{\mt@defaultnormaltrue}
@@ -91,62 +108,75 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareOption{defaultbf}{\mt@defaultbftrue}
\DeclareOption{defaultmathsizes}{\mt@defaultsizestrue}
\DeclareOption{12pt}{\mt@twelvetrue}
-%% deprecated in v1.1, rather a command \fouriervec is provided
-%% \DeclareOption{defaultvec}{\mt@defaultvectrue}
-%% new in v1.1
-\DeclareOption{italic}{\let\mt@italic\@empty}
-\DeclareOption{frenchmath}{\let\mt@frenchmath\@empty}
\DeclareOption*{\PackageWarning{mathastext}{Unknown option `\CurrentOption'}}
\ProcessOptions\relax
%%
\DeclareRobustCommand\pmvec[1]{\mathord{\stackrel{\raisebox{-.5ex}%
{\tiny\boldmath$\mathord{\rightarrow}$}}{{}#1}}}
+\ifx\mt@fouriervec\@empty
\DeclareFontEncoding{FML}{}{}
\DeclareFontSubstitution{FML}{futm}{m}{it}
- \DeclareSymbolFont{mtjustepourvec}{FML}{futm}{m}{it}
- \SetSymbolFont{mtjustepourvec}{bold}{FML}{futm}{b}{it}
- \DeclareMathAccent{\fouriervec}{\mathord}{mtjustepourvec}{"7E}
- \edef\m@stextenc{\encodingdefault}
- \edef\m@stextfam{\familydefault}
- \edef\m@stextser{\seriesdefault}
- \edef\m@stextsh{\shapedefault}
- \edef\m@stextbold{\bfdefault}
- \edef\m@stextshletter{\shapedefault}
- \ifx\mt@italic\@empty\edef\m@stextshletter{\itdefault}\fi
+ \DeclareSymbolFont{mtfourierpourvec}{FML}{futm}{m}{it}
+ \SetSymbolFont{mtfourierpourvec}{bold}{FML}{futm}{b}{it}
+ \DeclareMathAccent{\fouriervec}{\mathord}{mtfourierpourvec}{"7E}
+\fi
\DeclareSymbolFont{mtoperatorfont}
{\m@stextenc}{\m@stextfam}{\m@stextser}{\m@stextsh}
\DeclareSymbolFont{mtletterfont}
{\m@stextenc}{\m@stextfam}{\m@stextser}{\m@stextshletter}
\DeclareSymbolFontAlphabet{\Mathnormal}{mtletterfont}
\DeclareSymbolFontAlphabet{\Mathrm}{mtoperatorfont}
+ \def\m@stextenc{\encodingdefault}
+ \def\m@stextfam{\familydefault}
+ \def\m@stextser{\seriesdefault}
+ \def\m@stextsh{\shapedefault}
+ \def\m@stextbold{\bfdefault}
+ \def\m@stextshletter{\shapedefault}
+ \ifx\mt@italic\@empty\def\m@stextshletter{\itdefault}\fi
\ifmt@need@euler
\DeclareSymbolFont{mteulervm}{U}{zeur}{m}{n}
\DeclareSymbolFontAlphabet{\MathEuler}{mteulervm}
%% \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\m@stextbold}{n}
\fi
-\newcommand\MathastextEulerScale[1]{\edef\zeu@Scale{#1}}
+\newcommand\MTEulerScale[1]{\edef\zeu@Scale{#1}}
+\let\MathastextEulerScale\MTEulerScale
\ifmt@need@symbol
\def\psy@scale{1}
\DeclareSymbolFont{mtpsymbol}{U}{psy}{m}{n}
%% \SetSymbolFont{mtpsymbol}{bold}{U}{psy}{\m@stextbold}{n}
\DeclareSymbolFontAlphabet{\MathPSymbol}{mtpsymbol}
\fi
-\newcommand\MathastextSymbolScale[1]{\edef\psy@scale{#1}}
-\DeclareRobustCommand\Mathastextencoding[1]{\edef\m@stextenc{#1}}
-\DeclareRobustCommand\Mathastextfamily[1]{\edef\m@stextfam{#1}}
-\DeclareRobustCommand\Mathastextseries[1]{\edef\m@stextser{#1}}
-\DeclareRobustCommand\Mathastextshape[1]{\edef\m@stextsh{#1}}
-\DeclareRobustCommand\Mathastextboldvariant[1]{\edef\m@stextbold{#1}}
-\DeclareRobustCommand\Mathastextlettershape[1]{\edef\m@stextshletter{#1}}
-\DeclareRobustCommand\MathastextWillUse[5][\@empty]{
- \ifx\@empty#1\else\Mathastextlettershape{#1}\fi
- \Mathastextencoding{#2}
- \Mathastextfamily{#3}
- \Mathastextseries{#4}
- \Mathastextshape{#5}
+\newcommand\MTSymbolScale[1]{\edef\psy@scale{#1}}
+\let\MathastextSymbolScale\MTSymbolScale
+\DeclareRobustCommand\MTencoding[1]{\def\m@stextenc{#1}}
+\DeclareRobustCommand\MTfamily[1]{\def\m@stextfam{#1}}
+\DeclareRobustCommand\MTseries[1]{\def\m@stextser{#1}}
+\DeclareRobustCommand\MTshape[1]{\def\m@stextsh{#1}
+ \ifx\mt@italic\@empty\else\def\m@stextshletter{#1}\fi}
+\DeclareRobustCommand\MTboldvariant[1]{\def\m@stextbold{#1}}
+\DeclareRobustCommand\MTlettershape[1]{\def\m@stextshletter{#1}}
+\let\Mathastextencoding\MTencoding
+\let\Mathastextfamily\MTfamily
+\let\Mathastextseries\MTseries
+\let\Mathastextshape\MTshape
+\let\Mathastextboldvariant\MTboldvariant
+\let\Mathastextlettershape\MTlettershape
+\DeclareRobustCommand\MTWillUse[5][\@empty]{
+ \MTencoding{#2}
+ \MTfamily{#3}
+ \MTseries{#4}
+ \MTshape{#5}
+ \ifx\@empty#1
+ \else
+%% we check if optional argument was [], this does not detect [ ]
+ \def\mt@empty{}\def\mt@tmp{#1}
+ \ifx\mt@empty\mt@tmp\else\MTlettershape{#1}\fi
+ \fi
\Mathastext}
-\DeclareRobustCommand\Mathastext{
+\let\MathastextWillUse\MTWillUse
+\DeclareRobustCommand\Mathastext[1][\@empty]{
\mt@font@info@off
+\ifx\@empty#1 % no optional argument
\edef\mt@encoding@normal{\m@stextenc}
\edef\mt@family@normal{\m@stextfam}
\edef\mt@series@normal{\m@stextser}
@@ -185,52 +215,51 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
{\mt@series@bold}
{\mt@ltshape@bold}
\ifmt@need@euler
- \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\m@stextbold}{n}
- \DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\m@stextbold}{n}
+ \SetSymbolFont{mteulervm}{bold}{U}{zeur}{\mt@boldvariant@normal}{n}
+ \DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\mt@boldvariant@normal}{n}
\fi
- \ifmt@need@symbol\SetSymbolFont{mtpsymbol}{bold}{U}{psy}{\m@stextbold}{n}\fi
- \typeout{** Latin letters in math versions normal (resp. bold) are now^^J%
+ \ifmt@need@symbol\SetSymbolFont{mtpsymbol}{bold}
+ {U}{psy}{\mt@boldvariant@normal}{n}\fi
+ \typeout{** Latin letters in math versions normal (resp. bold) are now\MessageBreak
** set up to use the fonts
-\mt@encoding@normal/\mt@family@normal/\mt@series@normal(\m@stextbold)/\mt@ltshape@normal}
+\mt@encoding@normal/\mt@family@normal/\mt@series@normal%
+(\mt@boldvariant@normal)/\mt@ltshape@normal}
\ifx\mtno@digits\@empty\else
\typeout{** Other characters (digits, ...) and
- \protect\log-like names will be^^J%
+ \protect\log-like names will be\MessageBreak
** typeset with the \expandafter`\mt@shape@normal' shape.}
+ \fi
+\else % optional argument, then we rather do DeclareVersion
+ \edef\mt@tmp{#1}\def\mt@empty{}
+ \ifx\mt@tmp\mt@empty
+ \Mathastext % no infinite loop!
+ \else
+ \MTDeclareVersion[\m@stextshletter]{#1}
+ {\m@stextenc}{\m@stextfam}{\m@stextser}{\m@stextsh}
+ \fi
\fi
+\mt@font@info@on
}
-\def\operator@font{\mathgroup\symmtoperatorfont}
-\Mathastext
-\let\mt@saved@mathnormal\mathnormal
-\@ifpackageloaded{fourier}{\ifsloped\else\let\mt@saved@mathnormal\mathrm\fi}{}
-\ifmt@defaultnormal\else\renewcommand{\mathnormal}{\Mathnormal}\fi
-\ifmt@defaultrm\else\renewcommand{\mathrm}{\Mathrm}\fi
-\ifmt@defaultbf\else\renewcommand{\mathbf}{\Mathbf}\fi
-\ifx\mt@symbolgreek\@empty
-\typeout{** Greek letters will use the PostScript Symbol font. Use^^J%
-** \protect\MathastextSymbolScale{factor} to scale the font by <factor>.}
-\fi
-\ifx\mt@eulergreek\@empty
-\typeout{** Greek letters will use the Euler font. Use^^J%
-** \protect\MathastextEulerScale{factor} to scale the font by <factor>.}
-\fi
-\ifx\mt@selfGreek\@empty
-\typeout{** Capital Greek letters from the fonts declared for latin letters:^^J%
-** only for OT1 or compatible encodings; glyphs may be unavailable.}
-\fi
-\DeclareRobustCommand\MathastextDeclareVersion[6][\@empty]{
+\DeclareRobustCommand\MTDeclareVersion[6][\@empty]{
\mt@font@info@off
- \DeclareMathVersion{#2}
- \edef\mt@tmp{@#2}
- \expandafter\edef\csname mt@encoding\mt@tmp\endcsname{#3}
- \expandafter\edef\csname mt@family\mt@tmp\endcsname{#4}
- \expandafter\edef\csname mt@series\mt@tmp\endcsname{#5}
- \expandafter\edef\csname mt@shape\mt@tmp\endcsname{#6}
- \expandafter\edef\csname mt@boldvariant\mt@tmp\endcsname{\m@stextbold}
- \ifx\@empty#1
+ \edef\mt@tmp{#2}
+ \DeclareMathVersion{\mt@tmp}
+ \expandafter\edef\csname mt@encoding@\mt@tmp\endcsname{#3}
+ \expandafter\edef\csname mt@family@\mt@tmp\endcsname{#4}
+ \expandafter\edef\csname mt@series@\mt@tmp\endcsname{#5}
+ \expandafter\edef\csname mt@shape@\mt@tmp\endcsname{#6}
+ \expandafter\edef\csname mt@boldvariant@\mt@tmp\endcsname{\m@stextbold}
+ \newif\ifmt@reallynoopt\mt@reallynoopttrue
+ \ifx\@empty#1
+ \else % we check nevertheless for [] situation, will not work with [ ]
+ \def\mt@@tmp{#1}\def\mt@empty{}
+ \ifx\mt@@tmp\mt@empty\else\mt@reallynooptfalse\fi
+ \fi
+ \ifmt@reallynoopt
\ifx\mt@italic\@empty
\SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\m@stextshletter}
\typeout{** Latin letters in math version `#2' will use the font
- #3/#4/#5/\m@stextshletter^^J%
+ #3/#4/#5/\m@stextshletter\MessageBreak
** Other characters (digits, ...) and \protect\log-like names
will be in `#6' shape.}
\expandafter\def\csname mt@ltshape\mt@tmp\endcsname{\m@stextshletter}
@@ -243,7 +272,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\else
\SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}
\typeout{** Latin letters in math version `#2' will use the font
- #3/#4/#5/#1^^J%
+ #3/#4/#5/#1\MessageBreak
** Other characters (digits, ...) and \protect\log-like names will be in `#6' shape.}
\expandafter\edef\csname mt@ltshape\mt@tmp\endcsname{#1}
\fi
@@ -254,10 +283,36 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\fi
\mt@font@info@on
}
-\DeclareRobustCommand\MathastextVersion[2][\@empty]{%
+\let\MathastextDeclareVersion\MTDeclareVersion
+\def\operator@font{\mathgroup\symmtoperatorfont}
+\Mathastext
+\let\mt@saved@mathnormal\mathnormal
+\@ifpackageloaded{fourier}{\ifsloped\else\let\mt@saved@mathnormal\mathrm\fi}{}
+\ifmt@defaultnormal\else\renewcommand{\mathnormal}{\Mathnormal}\fi
+\ifmt@defaultrm\else\renewcommand{\mathrm}{\Mathrm}\fi
+\ifmt@defaultbf\else\renewcommand{\mathbf}{\Mathbf}\fi
+\ifx\mt@symbolgreek\@empty
+\typeout{** Greek letters will use the PostScript Symbol font. Use\MessageBreak
+** \protect\MathastextSymbolScale{factor} to scale the font by <factor>.}
+\fi
+\ifx\mt@eulergreek\@empty
+\typeout{** Greek letters will use the Euler font. Use\MessageBreak
+** \protect\MathastextEulerScale{factor} to scale the font by <factor>.}
+\fi
+\ifx\mt@selfGreek\@empty
+\typeout{** Capital Greek letters from the fonts declared for latin letters:\MessageBreak
+** only for OT1 or compatible encodings; glyphs may be unavailable.}
+\fi
+\DeclareRobustCommand\MTVersion[2][\@empty]{%
\mathversion{#2}%
- \edef\mt@tmp{@#1}%
- \ifx\@empty#1\else%
+ \ifx\@empty#1% no optional argument
+ \edef\mt@tmp{@#2}
+ \else% we check nevertheless for [] situation, will not work with [ ]
+ \def\mt@@tmp{#1}\def\mt@empty{}%
+ \ifx\mt@@tmp\mt@empty\edef\mt@tmp{@#2}%
+ \else\edef\mt@tmp{@#1}%
+ \fi%
+ \fi%
\usefont{\csname mt@encoding\mt@tmp\endcsname}%
{\csname mt@family\mt@tmp\endcsname}%
{\csname mt@series\mt@tmp\endcsname}%
@@ -271,8 +326,8 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\edef\mt@@shape{\csname mt@shape\mt@tmp\endcsname}%
\renewcommand{\updefault}{\mt@@shape}%
\edef\mt@@boldvariant{\csname mt@boldvariant\mt@tmp\endcsname}%
-\renewcommand{\bfdefault}{\mt@@boldvariant}%
-\fi}
+\renewcommand{\bfdefault}{\mt@@boldvariant}}
+\let\MathastextVersion\MTVersion
\DeclareMathSymbol{a}{\mathalpha}{mtletterfont}{`a}
\DeclareMathSymbol{b}{\mathalpha}{mtletterfont}{`b}
\DeclareMathSymbol{c}{\mathalpha}{mtletterfont}{`c}
@@ -343,15 +398,17 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{8}{\mathalpha}{\mt@font@tbu}{`8}
\DeclareMathSymbol{9}{\mathalpha}{\mt@font@tbu}{`9}
\fi
-\ifx\mt@symbolmax\@empty
+\ifx\mt@symboldelimiters\@empty
\def\mt@font@tbu{mtpsymbol}
\else
\def\mt@font@tbu{mtoperatorfont}
\fi
+%%
\ifx\mtno@exclam\@empty\else
\DeclareMathSymbol{!}{\mathclose}{\mt@font@tbu}{"21}
\DeclareMathSymbol{?}{\mathclose}{\mt@font@tbu}{"3F}
\fi
+%%
\ifx\mtno@ast\@empty\else
\DeclareMathSymbol{*}{\mathalpha}{\mt@font@tbu}{"2A}
\fi
@@ -374,15 +431,28 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\def\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\mt@minus@sign\mkern-2mu$}\hfill
\mkern-7mu\smash\mt@minus@sign$}
+\edef\mt@enc{\m@stextenc}
\ifmt@endash
-\edef\@tmpa{\m@stextenc}
-\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\@tmpa\string\textendash\endcsname}
+\ifx\mt@enc\mt@eui % xetex
+ \XeTeXmathcode`\-="2 "\the\symmtoperatorfont "2013 \relax
+\else
+\ifx\mt@enc\mt@euii % luatex
+ \luatexUmathcode`\-="2 "\the\symmtoperatorfont "2013 \relax
+\else % assume 8bit encoding
+ \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mt@enc\string\textendash\endcsname}
+\fi\fi
\else
\ifmt@emdash
-\edef\@tmpa{\m@stextenc}
-\DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
-{\expandafter\the\expandafter\csname\@tmpa\string\textemdash\endcsname}
+\ifx\mt@enc\mt@eui % xetex
+ \XeTeXmathcode`\-="2 "\the\symmtoperatorfont "2014 \relax
+\else
+\ifx\mt@enc\mt@euii % luatex
+ \luatexUmathcode`\-="2 "\the\symmtoperatorfont "2014 \relax
+\else
+ \DeclareMathSymbol{-}{\mathbin}{mtoperatorfont}
+{\expandafter\the\expandafter\csname\mt@enc\string\textemdash\endcsname}
+\fi\fi
\else
\DeclareMathSymbol{-}{\mathbin}{\mt@font@tbu}{"2D}
\fi\fi\fi
@@ -390,14 +460,20 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
%% (original definition from latex.ltx)
\def\mathrlap{\mathpalette\mathrlapinternal}
\def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
-\ifx\mt@ti\m@stextenc
+\ifx\mt@ti\mt@enc
\DeclareMathAccent{\mt@ltbar}{\mathalpha}{mtletterfont}{9}
\else
\DeclareMathAccent{\mt@ltbar}{\mathalpha}{mtletterfont}{22}
\fi
\ifx\mtno@hbar\@empty\else
+\ifx\mt@enc\mt@eui % xetex
+ \XeTeXmathchardef\hbar="7 "\the\symmtoperatorfont "0127 \relax
+\else
+\ifx\mt@enc\mt@euii % luatex
+ \luatexUmathchardef\hbar="7 "\the\symmtoperatorfont "0127 \relax %% or 210F?
+\else % assume 8bit encoding
\def\hbar{\mathrlap{\mt@ltbar{\ }}h}
-\fi
+\fi\fi\fi
\ifx\mtno@plus\@empty\else
\DeclareMathSymbol{+}{\mathbin}{\mt@font@tbu}{"2B}
\fi
@@ -414,13 +490,13 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathDelimiter{/}{\mathord}{\mt@font@tbu}{"2F}{largesymbols}{"0E}
\DeclareMathSymbol{/}{\mathord}{\mt@font@tbu}{"2F}
\fi
-\ifx\mt@alldelims\@empty
- \ifx\mt@symbolmax\@empty\else
- \ifx\mt@ti\m@stextenc\else
- \typeout{** mathastext: `alldelims'. Characters <,>,{,},| will be assumed
- to^^J%
- ** be located as in ascii. True for T1 fonts or OT1 fixed-width fonts.}
- \fi\fi
+\ifmt@alldelims
+%% \ifx\mt@symboldelimiters\@empty\else
+%% \ifx\mt@ti\mt@enc\else
+%% \typeout{** mathastext: `alldelims'. Characters <,>,{,},| will be assumed
+%% to\MessageBreak
+%% ** be located as in ascii. True for T1 fonts or OT1 fixed-width fonts.}
+%% \fi\fi
\DeclareMathDelimiter{<}{\mathopen}{\mt@font@tbu}{"3C}{largesymbols}{"0A}
\DeclareMathDelimiter{>}{\mathclose}{\mt@font@tbu}{"3E}{largesymbols}{"0B}
\DeclareMathSymbol{<}{\mathrel}{\mt@font@tbu}{"3C}
@@ -494,7 +570,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\otimes}{\mathbin}{mtpsymbol}{196}
\DeclareMathSymbol{\oplus}{\mathbin}{mtpsymbol}{197}
\DeclareMathSymbol{\pm}{\mathbin}{mtpsymbol}{177}
-\DeclareMathSymbol{*}{\mathbin}{mtpsymbol}{42}
+%%\DeclareMathSymbol{*}{\mathbin}{mtpsymbol}{42}
\DeclareMathSymbol{\ast}{\mathbin}{mtpsymbol}{42}
\DeclareMathSymbol{\times}{\mathbin}{mtpsymbol}{180}
\DeclareMathSymbol{\proptopsy}{\mathrel}{mtpsymbol}{181}
@@ -551,12 +627,13 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\Rho}{\mt@mathord}{\mt@font@tbu}{"50}
\DeclareMathSymbol{\Tau}{\mt@mathord}{\mt@font@tbu}{"54}
\DeclareMathSymbol{\Chi}{\mt@mathord}{\mt@font@tbu}{"58}
-%% we now treat the other capital Greek letters
\ifx\mt@symbolgreek\@empty
+ \ifx\mt@eulergreek\@empty\else
+ \ifx\mt@selfGreek\@empty\else
%% attention le P de Symbol est un \Pi pas un \Rho
-\DeclareMathSymbol{\Rho}{\mt@mathord}{\mt@font@tbu}{"52}
+\DeclareMathSymbol{\Rho}{\mathord}{mtpsymbol}{"52}
%% attention le X de Symbol est un \Xi pas un \Chi
-\DeclareMathSymbol{\Chi}{\mt@mathord}{\mt@font@tbu}{"43}
+\DeclareMathSymbol{\Chi}{\mathord}{mtpsymbol}{"43}
%% attention le F de Symbol est un \Phi. Il n'y a pas de \Digamma
\let\Digamma\undefined
\DeclareMathSymbol{\Gamma}{\mathord}{mtpsymbol}{"47}
@@ -570,6 +647,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\Phi}{\mathord}{mtpsymbol}{"46}
\DeclareMathSymbol{\Psi}{\mathord}{mtpsymbol}{"59}
\DeclareMathSymbol{\Omega}{\mathord}{mtpsymbol}{"57}
+ \fi\fi
\else
\DeclareMathSymbol\Gamma {\mathalpha}{\mt@font@tbu}{"00}
\DeclareMathSymbol\Delta {\mathalpha}{\mt@font@tbu}{"01}
@@ -655,20 +733,28 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSymbol{\partial}{\mathord}{mtpsymbol}{"B6}
\DeclareMathSymbol{\wp}{\mathord}{mtpsymbol}{"C3}
\fi\fi
-\ifx\m@stextenc\mt@oti
-\DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{16}
-\DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{17}
+\ifx\mt@enc\mt@eui % xetex
+ \XeTeXmathchardef\inodot="7 "\the\symmtletterfont "0131 \relax
+ \XeTeXmathchardef\jnodot="7 "\the\symmtletterfont "0237 \relax
\else
-%% assumed to be as in T1
-\DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}{25}
-\DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}{26}
-\fi
+\ifx\mt@enc\mt@euii % luatex
+ \luatexUmathchardef\inodot="7 "\the\symmtletterfont "0131 \relax
+ \luatexUmathchardef\jnodot="7 "\the\symmtletterfont "0237 \relax
+\else % assume 8bit encoding
+ \DeclareMathSymbol{\inodot}{\mathalpha}{mtletterfont}
+{\expandafter\the\expandafter\csname\mt@enc\string\i\endcsname}
+ \DeclareMathSymbol{\jnodot}{\mathalpha}{mtletterfont}
+{\expandafter\the\expandafter\csname\mt@enc\string\j\endcsname}
+\fi\fi
\ifx\mt@defaultimath\@empty\else
\renewcommand{\imath}{\inodot}
\renewcommand{\jmath}{\jnodot}
+ \let\mt@oldi\i \let\mt@oldj\j
+ \DeclareRobustCommand{\i}{\ifmmode\inodot\else\mt@oldi\fi}
+ \DeclareRobustCommand{\j}{\ifmmode\jnodot\else\mt@oldj\fi}
\fi
\ifx\mt@mathaccents\@empty
-\ifx\mt@ti\m@stextenc
+\ifx\mt@ti\mt@enc
\DeclareMathAccent{\acute}{\mathalpha}{mtoperatorfont}{1}
\DeclareMathAccent{\grave}{\mathalpha}{mtoperatorfont}{0}
\DeclareMathAccent{\ddot}{\mathalpha}{mtoperatorfont}{4}
@@ -690,8 +776,8 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathAccent{\hat}{\mathalpha}{mtoperatorfont}{94}
\DeclareMathAccent{\dot}{\mathalpha}{mtoperatorfont}{95}
\DeclareMathAccent{\mathring}{\mathalpha}{mtoperatorfont}{23}
-\ifx\mt@oti\m@stextenc\else
- \typeout{** mathastext: `mathaccents'; accents have been assumed to be^^J%
+\ifx\mt@oti\mt@enc\else
+ \typeout{** mathastext: `mathaccents'; accents have been assumed to be\MessageBreak
** as in OT1 encoding.}
\fi\fi\fi
\ifmt@defaultsizes\else
@@ -717,7 +803,7 @@ nopunctuation,noplusnominus,noequal,noexclam,nospecials}}
\DeclareMathSizes{\@xxvpt}{\@xxvpt}{\@xxpt}{\@xviipt}
\DeclareMathSizes{\@xxxpt}{\@xxxpt}{\@xxvpt}{\@xxpt}
\DeclareMathSizes{\@xxxvipt}{\@xxxvipt}{\@xxxpt}{\@xxvpt}
-\typeout{** mathastext has declared larger sizes for subscripts.^^J%
+\typeout{** mathastext has declared larger sizes for subscripts.\MessageBreak
** To keep LaTeX defaults, use option `defaultmathsizes'.}
\fi
\AtBeginDocument{