diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/cancel/cancel.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/cancel/cancel.sty | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/cancel/cancel.sty b/Master/texmf-dist/tex/latex/cancel/cancel.sty index 0aac2f61a0b..dbf2055da82 100644 --- a/Master/texmf-dist/tex/latex/cancel/cancel.sty +++ b/Master/texmf-dist/tex/latex/cancel/cancel.sty @@ -1,6 +1,9 @@ -% cancel.sty version 2.1 12-Mar-2000. +% cancel.sty version 2.2 12-Apr-2013. % Donald Arseneau asnd@triumf.ca -% I contribute this software to the public domain. No rights reserved. +% This software is contributed to the public domain by its author, +% who disclaims all copyrights. For people and jurisdictions that +% do not recognize contribution to the public domain, this software +% is licensed by the terms of the unlicense, <http://unlicense.org/>. % % Commands: % ~~~~~~~~~ @@ -16,7 +19,7 @@ % % Options: % ~~~~~~~~ -% Bt default, none of these commands affects the horizontal spacing, +% By default, none of these commands affects the horizontal spacing, % so they might over-print neighboring parts of the formula (or text). % They do add their height to the expression, so there should never be % unintended vertical overlap. There is a package option [makeroom] to @@ -48,7 +51,7 @@ % through math to indicate "cancellation" is poor design. I don't recommend % that you use this package at all. -\ProvidesPackage{cancel}[2000/03/12 v2.1 Cancel math terms] +\ProvidesPackage{cancel}[2013/04/12 v2.2 Cancel math terms] \newcommand{\CancelColor}{} \newcommand{\cancelto}{1}% default option = smaller @@ -75,7 +78,7 @@ \@cancel{\@can@slash{+}\@can@slash{-}}\hbox{#1}\fi} \newcommand\@cancel[3]{% -\@begin@tempboxa\hbox{\m@th$#2{#3}$}% +\OriginalPictureCmds\@begin@tempboxa\hbox{\m@th$#2{#3}$}% \dimen@\height \setbox\@tempboxa\hbox{$\m@th\vcenter{\box\@tempboxa}$}% \advance\dimen@-\height % the difference in height @@ -126,7 +129,7 @@ \fi \newcommand\@cancelto[4]{% -\@begin@tempboxa\hbox{\m@th$#3{#4}$}% +\OriginalPictureCmds\@begin@tempboxa\hbox{\m@th$#3{#4}$}% \dimen@\width % wide \@min@pt\dimen@ 2\@min@pt\totalheight4 \ifdim\totalheight<\dimen@ @@ -172,3 +175,10 @@ \hfil \box\@tempboxa \kern\wd\z@ \hfil \cr}} \def\@min@pt#1#2{\ifdim#1<#2\p@ #1#2\p@ \relax\fi} + +% pict2e removes bounding box from line and vector, so use original +% versions by declaring \OriginalPictureCmds; make it a no-op if undefined + +\@ifundefined{OriginalPictureCmds}{\let\OriginalPictureCmds\relax}{} + +% Sometime maybe find a better solution that uses all slopes with pict2e |