summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-06 23:12:56 +0000
committerKarl Berry <karl@freefriends.org>2013-09-06 23:12:56 +0000
commit5eb736f1ebfc243975bbd8d48c8fb8a47ba6f2df (patch)
tree6cfaff1c1d7d07dbaca1788af081591273ffeb00 /Master/texmf-dist/tex
parentdd48d69037fc00584e152689afbc6d811cda2276 (diff)
mathastext (6sep13)
git-svn-id: svn://tug.org/texlive/trunk@31587 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/mathastext/mathastext.sty69
1 files changed, 45 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
index 03f6681852c..116c207eda1 100644
--- a/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
+++ b/Master/texmf-dist/tex/latex/mathastext/mathastext.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
\ProvidesPackage{mathastext}
- [2013/09/02 v1.3 Use the text font in math mode (jfB)]
+ [2013/09/04 v1.3a Use the text font in math mode (jfB)]
%%
%% Package `mathastext', for LaTeX2e.
%% Author: Jean-Francois Burnol
@@ -216,32 +216,53 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\let\mathastextforallskip\MTforallskip
\let\mathastextprimeskip\MTprimeskip
\ifmst@noparen\else
-\AtBeginDocument{
-\@ifundefined{resetMathstrut@}{}{%
- \PackageWarningNoLine{mathastext}{%
- \string\resetMathstrut@\space from amsmath replaced by custom version}
- \ifmst@symboldelimiters
- \def\resetMathstrut@{%
- \setbox\z@\hbox{\the\textfont\symmtpsymbol\char40
- \the\textfont\symmtoperatorfont\char40
- \the\textfont\symoperators\char40}%
- \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}
- \else
- \def\resetMathstrut@{%
- \setbox\z@\hbox{\the\textfont\symmtoperatorfont\char40
- \the\textfont\symoperators\char40}%
- \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}
- \fi}}
+\AtBeginDocument{%
+ \@ifundefined{resetMathstrut@}{% nothing to do, no amsmath
+ }{% amsmath loaded, and possibly patched by things such as lualatex-math
+ \let\mst@savedresetMathstrut@\resetMathstrut@
+ \PackageWarning{mathastext}{current meaning of amsmath
+ \string\resetMathstrut@\space saved}%
+ \ifx\mst@the\the % means that \MTnonlettersobeymathxx was used in preamble
+ \let\mst@the\@gobble\MTnonlettersobeymathxx
+ \fi}}
\fi
\newtoks\mst@do@nonletters
\newtoks\mst@do@easynonletters
\newtoks\mst@do@az
\newtoks\mst@do@AZ
-\newcommand*\MTnonlettersdonotobeymathxx{\let\mst@the\@gobble}
-\newcommand*\MTnonlettersobeymathxx{\let\mst@the\the}
+\let\mst@the\@gobble
+\newcommand*\MTnonlettersdonotobeymathxx{%
+ \ifx\mst@the\@gobble
+ \else
+ \@ifundefined{mst@savedresetMathstrut@}{}{%
+ \PackageWarning{mathastext}{restoring (for this group or environment) amsmath \string\resetMathstrut@}%
+ \let\resetMathstrut@\mst@savedresetMathstrut@}%
+ \fi
+ \let\mst@the\@gobble
+}
+\newcommand*\MTnonlettersobeymathxx{%
+ \ifx\mst@the\the
+ \else
+ \@ifundefined{mst@savedresetMathstrut@}{}{%
+ \ifmst@symboldelimiters
+ \def\resetMathstrut@{%
+ \setbox\z@\hbox{\the\textfont\symmtpsymbol\char40
+ \the\textfont\symmtoperatorfont\char40
+ \the\textfont\symoperators\char40}%
+ \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}%
+ \else
+ \def\resetMathstrut@{%
+ \setbox\z@\hbox{\the\textfont\symmtoperatorfont\char40
+ \the\textfont\symoperators\char40}%
+ \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}%
+ \fi
+ \PackageWarning{mathastext}{\string\resetMathstrut@\space
+ 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}
-\MTnonlettersdonotobeymathxx % 1.2c !!!
\MTeasynonlettersobeymathxx
\newcommand*\MTmathactiveletters{\let\mst@thef\the \let\mst@theF\the}
\newcommand*\MTmathactiveLetters{\let\mst@theF\the}
@@ -271,12 +292,12 @@ defaultbf,defaultit,defaultsf,defaulttt}\mst@nonormalboldtrue}
\mst@theF\mst@do@AZ \let\mst@theF\@gobble}
}
\newcommand*\MTsetmathskips[3]{%
- \@namedef{mst@before\string#1}{\mskip#2\relax}%
- \@namedef{mst@after\string#1}{\mskip#3\relax}%
+ \@namedef{mst@before#1}{\mskip#2\relax}%
+ \@namedef{mst@after#1}{\mskip#3\relax}%
}
\newcommand*\MTunsetmathskips[1]{%
- \@namedef{mst@before\string#1}{\relax}%
- \@namedef{mst@after\string#1}{\relax}%
+ \@namedef{mst@before#1}{\relax}%
+ \@namedef{mst@after#1}{\relax}%
}
\def\mst@magic@v #1#2#3#4#5{#1#3#4}
\def\mst@magic@vi #1#2#3#4#5#6{#1#2#4#5}