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 --- Master/texmf-dist/doc/generic/pstricks-add/Changes | 5 +- Master/texmf-dist/doc/generic/pstricks-add/README | 3 + .../doc/generic/pstricks-add/pstricks-add-doc.pdf | Bin 5078897 -> 5176800 bytes .../doc/generic/pstricks-add/pstricks-add-doc.tex | 10 ++- .../tex/generic/pstricks-add/pstricks-add.tex | 80 ++++++++++++++++++++- .../tex/latex/pstricks-add/pstricks-add.sty | 28 ++++---- 6 files changed, 103 insertions(+), 23 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index e59e1800757..ea75954dce9 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,4 +1,4 @@ -%% $Id: Changes 722 2018-02-03 20:39:07Z herbert $ +%% $Id: Changes 851 2018-12-08 20:06:43Z herbert $ %% pstricks-add.pro ----------- 0.23 2009-12-17 - add RGBtoGRAY and WavelengthToGRAY @@ -32,6 +32,7 @@ pstricks-add.pro ----------- pstricks-add.sty ----------- (hv) + v. 0.16 2018-02-04 use \pscalculate from package pst-calculate v. 0.15 2018-02-03 added \psCalc from xpl3 (only for latex) v. 0.14 2010-02-11 move pst-fp message into pstricks.sty v. 0.13 2009-04-17 change pro file version number @@ -40,6 +41,8 @@ pstricks-add.sty ----------- (hv) pstricks-add.tex ----------- (hv) + v 3.86 2018-12-08 - added some more options for \psCancel + v 3.85b 2018-02-04 - use LaTeX package pst-calculate v 3.85a 2018-02-03 - added area computing for \psStep v 3.85 2018-01-29 - added area computing for \psStep v 3.84 2017-09-16 - added \psRandomPointsArea diff --git a/Master/texmf-dist/doc/generic/pstricks-add/README b/Master/texmf-dist/doc/generic/pstricks-add/README index b7dc05c0f45..f430d94bd15 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/README +++ b/Master/texmf-dist/doc/generic/pstricks-add/README @@ -43,3 +43,6 @@ TeX Frequently Asked Questions: %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. + + +hvoss@tug.org \ No newline at end of file diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf index ad77da823f9..6a023990141 100644 Binary files a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf and b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 22fb1b8aa57..1e583d4f2fe 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add-doc.tex 721 2018-02-03 20:37:57Z herbert $ +%% $Id: pstricks-add-doc.tex 851 2018-12-08 20:06:43Z herbert $ % \documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small, headinclude=false,footinclude=false,oneside]{pst-doc} @@ -1601,14 +1601,18 @@ objects. Lines can also be transparent when the option The optional argument \Lkeyword{cancelType} allows to define the lines for the non star version. Possible values are \Lkeyval{x} for a cross, \Lkeyval{s} for a slash, and \Lkeyval{b} for a backslash. It is also possible to use the long words for the \Lkeyval{slash} and the \Lkeyval{backslash}. -An empty value is always assumed as a \Lkeyval{x}. +An empty value is always assumed as a \Lkeyval{x}. The uppercase keys maybe used in presentations where it make sense +to have thesame box size before ander after something is cancelled by lines. \begin{LTXexample}[pos=t,wide] \psset{linewidth=3pt,strokeopacity=0.4} \psCancel{\tabular[b]{c}first line\\second line\endtabular} \quad \psCancel[cancelType=x]{\tabular[b]{c}first line\\second line\endtabular}\quad \psCancel[cancelType=s]{\tabular[b]{c}first line\\second line\endtabular}\quad -\psCancel[cancelType=b]{\tabular[b]{c}first line\\second line\endtabular} +\psCancel[cancelType=b]{\tabular[b]{c}first line\\second line\endtabular}\\ +\psCancel[cancelType=X]{\tabular[b]{@{}c@{}}first line\\second line\endtabular}\quad +\psCancel[cancelType=S]{\tabular[b]{@{}c@{}}first line\\second line\endtabular}\quad +\psCancel[cancelType=B]{\tabular[b]{@{}c@{}}first line\\second line\endtabular} \end{LTXexample} \clearpage 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]{} diff --git a/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty b/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty index 97fdcfab764..4e021d197e0 100644 --- a/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty +++ b/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.sty 721 2018-02-03 20:37:57Z herbert $ +%% $Id: pstricks-add.sty 726 2018-02-05 13:52:25Z herbert $ % \RequirePackage{pstricks} \RequirePackage{pst-plot} @@ -7,7 +7,7 @@ \RequirePackage{pst-math} \RequirePackage{multido} -\ProvidesPackage{pstricks-add}[2018/02/03 v. 0.15 package wrapper for +\ProvidesPackage{pstricks-add}[2018/02/04 v. 0.16 package wrapper for pstricks-add.tex (hv)] \input{pstricks-add.tex} \ProvidesFile{pstricks-add.tex} @@ -17,30 +17,26 @@ [2009/12/17 v. 0.23, PostScript prologue file (hv)] \@addtofilelist{pstricks-add.pro}}{}% -\RequirePackage{xparse} - -\ExplSyntaxOn -\DeclareExpandableDocumentCommand\psCalc{m}{\fp_to_decimal:n{#1}}% -\ExplSyntaxOff +\RequirePackage{pst-calculate} \def\psRiemannSum(#1,#2)#3#4{% (x0,x1) n f(#1) \def\psFunction@##1{#4}% - \edef\ps@@dx{\psCalc{(#2-#1)/#3}}% - \edef\ps@@dxHalf{\psCalc{\ps@@dx/2}}% + \edef\ps@@dx{\pscalculate{(#2-#1)/#3}}% + \edef\ps@@dxHalf{\pscalculate{\ps@@dx/2}}% % \typeout{dx=\ps@dx}% \def\psRightSumValue{0}% \def\psLeftSumValue{0}% \def\psMiddleSumValue{0}% \def\psDiffSumValue{0}% \Multido{\rA=#1+\ps@@dx,\rB=\ps@@dx+\ps@@dx,\rC=\ps@@dxHalf+\ps@@dx}{#3}{% - \def\ps@rightY{\psCalc{\psFunction@{\rB}}}% - \def\ps@leftY{\psCalc{\psFunction@{\rA}}}% - \def\ps@middleY{\psCalc{\psFunction@{\rC}}}% + \def\ps@rightY{\pscalculate{\psFunction@{\rB}}}% + \def\ps@leftY{\pscalculate{\psFunction@{\rA}}}% + \def\ps@middleY{\pscalculate{\psFunction@{\rC}}}% % \typeout{\ps@leftY, \ps@rightY }% - \edef\psLeftSumValue{\psCalc{\psLeftSumValue+\ps@@dx*\ps@leftY}}% - \edef\psRightSumValue{\psCalc{\psRightSumValue+\ps@@dx*\ps@rightY}}% - \edef\psMiddleSumValue{\psCalc{\psMiddleSumValue+\ps@@dx*\ps@middleY}}% - \edef\psDiffSumValue{\psCalc{\psDiffSumValue+abs(\ps@@dx*(\ps@rightY-\ps@leftY))}}% + \edef\psLeftSumValue{\pscalculate{\psLeftSumValue+\ps@@dx*\ps@leftY}}% + \edef\psRightSumValue{\pscalculate{\psRightSumValue+\ps@@dx*\ps@rightY}}% + \edef\psMiddleSumValue{\pscalculate{\psMiddleSumValue+\ps@@dx*\ps@middleY}}% + \edef\psDiffSumValue{\pscalculate{\psDiffSumValue+abs(\ps@@dx*(\ps@rightY-\ps@leftY))}}% % \typeout{\psLeftSumValue , \psRightSumValue }% }% end \Multido } -- cgit v1.2.3