Debian Codegraph @

texmf-dist/tex/latex/pmgraph/pmgraph.sty

raw
1 %% The following copyright notice and licensing information was added
2 %% by Clea F. Rees on behalf of Alexander Berdnikov on 2008/11/03.
3 %%
4 %% Copyright 1996 Alexander Berdnikov, Olga Grineva
5 %%
6 %% This file is part of pmgraph.
7 %%
8 %% pmgraph is free software: you can redistribute it and/or modify
9 %% it under the terms of the GNU General Public License as published by
10 %% the Free Software Foundation, either version 3 of the License, or
11 %% (at your option) any later version.
12 %%
13 %% pmgraph is distributed in the hope that it will be useful,
14 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
15 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 %% See the GNU General Public License for more details.
17 %%
18 %% You should have received a copy of the GNU General Public License
19 %% along with pmgraph. If not, see <http://www.gnu.org/licenses/>.
20
21 \chardef\oldatcatcode=\catcode`@
22 \catcode`@=11
23
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 %% PMGRAPH.STY --- intermediate version %%
26 %% of poor-man-graphics style %%
27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28
29 %
30 % save old LaTeX macro
31 %
32
33 \let\ltx@thinlines=\thinlines
34 \let\ltx@thicklines=\thicklines
35 \let\ltx@@getcirc=\@getcirc
36 \let\ltx@@circ=\@circ
37 \let\ltx@vector=\vector
38 \let\ltx@@svector=\@svector
39 \let\ltx@@getlarrow=\@getlarrow
40 \let\ltx@@gerlarrow=\@getrarrow
41
42
43
44 \newif\ifflag@thicklines
45
46 \newdimen\@dimenA
47 \newdimen\@dimenB
48 \newdimen\@dimenC
49 \newdimen\@dimenD
50
51 % this is \put(x,y) where <x> and <y> are dimensions
52 \def\@@put#1#2#3{\@killglue\raise#2\hbox to\z@{\hskip #1 #3\hss}}
53
54 % dashed or solid vertical line
55 \def\vdashline#1{%
56 \@setdashlength{#1}%
57 \ifnum \@dashcnt>0
58 \setbox\@dashbox\hbox{\vrule height \@dashdim
59 width \@wholewidth}%
60 \@tempcnta=0
61 \leavevmode
62 \lower \@dashdim \hbox{\kern -\@halfwidth
63 \vbox{\@whilenum \@tempcnta<\@dashcnt
64 \do{\copy\@dashbox \vskip\@tempdimb \advance\@tempcnta by 1}%
65 }}%
66 \else
67 \advance\@tempdima \@halfwidth
68 \ifdim \@tempdima>0pt
69 \leavevmode\kern -\@halfwidth
70 \vrule width \@wholewidth
71 height \@tempdima
72 depth \@halfwidth \relax
73 \fi
74 \fi
75 }
76
77 % dashed or solid horizontal line
78 \def\hdashline#1{%
79 \@setdashlength{#1}%
80 \ifnum \@dashcnt>0
81 \setbox\@dashbox\hbox{\vrule width \@dashdim
82 height \@halfwidth
83 depth \@halfwidth
84 \hskip \@tempdimb}%
85 \@tempcnta=0
86 \@whilenum \@tempcnta<\@dashcnt
87 \do{\copy\@dashbox \advance\@tempcnta by 1}%
88 \else
89 \advance\@tempdima \@wholewidth
90 \ifdim \@tempdima>0pt
91 \leavevmode\kern -\@halfwidth
92 \vrule width \@tempdima
93 height \@halfwidth
94 depth \@halfwidth \relax
95 \fi
96 \fi
97 }
98
99 % length of the line is in \@tempdima
100 % output : \@dashdim is the dash length,
101 % \@tempdimb is the dash space
102 % \@dashcnt is the number of dashes
103 \def\@setdashlength#1{%
104 \@dashdim=#1\unitlength
105 \@tempdimb=0.5\@tempdima \advance\@tempdimb by 0.5\@dashdim
106 \@dashcnt=\@tempdimb \@tempcnta=\@dashdim
107 \ifnum \@tempcnta>0
108 \divide\@dashcnt by \@tempcnta
109 \else
110 \@dashcnt=0
111 \fi
112 \advance\@dashcnt by -1
113 \ifnum \@dashcnt>0
114 \@tempdimb=-\@dashdim \multiply\@tempdimb by \@dashcnt
115 \advance\@tempdimb by \@tempdima \advance\@tempdimb by -\@dashdim
116 \divide\@tempdimb by \@dashcnt
117 \advance\@dashcnt by 1
118 \else
119 \@tempdimb=0pt\@dashcnt=0
120 \fi
121 }
122
123
124 %%%
125 %%% romb frame commands
126 %%%
127
128 \def\romb{\@ifnextchar[{\romb@}{\romb@[c]}}
129 \def\romb@[#1](#2,#3)#4{\csname romb@#1\endcsname(#2,#3){#4}}
130
131 \def\romb@r(#1,#2)#3{%
132 \put(-#3,0){\romb@c(#1,#2){#3}}
133 }
134
135 \def\romb@l(#1,#2)#3{%
136 \put(#3,0){\romb@c(#1,#2){#3}}
137 }
138
139 \def\romb@c(#1,#2)#3{%
140 \put(-#3,0){\line(#1,#2){#3}}
141 \put(-#3,0){\line(#1,-#2){#3}}
142 \put(#3,0){\line(-#1,#2){#3}}
143 \put(#3,0){\line(-#1,-#2){#3}}
144 }
145
146 \def\rombBox{\@ifnextchar[{\@rombBox}{\@rombBox[x]}}
147 \def\rombBoX{\@ifnextchar[{\@rombBoX}{\@rombBoX[x]}}
148 \def\rombBOX{\@ifnextchar[{\@rombBOX}{\@rombBOX[x]}}
149
150 \def\@rombBox[#1](#2,#3){%
151 \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@
152 \@HelpRomb{#2}{#3}{0}[#1]%
153 }\@makepicbox(#2,#3)}
154
155 \def\@rombBoX[#1](#2,#3){%
156 \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@
157 \@HelpRomb{#2}{#3}{0}[#1]%
158 \@HelpRomb{#2}{#3}{1}[#1]%
159 }\@makepicbox(#2,#3)}
160
161 \def\@rombBOX[#1](#2,#3){%
162 \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@
163 \@HelpRomb{#2}{#3}{0}[#1]%
164 \@HelpRomb{#2}{#3}{1}[#1]%
165 \@HelpRomb{#2}{#3}{2}[#1]%
166 }\@makepicbox(#2,#3)}
167
168 \def\@HelpRomb#1#2#3[#4]{\@makerombslope
169 \@dimenA=\@RombL\relax \multiply\@dimenA by #3 \@dimenB=\@dimenA
170 \multiply\@dimenA by \@xarg \multiply\@dimenB by \@yarg
171 \@dimenC=-\@dimenA \@dimenD=\@dimenC
172 \multiply\@dimenA by 2 \@dimenB=\@dimenA
173 \advance\@dimenA #1\unitlength \advance\@dimenB #2\unitlength
174 \if x#4 \@romblengthX
175 \else \if y#4 \@romblengthY
176 \else \if z#4 \@romblengthZ
177 \else \@romblengthX
178 \fi\fi\fi
179 \@makeromb}
180
181 \def\@makerombslope{%
182 \@xarg \@RombX\relax \@yarg \@RombY\relax
183 \ifnum \@xarg<0 \@xarg -\@xarg \fi
184 \ifnum \@yarg<0 \@yarg -\@yarg \fi
185 \ifnum \@xarg=0 \xarg 2 \@yarg 1 \fi
186 \ifnum \@yarg=0 \xarg 2 \@yarg 1 \fi
187 }
188
189 \def\@romblengthX{\@linelen=0.5\@dimenA}
190
191 \def\@romblengthY{\@linelen=0.5\@dimenB
192 \divide\@linelen by \@yarg \multiply\@linelen by \@xarg}
193
194 \def\@romblengthZ{\@romblengthY \advance\@linelen by 0.5\@dimenA}
195
196 % it is supposed that \@xarg and \@yarg are set to slope values,
197 % and \@linelen is equal to the length of the romb side
198 \def\@makeromb{%
199 \@makerombhlp \advance\@tempdima by -\@linelen
200 \@@put{\@tempdima}{\@tempdimb}{\@sline}%
201 \@yarg=-\@yarg
202 \@makerombhlp \advance\@tempdima by -\@linelen
203 \@@put{\@tempdima}{\@tempdimb}{\@sline}%
204 \@xarg=-\@xarg
205 \@makerombhlp \advance\@tempdima by \@linelen
206 \@@put{\@tempdima}{\@tempdimb}{\@sline}%
207 \@yarg=-\@yarg
208 \@makerombhlp \advance\@tempdima by \@linelen
209 \@@put{\@tempdima}{\@tempdimb}{\@sline}%
210 }
211
212 \def\@makerombhlp{\@tempdima=\@dimenC \@tempdimb=\@dimenD
213 \advance\@tempdima 0.5\@dimenA \advance\@tempdimb 0.5\@dimenB}
214
215 \def\rombboxstyle(#1,#2,#3){\def\@RombX{#1}%
216 \def\@RombY{#2}%
217 \def\@RombL{#3}%
218 \ignorespaces}
219
220 %%%
221 %%% rect frame commands
222 %%%
223
224 \def\frameBox{\@ifnextchar[{\@frameBox}{\@frameBox[]}}
225 \def\frameBoX{\@ifnextchar[{\@frameBoX}{\@frameBoX[]}}
226 \def\frameBOX{\@ifnextchar[{\@frameBOX}{\@frameBOX[]}}
227
228 \def\ovalBox{\@ifnextchar[{\@ovalBox}{\@ovalBox[]}}
229 \def\ovalBoX{\@ifnextchar[{\@ovalBoX}{\@ovalBoX[]}}
230 \def\ovalBOX{\@ifnextchar[{\@ovalBOX}{\@ovalBOX[]}}
231
232 \def\astroBox{\@ifnextchar[{\@astroBox}{\@astroBox[]}}
233 \def\astroBoX{\@ifnextchar[{\@astroBoX}{\@astroBoX[]}}
234 \def\astroBOX{\@ifnextchar[{\@astroBOX}{\@astroBOX[]}}
235
236 \def\parquetBox{\@ifnextchar[{\@parquetBox}{\@parquetBox[]}}
237 \def\parquetBoX{\@ifnextchar[{\@parquetBoX}{\@parquetBoX[]}}
238 \def\parquetBOX{\@ifnextchar[{\@parquetBOX}{\@parquetBOX[]}}
239
240 \def\octalBox{\@ifnextchar[{\@octalBox}{\@octalBox[]}}
241 \def\octalBoX{\@ifnextchar[{\@octalBoX}{\@octalBoX[]}}
242 \def\octalBOX{\@ifnextchar[{\@octalBOX}{\@octalBOX[]}}
243
244 \def\dashBox#1{\@ifnextchar[{\@dashBox{#1}}{\@dashBox{#1}[]}}
245 \def\dashBoX#1{\@ifnextchar[{\@dashBoX{#1}}{\@dashBoX{#1}[]}}
246 \def\dashBOX#1{\@ifnextchar[{\@dashBOX{#1}}{\@dashBOX{#1}[]}}
247
248 \def\userBox#1#2{\@ifnextchar[{\@userBox{#1}{#2}}{\@userBox{#1}{#2}[]}}
249 \def\userBoX#1#2{\@ifnextchar[{\@userBoX{#1}{#2}}{\@userBoX{#1}{#2}[]}}
250 \def\userBOX#1#2{\@ifnextchar[{\@userBOX{#1}{#2}}{\@userBOX{#1}{#2}[]}}
251
252 \def\@frameBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{r}}
253 \def\@frameBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{r}}
254 \def\@frameBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{r}}
255
256 \def\@ovalBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{O}}
257 \def\@ovalBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{O}}
258 \def\@ovalBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{O}}
259
260 \def\@astroBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{A}}
261 \def\@astroBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{A}}
262 \def\@astroBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{A}}
263
264 \def\@parquetBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{P}}
265 \def\@parquetBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{P}}
266 \def\@parquetBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{P}}
267
268 \def\@octalBox[#1](#2,#3){\@makeBox{#2}{#3}{#1}{0}{L}}
269 \def\@octalBoX[#1](#2,#3){\@makeBoX{#2}{#3}{#1}{0}{L}}
270 \def\@octalBOX[#1](#2,#3){\@makeBOX{#2}{#3}{#1}{0}{L}}
271
272 \def\@dashBox#1[#2](#3,#4){\@makeBox{#3}{#4}{#2}{#1}{r}}
273 \def\@dashBoX#1[#2](#3,#4){\@makeBoX{#3}{#4}{#2}{#1}{r}}
274 \def\@dashBOX#1[#2](#3,#4){\@makeBOX{#3}{#4}{#2}{#1}{r}}
275
276 \def\@userBox#1#2[#3](#4,#5){\@makeBox{#4}{#5}{#3}{#2}{#1}}
277 \def\@userBoX#1#2[#3](#4,#5){\@makeBoX{#4}{#5}{#3}{#2}{#1}}
278 \def\@userBOX#1#2[#3](#4,#5){\@makeBOX{#4}{#5}{#3}{#2}{#1}}
279
280 % #1 = x, #2 = y
281 % #3 = shadows
282 % #4 = dash line (real)
283 % #5 = frame style (,O,A,C,R,???)
284 %
285 \def\@makeBox#1#2#3#4#5{%
286 \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@
287 \@HelpFrame{#1}{#2}{0}{#3}{#4}{#5}%
288 }\@makepicbox(#1,#2)}
289 %
290 \def\@makeBoX#1#2#3#4#5{%
291 \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@
292 \ifdim \framesepH>\z@
293 \@HelpFrame{#1}{#2}{0}{}{#4}{#5}%
294 \@HelpFrame{#1}{#2}{1}{#3}{#4}{#5}%
295 \else
296 \@HelpFrame{#1}{#2}{1}{}{#4}{#5}%
297 \@HelpFrame{#1}{#2}{0}{#3}{#4}{#5}%
298 \fi}\@makepicbox(#1,#2)}
299 %
300 \def\@makeBOX#1#2#3#4#5{%
301 \leavevmode\hbox to\z@{\baselineskip \z@ \lineskip \z@
302 \ifdim \framesepH>\z@
303 \@HelpFrame{#1}{#2}{0}{}{#4}{#5}%
304 \@HelpFrame{#1}{#2}{1}{}{#4}{#5}%
305 \@HelpFrame{#1}{#2}{2}{#3}{#4}{#5}%
306 \else
307 \@HelpFrame{#1}{#2}{2}{}{#4}{#5}%
308 \@HelpFrame{#1}{#2}{1}{}{#4}{#5}%
309 \@HelpFrame{#1}{#2}{0}{#3}{#4}{#5}%
310 \fi}\@makepicbox(#1,#2)}
311
312 \def\@warn@corner{\@warning{Unable to draw corner}}
313
314 % #1 = x, #2 = y
315 % #3 = multiple frame
316 % #4 = list of shadows
317 % #5 = dash/solid line (real)
318 % #6 = frame corner style (,O,A,C,R,???)
319 %
320 \def\@HelpFrame#1#2#3#4#5#6{%
321 \@tempdima=\framesepH\relax \multiply\@tempdima by #3
322 \@dimenA=\framesepXM\@tempdima \@dimenB=\framesepYM\@tempdima
323 \@dimenC=-\@dimenA \@dimenD=-\@dimenB
324 \advance\@dimenA by \framesepXP\@tempdima
325 \advance\@dimenB by \framesepYP\@tempdima
326 \advance\@dimenA #1\unitlength \advance\@dimenB #2\unitlength
327 \advance\@dimenA by \frameexpandX\relax
328 \advance\@dimenB by \frameexpandY\relax
329 \@@makeframe{#5}{#6}%
330 \advance\@dimenA by 2\@wholewidth \advance\@dimenB by 2\@wholewidth
331 \advance\@dimenC by -\@wholewidth \advance\@dimenD by -\@wholewidth
332 \@setshadowsize
333 \@tfor \@tempa := #4 \do
334 {\@negargtrue
335 \ifdim \@dimenA>0pt \ifdim \@dimenB>0pt
336 \csname @rectshadow@\@tempa\endcsname{#5}%
337 \@updateshadowsize
338 \@negargfalse
339 \fi\fi
340 \if@negarg \@warning{Shadow position is wrong}\fi
341 }%
342 }
343
344 % in subsequent commands:
345 % \@dimenA is x-size of the box,
346 % \@dimenB is y-size of the box
347 % \@dimenC is x-shift, \@dimenD is y-shift
348
349 %
350 % standard corner
351 %
352 \def\@prepdummy{\@ovxx=0pt \@ovyy=0pt
353 \@ovdx=0pt \@ovdy=0pt
354 \@yyarg=0 \@negargtrue}
355
356 \def\@prepframe@R{\@prepdummy}
357 \def\tl@corner@R{}
358 \def\tr@corner@R{}
359 \def\bl@corner@R{}
360 \def\br@corner@R{}
361
362 %
363 % Oval corners
364 %
365 \def\@prepframe@O{%
366 \@tempdima=\RoundCorner\relax \@tempdima=2\@tempdima
367 \@negargtrue
368 \ifdim \@tempdima>\@dimenA \@negargfalse \fi
369 \ifdim \@tempdima>\@dimenB \@negargfalse \fi
370 \if@negarg
371 \@getcirc\@tempdima \@yyarg=\@tempcnta
372 \@ovxx=0.5\wd\@tempboxa \@ovyy=\@ovxx
373 \@tempdima=0.5\ht\@tempboxa \advance\@tempdima by -0.5\dp\@tempboxa
374 \@ovdx=\@halfwidth \advance\@ovdx by -\@tempdima \@ovdy=\@ovdx
375 \else
376 \@warn@corner
377 \fi
378 }
379
380 \def\tl@corner@O{\@@TLcircle}
381 \def\tr@corner@O{\@@TRcircle}
382 \def\bl@corner@O{\@@BLcircle}
383 \def\br@corner@O{\@@BRcircle}
384
385 %
386 % Astro corners
387 %
388 \def\@prepframe@A{\@prepframe@O}
389 \def\tl@corner@A{\@@brcircle}
390 \def\tr@corner@A{\@@blcircle}
391 \def\bl@corner@A{\@@trcircle}
392 \def\br@corner@A{\@@tlcircle}
393
394 %
395 % Parquet corners
396 %
397 \def\@prepframe@P{\@negargtrue
398 \@tempdima=\RectCorner\relax
399 \ifdim \@tempdima>0.5\@dimenA \@negargfalse \fi
400 \ifdim \@tempdima>0.5\@dimenB \@negargfalse \fi
401 \if@negarg
402 \@ovxx=\@tempdima \@ovyy=\@tempdima
403 \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth
404 \else
405 \@warn@corner
406 \fi
407 }
408 \def\tl@corner@P{%
409 \@tempdima=\@ovyy
410 \setbox\@tempboxa\hbox{\kern \@ovxx \raise -\@ovyy
411 \hbox{\vdashline{\@tempa}}}%
412 \wd\@tempboxa=0pt \copy\@tempboxa
413 \@tempdima=\@ovxx
414 \setbox\@tempboxa\hbox{\kern 0pt \raise -\@ovyy
415 \hbox{\hdashline{\@tempa}}}%
416 \wd\@tempboxa=0pt \copy\@tempboxa
417 \setbox\@tempboxa\hbox{}%
418 }
419 \def\tr@corner@P{%
420 \@tempdima=\@ovyy
421 \setbox\@tempboxa\hbox{\kern -\@ovxx \raise -\@ovyy
422 \hbox{\vdashline{\@tempa}}}%
423 \wd\@tempboxa=0pt \copy\@tempboxa
424 \@tempdima=\@ovxx
425 \setbox\@tempboxa\hbox{\kern -\@ovxx \raise -\@ovyy
426 \hbox{\hdashline{\@tempa}}}%
427 \wd\@tempboxa=0pt \copy\@tempboxa
428 \setbox\@tempboxa\hbox{}%
429 }
430 \def\bl@corner@P{%
431 \@tempdima=\@ovyy
432 \setbox\@tempboxa\hbox{\kern \@ovxx \raise 0pt
433 \hbox{\vdashline{\@tempa}}}%
434 \wd\@tempboxa=0pt \copy\@tempboxa
435 \@tempdima=\@ovxx
436 \setbox\@tempboxa\hbox{\kern 0pt \raise \@ovyy
437 \hbox{\hdashline{\@tempa}}}%
438 \wd\@tempboxa=0pt \copy\@tempboxa
439 \setbox\@tempboxa\hbox{}%
440 }
441 \def\br@corner@P{%
442 \@tempdima=\@ovyy
443 \setbox\@tempboxa\hbox{\kern -\@ovxx \raise 0pt
444 \hbox{\vdashline{\@tempa}}}%
445 \wd\@tempboxa=0pt \copy\@tempboxa
446 \@tempdima=\@ovxx
447 \setbox\@tempboxa\hbox{\kern -\@ovxx \raise \@ovyy
448 \hbox{\hdashline{\@tempa}}}%
449 \wd\@tempboxa=0pt \copy\@tempboxa
450 \setbox\@tempboxa\hbox{}%
451 }
452
453 %
454 % Ordinary corners: init= \def\@prepframe@D{\@prepframe@P}
455 %
456 \def\tl@corner@D{%
457 \@tempdima=\@ovyy
458 \setbox\@tempboxa\hbox{\raise -\@ovyy
459 \hbox{\vdashline{\@tempa}}}%
460 \wd\@tempboxa=0pt \copy\@tempboxa
461 \@tempdima=\@ovxx
462 \setbox\@tempboxa\hbox{\hdashline{\@tempa}}%
463 \wd\@tempboxa=0pt \copy\@tempboxa
464 \setbox\@tempboxa\hbox{}%
465 }
466 \def\tr@corner@D{%
467 \@tempdima=\@ovyy
468 \setbox\@tempboxa\hbox{\raise -\@ovyy
469 \hbox{\vdashline{\@tempa}}}%
470 \wd\@tempboxa=0pt \copy\@tempboxa
471 \@tempdima=\@ovxx
472 \setbox\@tempboxa\hbox{\kern -\@ovxx
473 \hbox{\hdashline{\@tempa}}}%
474 \wd\@tempboxa=0pt \copy\@tempboxa
475 \setbox\@tempboxa\hbox{}%
476 }
477 \def\bl@corner@D{%
478 \@tempdima=\@ovyy
479 \setbox\@tempboxa\hbox{\vdashline{\@tempa}}%
480 \wd\@tempboxa=0pt \copy\@tempboxa
481 \@tempdima=\@ovxx
482 \setbox\@tempboxa\hbox{\hdashline{\@tempa}}%
483 \wd\@tempboxa=0pt \copy\@tempboxa
484 \setbox\@tempboxa\hbox{}%
485 }
486 \def\br@corner@D{%
487 \@tempdima=\@ovyy
488 \setbox\@tempboxa\hbox{\vdashline{\@tempa}}%
489 \wd\@tempboxa=0pt \copy\@tempboxa
490 \@tempdima=\@ovxx
491 \setbox\@tempboxa\hbox{\kern -\@ovxx
492 \hbox{\hdashline{\@tempa}}}%
493 \wd\@tempboxa=0pt \copy\@tempboxa
494 \setbox\@tempboxa\hbox{}%
495 }
496
497 %
498 % Octal corners
499 %
500 \def\@prepframe@L{%
501 \@negargtrue
502 \ifnum \@RombX>0 \else \@negargfalse \fi
503 \ifnum \@RombY>0 \else \@negargfalse \fi
504 \if@negarg
505 \ifnum \@RombX>\@RombY
506 \@tempdima=\LineCorner\relax
507 \@tempdimb=\@tempdima
508 \multiply\@tempdimb by \@RombY
509 \divide\@tempdimb by \@RombX
510 \else
511 \@tempdimb=\LineCorner\relax
512 \@tempdima=\@tempdimb
513 \multiply\@tempdima by \@RombX
514 \divide\@tempdima by \@RombY
515 \fi
516 \ifdim \@tempdima>0.5\@dimenA \@negargfalse \fi
517 \ifdim \@tempdimb>0.5\@dimenB \@negargfalse \fi
518 \@ovxx=\@tempdima \@ovyy=\@tempdimb
519 \ifnum \@RombX>\@RombY
520 \ifdim \@ovxx<10pt \@negargfalse \fi
521 \else
522 \ifdim \@ovyy<10pt \@negargfalse \fi
523 \fi
524 \if@negarg
525 \@ovxx=\@tempdima \@ovyy=\@tempdimb
526 \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth
527 \else
528 \@warn@corner
529 \fi
530 \fi
531 }
532
533 \def\tl@corner@L{\@xarg=\@RombX \@yarg=\@RombY \@linelen=\@ovxx
534 \hbox{\raise -\@ovyy \hbox{\@sline}}}
535 \def\tr@corner@L{\@xarg=-\@RombX \@yarg=\@RombY \@linelen=\@ovxx
536 \hbox{\raise -\@ovyy \hbox{\@sline}}}
537 \def\bl@corner@L{\@xarg=\@RombX \@yarg=-\@RombY \@linelen=\@ovxx
538 \hbox{\raise \@ovyy \hbox{\@sline}}}
539 \def\br@corner@L{\@xarg=-\@RombX \@yarg=-\@RombY \@linelen=\@ovxx
540 \hbox{\raise \@ovyy \hbox{\@sline}}}
541
542 %
543 % Black box corners
544 %
545 \def\@prepframe@b{\@prepframe@P\@ovdx=0pt\@ovdy=0pt}
546 \def\tl@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth
547 \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth
548 \kern -\@halfwidth \raise -\@ovyy
549 \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}}
550 \def\tr@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth
551 \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth
552 \kern -\@ovxx \raise -\@ovyy
553 \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}}
554 \def\bl@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth
555 \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth
556 \kern -\@halfwidth \raise -\@halfwidth
557 \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}}
558 \def\br@corner@b{\@tempdima=\@ovxx \advance\@tempdima by \@halfwidth
559 \@tempdimb=\@ovyy \advance\@tempdimb by \@halfwidth
560 \kern -\@ovxx \raise -\@halfwidth
561 \hbox{\vrule height \@tempdimb depth 0pt width \@tempdima}}
562
563 %
564 % 0.75 Black box corners
565 %
566 \def\@prepframe@c{\@prepframe@P}
567 \def\tl@corner@c{\tl@corner@P\tl@corner@cc}
568 \def\tr@corner@c{\tr@corner@P\tr@corner@cc}
569 \def\bl@corner@c{\bl@corner@P\bl@corner@cc}
570 \def\br@corner@c{\br@corner@P\br@corner@cc}
571
572 \def\tl@corner@cc{%
573 \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth
574 \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth
575 \setbox\@tempboxa\hbox{\kern -\@halfwidth \raise -0.75\@ovyy
576 \hbox{\vrule width \@tempdima depth 0pt height \@tempdimb}}%
577 \wd\@tempboxa=0pt \copy\@tempboxa
578 }
579 \def\tr@corner@cc{%
580 \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth
581 \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth
582 \setbox\@tempboxa\hbox{\kern -0.75\@ovxx \raise -0.75\@ovyy
583 \hbox{\vrule width \@tempdima depth 0pt height \@tempdimb}}%
584 \wd\@tempboxa=0pt \copy\@tempboxa
585 }
586 \def\bl@corner@cc{%
587 \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth
588 \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth
589 \setbox\@tempboxa\hbox{\kern -\@halfwidth \raise -\@halfwidth
590 \hbox{\vrule width \@tempdima height \@tempdimb depth 0pt}}%
591 \wd\@tempboxa=0pt \copy\@tempboxa
592 }
593 \def\br@corner@cc{%
594 \@tempdima=0.75\@ovxx \advance\@tempdima by \@halfwidth
595 \@tempdimb=0.75\@ovyy \advance\@tempdimb by \@halfwidth
596 \setbox\@tempboxa\hbox{\kern -0.75\@ovxx \raise -\@halfwidth
597 \hbox{\vrule width \@tempdima height \@tempdimb depth 0pt}}%
598 \wd\@tempboxa=0pt \copy\@tempboxa
599 }
600
601 %
602 % 0.5 centered black box corners
603 %
604 \def\@prepframe@d{\@prepframe@P}
605 \def\tl@corner@d{\tl@corner@P\tl@corner@D\tl@corner@dd}
606 \def\tr@corner@d{\tr@corner@P\tr@corner@D\tr@corner@dd}
607 \def\bl@corner@d{\bl@corner@P\bl@corner@D\bl@corner@dd}
608 \def\br@corner@d{\br@corner@P\br@corner@D\br@corner@dd}
609
610 \def\@prepframe@e{\@prepframe@P}
611 \def\tl@corner@e{\tl@corner@D\tl@corner@dd}
612 \def\tr@corner@e{\tr@corner@D\tr@corner@dd}
613 \def\bl@corner@e{\bl@corner@D\bl@corner@dd}
614 \def\br@corner@e{\br@corner@D\br@corner@dd}
615
616 \def\@prepframe@f{\@prepframe@P}
617 \def\tl@corner@f{\tl@corner@P\tl@corner@dd}
618 \def\tr@corner@f{\tr@corner@P\tr@corner@dd}
619 \def\bl@corner@f{\bl@corner@P\bl@corner@dd}
620 \def\br@corner@f{\br@corner@P\br@corner@dd}
621
622 \def\tl@corner@dd{%
623 \@tempdima=0.25\@ovxx \advance\@tempdima by 0.5\@halfwidth
624 \@tempdimb=-0.75\@ovyy \advance\@tempdimb by -0.5\@halfwidth
625 \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb
626 \hbox{\vrule width 0.5\@ovxx depth 0pt height 0.5\@ovyy}}%
627 \wd\@tempboxa=0pt \copy\@tempboxa
628 }
629 \def\tr@corner@dd{%
630 \@tempdima=-0.75\@ovxx \advance\@tempdima by -0.5\@halfwidth
631 \@tempdimb=-0.75\@ovyy \advance\@tempdimb by -0.5\@halfwidth
632 \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb
633 \hbox{\vrule width 0.5\@ovxx depth 0pt height 0.5\@ovyy}}%
634 \wd\@tempboxa=0pt \copy\@tempboxa
635 }
636 \def\bl@corner@dd{%
637 \@tempdima=0.25\@ovxx \advance\@tempdima by 0.5\@halfwidth
638 \@tempdimb=0.25\@ovyy \advance\@tempdimb by 0.5\@halfwidth
639 \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb
640 \hbox{\vrule width 0.5\@ovxx height 0.5\@ovyy depth 0pt}}%
641 \wd\@tempboxa=0pt \copy\@tempboxa
642 }
643 \def\br@corner@dd{%
644 \@tempdima=-0.75\@ovxx \advance\@tempdima by -0.5\@halfwidth
645 \@tempdimb=0.25\@ovyy \advance\@tempdimb by 0.5\@halfwidth
646 \setbox\@tempboxa\hbox{\kern \@tempdima \raise \@tempdimb
647 \hbox{\vrule width 0.5\@ovxx height 0.5\@ovyy depth 0pt}}%
648 \wd\@tempboxa=0pt \copy\@tempboxa
649 }
650
651 %
652 % circle blobs at the corners
653 %
654 \def\@prepframe@o{\@tempdima=\DiskCorner\relax
655 \get@Disk\@tempdima
656 \if@negarg
657 \@yyarg=\@tempcnta \@ovxx=0.5\wd\@tempboxa
658 \@ovyy=\@ovxx \@ovdx=\@halfwidth \@ovdy=\@ovdx
659 \ifdim \@ovxx>0.25\@dimenA \@negargfalse \fi
660 \ifdim \@ovxx>0.25\@dimenB \@negargfalse \fi
661 \fi
662 \if@negarg \else \@warn@corner \fi
663 }
664 \def\tl@corner@o{%
665 \kern \@ovxx \raise -\@ovyy \hbox{\@circlefnt \char\@tempcnta}}
666 \def\tr@corner@o{%
667 \kern -\@ovxx \raise -\@ovyy \hbox{\@circlefnt \char\@tempcnta}}
668 \def\bl@corner@o{%
669 \kern \@ovxx \raise \@ovyy \hbox{\@circlefnt \char\@tempcnta}}
670 \def\br@corner@o{%
671 \kern -\@ovxx \raise \@ovyy \hbox{\@circlefnt \char\@tempcnta}}
672
673 %%%
674 %%% frame drawing routine
675 %%%
676
677 \def\@@makeframe#1#2{\@ovxx=0pt \@ovyy=0pt \@ovdx=0pt \@ovdy=0pt
678 \@yyarg=0 \@negargfalse
679 \csname @prepframe@#2\endcsname
680 \if@negarg
681 \def\@tempa{#1}%
682 \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth
683 \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth
684 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
685 \csname bl@corner@#2\endcsname}%
686 \@tempdima=\@dimenC \advance\@tempdima by \@halfwidth
687 \advance\@tempdima by \@dimenA
688 \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth
689 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
690 \csname br@corner@#2\endcsname}%
691 \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth
692 \@tempdimb=\@dimenD \advance\@tempdimb by \@halfwidth
693 \advance\@tempdimb by \@dimenB
694 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
695 \csname tl@corner@#2\endcsname}%
696 \@tempdima=\@dimenC \advance\@tempdima by \@halfwidth
697 \advance\@tempdima by \@dimenA
698 \@tempdimb=\@dimenD \advance\@tempdimb by \@halfwidth
699 \advance\@tempdimb by \@dimenB
700 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
701 \csname tr@corner@#2\endcsname}%
702 \fi
703 \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth
704 \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth
705 \advance\@tempdimb by \@ovyy
706 \advance\@tempdimb by \@ovdy
707 \@@put{\@tempdima}{\@tempdimb}{%
708 \@tempdima=\@dimenB \advance\@tempdima by \@wholewidth
709 \advance\@tempdima by -2\@ovyy
710 \advance\@tempdima by -2\@ovdy
711 \vdashline{#1}}%
712 \@tempdima=\@dimenC \advance\@tempdima by \@halfwidth
713 \advance\@tempdima by \@dimenA
714 \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth
715 \advance\@tempdimb by \@ovyy
716 \advance\@tempdimb by \@ovdy
717 \@@put{\@tempdima}{\@tempdimb}{%
718 \@tempdima=\@dimenB \advance\@tempdima by \@wholewidth
719 \advance\@tempdima by -2\@ovyy
720 \advance\@tempdima by -2\@ovdy
721 \vdashline{#1}}%
722 \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth
723 \advance\@tempdima by \@ovxx
724 \advance\@tempdima by \@ovdx
725 \@tempdimb=\@dimenD \advance\@tempdimb by -\@halfwidth
726 \@@put{\@tempdima}{\@tempdimb}{%
727 \@tempdima=\@dimenA \advance\@tempdima by \@wholewidth
728 \advance\@tempdima by -2\@ovxx
729 \advance\@tempdima by -2\@ovdx
730 \hdashline{#1}}%
731 \@tempdima=\@dimenC \advance\@tempdima by -\@halfwidth
732 \advance\@tempdima by \@ovxx
733 \advance\@tempdima by \@ovdx
734 \@tempdimb=\@dimenD \advance\@tempdimb by \@halfwidth
735 \advance\@tempdimb by \@dimenB
736 \@@put{\@tempdima}{\@tempdimb}{%
737 \@tempdima=\@dimenA \advance\@tempdima by \@wholewidth
738 \advance\@tempdima by -2\@ovxx
739 \advance\@tempdima by -2\@ovdx
740 \hdashline{#1}}%
741 }
742
743
744 %%%
745 %%% shadow drawing routines
746 %%%
747
748 %
749 % draw shadow corner(s)
750 %
751
752 \def\@HelpshadowA#1#2{%
753 \@tempdima=\@dimenC \@tempdimb=\@dimenD
754 \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX
755 \advance\@tempdimb by \@dimenB \advance\@tempdimb by -\@shadowstepY
756 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
757 \csname tr@corner@#2\endcsname}%
758 \@tempdima=\@dimenC \@tempdimb=\@dimenD
759 \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX
760 \advance\@tempdimb by -\@shadowsizeY
761 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
762 \csname br@corner@#2\endcsname}%
763 \@tempdima=\@dimenC \@tempdimb=\@dimenD
764 \advance\@tempdima by \@shadowstepX \advance\@tempdimb by -\@shadowsizeY
765 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
766 \csname bl@corner@#2\endcsname}%
767 }
768
769 \def\@HelpshadowB#1#2{%
770 \@tempdima=\@dimenC \@tempdimb=\@dimenD
771 \advance\@tempdima by \@shadowstepX
772 \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY
773 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
774 \csname tl@corner@#2\endcsname}%
775 \@tempdima=\@dimenC \@tempdimb=\@dimenD
776 \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX
777 \advance\@tempdimb by \@shadowstepY
778 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
779 \csname br@corner@#2\endcsname}%
780 \@tempdima=\@dimenC \@tempdimb=\@dimenD
781 \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX
782 \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY
783 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
784 \csname tr@corner@#2\endcsname}%
785 }
786
787 \def\@HelpshadowC#1#2{%
788 \@tempdima=\@dimenC \@tempdimb=\@dimenD
789 \advance\@tempdima by -\@shadowsizeX
790 \advance\@tempdimb by \@shadowstepY
791 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
792 \csname bl@corner@#2\endcsname}%
793 \@tempdima=\@dimenC \@tempdimb=\@dimenD
794 \advance\@tempdima by \@dimenA \advance\@tempdima by -\@shadowstepX
795 \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY
796 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
797 \csname tr@corner@#2\endcsname}%
798 \@tempdima=\@dimenC \@tempdimb=\@dimenD
799 \advance\@tempdima by -\@shadowsizeX
800 \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY
801 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
802 \csname tl@corner@#2\endcsname}%
803 }
804
805 \def\@HelpshadowD#1#2{%
806 \@tempdima=\@dimenC \@tempdimb=\@dimenD
807 \advance\@tempdima by -\@shadowsizeX
808 \advance\@tempdimb by -\@shadowsizeY
809 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
810 \csname bl@corner@#2\endcsname}%
811 \@tempdima=\@dimenC \@tempdimb=\@dimenD
812 \advance\@tempdima by -\@shadowstepX \advance\@tempdima by \@dimenA
813 \advance\@tempdimb by -\@shadowsizeY
814 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
815 \csname br@corner@#2\endcsname}%
816 \@tempdima=\@dimenC \@tempdimb=\@dimenD
817 \advance\@tempdima by -\@shadowsizeX
818 \advance\@tempdimb by -\@shadowstepY \advance\@tempdimb by \@dimenB
819 \@@put{\@tempdima}{\@tempdimb}{\@tempcnta=\@yyarg
820 \csname tl@corner@#2\endcsname}%
821 }
822
823 %
824 % draw line shadow frame
825 %
826
827 \def\@helpshadowA#1{%
828 \@tempdima=\@dimenC \@tempdimb=\@dimenD
829 \advance\@tempdima by \@dimenA
830 \advance\@tempdimb by \@dimenB \advance\@tempdimb by -\@shadowstepY
831 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX
832 \advance\@tempdima by -\@ovxx
833 \advance\@tempdima by -\@ovdx
834 \hdashline{#1}}%
835 \@tempdima=\@dimenC \@tempdimb=\@dimenD
836 \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX
837 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
838 \advance\@tempdimb by \@ovdy
839 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB
840 \advance\@tempdima by \@shadowsizeY
841 \advance\@tempdima by -\@shadowstepY
842 \advance\@tempdima by -2\@ovyy
843 \advance\@tempdima by -2\@ovdy
844 \vdashline{#1}}%
845 \@tempdima=\@dimenC \@tempdimb=\@dimenD
846 \advance\@tempdima by \@shadowstepX
847 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
848 \advance\@tempdimb by \@ovdy
849 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY
850 \advance\@tempdima by -\@ovyy
851 \advance\@tempdima by -\@ovdy
852 \vdashline{#1}}%
853 \@tempdima=\@dimenC \@tempdimb=\@dimenD
854 \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx
855 \advance\@tempdima by \@ovdx
856 \advance\@tempdimb by -\@shadowsizeY
857 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA
858 \advance\@tempdima by \@shadowsizeX
859 \advance\@tempdima by -\@shadowstepX
860 \advance\@tempdima by -2\@ovxx
861 \advance\@tempdima by -2\@ovdx
862 \hdashline{#1}}%
863 }
864
865 \def\@helpshadowB#1{%
866 \@tempdima=\@dimenC \@tempdimb=\@dimenD
867 \advance\@tempdima by \@shadowstepX
868 \advance\@tempdimb by \@dimenB
869 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY
870 \advance\@tempdima by -\@ovyy
871 \advance\@tempdima by -\@ovdy
872 \vdashline{#1}}%
873 \@tempdima=\@dimenC \@tempdimb=\@dimenD
874 \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx
875 \advance\@tempdima by \@ovdx
876 \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY
877 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA
878 \advance\@tempdima by \@shadowsizeX
879 \advance\@tempdima by -\@shadowstepX
880 \advance\@tempdima by -2\@ovxx
881 \advance\@tempdima by -2\@ovdx
882 \hdashline{#1}}%
883 \@tempdima=\@dimenC \@tempdimb=\@dimenD
884 \advance\@tempdima by \@dimenA
885 \advance\@tempdimb by \@shadowstepY
886 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX
887 \advance\@tempdima by -\@ovxx
888 \advance\@tempdima by -\@ovdx
889 \hdashline{#1}}%
890 \@tempdima=\@dimenC \@tempdimb=\@dimenD
891 \advance\@tempdima by \@dimenA \advance\@tempdima by \@shadowsizeX
892 \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy
893 \advance\@tempdimb by \@ovdy
894 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB
895 \advance\@tempdima by \@shadowsizeY
896 \advance\@tempdima by -\@shadowstepY
897 \advance\@tempdima by -2\@ovyy
898 \advance\@tempdima by -2\@ovdy
899 \vdashline{#1}}%
900 }
901
902 \def\@helpshadowC#1{%
903 \@tempdima=\@dimenC \@tempdimb=\@dimenD
904 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
905 \advance\@tempdima by \@ovdx
906 \advance\@tempdimb by \@shadowstepY
907 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX
908 \advance\@tempdima by -\@ovxx
909 \advance\@tempdima by -\@ovdx
910 \hdashline{#1}}%
911 \@tempdima=\@dimenC \@tempdimb=\@dimenD
912 \advance\@tempdima by -\@shadowsizeX
913 \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy
914 \advance\@tempdimb by \@ovdy
915 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB
916 \advance\@tempdima by \@shadowsizeY
917 \advance\@tempdima by -\@shadowstepY
918 \advance\@tempdima by -2\@ovyy
919 \advance\@tempdima by -2\@ovdy
920 \vdashline{#1}}%
921 \@tempdima=\@dimenC \@tempdimb=\@dimenD
922 \advance\@tempdima by \@dimenA \advance\@tempdima by -\@shadowstepX
923 \advance\@tempdimb by \@dimenB
924 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY
925 \advance\@tempdima by -\@ovyy
926 \advance\@tempdima by -\@ovdy
927 \vdashline{#1}}%
928 \@tempdima=\@dimenC \@tempdimb=\@dimenD
929 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
930 \advance\@tempdima by \@ovdx
931 \advance\@tempdimb by \@dimenB \advance\@tempdimb by \@shadowsizeY
932 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA
933 \advance\@tempdima by \@shadowsizeX
934 \advance\@tempdima by -\@shadowstepX
935 \advance\@tempdima by -2\@ovxx
936 \advance\@tempdima by -2\@ovdx
937 \hdashline{#1}}%
938 }
939
940 \def\@helpshadowD#1{%
941 \@tempdima=\@dimenC \@tempdimb=\@dimenD
942 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
943 \advance\@tempdima by \@ovdx
944 \advance\@tempdimb by -\@shadowsizeY
945 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenA
946 \advance\@tempdima by \@shadowsizeX
947 \advance\@tempdima by -\@shadowstepX
948 \advance\@tempdima by -2\@ovxx
949 \advance\@tempdima by -2\@ovdx
950 \hdashline{#1}}%
951 \@tempdima=\@dimenC \@tempdimb=\@dimenD
952 \advance\@tempdima by -\@shadowstepX \advance\@tempdima by \@dimenA
953 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
954 \advance\@tempdimb by \@ovdy
955 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeY
956 \advance\@tempdima by -\@ovyy
957 \advance\@tempdima by -\@ovdy
958 \vdashline{#1}}%
959 \@tempdima=\@dimenC \@tempdimb=\@dimenD
960 \advance\@tempdima by -\@shadowsizeX
961 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
962 \advance\@tempdimb by \@ovdy
963 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@dimenB
964 \advance\@tempdima by \@shadowsizeY
965 \advance\@tempdima by -\@shadowstepY
966 \advance\@tempdima by -2\@ovyy
967 \advance\@tempdima by -2\@ovdy
968 \vdashline{#1}}%
969 \@tempdima=\@dimenC \@tempdimb=\@dimenD
970 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
971 \advance\@tempdima by \@ovdx
972 \advance\@tempdimb by -\@shadowstepY \advance\@tempdimb by \@dimenB
973 \@@put{\@tempdima}{\@tempdimb}{\@tempdima=\@shadowsizeX
974 \advance\@tempdima by -\@ovxx
975 \advance\@tempdima by -\@ovdx
976 \hdashline{#1}}%
977 }
978
979 %
980 % draw solid shadow frame
981 %
982
983 \def\@helpShadowA#1{% #1 is ignored here
984 \@tempdima=\@dimenC \@tempdimb=\@dimenD
985 \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx
986 \advance\@tempdima by \@ovdx
987 \advance\@tempdimb by -\@shadowsizeY
988 \@@put{\@tempdima}{\@tempdimb}{%
989 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
990 \advance\@tempdima by -\@shadowstepX
991 \advance\@tempdima by -2\@ovxx
992 \advance\@tempdima by -2\@ovdx
993 \@tempdimb=\@shadowsizeY
994 \vrule height \@tempdimb width \@tempdima}%
995 %
996 \@tempdima=\@dimenC \@tempdimb=\@dimenD
997 \advance\@tempdima by \@shadowstepX
998 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
999 \advance\@tempdimb by \@ovdy
1000 \@@put{\@tempdima}{\@tempdimb}{%
1001 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1002 \advance\@tempdima by -\@shadowstepX
1003 \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy
1004 \advance\@tempdimb by -\@ovdy
1005 \vrule height \@tempdimb width \@tempdima}%
1006 %
1007 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1008 \advance\@tempdima by \@dimenA
1009 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
1010 \advance\@tempdimb by \@ovdy
1011 \@@put{\@tempdima}{\@tempdimb}{%
1012 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1013 \advance\@tempdimb by -\@shadowstepY
1014 \advance\@tempdimb by -2\@ovyy
1015 \advance\@tempdimb by -2\@ovdy
1016 \@tempdima=\@shadowsizeX
1017 \vrule height \@tempdimb width \@tempdima}%
1018 %
1019 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1020 \advance\@tempdima by \@dimenA
1021 \advance\@tempdimb by -\@shadowsizeY
1022 \@@put{\@tempdima}{\@tempdimb}{%
1023 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1024 \advance\@tempdimb by -\@shadowstepY
1025 \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx
1026 \advance\@tempdima by -\@ovdx
1027 \vrule height \@tempdimb width \@tempdima}%
1028 }
1029
1030 \def\@helpShadowB#1{% #1 is ignored here
1031 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1032 \advance\@tempdima by \@shadowstepX \advance\@tempdima by \@ovxx
1033 \advance\@tempdima by \@ovdx
1034 \advance\@tempdimb by \@dimenB
1035 \@@put{\@tempdima}{\@tempdimb}{%
1036 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1037 \advance\@tempdima by -\@shadowstepX
1038 \advance\@tempdima by -2\@ovxx
1039 \advance\@tempdima by -2\@ovdx
1040 \@tempdimb=\@shadowsizeY
1041 \vrule height \@tempdimb width \@tempdima}%
1042 %
1043 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1044 \advance\@tempdima by \@shadowstepX
1045 \advance\@tempdimb by \@dimenB
1046 \@@put{\@tempdima}{\@tempdimb}{%
1047 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1048 \advance\@tempdima by -\@shadowstepX
1049 \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy
1050 \advance\@tempdimb by -\@ovdy
1051 \vrule height \@tempdimb width \@tempdima}%
1052 %
1053 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1054 \advance\@tempdima by \@dimenA
1055 \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy
1056 \advance\@tempdimb by \@ovdy
1057 \@@put{\@tempdima}{\@tempdimb}{%
1058 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1059 \advance\@tempdimb by -\@shadowstepY
1060 \advance\@tempdimb by -2\@ovyy
1061 \advance\@tempdimb by -2\@ovdy
1062 \@tempdima=\@shadowsizeX
1063 \vrule height \@tempdimb width \@tempdima}%
1064 %
1065 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1066 \advance\@tempdima by \@dimenA
1067 \advance\@tempdimb by \@shadowstepY
1068 \@@put{\@tempdima}{\@tempdimb}{%
1069 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1070 \advance\@tempdimb by -\@shadowstepY
1071 \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx
1072 \advance\@tempdima by -\@ovdx
1073 \vrule height \@tempdimb width \@tempdima}%
1074 }
1075
1076 \def\@helpShadowC#1{% #1 is ignored here
1077 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1078 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
1079 \advance\@tempdima by \@ovdx
1080 \advance\@tempdimb by \@dimenB
1081 \@@put{\@tempdima}{\@tempdimb}{%
1082 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1083 \advance\@tempdima by -\@shadowstepX
1084 \advance\@tempdima by -2\@ovxx
1085 \advance\@tempdima by -2\@ovdx
1086 \@tempdimb=\@shadowsizeY
1087 \vrule height \@tempdimb width \@tempdima}%
1088 %
1089 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1090 \advance\@tempdima by -\@shadowsizeX
1091 \advance\@tempdimb by \@dimenB
1092 \@@put{\@tempdima}{\@tempdimb}{%
1093 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1094 \advance\@tempdima by -\@shadowstepX
1095 \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy
1096 \advance\@tempdimb by -\@ovdy
1097 \vrule height \@tempdimb width \@tempdima}%
1098 %
1099 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1100 \advance\@tempdima by -\@shadowsizeX
1101 \advance\@tempdimb by \@shadowstepY \advance\@tempdimb by \@ovyy
1102 \advance\@tempdimb by \@ovdy
1103 \@@put{\@tempdima}{\@tempdimb}{%
1104 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1105 \advance\@tempdimb by -\@shadowstepY
1106 \advance\@tempdimb by -2\@ovyy
1107 \advance\@tempdimb by -2\@ovdy
1108 \@tempdima=\@shadowsizeX
1109 \vrule height \@tempdimb width \@tempdima}%
1110 %
1111 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1112 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
1113 \advance\@tempdima by \@ovdx
1114 \advance\@tempdimb by \@shadowstepY
1115 \@@put{\@tempdima}{\@tempdimb}{%
1116 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1117 \advance\@tempdimb by -\@shadowstepY
1118 \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx
1119 \advance\@tempdima by -\@ovdx
1120 \vrule height \@tempdimb width \@tempdima}%
1121 }
1122
1123
1124 \def\@helpShadowD#1{% #1 is ignored here
1125 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1126 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
1127 \advance\@tempdima by \@ovdx
1128 \advance\@tempdimb by -\@shadowsizeY
1129 \@@put{\@tempdima}{\@tempdimb}{%
1130 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1131 \advance\@tempdima by -\@shadowstepX
1132 \advance\@tempdima by -2\@ovxx
1133 \advance\@tempdima by -2\@ovdx
1134 \@tempdimb=\@shadowsizeY
1135 \vrule height \@tempdimb width \@tempdima}%
1136 %
1137 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1138 \advance\@tempdima by -\@shadowsizeX
1139 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
1140 \advance\@tempdimb by \@ovdy
1141 \@@put{\@tempdima}{\@tempdimb}{%
1142 \@tempdima=\@dimenA \advance\@tempdima by \@shadowsizeX
1143 \advance\@tempdima by -\@shadowstepX
1144 \@tempdimb=\@shadowsizeY \advance\@tempdimb by -\@ovyy
1145 \advance\@tempdimb by -\@ovdy
1146 \vrule height \@tempdimb width \@tempdima}%
1147 %
1148 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1149 \advance\@tempdima by -\@shadowsizeX
1150 \advance\@tempdimb by -\@shadowsizeY \advance\@tempdimb by \@ovyy
1151 \advance\@tempdimb by \@ovdy
1152 \@@put{\@tempdima}{\@tempdimb}{%
1153 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1154 \advance\@tempdimb by -\@shadowstepY
1155 \advance\@tempdimb by -2\@ovyy
1156 \advance\@tempdimb by -2\@ovdy
1157 \@tempdima=\@shadowsizeX
1158 \vrule height \@tempdimb width \@tempdima}%
1159 %
1160 \@tempdima=\@dimenC \@tempdimb=\@dimenD
1161 \advance\@tempdima by -\@shadowsizeX \advance\@tempdima by \@ovxx
1162 \advance\@tempdima by \@ovdx
1163 \advance\@tempdimb by -\@shadowsizeY
1164 \@@put{\@tempdima}{\@tempdimb}{%
1165 \@tempdimb=\@dimenB \advance\@tempdimb by \@shadowsizeY
1166 \advance\@tempdimb by -\@shadowstepY
1167 \@tempdima=\@shadowsizeX \advance\@tempdima by -\@ovxx
1168 \advance\@tempdima by -\@ovdx
1169 \vrule height \@tempdimb width \@tempdima}%
1170 }
1171
1172 %
1173 % correct shadow position before drawing
1174 %
1175
1176 \def\@Help@A{\advance\@dimenC \shadowsepX\relax
1177 \advance\@dimenD -\shadowsepY\relax}
1178 \def\@Help@B{\advance\@dimenC \shadowsepX\relax
1179 \advance\@dimenD \shadowsepY\relax}
1180 \def\@Help@C{\advance\@dimenC -\shadowsepX\relax
1181 \advance\@dimenD \shadowsepY\relax}
1182 \def\@Help@D{\advance\@dimenC -\shadowsepX\relax
1183 \advance\@dimenD -\shadowsepY\relax}
1184 %
1185 % correct shadow position after drawing
1186 %
1187
1188 \def\@help@A{\advance\@dimenC \shadowstepX\relax
1189 \advance\@dimenC \@halfwidth
1190 \advance\@dimenD -\shadowstepY\relax
1191 \advance\@dimenD -\@halfwidth}
1192 \def\@help@B{\advance\@dimenC \shadowstepX\relax
1193 \advance\@dimenC \@halfwidth
1194 \advance\@dimenD \shadowstepY\relax
1195 \advance\@dimenD \@halfwidth}
1196 \def\@help@C{\advance\@dimenC -\shadowstepX\relax
1197 \advance\@dimenC -\@halfwidth
1198 \advance\@dimenD \shadowstepY\relax
1199 \advance\@dimenD \@halfwidth}
1200 \def\@help@D{\advance\@dimenC -\shadowstepX\relax
1201 \advance\@dimenC -\@halfwidth
1202 \advance\@dimenD -\shadowstepY\relax
1203 \advance\@dimenD -\@halfwidth}
1204
1205 %%
1206 %% shadow types
1207 %%
1208
1209 %
1210 % pure rectangle
1211 %
1212
1213 \def\@rectshadow@R#1{%
1214 \csname @Help@\s@corn\endcsname
1215 \@prepdummy
1216 \csname @helpshadow\s@corn\endcsname{#1}%
1217 \csname @help@\s@corn\endcsname}
1218
1219 \def\@rectshadow@r#1{%
1220 \csname @Help@\s@corn\endcsname
1221 \@prepdummy
1222 \csname @helpShadow\s@corn\endcsname{#1}%
1223 \csname @help@\s@corn\endcsname}
1224
1225 %
1226 % parquet shadows
1227 %
1228
1229 \def\@prepshadow@P{\@tempdima=\RectCorner\relax
1230 \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi
1231 \ifdim \@tempdima>\@shadowsizeY\relax \@negargfalse \fi
1232 \@ovxx=\@tempdima \@ovyy=\@tempdima
1233 \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth
1234 }
1235
1236 \def\@rectshadow@P#1{%
1237 \csname @Help@\s@corn\endcsname
1238 \@prepshadow@P
1239 \if@negarg
1240 \def\@tempa{#1}\csname @Helpshadow\s@corn\endcsname{#1}{P}%
1241 \else
1242 \@prepdummy
1243 \@warn@corner
1244 \fi
1245 \csname @helpshadow\s@corn\endcsname{#1}%
1246 \csname @help@\s@corn\endcsname}
1247
1248 \def\@rectshadow@p#1{%
1249 \csname @Help@\s@corn\endcsname
1250 \@prepshadow@P
1251 \if@negarg
1252 \else
1253 \@prepdummy
1254 \@warn@corner
1255 \fi
1256 \csname @helpShadow\s@corn\endcsname{#1}%
1257 \csname @help@\s@corn\endcsname}
1258
1259 \def\@rectshadow@B#1{%
1260 \csname @Help@\s@corn\endcsname
1261 \@prepshadow@P
1262 \if@negarg
1263 \def\@tempa{#1}\csname @Helpshadow\s@corn\endcsname{#1}{c}%
1264 \else
1265 \@prepdummy
1266 \@warn@corner
1267 \fi
1268 \csname @helpshadow\s@corn\endcsname{#1}%
1269 \csname @help@\s@corn\endcsname}
1270
1271 \def\@rectshadow@b#1{%
1272 \csname @Help@\s@corn\endcsname
1273 \@prepshadow@P
1274 \if@negarg
1275 \def\@tempa{#1}\csname @Helpshadow\s@corn\endcsname{#1}{cc}%
1276 \else
1277 \@prepdummy
1278 \@warn@corner
1279 \fi
1280 \csname @helpShadow\s@corn\endcsname{#1}%
1281 \csname @help@\s@corn\endcsname}
1282
1283 %
1284 % octal shadows
1285 %
1286
1287 \def\@prepshadow@L{\@negargtrue
1288 \@ovxx=0pt \@ovyy=0pt \@ovdx=0pt \@ovdy=0pt
1289 \ifnum \@RombX>0 \else \@negargfalse \fi
1290 \ifnum \@RombY>0 \else \@negargfalse \fi
1291 \if@negarg
1292 \ifnum \@RombX>\@RombY
1293 \@tempdima=\LineCorner\relax
1294 \@tempdimb=\@tempdima
1295 \multiply\@tempdimb by \@RombY
1296 \divide\@tempdimb by \@RombX
1297 \else
1298 \@tempdimb=\LineCorner\relax
1299 \@tempdima=\@tempdimb
1300 \multiply\@tempdima by \@RombX
1301 \divide\@tempdima by \@RombY
1302 \fi
1303 \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi
1304 \ifdim \@tempdimb>\@shadowsizeY\relax \@negargfalse \fi
1305 \@ovxx=\@tempdima \@ovyy=\@tempdimb
1306 \ifnum \@RombX>\@RombY
1307 \ifdim \@ovxx<10pt \@negargfalse \fi
1308 \else
1309 \ifdim \@ovyy<10pt \@negargfalse \fi
1310 \fi
1311 \if@negarg
1312 \@ovxx=\@tempdima \@ovyy=\@tempdimb
1313 \@yyarg=0 \@ovdx=\@halfwidth \@ovdy=\@halfwidth
1314 \fi
1315 \fi
1316 }
1317
1318 \def\@rectshadow@L#1{%
1319 \csname @Help@\s@corn\endcsname
1320 \@prepshadow@L
1321 \if@negarg
1322 \csname @Helpshadow\s@corn\endcsname{#1}{L}%
1323 \else
1324 \@prepdummy
1325 \@warn@corner
1326 \fi
1327 \csname @helpshadow\s@corn\endcsname{#1}%
1328 \csname @help@\s@corn\endcsname}
1329
1330 %
1331 % oval shadows
1332 %
1333 \def\@prepshadow@O{\@negargtrue
1334 \@tempdima=\RoundCorner\relax
1335 \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi
1336 \ifdim \@tempdima>\@shadowsizeY\relax \@negargfalse \fi
1337 \if@negarg \@tempdima=2\@tempdima \@getcirc\@tempdima \fi
1338 \if@negarg
1339 \@ovxx=0.5\wd\@tempboxa \@ovyy=\@ovxx \@yyarg=\@tempcnta
1340 \@tempdima=0.5\ht\@tempboxa
1341 \advance\@tempdima by -0.5\dp\@tempboxa
1342 \@ovdx=\@halfwidth \advance\@ovdx by -\@tempdima
1343 \@ovdy=\@ovdx
1344 \fi
1345 }
1346
1347 \def\@rectshadow@O#1{%
1348 \csname @Help@\s@corn\endcsname
1349 \@prepshadow@O
1350 \if@negarg
1351 \csname @Helpshadow\s@corn\endcsname{#1}{O}%
1352 \else
1353 \@prepdummy
1354 \@warn@corner
1355 \fi
1356 \csname @helpshadow\s@corn\endcsname{#1}%
1357 \csname @help@\s@corn\endcsname}
1358
1359 \def\@prepshadow@o{%
1360 \@tempdima=\DiskCorner\relax
1361 \get@Disk\@tempdima
1362 \if@negarg
1363 \@yyarg=\@tempcnta \@ovxx=0.5\wd\@tempboxa
1364 \@ovyy=\@ovxx \@ovdx=\@halfwidth \@ovdy=\@ovdx
1365 \ifdim 2\@ovxx>\@shadowsizeX\relax \@negargfalse \fi
1366 \ifdim 2\@ovxx>\@shadowsizeY\relax \@negargfalse \fi
1367 \fi
1368 }
1369
1370 \def\@rectshadow@o#1{%
1371 \csname @Help@\s@corn\endcsname
1372 \@prepshadow@o
1373 \if@negarg
1374 \csname @Helpshadow\s@corn\endcsname{#1}{o}%
1375 \else
1376 \@prepdummy
1377 \@warn@corner
1378 \fi
1379 \csname @helpShadow\s@corn\endcsname{#1}%
1380 \csname @help@\s@corn\endcsname}
1381
1382 %
1383 % astro shadows
1384 %
1385
1386 \def\@prepshadow@A{\@negargtrue
1387 \@tempdima=\RoundCorner\relax
1388 \ifdim \@tempdima>\@shadowsizeX\relax \@negargfalse \fi
1389 \ifdim \@tempdima>\@shadowsizeY\relax \@negargfalse \fi
1390 \if@negarg \@tempdima=2\@tempdima \@getcirc\@tempdima \fi
1391 \if@negarg
1392 \@ovxx=0.5\wd\@tempboxa \@ovyy=\@ovxx \@yyarg=\@tempcnta
1393 \@tempdima=0.5\ht\@tempboxa
1394 \advance\@tempdima by -0.5\dp\@tempboxa
1395 \@ovdx=\@halfwidth \advance\@ovdx by -\@tempdima
1396 \@ovdy=\@ovdx
1397 \fi
1398 }
1399
1400 \def\@rectshadow@A#1{%
1401 \csname @Help@\s@corn\endcsname
1402 \@prepshadow@A
1403 \if@negarg
1404 \csname @Helpshadow\s@corn\endcsname{#1}{A}%
1405 \else
1406 \@prepdummy
1407 \@warn@corner
1408 \fi
1409 \csname @helpshadow\s@corn\endcsname{#1}%
1410 \csname @help@\s@corn\endcsname}
1411
1412 %
1413 % set frame/corner parameters
1414 %
1415
1416 \def\framesep#1{\def\framesepH{#1}%
1417 \def\framesepXM{1.0}\def\framesepYM{1.0}%
1418 \def\framesepXP{1.0}\def\framesepYP{1.0}%
1419 \frameexpand{0pt}%
1420 \ignorespaces}
1421
1422 \def\frameexpand#1{\def\frameexpandX{#1}%
1423 \def\frameexpandY{#1}%
1424 \ignorespaces}
1425
1426 \def\shadowsep#1{\def\shadowsepX{#1}%
1427 \def\shadowsepY{#1}%
1428 \ignorespaces}
1429
1430 \def\shadowsize#1{\def\shadowstepX{#1}\def\shadowstepY{#1}%
1431 \def\shadowsizeX{#1}\def\shadowsizeY{#1}%
1432 \shadowshrink{1.0}\shadowminsize{0pt}%
1433 \ignorespaces}
1434
1435 \def\shadowminsize#1{\def\shadowminsizeX{#1}%
1436 \def\shadowminsizeY{#1}%
1437 \ignorespaces}
1438
1439 \def\shadowshrink#1{%
1440 \def\shadowshrinkstepX{#1}\def\shadowshrinkstepY{#1}%
1441 \def\shadowshrinksizeX{#1}\def\shadowshrinksizeY{#1}%
1442 \ignorespaces}
1443
1444 \def\shadowcorner#1{%
1445 \if A#1\relax \def\s@corn{A}%
1446 \else \if a#1\relax \def\s@corn{A}%
1447 \else \if B#1\relax \def\s@corn{B}%
1448 \else \if b#1\relax \def\s@corn{B}%
1449 \else \if C#1\relax \def\s@corn{C}%
1450 \else \if c#1\relax \def\s@corn{C}%
1451 \else \if D#1\relax \def\s@corn{D}%
1452 \else \if d#1\relax \def\s@corn{D}%
1453 \else \@warning{Illegal shadow corner (#1)}%
1454 \fi\fi\fi\fi\fi\fi\fi\fi
1455 \ignorespaces}
1456
1457 \def\@setshadowsize{%
1458 \let\@shadowstepX=\shadowstepX
1459 \let\@shadowstepY=\shadowstepY
1460 \let\@shadowsizeX=\shadowsizeX
1461 \let\@shadowsizeY=\shadowsizeY
1462 }
1463
1464 \def\@updateshadowsize{%
1465 \advance\@dimenA by \@shadowsizeX
1466 \advance\@dimenA by -\@shadowstepX
1467 \advance\@dimenB by \@shadowsizeY
1468 \advance\@dimenB by -\@shadowstepY
1469 \@shrink@size{\@shadowstepX}{\shadowshrinkstepX}%
1470 \@shrink@size{\@shadowstepY}{\shadowshrinkstepY}%
1471 \@shrink@size{\@shadowsizeX}{\shadowshrinksizeX}%
1472 \@shrink@size{\@shadowsizeY}{\shadowshrinksizeY}%
1473 \@tempdima=\@shadowstepX \advance\@tempdima by \shadowminsizeX
1474 \ifdim \@tempdima<\@dimenA \relax \else \@dimenA=0pt \fi
1475 \@tempdima=\@shadowstepY \advance\@tempdima by \shadowminsizeY
1476 \ifdim \@tempdima<\@dimenB \relax \else \@dimenB=0pt \fi
1477 }
1478
1479 \def\@shrink@size#1#2{%
1480 \@tempdima=#1\relax
1481 \@tempdima=#2\@tempdima\relax
1482 \edef #1{\the\@tempdima}%
1483 }
1484
1485 %%%%%%% !!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%%
1486 %%%%%%% These are CIRC macro %%%%%%%%%%%%%
1487 %%%%%%% !!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%%
1488
1489 \def\mcircle@scaled{1000}
1490
1491 \def\define@circlefnt{%
1492 \ifflag@thicklines
1493 \font\m@circlefnt=lcirclew10 scaled \mcircle@scaled
1494 \else
1495 \font\m@circlefnt=lcircle10 scaled \mcircle@scaled
1496 \fi
1497 \let\@circlefnt=\m@circlefnt \ignorespaces}
1498
1499
1500 \def\magcircle#1{%
1501 \edef\mcircle@scaled{%
1502 \if 0#1 1000
1503 \else \if h#1 1095
1504 \else \if 1#1 1200
1505 \else \if 2#1 1440
1506 \else \if 3#1 1728
1507 \else \if 4#1 2074
1508 \else \if 5#1 2488
1509 \else 1000
1510 \fi\fi\fi\fi\fi\fi\fi
1511 }\define@circlefnt \ignorespaces}
1512
1513 \def\scaledcircle#1{%
1514 \def\mcircle@scaled{#1}%
1515 \ifnum #1>0 \def\mcircle@scaled{#1}%
1516 \else \def\mcircle@scaled{1000}%
1517 \fi
1518 \define@circlefnt \ignorespaces}
1519
1520 \def\circle@factor{%
1521 \ifdim \@tempdima>16.383pt
1522 \divide\@tempdima by \mcircle@scaled\relax
1523 \multiply\@tempdima by 1000
1524 \else
1525 \multiply\@tempdima by 1000
1526 \divide\@tempdima by \mcircle@scaled\relax
1527 \fi
1528 }
1529
1530 %%%
1531 %%% These macro are from LaTeX with some corrections
1532 %%%
1533
1534 % now set thin/thick flag and update circle scaled font
1535 %
1536 \def\thinlines{\flag@thicklinesfalse\define@circlefnt
1537 \let\@linefnt\tenln \let\@circlefnt\tencirc
1538 \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
1539
1540 % now set thin/thick flag and update circle scaled font
1541 %
1542 \def\thicklines{\flag@thicklinestrue\define@circlefnt
1543 \let\@linefnt\tenlnw \let\@circlefnt\tencircw
1544 \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
1545
1546 % calculate \@tempcnta = oval char code,
1547 % \@tempboxa = base char,
1548 % \@tempdima = diameter.
1549 % it is corrected to scale circle font and to indicate
1550 % diameter error: \@negarg = false if diameter is too small
1551 %
1552 \def\@getcirc#1{\@tempdima #1\relax \circle@factor
1553 \advance\@tempdima 2\p@ \@tempcnta\@tempdima
1554 \@tempdima 4\p@ \divide\@tempcnta\@tempdima
1555 \ifnum \@tempcnta >10\relax \@tempcnta 10\relax\fi
1556 \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne \@negargtrue
1557 \else \@warning{Oval segment is too small}\@negargfalse \fi
1558 \multiply\@tempcnta 4\relax
1559 \setbox \@tempboxa \hbox{\@circlefnt \char \@tempcnta}%
1560 \@tempdima \wd \@tempboxa}
1561
1562 % this macro draws blobs and disks,
1563 % it is corrected to scale circle font
1564 %
1565 \def\@circ#1#2{\get@circcode{#1}%
1566 \advance\@tempcnta #2\relax
1567 \@circlefnt \char\@tempcnta}
1568
1569
1570 %%%
1571 %%% New circle macros
1572 %%%
1573
1574 % calculate \@tempcnta = blob/circle char code
1575 \def\get@circcode#1{\@tempdima=#1\relax
1576 \circle@factor \@negargfalse
1577 \advance\@tempdima by 0.5pt
1578 \@tempcnta=\@tempdima \@tempdima=1pt
1579 \divide\@tempcnta by \@tempdima
1580 \ifnum \@tempcnta>15\relax \@tempcnta=15\relax \fi
1581 \ifnum \@tempcnta>0\relax \advance\@tempcnta by -1 \@negargtrue \fi
1582 }
1583
1584 % it calculates \@tempcnta = blob char code
1585 % \@tempboxa = base char,
1586 % \@tempdima = diameter.
1587 \def\get@Disk#1{\get@circcode{#1}%
1588 \advance\@tempcnta by 112
1589 \setbox\@tempboxa\hbox{\@circlefnt \char\@tempcnta}%
1590 }
1591
1592
1593 % it calculates \@tempcnta = circle char code
1594 % \@tempboxa = base char,
1595 % \@tempdima = diameter.
1596 \def\get@Circle#1{\get@circcode{#1}%
1597 \advance\@tempcnta by 96
1598 \setbox\@tempboxa\hbox{\@circlefnt \char\@tempcnta}%
1599 }
1600
1601 %
1602 % top right segment: \put(10,10){\trcircle{10}}
1603 \def\trcircle#1{\@trcircle{#1\unitlength}}
1604 \def\@trcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@trcircle}
1605 \def\@@trcircle{\sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1606 \@tempdima 0.5\wd \@tempboxa
1607 \@tempdimb 0.5\ht \@tempboxa
1608 \advance \@tempdimb -0.5\dp \@tempboxa
1609 \advance \@tempdima -\@tempdimb
1610 \hbox{\kern \@tempdima
1611 \lower -\@tempdima
1612 \hbox{\usebox\@tempboxa}}%
1613 \sbox{\@tempboxa}{}%
1614 }
1615 %
1616 % bottom right segment: \put(10,10){\brcircle{10}}
1617 \def\brcircle#1{\@brcircle{#1\unitlength}}
1618 \def\@brcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@brcircle}
1619 \def\@@brcircle{\advance\@tempcnta 1\relax
1620 \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1621 \@tempdima 0.5\wd \@tempboxa
1622 \@tempdimb 0.5\ht \@tempboxa
1623 \advance \@tempdimb -0.5\dp \@tempboxa
1624 \advance \@tempdima -\@tempdimb
1625 \advance \@tempdimb 0.5\wd \@tempboxa
1626 \hbox{\kern \@tempdima
1627 \lower \@tempdimb
1628 \hbox{\usebox\@tempboxa}}%
1629 \sbox{\@tempboxa}{}%
1630 }
1631 %
1632 % bottom left segment: \put(10,10){\blcircle{10}}
1633 \def\blcircle#1{\@blcircle{#1\unitlength}}
1634 \def\@blcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@blcircle}
1635 \def\@@blcircle{\advance\@tempcnta 2\relax
1636 \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1637 \@tempdima 0.5\wd \@tempboxa
1638 \@tempdimb 0.5\ht \@tempboxa
1639 \advance \@tempdimb -0.5\dp \@tempboxa
1640 \advance \@tempdimb \@tempdima
1641 \hbox{\kern -\@tempdimb
1642 \lower \@tempdimb
1643 \hbox{\usebox\@tempboxa}}%
1644 \sbox{\@tempboxa}{}%
1645 }
1646 %
1647 % top left segment: \put(10,10){\tlcircle{10}}
1648 \def\tlcircle#1{\@tlcircle{#1\unitlength}}
1649 \def\@tlcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@tlcircle}
1650 \def\@@tlcircle{\advance\@tempcnta 3\relax
1651 \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1652 \@tempdima 0.5\wd \@tempboxa
1653 \@tempdimb 0.5\ht \@tempboxa
1654 \advance \@tempdimb -0.5\dp \@tempboxa
1655 \advance \@tempdimb \@tempdima
1656 \hbox{\kern -\@tempdimb
1657 \lower -\@tempdima
1658 \hbox{\usebox\@tempboxa}}%
1659 \sbox{\@tempboxa}{}%
1660 }
1661 %
1662
1663 \def\TRcircle#1{\@TRcircle{#1\unitlength}}
1664 \def\@TRcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@TRcircle}
1665 \def\@@TRcircle{\sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1666 \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa
1667 \hbox{\kern -\@tempdimb
1668 \raise -\@tempdimb
1669 \hbox{\usebox\@tempboxa}}%
1670 \sbox{\@tempboxa}{}%
1671 }
1672
1673 \def\BRcircle#1{\@BRcircle{#1\unitlength}}
1674 \def\@BRcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@BRcircle}
1675 \def\@@BRcircle{\advance\@tempcnta 1\relax
1676 \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1677 \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa
1678 \hbox{\kern -\@tempdimb
1679 \raise -\@tempdimb
1680 \hbox{\usebox\@tempboxa}}%
1681 \sbox{\@tempboxa}{}%
1682 }
1683
1684 \def\BLcircle#1{\@BLcircle{#1\unitlength}}
1685 \def\@BLcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@BLcircle}
1686 \def\@@BLcircle{\advance\@tempcnta 2\relax
1687 \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1688 \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa
1689 \hbox{\kern -\@tempdimb
1690 \raise -\@tempdimb
1691 \hbox{\usebox\@tempboxa}}%
1692 \sbox{\@tempboxa}{}%
1693 }
1694
1695
1696 \def\TLcircle#1{\@TLcircle{#1\unitlength}}
1697 \def\@TLcircle#1{\@tempdima #1\relax \@getcirc\@tempdima \@@TLcircle}
1698 \def\@@TLcircle{\advance\@tempcnta 3\relax
1699 \sbox{\@tempboxa}{\hbox{\@circlefnt \char \@tempcnta}}%
1700 \@tempdimb 0.5\ht\@tempboxa \advance\@tempdimb -0.5\dp\@tempboxa
1701 \hbox{\kern -\@tempdimb
1702 \raise -\@tempdimb
1703 \hbox{\usebox\@tempboxa}}%
1704 \sbox{\@tempboxa}{}%
1705 }
1706
1707 %%%%%%% !!!!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%%
1708 %%%%%%% These are VECTOR macro %%%%%%%%%%%%%
1709 %%%%%%% !!!!!!!!!!!!!!!!!!!!!! %%%%%%%%%%%%%
1710
1711
1712 % parameters for vector arrows:
1713 % \if@negarg shows that the arrow is rotated by 180^{\circ}
1714 % \@tempb is the relative position of the point of alignment
1715 % \@tempa is the alignment style:
1716 % e - arrow
1717 % b - backside
1718 % m - middle
1719 % E - above arrow
1720 % B - before backside
1721 \def\Vec@e{\def\@tempa{e}\def\@tempb{1.0}\@negargfalse}
1722 \def\Vec@E{\def\@tempa{b}\def\@tempb{1.0}\@negargtrue}
1723 \def\Vec@b{\def\@tempa{b}\def\@tempb{0.0}\@negargfalse}
1724 \def\Vec@B{\def\@tempa{e}\def\@tempb{0.0}\@negargtrue}
1725 \def\Vec@m{\def\@tempa{m}\def\@tempb{0.5}\@negargfalse}
1726 \def\Vec@M{\def\@tempa{m}\def\@tempb{0.5}\@negargtrue}
1727 \def\Vec@x{\def\@tempa{E}\def\@tempb{1.0}\@negargfalse}
1728 \def\Vec@X{\def\@tempa{B}\def\@tempb{1.0}\@negargtrue}
1729 \def\Vec@z{\def\@tempa{B}\def\@tempb{0.0}\@negargfalse}
1730 \def\Vec@Z{\def\@tempa{E}\def\@tempb{0.0}\@negargtrue}
1731
1732 \def\VectorStyle[#1]#2#3#4{%
1733 \expandafter\edef\csname Vec@#1\endcsname{%
1734 \def\@tempa{#2}\def\@tempb{#3}%
1735 \if b#4 \@negargtrue \else \@negargfalse \fi
1736 }%
1737 }
1738
1739 \def\@VecA@e{\@tempdimb 0pt}
1740 \def\@VecA@b{\@tempdimb 4pt}
1741 \def\@VecA@m{\@tempdimb 3pt}
1742 \def\@VecA@E{\@tempdimb -2pt}
1743 \def\@VecA@B{\@tempdimb 6pt}
1744
1745 \def\VectorShiftStyle[#1]#2{%
1746 \expandafter\edef\csname @VecA@#1\endcsname{\@tempdimb #2\relax}%
1747 }
1748
1749 \def\Vector{\@ifnextchar[{\@Vector}{\@Vector[e]}}
1750
1751 \def\@Vector[#1](#2,#3)#4{%
1752 \@put{0pt}{0pt}{\line(#2,#3){#4}}%
1753 \@tfor\@tempa:=#1\do{%
1754 \def\@tempb{x} \csname Vec@\@tempa\endcsname
1755 \if\@tempb x\relax \else
1756 % % \@tempdima is the length factor,
1757 \ifnum #2=\z@ \@tempdima #4\unitlength
1758 \else \ifnum #2<\z@ \@tempdima -#4\unitlength
1759 \else \@tempdima #4\unitlength \fi
1760 \divide\@tempdima#2
1761 \fi
1762 % % \@tempb contains fraction (0 <= \@tempb <= 1),
1763 \@tempdima \@tempb\@tempdima\relax
1764 % % \@tempa is the alignment type -- set \@tempdimb = shift
1765 \@tempdimb 0pt\relax \csname @VecA@\@tempa\endcsname
1766 % % assign square root value to \@tempa
1767 \@VecSqrt{#2}{#3}%
1768 % % correct alignment shift
1769 \@tempdimb \@tempa\@tempdimb\relax
1770 \if@negarg \advance\@tempdima -\@tempdimb
1771 \else \advance\@tempdima \@tempdimb \fi
1772 % % calculate final value
1773 \@tempdimb \@tempdima\relax
1774 \@tempdima #2\@tempdima\relax
1775 \@tempdimb #3\@tempdimb\relax
1776 % % get character
1777 \if@negarg \@xarg -#2\relax \@yarg -#3\relax
1778 \else \@xarg #2\relax \@yarg #3\relax
1779 \fi
1780 \setbox\@linechar\hbox{\@linefnt
1781 \ifnum \@xarg=0 \ifnum \@yarg>0 \char'66\relax
1782 \else \char'77\relax \fi
1783 \else
1784 \ifnum \@xarg<0 \@getlarrow(-\@xarg,-\@yarg)%
1785 \else \@getrarrow(\@xarg,\@yarg)%
1786 \fi\fi}%
1787 % % this is \put(x,y)
1788 \ifnum \@xarg>0 \advance\@tempdima -\wd\@linechar \fi
1789 \ifnum \@yarg>0 \advance\@tempdimb -\ht\@linechar \fi
1790 \@@put{\@tempdima}{\@tempdimb}{\box\@linechar}%
1791 \fi%
1792 }% enddo \@tfor
1793 }
1794
1795 % assign square root value to \@tempa
1796 \def\@VecSqrt#1#2{\@xarg #1\relax \@yarg #2\relax
1797 \ifnum\@xarg<0 \@xarg -\@xarg \fi
1798 \ifnum\@yarg<0 \@yarg -\@yarg \fi
1799 \ifnum\@xarg<\@yarg \@yyarg \@xarg \relax \@xarg \@yarg \relax
1800 \@yarg \@yyarg \relax \fi
1801 \edef\@tempa{%
1802 \ifcase \@xarg 0.0
1803 \or \ifcase \@yarg 1.0
1804 \else 0.70710678
1805 \fi
1806 \or \ifcase \@yarg 1.0
1807 \or 0.44721360
1808 \else 0.35355339
1809 \fi
1810 \or \ifcase \@yarg 1.0
1811 \or 0.31622777
1812 \or 0.27735010
1813 \else 0.23570226
1814 \fi
1815 \or \ifcase \@yarg 1.0
1816 \or 0.24253563
1817 \or 0.22360680
1818 \or 0.20000000
1819 \else 0.17677670
1820 \fi
1821 \or \ifcase \@yarg 1.0
1822 \or 0.19611614
1823 \or 0.18569534
1824 \or 0.17149859
1825 \or 0.15617376
1826 \else 0.14142136
1827 \fi
1828 \or \ifcase \@yarg 1.0
1829 \or 0.16439899
1830 \or 0.15811388
1831 \or 0.14907120
1832 \or 0.13867505
1833 \or 0.12803688
1834 \else 0.11785113
1835 \fi
1836 \else 0.0
1837 \fi}%
1838 }
1839
1840 %%%
1841 %%% these are LaTeX macro which are corrected
1842 %%% to suite our purposes
1843 %%%
1844
1845 \def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
1846 \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
1847 \ifnum\@tempcnta<7\relax %% corr: 7 instead of 5
1848 \@linelen #3\unitlength
1849 \ifnum\@xarg =\z@ \@vvector
1850 \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
1851 \fi
1852 \else\@badlinearg\fi}
1853
1854
1855 \def\@svector{% %% corr: \@sline is moved from this place
1856 \@tempcnta\@yarg \ifnum\@tempcnta <\z@ \@tempcnta -\@tempcnta\fi
1857 \ifnum\@tempcnta <7 %% corr: 7 instead of 5
1858 \@sline %% corr: \@sline is moved to this place
1859 %% original text was:
1860 % \hskip -\wd\@linechar
1861 % \@upordown\@clnht \hbox{\@linefnt \if@negarg
1862 % \@getlarrow(\@xarg,\@yyarg)\else \@getrarrow(\@xarg,\@yyarg)\fi}%
1863 %% corrected text:
1864 \if@negarg \hskip -\wd\@linechar \fi
1865 \ifnum \@yarg>\z@ \advance\@clnht \ht\@linechar \fi
1866 \setbox\@linechar\hbox{\@linefnt \if@negarg \@getlarrow(\@xarg,\@yyarg)%
1867 \else \@getrarrow(\@xarg,\@yyarg)%
1868 \fi}%
1869 \if@negarg \else \hskip -\wd\@linechar \fi
1870 \ifnum \@yarg>\z@ \advance\@clnht -\ht\@linechar \fi
1871 \@upordown\@clnht \copy\@linechar
1872 \else\@badlinearg\fi}
1873
1874
1875 %% calculate (\@tempcnta,\@tempcntb) as correct vector slopes
1876 \def\@corrgetarrow#1#2{\@tempcnta #1\relax \@tempcntb #2\relax
1877 \ifnum #2<\z@ \@tempcntb -\@tempcntb \fi
1878 \ifcase \@tempcnta\relax % no action for x=0
1879 \or \ifnum \@tempcntb>4 \@tempcntb 4 \fi % action for x=1
1880 \or \ifnum \@tempcntb=5 \@tempcnta 1 \@tempcntb 3 \fi % action for x=2
1881 \or \ifnum \@tempcntb=5 \@tempcnta 2 \@tempcntb 3 \fi % action for x=3
1882 \or \ifnum \@tempcntb=5 \@tempcnta 3 \@tempcntb 4 \fi % action for x=4
1883 \or \ifcase \@tempcntb\relax % 5,0
1884 \or \@tempcnta 4% 5,1
1885 \or \@tempcnta 3 \@tempcntb 1 % 5,2
1886 \or \@tempcnta 3 \@tempcntb 2 % 5,3
1887 \or \@tempcnta 4 \@tempcntb 3 % 5,4
1888 \or \@tempcnta 1 \@tempcntb 1 % 5,5
1889 \or \@tempcnta 3 \@tempcntb 4 % 5,6
1890 \fi % action for x=5
1891 \or \ifnum \@tempcntb=1 \@tempcnta 4 \fi % 6,1
1892 \ifnum \@tempcntb=5 \@tempcnta 4 \@tempcntb 3 \fi % 6,5
1893 % action for x=6
1894 \fi
1895 \ifnum #2<\z@ \@tempcntb -\@tempcntb \fi
1896 }
1897
1898 \def\@getlarrow(#1,#2){%% this macro is corrected
1899 \@corrgetarrow{#1}{#2}%
1900 \ifnum \@tempcntb=\z@ \@tempcnta'33
1901 \else \multiply\@tempcnta \sixt@@n
1902 \advance\@tempcnta -9
1903 \multiply\@tempcntb \tw@
1904 \ifnum \@tempcntb >\z@ \advance\@tempcnta \@tempcntb
1905 \else \advance\@tempcnta -\@tempcntb
1906 \advance\@tempcnta 64
1907 \fi
1908 \fi
1909 \char\@tempcnta}
1910
1911 \def\@getrarrow(#1,#2){%% this macro is corrected
1912 \@corrgetarrow{#1}{#2}%
1913 \ifnum\@tempcntb <\z@ \@tempcntb -\@tempcntb\relax\fi
1914 \ifcase \@tempcntb \@tempcnta'55
1915 \or \ifnum \@tempcnta<\thr@@ \multiply\@tempcnta 24
1916 \advance\@tempcnta -6
1917 \else \ifnum \@tempcnta=\thr@@ \@tempcnta 49
1918 \else\@tempcnta 58 \fi
1919 \fi
1920 \or \ifnum \@tempcnta<\thr@@ \multiply\@tempcnta 24
1921 \advance\@tempcnta -\thr@@
1922 \else \@tempcnta 51 \fi
1923 \or \multiply\@tempcnta \sixt@@n
1924 \advance\@tempcnta -\tw@
1925 \else \multiply\@tempcnta \sixt@@n
1926 \advance\@tempcnta 7
1927 \fi
1928 \ifnum #2<\z@ \advance\@tempcnta 64 \fi
1929 \char\@tempcnta}
1930
1931 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1932 %
1933 % The command \pictureunit[percent]{xsize}
1934 % selects the value of \unitlength so that the picture
1935 % which is xsize units in width occupies percent
1936 % width of the paper. By default percent=100 which
1937 % correspond to 90% of the total width of the paper.
1938 % \pictureunit calculates \unitlength corectly also for
1939 % twocolumn mode and inside itemize/enumerate/etc.
1940 %
1941 % Example:
1942 % \pictureunit{75}
1943 % \begin{picture}(120,80)
1944 % .....
1945 %
1946 % Default percentage value can be changed by
1947 % \renewcommand{\defaultpercent}{50}
1948 %
1949 % Environment mcpicture combines \pictureunit and
1950 % \begin{picture}-\end{picture}.
1951 %
1952 % \begin{Picture}(120,80)(-60,-40)
1953 % .......
1954 % \end{Picture}
1955 %
1956 % Optional parameter can contain percent width value
1957 % which is used instead of \defaultpercent:
1958 %
1959 % \begin{Picture}[50](120,80)(-60,-40)
1960 % .......
1961 % \end{Picture}
1962 %
1963 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1964
1965 \def\pictureunit{\@ifnextchar[{\mc@scaleunit}{\mc@scaleunit[\defaultpercent]}}
1966
1967 \def\mc@scaleunit[#1]#2{\@tempdima=0.009\hsize
1968 \@tempdima=#1\@tempdima
1969 \@tempdimb=#2pt
1970 \@divide{\@tempdima}{\@tempdimb}%
1971 {\@tempdima}{\unitlength}%
1972 \unitlength=\@tempdima}
1973
1974 \newenvironment{Picture}{}{}
1975
1976 \def\Picture{\@ifnextchar[{\mc@picture}{\mc@picture[\defaultpercent]}}
1977
1978 \def\mc@picture[#1](#2,#3){%
1979 \mc@scaleunit[#1]{#2}%
1980 \picture(#2,#3)}
1981
1982 \def\endPicture{\endpicture}
1983
1984
1985 % *********************************************************************
1986 % *** The following macros are taken from PiCTeX with minor changes ***
1987 % *********************************************************************
1988
1989 % DIVISION (Does long division of dimension registers)
1990 % ** \@divide{DIVIDEND}{DIVISOR}{RESULT}{default}
1991
1992 % ** \@divide DIVIDEND [by] DIVISOR [to get] ANSWER
1993 % ** Divides the dimension DIVIDEND by the dimension DIVISOR, placing the
1994 % ** quotient in the dimension register ANSWER. Values are understood to
1995 % ** be in points. E.g. 12.5pt/1.4pt=8.92857pt.
1996 % ** Quotient is accurate to 1/65536pt=2**[-16]pt
1997 % ** |DIVISOR| should be < 2048pt (about 28 inches).
1998 \def\@divide#1#2#3#4{%
1999 \ifdim #2=\z@ #3=#4\relax
2000 \else
2001 \@dimenB=#1% ** dimB holds current remainder (r)
2002 \@dimenC=#2% ** dimC holds divisor (d)
2003 \@dimenD=\@dimenB% ** dimD holds quotient q=r/d for this
2004 \divide \@dimenD \@dimenC% ** step, in units of scaled pts
2005 \@dimenA=\@dimenD% ** dimA eventually holds answer (a)
2006 \multiply\@dimenD \@dimenC% ** r <-- r - dq
2007 \advance\@dimenB -\@dimenD% ** First step complete. Have integer part
2008 % ** of a, and corresponding remainder.
2009 \@dimenD=\@dimenC% ** Temporarily use dimD to hold |d|
2010 \ifdim\@dimenD<\z@ \@dimenD=-\@dimenD
2011 \fi
2012 \ifdim\@dimenD<64pt% ** Branch on the magnitude of |d|
2013 \@divstep[256]\@divstep[256]%
2014 \else
2015 % ** The following code handles divisors d with
2016 % ** (1) .88in = 64pt <= d < 256pt = 3.54in
2017 % ** (2) 3.54in = 256pt <= d < 2048pt = 28.34in
2018 % ** Anything bigger than that may result in an overflow condition.
2019 \ifdim\@dimenD<256pt
2020 \@divstep[64]\@divstep[32]\@divstep[32]%
2021 \else
2022 \@divstep[8]\@divstep[8]\@divstep[8]\@divstep[8]\@divstep[8]%
2023 \@dimenA=2\@dimenA
2024 \fi
2025 % ** For our purposes, we should never even see case (2).
2026 \fi
2027 #3=\@dimenA
2028 \fi\ignorespaces}
2029
2030
2031 % ** The following macro does the real long division work.
2032 \def\@divstep[#1]{% ** #1 = "B"
2033 \@dimenB=#1\@dimenB% ** r <-- B*r
2034 \@dimenD=\@dimenB% ** dimD holds quotient q=r/d for this
2035 \divide \@dimenD by \@dimenC% ** step, in units of scaled pts
2036 \@dimenA=#1\@dimenA% ** a <-- B*a + q
2037 \advance\@dimenA by \@dimenD%
2038 \multiply\@dimenD by \@dimenC% ** r <-- r - dq
2039 \advance\@dimenB by -\@dimenD}
2040
2041 % ************************************************
2042 % ******** End of PiCTeX division macros *********
2043 % ************************************************
2044
2045
2046 %%%%%%% !!!!!!!!!!!!!!!!!! %%%%%%%%%%%%%
2047 %%%%%%% Default style data %%%%%%%%%%%%%
2048 %%%%%%% !!!!!!!!!!!!!!!!!! %%%%%%%%%%%%%
2049
2050 \def\defaultpercent{100}
2051
2052 \thinlines
2053
2054 \def\DiskCorner{5pt}
2055 \def\RoundCorner{5pt}
2056 \def\LineCorner{10pt}
2057 \def\RectCorner{5pt}
2058
2059 \framesep{4pt}
2060 \shadowsep{1pt}
2061 \shadowsize{5pt}
2062 \shadowshrink{1}
2063
2064 \shadowcorner{A}
2065
2066 \rombboxstyle(2,1,2pt)
2067
2068 %
2069 % save updated LaTeX macro
2070 %
2071
2072
2073 %
2074 % switch two modes
2075 %
2076
2077 \let\grf@thinlines=\thinlines
2078 \let\grf@thicklines=\thicklines
2079 \let\grf@@getcirc=\@getcirc
2080 \let\grf@@circ=\@circ
2081 \let\grf@vector=\vector
2082 \let\grf@@svector=\@svector
2083 \let\grf@@getlarrow=\@getlarrow
2084 \let\grf@@gerlarrow=\@getrarrow
2085
2086
2087 \def\setlatexmacro{%
2088 \let\thinlines=\ltx@thinlines
2089 \let\thicklines=\ltx@thicklines
2090 \let\@getcirc=\ltx@@getcirc
2091 \let\@circ=\ltx@@circ
2092 \let\vector=\ltx@vector
2093 \let\@svector=\ltx@@svector
2094 \let\@getlarrow=\ltx@@getlarrow
2095 \let\@gerlarrow=\ltx@@getrarrow
2096 \ignorespaces
2097 }
2098
2099 \def\settestmacro{%
2100 \let\thinlines=\grf@thinlines
2101 \let\thicklines=\grf@thicklines
2102 \let\@getcirc=\grf@@getcirc
2103 \let\@circ=\grf@@circ
2104 \let\vector=\grf@vector
2105 \let\@svector=\grf@@svector
2106 \let\@getlarrow=\grf@@getlarrow
2107 \let\@gerlarrow=\grf@@getrarrow
2108 \ignorespaces
2109 }
2110
2111 %
2112 \catcode`@=\oldatcatcode
2113 %
2114