texlive[66887] Master/texmf-dist: pstricks-add (18apr23)
commits+karl at tug.org
commits+karl at tug.org
Tue Apr 18 21:41:36 CEST 2023
Revision: 66887
http://tug.org/svn/texlive?view=revision&revision=66887
Author: karl
Date: 2023-04-18 21:41:35 +0200 (Tue, 18 Apr 2023)
Log Message:
-----------
pstricks-add (18apr23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes
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
Modified: trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes 2023-04-18 19:41:16 UTC (rev 66886)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/Changes 2023-04-18 19:41:35 UTC (rev 66887)
@@ -1,4 +1,4 @@
-%% $Id: Changes 656 2022-11-21 08:41:43Z herbert $
+%% $Id: Changes 705 2023-04-17 18:32:58Z herbert $
%%
pstricks-add.pro -----------
0.23 2009-12-17 - add RGBtoGRAY and WavelengthToGRAY
@@ -14,6 +14,7 @@
pstricks-add.tex ----------- (hv)
+ v 3.94 2023-04-17 - use L3 for floating point on LaTeX level
v 3.93 2022-11-21 - modifies documentation
fix for \psOlypicRings
v 3.92 2021-12-25 - added \psColorLine
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 2023-04-18 19:41:16 UTC (rev 66886)
+++ trunk/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex 2023-04-18 19:41:35 UTC (rev 66887)
@@ -1,4 +1,4 @@
-%% $Id: pstricks-add-doc.tex 656 2022-11-21 08:41:43Z herbert $
+%% $Id: pstricks-add-doc.tex 705 2023-04-17 18:32:58Z herbert $
%\RequirePackage{pdfmanagement-testphase}
%\DeclareDocumentMetadata{}
%
@@ -145,7 +145,7 @@
\begin{BDef}
\Lcs{psGetSlope}\coord1\coord2\Lcs{\Larga{macro}}\\
-\Lcs{psGetDistance}\coord1\coord2\Lcs{\Larga{macro}}
+\Lcs{psGetDistance}\OptArg{\Larga{decimals}}\coord1\coord2\Lcs{\Larga{macro}}
\end{BDef}
\begin{LTXexample}[width=4cm]
@@ -159,6 +159,12 @@
%\psGetDistance(-2111,-12)(3,1)\DVal ==> Overflow!
\end{LTXexample}
+\begin{LTXexample}[width=4cm]
+\psGetDistance(-2,1)(3,-1.5)\DVal \DVal\\
+\psGetDistance[5](-2,1)(3,-1.5)\DVal \DVal\\
+\psGetDistance[3](-2,1)(3,-1.5)\DVal \DVal\\
+\psGetDistance[1](-2,1)(3,-1.5)\DVal \DVal
+\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 2023-04-18 19:41:16 UTC (rev 66886)
+++ trunk/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex 2023-04-18 19:41:35 UTC (rev 66887)
@@ -1,4 +1,4 @@
-%% $Id: pstricks-add.tex 656 2022-11-21 08:41:43Z herbert $
+%% $Id: pstricks-add.tex 705 2023-04-17 18:32:58Z 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.93}
-\def\filedate{2022/11/21}
+\def\fileversion{3.94}
+\def\filedate{2023/04/17}
\let\pstricksaddFV\fileversion
\message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)}
%
@@ -50,14 +50,31 @@
\advance\pst at dimn by -#4pt
\pst at divide{\pst at dimn}{\pst at dimm}#5}
%
-\def\psGetDistance(#1,#2)(#3,#4)#5{% 4 values without a dimen! #5 is a macro
- \pst at dimm=#1pt%
- \advance\pst at dimm by -#3pt%
- \pst at dimn=#2pt%
- \advance\pst at dimn by -#4pt
- \pst at pyth\pst at dimm\pst at dimn\pst at dimo
- \edef#5{\strip at pt\pst at dimo}
+\def\psGetDistance{\@ifnextchar[\psGetDistance at i{\psGetDistance at ii}}
+\def\psGetDistance at i[#1](#2,#3)(#4,#5)#6{% 4 values without a dimen! #6 is a macro
+ \if at pstLaTeX
+ \edef#6{\pscalculate{round(sqrt((#4-#2)^2+(#5-#3)^2),#1)}}%
+ \else
+ \pst at dimm=#1pt
+ \advance\pst at dimm by -#3pt
+ \pst at dimn=#2pt
+ \advance\pst at dimn by -#4pt
+ \pst at pyth\pst at dimm\pst at dimn\pst at dimo
+ \edef#5{\strip at pt\pst at dimo}%
+ \fi
}%
+\def\psGetDistance at ii(#1,#2)(#3,#4)#5{% 4 values without a dimen! #6 is a macro
+ \if at pstLaTeX
+ \edef#5{\pscalculate{sqrt((#3-#1)^2+(#4-#2)^2)}}%
+ \else
+ \pst at dimm=#1pt
+ \advance\pst at dimm by -#3pt
+ \pst at dimn=#2pt
+ \advance\pst at dimn by -#4pt
+ \pst at pyth\pst at dimm\pst at dimn\pst at dimo
+ \edef#5{\strip at pt\pst at dimo}%
+ \fi
+}%
%--------------------------------------- small stuff -------------------------------
\define at boolkey[psset]{pstricks-add}[Pst@]{CMYK}[true]{}
\psset[pstricks-add]{CMYK=true}
More information about the tex-live-commits
mailing list.