summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-19 00:34:40 +0000
committerKarl Berry <karl@freefriends.org>2008-04-19 00:34:40 +0000
commitecf4c0dc5174ff18976b4c6a060ea223c8a539ba (patch)
treec4d898b8a573fba9255b52fa41fa81ff18b17f7c /Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
parent4e2ac77b6408065820377abd25541151953797dd (diff)
pstricks-add 3.01 (17apr08)
git-svn-id: svn://tug.org/texlive/trunk@7505 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.tex71
1 files changed, 56 insertions, 15 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 9dabc1f9ac3..ab07c6579c2 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 7 2007-12-29 22:21:13Z herbert $
+%% $Id: pstricks-add.tex 20 2008-04-15 18:40:18Z herbert $
%%
%%
%% This is file `pstricks-add.tex',
@@ -29,8 +29,8 @@
\ifx\MultidoLoaded\endinput\else \input multido \fi
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
-\def\fileversion{3.00}
-\def\filedate{2008/01/01}
+\def\fileversion{3.01}
+\def\filedate{2008/01/26}
\message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -1357,9 +1357,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\define@key[psset]{pstricks-add}{labelFontSize}{\def\psk@labelFontSize{#1}}%
-\psset{labelFontSize={}}
-\def\pshlabel#1{\psk@labelFontSize#1}%
-\def\psvlabel#1{\psk@labelFontSize#1}
+\define@boolkey[psset]{pstricks-add}[Pst@]{mathLabel}[true]{%
+ \ifPst@mathLabel
+ \def\pshlabel##1{\psk@labelFontSize$##1$}%
+ \def\psvlabel##1{\psk@labelFontSize$##1$}
+ \else
+ \def\pshlabel##1{\psk@labelFontSize##1}%
+ \def\psvlabel##1{\psk@labelFontSize##1}
+ \fi}
+\psset{labelFontSize={},mathLabel}
%
\define@boolkey[psset]{pstricks-add}[Pst@]{comma}[true]{}
\define@boolkey[psset]{pstricks-add}[Pst@]{xAxis}[true]{}
@@ -1425,7 +1431,10 @@
\fi%
\fi%
}
- \def\pshlabel##1{\psk@labelFontSize##1}%
+ \ifPst@mathLabel
+ \def\pshlabel##1{\psk@labelFontSize$##1$}\else
+ \def\pshlabel##1{\psk@labelFontSize##1}%
+ \fi
\fi
}
\psset{trigLabels=false}
@@ -1590,7 +1599,12 @@
\ifdim\pst@dima=\z@\else\showoriginfalse\fi%
\ifnum\psk@dy=\z@%
\pst@dimg=\psk@Dy\psyunit%
+ \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): \textbackslash pst@dimg=\the\pst@dimg}\fi % v.1.21
+ \ifdim\pst@dimg<\p@ \pst@cnta=\psk@Dy \edef\psk@Dy{-\the\pst@cnta} % v.1.21
+ \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): Dy -> -Dy (was negative)}\fi % v.1.21
+ \fi % v.1.21
\edef\psk@dy{\number\pst@dimg}%
+ \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): \textbackslash psk@dy=\psk@dy}\fi % v.1.21
\fi%
\ifPst@xAxis\else\showorigintrue\fi%
\pst@vlabels{\pst@dimd}{\psk@arrowB}{#3}{#5}%
@@ -1603,7 +1617,12 @@
\ifdim\pst@dimb=\z@\else\showoriginfalse\fi%
\ifnum\psk@dx=\z@%
\pst@dimg=\psk@Dx\psxunit%
+ \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): \textbackslash pst@dimg=\the\pst@dimg}\fi % v.1.21
+ \ifdim\pst@dimg<\p@ \pst@cnta=\psk@Dx \edef\psk@Dx{-\the\pst@cnta} % v.1.21
+ \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): Dx -> -Dx (was negative)}\fi % v.1.21
+ \fi % v.1.21
\edef\psk@dx{\number\pst@dimg}%
+ \ifnum\Pst@Debug>0 \typeout{==DEBUG== pst-plot(psaxes@iv): \textbackslash psk@dx=\psk@dx}\fi % v.1.21
\fi%
\ifPst@yAxis\else\showorigintrue\fi%
\pst@hlabels{\pst@dimc}{\psk@arrowB}{#4}{#6}%
@@ -1661,11 +1680,27 @@
\define@key[psset]{pstricks-add}{yticksize}{\set@yticksize{#1}}% overwrites the definition in pstricks
%\psset{ticksize=-4pt 4pt}
%
-% full= 0, top=1, bottom=-1
+% full= 0, top=1, bottom=-1 => 0 1 2
+\def\psset@tickstyle#1{\pst@expandafter\psset@@tickstyle{#1}\@nil}% overwrite it
+\def\psset@@tickstyle#1#2\@nil{%
+ \ifx#1f\let\psk@tickstyle\z@\else
+ \ifx#1t\let\psk@tickstyle\@ne
+ \edef\psk@xticksize{0 \pst@number\pst@xticksizeB}%
+ \edef\psk@yticksize{0 \pst@number\pst@yticksizeB}%
+ \else
+ \ifx#1b\let\psk@tickstyle\m@ne
+ \edef\psk@xticksize{\pst@number\pst@xticksizeA 0}%
+ \edef\psk@yticksize{\pst@number\pst@yticksizeA 0}%
+ \else
+ \@pstrickserr{Bad tick style: `#1#2'}\@ehpa
+ \fi\fi\fi
+}
+
+\iffalse
\define@key[psset]{}{tickstyle}{%
\pst@expandafter\psset@@tickstyle{#1}\@nil%
\pst@cnta=\psk@tickstyle
- \advance\pst@cnta by 1
+ \advance\pst@cnta by \@ne
\ifcase\pst@cnta% bottom
\pst@xticksizeB=\z@
\pst@yticksizeB=\z@
@@ -1675,6 +1710,7 @@
\pst@yticksizeA=\z@
\fi
}
+\fi
%\psset{tickstyle=full}%
%
%
@@ -1953,7 +1989,7 @@
\divide\pst@cnta\psk@dx\relax% % Number of ticks/labels
\ifnum\pst@cnta=\z@\else%
\pst@dimb=\psk@dx sp% % Space between ticks.
-% \ifPst@yAxis\else\showorigintrue\fi%
+ \ifPst@yAxis\else\showorigintrue\fi%
\ifnum\psk@labels<\tw@ \ifPst@xAxis\pst@@hlabels\fi\fi%
\showoriginfalse%
\fi%
@@ -1967,8 +2003,11 @@
\ifnum\pst@cnta<\z@\pst@dimb=-\pst@dimb\fi%
\hbox to\z@{%
\ifshoworigin\hbox to \z@{\hss\pst@@@hlabel{\psk@Ox}\hss}\fi%
- \mmultido{\n=\psk@Ox+\psk@Dx}{\pst@cnta}{%
- \hskip\pst@dimb\hbox to \z@{\hss\pst@@@hlabel{\n}\hss}%
+ \mmultido{\nA=\psk@Ox+\psk@Dx}{\pst@cnta}{%
+ \hskip\pst@dimb\hbox to \z@{\hss%
+ \ifdim\nA pt=\z@ \pst@@@hlabel{0}\else\expandafter\pst@@@hlabel{\nA}\fi% prevent -0, doesn't work with \ifnum
+% \ifnum\nA=0 \pst@@@hlabel{0}\else\expandafter\pst@@@hlabel{\nA}\fi
+ \hss}%
}\hss%
}%
\ifdim\pst@dimd>\z@\vss\else\vskip\pst@dimm\fi%
@@ -2004,14 +2043,16 @@
\pst@@@vlabel{\psk@Oy}%
\ifdim\pst@dimc>\z@\hskip\pst@dimm\else\hss\fi}\vss}%
\fi%
- \mmultido{\n=\psk@Oy+\psk@Dy}{\pst@cnta}{%
+ \mmultido{\nA=\psk@Oy+\psk@Dy}{\pst@cnta}{%
\vbox to\pst@dima{\vss}
\vbox to \z@{%
\vss\hbox to\z@{%
\ifdim\pst@dimc>\z@%
- \hss\pst@@@vlabel{\n}\hskip\pst@dimm%
+ \hss\pst@@@vlabel{\nA}\hskip\pst@dimm%
\else%
- \hskip\pst@dimm\pst@@@vlabel{\n}\hss%
+ \hskip\pst@dimm%\ifnum\nA=0 \pst@@@vlabel{0}\else\pst@@@vlabel{\nA}\fi
+ \ifdim\nA pt=\z@ \pst@@@vlabel{0}\else\pst@@@vlabel{\nA}\fi% prevent -0, doesn't work with \ifnum
+ \hss%
\fi
}\vss%
}}%