[pstricks] Math expressions?

Herbert Voss LaTeX at ZEDAT.FU-Berlin.DE
Wed Nov 22 10:35:56 CET 2006


Johan Ekh schrieb:

> How can I use mathematical expressions and variables when drawing lines
> and
> curves?
> I'd like to do something like:
>
> angleB=45
> \psarc[par](x,y){r}{angleA}{0.5*angleB+30}

you have to disable the angle check.

\documentclass{minimal}
\usepackage{pstricks}
\parindent=0pt

\makeatletter
\def\pst at getangle#1#2{\def#2{#1}}
\makeatother

\begin{document}

\def\angleA{0 }% space after value
\def\angleB{45 }
\begin{pspicture}(5,5)
\psarc[linecolor=red,showpoints=true](0,0){3}{ \angleA }{ \angleB 0.5 mul
30 add }
\end{pspicture}

\end{document}


Maybe we should have a general boolean noAngleCheck for that ...

Herbert




More information about the PSTricks mailing list