summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-30 23:23:59 +0000
committerKarl Berry <karl@freefriends.org>2013-12-30 23:23:59 +0000
commit17a0789fca5bb992152a9a9b2a0c97639c8af580 (patch)
tree64f4c8b24f5d6ab0d5a8172e03ffcf8a52f5f008 /Master/texmf-dist/tex
parentedd5eca5b6e0a7fd2e06c0773db98005b25adfa7 (diff)
cancel (30dec13)
git-svn-id: svn://tug.org/texlive/trunk@32508 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/cancel/cancel.sty22
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