texlive[54801] Master/texmf-dist: breqn (20apr20)
commits+karl at tug.org
commits+karl at tug.org
Mon Apr 20 00:15:28 CEST 2020
Revision: 54801
http://tug.org/svn/texlive?view=revision&revision=54801
Author: karl
Date: 2020-04-20 00:15:28 +0200 (Mon, 20 Apr 2020)
Log Message:
-----------
breqn (20apr20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/breqn/CHANGES.md
trunk/Master/texmf-dist/doc/latex/breqn/breqn.pdf
trunk/Master/texmf-dist/doc/latex/breqn/flexisym.pdf
trunk/Master/texmf-dist/doc/latex/breqn/mathstyle.pdf
trunk/Master/texmf-dist/source/latex/breqn/breqn.dtx
trunk/Master/texmf-dist/source/latex/breqn/flexisym.dtx
trunk/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
trunk/Master/texmf-dist/tex/latex/breqn/breqn.sty
trunk/Master/texmf-dist/tex/latex/breqn/flexisym.sty
trunk/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
Modified: trunk/Master/texmf-dist/doc/latex/breqn/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/breqn/CHANGES.md 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/doc/latex/breqn/CHANGES.md 2020-04-19 22:15:28 UTC (rev 54801)
@@ -1,5 +1,17 @@
# Release notes for the `breqn` packages
+
+## v0.98j (2020/04/19)
+
+ * Remove `color` and `background` options from the documentation, as they have never done anything!
+ (Todo: make them do something...)
+ * Fix spacing bug in `dseries` with arbitrary fonts.
+ * Really fix `\\genfrac` this time, making it backwards compatible with amsmath definition.
+ * Revamp of `mathstyle` code for setting `\mathstyle` to ensure consistency between
+ LuaTeX and other engines.
+ (This was originally just a quick fix of the value of `\\mathstyle` within double
+ subscripts or superscripts)
+
## v0.98i (2020/02/18)
* Fix clash with new version of `babel` around use of the generic `\\@elt` command.
Modified: trunk/Master/texmf-dist/doc/latex/breqn/breqn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/breqn/flexisym.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/breqn/mathstyle.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/breqn/breqn.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/breqn/breqn.dtx 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/source/latex/breqn/breqn.dtx 2020-04-19 22:15:28 UTC (rev 54801)
@@ -150,8 +150,8 @@
%
%
% \title{The \pkg{breqn} package}
-% \def\fileversion{0.98i}
-% \def\filedate{2020/02/18}
+% \def\fileversion{0.98j}
+% \def\filedate{2020/04/19}
% \date{\pkg{breqn} bundle: \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}}
%
@@ -189,18 +189,29 @@
%
% \section{Package loading}
%
+% The \pkg{breqn} package automatically loads \pkg{amsmath} to avoid loading order conflicts.
+% It also automatically loads \pkg{flexisym} and \pkg{mathstyle}, but in some cases these
+% packages need to be loaded separately. The canonical order for package loading is:
+% \begin{verbatim}
+% \usepackage{amsmath}
+% \usepackage{flexisym}
+% \usepackage{breqn}
+% \end{verbatim}
%
% The recommended way of loading the \pkg{breqn} package is to load it
-% \emph{after} other packages dealing with math, \ie, after
-% \pkg{amsmath}, \pkg{amssymb}, or packages such as \pkg{mathpazo} or
-% \pkg{mathptmx}.
+% \emph{before} other packages dealing with math symbols, \ie, before
+% \pkg{amssymb}, or packages such as \pkg{mathpazo} or \pkg{mathptmx}.
+% However, this can sometimes lead to macro definition clashes, and in such cases
+% you may need to juggle the loading order to make it work.
%
+% \subsection{Options for \pkg{flexisym}}
+%
% The \pkg{flexisym} package (described in section \vref{flexisym}) is
% required by \pkg{breqn} and ensures the math symbols are set up
% correctly. By default \pkg{breqn} loads it with support for Computer
% Modern but if you use a different math package requiring slightly
-% different definitions, it must be loaded before \pkg{breqn}. Below
-% is an example of how you enable \pkg{breqn} to work with the widely
+% different definitions, \pkg{flexisym} must be explicitly loaded before \pkg{breqn} as shown above.
+% Below is an example of how you enable \pkg{breqn} to work with the widely
% used \pkg{mathpazo} package.
% \begin{verbatim}
%\usepackage{mathpazo}
@@ -214,11 +225,6 @@
% \fn{flexisym.dtx} for how to create a support file---it is easier
% than one might think. Contributions welcome.
%
-% The documentation for the package was formerly found in
-% \fn{breqndoc}. It has now been added to this implementation
-% file. Below follows the contents of the original \pkg{breqn}
-% documentation. Not all details hold anymore but I have prioritized
-% fixing the package.
%
% \section{Introduction}
%
@@ -556,8 +562,6 @@
% \begin{dmath}[spread={1pt}]
% \begin{dmath}[frame]
% \begin{dmath}[frame={1pt},framesep={2pt}]
-% \begin{dmath}[background={red}]
-% \begin{dmath}[color={purple}]
% \begin{dmath}[breakdepth={0}]
% \end{verbatim}
%
@@ -603,15 +607,6 @@
% Use the \opt{framesep} option to change the amount of space separating
% the frame from what it encloses. The default space is \cs{fboxsep}.
%
-% Use the \opt{background} option to produce a colored background for the
-% equation body. The \pkg{breqn} package doesn't automatically load the
-% \pkg{color} package, so this option won't work unless you remember
-% to load the \pkg{color} package yourself.
-%
-% Use the \opt{color} option to specify a different color for the contents
-% of the equation. Like the \opt{background} option, this doesn't work if
-% you forgot to load the \pkg{color} package.
-%
% Use the \opt{breakdepth} option to change the level of delimiter nesting
% to which line breaks are allowed. To prohibit line breaks within
% delimiters, set this to 0:
@@ -1381,7 +1376,7 @@
% Declare package name and date.
% \begin{macrocode}
\RequirePackage{expl3}
-\ProvidesExplPackage{breqn}{2020/02/18}{0.98i}{Breaking equations}
+\ProvidesExplPackage{breqn}{2020/04/19}{0.98j}{Breaking equations}
% \end{macrocode}
% Regrettably, \pkg{breqn} is internally a mess, so we have to take
% some odd steps.
@@ -6241,8 +6236,9 @@
\def\premath{%
% \end{macrocode}
% BRM: Tricky to cleanup space OR add space ONLY BETWEEN math!
+% FMi: improvement to measure against current font.
% \begin{macrocode}
- \ifdim\lastskip<.3em \unskip
+ \ifdim\lastskip<\fontdimen2\font \unskip
\else\ifnum\lastpenalty<\@M \dquad\fi\fi
}%
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/breqn/flexisym.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/breqn/flexisym.dtx 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/source/latex/breqn/flexisym.dtx 2020-04-19 22:15:28 UTC (rev 54801)
@@ -78,8 +78,8 @@
% \fi
%
% \title{The \textsf{flexisym} package}
-% \def\fileversion{0.98i}
-% \def\filedate{2020/02/18}
+% \def\fileversion{0.98j}
+% \def\filedate{2020/04/19}
% \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}}
%
@@ -97,7 +97,7 @@
% \begin{macrocode}
%<*package>
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2020/02/18}{0.98i}{Make math characters macros}
+\ProvidesExplPackage{flexisym}{2020/04/19}{0.98j}{Make math characters macros}
\edef\do{%
\noexpand\AtEndOfPackage{%
Modified: trunk/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/breqn/mathstyle.dtx 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/source/latex/breqn/mathstyle.dtx 2020-04-19 22:15:28 UTC (rev 54801)
@@ -57,8 +57,8 @@
% \fi
%
% \title{The \textsf{mathstyle} package}
-% \def\fileversion{0.98i}
-% \def\filedate{2020/02/18}
+% \def\fileversion{0.98j}
+% \def\filedate{2020/04/19}
% \date{\filedate\quad\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}}
%
@@ -151,7 +151,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{mathstyle}{2020/02/18}{0.98i}{Tracking mathstyle implicitly}
+\ProvidesExplPackage{mathstyle}{2020/04/19}{0.98j}{Tracking mathstyle implicitly}
\ExplSyntaxOff
% \end{macrocode}
%
@@ -215,6 +215,7 @@
% \end{macro}
%
% \begin{macro}{\mathstyle}
+% \begin{macro}{\mathstyledenom}
% 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
@@ -224,12 +225,14 @@
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
- \chardef\mathstyle\@ne
+ \chardef\mathstyle=2\relax
+ \chardef\mathstyledenom=0\relax
\else
\directlua{tex.enableprimitives("", {"mathstyle"})}
\fi
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% Save the four style changing primitives, \cs{mathchoice} and the
% fraction commands.
@@ -247,18 +250,18 @@
\@saveprimitive\abovewithdelims\@@abovewithdelims
% \end{macrocode}
% Then we redeclare the four style changing primitives: set the value of
-% \cs{mathstyle} if Lua\TeX{} is not in use.q
+% \cs{mathstyle} if Lua\TeX{} is not in use.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\DeclareRobustCommand{\displaystyle}{%
- \@@displaystyle \chardef\mathstyle\z@}
+ \@@displaystyle \chardef\mathstyle0\relax}
\DeclareRobustCommand{\textstyle}{%
- \@@textstyle \chardef\mathstyle\tw@}
+ \@@textstyle \chardef\mathstyle2\relax}
\DeclareRobustCommand{\scriptstyle}{%
- \@@scriptstyle \chardef\mathstyle4 }
+ \@@scriptstyle \chardef\mathstyle4\relax}
\DeclareRobustCommand{\scriptscriptstyle}{%
- \@@scriptscriptstyle \chardef\mathstyle6 }
+ \@@scriptscriptstyle \chardef\mathstyle6\relax}
\fi
% \end{macrocode}
% First we get the primitive operations. These should have been
@@ -283,8 +286,10 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\def\subsupstyle{%
- \ifnum\mathstyle<5 \chardef\mathstyle4 %
- \else \chardef\mathstyle6 %
+ \ifnum\mathstyle<4\relax
+ \chardef\mathstyle\numexpr4+\mathstyledenom\relax
+ \else
+ \chardef\mathstyle\numexpr6+\mathstyledenom\relax
\fi
}
\else
@@ -338,17 +343,69 @@
% \end{macro}
%
% \begin{macro}{\genfrac}
+% The amsmath definition:
+% \begin{verbatim}
+% \DeclareRobustCommand{\genfrac}[4]{%
+% \def\@tempa{#1#2}%
+% \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
+% \csname @@\ifx @#3 at over\else above\fi
+% \ifx\@tempa\@empty \else withdelims\fi\endcsname}
+% \@tempb{#1#2#3}}
+% \end{verbatim}
+% with arguments:
+% \begin{itemize}
+% \item left-delim
+% \item right-delim
+% \item line thickness (default if empty)
+% \item mathstyle override
+% \item numerator
+% \item denominator
+% \end{itemize}
% The fractions. Note that this uses the same names as in
% \pkg{amsmath}. Much the same except here they call \cs{fracstyle}.
% \begin{macrocode}
\DeclareRobustCommand\genfrac[6]{%
- {#1\fracstyle
+ {%
+ % emulate old amsmath syntax:
+ \if 0#4\relax\displaystyle\else
+ \if 1#4\relax\textstyle\else
+ \if 2#4\relax\scriptstyle\else
+ \if 3#4\relax\scriptscriptstyle\else
+ #4%
+ \fi\fi\fi\fi
+ \fracstyle
{\begingroup #5\endgroup
- \csname @@\ifx\maxdimen#4\maxdimen over\else above\fi
- \if @#2@\else withdelims\fi\endcsname #2#3\relax
- #6}%
+ \csname @@\ifx\maxdimen#3\maxdimen over\else above\fi
+ \if @#1@\else withdelims\fi\endcsname #1 #2 #3\relax
+ \ifnum\mathstyledenom=0\relax
+ \chardef\mathstyledenom=1\relax
+ \edef\mathstyle at tempa{\number\mathstyle}%
+ \chardef\mathstyle=\numexpr\mathstyle at tempa+1\relax
+ \fi
+ #6%
+ \chardef\mathstyledenom=0\relax}%
}%
}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax\else
+\DeclareRobustCommand\genfrac[6]{%
+ {%
+ % emulate old amsmath syntax:
+ \if 0#4\relax\displaystyle\else
+ \if 1#4\relax\textstyle\else
+ \if 2#4\relax\scriptstyle\else
+ \if 3#4\relax\scriptscriptstyle\else
+ #4%
+ \fi\fi\fi\fi
+ \fracstyle
+ {\begingroup #5\endgroup
+ \csname @@\ifx\maxdimen#3\maxdimen over\else above\fi
+ \if @#1@\else withdelims\fi\endcsname #1 #2 #3\relax
+ #6%
+ }%
+ }%
+}
+\fi
% \end{macrocode}
% \changes{v0.90}{2011/08/03}{\cs{fracstyle} must be called \emph{after}
% changing to the required style}
@@ -360,14 +417,14 @@
\renewcommand{\frac}{\genfrac{}{}{}{}}
\providecommand{\dfrac}{}
\providecommand{\tfrac}{}
-\renewcommand{\dfrac}{\genfrac\displaystyle{}{}{}}
-\renewcommand{\tfrac}{\genfrac\textstyle{}{}{}}
+\renewcommand{\dfrac}{\genfrac{}{}{}\displaystyle}
+\renewcommand{\tfrac}{\genfrac{}{}{}\displaystyle}
\providecommand{\binom}{}
\providecommand{\tbinom}{}
\providecommand{\dbinom}{}
-\renewcommand{\binom}{\genfrac{}(){0pt}}
-\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
-\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
+\renewcommand{\binom}{\genfrac(){0pt}{}}
+\renewcommand{\dbinom}{\genfrac(){0pt}\displaystyle}
+\renewcommand{\tbinom}{\genfrac(){0pt}\textstyle}
% \end{macrocode}
% The \cs{fracstyle} command is a switch to go one level down but no
@@ -377,15 +434,11 @@
\expandafter\ifx\csname directlua\endcsname\relax
\def\fracstyle{%
\ifcase\numexpr\mathstyle\relax
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\tw@
- \or
- \chardef\mathstyle=\tw@
- \else
- \chardef\mathstyle=\thr@@
+ \chardef\mathstyle=0\relax % 0
+ \or \chardef\mathstyle=1\relax % 1
+ \or \chardef\mathstyle=2\relax % 2
+ \or \chardef\mathstyle=3\relax % 3
+ \else \chardef\mathstyle=3\relax % 4 or more
\fi
}
\else
Modified: trunk/Master/texmf-dist/tex/latex/breqn/breqn.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/breqn/breqn.sty 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/tex/latex/breqn/breqn.sty 2020-04-19 22:15:28 UTC (rev 54801)
@@ -31,7 +31,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{breqn}{2020/02/18}{0.98i}{Breaking equations}
+\ProvidesExplPackage{breqn}{2020/04/19}{0.98j}{Breaking equations}
\ExplSyntaxOff
\edef\breqnpopcats{%
\catcode\number`\"=\number\catcode`\"
@@ -1713,7 +1713,7 @@
\mathsurround\z@\@@math \penalty\@Mi
\let\endmath\ends at math
\def\premath{%
- \ifdim\lastskip<.3em \unskip
+ \ifdim\lastskip<\fontdimen2\font \unskip
\else\ifnum\lastpenalty<\@M \dquad\fi\fi
}%
\def\postmath{\unpenalty\eq at addpunct \penalty\intermath at penalty \dquad \@ignoretrue}%
Modified: trunk/Master/texmf-dist/tex/latex/breqn/flexisym.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/breqn/flexisym.sty 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/tex/latex/breqn/flexisym.sty 2020-04-19 22:15:28 UTC (rev 54801)
@@ -30,7 +30,7 @@
%% flexisym.dtx, and mathstyle.dtx.
%%
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2020/02/18}{0.98i}{Make math characters macros}
+\ProvidesExplPackage{flexisym}{2020/04/19}{0.98j}{Make math characters macros}
\edef\do{%
\noexpand\AtEndOfPackage{%
Modified: trunk/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/breqn/mathstyle.sty 2020-04-19 22:14:57 UTC (rev 54800)
+++ trunk/Master/texmf-dist/tex/latex/breqn/mathstyle.sty 2020-04-19 22:15:28 UTC (rev 54801)
@@ -31,7 +31,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{mathstyle}{2020/02/18}{0.98i}{Tracking mathstyle implicitly}
+\ProvidesExplPackage{mathstyle}{2020/04/19}{0.98j}{Tracking mathstyle implicitly}
\ExplSyntaxOff
\providecommand\@saveprimitive[2]{%
\begingroup
@@ -73,7 +73,8 @@
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
- \chardef\mathstyle\@ne
+ \chardef\mathstyle=2\relax
+ \chardef\mathstyledenom=0\relax
\else
\directlua{tex.enableprimitives("", {"mathstyle"})}
\fi
@@ -91,13 +92,13 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\DeclareRobustCommand{\displaystyle}{%
- \@@displaystyle \chardef\mathstyle\z@}
+ \@@displaystyle \chardef\mathstyle0\relax}
\DeclareRobustCommand{\textstyle}{%
- \@@textstyle \chardef\mathstyle\tw@}
+ \@@textstyle \chardef\mathstyle2\relax}
\DeclareRobustCommand{\scriptstyle}{%
- \@@scriptstyle \chardef\mathstyle4 }
+ \@@scriptstyle \chardef\mathstyle4\relax}
\DeclareRobustCommand{\scriptscriptstyle}{%
- \@@scriptscriptstyle \chardef\mathstyle6 }
+ \@@scriptscriptstyle \chardef\mathstyle6\relax}
\fi
\begingroup \catcode`\^=7\relax \catcode`\_=8\relax % just in case
\lowercase{\endgroup
@@ -110,8 +111,10 @@
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\def\subsupstyle{%
- \ifnum\mathstyle<5 \chardef\mathstyle4 %
- \else \chardef\mathstyle6 %
+ \ifnum\mathstyle<4\relax
+ \chardef\mathstyle\numexpr4+\mathstyledenom\relax
+ \else
+ \chardef\mathstyle\numexpr6+\mathstyledenom\relax
\fi
}
\else
@@ -143,38 +146,68 @@
\providecommand\@thirdoffour[4]{#3}
\providecommand\@fourthoffour[4]{#4}
\DeclareRobustCommand\genfrac[6]{%
- {#1\fracstyle
+ {%
+ % emulate old amsmath syntax:
+ \if 0#4\relax\displaystyle\else
+ \if 1#4\relax\textstyle\else
+ \if 2#4\relax\scriptstyle\else
+ \if 3#4\relax\scriptscriptstyle\else
+ #4%
+ \fi\fi\fi\fi
+ \fracstyle
{\begingroup #5\endgroup
- \csname @@\ifx\maxdimen#4\maxdimen over\else above\fi
- \if @#2@\else withdelims\fi\endcsname #2#3\relax
- #6}%
+ \csname @@\ifx\maxdimen#3\maxdimen over\else above\fi
+ \if @#1@\else withdelims\fi\endcsname #1 #2 #3\relax
+ \ifnum\mathstyledenom=0\relax
+ \chardef\mathstyledenom=1\relax
+ \edef\mathstyle at tempa{\number\mathstyle}%
+ \chardef\mathstyle=\numexpr\mathstyle at tempa+1\relax
+ \fi
+ #6%
+ \chardef\mathstyledenom=0\relax}%
}%
}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname directlua\endcsname\relax\else
+\DeclareRobustCommand\genfrac[6]{%
+ {%
+ % emulate old amsmath syntax:
+ \if 0#4\relax\displaystyle\else
+ \if 1#4\relax\textstyle\else
+ \if 2#4\relax\scriptstyle\else
+ \if 3#4\relax\scriptscriptstyle\else
+ #4%
+ \fi\fi\fi\fi
+ \fracstyle
+ {\begingroup #5\endgroup
+ \csname @@\ifx\maxdimen#3\maxdimen over\else above\fi
+ \if @#1@\else withdelims\fi\endcsname #1 #2 #3\relax
+ #6%
+ }%
+ }%
+}
+\fi
\renewcommand{\frac}{\genfrac{}{}{}{}}
\providecommand{\dfrac}{}
\providecommand{\tfrac}{}
-\renewcommand{\dfrac}{\genfrac\displaystyle{}{}{}}
-\renewcommand{\tfrac}{\genfrac\textstyle{}{}{}}
+\renewcommand{\dfrac}{\genfrac{}{}{}\displaystyle}
+\renewcommand{\tfrac}{\genfrac{}{}{}\displaystyle}
\providecommand{\binom}{}
\providecommand{\tbinom}{}
\providecommand{\dbinom}{}
-\renewcommand{\binom}{\genfrac{}(){0pt}}
-\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
-\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
+\renewcommand{\binom}{\genfrac(){0pt}{}}
+\renewcommand{\dbinom}{\genfrac(){0pt}\displaystyle}
+\renewcommand{\tbinom}{\genfrac(){0pt}\textstyle}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\def\fracstyle{%
\ifcase\numexpr\mathstyle\relax
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\tw@
- \or
- \chardef\mathstyle=\tw@
- \else
- \chardef\mathstyle=\thr@@
+ \chardef\mathstyle=0\relax % 0
+ \or \chardef\mathstyle=1\relax % 1
+ \or \chardef\mathstyle=2\relax % 2
+ \or \chardef\mathstyle=3\relax % 3
+ \else \chardef\mathstyle=3\relax % 4 or more
\fi
}
\else
More information about the tex-live-commits
mailing list.