From a5b95c30b4007ce056780ddc7a862789c4402aec Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 9 Dec 2018 22:37:09 +0000 Subject: pstricks-add (9dec18) git-svn-id: svn://tug.org/texlive/trunk@49360 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/generic/pstricks-add/pstricks-add.tex | 80 +++++++++++++++++++++- 1 file changed, 77 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/tex/generic') diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index 4d505053b27..59f4353922f 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 722 2018-02-03 20:39:07Z herbert $ +%% $Id: pstricks-add.tex 852 2018-12-08 20:32:46Z herbert $ %% %% This is file `pstricks-add.tex', %% @@ -31,8 +31,8 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\PSTmathLoaded\endinput\else \input pst-math \fi % -\def\fileversion{3.85a} -\def\filedate{2018/02/03} +\def\fileversion{3.86} +\def\filedate{2018/12/08} \let\pstricksaddFV\fileversion \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % @@ -1729,6 +1729,79 @@ a add } % \define@key[psset]{pstricks-add}{cancelType}{\pst@expandafter\psk@@cancelType{#1xx}\@nil} +\def\psk@@cancelType#1#2\@nil{% + \ifx\relax#1\relax\def\psk@cancelType{2}\else% x + \ifx#1B\def\psk@cancelType{5}\else% \ new option B + \ifx#1S\def\psk@cancelType{4}\else% \ new option S + \ifx#1X\def\psk@cancelType{3}\else% \ new option X + \ifx#1b\def\psk@cancelType{2}\else% \ + \ifx#1s\def\psk@cancelType{1}\else% / + \def\psk@cancelType{0}\fi\fi\fi\fi\fi\fi}% x every other + +\psset[pstricks-add]{cancelType=}% x, crossing +\def\psCancel{\def\pst@par{}\pst@object{psCancel}}% by Stefano Baroni 2008-06-21 +\def\psCancel@i{\pst@makebox\psCancel@iii} +\def\psCancel@iii{% + \begingroup + \solid@star + \use@par + \ifnum\psk@cancelType>\tw@ % check if \psk@cancelType > 2 + % here: option cancelType with small letter X, S, B + \pst@dimc=\wd\pst@hbox + \pst@dimb=\dp\pst@hbox + \pst@dimd=\ht\pst@hbox + \pst@dima=\z@ + \edef\psk@cancelType{\the\numexpr\psk@cancelType-3\relax} + \else + % here: option cancelType with capital letter x, s, b set \pst@diam as before + \pst@dima=\pslinewidth + \advance\pst@dima by \psframesep + \pst@dimc=\wd\pst@hbox\advance\pst@dimc by \pst@dima + \pst@dimb=\dp\pst@hbox\advance\pst@dimb by \pst@dima + \pst@dimd=\ht\pst@hbox\advance\pst@dimd by \pst@dima + \fi + \setbox\pst@hbox=\hbox{% + \ifpsboxsep\kern\pst@dima\fi + \begin@ClosedObj + \addto@pscode{ + \psk@cornersize % arcradius boolean + \pst@number\pst@dima neg + \pst@number\pst@dimb neg + \pst@number\pst@dimc + \pst@number\pst@dimd + .5 + \if@star \tx@Frame \else + CLW mul /a ED % the middle of the line + 3 -1 roll 2 copy gt { exch } if + a sub /y2 ED + a add /y1 ED + 2 copy gt { exch } if + a sub /x2 ED + a add /x1 ED + pop pop % delete arc values + \ifnum\psk@cancelType<\tw@ % / or x (1 oder 0) + x1 y1 moveto + x2 y2 lineto + \fi + \ifnum\psk@cancelType=\@ne\else % \ or x (2 oder 0) + x2 y1 moveto + x1 y2 lineto + \fi + \fi + }% + \def\pst@linetype{2}% + \showpointsfalse + \end@ClosedObj + \box\pst@hbox + \ifpsboxsep\kern\pst@dima\fi + }% + \ifpsboxsep\dp\pst@hbox=\pst@dimb\ht\pst@hbox=\pst@dimd\fi + \leavevmode\box\pst@hbox + \endgroup% +} + +\iffalse +\define@key[psset]{pstricks-add}{cancelType}{\pst@expandafter\psk@@cancelType{#1xx}\@nil} \def\psk@@cancelType#1#2\@nil{% \ifx\relax#1\relax\def\psk@cancelType{2}\else% x \ifx#1b\def\psk@cancelType{2}\else% \ @@ -1786,6 +1859,7 @@ a add \leavevmode\box\pst@hbox \endgroup% } +\fi % \newcount\psVectorCtr \define@boolkey[psset]{pstricks-add}[Pst@]{markAngle}[true]{} -- cgit v1.2.3