Debian Codegraph @

texmf-dist/doc/latex/texpower/contrib/tpmultiinc.tar

raw
1 tpmultiinc.sty000060000037240003720000000052600713234631500143010ustar00hwflamelet00000000000000%% tpmultiinc.sty
2 %%
3 %% This package provides the command \tpmultiinc{foo} to include
4 %% incremental graphics using Stephan Lehmke's texpower package.
5 %%
6 %% Call it like: \tpmultiinc[options to includegraphics]{foo}
7 %%
8 %% It requires that you have the graphic files in a certain order.
9 %% foo.0 is the first file to be included. It appears at once.
10 %% The graphic files
11 %% foo.n with n >=1 are included step by step using the step command
12 %% from texpower.
13 %% The files foo.* are eps-Files, as produced by metapost. They must
14 %% all have the same bounding box.
15 %%
16 %% The most convenient way to generate them is to use xfig with the
17 %% patches provided by Klaus Guntermann to generate multiple metapost
18 %% output. See:
19 %%
20 %% http://www-sp.iti.informatik.tu-darmstadt.de/software/xfig/
21 %%
22 %% The [options to includegraphics] are optional. You can use them to
23 %% scale your graphics to the proper size.
24 %%
25 %% Beware, no error handling is attempted.
26 %% Beware, this is my first attempt to write something other than
27 %% local hacks.
28 %% Beware, this has only been tested via the latex, dvips, ps2pdf
29 %% route. I don't know how it behaves if you use pdflatex.
30 %%
31 %% Author: Holger Wenzel [email protected]
32 %% Version: 0.1b July 7, 2000
33 %%
34 \RequirePackage{texpower}
35 \RequirePackage{graphicx}
36 \RequirePackage{ifthen}
37 %%
38 %% The width and the height of the included graphics
39 \newlength{\layerwidth}
40 \newlength{\layerheight}
41 %% Boolean value to decide wether we have to include another
42 %% file
43 \newboolean{morelayers}
44 %%
45 %% Counter for the actual layer
46 %%
47 \newcounter{layer}
48 %%
49 %%
50 %%
51 \newcommand*{\tpmultiinc}[2][{}]{%
52 %%
53 %% First (optional) argument are the options passed to
54 %% includegraphics.
55 %% Second (requried) argument is the base-name of the files to be
56 %% included.
57 %%
58 %% Determine the dimensions of the picture
59 \settowidth{\layerwidth}{\includegraphics[#1]{#2.0}}
60 \settoheight{\layerheight}{\includegraphics[#1]{#2.0}}
61 %% initialise
62 \setboolean{morelayers}{true}
63 \setcounter{layer}{1}
64 %%
65 %% use parstepwise instead of stepwise to avoid glitches in
66 %% the output
67 \parstepwise{%
68 %%
69 %% Make room for the picture
70 \parbox[t][\layerheight][b]{\layerwidth}{%
71 %%
72 %% Be sure that the files are nicely overlaid
73 %% by anchoring them at (0,0) in a picture environment
74 \begin{picture}(0,0)
75 %% Include at least one file (this is foo.0)
76 \put(0,0) {\includegraphics[#1]{#2.0}}
77 %%
78 %% This is the loop to include all the foo.n files
79 %% like in the mpmulti.sty of ppower.
80 %%
81 \whiledo{\boolean{morelayers}}
82 {\IfFileExists{#2.\thelayer}%
83 {\setboolean{morelayers}{true}%
84 \step{\put(0,0) {{\includegraphics[#1]{#2.\thelayer}}}}
85 \stepcounter{layer}}%
86 {\setboolean{morelayers}{false}}}
87 \end{picture}}}%
88 \\}%
89 mptest.tex000060000037240003720000000002740713234454400134100ustar00hwflamelet00000000000000\documentclass{article}
90 \usepackage[display]{texpower}
91 \usepackage{graphicx}
92 \usepackage{tpmultiinc}
93
94 \begin{document}
95
96 \tpmultiinc[width=\textwidth]{multitest}
97
98 \end{document}
99
100
101 multitest.fig000066400037240003720000000006550713234045600141060ustar00hwflamelet00000000000000#FIG 3.2
102 Landscape
103 Center
104 Metric
105 A4
106 100.00
107 Single
108 -2
109 1200 2
110 1 3 0 1 1 1 46 0 20 0.000 1 0.0000 3555 3375 415 415 3555 3375 3970 3375
111 2 2 0 1 0 7 48 0 -1 0.000 0 0 -1 0 0 5
112 765 1890 3555 1890 3555 3375 765 3375 765 1890
113 2 4 0 1 0 1 44 0 -1 0.000 0 0 7 0 0 5
114 4635 3510 4635 1125 675 1125 675 3510 4635 3510
115 4 0 0 50 0 0 12 0.0000 2 180 750 1125 2565 begin test\001
116 4 0 0 42 0 0 12 1.5708 2 135 615 4005 2430 end test\001
117 multitest.mmp000066400037240003720000000075020713234045700141310ustar00hwflamelet00000000000000%
118 % fig2dev -L (m)mp version 0.03 --- Preamble
119 %
120
121 % Make arrowheads mitered by default
122 % NOTE: subject to change (edited from plain.mp)
123 def forwarr(text t) expr p =
124 _apth:=p;_finarrf(t)
125 enddef;
126 def backarr(text t) expr p =
127 _apth:=p;_finarrb(t)
128 enddef;
129 def _finarrf(text s) text t =
130 if (s=0):fill arrowhead _apth t withcolor white
131 else: fill arrowhead _apth t fi;
132 linejoin:=0;
133 draw arrowhead _apth t
134 enddef;
135 def _finarrb(text s) text t =
136 if (s=0):fill arrowhead reverse _apth t withcolor white
137 else: fill arrowhead reverse _apth t fi;
138 linejoin:=0;
139 draw arrowhead reverse _apth t
140 enddef;
141
142
143 path allbounds;
144 allbounds = (39.78,725.22)--(278.82,725.22)--(278.82,564.12)--(39.78,564.12)--cycle;
145 % Some reasonable defaults
146 ahlength:=7;
147 ahangle:=30;
148 labeloffset:=0;
149 truecorners:=0;
150 bboxmargin:=0;
151 % Now draw objects of depth: 50
152 beginfig(0)
153 % Begin text object
154 picture p;
155 verbatimtex
156 \font\cmrAA=cmr10 at 10.80pt
157 \font\tenrm=cmr10 at 10.80pt \font\sevenrm=cmr7 at 7.56pt
158 \font\fiverm=cmr5 at 5.40pt \font\teni=cmmi10 at 10.80pt
159 \font\seveni=cmmi7 at 7.56pt \font\fivei=cmmi5 at 5.40pt
160 \font\tensy=cmsy10 at 10.80pt \font\sevensy=cmsy7 at 7.56pt
161 \font\fivesy=cmsy5 at 5.40pt \textfont0\tenrm
162 \scriptfont0\sevenrm \scriptscriptfont0\fiverm
163 \textfont1\teni \scriptfont1\seveni \scriptscriptfont1\fivei
164 \textfont2\tensy \scriptfont2\sevensy \scriptscriptfont2\fivesy
165 etex;
166 p = btex \cmrAA begin test etex
167 rotated 0.00;
168 label.urt(p,(67.50,638.10)) withcolor (0.00,0.00,0.00);
169 % End text object
170 setbounds currentpicture to allbounds;
171 endfig;
172 % Now draw objects of depth: 48
173 beginfig(1)
174 % Begin polyline object
175 linecap:=0;
176 linejoin:=0;
177 pickup pencircle scaled 0.90;
178 path p;
179 p = (45.90, 678.60)
180 --(213.30, 678.60)
181 --(213.30, 589.50)
182 --(45.90, 589.50)
183 --(45.90, 678.60)--cycle;
184 draw p withcolor (0.00,0.00,0.00);
185 % End polyline object
186 setbounds currentpicture to allbounds;
187 endfig;
188 % Now draw objects of depth: 46
189 beginfig(2)
190 % Begin ellipse object
191 pickup pencircle scaled 0.90;
192 path c;
193 c = fullcircle scaled 49.80 yscaled 1.00
194 rotated 0.00 shifted (213.30,589.50);
195 fill c withcolor ((0.00,0.00,1.00) + 0.00white);
196 draw c withcolor (0.00,0.00,1.00);
197 % End ellipse object
198 setbounds currentpicture to allbounds;
199 endfig;
200 % Now draw objects of depth: 44
201 beginfig(3)
202 % Begin polyline object
203 linecap:=0;
204 linejoin:=1;
205 pickup pencircle scaled 0.90;
206 path p,pb,sw,nw,ne,se;
207 pair ll,ul,ur,lr;
208 p = (278.10,581.40)--(40.50,724.50);
209 ur = urcorner p; ll = llcorner p;
210 ul = ulcorner p; lr = lrcorner p;
211 sw = fullcircle scaled 12.60 shifted (ll+(6.30,6.30));
212 nw = fullcircle scaled 12.60 shifted (ul+(6.30,-6.30));
213 ne = fullcircle rotated 180 scaled 12.60 shifted (ur+(-6.30,-6.30));
214 se = fullcircle rotated 180 scaled 12.60 shifted (lr+(-6.30,6.30));
215 pb = buildcycle(sw,ll--ul,nw,ul--ur,ne,ur--lr,se,lr--ll);
216 draw pb withcolor (0.00,0.00,0.00);
217 % End polyline object
218 setbounds currentpicture to allbounds;
219 endfig;
220 % Now draw objects of depth: 42
221 beginfig(4)
222 % Begin text object
223 picture p;
224 verbatimtex
225 \font\cmrAB=cmr10 at 10.80pt
226 \font\tenrm=cmr10 at 10.80pt \font\sevenrm=cmr7 at 7.56pt
227 \font\fiverm=cmr5 at 5.40pt \font\teni=cmmi10 at 10.80pt
228 \font\seveni=cmmi7 at 7.56pt \font\fivei=cmmi5 at 5.40pt
229 \font\tensy=cmsy10 at 10.80pt \font\sevensy=cmsy7 at 7.56pt
230 \font\fivesy=cmsy5 at 5.40pt \textfont0\tenrm
231 \scriptfont0\sevenrm \scriptscriptfont0\fiverm
232 \textfont1\teni \scriptfont1\seveni \scriptscriptfont1\fivei
233 \textfont2\tensy \scriptfont2\sevensy \scriptscriptfont2\fivesy
234 etex;
235 p = btex \cmrAB end test etex
236 rotated 90.00;
237 label.urt(p,(240.30,646.20)) withcolor (0.00,0.00,0.00);
238 % End text object
239 setbounds currentpicture to allbounds;
240 endfig;
241 end
242 readme000060000037240003720000000016650713235263300125350ustar00hwflamelet00000000000000This is the readme file for the LaTeX-macro tpmultiinc.sty.
243
244 Included are the following files
245
246 tpmultiinc.sty: The LaTeX style file that includes the macro.
247 All of the "documentation" is in here.
248
249 mptest.tex: The LaTeX-source that contains a small example.
250
251 multitest.fig The Graphic that is used by mptest.tex. In the xFig-format.
252
253 multitest.mmp The Graphic that is used by mptest.tex. In Multiple MetaPost-format.
254 This File is generated from the mulitest.fig file. To make this
255 conversion you need the xfig and transfig programs with the patches
256 to generate multiple MetaPost output. Get these from:
257
258 http://www-sp.iti.informatik.tu-darmstadt.de/software/xfig/
259
260
261 The commands to generate pdf-output from these files are:
262
263 mpost multitest.mmp # call to metapost. This generates mutitest.0 ... multitest.4
264 latex mptest
265 dvips -Pwww -G0 mptest
266 ps2pdf mptest.ps # you'd better have gs >6.0 for this
267 nstead of stepwise to avoid glitches in
268 %% the output
269 \parstepwise{%
270 %%
271 %% Make room for the picture
272 \parbox[t][\layerheight][b]{\layerwidth}{%
273 %%
274 %% Be sure that the files are nicely overlaid
275 %% by anchoring them at (0,0) in a picture environment
276 \begin{picture}(0,0)
277 %% Include at least one file (this is foo.0)
278 \put(0,0) {\includegraphics[#1]{#2.0}}
279 %%
280 %% This is the loop to include all the foo.n files
281 %% like in the mpmulti.sty of ppower.
282 %%
283 \whiledo{\boolean{morelayers}}
284 {\IfFileExists{#2.\thelayer}%
285 {\setboolean{morelayers}{true}%
286 \step{\put(0,0) {{\includegraphics[#1]{#2.\thelayer}}}}
287 \stepcounter{layer}}%
288 {\setboolean{morelayers}{false}}}
289 \end{picture}}}%
290 \\}%
291 mptest.tex000060000037240003720000000002740713234454400134100ustar00hwflamelet00000000000000\documentclass{article}
292 \usepackage[display]{texpower}
293 \usepackage{graphicx}
294 \usepackage{tpmultiinc}
295
296 \begin{document}
297
298 \tpmultiinc[width=\textwidth]{multitest}
299
300 \end{document}
301
302
303 multitest.fig000066400037240003720000000006550713234045600141060ustar00hwflamelet00000000000000#FIG 3.2
304 Landscape
305 Center
306 Metric
307 A4
308 100.00
309 Single
310 -2
311 1200 2
312 1 3 0 1 1 1 46 0 20 0.000 1 0.0000 3555 3375 415 415 3555 3375 3970 3375
313 2 2 0 1 0 7 48 0 -1 0.000 0 0 -1 0 0 5
314 765 1890 3555 1890 3555 3375 765 3375 765 1890
315 2 4 0 1 0 1 44 0 -1 0.000 0 0 7 0 0 5
316 4635 3510 4635 1125 675 1125 675 3510 4635 3510
317 4 0 0 50 0 0 12 0.0000 2 180 750 1125 2565 begin test\001
318 4 0 0 42 0 0 12 1.5708 2 135 615 4005 2430 end test\001
319 multitest.mmp000066400037240003720000000075020713234045700141310ustar00hwflamelet00000000000000%
320 % fig2dev -L (m)mp version 0.03 --- Preamble
321 %
322
323 % Make arrowheads mitered by default
324 % NOTE: subject to change (edited from plain.mp)
325 def forwarr(text t) expr p =
326 _apth:=p;_finarrf(t)
327 enddef;
328 def backarr(text t) expr p =
329 _apth:=p;_finarrb(t)
330 enddef;
331 def _finarrf(text s) text t =
332 if (s=0):fill arrowhead _apth t withcolor white
333 else: fill arrowhead _apth t fi;
334 linejoin:=0;
335 draw arrowhead _apth t
336 enddef;
337 def _finarrb(text s) text t =
338 if (s=0):fill arrowhead reverse _apth t withcolor white
339 else: fill arrowhead reverse _apth t fi;
340 linejoin:=0;
341 draw arrowhead reverse _apth t
342 enddef;
343
344
345 path allbounds;
346 allbounds = (39.78,725.22)--(278.82,725.22)--(278.82,564.12)--(39.78,564.12)--cycle;
347 % Some reasonable defaults
348 ahlength:=7;
349 ahangle:=30;
350 labeloffset:=0;
351 truecorners:=0;
352 bboxmargin:=0;
353 % Now draw objects of depth: 50
354 beginfig(0)
355 % Begin text object
356 picture p;
357 verbatimtex
358 \font\cmrAA=cmr10 at 10.80pt
359 \font\tenrm=cmr10 at 10.80pt \font\sevenrm=cmr7 at 7.56pt
360 \font\fiverm=cmr5 at 5.40pt \font\teni=cmmi10 at 10.80pt
361 \font\seveni=cmmi7 at 7.56pt \font\fivei=cmmi5 at 5.40pt
362 \font\tensy=cmsy10 at 10.80pt \font\sevensy=cmsy7 at 7.56pt
363 \font\fivesy=cmsy5 at 5.40pt \textfont0\tenrm
364 \scriptfont0\sevenrm \scriptscriptfont0\fiverm
365 \textfont1\teni \scriptfont1\seveni \scriptscriptfont1\fivei
366 \textfont2\tensy \scriptfont2\sevensy \scriptscriptfont2\fivesy
367 etex;
368 p = btex \cmrAA begin test etex
369 rotated 0.00;
370 label.urt(p,(67.50,638.10)) withcolor (0.00,0.00,0.00);
371 % End text object
372 setbounds currentpicture to allbounds;
373 endfig;
374 % Now draw objects of depth: 48
375 beginfig(1)
376 % Begin polyline object
377 linecap:=0;
378 linejoin:=0;
379 pickup pencircle scaled 0.90;
380 path p;
381 p = (45.90, 678.60)
382 --(213.30, 678.60)
383 --(213.30, 589.50)
384 --(45.90, 589.50)
385 --(45.90, 678.60)--cycle;
386 draw p withcolor (0.00,0.00,0.00);
387 % End polyline object
388 setbounds currentpicture to allbounds;
389 endfig;
390 % Now draw objects of depth: 46
391 beginfig(2)
392 % Begin ellipse object
393 pickup pencircle scaled 0.90;
394 path c;
395 c = fullcircle scaled 49.80 yscaled 1.00
396 rotated 0.00 shifted (213.30,589.50);
397 fill c withcolor ((0.00,0.00,1.00) + 0.00white);
398 draw c withcolor (0.00,0.00,1.00);
399 % End ellipse object
400 setbounds currentpicture to allbounds;
401 endfig;
402 % Now draw objects of depth: 44
403 beginfig(3)
404 % Begin polyline object
405 linecap:=0;
406 linejoin:=1;
407 pickup pencircle scaled 0.90;
408 path p,pb,sw,nw,ne,se;
409 pair ll,ul,ur,lr;
410 p = (278.10,581.40)--(40.50,724.50);
411 ur = urcorner p; ll = llcorner p;
412 ul = ulcorner p; lr = lrcorner p;
413 sw = fullcircle scaled 12.60 shifted (ll+(6.30,6.30));
414 nw = fullcircle scaled 12.60 shifted (ul+(6.30,-6.30));
415 ne = fullcircle rotated 180 scaled 12.60 shifted (ur+(-6.30,-6.30));
416 se = fullcircle rotated 180 scaled 12.60 shifted (lr+(-6.30,6.30));
417 pb = buildcycle(sw,ll--ul,nw,ul--ur,ne,ur--lr,se,lr--ll);
418 draw pb withcolor (0.00,0.00,0.00);
419 % End polyline object
420 setbounds currentpicture to allbounds;
421 endfig;
422 % Now draw objects of depth: 42
423 beginfig(4)
424 % Begin text object
425 picture p;
426 verbatimtex
427 \font\cmrAB=cmr10 at 10.80pt
428 \font\tenrm=cmr10 at 10.80pt \font\sevenrm=cmr7 at 7.56pt
429 \font\fiverm=cmr5 at 5.40pt \font\teni=cmmi10 at 10.80pt
430 \font\seveni=cmmi7 at 7.56pt \font\fivei=cmmi5 at 5.40pt
431 \font\tensy=cmsy10 at 10.80pt \font\sevensy=cmsy7 at 7.56pt
432 \font\fivesy=cmsy5 at 5.40pt \textfont0\tenrm
433 \scriptfont0\sevenrm \scriptscriptfont0\fiverm
434 \textfont1\teni \scriptfont1\seveni \scriptscriptfont1\fivei
435 \textfont2\tensy \scriptfont2\sevensy \scriptscriptfont2\fivesy
436 etex;
437 p = btex \cmrAB end test etex
438 rotated 90.00;
439 label.urt(p,(240.30,646.20)) withcolor (0.00,0.00,0.00);
440 % End text object
441 setbounds currentpicture to allbounds;
442 endfig;
443 end
444