summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/breqn
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 /Master/texmf-dist/source/latex/breqn
parent1ab591e48c967552295cba91d4b1c0513e39ddf5 (diff)
breqn (11aug15)
git-svn-id: svn://tug.org/texlive/trunk@38099 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/breqn')
-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
3 files changed, 95 insertions, 48 deletions
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}