summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-11 21:14:21 +0000
committerKarl Berry <karl@freefriends.org>2015-08-11 21:14:21 +0000
commitd49ef70ccab816d2bf26857c167a9fea42d8e550 (patch)
tree1fce4bd03892135fdf3f484183f4670464cb610e
parent1ab591e48c967552295cba91d4b1c0513e39ddf5 (diff)
breqn (11aug15)
git-svn-id: svn://tug.org/texlive/trunk@38099 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/breqn/README38
-rw-r--r--Master/texmf-dist/doc/latex/breqn/breqn.pdfbin647250 -> 654479 bytes
-rw-r--r--Master/texmf-dist/doc/latex/breqn/flexisym.pdfbin285787 -> 286499 bytes
-rw-r--r--Master/texmf-dist/doc/latex/breqn/mathstyle.pdfbin202481 -> 205518 bytes
-rw-r--r--Master/texmf-dist/source/latex/breqn/breqn.dtx14
-rw-r--r--Master/texmf-dist/source/latex/breqn/flexisym.dtx13
-rw-r--r--Master/texmf-dist/source/latex/breqn/mathstyle.dtx116
-rw-r--r--Master/texmf-dist/tex/latex/breqn/breqn.sty2
-rw-r--r--Master/texmf-dist/tex/latex/breqn/flexisym.sty2
-rw-r--r--Master/texmf-dist/tex/latex/breqn/mathstyle.sty95
10 files changed, 164 insertions, 116 deletions
diff --git a/Master/texmf-dist/doc/latex/breqn/README b/Master/texmf-dist/doc/latex/breqn/README
deleted file mode 100644
index c7c3e1e2e6d..00000000000
--- a/Master/texmf-dist/doc/latex/breqn/README
+++ /dev/null
@@ -1,38 +0,0 @@
-# The BREQN packages
-
-This is the latest repository for the breqn package, originally developed by Michael J. Downes and later taken over by Morten Høgholm.
-
-The version of the package here will be used as the source for current CTAN releases.
-
-Internal updates are planned but no major development is expected. Contributors welcome --- if you dare.
-
-Feedback should be directed to the Issue Tracker at:
- <https://github.com/wspr/breqn/issues>
-
-## Installation
-
-Running TeX on each dtx file extracts the runtime files. See the dtx
-files for details.
-
-## The code
-
-### breqn
-
-The breqn package facilitates automatic line-breaking of displayed
-math expressions. The package was originally developed by Michael
-J. Downes.
-
-### flexisym
-
-This package turns math symbols into macros.
-Is is required by breqn so that breqn can make intelligent decisions
-with respect to line-breaking and other details.
-
-### mathstyle
-
-Ensures uniform syntax for math subscript (_) and superscript (^)
-operations so that they always take exactly one argument.
-Grants access to the current mathstyle which eases several tasks such
-as avoiding the many pitfalls of \mathchoice and \mathpalette.
-This package is used by flexisym.
-
diff --git a/Master/texmf-dist/doc/latex/breqn/breqn.pdf b/Master/texmf-dist/doc/latex/breqn/breqn.pdf
index 89dbe08bf20..3220c13eef9 100644
--- a/Master/texmf-dist/doc/latex/breqn/breqn.pdf
+++ b/Master/texmf-dist/doc/latex/breqn/breqn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/breqn/flexisym.pdf b/Master/texmf-dist/doc/latex/breqn/flexisym.pdf
index 46876f9d0a9..90001b53400 100644
--- a/Master/texmf-dist/doc/latex/breqn/flexisym.pdf
+++ b/Master/texmf-dist/doc/latex/breqn/flexisym.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/breqn/mathstyle.pdf b/Master/texmf-dist/doc/latex/breqn/mathstyle.pdf
index daaef1d809f..16b9ec35fe6 100644
--- a/Master/texmf-dist/doc/latex/breqn/mathstyle.pdf
+++ b/Master/texmf-dist/doc/latex/breqn/mathstyle.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/breqn/breqn.dtx b/Master/texmf-dist/source/latex/breqn/breqn.dtx
index 86551eee0cb..d9a5c3f220f 100644
--- a/Master/texmf-dist/source/latex/breqn/breqn.dtx
+++ b/Master/texmf-dist/source/latex/breqn/breqn.dtx
@@ -64,8 +64,7 @@
%<*install>
\input docstrip.tex
\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: breqn 2014/06/10 v0.98c Breqn}
+\Msg{* Installation: breqn}
\Msg{************************************************************************}
\keepsilent
@@ -123,8 +122,7 @@ and the derived files
%</ignore>
%<*driver>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{breqn.drv}%
- [2014/06/10 v0.98c breqn]
+\ProvidesFile{breqn.drv}[2015/08/11 v0.98d breqn]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
@@ -233,9 +231,11 @@ and the derived files
% \fi
%
%
+% \GetFileInfo{breqn.drv}
+% \let\pkgdate\filedate\let\pkgversion\fileversion
% \title{The \pkg{breqn} package}
-% \date{2014/06/10 v0.98c}
-% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Inactively maintained by Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
+% \date{\pkg{breqn} bundle: \pkgdate\space\pkgversion}
+% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
% \maketitle
% \begin{abstract}
@@ -1465,7 +1465,7 @@ and the derived files
% Declare package name and date.
% \begin{macrocode}
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{breqn}{2012/05/10}{0.98b}{Breaking equations}
+\ProvidesExplPackage{breqn}{2015/08/11}{0.98d}{Breaking equations}
% \end{macrocode}
% Regrettably, \pkg{breqn} is internally a mess, so we have to take
% some odd steps.
diff --git a/Master/texmf-dist/source/latex/breqn/flexisym.dtx b/Master/texmf-dist/source/latex/breqn/flexisym.dtx
index 45e16f3d4c6..a5648c1a682 100644
--- a/Master/texmf-dist/source/latex/breqn/flexisym.dtx
+++ b/Master/texmf-dist/source/latex/breqn/flexisym.dtx
@@ -69,8 +69,7 @@
%<*install>
\input docstrip.tex
\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: flexisym 2014/06/10 v0.97c Flexisym (MH)}
+\Msg{* Installation: flexisym}
\Msg{************************************************************************}
\keepsilent
@@ -133,8 +132,7 @@ and the derived files
%</ignore>
%<*driver>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{flexisym.drv}%
- [2014/06/10 v0.97c flexisym (MH)]
+\ProvidesFile{flexisym.drv}[2015/08/11 v0.98d flexisym (MH)]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
@@ -158,9 +156,10 @@ and the derived files
%</driver>
% \fi
%
+% \GetFileInfo{flexisym.drv}
% \title{The \textsf{flexisym} package}
-% \date{2008/08/08 v0.97a}
-% \author{Author: Morten H\o gholm\\ Inactively maintained by Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
+% \date{\filedate\space\fileversion}
+% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
% \maketitle
%
@@ -176,7 +175,7 @@ and the derived files
% \begin{macrocode}
%<*package>
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2013/03/16}{0.97c}{Make math characters macros}
+\ProvidesExplPackage{flexisym}{2015/08/11}{0.98d}{Make math characters macros}
\edef\do{%
\noexpand\AtEndOfPackage{%
diff --git a/Master/texmf-dist/source/latex/breqn/mathstyle.dtx b/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
index 98dac625363..b0b49a2e39b 100644
--- a/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
+++ b/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
@@ -4,6 +4,7 @@
% Copyright (C) 2007-2008 by Morten Hoegholm
% Copyright (C) 2007-2014 by Lars Madsen
% Copyright (C) 2007-2014 by Will Robertson
+% Copyright (C) 2015 by Will Robertson, Joseph Wright
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -78,6 +79,7 @@ Copyright (C) 1997-2003 by Michael J. Downes
Copyright (C) 2007-2011 by Morten Hoegholm et al
Copyright (C) 2007-2014 by Lars Madsen
Copyright (C) 2007-2014 by Will Robertson
+Copyright (C) 2015 by Will Robertson, Joseph Wright
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -127,7 +129,7 @@ and the derived files
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mathstyle}
%<*package|driver>
- [2014/06/10 v0.90a Tracking mathstyle implicitly]
+ [2015/08/11 v0.98d Tracking mathstyle implicitly]
%</package|driver>
%<*driver>
\documentclass{ltxdoc}
@@ -144,7 +146,7 @@ and the derived files
% \GetFileInfo{mathstyle.drv}
% \title{The \textsf{mathstyle} package}
% \date{\filedate\quad\fileversion}
-% \author{Author: Morten H\o gholm\\ Inactively maintained by Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
+% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
%
% \maketitle
@@ -282,19 +284,32 @@ and the derived files
% We need to keep track of whether we're in inline or display maths, and the only
% way to do that is to add a switch inside \verb|\everydisplay|.
% We act sensibly and preserve any of the previous contents of that token register
-% before adding our own code here.
+% before adding our own code here. As we'll see in a second, Lua\TeX{}
+% provides a native mechanism for this so we don't need any action in that
+% case. (Various other parts of the code also need to have different paths
+% for Lua\TeX{} use.)
% \begin{macrocode}
-\everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
+\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\mathstyle}
-% A counter for the math style: 0--display, 1--text, 2--script, 3--scriptscript.
+% A counter for the math style: 0--display, 2--text, 4--script, 6--scriptscript.
% The logic is that display maths will explicitly
% set \verb|\mathstyle| to zero (see above), so by default it is set to the
-% `text' maths style.
+% `text' maths style. With Lua\TeX{} there is a primitive to do the same
+% so it just has to be enabled. Note that in all cases we use Lua\TeX{}-like
+% numbering for the states.
% \begin{macrocode}
-\chardef\mathstyle\@ne
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \chardef\mathstyle\@ne
+\else
+ \directlua{tex.enableprimitives("", {"mathstyle"})}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -313,16 +328,20 @@ and the derived files
\@saveprimitive\atopwithdelims\@@atopwithdelims
\@saveprimitive\abovewithdelims\@@abovewithdelims
% \end{macrocode}
-% Then we redeclare the four style changing primitives.
+% Then we redeclare the four style changing primitives: set the value of
+% \cs{mathstyle} if Lua\TeX{} is not in use.q
% \begin{macrocode}
-\DeclareRobustCommand{\displaystyle}{%
- \@@displaystyle \chardef\mathstyle\z@}
-\DeclareRobustCommand{\textstyle}{%
- \@@textstyle \chardef\mathstyle\@ne}
-\DeclareRobustCommand{\scriptstyle}{%
- \@@scriptstyle \chardef\mathstyle\tw@}
-\DeclareRobustCommand{\scriptscriptstyle}{%
- \@@scriptscriptstyle \chardef\mathstyle\thr@@}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \DeclareRobustCommand{\displaystyle}{%
+ \@@displaystyle \chardef\mathstyle\z@}
+ \DeclareRobustCommand{\textstyle}{%
+ \@@textstyle \chardef\mathstyle\tw@}
+ \DeclareRobustCommand{\scriptstyle}{%
+ \@@scriptstyle \chardef\mathstyle4 }
+ \DeclareRobustCommand{\scriptscriptstyle}{%
+ \@@scriptscriptstyle \chardef\mathstyle6 }
+\fi
% \end{macrocode}
% First we get the primitive operations. These should have been
% control sequences in \TeX\ just like operations for begin math, end
@@ -339,13 +358,20 @@ and the derived files
% \end{macrocode}
% If we enter a sub- or superscript the \cs{mathstyle} must be
% adjusted. Since all is happening in a group, we do not have to worry
-% about resetting.
+% about resetting. We can't tell the difference between cramped and
+% non-cramped styles unless Lua\TeX{} is in use, in which case this command
+% is a no-op.
% \begin{macrocode}
-\def\subsupstyle{%
- \ifnum\mathstyle<\tw@ \chardef\mathstyle\tw@
- \else \chardef\mathstyle\thr@@
- \fi
-}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \def\subsupstyle{%
+ \ifnum\mathstyle<5 \chardef\mathstyle4 %
+ \else \chardef\mathstyle6 %
+ \fi
+ }
+\else
+ \def\subsupstyle{}
+\fi
% \end{macrocode}
% Provide commands with meaningful names for the two primitives, cf.\
% \cs{mathrel}.
@@ -366,13 +392,19 @@ and the derived files
% \begin{macrocode}
\def\mathchoice{%
\relax\ifcase\mathstyle
- \expandafter\@firstoffour
+ \expandafter\@firstoffour % Display
+ \or
+ \expandafter\@firstoffour % Cramped display
+ \or
+ \expandafter\@secondoffour % Text
+ \or
+ \expandafter\@secondoffour % Cramped text
\or
- \expandafter\@secondoffour
+ \expandafter\@thirdoffour % Script
\or
- \expandafter\@thirdoffour
+ \expandafter\@thirdoffour % Cramped script
\else
- \expandafter\@fourthoffour
+ \expandafter\@fourthoffour % (Cramped) Scriptscript
\fi
}
% \end{macrocode}
@@ -418,14 +450,24 @@ and the derived files
% The \cs{fracstyle} command is a switch to go one level down but no
% further than three.
% \begin{macrocode}
-\def\fracstyle{\ifcase\mathstyle
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\tw@
- \else
- \chardef\mathstyle=\thr@@
- \fi
-}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \def\fracstyle{%
+ \ifcase\mathstyle
+ \chardef\mathstyle=\@ne
+ \or
+ \chardef\mathstyle=\@ne
+ \or
+ \chardef\mathstyle=\tw@
+ \or
+ \chardef\mathstyle=\tw@
+ \else
+ \chardef\mathstyle=\thr@@
+ \fi
+ }
+\else
+ \def\fracstyle{}
+\fi
% \end{macrocode}
% The \cs{currentmathstyle} checks the value of \cs{mathstyle} and
% switches to it so it is in essence the opposite of \cs{displaystyle}
@@ -435,10 +477,16 @@ and the derived files
\ifcase\mathstyle
\@@displaystyle
\or
+ \@@displaystyle
+ \or
+ \@@textstyle
+ \or
\@@textstyle
\or
\@@scriptstyle
\or
+ \@@scriptstyle
+ \else
\@@scriptscriptstyle
\fi}
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/breqn/breqn.sty b/Master/texmf-dist/tex/latex/breqn/breqn.sty
index 0ea7e1d2c1b..588455c22d7 100644
--- a/Master/texmf-dist/tex/latex/breqn/breqn.sty
+++ b/Master/texmf-dist/tex/latex/breqn/breqn.sty
@@ -31,7 +31,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{breqn}{2012/05/10}{0.98b}{Breaking equations}
+\ProvidesExplPackage{breqn}{2015/08/11}{0.98d}{Breaking equations}
\ExplSyntaxOff
\edef\breqnpopcats{%
\catcode\number`\"=\number\catcode`\"
diff --git a/Master/texmf-dist/tex/latex/breqn/flexisym.sty b/Master/texmf-dist/tex/latex/breqn/flexisym.sty
index 13dcf8c1335..694d0e2d593 100644
--- a/Master/texmf-dist/tex/latex/breqn/flexisym.sty
+++ b/Master/texmf-dist/tex/latex/breqn/flexisym.sty
@@ -31,7 +31,7 @@
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
%%
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2013/03/16}{0.97c}{Make math characters macros}
+\ProvidesExplPackage{flexisym}{2015/08/11}{0.98d}{Make math characters macros}
\edef\do{%
\noexpand\AtEndOfPackage{%
diff --git a/Master/texmf-dist/tex/latex/breqn/mathstyle.sty b/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
index ed91944417d..70feea50762 100644
--- a/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
+++ b/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
@@ -12,6 +12,7 @@
%% Copyright (C) 2007-2011 by Morten Hoegholm et al
%% Copyright (C) 2007-2014 by Lars Madsen
%% Copyright (C) 2007-2014 by Will Robertson
+%% Copyright (C) 2015 by Will Robertson, Joseph Wright
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -31,7 +32,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mathstyle}
- [2014/06/10 v0.90a Tracking mathstyle implicitly]
+ [2015/08/11 v0.98d Tracking mathstyle implicitly]
\providecommand\@saveprimitive[2]{%
\begingroup
\edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
@@ -66,8 +67,16 @@
\fi
\endgroup
}
-\everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
-\chardef\mathstyle\@ne
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
+\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \chardef\mathstyle\@ne
+\else
+ \directlua{tex.enableprimitives("", {"mathstyle"})}
+\fi
\@saveprimitive\displaystyle\@@displaystyle
\@saveprimitive\textstyle\@@textstyle
\@saveprimitive\scriptstyle\@@scriptstyle
@@ -79,14 +88,17 @@
\@saveprimitive\overwithdelims\@@overwithdelims
\@saveprimitive\atopwithdelims\@@atopwithdelims
\@saveprimitive\abovewithdelims\@@abovewithdelims
-\DeclareRobustCommand{\displaystyle}{%
- \@@displaystyle \chardef\mathstyle\z@}
-\DeclareRobustCommand{\textstyle}{%
- \@@textstyle \chardef\mathstyle\@ne}
-\DeclareRobustCommand{\scriptstyle}{%
- \@@scriptstyle \chardef\mathstyle\tw@}
-\DeclareRobustCommand{\scriptscriptstyle}{%
- \@@scriptscriptstyle \chardef\mathstyle\thr@@}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \DeclareRobustCommand{\displaystyle}{%
+ \@@displaystyle \chardef\mathstyle\z@}
+ \DeclareRobustCommand{\textstyle}{%
+ \@@textstyle \chardef\mathstyle\tw@}
+ \DeclareRobustCommand{\scriptstyle}{%
+ \@@scriptstyle \chardef\mathstyle4 }
+ \DeclareRobustCommand{\scriptscriptstyle}{%
+ \@@scriptscriptstyle \chardef\mathstyle6 }
+\fi
\begingroup \catcode`\^=7\relax \catcode`\_=8\relax % just in case
\lowercase{\endgroup
\let\@@superscript=^ \let\@@subscript=_
@@ -95,24 +107,35 @@
\lowercase{\endgroup
\let\@@superscript@other=^ \let\@@subscript@other=_
}%
-\def\subsupstyle{%
- \ifnum\mathstyle<\tw@ \chardef\mathstyle\tw@
- \else \chardef\mathstyle\thr@@
- \fi
-}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \def\subsupstyle{%
+ \ifnum\mathstyle<5 \chardef\mathstyle4 %
+ \else \chardef\mathstyle6 %
+ \fi
+ }
+\else
+ \def\subsupstyle{}
+\fi
\let\mathsup=\@@superscript
\let\mathsub=\@@subscript
\def\sb#1{\mathsub{\protect\subsupstyle#1}}%
\def\sp#1{\mathsup{\protect\subsupstyle#1}}%
\def\mathchoice{%
\relax\ifcase\mathstyle
- \expandafter\@firstoffour
+ \expandafter\@firstoffour % Display
+ \or
+ \expandafter\@firstoffour % Cramped display
\or
- \expandafter\@secondoffour
+ \expandafter\@secondoffour % Text
\or
- \expandafter\@thirdoffour
+ \expandafter\@secondoffour % Cramped text
+ \or
+ \expandafter\@thirdoffour % Script
+ \or
+ \expandafter\@thirdoffour % Cramped script
\else
- \expandafter\@fourthoffour
+ \expandafter\@fourthoffour % (Cramped) Scriptscript
\fi
}
\providecommand\@firstoffour[4]{#1}
@@ -138,22 +161,38 @@
\renewcommand{\binom}{\genfrac{}(){0pt}}
\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
-\def\fracstyle{\ifcase\mathstyle
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\tw@
- \else
- \chardef\mathstyle=\thr@@
- \fi
-}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax
+ \def\fracstyle{%
+ \ifcase\mathstyle
+ \chardef\mathstyle=\@ne
+ \or
+ \chardef\mathstyle=\@ne
+ \or
+ \chardef\mathstyle=\tw@
+ \or
+ \chardef\mathstyle=\tw@
+ \else
+ \chardef\mathstyle=\thr@@
+ \fi
+ }
+\else
+ \def\fracstyle{}
+\fi
\def\currentmathstyle{%
\ifcase\mathstyle
\@@displaystyle
\or
+ \@@displaystyle
+ \or
+ \@@textstyle
+ \or
\@@textstyle
\or
\@@scriptstyle
\or
+ \@@scriptstyle
+ \else
\@@scriptscriptstyle
\fi}
\DeclareOption{mathactivechars}{%