[pstricks] Exiting a parametricplot

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Nov 22 23:38:37 CET 2008


Herbert Voss schrieb:
> Poul Riis schrieb:
>> How can I exit a parametricplot. The example below works only if I remove
>> zz 0 lt {exit} if
>> from the \parametricplot command.
> 
> you have to be inside the loop. The reason why you have to
> put the exit if in \parametric at ii and use plotstyle=line
> 
> 
> \documentclass[a4paper,12pt]{article}
> \usepackage{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage[danish]{babel}
> \usepackage{amsmath}
> \usepackage[usenames,dvipsnames,x11names]{xcolor}
> \usepackage{ifthen}
> \usepackage{geometry}
> \usepackage{multido}
> \usepackage{pst-func}
> \usepackage{pstricks-add}

Poul,
the pstricks-add.tex version from http://perce.de/LaTeX/pstricks-add
defines the variable ps at Exit. Then you do not need the following
redefinition of \def\parametricplot at ii{%
In your code you need only a statement like
..  { /ps at Exit true def } if

Herbert

> \makeatletter
> \def\parametricplot at ii{%
>     \addto at pscode{%
>       /psExit false def
>       xy \@nameuse{beginqp@\psplotstyle}
>       \psk at plotpoints 1 sub {
>         /t t dt add def
>         xy \@nameuse{doqp@\psplotstyle}
>         psExit pstack { exit } if
>       } repeat
>       psExit not {
>         /t t1 def
>         xy \@nameuse{doqp@\psplotstyle}
>       } if }%
>   \@nameuse{endqp@\psplotstyle}}
> \makeatother


More information about the PSTricks mailing list