From d49ef70ccab816d2bf26857c167a9fea42d8e550 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 11 Aug 2015 21:14:21 +0000 Subject: breqn (11aug15) git-svn-id: svn://tug.org/texlive/trunk@38099 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/breqn/breqn.dtx | 14 +-- Master/texmf-dist/source/latex/breqn/flexisym.dtx | 13 ++- Master/texmf-dist/source/latex/breqn/mathstyle.dtx | 116 +++++++++++++++------ 3 files changed, 95 insertions(+), 48 deletions(-) (limited to 'Master/texmf-dist/source/latex/breqn') 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 % %<*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 % %<*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 % % \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 %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{mathstyle} %<*package|driver> - [2014/06/10 v0.90a Tracking mathstyle implicitly] + [2015/08/11 v0.98d Tracking mathstyle implicitly] % %<*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} @@ -434,11 +476,17 @@ and the derived files \def\currentmathstyle{% \ifcase\mathstyle \@@displaystyle + \or + \@@displaystyle + \or + \@@textstyle \or \@@textstyle \or \@@scriptstyle \or + \@@scriptstyle + \else \@@scriptscriptstyle \fi} % \end{macrocode} -- cgit v1.2.3