diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg | 7 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks/pst-fp.tex | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks/pstricks.tex | 101 |
3 files changed, 105 insertions, 14 deletions
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 @@ -1097,6 +1097,86 @@ }} \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 --------------------------- % \def\psk@arrowA{} @@ -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}% |