summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cases
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-11 21:17:10 +0000
committerKarl Berry <karl@freefriends.org>2020-03-11 21:17:10 +0000
commitde16b2c2ef67a75ad90e96bf94cb043c1d7553c2 (patch)
tree2015e5e382d850cb8277e9dccdeb20e23205095e /Master/texmf-dist/tex/latex/cases
parent4408697195e981b694bc08b5a04a5ffc9af9dc60 (diff)
cases (11mar20)
git-svn-id: svn://tug.org/texlive/trunk@54238 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cases')
-rw-r--r--Master/texmf-dist/tex/latex/cases/cases.sty25
1 files changed, 15 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/cases/cases.sty b/Master/texmf-dist/tex/latex/cases/cases.sty
index 66609ee492c..13d2effa549 100644
--- a/Master/texmf-dist/tex/latex/cases/cases.sty
+++ b/Master/texmf-dist/tex/latex/cases/cases.sty
@@ -1,4 +1,4 @@
-% C A S E S . S T Y ver 3.0 Feb 2020
+% C A S E S . S T Y ver 3.1 Mar 2020
%
% Copyright (C) 1993,1994,1995,2000,2002,2020 by Donald Arseneau
% asnd@triumf.ca
@@ -30,11 +30,11 @@
%
% For detailed description and package options, see cases.pdf (cases.tex).
-\ProvidesPackage{cases}[2020/02/22 ver 3.0]
+\ProvidesPackage{cases}[2020/03/10 ver 3.1]
\newdimen\numc@numwid
-% copy \@@eqncr but change error message and handle \tag{} for amsmath:
+% copy \@@eqncr but change error message and handle \tag for amsmath:
\def\@@numc@cr{\let\reserved@a\relax
\ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
\or \def\reserved@a{&}\else
@@ -42,7 +42,6 @@
\@latex@error{Too many columns in numcases environment}\@ehc\fi
\reserved@a \if@eqnsw\@eqnnum\stepcounter{equation}\else \iftag@ \df@tag\fi\fi
\global\@eqnswtrue\global\@eqcnt\z@\cr}
-
\let\iftag@=\iffalse
\newenvironment{numcases}[1]%
@@ -54,7 +53,7 @@
\numc@setsub % maybe \subequations (handling \refstepcounter)
\def\@currentlabel{\p@equation\theequation}%
\global\@eqnswtrue\m@th
- \def\tag##1{\def\@currentlabel{##1}\tag@in@align{##1}}%
+ \let\tag\numc@tag
\settowidth{\numc@numwid}{\ \advance\c@equation\tw@\numc@eqnnum}%
\@tempskipb\@centering
\ifx\numc@left\mathindent % fleqn:
@@ -74,9 +73,9 @@
\everycr{}\let\\\@eqncr \let\@@eqncr\@@numc@cr
\tabskip\@tempskipa
\halign to\dimen@ii \bgroup % white space for LHS followed by RHS
- \kern\wd\z@ \kern10\p@ % assume width of brace
- \global\let\iftag@=\iffalse % for amsmath (make sure this is not in if block)
- \global\@eqcnt\@ne $\numc@dispstyle{##}$\hfil
+ \kern\wd\z@ \kern10\p@ % assume (and force) width of brace
+ \global\let\iftag@=\iffalse % for amsmath (make sure this is not in \if block)
+ \global\@eqcnt\@ne $\numc@dispstyle ##\relax$\hfil
\tabskip\z@skip &% explanation
\global\@eqcnt\tw@
\numc@expstyle\quad ##\unskip\numc@expstyle\hfil % \unskip removes quad if no explanation
@@ -133,6 +132,11 @@ $$\global\@ignoretrue}
\@ifundefined{c@parentequation}{% No AMS
\def\numc@eqnnum{\@eqnnum}
+% for \tag (but not \tag*) without amsmath, using \@@numc@cr above.
+\def\numc@tag#1{\def\@currentlabel{#1}%
+ \gdef\df@tag{\def\theequation{#1}\@eqnnum}%
+ \global\let\iftag@=\iftrue
+ \nonumber}
%
% These versions of subequations follow the style of Gildea's subeqn.sty,
% but are thoroughly rewritten.
@@ -184,8 +188,9 @@ $$\global\@ignoretrue}
% \subequations already defined;
% use tag format
\def\numc@eqnnum{\tagform@{\theequation}}
-% add little space after brace to amsmath's cases
+\def\numc@tag{\tag@in@align}
+% add little space after brace to amsmath's cases
\def\@tempa{%
\let\@ifnextchar\new@ifnextchar
\left\lbrace
@@ -241,7 +246,7 @@ $$\global\@ignoretrue}
\openup\jot
\tabskip\z@skip
\halign \bgroup
- $\numc@dispstyle{##}\m@th$\hfil
+ $\numc@dispstyle ##\m@th$\hfil
&\numc@expstyle\quad ##\unskip\numc@expstyle\hfil % \unskip removes space if no explanations
\cr
}{%