summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-04-19 22:15:28 +0000
committerKarl Berry <karl@freefriends.org>2020-04-19 22:15:28 +0000
commit9d2bfa4b61a536743b393ace444b2ca1b2e47ce9 (patch)
tree8511dabe36e826ef759aaf1f193487e6355e1dcc /Master/texmf-dist/tex/latex
parentb0f9c83f421bb35239b9215de453c3bd7082f182 (diff)
breqn (20apr20)
git-svn-id: svn://tug.org/texlive/trunk@54801 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/breqn/breqn.sty4
-rw-r--r--Master/texmf-dist/tex/latex/breqn/flexisym.sty2
-rw-r--r--Master/texmf-dist/tex/latex/breqn/mathstyle.sty85
3 files changed, 62 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/breqn/breqn.sty b/Master/texmf-dist/tex/latex/breqn/breqn.sty
index 034ece7f26d..8bd466da0a5 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}
-\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@math
\def\premath{%
- \ifdim\lastskip<.3em \unskip
+ \ifdim\lastskip<\fontdimen2\font \unskip
\else\ifnum\lastpenalty<\@M \dquad\fi\fi
}%
\def\postmath{\unpenalty\eq@addpunct \penalty\intermath@penalty \dquad \@ignoretrue}%
diff --git a/Master/texmf-dist/tex/latex/breqn/flexisym.sty b/Master/texmf-dist/tex/latex/breqn/flexisym.sty
index 19d104ee0c0..6534a06236b 100644
--- a/Master/texmf-dist/tex/latex/breqn/flexisym.sty
+++ b/Master/texmf-dist/tex/latex/breqn/flexisym.sty
@@ -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{%
diff --git a/Master/texmf-dist/tex/latex/breqn/mathstyle.sty b/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
index c6186311701..6921131b1dc 100644
--- a/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
+++ b/Master/texmf-dist/tex/latex/breqn/mathstyle.sty
@@ -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#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@tempa{\number\mathstyle}%
+ \chardef\mathstyle=\numexpr\mathstyle@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#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
+ #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