diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/Changes | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf | bin | 1886721 -> 1901244 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex | 58 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 156 |
5 files changed, 209 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index 0a77d7ca705..9f1444a33a1 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,4 +1,4 @@ -%% $Id: Changes 606 2011-12-11 17:32:58Z herbert $ +%% $Id: Changes 710 2012-09-28 07:27:01Z herbert $ %% pstricks-add.pro ----------- 0.23 2009-12-17 - add RGBtoGRAY and WavelengthToGRAY @@ -39,6 +39,10 @@ pstricks-add.sty ----------- (hv) pstricks-add.tex ----------- (Dominik Rodriguez/hv) + v 3.59 2012-09-27 - added uselinecolor option for \psChart + v 3.58 2012-06-04 - don't close data file + v 3.57 2011-12-20 - added \psparallelogrambox + v 3.56 2011-12-12 - added node definitions for \psTangentLine v 3.55 2011-12-11 - fix bug in \psplotTangent for arrows and linewidth v 3.54 2011-08-20 - new optional argument for the vee arrow line style v 3.53 2011-08-03 - use setting of \Pst@Debug for shownode() diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf Binary files differindex c9939ccdaa4..cdd2654a9ed 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 0de24ab45d8..c98a703caad 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add-doc.tex 566 2011-08-20 07:19:32Z herbert $ +%% $Id: pstricks-add-doc.tex 710 2012-09-28 07:27:01Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside]{pst-doc} \listfiles @@ -660,6 +660,47 @@ and can be used by the user for coloring lines or text. \end{lstlisting} +The linecolor of the pies is by default identical to the fillcolor. If you want another line color +for all pies then use the optional argument \Lkeyword{uselinecolor}. In this case the current +setting of \Lkeyword{linecolor} is taken into account: + + +%\begin{LTXexample}[pos=t] +\psset{unit=1.5} +\begin{pspicture}(-3,-3)(3,3) +\psChart[chartSep=30pt,shadow=true,shadowsize=5pt, + uselinecolor,linecolor=black!20]{34.5,17.2,20.7,15.5,5.2,6.9}{6}{2} +\psset{nodesepA=5pt,nodesepB=-10pt} +\ncline{psChartO1}{psChart1}\nput{0}{psChartO1}{1000 (34.5\%)} +\ncline{psChartO2}{psChart2}\nput{150}{psChartO2}{500 (17.2\%)} +\ncline{psChartO3}{psChart3}\nput{-90}{psChartO3}{600 (20.7\%)} +\ncline{psChartO4}{psChart4}\nput{0}{psChartO4}{450 (15.5\%)} +\ncline{psChartO5}{psChart5}\nput{0}{psChartO5}{150 (5.2\%)} +\ncline{psChartO6}{psChart6}\nput{0}{psChartO6}{200 (6.9\%)} +\bfseries\color{white}% +\rput(psChartI1){Taxes}\rput(psChartI2){Rent}\rput(psChartI3){Bills} +\rput(psChartI4){Car}\rput(psChartI5){Gas}\rput(psChartI6){Food} +\end{pspicture} +%\end{LTXexample} +\psset{unit=1cm} + +\begin{lstlisting} +\psset{unit=1.5} +\begin{pspicture}(-3,-3)(3,3) +\psChart[chartSep=30pt,shadow=true,shadowsize=5pt, + uselinecolor,linecolor=black!20]{34.5,17.2,20.7,15.5,5.2,6.9}{6}{2} +\psset{nodesepA=5pt,nodesepB=-10pt} +\ncline{psChartO1}{psChart1}\nput{0}{psChartO1}{1000 (34.5\%)} +\ncline{psChartO2}{psChart2}\nput{150}{psChartO2}{500 (17.2\%)} +\ncline{psChartO3}{psChart3}\nput{-90}{psChartO3}{600 (20.7\%)} +\ncline{psChartO4}{psChart4}\nput{0}{psChartO4}{450 (15.5\%)} +\ncline{psChartO5}{psChart5}\nput{0}{psChartO5}{150 (5.2\%)} +\ncline{psChartO6}{psChart6}\nput{0}{psChartO6}{200 (6.9\%)} +\bfseries\color{white}% +\rput(psChartI1){Taxes}\rput(psChartI2){Rent}\rput(psChartI3){Bills} +\rput(psChartI4){Car}\rput(psChartI5){Gas}\rput(psChartI6){Food} +\end{pspicture} +\end{lstlisting} \clearpage %-------------------------------------------------------------------------------------- @@ -1578,6 +1619,21 @@ to get the same equation for the curve as \Lcs{psplotTangentLine} does. \end{LTXexample} +The end points are saved as nodes \verb=OCurve=, \verb=ETangent=, and \verb=ENormal=. They can +be used in the default ways for nodes: + +\begin{LTXexample}[pos=t,preset=\centering,wide] +\psset{unit=4,arrowscale=2} +\begin{pspicture}(0.1,-0.1)(4,1) +\pscurve[showpoints=true](2.1,-0.2)(2.5,0.2)(3.2,0.4)(3.8,-0.2) +\psTangentLine[Tnormal,arrows=->,linecolor=red](2.5,0.2)(3.2,0.4)(3.8,-0.2){3.5}{0.5} +\psTangentLine[arrows=->,linecolor=blue](2.5,0.2)(3.2,0.4)(3.8,-0.2){3.5}{0.5} +\pcline[linestyle=dashed]{->}(OCurve)(ETangent|OCurve)\naput{$v_x$} +\pcline[linestyle=dashed]{->}(ETangent|OCurve)(ETangent)\naput{$v_y$}% double coordinate (x,y|x,y) +\end{pspicture} +\end{LTXexample} + + \subsection{\nxLcs{psplotTangent} and option \nxLkeyword{Tnormal}} %-------------------------------------------------------------------------------------- There is an additional option, named \Lkeyword{Derive} for an diff --git a/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro b/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro index 288af2eab11..2929ab66490 100644 --- a/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro +++ b/Master/texmf-dist/dvips/pstricks-add/pstricks-add.pro @@ -1,5 +1,7 @@ -%% $Id: pstricks-add.pro 328 2010-05-24 15:56:43Z herbert $ +%% $Id: pstricks-add.pro 692 2012-06-04 06:47:40Z herbert $ +%% % PostScript prologue for pstricks-add.tex. +% % Version 0.23, 2009/12/17 % /tx@addDict 410 dict def tx@addDict begin diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index 4840064a482..977a11dbfa3 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 606 2011-12-11 17:32:58Z herbert $ +%% $Id: pstricks-add.tex 710 2012-09-28 07:27:01Z 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.55} -\def\filedate{2011/12/11} +\def\fileversion{3.59} +\def\filedate{2012/09/28} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -218,6 +218,88 @@ exch \tx@UserCoor ){#3} \end@SpecialObj} % +\newdimen\psparallelogramsep +\define@key[psset]{pstricks-add}{parallelogramsep}[3mm]{\pssetlength\psparallelogramsep{#1}} +\psset[pstricks-add]{parallelogramsep=3mm} +% +\def\psparallelogrambox{\pst@object{psparallelogrambox}} +\def\psparallelogrambox@i{\pst@makebox\psparallelogrambox@ii} +\def\psparallelogrambox@ii{% + \begingroup + \pst@useboxpar + \pst@dima=\pslinewidth + \advance\pst@dima by \psframesep + \pst@dimc=\wd\pst@hbox\advance\pst@dimc by \pst@dima + \pst@dimb=\dp\pst@hbox\advance\pst@dimb by \pst@dima + \pst@dimd=\ht\pst@hbox\advance\pst@dimd by \pst@dima +% Dirk Osburg modification begin - Jul. 16, 2011 + \divide\psparallelogramsep by 2 + \advance\pst@dima by \psparallelogramsep + \advance\pst@dimc by \psparallelogramsep +% Dirk Osburg modification end + \setbox\pst@hbox=\hbox{% + \ifpsboxsep\kern\pst@dima\fi + \begin@ClosedObj + \addto@pscode{% + \psk@cornersize + \pst@number\pst@dima neg % left + \pst@number\pst@dimb neg % lower + \pst@number\pst@dimc % right + \pst@number\pst@dimd % upper + .5 +% D.G. modification begin - Nov. 28, 2001 +%\tx@Frame}% + \pst@number\psparallelogramsep + \tx@Parallelogram}% +% D.G. modification end + + \def\pst@linetype{2}% + \showpointsfalse + \end@ClosedObj + \box\pst@hbox + \ifpsboxsep\kern\pst@dima\fi% + }% + \ifpsboxsep\dp\pst@hbox=\pst@dimb\ht\pst@hbox=\pst@dimd\fi + \leavevmode\box\pst@hbox + \endgroup% +} + +% From the Frame and Rect PostScript macros +\pst@def{Parallelogram}<{% + /ParallelogramA { +% Dirk Osburg modification begin - Jul. 16, 2011 +%%%% old stuff: %%% +%x1 pgs sub y1 moveto +%x1 y2 lineto +%x2 pgs add y2 lineto +%x2 y1 lineto +%x1 pgs sub y1 lineto +%%%% replaced by: %%% + x1 pgs sub y1 moveto + x1 pgs add y2 lineto + x2 pgs add y2 lineto + x2 pgs sub y1 lineto + x1 pgs sub y1 lineto +% Dirk Osburg modification end + closepath} def +% +/pgs ED +CLW mul +/a ED +3 -1 roll +2 copy gt { exch } if +a sub +/y2 ED +a add +/y1 ED +2 copy gt { exch } if +a sub +/x2 ED +a add +/x1 ED +1 index 0 eq {pop pop ParallelogramA } { OvalFrame } ifelse}> +% +% % -------------- the arrow part ------------- % the original table % \def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-],)-(,]-[,|>-<|} @@ -1272,8 +1354,46 @@ /Lineto /lineto load def \ifshowpoints true \else false \fi \tx@setlinejoin % - \tx@Line }% - \end@OpenObj\ignorespaces} + \tx@Line + }% + \end@OpenObj% + \pnode(! + [[#1 dup dup mul exch 1 #2][#3 dup dup mul exch 1 #4][#5 dup dup mul exch 1 #6]] + SolveLinEqSystem /abc ED + abc aload pop % a b c on stack + exch #7 % a c b x + mul add exch % c+b*x a + #7 dup mul mul add % a*x^2+b*x+c + /y0 ED % save value + #7 y0 ){OCurve}% + \pnode(! + [[#1 dup dup mul exch 1 #2][#3 dup dup mul exch 1 #4][#5 dup dup mul exch 1 #6]] + SolveLinEqSystem /abc ED + abc aload pop % a b c on stack + exch #7 % a c b x + mul add exch % c+b*x a + #7 dup mul mul add % a*x^2+b*x+c + /y0 ED % save value + abc aload pop pop exch % b a + #7 mul 2 mul add % b+2*a*x0=mTan + neg 1 exch div % -1/mTan=mOrth + #8 mul /dy ED % mOrth*dx=dy + #7 #8 add y0 dy add % x0+dx y0 +dy + ){ENormal}% + \pnode(! + [[#1 dup dup mul exch 1 #2][#3 dup dup mul exch 1 #4][#5 dup dup mul exch 1 #6]] + SolveLinEqSystem + /abc ED + abc aload pop % a b c on stack + exch #7 % a c b x + mul add exch % c+b*x a + #7 dup mul mul add % a*x^2+b*x+c + /y0 ED % save value + abc aload pop pop exch % b a + #7 mul 2 mul add % b+2*a*x0=mTan + #8 mul /dy1 ED % mTan*dx + #7 #8 add y0 dy1 add ){ETangent}% +\ignorespaces} \def\psplotTangent@x#1,#2,#3\@nil{% \def\pst@tempLeft{#1}% @@ -1588,7 +1708,6 @@ 20 string cvs Pst@data exch writestring Pst@data (\space) writestring 20 string cvs Pst@data exch writestring -% Pst@data (\string\]) writestring Pst@data (\string\n) writestring \fi } def @@ -1597,7 +1716,7 @@ \@pstfalse \@nameuse{testqp@\psplotstyle}% \if@pst\psplot@ii\else\psplot@iii\fi - \addto@pscode{\ifPst@saveData Pst@data closefile \fi} +% \addto@pscode{\ifPst@saveData Pst@data closefile \fi} \endgroup% \ignorespaces% } @@ -1745,6 +1864,9 @@ \psset[pstricks-add]{chartSep=10pt,chartStack=0,chartStackDepth=2cm,chartStackWidth=2cm,% chartHeight=5mm} % +\define@boolkey[psset]{pstricks-add}[Pst@]{uselinecolor}[true]{} +\psset[pstricks-add]{uselinecolor=false} +% \define@key[psset]{pstricks-add}{userColor}{% \chart@Toggle=0\relax% \def\chart@option{#1}% @@ -1838,9 +1960,14 @@ \if$\psk@chartSepValues$\else% \psForeach{\chart@tempC}{\psk@chartSepValues}{\ifnum\chart@tempC=\the\pst@cnta\relax\global\@chartSeptrue\fi}% \fi% - \if@chartSep% - \pswedge[linecolor={chartFillColor\the\pst@cnta},fillstyle=solid,fillcolor={chartFillColor\the\pst@cnta}]% - (\psk@chartSep\p@;\pst@number\pst@dimo){\pst@chartRadius}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \if@chartSep + \ifPst@uselinecolor + \pswedge[linecolor=\pslinecolor,fillstyle=solid,fillcolor={chartFillColor\the\pst@cnta}]% + (\psk@chartSep\p@;\pst@number\pst@dimo){\pst@chartRadius}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \else + \pswedge[linecolor={chartFillColor\the\pst@cnta},fillstyle=solid,fillcolor={chartFillColor\the\pst@cnta}]% + (\psk@chartSep\p@;\pst@number\pst@dimo){\pst@chartRadius}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \fi \pst@dima=\pst@chartRadius\advance\pst@dima by \psk@chartSep\p@% \pnode(\pst@dima;\pst@number\pst@dimo){psChart\the\pst@cnta}% \pst@dimb=\psk@chartNodeI\pst@dima% @@ -1848,8 +1975,13 @@ \pnode(\pst@dimb;\pst@number\pst@dimo){psChartI\the\pst@cnta}% \pnode(\pst@dimc;\pst@number\pst@dimo){psChartO\the\pst@cnta}% \else% - \pswedge[linecolor={chartFillColor\the\pst@cnta},fillstyle=solid,fillcolor={chartFillColor\the\pst@cnta}](0,0)% - {\pst@chartRadius}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \ifPst@uselinecolor + \pswedge[linecolor=\pslinecolor,fillstyle=solid,fillcolor={chartFillColor\the\pst@cnta}](0,0)% + {\pst@chartRadius}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \else + \pswedge[linecolor={chartFillColor\the\pst@cnta},fillstyle=solid,fillcolor={chartFillColor\the\pst@cnta}](0,0)% + {\pst@chartRadius}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \fi \pnode(\pst@chartRadius;\pst@number\pst@dimo){psChart\the\pst@cnta}% \pst@dima=\pst@chartRadius% \pst@dimb=\psk@chartNodeI\pst@dima% |