diff options
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.tex | 60 |
1 files changed, 39 insertions, 21 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 d698ac218b2..1d017d90509 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -26,8 +26,8 @@ \ifx\MultidoLoaded\endinput\else\input multido \fi \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % -\def\fileversion{2.75} -\def\filedate{2006/06/17} +\def\fileversion{2.76b} +\def\filedate{2006/07/07} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -53,14 +53,14 @@ %\psset{dy=0}% \newcount\@zero\@zero=0\relax % -\def\PiFour{12.566371} -\def\PiTwo{6.283185} -\def\Pi{3.14159265} -\def\PiH{1.570796327} -\newdimen\RadUnit -\newdimen\RadUnitInv -\RadUnit=1.047198cm % this is pi/3 -\RadUnitInv=0.95493cm % this is 3/pi +\def\psPiFour{12.566371} +\def\psPiTwo{6.283185} +\def\psPi{3.14159265} +\def\psPiH{1.570796327} +\newdimen\pstRadUnit +\newdimen\pstRadUnitInv +\pstRadUnit=1.047198cm % this is pi/3 +\pstRadUnitInv=0.95493cm % this is 3/pi % \def\pst@getdimdim#1 #2 #3\@nil{% \def\pst@tempA{#2}% @@ -1283,17 +1283,34 @@ \ifPst@trigLabels \def\pst@@@hlabel##1{\pshlabel{##1}} \def\pshlabel##1{% - \ifnum\psk@trigLabelBase<2 + \ifnum\psk@trigLabelBase<2 \def\de@nominator{\@ne}\else\def\de@nominator{\psk@trigLabelBase}\fi - \pst@mod{##1}{\de@nominator}\@tempa - \ifnum\@ne>\@tempa - \count1=##1 \divide\count1 by \de@nominator - \psk@labelFontSize - \ifnum\count1=\@ne - $\pi$\else$\the\count1\pi$\fi - \else\ifnum\@tempa=\@ne - $\frac{\pi}{\de@nominator}$\else$\frac{##1}{\de@nominator}\pi$\fi\fi% - } + \def\pst@tempA{##1} + \pst@abs{\pst@tempA}\pst@cntm + \pst@mod{\pst@cntm}{\de@nominator}\pst@cntp % cntb=##1 modulo trigLabelBase + \ifnum\@ne>\pst@cntp % 1 > modulo -> then we have pi/x + \pst@cnto=\pst@cntm \divide\pst@cnto by \de@nominator + \psk@labelFontSize + \ifnum\pst@tempA<0 $-$\fi% + \ifnum\pst@cnto=\@ne % #1 = trigLabelBase + $\pi$ % print pi + \else + $\the\pst@cnto\pi$ % print \pst@cnto/\de@nominator pi + \fi + \else + \ifnum\pst@cntp=\@ne % < 1 pi? + \if\pst@cntm=\@ne + $\frac{\pi}{\de@nominator}$ % pi/x + \else\ifnum\pst@tempA=-1 $\frac{-\pi}{\de@nominator}$ + \else \ifnum\pst@tempA=1 $\frac{\pi}{\de@nominator}$ + \else$\frac{\pst@tempA\pi}{\de@nominator}$ % (x pi)/y + \fi\fi\fi + \else + \ifnum\pst@tempA=1 $\frac{\pi}{\de@nominator}$ + \else\ifnum\pst@tempA=\de@nominator $\pi$ + \else$\frac{\pst@tempA\pi}{\de@nominator}$ + \fi\fi\fi\fi% + }% \else \def\pst@@@hlabel##1{% \edef\@xyDecimals{\psk@xDecimals}% @@ -1641,7 +1658,8 @@ /epsilon 0.01 def % rounding errors /minTickline \ifis@yAxis \pst@number#1 \else \pst@number#2 \fi def /maxTickline \ifis@yAxis \pst@number#3 \else \pst@number#4 \fi def - /dT \ifis@yAxis\psk@dy\else\psk@dx\fi\space 65536 div viceversa {neg} if def + /dT \ifis@yAxis \psk@dy \else \psk@dx \fi\space abs % added abs 2006-07-07 + 65536 div viceversa { neg } if def % div to get pt instead of sp /subTNo \ifis@yAxis\psk@ysubticks\else\psk@xsubticks\fi \space def subTNo 0 gt { /dsubT dT subTNo div def}{ /dsubT 0 def } ifelse % deltaSubTick \ifis@yAxis \psk@yticksize \else \psk@xticksize \fi |