From 243b2ad3109380c958cb4869ef9da316d4b1b363 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 10 Sep 2010 22:52:00 +0000 Subject: pstricks 2.11 (10sep10) git-svn-id: svn://tug.org/texlive/trunk@19644 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/generic/pstricks/Changes.generic | 2 + Master/texmf-dist/doc/generic/pstricks/ctandir.sty | 30 ++++++ .../texmf-dist/doc/generic/pstricks/pst-news10.pdf | Bin 276474 -> 523763 bytes .../texmf-dist/doc/generic/pstricks/pst-news10.tex | 113 +++++++++++++++++++-- .../doc/generic/pstricks/pstricks-add-data9.data | 4 + .../tex/generic/pstricks/config/xdvipdfmx.cfg | 7 +- Master/texmf-dist/tex/generic/pstricks/pst-fp.tex | 11 +- .../texmf-dist/tex/generic/pstricks/pstricks.tex | 101 ++++++++++++++++-- 8 files changed, 248 insertions(+), 20 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/pstricks/ctandir.sty create mode 100644 Master/texmf-dist/doc/generic/pstricks/pstricks-add-data9.data (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.generic b/Master/texmf-dist/doc/generic/pstricks/Changes.generic index 84d7e704240..35690cad057 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Changes.generic +++ b/Master/texmf-dist/doc/generic/pstricks/Changes.generic @@ -1,4 +1,6 @@ pstricks.tex -------- +2.11 2010-09-09 - new optional arguments for setting a variable + linewidth and variable color 2.10 2010-08-27 - new optional argument noCurrentPoint, which is preset to false. 2.09 2010-07-28 - fix bug with rotation values like *0 (ms) diff --git a/Master/texmf-dist/doc/generic/pstricks/ctandir.sty b/Master/texmf-dist/doc/generic/pstricks/ctandir.sty new file mode 100644 index 00000000000..37928e95823 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/ctandir.sty @@ -0,0 +1,30 @@ +%% LaTeX2e file `ctandir.sty' +%% generated by the `filecontents' environment +%% from source `pst-fill-doc' on 2004/08/18. +%% +%% LaTeX2e file `ctandir.sty' +%% generated by the `filecontents' environment +%% from source `ltubguid' on 1997/06/12. +%% +% +% Experimental CTAN location information macros for use with Donald +% Arseneau's |url.sty| +% +% we need url.sty; we can rely on it to demand anything it needs of +% LaTeX +\IfFileExists{url.sty}% + {\RequirePackage{url}}% + {\PackageWarning{ctandir}{You should acquire a copy of url.sty}% + \newcommand\urldef[3]{\def#1{\texttt{#3}}}% + \let\url\texttt + } +% +\newcommand\CTANdirectory[1]{\expandafter\urldef + \csname CTAN@#1\endcsname\path} +\newcommand\CTANfile[1]{\expandafter\urldef + \csname CTAN@#1\endcsname\path} +% +% Use the standard label-referencing mechanism to get the warning for +% an undefined label +\newcommand\CTANref[1]{\expandafter\@setref\csname CTAN@#1\endcsname + \relax{#1}} diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf index 06c0916ace6..151df5f09ef 100644 Binary files a/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf and b/Master/texmf-dist/doc/generic/pstricks/pst-news10.pdf differ diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex index 0b03716b562..23804d0f6c2 100644 --- a/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex +++ b/Master/texmf-dist/doc/generic/pstricks/pst-news10.tex @@ -16,7 +16,7 @@ %\psset{PstDebug=1} \title{\texttt{News -- 2010}\\ \Large new macros and bugfixes for the -basic packages \nxLFile{pstricks}, \nxLFile{pst-plot}, and \nxLFile{pst-node}} +basic package \nxLFile{pstricks}} \author{Herbert Voß} \date{\today} @@ -48,13 +48,114 @@ supports \PS\ code in the document. %-------------------------------------------------------------------------------------- \section{\texttt{pstricks.sty}} %-------------------------------------------------------------------------------------- -%\subsection{New optional argument} -No changes +\subsection{New optional argument} + +With the setting of the optional argument \Loption{pdf} the package \LPack{auto-pst-pdf} will be loaded +by PSTricks. This requires that you run \Lprog{pdflatex} as + +\begin{BDef} +\Lprog{pdflatex} \texttt{-{}-}\Loption{shell-escape} \texttt{} & \% \TeX\,Live users\\ +\Lprog{pdflatex} \texttt{-{}-}\Loption{enable-write18} \texttt{} & \% MiK\TeX\ users +\end{BDef} + +The package exports the \Lenv{pspicture} environments into single images which are collected in +a created file \texttt{-pics.pdf} and inserted automatically in the last \Lprog{pdflatex} +run. + + %-------------------------------------------------------------------------------------- \section{\texttt{pstricks.tex} (\pstricksFV -- \pstricksFD)} %-------------------------------------------------------------------------------------- +\subsection{New optional arguments} +The new arguments are only valid for the macros \Lcs{psellipse}, \Lcs{pscircle}, \Lcs{psarc}. +\Lcs{psellipticarc}, \Lcs{pscurve}, \Lcs{psplot}, and \Lcs{psparametricplot}. + +\medskip +\begin{tabular}{@{} l >{\em}l l l @{}}\toprule +\emph{name} & type & \emph{default} & \emph{description}\\\midrule +\Lkeyword{startLW} & length & \Lcs{pslinewidth} & starting linewidth \\ +\Lkeyword{endLW} & length & \Lcs{pslinewidth} & ending linewidth \\ +\Lkeyword{startWL} & integer& 380 & starting wave length\\ +\Lkeyword{endWL} & integer& 780 & ending wave length \\ +\Lkeyword{variableLW} & boolean & \false & use variable linewidth\\ +\Lkeyword{variableColor} & boolean & \false & use variable color\\\bottomrule +\end{tabular} + +\begin{LTXexample}[width=7cm,wide=true] +\psset{endLW=15pt} +\begin{pspicture}(-3.5,-2.5)(3.5,2.5) +\psellipse[linejoin=2,variableLW,startLW=1pt, + linecolor=green!40](0,0)(3,1) +\end{pspicture} +\end{LTXexample} + + +\begin{LTXexample}[width=7cm,wide=true] +\psset{endLW=15pt} +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\pscircle[variableLW,startLW=1pt, + linecolor=blue!40]{2} +\end{pspicture} +\end{LTXexample} + +% +\begin{LTXexample}[width=7cm,wide=true] +\psset{endLW=15pt} +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\psarc[variableLW,startLW=1pt, + linecolor=red!40](0,0){2}{10}{300} +\end{pspicture} +\end{LTXexample} + +% +\begin{LTXexample}[width=7cm,wide=true] +\psset{endLW=15pt} +\begin{pspicture}(-3.5,-2.5)(3.5,2.5) +\psellipticarc[variableLW,startLW=1pt, + linecolor=black!40](0,0)(3,1){90}{30} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7cm,wide=true] +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\pscurve[variableLW,startLW=1pt,endLW=20pt, + variableColor](-1,0.5)(-2,1)(2,2)(-1,-2)(2,-2) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[width=7cm,wide=true] +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\pscurve[variableLW,startLW=1pt,endLW=20pt]% + (-1,0.5)(-2,1)(2,2)(-1,-2)(2,-2) +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-5,-3)(5,3) +\psplot[variableLW,startLW=1pt,endLW=20pt, + linecolor=magenta!60,variableColor, + algebraic,plotpoints=3000,startWL=500, + endWL=700]{-5}{5}{2*sin(2*x)+cos(x)} +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\psset{endLW=24pt} +\begin{pspicture}(-5,-5)(5,5) +\psparametricplot[variableLW,startLW=1pt, + endLW=60pt,linecolor=red,variableColor, + algebraic,plotpoints=3000,plotstyle=curve, + opacity=0.4,strokeopacity=0.4, + endWL=600]{-5}{5}{t*sin(t) | t*cos(t)} +\end{pspicture} +\end{LTXexample} + + +\clearpage + + \subsection{Macro \nxLcs{psellipse}} To rotate an ellipse the already existing keyword \Lkeyword{rot} can be @@ -90,7 +191,7 @@ elliptic arc this is no more the case, which is the reason why angles are internally corrected by PSTricks, to get the same arc lengthts for different radii: -\xLcs{psellipticarc}\xLkeyword{ +\xLcs{psellipticarc} \begin{LTXexample}[width=6cm] \psset{unit=0.5cm} \begin{pspicture}(-5.5,-5.5)(5.5,5.5)% @@ -158,7 +259,7 @@ If you do not want the angle correction, then use the keyword setting \Lkeyword{ -\subsection{Option \nxLkeyword{algebraic}} +\subsection{Option \texttt{algebraic}} The option \Lkeyword{algebraic} moved from the other packages into the main package \LPack{pstricks} to get rid of the dependencies. @@ -468,7 +569,7 @@ for plotting lines/curves with symbols. %-------------------------------------------------------------------------------------- \subsection{\nxLFile{pst-algparser.pro}} -\subsubsection{Using the \nxLkeyword{Sum} function} +\subsubsection{Using the \texttt{Sum} function} %-------------------------------------------------------------------------------------- \begin{BDef} diff --git a/Master/texmf-dist/doc/generic/pstricks/pstricks-add-data9.data b/Master/texmf-dist/doc/generic/pstricks/pstricks-add-data9.data new file mode 100644 index 00000000000..8bd09389cc7 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/pstricks-add-data9.data @@ -0,0 +1,4 @@ +some nonsense in this line ---time forcex forcey +0 0.2 +1 1 +2 4 diff --git a/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg b/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg index 423849dab56..30f36c74b7e 100644 --- a/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg +++ b/Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg @@ -2,7 +2,7 @@ %% %% Configuration file for PSTricks %% -%% Version 0.02 (2008/06/20) +%% Version 0.02 (2010/08/02) %% %% For use with xdvipdfmx %% Created by SMiyata based on standard pstricks.con from TeXLive distribution. @@ -122,6 +122,8 @@ {\def\current@@@@color{\csname\string\color@xetex@\psfillcolor\endcsname}}{% \AtBeginDocument{\@ifpackageloaded{xcolor}{\def\current@@@@color{\psfillcolor}}% {\def\current@@@@color{\csname\string\color@\psfillcolor\endcsname}}}} +% +\iffalse \def\pst@starbox{% \setbox\pst@hbox\hbox{{% \def\current@color{\current@@@@color}% @@ -133,7 +135,10 @@ \special{color pop}}% {\color@block{\wd\pst@hbox}{\ht\pst@hbox}{\dp\pst@hbox}}}% \rlap{\hskip\psframesep\unhbox\pst@hbox}}} +\fi +% \def\AltClipMode{} +% \def\putoverlaybox#1{% \hbox{\special{x: gsave}\special{x: initoverlay #1}\copy\theoverlaybox\special{x: grestore}}} \def\pst@overlay#1{\edef\curr@overlay{#1}\special{x: clipoverlay #1}\aftergroup\pst@endoverlay} diff --git a/Master/texmf-dist/tex/generic/pstricks/pst-fp.tex b/Master/texmf-dist/tex/generic/pstricks/pst-fp.tex index e25c4be9301..046f8e58185 100644 --- a/Master/texmf-dist/tex/generic/pstricks/pst-fp.tex +++ b/Master/texmf-dist/tex/generic/pstricks/pst-fp.tex @@ -1,5 +1,6 @@ %% $Id: pst-fp.tex 259 2010-01-17 09:51:50Z herbert $ %% +%% %% This is file `pst-fp.tex', %% %% IMPORTANT NOTICE: @@ -21,13 +22,13 @@ \let\PSTFPloaded\endinput % % Requires some packages -%\ifx\PSTricksLoaded\endinput\else\input pstricks \fi +\ifx\PSTricksLoaded\endinput\else\input pstricks \fi % -\def\fileversion{0.06} -\def\filedate{2010/05/14} +\def\fileversion{0.05} +\def\filedate{2010/01/17} \message{`pst-fp' v\fileversion, \filedate\space (hv)} % -%\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax +\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax %fixed point arithmetic with values between (including) % -999999999999999999.999999999999999999 @@ -707,7 +708,7 @@ \let#1\pstFP@tmp% } % -%\catcode`\@=\PstAtCode\relax +\catcode`\@=\PstAtCode\relax % %% END: pst-fp.tex \endinput diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex index 073895b2440..36467cd0dd2 100644 --- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex +++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex @@ -65,8 +65,8 @@ \pst@addfams{pstricks} \ifx\PSTFPloaded\endinput\else \input pst-fp.tex\fi % -\def\fileversion{2.10} -\def\filedate{2010/08/27} +\def\fileversion{2.11} +\def\filedate{2010/09/09} % % stolen from latex.ltx to make it TeX compatible \newcount\psLoopIndex @@ -1096,6 +1096,86 @@ \expandafter\noexpand\csname psfs@#1\endcsname}% }} \psset[pstricks]{fillstyle=none} +% +%--------------------------- continous linewidth ------------------- +\newdimen\psk@startLW +\newdimen\psk@endLW +\define@key[psset]{pstricks}{startLW}[\pslinewidth]{\pssetlength{\psk@startLW}{#1}}% +\define@key[psset]{pstricks}{endLW}[\pslinewidth]{\pssetlength{\psk@endLW}{#1}}% +\define@key[psset]{pstricks}{startWL}[380]{\pst@getint{#1}\psk@startWL}% +\define@key[psset]{pstricks}{endWL}[780]{\pst@getint{#1}\psk@endWL}% +\define@boolkey[psset]{pstricks}[Pst@]{variableLW}[true]{} +\define@boolkey[psset]{pstricks}[Pst@]{variableColor}[true]{} +\psset[pstricks]{startLW=\pslinewidth,endLW=\pslinewidth,variableColor=false,variableLW=false,startWL=380,endWL=780} +% +\def\pst@flattenpath{ + /Coors [] def % the array of all points + /lambda \psk@startWL\space def + % + /add2Values { Coors aload length 2 add array astore /Coors exch def } def + /add6Values { Coors aload length 6 add array astore /Coors exch def } def +% + 0.1 setflat % the value for the line snippets + flattenpath % flatten the existing path into line segments +% + { add2Values } % what to do with moveto + { add2Values } % what to do with lineto + { add6Values } % what to do with curveto (not needed here) + { } % what to do with closepath + pathforall % do it for the existing path +% + \pst@number\psk@startLW setlinewidth + 2 setlinejoin + 0 setlinecap + Coors aload length 2 sub 2 div cvi /N0 exch def % set number of points + /NN 0 def + /N N0 def + { N 3 gt { N 3 sub /N ED }{ N 1 sub /N ED } ifelse + NN 1 add /NN ED + N 0 eq { exit } if + } loop + /dLW \pst@number\psk@endLW \pst@number\psk@startLW sub NN div def % the step for the linewidth + \ifPst@variableColor + /dColor \psk@endWL\space \psk@startWL\space sub NN div def + lambda dColor add dup /lambda ED + tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor + \else + \pst@usecolor\pslinecolor + \fi + moveto % move to the first one + /N N0 def + { + N 3 gt { +% CP 6 2 roll + \psk@curvature\space /c ED /b ED /a ED + /ArrowA {} def + /ArrowB {} def + BOC NC EOC % curveto + N 3 sub /N ED }{ lineto N 1 sub /N ED } ifelse + currentlinewidth dLW add setlinewidth % increase line width + \ifPst@variableColor + lambda dColor add dup /lambda ED + tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor + \else + \pst@usecolor\pslinecolor + \fi + CP /Y ED /X ED % put coors of current point on the stack +% 0.4 .setopacityalpha + stroke % draw the line segment + N 0 eq { exit }{ X Y moveto } ifelse + } loop +% N { % repeat for the other N coords +% lineto % line to next point +% currentlinewidth dLW add setlinewidth % increase line width +% lambda dColor add dup /lambda ED +% tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor +% currentpoint % put coors of current point on the stack +% 0.4 .setopacityalpha +% stroke % draw the line segment +% moveto +% } repeat +} + % %--------------------------- A R R O W S --------------------------- % @@ -1811,6 +1891,7 @@ \psk@curvature\space /c ED /b ED /a ED \ifshowpoints true \else false \fi \ifx\pslinestyle\psls@@symbol \psls@symbol OpenSymbolCurve \else \tx@OpenCurve \fi + \ifPst@variableLW \pst@flattenpath \fi }% \ifx\pslinestyle\psls@@symbol\def\pslinestyle{none}\fi% \end@OpenObj% @@ -2905,13 +2986,13 @@ pop \def\psarc@iii(#1)#2#3#4{% \begin@OpenObj \pst@getangle{#3}\pst@tempa - \psDEBUG[psarc]{angleA=\pst@tempa}% \pst@getangle{#4}\pst@tempb - \psDEBUG[psarc]{angleB=\pst@tempb}% \ifx\pst@tempa\pst@tempb \else \pst@@getcoor{#1}% \pssetlength\pst@dima{#2}% - \addto@pscode{\psarc@iv \psarc@v}% + \addto@pscode{\psarc@iv \psarc@v + \ifPst@variableLW \pst@flattenpath \fi + }% \gdef\psarc@type{0}% \showpointsfalse \fi @@ -3069,7 +3150,9 @@ pop \pst@getcoor{#2}\pst@tempb% a,b \pst@getangle{#3}\pst@tempc% start angle \pst@getangle{#4}\pst@tempd% end angle - \addto@pscode{\psellipticarc@definearg \psellipticarc@draw}% + \addto@pscode{\psellipticarc@definearg \psellipticarc@draw + \ifPst@variableLW \pst@flattenpath \fi + }% \showpointsfalse \end@OpenObj% } @@ -3163,10 +3246,11 @@ pop \addto@pscode{ \pst@coor \ifPst@SpecialLength \pst@SpecialLength \else \pst@number\pst@dimc \fi -% \pst@number\pst@dimc \psk@dimen CLW mul sub 0 360 arc - closepath }% + \ifPst@variableLW \pst@flattenpath \fi + closepath + }% \showpointsfalse \end@ClosedObj \fi @@ -3251,6 +3335,7 @@ pop \fi \pst@tempa \tx@Ellipse + \ifPst@variableLW \pst@flattenpath \fi closepath }% \def\pst@linetype{2}% -- cgit v1.2.3