[texhax] pstricks, or postscript, question

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Wed Mar 12 19:57:07 CET 2008


Is there a way to create a macro which can be used inside a pspicture  
environment which calls pstricks macros but calculates some  
parameters from its arguments?

I am trying to create a macro to draw a figure which includes an  
elliptic arc whose beginning and ending angles are computed from the  
arguments of the macro.  But it seems I cannot do something like
	\ellipticarc(0,0)(0.5,1){180 45 sub}{180 45 add}
(never mind substituting #1 or #2 for the "45" above)---I get an  
error message:
	bad number: '180 45 sub' . 0 substituted.

Is there a way in postscript to name a number, compute its value, and  
then use it as a parameter
in a drawing command?

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20080312/7778e2ea/attachment.html 


More information about the texhax mailing list