<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Myriad Pro">Hi Patrick,<br>
<br>
you can do that within PSTricks like:<br>
<br>
\documentclass{article}<br>
\usepackage{pstricks,pstricks-add}<br>
\begin{document}<br>
<br>
\begin{pspicture}(-4,-4)(4,4)<br>
\psset{unit=1}<br>
\SpecialCoor<br>
<br>
\def\MyRadius{0.7}<br>
<br>
\pstVerb{/MyDiameter \MyRadius\space 2 mul def}<br>
\psline(\MyRadius,0)(!MyDiameter 0)<br>
\end{pspicture}<br>
\end{document}<br>
<br>
Regards,<br>
<br>
Juergen<br>
</font><br>
Patrick Drechsler wrote:
<blockquote cite="mid:873avgp3yw.fsf@pdrechsler.de" type="cite">
<pre wrap="">Hi,
how do I do simple arithmetics in tex and use them in pstricks?
I am thinking along the lines of:
\SpecialCoor%
\def\MyRadius{0.7cm}%
\def\MyDiameter{! \MyRadius 2 mul}%
%
\psline(\MyRadius,0)(\MyDiameter,0)
I know this will not work. I am wondering what the correct approach
would look like...
TIA,
Patrick
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="65">--
jürgen gilg
austr. 59
70376 stuttgart
tel 0711-59 27 88
e-mail <a class="moz-txt-link-abbreviated" href="mailto:gilg@acrotex.net">gilg@acrotex.net</a>
website <a class="moz-txt-link-abbreviated" href="http://www.acrotex.net">www.acrotex.net</a>
<a class="moz-txt-link-abbreviated" href="http://www.gilligan-online.de">www.gilligan-online.de</a>
<a class="moz-txt-link-abbreviated" href="http://www.brueckenkurs-physik.de">www.brueckenkurs-physik.de</a></pre>
</body>
</html>