summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-09-28 22:44:57 +0000
committerKarl Berry <karl@freefriends.org>2012-09-28 22:44:57 +0000
commitc954ba7a2ddb829c997db2e90c6629c766738900 (patch)
treeeb47bbc53c741998259e5bbf0a55261ddf6ec077 /Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
parenteceed410aed51a59b7dabadf39d0df14a44e90ce (diff)
pstricks-add (28sep12)
git-svn-id: svn://tug.org/texlive/trunk@27836 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex156
1 files changed, 144 insertions, 12 deletions
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%