texlive[49360] Master/texmf-dist: pstricks-add (9dec18)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 9 23:37:09 CET 2018


Revision: 49360
          http://tug.org/svn/texlive?view=revision&revision=49360
Author:   karl
Date:     2018-12-09 23:37:09 +0100 (Sun, 09 Dec 2018)
Log Message:
-----------
pstricks-add (9dec18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes
    trunk/Master/texmf-dist/doc/generic/pstricks-add/README
    trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
    trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
    trunk/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes	2018-12-09 22:36:19 UTC (rev 49359)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes	2018-12-09 22:37:09 UTC (rev 49360)
@@ -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.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.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

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks-add/README	2018-12-09 22:36:19 UTC (rev 49359)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/README	2018-12-09 22:37:09 UTC (rev 49360)
@@ -43,3 +43,6 @@
 %% 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 at tug.org
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex	2018-12-09 22:36:19 UTC (rev 49359)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex	2018-12-09 22:37:09 UTC (rev 49360)
@@ -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,7 +1601,8 @@
 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}
@@ -1608,7 +1609,10 @@
 \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

Modified: trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex	2018-12-09 22:36:19 UTC (rev 49359)
+++ trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex	2018-12-09 22:37:09 UTC (rev 49360)
@@ -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)}
 %
@@ -1731,6 +1731,79 @@
 \define at key[psset]{pstricks-add}{cancelType}{\pst at expandafter\psk@@cancelType{#1xx}\@nil}
 \def\psk@@cancelType#1#2\@nil{%
   \ifx\relax#1\relax\def\psk at cancelType{2}\else% x
+    \ifx#1B\def\psk at cancelType{5}\else%          \                                           new option B
+      \ifx#1S\def\psk at cancelType{4}\else%          \                                         new option S
+        \ifx#1X\def\psk at cancelType{3}\else%          \                                       new option X
+          \ifx#1b\def\psk at cancelType{2}\else%          \
+            \ifx#1s\def\psk at cancelType{1}\else%        /
+              \def\psk at cancelType{0}\fi\fi\fi\fi\fi\fi}%        x every other
+
+\psset[pstricks-add]{cancelType=}% x, crossing 
+\def\psCancel{\def\pst at par{}\pst at object{psCancel}}% by Stefano Baroni 2008-06-21
+\def\psCancel at i{\pst at makebox\psCancel at iii}
+\def\psCancel at iii{%
+  \begingroup
+  \solid at star
+  \use at par
+  \ifnum\psk at cancelType>\tw@ %                                     check if \psk at cancelType > 2
+  % here: option cancelType with small letter X, S, B
+    \pst at dimc=\wd\pst at hbox
+    \pst at dimb=\dp\pst at hbox
+    \pst at dimd=\ht\pst at hbox
+    \pst at dima=\z@
+    \edef\psk at cancelType{\the\numexpr\psk at cancelType-3\relax}
+  \else
+  % here: option cancelType with capital letter x, s, b            set \pst at diam as before
+    \pst at dima=\pslinewidth
+    \advance\pst at dima by \psframesep
+    \pst at dimc=\wd\pst at hbox\advance\pst at dimc by \pst at dima
+    \pst at dimb=\dp\pst at hbox\advance\pst at dimb by \pst at dima
+    \pst at dimd=\ht\pst at hbox\advance\pst at dimd by \pst at dima
+  \fi
+  \setbox\pst at hbox=\hbox{%
+    \ifpsboxsep\kern\pst at dima\fi
+    \begin at ClosedObj
+    \addto at pscode{
+      \psk at cornersize % arcradius boolean
+      \pst at number\pst at dima neg
+      \pst at number\pst at dimb neg
+      \pst at number\pst at dimc
+      \pst at number\pst at dimd
+       .5 
+      \if at star \tx at 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 at cancelType<\tw@ % / or x (1 oder 0)
+           x1 y1 moveto 
+           x2 y2 lineto 
+         \fi
+         \ifnum\psk at cancelType=\@ne\else % \ or x (2 oder 0)
+           x2 y1 moveto 
+           x1 y2 lineto
+         \fi
+       \fi
+     }%
+     \def\pst at linetype{2}%
+     \showpointsfalse
+     \end at ClosedObj
+     \box\pst at hbox
+     \ifpsboxsep\kern\pst at dima\fi
+   }%
+   \ifpsboxsep\dp\pst at hbox=\pst at dimb\ht\pst at hbox=\pst at dimd\fi
+   \leavevmode\box\pst at hbox
+   \endgroup%
+}
+
+\iffalse
+\define at key[psset]{pstricks-add}{cancelType}{\pst at expandafter\psk@@cancelType{#1xx}\@nil}
+\def\psk@@cancelType#1#2\@nil{%
+  \ifx\relax#1\relax\def\psk at cancelType{2}\else% x
     \ifx#1b\def\psk at cancelType{2}\else%          \
       \ifx#1s\def\psk at cancelType{1}\else%        /
         \def\psk at cancelType{0}\fi\fi\fi}%        x every other
@@ -1786,6 +1859,7 @@
    \leavevmode\box\pst at hbox
    \endgroup%
 }
+\fi
 %
 \newcount\psVectorCtr
 \define at boolkey[psset]{pstricks-add}[Pst@]{markAngle}[true]{}

Modified: trunk/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty	2018-12-09 22:36:19 UTC (rev 49359)
+++ trunk/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty	2018-12-09 22:37:09 UTC (rev 49360)
@@ -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,16 +17,12 @@
     [2009/12/17 v. 0.23,  PostScript prologue file (hv)]
     \@addtofilelist{pstricks-add.pro}}{}%
 
-\RequirePackage{xparse}
+\RequirePackage{pst-calculate}
 
-\ExplSyntaxOn
-\DeclareExpandableDocumentCommand\psCalc{m}{\fp_to_decimal:n{#1}}%
-\ExplSyntaxOff
-
 \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 at dx}%
   \def\psRightSumValue{0}%
   \def\psLeftSumValue{0}%
@@ -33,14 +29,14 @@
   \def\psMiddleSumValue{0}%
   \def\psDiffSumValue{0}%
   \Multido{\rA=#1+\ps@@dx,\rB=\ps@@dx+\ps@@dx,\rC=\ps@@dxHalf+\ps@@dx}{#3}{%
-  	\def\ps at rightY{\psCalc{\psFunction@{\rB}}}%
-  	\def\ps at leftY{\psCalc{\psFunction@{\rA}}}%
-  	\def\ps at middleY{\psCalc{\psFunction@{\rC}}}%
+  	\def\ps at rightY{\pscalculate{\psFunction@{\rB}}}%
+  	\def\ps at leftY{\pscalculate{\psFunction@{\rA}}}%
+  	\def\ps at middleY{\pscalculate{\psFunction@{\rC}}}%
 %  	\typeout{\ps at leftY, \ps at rightY }%
-  	\edef\psLeftSumValue{\psCalc{\psLeftSumValue+\ps@@dx*\ps at leftY}}%
-  	\edef\psRightSumValue{\psCalc{\psRightSumValue+\ps@@dx*\ps at rightY}}%
-  	\edef\psMiddleSumValue{\psCalc{\psMiddleSumValue+\ps@@dx*\ps at middleY}}%
-  	\edef\psDiffSumValue{\psCalc{\psDiffSumValue+abs(\ps@@dx*(\ps at rightY-\ps at leftY))}}%
+  	\edef\psLeftSumValue{\pscalculate{\psLeftSumValue+\ps@@dx*\ps at leftY}}%
+  	\edef\psRightSumValue{\pscalculate{\psRightSumValue+\ps@@dx*\ps at rightY}}%
+  	\edef\psMiddleSumValue{\pscalculate{\psMiddleSumValue+\ps@@dx*\ps at middleY}}%
+  	\edef\psDiffSumValue{\pscalculate{\psDiffSumValue+abs(\ps@@dx*(\ps at rightY-\ps at leftY))}}%
 %  	\typeout{\psLeftSumValue , \psRightSumValue }%
   }% end \Multido
 }



More information about the tex-live-commits mailing list