From c2aec9146006572a51a8d425ee7e702cd35f3e03 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 14 Aug 2012 23:23:35 +0000 Subject: pstricks (14aug12) git-svn-id: svn://tug.org/texlive/trunk@27404 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/generic/pstricks/Changes.dvips | 2 + .../doc/generic/pstricks/Changes.generic | 3 + .../texmf-dist/doc/generic/pstricks/pst-news12.pdf | Bin 78934 -> 97766 bytes .../texmf-dist/doc/generic/pstricks/pst-news12.tex | 50 ++++++++- Master/texmf-dist/dvips/pstricks/pstricks.pro | 76 +++++++++++--- .../tex/generic/pstricks/config/gastex.cfg | 116 +++++++++++++++++++++ .../texmf-dist/tex/generic/pstricks/pstricks.tex | 49 +++++++-- 7 files changed, 268 insertions(+), 28 deletions(-) create mode 100644 Master/texmf-dist/tex/generic/pstricks/config/gastex.cfg (limited to 'Master') diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.dvips b/Master/texmf-dist/doc/generic/pstricks/Changes.dvips index 01afcb9a69e..6114f142810 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Changes.dvips +++ b/Master/texmf-dist/doc/generic/pstricks/Changes.dvips @@ -1,4 +1,6 @@ ---- pstricks.pro +1.14 2012-08-13 - add eoclip for linefill and dotfill +1.13 2012-07-01 - add PenroseFillA 1.12 2012-02-12 - add option tickAngle and symbolLinewidth 1.11 2012-02-09 - fix bug 1.10 2012-02-09 - add option for curveticks with option symbol diff --git a/Master/texmf-dist/doc/generic/pstricks/Changes.generic b/Master/texmf-dist/doc/generic/pstricks/Changes.generic index ea993bfe454..feef27cf870 100644 --- a/Master/texmf-dist/doc/generic/pstricks/Changes.generic +++ b/Master/texmf-dist/doc/generic/pstricks/Changes.generic @@ -1,4 +1,7 @@ pstricks.tex -------- +2.30 2012-08-13 - fixed bug with the star version of \psellipticarc + - added fillstyle options eovlines, eohlines, + eovlines*, and eohlines* 2.29 2012-06-04 - fixed itroduced trailing space with boolkey 2.28 2012-05-24 - added \add@psCode, which uses \pstVerb instead of \pstverb diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf b/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf index 04fe319386a..8250d1ed347 100644 Binary files a/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf and b/Master/texmf-dist/doc/generic/pstricks/pst-news12.pdf differ diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex b/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex index 384bca12e4e..c998b38870a 100644 --- a/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex +++ b/Master/texmf-dist/doc/generic/pstricks/pst-news12.tex @@ -56,6 +56,19 @@ supports \PS\ code in the document. \section{\texttt{pstricks.tex} (\pstricksFV -- \pstricksFD)} %-------------------------------------------------------------------------------------- + +\subsection{\nxLcs{psellipticarc}} +There was a bug with the star version of \Lcs{psellipticarc}, which filled the path in +the same way as \Lcs{psellipticwedge*} does. It is now fixed: + +\begin{LTXexample}[pos=r] +\begin{pspicture}[showgrid](4,4) +\psellipticarc*(2,0)(2,4){0}{130} +\psdot(2,0) +\end{pspicture} +\end{LTXexample} + + \subsection{Grid} The optional argument \Lkeyval{showgrid} can have the values \Lkeyval{bottom}, @@ -66,8 +79,6 @@ The optional argument \Lkeyval{showgrid} can have the values \Lkeyval{bottom}, at the end of the \Lenv{pspitcure} environment. - - \subsection{Symbol line} The optional argument \Lkeyword{symbol} for a linestyle can now be set with a negative \Lkeyword{symbolstep} for a computed width of the steps: @@ -106,6 +117,41 @@ width if the \Lkeyword{symbolStep} is set by a negative number without a unit. \end{LTXexample} +\subsection{Fill style \texttt{eohlines} and \texttt{eovlines}} +These fill stykes uses the PS function \Lps{eoclip} instead of \Lps{clip}. + +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](6,6) + \pscustom[fillstyle=eovlines,fillcolor=green]{ + \pscircle(3,3){3} + \psline[liftpen=2](1,2)(5,2)(3,5)(1,2) + } +\end{pspicture}\quad +\begin{pspicture}[showgrid](6,6) + \pscustom[fillstyle=eovlines*,fillcolor=blue!50]{ + \pscircle(3,3){3} + \psline[liftpen=2](1,2)(5,2)(3,5)(1,2)} +\end{pspicture} +\end{LTXexample} + + + +\subsection{Fill style \texttt{penroseA}} + +The valid optional arguments are \texttt{penroseA}, +\texttt{hatchcolor}, \texttt{dartcolor}, and \texttt{kitecolor} + +\begin{LTXexample}[pos=t,wide] +\begin{pspicture}(3,3) +\psframe[fillstyle=penroseA](3,3) +\end{pspicture} \qquad +\begin{pspicture}(3,3) +\psframe[fillstyle=penroseA,psscale=0.5,hatchcolor=white](3,3) +\end{pspicture} \qquad +\begin{pspicture}(3,3) +\psccurve[fillstyle=penroseA,kitecolor=yellow,dartcolor=blue!30](0,1.5)(1.5,3)(3,1.5)(1.5,0) +\end{pspicture} +\end{LTXexample} diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro index 77519c55514..c00d0413c19 100644 --- a/Master/texmf-dist/dvips/pstricks/pstricks.pro +++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro @@ -1,7 +1,7 @@ -% $Id: pstricks.pro 647 2012-02-12 15:03:40Z herbert $ +% $Id: pstricks.pro 700 2012-08-13 21:04:25Z herbert $ % %% PostScript prologue for pstricks.tex. -%% Version 1.12, 2012/02/12 +%% Version 1.14, 2012/08/13 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -189,7 +189,7 @@ tx@Dict begin /y2 ED a Div ceiling cvi /x2 ED /y1 ED a Div cvi /x1 ED /y2 y2 y1 sub def - clip + clipType % must be defined in pstricks.tex: clip -- eoclip newpath 2 setlinecap systemdict @@ -219,7 +219,7 @@ tx@Dict begin /y2 ED /x2 ED /y1 ED /x1 ED y2 y1 sub a div 2 add cvi /Ny ED x2 x1 sub a div 2 add cvi /Nx ED - clip + clipType % must be defined in pstricks.tex: clip -- eoclip newpath /yA y1 dotRadius add CLW add def /xA0 x1 dotRadius add CLW add def @@ -238,29 +238,71 @@ tx@Dict begin } def % /PenroseFill {% on stack: scaling factor - dup dup scale - 1 exch div round /penroseFactor ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def + /Scale ED +% 1 exch div round /penroseFactor ED +% a 0 dtransform round exch round exch +% 2 copy idtransform +% exch Atan rotate +% idtransform pop /a ED +% .25 .25 itransform pathbbox +% /y2 ED +% a Div ceiling cvi /x2 ED /y1 ED +% a Div cvi /x1 ED /y2 y2 y1 sub def clip newpath - systemdict - /setstrokeadjust known { true setstrokeadjust } if +gsave + 220 150 translate + Scale dup scale + systemdict /setstrokeadjust known { true setstrokeadjust } if /I/S/L/W/G/+/Z/F/E/D[/def/exch/for{E D}/add{s E get mul} { Z -36.2001 1 33 }{25 E S rlineto}{/q Z dup q G E q 1 + G}{Z 2 2}]{cvx def}forall [0 72 1008 {dup sin E cos }F ]1 setlinejoin/s W{/a W{/b I 10{/i I 4{/m I moveto i m +/j I 10{/l Z b m l + G a l G sub s m get div .2 + floor .3 + 25 mul j l + S rmoveto}F i L j L stroke }F}F}F}F grestore - pop pop +% pop pop } def % +/PenroseFillA {% on stack: scaling factor, border color, kite color, dart color + /Scale ED + Scale dup scale + /border_colour ED + /kite_colour ED + /dart_colour ED + clip + + newpath + gsave + 100 100 translate + 6 + Scale 1 lt { 1 Scale dup add div mul cvi } if %%%% Number of iterations + 10 %%%% Long side length in millimeters + /border_width { L 0.06 mul }def %%%% Choose the scalefactor for the borders + /L exch 25.4 div 72 mul def %%%% Conversion: mm -> inches -> points + /f{-1 5 sqrt add 2 div}bind def %%%% The reciprocal of the golden ratio + /l{L f mul}bind def %%%% Short side length l = L*f + /Ll{L l add}bind def %%%% Ll = L + l + /c{36 cos L mul}bind def %%%% c = L*cos(36) + /s{36 sin L mul}bind def %%%% s = L*sin(36) + /draw_tile { 0 0 moveto c s lineto 0 lineto gsave closepath gsave fill grestore + 0 setlinewidth stroke grestore border_colour stroke } bind def + /half_kite { dup dup 0 gt{ 1 sub gsave f f neg scale -36 rotate half_dart + Ll 0 translate 144 rotate kite grestore } + { kite_colour L draw_tile }ifelse + pop } bind def + /half_dart { dup dup 0 gt{ 1 sub gsave f f scale half_kite + -144 rotate Ll neg 0 translate half_dart grestore } + { dart_colour l draw_tile }ifelse + pop } bind def + /kite{ gsave half_kite 1 -1 scale half_kite grestore }bind def + border_width setlinewidth 1 setlinejoin 1 setlinecap +% 450 0 translate + dup f exch neg exp dup scale + 5 {kite 72 rotate } repeat stroke + grestore +} def +% +% /TruchetFill { % on stack: scaling factor 10 dict begin dup dup scale diff --git a/Master/texmf-dist/tex/generic/pstricks/config/gastex.cfg b/Master/texmf-dist/tex/generic/pstricks/config/gastex.cfg new file mode 100644 index 00000000000..06a92ce370f --- /dev/null +++ b/Master/texmf-dist/tex/generic/pstricks/config/gastex.cfg @@ -0,0 +1,116 @@ +%% BEGIN: pstricks.con (for xdvipdfmx driver) +%% +%% Configuration file for PSTricks +%% +%% Version 0.03 (2011/11/23) +%% +%% For use with xdvipdfmx +%% Created by SMiyata based on standard pstricks.con from TeXLive distribution. +%% This file may be distributed, used and modified freely. +% +\def\pstdriver{xdvipdfmx}% +\ifx\textsuperscript\@undefined + \def\pstheader#1{\special{header=#1}}% +\else + \ifx\Gin@PS@file@header\@undefined + \def\pstheader#1{\AtBeginDvi{\special{header=#1}}}% + \else + \let\pstheader\Gin@PS@file@header% + \fi +\fi + +%%%%%%%%%%%%%%%%%%% !! CUSTOMIZATION STUFF GOES HERE: !! %%%%%%%%%%%%%%%%%% +%% If you want to include your own customizations to pstricks.tex, then +%% uncomment the \pstcustomize command, and include your modifications +%% after \pstcustomize. These will be read in after pstricks.tex. +\def\c@lor@to@ps#1 #2\@@{\csname c@lor@ps@#1\endcsname#2 \@@}% +\def\c@lor@ps@#1 #2\@@{TeXDict begin #1 end}% +\def\c@lor@ps@rgb#1\@@{#1 setrgbcolor}% +\def\c@lor@ps@hsb#1\@@{#1 sethsbcolor}% +\def\c@lor@ps@cmyk#1\@@{#1 setcmykcolor}% +\def\c@lor@ps@gray#1\@@{#1 setgray}% + +\typeout{Using PS configuration for XeTeX+xdvipdfmx}% + +\endinput +% +% +%%%%%%%%%%%%%%%% DESCRIPTION OF CONFIGURATION DEFINITIONS %%%%%%%%%%%%%%% + +Here are the commands that must be defined in this file: + + \pstverb{} - The argument is included as verbatim PostScript, + grouped by save and restore. The coordinate system + should be square, not rotated, and with the origin + at TeX's currentpoint. + + \pstVerb{} - The argument is included as verbatim PostScript, not + grouped by (g)save and (g)restore. The currentpoint + should be TeX's currentpoint. + + \pstunit - The units used by driver for graphics included with + \pstverb. Probably 1bp or 1sp. + + \pstverbscale - The PostScript code that scales the coordinate system + from that in effect with \pstVerb to that in effect + with \pstverb. Should not translate to the currentpoint. + + \pstrotate - The PostScript code that takes a number off the stack + and rotates the axes properly. I.e., + \pstVerb{angle \pstrotate} is used to begin rotations. + + \pstheader{} - The argument is a header file (e.g., .pro file). + If your driver does not support such a special, then + the command might just remind you to include the header + when printing. You can use PSTricks without a header, + in which case it does not matter how you define + \pstheader. See read-me.pst for details. + If you cannot change the default directory where your + driver looks for header files, and you cannot write to + that directory, then you include the path for your + PSTricks header files. + E.g., \def\pstheader#1{\special{header=~/tex/#1}}. + + \pstdriver - The name of the driver. + + +%%%%%%%%% !! HOW TO MAKE A TEX FORMAT WITH PSTRICKS PRELOADED !! %%%%%%%% + +See your local TeX documentation for instructions on creating a TeX format. + +Before making the format, be sure that this configuration file is correct. +It will be read only when creating the format, and not with every job. + +If you are not using header files, there are no more special instructions. + +Special instructions when using header files: + + - If you want to include supplementary PSTricks files (e.g., pst-node.tex), + add \input commands in the customization section above. + + - If your definition of \pstheader is, e.g. + + \def\pstheader#1{\special{\header=#1}} + + then change it to + + \def\pstheader#1{% + \expandafter\everyjob\expandafter{\the\everyjob + \special{header=#1}}} + + and put your original definition in the customization section, AFTER + any \input commands. E.g., the customization section might look like: + + \pstcustomize + \input pst-node.tex + \input pst-coil.tex + \def\pstheader#1{\special{header=#1}} + + - Input pstricks.tex at the appropriate time when creating the format. + E.g., when initex stops running: + *\input pstricks + *\dump + + +%% +%% END: pstricks.con diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex index f8db856d40f..cc03844a3ad 100644 --- a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex +++ b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex @@ -94,8 +94,8 @@ \catcode`\@=\PstAtCode\relax \ifx\PSTFPloaded\endinput\else \input pst-fp.tex\fi % -\def\fileversion{2.29} -\def\filedate{2012/06/04} +\def\fileversion{2.30} +\def\filedate{2012/08/13} \catcode`\@=11\relax \pst@addfams{pstricks} % @@ -1027,6 +1027,9 @@ \psset[pstricks]{linewidth=.8pt} \define@key[psset]{pstricks}{linecolor}[black]{\pst@getcolor{#1}\pslinecolor} \psset[pstricks]{linecolor=black} +\define@key[psset]{pstricks}{kitecolor}[red]{\pst@getcolor{#1}\ps@kitecolor} +\define@key[psset]{pstricks}{dartcolor}[blue]{\pst@getcolor{#1}\ps@dartcolor} +\psset[pstricks]{kitecolor,dartcolor} % \newif\ifPst@coloreddashed \define@key[psset]{pstricks}{dashcolor}[white]{% @@ -1155,6 +1158,7 @@ \def\tx@LineFill{LineFill } \def\tx@DotFill{DotFill } \def\tx@PenroseFill{PenroseFill } +\def\tx@PenroseFillA{PenroseFillA } \def\tx@TruchetFill{TruchetFill } % \def\psfs@none{} @@ -1176,7 +1180,8 @@ \define@key[psset]{pstricks}{hatchwidthinc}[0pt]{\pst@getlength{#1}\psk@hatchwidthinc} \psset[pstricks]{hatchwidthinc=0pt,hatchsepinc=0pt} % -\def\pst@linefill{% +\def\pst@linefill#1{ + /clipType { \ifx\relax#1\relax clip \else#1\fi} def \psk@hatchangle rotate \psk@hatchwidth SLW \pst@usecolor\pshatchcolor @@ -1185,19 +1190,25 @@ \psk@hatchwidthinc \tx@LineFill } % -\def\psfs@vlines{\pst@fill\pst@linefill} +\def\psfs@vlines{\pst@fill{\pst@linefill{}}} +\def\psfs@eovlines{\pst@fill{\pst@linefill{eoclip}}} \@namedef{psfs@vlines*}{\psfs@solid \psfs@vlines} -\def\psfs@hlines{\pst@fill{90 rotate \pst@linefill}} +\@namedef{psfs@eovlines*}{\psfs@eofill \psfs@eovlines} +\def\psfs@hlines{\pst@fill{90 rotate \pst@linefill{}}} +\def\psfs@eohlines{\pst@fill{90 rotate \pst@linefill{eoclip}}} \@namedef{psfs@hlines*}{\psfs@solid \psfs@hlines} +\@namedef{psfs@eohlines*}{\psfs@eofill \psfs@eohlines} \def\psfs@crosshatch{\psfs@vlines \psfs@hlines} \@namedef{psfs@crosshatch*}{\psfs@solid \psfs@vlines \psfs@hlines} +\@namedef{psfs@eocrosshatch*}{\psfs@eofill \psfs@eovlines \psfs@eohlines} % \define@key[psset]{pstricks}{psscale}[1]{% \def\psk@@psscale{#1}% for use with \psscalebox \pst@checknum{#1}\psk@psscale} \psset[pstricks]{psscale=1} % -\def\pst@dotFill{% +\def\pst@dotFill#1{% + /clipType { \ifx\relax#1\relax clip \else#1\fi} def gsave \pst@number\pslinewidth SLW \pst@usecolor\pshatchcolor @@ -1205,11 +1216,14 @@ \psk@hatchsep \psk@hatchwidth \tx@DotFill } + \def\psfs@dots{\pst@fill{ /SolidDot false def \pst@dotFill }} +\def\psfs@eodots{\pst@fill{ /SolidDot false def \pst@dotFill[eoclip] }} \@namedef{psfs@dots*}{\pst@fill{ /SolidDot true def \pst@dotFill }} +\@namedef{psfs@eodots*}{\pst@fill{ /SolidDot true def \pst@dotFill[eoclip] }} % \def\pst@penroseFill{% - gsave % restore in PenroseFill +% gsave % restore in PenroseFill \pst@number\pslinewidth SLW \pst@usecolor\pshatchcolor \psk@psscale @@ -1217,6 +1231,23 @@ \def\psfs@penrose{\pst@fill\pst@penroseFill} \@namedef{psfs@penrose*}{\psfs@solid \psfs@penrose} % +\def\pst@penroseFillA{% +% gsave % restore in PenroseFillA + \pst@number\pslinewidth SLW +% \pst@usecolor\pshatchcolor +% on stack: scaling factor, border color, kite color, dart color +% dup dup scale +% /border_colour ED % +% /kite_colour ED % +% /dart_colour + { \pst@usecolor\ps@dartcolor } + { \pst@usecolor\ps@kitecolor } + { \pst@usecolor\pshatchcolor } + \psk@psscale + \tx@PenroseFillA } +\def\psfs@penroseA{\pst@fill\pst@penroseFillA} +\@namedef{psfs@penroseA*}{\psfs@solid \psfs@penroseA} +% \def\pst@truchetFill{% gsave % restore in PenroseFill \pst@number\pslinewidth SLW @@ -3394,9 +3425,9 @@ pop /mtrx CM def xOrig yOrig T rx ry scale - \if@star 0 0 moveto \fi % for filling +% \if@star 0 0 moveto \fi % for filling \if@psarcn arcn \else arc \fi - \if@star 0 0 moveto \fi +% \if@star 0 0 moveto \fi mtrx setmatrix% } \def\psellipticarc@showpoints{% -- cgit v1.2.3