summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-01-28 22:59:01 +0000
committerKarl Berry <karl@freefriends.org>2017-01-28 22:59:01 +0000
commit9c982d89c5b240ffd6176bf0b997a80462ad0b58 (patch)
tree7e7812eeaf1373656cc21c1ac9847c972283d1a9 /Master/texmf-dist/source/latex/breqn/mathstyle.dtx
parentf00b1aae5e501fea4099673dfcdfc20c60ec983d (diff)
breqn (28jan17)
git-svn-id: svn://tug.org/texlive/trunk@43071 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/breqn/mathstyle.dtx')
-rw-r--r--Master/texmf-dist/source/latex/breqn/mathstyle.dtx53
1 files changed, 30 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/breqn/mathstyle.dtx b/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
index b0b49a2e39b..cc99d8b842c 100644
--- a/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
+++ b/Master/texmf-dist/source/latex/breqn/mathstyle.dtx
@@ -3,8 +3,8 @@
% Copyright (C) 1997-2003 by Michael J. Downes
% 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
+% Copyright (C) 2007-2017 by Will Robertson
+% Copyright (C) 2010-2017 by Joseph Wright
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -78,8 +78,8 @@ This is a generated file.
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
+Copyright (C) 2007-2017 by Will Robertson
+Copyright (C) 2010-2017 by Joseph Wright
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -129,7 +129,7 @@ and the derived files
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mathstyle}
%<*package|driver>
- [2015/08/11 v0.98d Tracking mathstyle implicitly]
+ [2017/01/27 0.98e Tracking mathstyle implicitly]
%</package|driver>
%<*driver>
\documentclass{ltxdoc}
@@ -153,12 +153,12 @@ and the derived files
%
% \part*{User's guide}
%
-% This package exists for two reasons:
+% This package exists for two reasons:
% \begin{itemize}
% \item The primitive operations for creating a super- or subscript in
% \TeX\ work almost as if \verb|^| and \verb|_| are macros taking an
% argument. However, that is not quite the case, and
-% some things that you'd expect to work don't (e.g., \verb|^\cong|)
+% some things that you'd expect to work don't (e.g., \verb|^\cong|)
% whereas others which you'd think shouldn't work actually
% do (such as |^\mathsf{s}|). We do everyone a favor if it behaves
% consistently, i.e., if the superscript and subscript operations
@@ -174,8 +174,8 @@ and the derived files
% not promote the primitive infix notation, this package keeps track
% of a current mathstyle parameter.
% \end{itemize}
-%
-%
+%
+%
% \section{Some usage tips}
%
% If you want to use this package with \pkg{amsmath}, it is important
@@ -302,7 +302,7 @@ and the derived files
% set \verb|\mathstyle| to zero (see above), so by default it is set to the
% `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.
+% numbering for the states.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
@@ -386,12 +386,14 @@ and the derived files
% \end{macrocode}
%
% \begin{macro}{\mathchoice}
+% \changes{v0.98e}{2016/04/09}{Lua\TeX{} primitive \cs{mathstyle} needs
+% termination}
% \cs{mathchoice} is now just a switch. Note that this redefinition
% does not allow the arbitrary \meta{filler} of the \TeX\
% primitive. Very rarely used anyway.
% \begin{macrocode}
\def\mathchoice{%
- \relax\ifcase\mathstyle
+ \relax\ifcase\numexpr\mathstyle\relax
\expandafter\@firstoffour % Display
\or
\expandafter\@firstoffour % Cramped display
@@ -432,6 +434,8 @@ and the derived files
% \end{macrocode}
% \changes{v0.90}{2011/08/03}{\cs{fracstyle} must be called \emph{after}
% changing to the required style}
+% \changes{v0.98e}{2016/04/09}{Lua\TeX{} primitive \cs{mathstyle} needs
+% termination}
% \end{macro}
%
% \begin{macrocode}
@@ -447,21 +451,22 @@ and the derived files
\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
% \end{macrocode}
+
% The \cs{fracstyle} command is a switch to go one level down but no
% further than three.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname directlua\endcsname\relax
\def\fracstyle{%
- \ifcase\mathstyle
+ \ifcase\numexpr\mathstyle\relax
\chardef\mathstyle=\@ne
\or
\chardef\mathstyle=\@ne
- \or
+ \or
\chardef\mathstyle=\tw@
- \or
+ \or
\chardef\mathstyle=\tw@
- \else
+ \else
\chardef\mathstyle=\thr@@
\fi
}
@@ -469,12 +474,14 @@ and the derived files
\def\fracstyle{}
\fi
% \end{macrocode}
+% \changes{v0.98e}{2016/04/09}{Lua\TeX{} primitive \cs{mathstyle} needs
+% termination}
% The \cs{currentmathstyle} checks the value of \cs{mathstyle} and
% switches to it so it is in essence the opposite of \cs{displaystyle}
% and friends.
% \begin{macrocode}
\def\currentmathstyle{%
- \ifcase\mathstyle
+ \ifcase\numexpr\mathstyle\relax
\@@displaystyle
\or
\@@displaystyle
@@ -495,17 +502,17 @@ and the derived files
% begin document, not straight away}
% \begin{macrocode}
\DeclareOption{mathactivechars}{%
- % \catcode`\^=12\relax
+ % \catcode`\^=12\relax
% \catcode`\_=12\relax
\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax}%
}
\DeclareOption{activechars}{%
- % \catcode`\^=13\relax
+ % \catcode`\^=13\relax
% \catcode`\_=13\relax
\AtBeginDocument{\catcode`\^=13\relax \catcode`\_=13\relax}%
}
\DeclareOption{noactivechars}{%
- % \catcode`\^=7\relax
+ % \catcode`\^=7\relax
% \catcode`\_=8\relax
\AtBeginDocument{\catcode`\^=7\relax \catcode`\_=8\relax}%
}
@@ -518,12 +525,12 @@ and the derived files
\ifnum\catcode`\^=13\relax
\let^=\sp \let_=\sb
\else
- \mathcode`\^="8000\relax
+ \mathcode`\^="8000\relax
\mathcode`\_="8000\relax
- \begingroup
- \catcode`\^=\active
+ \begingroup
+ \catcode`\^=\active
\catcode`\_=\active
- \global\let^=\sp
+ \global\let^=\sp
\global\let_=\sb
\endgroup
\fi