From fd1452933a9c61590892c397e0a4217d9ada1dee Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 27 Apr 2010 00:59:14 +0000 Subject: pstricks 2.04 (26apr10) git-svn-id: svn://tug.org/texlive/trunk@18015 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/generic/pstricks/pstricks.tex | 86 +++++++++++++++++----- 1 file changed, 68 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist/tex/generic/pstricks') diff --git a/Master/texmf-dist/tex/generic/pstricks/pstricks.tex b/Master/texmf-dist/tex/generic/pstricks/pstricks.tex index 8ce8757e7b6..e46fe6e679b 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.02} -\def\filedate{2010/02/23} +\def\fileversion{2.05} +\def\filedate{2010/04/26} % % stolen from latex.ltx to make it TeX compatible \newcount\psLoopIndex @@ -112,10 +112,10 @@ \repeat% \psforeach@ii{#1}{\pst@tempa}{#5}} % -\long\def\psForeach#1#2#3{% +\long\def\psForeach#1#2#3{% without grouping the contents \global\psLoopIndex=0\relax \if$\ifnum9<1#2$ \else \fi \psforeach@ii{#1}{#2}{#3} - \else \expandafter\psForeach@i#2,..,,..,\@nil{#1}{#3}\fi} + \else \expandafter\psForeach@i#2,..,,..,\@nil{#1}{#3}\fi} \long\def\psForeach@i#1,#2,..,#3,..,#4\@nil#5#6{% \ifx\relax#3\relax\psForeach@ii{#5}{#1,#2}{#6} \else\psForeach@iii{#5}{#1}{#2}{#3}{#6}\fi} @@ -349,6 +349,35 @@ \fi % ----- the old pst@pyth end ----- % +%------ new version \pst@divide ̣-------- by Michael Sharpe +\def\pst@divide#1#2#3{% + \pst@@divide{#1}{#2}% + \advance\pst@dimg \pst@cnta pt% + \pst@dimtonum\pst@dimg{#3}% +} +\def\pst@@divide#1#2{% + \pst@dimg=#1\relax% + \pst@dimh=#2\relax% + \pst@cnth=\pst@dimh% + \pst@cntg=\pst@dimg% + \pst@cnta=\pst@cntg% + \divide\pst@cnta\pst@cnth% + \advance\pst@dimg -\pst@cnta\pst@dimh% + \pst@cntm=67108863\relax %2^26 -1 + \pst@@@divide\pst@@@divide\pst@@@divide\pst@@@divide% + \divide\pst@dimg\pst@cnth% +}% +\def\pst@@@divide{% + \ifnum% + \ifnum\pst@dimg<\z@-\fi\pst@dimg<\pst@cntm% + \multiply\pst@dimg\sixt@@n% + \else% + \divide\pst@cnth\sixt@@n% + \fi% +}% +% +%-------------- the old version ---------- +\iffalse \def\pst@divide#1#2#3{% \pst@@divide{#1}{#2}% \pst@dimtonum\pst@dimg{#3}% @@ -369,6 +398,9 @@ \divide\pst@cntg\sixt@@n \fi% } +\fi +%-------------- end old vesrion --------------- +% \def\pst@configerr#1{% \@pstrickserr{\string#1 not defined in pstricks.con}\@ehpc} % @@ -379,7 +411,7 @@ \def\pstheader#1{\pst@configerr\pstheader} \def\pstdriver{\pst@configerr\pstdriver} \@ifundefined{pstcustomize}% -{\def\pstcustomize{\endinput\let\pstcustomize\relax}}{} + {\def\pstcustomize{\endinput\let\pstcustomize\relax}}{} % \input pstricks.con % local config file % @@ -423,6 +455,12 @@ %--------------------------------------- PS stuff end ----------------------------- % \def\pst@number#1{\pst@@dimtonum#1\space} +% +%-----------------------% hv 20100413 +\def\pst@strip@dot#1{\expandafter\pst@strip@dot@i#1..\@nil} +\def\pst@strip@dot@i#1.#2.#3\@nil{% + \ifnum1#2>10\relax #1.#2\else#1\fi} +%-----------------------% hv 20100413 \def\pst@checknum#1#2{% \edef\ps@next{#1}% \ifx\ps@next\@empty\let\pst@num\z@% @@ -433,7 +471,7 @@ \def#2{0 }% \else% \edef#2{\ifnum\pst@num=\tw@-\fi\the\pst@cntg.% - \expandafter\@gobble\the\pst@cnth\space}% + \expandafter\@gobble\the\pst@cnth\space}% \fi} \def\pst@@checknum{% \@ifnextchar-% @@ -444,8 +482,8 @@ \def\pst@@@checknum#1.#2.#3\@nil{% \afterassignment\pst@@@@checknum\pst@cntg=0#1\relax\@nil% \afterassignment\pst@@@@checknum\pst@cnth=1#2\relax\@nil} -\def\pst@@@@checknum#1\relax\@nil{% -\ifx\@nil#1\@nil\else\let\pst@num\z@\fi} +\def\pst@@@@checknum#1\relax\@nil{\ifx\@nil#1\@nil\else\let\pst@num\z@\fi} +% \def\pst@getnumii#1 #2 #3\@nil{% \pst@checknum{#1}\pst@tempg% \pst@checknum{#2}\pst@temph} @@ -458,6 +496,7 @@ \pst@checknum{#2}\pst@temph% \pst@checknum{#3}\pst@tempi% \pst@checknum{#4}\pst@tempj} +% \def\pst@getdimnum#1 #2 #3\@nil{% \pssetlength\pst@dimg{#1}% \pst@checknum{#2}\pst@tempg% @@ -3017,6 +3056,9 @@ pop \def\psellipticarc{\def\pst@par{}\pst@object{psellipticarc}} \def\psellipticarc@i{\let\if@psarcn\iffalse\psellipticarc@ii} % +\define@boolkey[psset]{pstricks}[Pst@]{correctAngle}[true]{} +\psset{correctAngle=true} + \let\if@psarcn\iffalse \def\psellipticarc@ii{\pst@getarrows\psellipticarc@iii} \def\psellipticarc@iii(#1){% @@ -3044,19 +3086,25 @@ pop % \pst@tempc % the angle in the parameter equation is not proportional to the real angle! % phi=atan(b*tan(angle)/a)+floor(angle/180+0.5)*180 - \pst@tempc cvi 90 mod 0 eq { \pst@tempc } - { rx ry \tx@UserCoor exch \pst@tempc tan mul exch atan - \pst@tempc 180 div .5 add floor 180 mul sub } ifelse + \pst@tempc + \ifPst@correctAngle + cvi 90 mod 0 eq { \pst@tempc } + { rx ry \tx@UserCoor exch \pst@tempc tan mul exch atan + \pst@tempc 180 div .5 add floor 180 mul sub } ifelse + \fi \psk@arcsepA 2 div ArcAdjust def /angleB /d { \if@psarcn add \else sub \fi } def % \pst@tempd - \pst@tempd cvi 90 mod 0 eq { \pst@tempd } - { rx ry \tx@UserCoor exch \pst@tempd tan mul exch atan - \pst@tempd 180 div .5 add floor 180 mul sub } ifelse - \psk@arcsepB 2 div ArcAdjust def + \pst@tempd + \ifPst@correctAngle + cvi 90 mod 0 eq { \pst@tempd } + { rx ry \tx@UserCoor exch \pst@tempd tan mul exch atan + \pst@tempd 180 div .5 add floor 180 mul sub } ifelse + \fi + \psk@arcsepB 2 div ArcAdjust def \ifshowpoints\psellipticarc@showpoints\fi \ifx\psk@arrowA\@empty \ifnum\psk@liftpen=2 @@ -3185,14 +3233,16 @@ pop \showpointsfalse% \end@ClosedObj% } -\def\tx@Ellipse{Ellipse } +\def\tx@Ellipse{ + \ifx\psk@rot\@empty 0 \else \psk@rot \fi + Ellipse } \def\psellipse{\def\pst@par{}\pst@object{psellipse}} \def\psellipse@i(#1){\@ifnextchar({\psellipse@ii(#1)}{\psellipse@ii(0,0)(#1)}} \def\psellipse@ii(#1)(#2){% \begin@ClosedObj \pst@getcoor{#1}\pst@tempa \pst@@getcoor{#2}% - \addto@pscode{% + \addto@pscode{ 0 360 \pst@coor \ifdim\psk@dimen\p@=\z@\else @@ -3201,7 +3251,7 @@ pop \fi \pst@tempa \tx@Ellipse - closepath% + closepath }% \def\pst@linetype{2}% \end@ClosedObj% -- cgit v1.2.3