root/trunk/pst-map3d/pstricks.tex

Revision 5, 93.3 kB (checked in by jms, 8 months ago)

Déplacement des fichiers de Manuel dans le répertoire pst-map3d.

Line 
1 %% pstricks.tex
2 %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
3 %% COPYRIGHT 2000-2003 by Denis Girou.
4 %% Copyright 2004-2008 Herbert Voss
5 %
6 % This work may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either version 1.3
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in
10 %   http://www.latex-project.org/lppl.txt
11 % and version 1.3 or later is part of all distributions of LaTeX
12 % version 2003/12/01 or later.
13 %
14 % This work has the LPPL maintenance status "maintained".
15 %
16 % This Current Maintainer of this work is Herbert Voss
17 %
18 % This work consists of the file pstricks.tex, PostScript macros
19 % for Generic TeX.
20 % See the PSTricks User's Guide for description.
21 % This uses the header file `pstricks.pro'.
22 %
23 \def\fileversion{1.20}
24 \def\filedate{2008/01/01}
25 %
26 \csname PSTricksLoaded\endcsname
27 \let\PSTricksLoaded\endinput
28 \edef\PstAtCode{\the\catcode`\@}
29 \catcode`\@=11\relax
30 \expandafter\ifx\csname @latexerr\endcsname\relax
31 \long\def\@ifundefined#1#2#3{\expandafter\ifx\csname
32   #1\endcsname\relax#2\else#3\fi}
33 \def\@namedef#1{\expandafter\def\csname #1\endcsname}
34 \def\@nameuse#1{\csname #1\endcsname}
35 %
36 \def\@eha{%
37   Your command was ignored.^^J
38   Type \space I <command> <return> \space to replace
39   it with another command,^^J
40   or \space <return> \space to continue without it.}
41 \def\@spaces{\space\space\space\space}
42 \def\typeout#1{\immediate\write\@unused{#1}}
43 \alloc@7\write\chardef\sixt@@n\@unused
44 \def\@empty{}
45 \def\@gobble#1{}
46 \def\@nnil{\@nil}
47 %
48 \def\@ifnextchar#1#2#3{%
49   \let\@tempe#1\def\@tempa{#2}\def\@tempb{#3}\futurelet\@tempc\@ifnch}
50 %
51 \def\@ifnch{%
52   \ifx\@tempc\@sptoken \let\@tempd\@xifnch
53   \else\ifx\@tempc\@tempe \let\@tempd\@tempa \else \let\@tempd\@tempb \fi
54   \fi
55   \@tempd}
56 %
57 \begingroup
58 \def\:{\global\let\@sptoken= } \:
59 \def\:{\@xifnch} \expandafter\gdef\: {\futurelet\@tempc\@ifnch}
60 \endgroup
61 \fi
62 %
63 % hv 2007-10-16 to fix the bug in pst-node with \\[name=...]
64 \def\ps@ifnextchar#1#2#3{%
65   \let\reserved@d= #1%
66   \def\reserved@a{#2}\def\reserved@b{#3}%
67   \futurelet\@let@token\ps@ifnch}
68 \def\ps@ifnch{%
69   \ifx\@let@token\reserved@d \let\reserved@b\reserved@a \fi
70   \reserved@b
71 }
72 % end bugfix
73 \typeout{`PSTricks' v\fileversion\space\space <\filedate> (tvz)}
74 \def\@pstrickserr#1#2{%
75   \begingroup
76   \newlinechar`\^^J
77   \edef\pst@tempc{#2}%
78   \expandafter\errhelp\expandafter{\pst@tempc}%
79   \typeout{%
80     PSTricks error. \space See User's Guide for further information.^^J
81     \@spaces\@spaces\@spaces\@spaces
82     Type \space H <return> \space for immediate help.}%
83   \errmessage{#1}%
84   \endgroup}
85 \def\@ehpa{%
86   Your command was ignored. Default value substituted.^^J
87   Type \space <return> \space to procede.}
88 \def\@ehpb{%
89   Your command was ignored. Will recover best I can.^^J
90   Type \space <return> \space to procede.}
91 \def\@ehpc{%
92   You better fix this before proceding.^^J
93   See the PSTricks User's Guide or ask your system administrator for help.^^J
94   Type \space X <return> \space to quit.}
95 \def\pst@misplaced#1{\@pstrickserr{Misplaced \string#1 command}\@ehpb}
96 \newdimen\pst@dima
97 \newdimen\pst@dimb
98 \newdimen\pst@dimc
99 \newdimen\pst@dimd
100 \newdimen\pst@dimg
101 \newdimen\pst@dimh
102 \newbox\pst@hbox
103 \newbox\pst@boxg
104 \newcount\pst@cnta
105 \newcount\pst@cntb
106 \newcount\pst@cntc
107 \newcount\pst@cntd
108 \newcount\pst@cntg
109 \newcount\pst@cnth
110 \newif\if@pst
111 \newtoks\pst@toks
112 \newif\if@star
113 \def\pst@ifstar#1{%
114   \@ifnextchar*{\@startrue\def\next*{#1}\next}{\@starfalse#1}}
115 \def\pst@expandafter#1#2{%
116   \def\next{#1}%
117   \edef\@tempa{#2}%
118   \ifx\@tempa\@empty
119     \@pstrickserr{Unexpected empty argument!}\@ehpb
120     \def\@tempa{\@empty}%
121   \fi
122   \expandafter\next\@tempa}
123 \def\pst@dimtonum#1#2{\edef#2{\pst@@dimtonum#1}}
124 \def\pst@@dimtonum#1{\expandafter\pst@@@dimtonum\the#1}
125 {\catcode`\p=12 \catcode`\t=12 \global\@namedef{pst@@@dimtonum}#1pt{#1}}
126 %
127 \def\pst@pyth#1#2#3{% from pst-3d
128   \begingroup
129     \pst@dima=#1\relax
130     \ifnum\pst@dima<\z@\pst@dima=-\pst@dima\fi  % dima=abs(x)
131     \pst@dimb=#2\relax
132     \ifnum\pst@dimb<\z@\pst@dimb=-\pst@dimb\fi  % dimb=abs(y)
133     \advance\pst@dimb\pst@dima         % dimb=s=abs(x)+abs(y)
134     \ifnum\pst@dimb=\z@
135       \global\pst@dimg=\z@             % dimg=z=sqrt(x^2+y^2)
136     \else
137       \multiply\pst@dima 8\relax              % dima= 8abs(x)
138       \pst@@divide\pst@dima\pst@dimb     % dimg =8t=8abs(x)/s
139       \advance\pst@dimg -4pt            % dimg = 4tau = (8t-4)
140       \multiply\pst@dimg 2
141       \pst@dimtonum\pst@dimg\pst@tempa
142       \pst@dima=\pst@tempa\pst@dimg           % dima=(8tau)^2
143       \advance\pst@dima 64pt         % dima=u=[64+(8tau)^2]/2
144       \divide\pst@dima 2\relax                      % =(8f)^2
145       \pst@dimd=7pt                % initial guess at sqrt(u)
146       \pst@@pyth\pst@@pyth\pst@@pyth            % dimd=sqrt(u)
147       \pst@dimtonum\pst@dimd\pst@tempa
148       \pst@dimg=\pst@tempa\pst@dimb
149       \global\divide\pst@dimg 8             % dimg=z=(8f)*s/8
150     \fi
151   \endgroup
152   #3=\pst@dimg}
153 \def\pst@@pyth{%                      dimd = g <-- (g + u/g)/2
154   \pst@@divide\pst@dima\pst@dimd
155   \advance\pst@dimd\pst@dimg
156   \divide\pst@dimd 2\relax}
157 %
158 % ----- the old pst@pyth begin -----
159 \iffalse
160 \def\pst@pyth#1#2#3{\ifdim#1>#2\pst@@pyth#1#2#3\else\pst@@pyth#2#1#3\fi}
161 \def\pst@@pyth#1#2#3{%
162   \ifdim4#1>9#2%
163     #3=#1\advance#3 .2122#2%
164   \else
165     #3=.8384#1\advance#3 .5758#2%
166   \fi%
167 }
168 \fi
169 % ----- the old pst@pyth end -----
170 %
171 \def\pst@divide#1#2#3{%
172   \pst@@divide{#1}{#2}%
173   \pst@dimtonum\pst@dimg{#3}%
174 }
175 \def\pst@@divide#1#2{%
176   \pst@dimg=#1\relax
177   \pst@dimh=#2\relax
178   \pst@cntg=\pst@dimh
179   \pst@cnth=67108863
180   \pst@@@divide\pst@@@divide\pst@@@divide\pst@@@divide
181   \divide\pst@dimg\pst@cntg%
182 }
183 \def\pst@@@divide{%
184   \ifnum
185     \ifnum\pst@dimg<\z@-\fi\pst@dimg<\pst@cnth
186       \multiply\pst@dimg\sixt@@n
187     \else
188       \divide\pst@cntg\sixt@@n
189     \fi%
190 }
191 \def\pst@configerr#1{%
192   \@pstrickserr{\string#1 not defined in pstricks.con}\@ehpc}
193 %
194 \def\pstVerb#1{\pst@configerr\pstVerb}
195 \def\pstverb#1{\pst@configerr\pstverb}
196 \def\pstverbscale{\pst@configerr\pstverbscale}
197 \def\pstrotate{\pst@configerr\pstrotate}
198 \def\pstheader#1{\pst@configerr\pstheader}
199 \def\pstdriver{\pst@configerr\pstdriver}
200 \@ifundefined{pstcustomize}%
201 {\def\pstcustomize{\endinput\let\pstcustomize\relax}}{}
202 %
203 \input pstricks.con             % local config file
204 %
205 \newif\ifPSTricks
206 \PSTrickstrue
207 \def\PSTricksOff{%
208   \def\pstheader##1{}%
209   \def\pstverb##1{}%
210   \def\pstVerb##1{}%
211   \PSTricksfalse%
212 }
213 \@ifundefined{pst@def}{\def\pst@def#1<#2>{\@namedef{tx@#1}{#2 }}}{}
214 \@ifundefined{pst@ATH}{\def\pst@ATH<#1>{}}{}
215 %
216 \pstheader{pstricks.pro}
217 \pstheader{pst-algparser.pro}
218 %
219 \def\pst@dict{tx@Dict begin }
220 \def\pst@theheaders{pstricks.pro}
221 \def\pst@Verb#1{\pstVerb{\pst@dict #1 end}}
222 \def\tx@Atan{Atan }
223 \def\tx@Div{Div }
224 \def\tx@NET{NET }
225 \def\tx@Pyth{Pyth }
226 \def\tx@PtoC{PtoC }
227 \def\tx@PathLength@{PathLength@ }
228 \def\tx@PathLength{PathLength }
229 \pst@dimg=\pstunit\relax
230 \ifdim\pst@dimg=1bp
231 \def\pst@stp{.996264 dup scale}
232 \else
233 \edef\pst@stp{1 \pst@@dimtonum\pst@dimg\space div dup scale}
234 \fi
235 \def\tx@STP{STP }
236 \def\tx@STV{STV }
237 %
238 %--------------------------------------- PS stuff ---------------------------------
239 % on stack x y
240 \pst@def{UserCoor}< \pst@number\psyunit div exch \pst@number\psxunit div exch >
241 \pst@def{ScreenCoor}< \pst@number\psyunit mul exch \pst@number\psxunit mul exch >
242 %--------------------------------------- PS stuff end -----------------------------
243 %
244 \def\pst@number#1{\pst@@dimtonum#1\space}
245 \def\pst@checknum#1#2{%
246   \edef\next{#1}%
247   \ifx\next\@empty
248     \let\pst@num\z@
249   \else
250     \expandafter\pst@@checknum\next..\@nil
251   \fi
252   \ifnum\pst@num=\z@
253     \@pstrickserr{Bad number: `#1'. 0 substituted.}\@ehpa
254     \def#2{0 }%
255   \else
256     \edef#2{\ifnum\pst@num=\tw@-\fi\the\pst@cntg.%
257     \expandafter\@gobble\the\pst@cnth\space}%
258   \fi}
259 \def\pst@@checknum{%
260   \@ifnextchar-%
261   {\let\pst@num\tw@\expandafter\pst@@@checknum\@gobble}%
262   {\let\pst@num\@ne\pst@@@checknum}%
263 }
264 %
265 \def\pst@@@checknum#1.#2.#3\@nil{%
266 \afterassignment\pst@@@@checknum\pst@cntg=0#1\relax\@nil
267 \afterassignment\pst@@@@checknum\pst@cnth=1#2\relax\@nil}
268 \def\pst@@@@checknum#1\relax\@nil{%
269 \ifx\@nil#1\@nil\else\let\pst@num\z@\fi}
270 \def\pst@getnumii#1 #2 #3\@nil{%
271 \pst@checknum{#1}\pst@tempg
272 \pst@checknum{#2}\pst@temph}
273 \def\pst@getnumiii#1 #2 #3 #4\@nil{%
274 \pst@checknum{#1}\pst@tempg
275 \pst@checknum{#2}\pst@temph
276 \pst@checknum{#3}\pst@tempi}
277 \def\pst@getnumiv#1 #2 #3 #4 #5\@nil{%
278 \pst@checknum{#1}\pst@tempg
279 \pst@checknum{#2}\pst@temph
280 \pst@checknum{#3}\pst@tempi
281 \pst@checknum{#4}\pst@tempj}
282 \def\pst@getdimnum#1 #2 #3\@nil{%
283   \pssetlength\pst@dimg{#1}%
284   \pst@checknum{#2}\pst@tempg%
285 }
286 % DG/SR modification begin - Jan. 7, 1998 - Patch 9
287 % Missing from pstricks.bug 0.93
288 %\def\pst@getscale#1#2{%
289 %\pst@expandafter\pst@getnumii{#1 #1} {} {} {}\@nil
290 %\@psttrue
291 %\ifdim\pst@tempg\p@=\z@
292 %\@pstrickserr{Bad scaling argument `#1'}\@ehpa
293 %\def\pst@tempg{1 }%
294 %\@pstfalse
295 %\fi
296 %\ifdim\pst@temph\p@=\z@
297 %\if@pst\@pstrickserr{Bad scaling argument `#1'}\@ehpa\fi
298 %\def\pst@temph{1 }%
299 %\fi
300 %\edef#2{\pst@tempg\space \pst@temph\space scale }%
301 %\ifdim\pst@tempg\p@=\p@ \ifdim\pst@temph\p@=\p@
302 %\def#2{}%
303 %\fi\fi}
304 \def\pst@getscale#1#2{% read and check a scale input x [y]
305   \edef\pst@tempg{#1}%
306   \ifx\pst@tempg\@none
307     \def#2{}%
308   \else
309     \pst@expandafter\pst@getnumii{#1 #1} {} {} {}\@nil
310     \ifdim\pst@tempg\p@=\z@
311       \@pstrickserr{Bad scaling argument `#1'}\@ehpa
312       \def#2{}%
313     \else
314       \ifdim\pst@temph\p@=\z@
315         \@pstrickserr{Bad scaling argument `#1'}\@ehpa
316         \def#2{}%
317       \else
318         \edef#2{\pst@tempg\space \pst@temph\space scale }%
319       \fi
320     \fi
321   \fi%
322 }
323 % DG/SR modification end
324 \def\pst@getint#1#2{%   read and check an integer
325   \pst@cntg=#1\relax
326   \edef#2{\the\pst@cntg\space}%
327 }
328 \begingroup
329 \catcode`\{=12
330 \catcode`\}=12
331 \catcode`\[=1
332 \catcode`\]=2
333 \gdef\pslbrace[{ ]
334 \gdef\psrbrace[} ]
335 \endgroup
336 \def\@newcolor#1#2{%
337 \expandafter\edef\csname #1\endcsname{\noexpand\pst@color{#2}}%
338 %\expandafter\edef\csname color@#1\endcsname{#2}%
339 \expandafter\edef\csname\string\color@#1\endcsname{#2}%    hv 1.14 2005-12-17
340 \ignorespaces}
341 \def\pst@color#1{%
342 \def\pst@currentcolor{#1}\pstVerb{#1}\aftergroup\pst@endcolor}
343 \def\pst@endcolor{\pstVerb{\pst@currentcolor}}
344 \def\pst@currentcolor{0 setgray}
345 \def\altcolormode{%
346 \def\pst@color##1{%
347 \pstVerb{gsave ##1}\aftergroup\pst@endcolor}%
348 \def\pst@endcolor{\pstVerb{\pst@grestore}}}
349 \def\pst@grestore{%
350   currentpoint
351   matrix currentmatrix
352   currentfont
353   grestore
354   setfont
355   setmatrix
356   moveto
357 }
358 %\def\pst@usecolor#1{\csname color@#1\endcsname\space}%    hv 1.14  2005--12-17
359 \def\pst@usecolor#1{\csname\string\color@#1\endcsname\space}
360 %
361 \def\newgray#1#2{%
362   \pst@checknum{#2}\pst@tempg
363   \@newcolor{#1}{\pst@tempg setgray}}
364 \def\newrgbcolor#1#2{%
365   \pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
366   \@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi setrgbcolor}}
367 \def\newhsbcolor#1#2{%
368   \pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
369   \@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi sethsbcolor}}
370 \def\newcmykcolor#1#2{%
371   \pst@expandafter\pst@getnumiv{#2} {} {} {} {} {}\@nil
372   \@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi \pst@tempj setcmykcolor}}
373 \newgray{black}{0}
374 \newgray{darkgray}{.25}
375 \newgray{gray}{.5}
376 \newgray{lightgray}{.75}
377 \newgray{white}{1}
378 \newrgbcolor{red}{1 0 0}
379 \newrgbcolor{green}{0 1 0}
380 \newrgbcolor{blue}{0 0 1}
381 \newrgbcolor{yellow}{1 1 0}
382 \newrgbcolor{cyan}{0 1 1}
383 \newrgbcolor{magenta}{1 0 1}
384 \def\psset#1{\@psset#1,\@nil\ignorespaces}
385 \def\@psset#1,{%
386   \@@psset#1==\@nil%
387   \@ifnextchar\@nil{\@gobble}{\@psset}%
388 }
389 \def\@@psset#1=#2=#3\@nil{%
390   \@ifundefined{psset@#1}%
391     {\@pstrickserr{Graphics parameter `#1' not defined.}\@ehpa}%
392     {\@nameuse{psset@#1}{#2}}%
393 }%
394 \def\psset@style#1{%
395   \@ifundefined{pscs@#1}%
396     {\@pstrickserr{Custom style `#1' undefined}\@ehpa}%
397     {\@nameuse{pscs@#1}}%
398 }
399 %\def\newpsstyle#1#2{\@namedef{pscs@#1}{\psset{#2}}}
400 %------------ hv 1.10 beg -------------------
401 \def\newpsstyle#1#2{\@namedef{pscs@#1}{%
402   \def\pst@tempA{#2}%
403   \ifx\pst@tempA\@empty\else\psset{#2}\fi}}
404 %------------ hv 1.10 end -------------------
405 %------------ hv 1.16 begin -------------------
406 \def\addto@psstyle#1#2{%
407     \pst@toks=\expandafter{#1#2}%
408     \edef#1{\the\pst@toks}}
409 \def\addtopsstyle#1#2{%
410   \def\pst@tempA{#2}%
411   \ifx\pst@tempA\@empty\else
412     \@ifundefined{pscs@#1}%
413       {\newpsstyle{#1}{#2}}%
414       {\expandafter\addto@psstyle\csname pscs@#1\endcsname{\psset{#2}}}%
415   \fi}
416 %------------ hv 1.16 end -------------------
417 %
418 \def\@none{none}
419 \def\pst@getcolor#1#2{%
420 %  \@ifundefined{color@#1}%     hv 1.14  2005-12-17
421   \@ifundefined{\string\color@#1}%
422     {\@pstrickserr{Color `#1' not defined}\@eha}%
423     {\edef#2{#1}}%
424 }
425 \newdimen\psunit \psunit 1cm
426 \newdimen\psxunit \psxunit 1cm
427 \newdimen\psyunit \psyunit 1cm
428 \let\psrunit\psunit
429 %
430 \def\pstunit@off{\let\@psunit\ignorespaces\ignorespaces}
431 %
432 \def\pssetlength#1#2{%
433   \let\@psunit\psunit
434   \afterassignment\pstunit@off
435   #1 #2\@psunit%
436 }
437 \def\psaddtolength#1#2{%
438   \let\@psunit\psunit
439   \afterassignment\pstunit@off
440   \advance#1 #2\@psunit%
441 }
442 \def\pssetxlength#1#2{%
443   \let\@psunit\psxunit
444   \afterassignment\pstunit@off
445   #1 #2\@psunit%
446 }
447 \def\pssetylength#1#2{%
448   \let\@psunit\psyunit
449   \afterassignment\pstunit@off
450   #1 #2\@psunit%
451 }
452 \def\psset@unit#1{%
453   \pssetlength\psunit{#1}%
454   \psxunit=\psunit
455   \psyunit=\psunit%
456 }
457 \def\psset@runit#1{\pssetlength\psrunit{#1}}
458 \def\psset@xunit#1{\pssetxlength\psxunit{#1}}
459 \def\psset@yunit#1{\pssetylength\psyunit{#1}}
460 % v 1.05   begin
461 \def\psset@PstDebug#1{\pst@getint{#1}{\Pst@Debug}}% hv 2004-06-22
462 \psset{PstDebug=0}
463 % end
464 \def\pst@getlength#1#2{%
465   \pssetlength\pst@dimg{#1}%
466   \edef#2{\pst@number\pst@dimg}%
467 }
468 \def\pst@@getlength#1#2{%
469   \pssetlength\pst@dimg{#1}%
470   \edef#2{\number\pst@dimg sp}%
471 }
472 \def\pst@getcoor#1#2{\pst@@getcoor{#1}\let#2\pst@coor}
473 \def\pst@coor{0 0 }
474 \def\pst@getcoors#1#2{%
475   \def\pst@aftercoors{\addto@pscode{#1 \pst@coors }#2}%
476   \def\pst@coors{}%
477   \pst@@getcoors%
478 }
479 \def\pst@@getcoors(#1){%
480   \pst@@getcoor{#1}%
481   \edef\pst@coors{\pst@coor\pst@coors}%
482   \@ifnextchar({\pst@@getcoors}{\pst@aftercoors}%
483 }
484 \def\pst@getangle#1#2{\pst@@getangle{#1}\let#2\pst@angle}
485 \def\pst@angle{0 }
486 \def\cartesian@coor#1,#2,#3\@nil{%
487   \pssetxlength\pst@dimg{#1}%
488   \pssetylength\pst@dimh{#2}%
489   \edef\pst@coor{\pst@number\pst@dimg \pst@number\pst@dimh}%
490 }
491 \def\NormalCoor{%
492   \def\pst@@getcoor##1{\pst@expandafter\cartesian@coor{##1},\relax,\@nil}%
493   \def\pst@@getangle##1{%
494     \pst@checknum{##1}\pst@angle%
495     \edef\pst@angle{\pst@angle \pst@angleunit}%
496   }%
497   \def\psput@##1{\pst@@getcoor{##1}\leavevmode\psput@cartesian}%
498 }
499 \NormalCoor
500 \def\degrees{\@ifnextchar[{\@degrees}{\def\pst@angleunit{}}}
501 \def\@degrees[#1]{%
502   \pst@checknum{#1}\pst@tempg
503   \edef\pst@angleunit{360 \pst@tempg div mul }%
504   \ignorespaces}
505 \def\radians{\def\pst@angleunit{57.2956 mul }}
506 \def\pst@angleunit{}
507 \def\SpecialCoor{%
508   \def\pst@@getcoor##1{%
509     \begingroup%
510       \pst@activecoor%
511       \xdef\pst@tempg{##1}%
512     \endgroup%
513     \expandafter\special@coor\pst@tempg||\@nil%
514   }%
515 \def\pst@@getangle##1{%
516     \begingroup%
517       \pst@activecoor%
518       \xdef\pst@tempg{##1}%
519     \endgroup%
520     \expandafter\special@angle\pst@tempg\@empty)\@nil%
521   }%
522   \def\psput@##1{\pst@@getcoor{##1}\leavevmode\psput@special}%
523 }
524 \begingroup
525 \catcode`\|=13
526 \catcode`\;=13
527 \catcode`\!=13
528 \catcode`\*=13
529 \gdef\pst@activecoor{%
530   \def|{\string|}%
531   \def;{\string;}%
532   \def!{\string!}%
533   \def*{\string*}%                      algebraic expression hv 2007-11-17
534 }
535 \endgroup
536 \def\special@coor#1|#2|#3\@nil{%
537   \ifx#3|\relax
538     \mixed@coor{#1}{#2}%
539   \else
540     \special@@coor#1;;\@nil
541   \fi%
542 }
543 \def\special@@coor#1{%
544   \ifcat#1a\relax%                      node names should start with a letter
545     \def\next{\node@coor#1}%
546   \else
547     \ifx#1[\relax%                      special node coor: [..]A
548       \def\next{\Node@coor[}%
549     \else
550       \ifx#1!\relax%                    PostScript code: x y
551         \def\next{\raw@coor}%
552       \else
553         \ifx#1*\relax%                  algebraic PostScript code: x f(x)
554           \def\next{\alg@coor}%
555         \else
556           \def\next{\special@@@coor#1}%
557         \fi
558       \fi
559     \fi
560   \fi
561   \next%
562 }
563 \def\special@@@coor#1;#2;#3\@nil{%
564   \ifx#3;\relax
565     \polar@coor{#1}{#2}%
566   \else
567     \cartesian@coor#1,\relax,\@nil
568   \fi%
569 }
570 \def\mixed@coor#1#2{%
571   \begingroup%
572 % DG/SR modification begin - Oct. 27, 1997 - Patch 6
573 %\specialcoor@ii#1;;\@nil
574 %\let\pst@tempa\pst@coor
575 %\specialcoor@ii#2;;\@nil
576     \special@@coor#1;;\@nil%
577     \let\pst@tempa\pst@coor%
578     \special@@coor#2;;\@nil%
579 % DG/SR modification end
580     \xdef\pst@tempg{\pst@tempa pop \pst@coor exch pop }%
581   \endgroup%
582   \let\pst@coor\pst@tempg%
583 }
584 \def\polar@coor#1#2{%
585 %  \pssetlength\pst@dimg{#1}%
586   \pssetlength\pst@dimb{#1}%    hv 2007-10-16  g is already used in get@@angle
587   \pst@@getangle{#2}%
588 %  \edef\pst@coor{\pst@number\pst@dimg \pst@angle \tx@PtoC}%  dito
589   \edef\pst@coor{\pst@number\pst@dimb \pst@angle \tx@PtoC}%
590 }
591 \def\raw@coor#1;#2\@nil{%               PostScript code
592   \edef\pst@coor{%
593     #1 \pst@number\psyunit mul exch \pst@number\psxunit mul exch }%
594 }
595 \def\alg@coor#1 #2;#3\@nil{%            algebraicPostScript code
596   \edef\pst@coor{%
597     /x #1 def
598     /Func (#2) AlgParser cvx def
599     x Func
600     \pst@number\psyunit mul exch \pst@number\psxunit mul exch }%
601 }
602 \def\node@coor#1\@nil{%
603   \@pstrickserr{You must load `pst-node.tex' to use node coordinates.}\@ehps
604   \def\pst@coor{0 0 }%
605 }
606 \def\Node@coor{\node@coor}
607 \def\special@angle#1#2)#3\@<