texlive[44617] Master/texmf-dist: pstricks (16jun17)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 17 00:08:39 CEST 2017


Revision: 44617
          http://tug.org/svn/texlive?view=revision&revision=44617
Author:   karl
Date:     2017-06-17 00:08:39 +0200 (Sat, 17 Jun 2017)
Log Message:
-----------
pstricks (16jun17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pstricks/pst-news17.pdf
    trunk/Master/texmf-dist/doc/generic/pstricks/pst-news17.tex
    trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex

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

Modified: trunk/Master/texmf-dist/doc/generic/pstricks/pst-news17.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pstricks/pst-news17.tex	2017-06-16 22:08:26 UTC (rev 44616)
+++ trunk/Master/texmf-dist/doc/generic/pstricks/pst-news17.tex	2017-06-16 22:08:39 UTC (rev 44617)
@@ -52,7 +52,7 @@
 \fi
 
 %--------------------------------------------------------------------------------------
-\section{\texttt{pstricks.tex} (v. 2.73 -- 2017/05/18)}
+\section{\texttt{pstricks.tex} (v. 2.74 -- 2017/06/15)}
 %--------------------------------------------------------------------------------------
 \subsection{Error message}
 
@@ -81,8 +81,45 @@
                          _Not_Configured_For_This_Format
 \end{verbatim}
 
+\subsection{Random colors}
+There are now four predefined random ''colors``:
 
+\begin{verbatim}
+  \definecolor[ps]{randomgray}{gray}{Rand}%
+  \definecolor[ps]{randomrgb}{rgb}{Rand Rand Rand}%
+  \definecolor[ps]{randomcmyk}{cmyk}{Rand Rand Rand Rand}%
+  \definecolor[ps]{randomhsb}{hsb}{Rand Rand Rand}%
+\end{verbatim}
 
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(10,5)
+\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomgray,linewidth=1mm](0,\rA)(10,\rA)}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(10,5)
+\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomrgb,linewidth=1mm](0,\rA)(10,\rA)}
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(10,5)
+\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomcmyk,linewidth=1mm](0,\rA)(10,\rA)}
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(10,5)
+\multido{\rA=0.0+0.1}{50}{\psline[linecolor=randomhsb,linewidth=1mm](0,\rA)(10,\rA)}
+\end{pspicture}
+\end{LTXexample}
+
+
+The random counter can be initialized with \verb|\pstVerb{rrand srand}|.
+
 \subsection{refangle}
 
 This version fixes a bug with \verb|pst at refangle| which is used inside PostScript.

Modified: trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex	2017-06-16 22:08:26 UTC (rev 44616)
+++ trunk/Master/texmf-dist/tex/generic/pstricks/pstricks.tex	2017-06-16 22:08:39 UTC (rev 44617)
@@ -135,14 +135,14 @@
 \catcode`\@=\PstAtCode\relax
 \ifx\PSTFPloaded\endinput\else   \input pst-fp.tex\fi
 %
+\catcode`\@=11\relax
 \@ifundefined{pgfutil at empty}{\input pgfutil-common.tex}{}
 \@ifundefined{pgkeys at empty}{\input pgfkeys.code.tex}{}
 \@ifundefined{pgffor at emptyvalues}{\input pgffor.code.tex}{}
 \let\pgfforeach\foreach
 %
-\def\fileversion{2.73a}
-\def\filedate{2017/05/22}
-\catcode`\@=11\relax
+\def\fileversion{2.74}
+\def\filedate{2017/06/15}
 \pst at addfams{pstricks}
 %
 % stolen from latex.ltx to make it TeX compatible
@@ -627,7 +627,7 @@
 \gdef\pslbrace[{ ]
 \gdef\psrbrace[} ]
 \endgroup
-
+%
 \pstVerb{
   /pssetRGBcolor  /setrgbcolor  load def
   /pssetCMYKcolor /setcmykcolor load def
@@ -638,8 +638,8 @@
   %\expandafter\edef\csname color@#1\endcsname{#2}%
   \expandafter\edef\csname\string\color@#1\endcsname{#2}%    hv 1.14 2005-12-17
   \ignorespaces}
-\def\pst at color#1{%
-  \def\pst at currentcolor{#1}\pstVerb{#1}\aftergroup\pst at endcolor}%
+%
+\def\pst at color#1{\def\pst at currentcolor{#1}\pstVerb{#1}\aftergroup\pst at endcolor}%
 \def\pst at endcolor{\pstVerb{\pst at currentcolor}}
 \def\pst at currentcolor{0 setgray}
 \def\altcolormode{%
@@ -681,8 +681,8 @@
 \def\pst at usecolor#1{\csname\string\color@#1\endcsname\space}
 %
 \def\newgray#1#2{%
-  \pst at checknum{#2}\pst at tempg
-  \@newcolor{#1}{\pst at tempg setgray}}
+    \pst at checknum{#2}\pst at tempg
+    \@newcolor{#1}{\pst at tempg setgray}}%
 \def\newrgbcolor#1#2{%
   \pst at expandafter\pst at getnumiii{#2} {} {} {} {}\@nil
   \@newcolor{#1}{\pst at tempg \pst at temph \pst at tempi setrgbcolor}}
@@ -703,6 +703,18 @@
 \newrgbcolor{yellow}{1 1 0}
 \newrgbcolor{cyan}{0 1 1}
 \newrgbcolor{magenta}{1 0 1}
+
+\@ifundefined{xglobal}%  do we have xcolor loaded?
+ {\@newcolor{randomgray}{Rand setgray}%
+  \@newcolor{randomrgb}{Rand Rand Rand setrgbcolor}%
+  \@newcolor{randomcmyk}{Rand Rand Rand Rand setcmykcolor}%
+  \@newcolor{randomhsb}{Rand Rand Rand sethsbcolor}%
+ }{%
+  \definecolor[ps]{randomgray}{gray}{Rand}%
+  \definecolor[ps]{randomrgb}{rgb}{Rand Rand Rand}%
+  \definecolor[ps]{randomcmyk}{cmyk}{Rand Rand Rand Rand}%
+  \definecolor[ps]{randomhsb}{hsb}{Rand Rand Rand}%
+ }
 %
 \define at boolkey[psset]{pstricks}[Pst@]{draft}[true]{}
 \define at key[psset]{pstricks}{bgcolor}{\def\pst at bgcolor{#1}}% background for pspicture



More information about the tex-live-commits mailing list