Debian Codegraph @

texmf-dist/tex/plain/graphics-pln/autopict.sty

raw
1 %%
2 %% This is file `autopict.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ltpictur.dtx (with options: `def')
8 %%
9 %% This is a generated file.
10 %%
11 %% Copyright 1993 1994 1995 1996
12 %% The LaTeX3 Project and any individual authors listed elsewhere
13 %% in this file.
14 %%
15 %% Originally generated from the LaTeX sources by docstrip, but
16 %% the relevant guards are no longer in the sources as the autoload
17 %% variant of LaTeX is no longer supported (or needed).
18
19 %%% This file may be distributed under the terms of the LPPL, see
20 %%% README.txt for details.
21
22 %%% From File: ltpictur.dtx
23 \ProvidesFile{autopict.sty}
24 [2001/08/27 v1.1k Picture mode autoload file]
25 \long\gdef\picture#1{\pictur@#1}
26 \gdef\pictur@(#1){%
27 \@ifnextchar({\@picture(#1)}{\@picture(#1)(0,0)}}
28 \gdef\@picture(#1,#2)(#3,#4){%
29 \@picht#2\unitlength
30 \setbox\@picbox\hb@xt@#1\unitlength\bgroup
31 \hskip -#3\unitlength
32 \lower #4\unitlength\hbox\bgroup
33 \ignorespaces}
34 \gdef\endpicture{%
35 \egroup\hss\egroup
36 \ht\@picbox\@picht\dp\@picbox\z@
37 \mbox{\box\@picbox}}
38 \long\gdef\put(#1,#2)#3{%
39 \@killglue\raise#2\unitlength
40 \hb@xt@\z@{\kern#1\unitlength #3\hss}%
41 \ignorespaces}
42 \gdef\multiput(#1,#2)#3{%
43 \@xdim #1\unitlength
44 \@ydim #2\unitlength
45 \@multiput(}
46 \long\gdef\@multiput(#1,#2)#3#4{%
47 \@killglue\@multicnt #3\relax
48 \@whilenum \@multicnt >\z@\do
49 {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
50 \advance\@multicnt\m@ne
51 \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
52 \ignorespaces}
53 \gdef\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}
54 \gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
55 \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth}
56 \gdef\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
57 \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
58 \gdef\linethickness#1{\@wholewidth #1\relax \@halfwidth .5\@wholewidth}
59 \gdef\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}}
60 \gdef\@shortstack[#1]{%
61 \leavevmode
62 \vbox\bgroup
63 \baselineskip-\p@\lineskip 3\p@
64 \let\mb@l\hss\let\mb@r\hss
65 \expandafter\let\csname mb@#1\endcsname\relax
66 \let\\\@stackcr
67 \@ishortstack}
68 \gdef\@ishortstack#1{\ialign{\mb@l {##}\unskip\mb@r\cr #1\crcr}\egroup}
69 \gdef\@stackcr{\@ifstar\@ixstackcr\@ixstackcr}
70 \gdef\@ixstackcr{\@ifnextchar[\@istackcr{\cr\ignorespaces}}
71 \gdef\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
72 \newif\if@negarg
73 \gdef\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
74 \@linelen #3\unitlength
75 \ifdim\@linelen<\z@\@badlinearg\else
76 \ifnum\@xarg =\z@ \@vline
77 \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
78 \fi
79 \fi}
80 \gdef\@sline{%
81 \ifnum\@xarg<\z@ \@negargtrue \@xarg -\@xarg \@yyarg -\@yarg
82 \else \@negargfalse \@yyarg \@yarg \fi
83 \ifnum \@yyarg >\z@ \@tempcnta\@yyarg \else \@tempcnta -\@yyarg \fi
84 \ifnum\@tempcnta>6 \@badlinearg\@tempcnta\z@ \fi
85 \ifnum\@xarg>6 \@badlinearg\@xarg \@ne \fi
86 \setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}%
87 \ifdim\wd\@linechar=\z@
88 \setbox\@linechar\hbox{.}%
89 \@badlinearg
90 \fi
91 \ifnum \@yarg >\z@ \let\@upordown\raise \@clnht\z@
92 \else\let\@upordown\lower \@clnht \ht\@linechar\fi
93 \@clnwd \wd\@linechar
94 \if@negarg
95 \hskip -\wd\@linechar \def\reserved@a{\hskip -2\wd\@linechar}%
96 \else
97 \let\reserved@a\relax
98 \fi
99 \@whiledim \@clnwd <\@linelen \do
100 {\@upordown\@clnht\copy\@linechar
101 \reserved@a
102 \advance\@clnht \ht\@linechar
103 \advance\@clnwd \wd\@linechar}%
104 \advance\@clnht -\ht\@linechar
105 \advance\@clnwd -\wd\@linechar
106 \@tempdima\@linelen\advance\@tempdima -\@clnwd
107 \@tempdimb\@tempdima\advance\@tempdimb -\wd\@linechar
108 \if@negarg \hskip -\@tempdimb \else \hskip \@tempdimb \fi
109 \multiply\@tempdima \@m
110 \@tempcnta \@tempdima
111 \@tempdima \wd\@linechar \divide\@tempcnta \@tempdima
112 \@tempdima \ht\@linechar \multiply\@tempdima \@tempcnta
113 \divide\@tempdima \@m
114 \advance\@clnht \@tempdima
115 \ifdim \@linelen <\wd\@linechar
116 \hskip \wd\@linechar
117 \ifdim \@linelen = \z@
118 \else
119 \@picture@warn
120 \fi
121 \else\@upordown\@clnht\copy\@linechar\fi}
122 \gdef\@hline{\ifnum \@xarg <\z@ \hskip -\@linelen \fi
123 \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@linelen
124 \ifnum \@xarg <\z@ \hskip -\@linelen \fi}
125 \gdef\@getlinechar(#1,#2){\@tempcnta#1\relax\multiply\@tempcnta 8%
126 \advance\@tempcnta -9\ifnum #2>\z@ \advance\@tempcnta #2\relax\else
127 \advance\@tempcnta -#2\relax\advance\@tempcnta 64 \fi
128 \char\@tempcnta}
129 \gdef\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
130 \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
131 \ifnum\@tempcnta<5\relax
132 \@linelen #3\unitlength
133 \ifdim\@linelen<\z@\@badlinearg\else
134 \ifnum\@xarg =\z@ \@vvector
135 \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
136 \fi
137 \fi
138 \else\@badlinearg\fi}
139 \gdef\@hvector{\@hline\hb@xt@\z@{\@linefnt
140 \ifnum \@xarg <\z@ \@getlarrow(1,0)\hss\else
141 \hss\@getrarrow(1,0)\fi}}
142 \gdef\@vvector{\ifnum \@yarg <\z@ \@downvector \else \@upvector \fi}
143 \gdef\@svector{\@sline
144 \@tempcnta\@yarg \ifnum\@tempcnta <\z@ \@tempcnta -\@tempcnta\fi
145 \ifnum\@tempcnta <5%
146 \hskip -\wd\@linechar
147 \@upordown\@clnht \hbox{\@linefnt \if@negarg
148 \@getlarrow(\@xarg,\@yyarg)\else \@getrarrow(\@xarg,\@yyarg)\fi}%
149 \else\@badlinearg\fi}
150 \gdef\@getlarrow(#1,#2){\ifnum #2=\z@ \@tempcnta 27 % '33
151 \else
152 \@tempcnta #1\relax\multiply\@tempcnta \sixt@@n
153 \advance\@tempcnta -9 \@tempcntb #2\relax\multiply\@tempcntb \tw@
154 \ifnum \@tempcntb >\z@ \advance\@tempcnta \@tempcntb
155 \else\advance\@tempcnta -\@tempcntb\advance\@tempcnta 64
156 \fi\fi\char\@tempcnta}
157 \gdef\@getrarrow(#1,#2){\@tempcntb #2\relax
158 \ifnum\@tempcntb <\z@ \@tempcntb -\@tempcntb\relax\fi
159 \ifcase \@tempcntb\relax \@tempcnta 45 % '55
160 \or
161 \ifnum #1<\thr@@ \@tempcnta #1\relax\multiply\@tempcnta
162 24\advance\@tempcnta -6 \else \ifnum #1=\thr@@ \@tempcnta 49
163 \else\@tempcnta 58 \fi\fi\or
164 \ifnum #1<\thr@@ \@tempcnta=#1\relax\multiply\@tempcnta
165 24\advance\@tempcnta -\thr@@ \else \@tempcnta 51 \fi\or
166 \@tempcnta #1\relax\multiply\@tempcnta
167 \sixt@@n \advance\@tempcnta -\tw@ \else
168 \@tempcnta #1\relax\multiply\@tempcnta
169 \sixt@@n \advance\@tempcnta 7 \fi\ifnum #2<\z@ \advance\@tempcnta 64 \fi
170 \char\@tempcnta}
171 \gdef\@vline{\ifnum \@yarg <\z@ \@downline \else \@upline\fi}
172 \gdef\@upline{%
173 \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
174 \@height \@linelen \@depth \z@\hss}}
175 \gdef\@downline{%
176 \hb@xt@\z@{\hskip -\@halfwidth \vrule \@width \@wholewidth
177 \@height \z@ \@depth \@linelen \hss}}
178 \gdef\@upvector{\@upline\setbox\@tempboxa\hbox{\@linefnt\char 54}% % '66
179 \raise \@linelen \hb@xt@\z@{\lower \ht\@tempboxa\box\@tempboxa\hss}}
180 \gdef\@downvector{\@downline\lower \@linelen
181 \hb@xt@\z@{\@linefnt\char 63 % '77
182 \hss}}
183 \gdef\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip
184 \lineskip \z@skip
185 \@dashdim #2\unitlength
186 \@dashcnt \@dashdim \advance\@dashcnt 200
187 \@dashdim #1\unitlength\divide\@dashcnt \@dashdim
188 \ifodd\@dashcnt\@dashdim \z@
189 \advance\@dashcnt \@ne \divide\@dashcnt \tw@
190 \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
191 \advance\@dashcnt \m@ne
192 \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
193 \@width \@dashdim}\put(0,0){\copy\@dashbox}%
194 \put(0,#3){\copy\@dashbox}%
195 \put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
196 \put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
197 \multiply\@dashdim \thr@@
198 \fi
199 \setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
200 \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
201 \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
202 \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
203 \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
204 \do{\copy\@dashbox\advance\@tempcnta \@ne }}%
205 \@dashdim #3\unitlength
206 \@dashcnt \@dashdim \advance\@dashcnt 200
207 \@dashdim #1\unitlength\divide\@dashcnt \@dashdim
208 \ifodd\@dashcnt \@dashdim \z@
209 \advance\@dashcnt \@ne \divide\@dashcnt \tw@
210 \else
211 \divide\@dashdim \tw@ \divide\@dashcnt \tw@
212 \advance\@dashcnt \m@ne
213 \setbox\@dashbox\hbox{\hskip -\@halfwidth
214 \vrule \@width \@wholewidth
215 \@height \@dashdim}\put(0,0){\copy\@dashbox}%
216 \put(#2,0){\copy\@dashbox}%
217 \put(0,#3){\lower\@dashdim\copy\@dashbox}%
218 \put(#2,#3){\lower\@dashdim\copy\@dashbox}%
219 \multiply\@dashdim \thr@@
220 \fi
221 \setbox\@dashbox\hbox{\vrule \@width \@wholewidth
222 \@height #1\unitlength}\@tempcnta\z@
223 \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
224 \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
225 \vskip\@dashdim}}\@tempcnta\z@
226 \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
227 \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
228 \vskip\@dashdim}}}\@makepicbox(#2,#3)}
229 \newif\if@ovt
230 \newif\if@ovb
231 \newif\if@ovl
232 \newif\if@ovr
233 \gdef\@getcirc#1{\@tempdima #1\relax \advance\@tempdima 2\p@
234 \@tempcnta\@tempdima
235 \@tempdima 4\p@ \divide\@tempcnta\@tempdima
236 \ifnum \@tempcnta >10\relax
237 \@picture@warn
238 \@tempcnta 10\relax
239 \fi
240 \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne
241 \else \@picture@warn \fi
242 \multiply\@tempcnta 4\relax
243 \setbox \@tempboxa \hbox{\@circlefnt
244 \char \@tempcnta}\@tempdima \wd \@tempboxa}
245 \def\@picture@warn{\@latex@warning{%
246 \string\oval, \string\circle, or \string\line\space
247 size unavailable}}
248 \gdef\@put#1#2#3{\raise #2\hb@xt@\z@{\hskip #1#3\hss}}
249 \gdef\oval(#1,#2){\@ifnextchar[{\@oval(#1,#2)}{\@oval(#1,#2)[]}}
250 \gdef\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
251 \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
252 \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}%
253 \@ovxx
254 #1\unitlength \@ovyy #2\unitlength
255 \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
256 \advance \@tempdimb -2\p@
257 \@getcirc \@tempdimb
258 \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
259 \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
260 \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
261 \@circlefnt \setbox\@tempboxa
262 \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
263 \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
264 \if@ovt \@ovhorz \kern -\@ovxx \fi
265 \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
266 \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
267 \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
268 \endgroup}
269 \gdef\@ovvert#1#2{\vbox to\@ovyy{%
270 \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
271 \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
272 \else \kern \@ovri \kern \@ovdy \fi
273 \leaders\vrule \@width \@wholewidth\vfil \nointerlineskip
274 \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
275 \hbox{\char \@tempcntb}%
276 \else \kern \@ovdy \kern \@ovro \fi}}
277 \gdef\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
278 \if@ovr \else \kern \@ovdx \fi
279 \leaders \hrule \@height \@wholewidth \hfil
280 \if@ovl \else \kern \@ovdx \fi
281 \kern \@ovri}}
282 \gdef\circle{\@inmatherr\circle\@ifstar\@dot\@circle}
283 \gdef\@circle#1{%
284 \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
285 \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
286 \@ovro\ht\@tempboxa
287 \setbox\@tempboxa\hbox{\@circlefnt
288 \advance\@tempcnta\tw@ \char \@tempcnta
289 \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
290 \advance\@tempcnta\tw@
291 \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
292 \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
293 \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
294 \else \@circ\@tempdimb{96}\fi\endgroup}
295 \gdef\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
296 \gdef\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@
297 \@tempcnta\@tempdima \@tempdima \p@
298 \divide\@tempcnta\@tempdima
299 \ifnum\@tempcnta >15\relax \@tempcnta 15\relax \fi
300 \ifnum \@tempcnta >\z@ \advance\@tempcnta\m@ne\fi
301 \advance\@tempcnta #2\relax
302 \@circlefnt \char\@tempcnta}
303 \ifx\qbeziermax\@undefined
304 \gdef\qbeziermax{500}
305 \fi
306 \newcommand\qbezier[2][0]{\bezier{#1}#2}
307 \gdef\bezier#1)#2(#3)#4({\@bezier#1)(#3)(}
308 \gdef\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
309 \ifnum #1=\z@
310 \@ovxx #4\unitlength
311 \advance\@ovxx -#2\unitlength
312 \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
313 \@ovdx #6\unitlength
314 \advance\@ovdx -#4\unitlength
315 \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
316 \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
317 \@ovyy #5\unitlength
318 \advance\@ovyy -#3\unitlength
319 \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
320 \@ovdy #7\unitlength
321 \advance\@ovdy -#5\unitlength
322 \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
323 \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
324 \@multicnt
325 \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
326 \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
327 \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
328 \else \@multicnt#1\relax \fi
329 \@tempcnta\@multicnt \advance\@tempcnta\@ne
330 \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
331 \multiply\@ovdx \tw@
332 \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
333 \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
334 \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
335 \multiply\@ovdy \tw@
336 \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
337 \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
338 \setbox\@tempboxa\hbox{%
339 \hskip -\@halfwidth
340 \vrule \@height\@halfwidth
341 \@depth \@halfwidth
342 \@width \@wholewidth}%
343 \put(#2,#3){%
344 \count@\z@
345 \@whilenum{\count@<\@tempcnta}\do
346 {\@xdim\count@\@ovxx
347 \advance\@xdim\@ovdx
348 \divide\@xdim\@multicnt
349 \multiply\@xdim\count@
350 \@ydim\count@\@ovyy
351 \advance\@ydim\@ovdy
352 \divide\@ydim\@multicnt
353 \multiply\@ydim\count@
354 \raise \@ydim
355 \hb@xt@\z@{\kern\@xdim
356 \unhcopy\@tempboxa\hss}%
357 \advance\count@\@ne}}}
358 \endinput
359 %%
360 %% End of file `autopict.sty'.