summaryrefslogtreecommitdiff
path: root/support/pdfrack/testFiles
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/pdfrack/testFiles
Initial commit
Diffstat (limited to 'support/pdfrack/testFiles')
-rw-r--r--support/pdfrack/testFiles/FfG.eps290
-rw-r--r--support/pdfrack/testFiles/FfG.pdfbin0 -> 5603 bytes
-rw-r--r--support/pdfrack/testFiles/OneFigure.eps143
-rw-r--r--support/pdfrack/testFiles/OneFigure.fig24
-rw-r--r--support/pdfrack/testFiles/OneFigure.pdfbin0 -> 3812 bytes
-rw-r--r--support/pdfrack/testFiles/OneFigureAgain.eps175
-rw-r--r--support/pdfrack/testFiles/OneFigureAgain.fig33
-rw-r--r--support/pdfrack/testFiles/OneFigureAgain.pdfbin0 -> 5354 bytes
-rw-r--r--support/pdfrack/testFiles/OtherFigure.eps115
-rw-r--r--support/pdfrack/testFiles/OtherFigure.fig20
-rw-r--r--support/pdfrack/testFiles/OtherFigure.pdfbin0 -> 4768 bytes
-rw-r--r--support/pdfrack/testFiles/OtherFigureAgain.eps127
-rw-r--r--support/pdfrack/testFiles/OtherFigureAgain.fig22
-rw-r--r--support/pdfrack/testFiles/OtherFigureAgain.pdfbin0 -> 5078 bytes
-rw-r--r--support/pdfrack/testFiles/aSubFile.tex15
-rw-r--r--support/pdfrack/testFiles/fR2R.eps109
-rw-r--r--support/pdfrack/testFiles/fR2R.pdfbin0 -> 3019 bytes
-rw-r--r--support/pdfrack/testFiles/makefile27
-rw-r--r--support/pdfrack/testFiles/nonidealmixture-test.tex53
-rw-r--r--support/pdfrack/testFiles/nonidealmixture.eps516
-rw-r--r--support/pdfrack/testFiles/nonidealmixture.pdfbin0 -> 7318 bytes
-rw-r--r--support/pdfrack/testFiles/nonidealmixture.pfg0
-rwxr-xr-xsupport/pdfrack/testFiles/pdfrack.sh429
-rw-r--r--support/pdfrack/testFiles/pdfrack.sty14
-rw-r--r--support/pdfrack/testFiles/pictureFile.tex7
-rw-r--r--support/pdfrack/testFiles/testDoubleImage.tex22
-rw-r--r--support/pdfrack/testFiles/testpdfrack-direct.pdfbin0 -> 16524 bytes
-rw-r--r--support/pdfrack/testFiles/testpdfrack.tex40
-rw-r--r--support/pdfrack/testFiles/toto.eps157
-rw-r--r--support/pdfrack/testFiles/toto.ps61
-rw-r--r--support/pdfrack/testFiles/withInclude.tex38
31 files changed, 2437 insertions, 0 deletions
diff --git a/support/pdfrack/testFiles/FfG.eps b/support/pdfrack/testFiles/FfG.eps
new file mode 100644
index 0000000000..5fbc0ec98d
--- /dev/null
+++ b/support/pdfrack/testFiles/FfG.eps
@@ -0,0 +1,290 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: FfG.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7
+%%CreationDate: Thu Jun 5 11:48:11 2008
+%%For: mboyer@ubu (Marc Boyer)
+%%BoundingBox: 0 0 433 120
+%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 120 moveto 0 0 lineto 433 0 lineto 433 120 lineto closepath clip newpath
+-232.6 365.4 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/reencdict 12 dict def /ReEncode { reencdict begin
+/newcodesandnames exch def /newfontname exch def /basefontname exch def
+/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
+basefontdict { exch dup /FID ne { dup /Encoding eq
+{ exch dup length array copy newfont 3 1 roll put }
+{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
+newfont /FontName newfontname put newcodesandnames aload pop
+128 1 255 { newfont /Encoding get exch /.notdef put } for
+newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
+newfontname newfont definefont pop end } def
+/isovec [
+8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
+8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
+8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
+8#220 /dotlessi 8#230 /oe 8#231 /OE
+8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
+8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
+8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
+8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
+8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
+8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
+8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
+8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
+8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
+8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
+8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
+8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
+8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
+8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
+8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
+8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
+8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
+8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
+8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
+8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
+8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
+8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
+/Times-Roman /Times-Roman-iso isovec ReEncode
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+%
+% here starts figure with depth 50
+% Polyline
+2 slj
+0 slc
+7.500 slw
+n 6000 4650 m 6011 4673 l 6020 4697 l 6029 4722 l 6036 4747 l 6042 4773 l
+ 6047 4800 l 6050 4827 l 6052 4856 l 6053 4885 l 6052 4914 l
+ 6051 4944 l 6047 4975 l 6042 5006 l 6036 5038 l 6029 5069 l
+ 6019 5101 l 6009 5133 l 5997 5165 l 5984 5196 l 5969 5227 l
+ 5953 5258 l 5936 5289 l 5918 5319 l 5898 5348 l 5878 5376 l
+ 5856 5404 l 5833 5430 l 5809 5456 l 5785 5481 l 5759 5504 l
+ 5733 5527 l 5706 5549 l 5678 5569 l 5648 5589 l 5618 5607 l
+ 5588 5625 l 5557 5641 l 5526 5656 l 5493 5670 l 5460 5684 l
+ 5425 5697 l 5389 5709 l 5352 5720 l 5314 5730 l 5275 5740 l
+ 5235 5749 l 5194 5757 l 5152 5764 l 5109 5770 l 5066 5775 l
+ 5022 5780 l 4978 5783 l 4933 5786 l 4888 5787 l 4843 5788 l
+ 4798 5787 l 4753 5786 l 4709 5783 l 4665 5780 l 4621 5775 l
+ 4579 5770 l 4537 5764 l 4496 5757 l 4457 5749 l 4418 5740 l
+ 4381 5730 l 4344 5720 l 4309 5709 l 4275 5697 l 4243 5684 l
+ 4212 5670 l 4182 5656 l 4153 5641 l 4125 5625 l 4095 5606 l
+ 4067 5586 l 4040 5566 l 4014 5544 l 3989 5520 l 3965 5496 l
+ 3942 5470 l 3920 5444 l 3899 5416 l 3879 5387 l 3860 5358 l
+ 3842 5327 l 3825 5296 l 3810 5264 l 3795 5231 l 3782 5198 l
+ 3770 5165 l 3759 5131 l 3749 5097 l 3740 5064 l 3732 5030 l
+ 3725 4997 l 3719 4964 l 3715 4932 l 3711 4900 l 3708 4869 l
+ 3706 4839 l 3705 4810 l 3705 4781 l 3705 4753 l 3706 4726 l
+ 3708 4700 l 3710 4675 l 3713 4650 l 3717 4619 l 3722 4589 l
+ 3729 4559 l 3736 4531 l 3744 4503 l 3754 4476 l 3764 4449 l
+ 3776 4423 l 3789 4398 l 3803 4374 l 3818 4350 l 3834 4328 l
+ 3851 4306 l 3869 4286 l 3887 4266 l 3907 4248 l 3927 4231 l
+ 3947 4215 l 3968 4200 l 3990 4187 l 4011 4174 l 4033 4162 l
+ 4056 4152 l 4078 4142 l 4101 4133 l 4125 4125 l 4146 4118 l
+ 4167 4112 l 4189 4106 l 4212 4101 l 4236 4096 l 4260 4091 l
+ 4286 4087 l 4312 4083 l 4340 4080 l 4368 4077 l 4397 4075 l
+ 4427 4073 l 4457 4072 l 4489 4071 l 4521 4071 l 4553 4071 l
+ 4586 4072 l 4620 4073 l 4653 4075 l 4687 4077 l 4721 4080 l
+ 4755 4083 l 4788 4087 l 4822 4091 l 4856 4096 l 4890 4101 l
+ 4923 4106 l 4957 4112 l 4991 4118 l 5025 4125 l 5057 4132 l
+ 5090 4139 l 5124 4146 l 5158 4154 l 5192 4163 l 5228 4173 l
+ 5263 4183 l 5300 4193 l 5336 4205 l 5373 4217 l 5410 4230 l
+ 5447 4244 l 5484 4258 l 5521 4273 l 5558 4289 l 5594 4306 l
+ 5629 4324 l 5664 4342 l 5697 4360 l 5729 4380 l 5760 4400 l
+ 5790 4420 l 5818 4441 l 5845 4462 l 5870 4484 l 5894 4506 l
+ 5915 4529 l 5936 4552 l 5954 4576 l 5971 4600 l 5986 4625 l
+
+ cp gs col0 s gr
+% Polyline
+n 10500 4650 m 10511 4673 l 10520 4697 l 10529 4722 l 10536 4747 l 10542 4773 l
+ 10547 4800 l 10550 4827 l 10552 4856 l 10553 4885 l 10552 4914 l
+ 10551 4944 l 10547 4975 l 10542 5006 l 10536 5038 l 10529 5069 l
+ 10519 5101 l 10509 5133 l 10497 5165 l 10484 5196 l 10469 5227 l
+ 10453 5258 l 10436 5289 l 10418 5319 l 10398 5348 l 10378 5376 l
+ 10356 5404 l 10333 5430 l 10309 5456 l 10285 5481 l 10259 5504 l
+ 10233 5527 l 10206 5549 l 10178 5569 l 10148 5589 l 10118 5607 l
+ 10088 5625 l 10057 5641 l 10026 5656 l 9993 5670 l 9960 5684 l
+ 9925 5697 l 9889 5709 l 9852 5720 l 9814 5730 l 9775 5740 l
+ 9735 5749 l 9694 5757 l 9652 5764 l 9609 5770 l 9566 5775 l
+ 9522 5780 l 9478 5783 l 9433 5786 l 9388 5787 l 9343 5788 l
+ 9298 5787 l 9253 5786 l 9209 5783 l 9165 5780 l 9121 5775 l
+ 9079 5770 l 9037 5764 l 8996 5757 l 8957 5749 l 8918 5740 l
+ 8881 5730 l 8844 5720 l 8809 5709 l 8775 5697 l 8743 5684 l
+ 8712 5670 l 8682 5656 l 8653 5641 l 8625 5625 l 8595 5606 l
+ 8567 5586 l 8540 5566 l 8514 5544 l 8489 5520 l 8465 5496 l
+ 8442 5470 l 8420 5444 l 8399 5416 l 8379 5387 l 8360 5358 l
+ 8342 5327 l 8325 5296 l 8310 5264 l 8295 5231 l 8282 5198 l
+ 8270 5165 l 8259 5131 l 8249 5097 l 8240 5064 l 8232 5030 l
+ 8225 4997 l 8219 4964 l 8215 4932 l 8211 4900 l 8208 4869 l
+ 8206 4839 l 8205 4810 l 8205 4781 l 8205 4753 l 8206 4726 l
+ 8208 4700 l 8210 4675 l 8213 4650 l 8217 4619 l 8222 4589 l
+ 8229 4559 l 8236 4531 l 8244 4503 l 8254 4476 l 8264 4449 l
+ 8276 4423 l 8289 4398 l 8303 4374 l 8318 4350 l 8334 4328 l
+ 8351 4306 l 8369 4286 l 8387 4266 l 8407 4248 l 8427 4231 l
+ 8447 4215 l 8468 4200 l 8490 4187 l 8511 4174 l 8533 4162 l
+ 8556 4152 l 8578 4142 l 8601 4133 l 8625 4125 l 8646 4118 l
+ 8667 4112 l 8689 4106 l 8712 4101 l 8736 4096 l 8760 4091 l
+ 8786 4087 l 8812 4083 l 8840 4080 l 8868 4077 l 8897 4075 l
+ 8927 4073 l 8957 4072 l 8989 4071 l 9021 4071 l 9053 4071 l
+ 9086 4072 l 9120 4073 l 9153 4075 l 9187 4077 l 9221 4080 l
+ 9255 4083 l 9288 4087 l 9322 4091 l 9356 4096 l 9390 4101 l
+ 9423 4106 l 9457 4112 l 9491 4118 l 9525 4125 l 9557 4132 l
+ 9590 4139 l 9624 4146 l 9658 4154 l 9692 4163 l 9728 4173 l
+ 9763 4183 l 9800 4193 l 9836 4205 l 9873 4217 l 9910 4230 l
+ 9947 4244 l 9984 4258 l 10021 4273 l 10058 4289 l 10094 4306 l
+ 10129 4324 l 10164 4342 l 10197 4360 l 10229 4380 l 10260 4400 l
+ 10290 4420 l 10318 4441 l 10345 4462 l 10370 4484 l 10394 4506 l
+ 10415 4529 l 10436 4552 l 10454 4576 l 10471 4600 l 10486 4625 l
+
+ cp gs col0 s gr
+% Polyline
+gs clippath
+8860 4499 m 9008 4532 l 9021 4473 l 8873 4441 l 8873 4441 l 8984 4496 l 8860 4499 l cp
+eoclip
+n 4950 4500 m 4951 4500 l 4955 4499 l 4961 4498 l 4971 4496 l 4986 4493 l
+ 5006 4490 l 5030 4485 l 5061 4479 l 5097 4473 l 5139 4465 l
+ 5186 4457 l 5239 4447 l 5296 4437 l 5357 4426 l 5421 4414 l
+ 5489 4403 l 5559 4390 l 5630 4378 l 5702 4366 l 5774 4354 l
+ 5846 4342 l 5918 4330 l 5988 4318 l 6057 4307 l 6125 4297 l
+ 6190 4287 l 6254 4277 l 6316 4268 l 6376 4260 l 6433 4252 l
+ 6489 4245 l 6543 4238 l 6595 4232 l 6645 4227 l 6694 4222 l
+ 6741 4218 l 6787 4214 l 6832 4210 l 6876 4208 l 6919 4205 l
+ 6961 4203 l 7003 4202 l 7044 4201 l 7085 4200 l 7125 4200 l
+ 7169 4200 l 7213 4201 l 7257 4202 l 7301 4204 l 7345 4206 l
+ 7390 4209 l 7435 4213 l 7481 4217 l 7528 4221 l 7576 4227 l
+ 7625 4233 l 7675 4239 l 7727 4247 l 7781 4255 l 7836 4264 l
+ 7893 4273 l 7952 4283 l 8013 4294 l 8075 4305 l 8138 4317 l
+ 8203 4330 l 8268 4343 l 8334 4356 l 8400 4369 l 8465 4383 l
+ 8529 4396 l 8591 4409 l 8650 4422 l 8706 4434 l 8758 4446 l
+ 8805 4456 l 8848 4466 l 8885 4474 l 8916 4481 l 8942 4487 l
+ 8962 4491 l 8977 4495 l
+ 9000 4500 l gs col0 s gr gr
+
+% arrowhead
+0 slj
+n 8860 4499 m 8984 4496 l 8873 4441 l col0 s
+% Polyline
+2 slj
+gs clippath
+5089 4945 m 4940 4917 l 4929 4976 l 5078 5004 l 5078 5004 l 4966 4953 l 5089 4945 l cp
+eoclip
+n 9000 4950 m 8998 4950 l 8995 4951 l 8988 4953 l 8977 4955 l 8962 4959 l
+ 8942 4963 l 8916 4969 l 8885 4976 l 8848 4984 l 8805 4994 l
+ 8758 5004 l 8706 5016 l 8650 5028 l 8591 5041 l 8529 5054 l
+ 8465 5067 l 8400 5081 l 8334 5094 l 8268 5107 l 8203 5120 l
+ 8138 5133 l 8075 5145 l 8013 5156 l 7952 5167 l 7893 5177 l
+ 7836 5186 l 7781 5195 l 7727 5203 l 7675 5211 l 7625 5217 l
+ 7576 5223 l 7528 5229 l 7481 5233 l 7435 5237 l 7390 5241 l
+ 7345 5244 l 7301 5246 l 7257 5248 l 7213 5249 l 7169 5250 l
+ 7125 5250 l 7085 5250 l 7044 5249 l 7003 5248 l 6961 5247 l
+ 6919 5245 l 6876 5242 l 6832 5240 l 6787 5236 l 6741 5232 l
+ 6694 5228 l 6645 5223 l 6595 5218 l 6543 5212 l 6489 5205 l
+ 6433 5198 l 6376 5190 l 6316 5182 l 6254 5173 l 6190 5163 l
+ 6125 5153 l 6057 5143 l 5988 5132 l 5918 5120 l 5846 5108 l
+ 5774 5096 l 5702 5084 l 5630 5072 l 5559 5060 l 5489 5047 l
+ 5421 5036 l 5357 5024 l 5296 5013 l 5239 5003 l 5186 4993 l
+ 5139 4985 l 5097 4977 l 5061 4971 l 5030 4965 l 5006 4960 l
+ 4986 4957 l 4971 4954 l
+ 4950 4950 l gs col0 s gr gr
+
+% arrowhead
+0 slj
+n 5089 4945 m 4966 4953 l 5078 5004 l col0 s
+/Times-Roman-iso ff 190.50 scf sf
+6975 4050 m
+gs 1 -1 sc (f) col0 sh gr
+/Times-Roman-iso ff 190.50 scf sf
+6975 5625 m
+gs 1 -1 sc (f-inv) col0 sh gr
+/Times-Roman-iso ff 190.50 scf sf
+4275 4950 m
+gs 1 -1 sc (F) col0 sh gr
+/Times-Roman-iso ff 190.50 scf sf
+9450 4950 m
+gs 1 -1 sc (G) col0 sh gr
+% here ends figure;
+$F2psEnd
+rs
+showpage
+%%Trailer
+%EOF
diff --git a/support/pdfrack/testFiles/FfG.pdf b/support/pdfrack/testFiles/FfG.pdf
new file mode 100644
index 0000000000..f53f85fe62
--- /dev/null
+++ b/support/pdfrack/testFiles/FfG.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/OneFigure.eps b/support/pdfrack/testFiles/OneFigure.eps
new file mode 100644
index 0000000000..77187fedb6
--- /dev/null
+++ b/support/pdfrack/testFiles/OneFigure.eps
@@ -0,0 +1,143 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: OneFigure.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Wed May 14 18:20:44 2003
+%%For: mboyer@tesa22-3 (Marc Boyer)
+%%BoundingBox: 0 0 253 199
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 199 moveto 0 0 lineto 253 0 lineto 253 199 lineto closepath clip newpath
+-107.5 324.4 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+ /DrawEllipse {
+ /endangle exch def
+ /startangle exch def
+ /yrad exch def
+ /xrad exch def
+ /y exch def
+ /x exch def
+ /savematrix mtrx currentmatrix def
+ x y tr xrad yrad sc 0 0 1 startangle endangle arc
+ closepath
+ savematrix setmatrix
+ } def
+
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+%
+% Fig objects follow
+%
+7.500 slw
+% Ellipse
+n 2400 2700 600 600 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 5400 2700 600 600 0 360 DrawEllipse gs col0 s gr
+
+% Ellipse
+n 3900 4800 600 600 0 360 DrawEllipse gs col0 s gr
+
+% Polyline
+n 2400 3300 m
+ 3300 4800 l gs col0 s gr
+% Polyline
+n 3000 2700 m
+ 4800 2700 l gs col0 s gr
+% Polyline
+n 4500 4800 m
+ 5400 3300 l gs col0 s gr
+/Times-Roman ff 240.00 scf sf
+2400 2700 m
+gs 1 -1 sc (CA) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+5400 2700 m
+gs 1 -1 sc (CB) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+3900 4800 m
+gs 1 -1 sc (CC) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+3600 2700 m
+gs 1 -1 sc (AB) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+4800 3900 m
+gs 1 -1 sc (BC) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+2700 3900 m
+gs 1 -1 sc (AC) col0 sh gr
+$F2psEnd
+rs
diff --git a/support/pdfrack/testFiles/OneFigure.fig b/support/pdfrack/testFiles/OneFigure.fig
new file mode 100644
index 0000000000..743e00e46e
--- /dev/null
+++ b/support/pdfrack/testFiles/OneFigure.fig
@@ -0,0 +1,24 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 2400 2700 600 600 2400 2700 3000 2700
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 2700 600 600 5400 2700 6000 2700
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 3900 4800 600 600 3900 4800 4500 4800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 2400 3300 3300 4800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 3000 2700 4800 2700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 4500 4800 5400 3300
+4 0 0 50 0 0 16 0.0000 4 165 345 2400 2700 CA\001
+4 0 0 50 0 0 16 0.0000 4 165 330 5400 2700 CB\001
+4 0 0 50 0 0 16 0.0000 4 165 330 3900 4800 CC\001
+4 0 0 50 0 0 16 0.0000 4 165 345 3600 2700 AB\001
+4 0 0 50 0 0 16 0.0000 4 165 330 4800 3900 BC\001
+4 0 0 50 0 0 16 0.0000 4 165 345 2700 3900 AC\001
diff --git a/support/pdfrack/testFiles/OneFigure.pdf b/support/pdfrack/testFiles/OneFigure.pdf
new file mode 100644
index 0000000000..d8f6b657ee
--- /dev/null
+++ b/support/pdfrack/testFiles/OneFigure.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/OneFigureAgain.eps b/support/pdfrack/testFiles/OneFigureAgain.eps
new file mode 100644
index 0000000000..11c3bf7815
--- /dev/null
+++ b/support/pdfrack/testFiles/OneFigureAgain.eps
@@ -0,0 +1,175 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: OneFigureAgain.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Mon May 26 16:03:15 2003
+%%For: mboyer@tesa22-3 (Marc Boyer)
+%%BoundingBox: 0 0 254 190
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 190 moveto 0 0 lineto 254 0 lineto 254 190 lineto closepath clip newpath
+-107.3 319.9 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+n 4500 4800 m 4200 4280 l 3600 4280 l 3300 4800 l 3600 5320 l 4200 5320 l
+
+ cp gs col0 s gr
+% Polyline
+n 6000 2705 m 5700 2185 l 5100 2185 l 4800 2705 l 5100 3225 l 5700 3225 l
+
+ cp gs col0 s gr
+% Polyline
+n 3000 2705 m 2700 2185 l 2100 2185 l 1800 2705 l 2100 3225 l 2700 3225 l
+
+ cp gs col0 s gr
+% Polyline
+2 slj
+n 3000 2700 m 3002 2698 l 3008 2694 l 3018 2686 l 3032 2675 l 3051 2661 l
+ 3074 2645 l 3100 2628 l 3128 2611 l 3157 2595 l 3185 2580 l
+ 3214 2568 l 3242 2557 l 3270 2549 l 3298 2543 l 3326 2540 l
+ 3355 2539 l 3385 2540 l 3417 2544 l 3450 2550 l 3473 2555 l
+ 3498 2561 l 3523 2568 l 3549 2575 l 3577 2584 l 3606 2593 l
+ 3635 2603 l 3666 2613 l 3697 2624 l 3730 2636 l 3763 2648 l
+ 3797 2661 l 3831 2674 l 3865 2687 l 3900 2700 l 3935 2713 l
+ 3969 2726 l 4003 2739 l 4037 2752 l 4070 2764 l 4103 2776 l
+ 4134 2787 l 4165 2797 l 4194 2807 l 4223 2816 l 4251 2825 l
+ 4277 2832 l 4302 2839 l 4327 2845 l 4350 2850 l 4383 2856 l
+ 4415 2860 l 4445 2861 l 4474 2860 l 4502 2857 l 4530 2851 l
+ 4558 2843 l 4586 2832 l 4615 2820 l 4643 2805 l 4672 2789 l
+ 4700 2772 l 4726 2755 l 4749 2739 l 4768 2725 l 4782 2714 l
+ 4792 2706 l 4798 2702 l
+ 4800 2700 l gs col0 s gr
+% Polyline
+n 5400 3225 m 5401 3228 l 5404 3234 l 5408 3246 l 5414 3264 l 5422 3288 l
+ 5432 3317 l 5443 3351 l 5455 3389 l 5467 3428 l 5478 3469 l
+ 5488 3508 l 5496 3547 l 5503 3584 l 5508 3618 l 5511 3650 l
+ 5511 3680 l 5509 3707 l 5506 3733 l 5499 3756 l 5491 3778 l
+ 5480 3799 l 5466 3819 l 5450 3838 l 5434 3853 l 5417 3869 l
+ 5398 3884 l 5377 3899 l 5355 3914 l 5331 3929 l 5305 3944 l
+ 5278 3959 l 5250 3974 l 5220 3989 l 5189 4004 l 5158 4018 l
+ 5126 4033 l 5093 4048 l 5060 4063 l 5027 4078 l 4995 4093 l
+ 4963 4107 l 4931 4122 l 4901 4136 l 4871 4150 l 4843 4165 l
+ 4816 4179 l 4790 4193 l 4765 4207 l 4742 4221 l 4720 4235 l
+ 4700 4250 l 4678 4267 l 4658 4286 l 4640 4304 l 4623 4324 l
+ 4608 4346 l 4594 4369 l 4582 4393 l 4571 4420 l 4560 4449 l
+ 4551 4480 l 4542 4513 l 4534 4547 l 4527 4583 l 4521 4619 l
+ 4516 4654 l 4511 4688 l 4508 4718 l 4505 4744 l 4503 4765 l
+ 4501 4781 l 4501 4792 l 4500 4797 l
+ 4500 4800 l gs col0 s gr
+% Polyline
+n 2400 3225 m 2399 3228 l 2396 3234 l 2392 3246 l 2386 3264 l 2378 3288 l
+ 2368 3317 l 2357 3351 l 2345 3389 l 2333 3428 l 2322 3469 l
+ 2312 3508 l 2304 3547 l 2297 3584 l 2292 3618 l 2289 3650 l
+ 2289 3680 l 2291 3707 l 2294 3733 l 2301 3756 l 2309 3778 l
+ 2320 3799 l 2334 3819 l 2350 3838 l 2366 3853 l 2383 3869 l
+ 2402 3884 l 2423 3899 l 2445 3914 l 2469 3929 l 2495 3944 l
+ 2522 3959 l 2550 3974 l 2580 3989 l 2611 4004 l 2642 4018 l
+ 2674 4033 l 2707 4048 l 2740 4063 l 2773 4078 l 2805 4093 l
+ 2837 4107 l 2869 4122 l 2899 4136 l 2929 4150 l 2957 4165 l
+ 2984 4179 l 3010 4193 l 3035 4207 l 3058 4221 l 3080 4235 l
+ 3100 4250 l 3122 4267 l 3142 4286 l 3160 4304 l 3177 4324 l
+ 3192 4346 l 3206 4369 l 3218 4393 l 3229 4420 l 3240 4449 l
+ 3249 4480 l 3258 4513 l 3266 4547 l 3273 4583 l 3279 4619 l
+ 3284 4654 l 3289 4688 l 3292 4718 l 3295 4744 l 3297 4765 l
+ 3299 4781 l 3299 4792 l 3300 4797 l
+ 3300 4800 l gs col0 s gr
+/Times-Roman ff 240.00 scf sf
+2400 2700 m
+gs 1 -1 sc (CA) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+5400 2700 m
+gs 1 -1 sc (CB) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+3900 4800 m
+gs 1 -1 sc (CC) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+3600 2700 m
+gs 1 -1 sc (AB) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+4800 3900 m
+gs 1 -1 sc (BC) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+2700 3900 m
+gs 1 -1 sc (AC) col0 sh gr
+$F2psEnd
+rs
diff --git a/support/pdfrack/testFiles/OneFigureAgain.fig b/support/pdfrack/testFiles/OneFigureAgain.fig
new file mode 100644
index 0000000000..e29fb958e4
--- /dev/null
+++ b/support/pdfrack/testFiles/OneFigureAgain.fig
@@ -0,0 +1,33 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 3 0 1 0 7 50 0 -1 0.000 0 0 0 0 0 7
+ 4500 4800 4200 4280 3600 4280 3300 4800 3600 5320 4200 5320
+ 4500 4800
+2 3 0 1 0 7 50 0 -1 0.000 0 0 0 0 0 7
+ 6000 2705 5700 2185 5100 2185 4800 2705 5100 3225 5700 3225
+ 6000 2705
+2 3 0 1 0 7 50 0 -1 0.000 0 0 0 0 0 7
+ 3000 2705 2700 2185 2100 2185 1800 2705 2100 3225 2700 3225
+ 3000 2705
+3 0 0 1 0 7 50 0 -1 0.000 0 0 0 4
+ 3000 2700 3300 2400 4500 3000 4800 2700
+ 0.000 1.000 1.000 0.000
+3 0 0 1 0 7 50 0 -1 0.000 0 0 0 4
+ 5400 3225 5700 3900 4500 4200 4500 4800
+ 0.000 1.000 1.000 0.000
+3 0 0 1 0 7 50 0 -1 0.000 0 0 0 4
+ 2400 3225 2100 3900 3300 4200 3300 4800
+ 0.000 1.000 1.000 0.000
+4 0 0 50 0 0 16 0.0000 4 165 345 2400 2700 CA\001
+4 0 0 50 0 0 16 0.0000 4 165 330 5400 2700 CB\001
+4 0 0 50 0 0 16 0.0000 4 165 330 3900 4800 CC\001
+4 0 0 50 0 0 16 0.0000 4 165 345 3600 2700 AB\001
+4 0 0 50 0 0 16 0.0000 4 165 330 4800 3900 BC\001
+4 0 0 50 0 0 16 0.0000 4 165 345 2700 3900 AC\001
diff --git a/support/pdfrack/testFiles/OneFigureAgain.pdf b/support/pdfrack/testFiles/OneFigureAgain.pdf
new file mode 100644
index 0000000000..c61c1d0d31
--- /dev/null
+++ b/support/pdfrack/testFiles/OneFigureAgain.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/OtherFigure.eps b/support/pdfrack/testFiles/OtherFigure.eps
new file mode 100644
index 0000000000..27fa8ac966
--- /dev/null
+++ b/support/pdfrack/testFiles/OtherFigure.eps
@@ -0,0 +1,115 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: OtherFigure.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Mon May 26 15:34:59 2003
+%%For: mboyer@tesa22-3 (Marc Boyer)
+%%BoundingBox: 0 0 204 110
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 110 moveto 0 0 lineto 204 0 lineto 204 110 lineto closepath clip newpath
+-197.3 198.7 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+n 4200 1500 m 5700 1500 l 5700 2400 l 4200 2400 l
+ cp gs col0 s gr
+% Polyline
+n 3300 1800 m
+ 4200 1800 l gs col0 s gr
+% Polyline
+n 5700 2100 m
+ 6600 2100 l gs col0 s gr
+% Polyline
+n 4800 2400 m
+ 4800 3300 l gs col0 s gr
+/Times-Roman ff 240.00 scf sf
+3375 1725 m
+gs 1 -1 sc (IN) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+4875 3000 m
+gs 1 -1 sc (BASE) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+6150 2025 m
+gs 1 -1 sc (OUT) col0 sh gr
+$F2psEnd
+rs
diff --git a/support/pdfrack/testFiles/OtherFigure.fig b/support/pdfrack/testFiles/OtherFigure.fig
new file mode 100644
index 0000000000..0bc48f9b3d
--- /dev/null
+++ b/support/pdfrack/testFiles/OtherFigure.fig
@@ -0,0 +1,20 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+ 4200 1500 5700 1500 5700 2400 4200 2400 4200 1500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 3300 1800 4200 1800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 5700 2100 6600 2100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 4800 2400 4800 3300
+4 0 0 50 0 0 16 0.0000 4 165 255 3375 1725 IN\001
+4 0 0 50 0 0 16 0.0000 4 165 630 4875 3000 BASE\001
+4 0 0 50 0 0 16 0.0000 4 165 510 6150 2025 OUT\001
diff --git a/support/pdfrack/testFiles/OtherFigure.pdf b/support/pdfrack/testFiles/OtherFigure.pdf
new file mode 100644
index 0000000000..7e3b6dd511
--- /dev/null
+++ b/support/pdfrack/testFiles/OtherFigure.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/OtherFigureAgain.eps b/support/pdfrack/testFiles/OtherFigureAgain.eps
new file mode 100644
index 0000000000..8d07ec46a8
--- /dev/null
+++ b/support/pdfrack/testFiles/OtherFigureAgain.eps
@@ -0,0 +1,127 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: OtherFigureAgain.eps
+%%Creator: fig2dev Version 3.2 Patchlevel 3d
+%%CreationDate: Mon May 26 16:04:34 2003
+%%For: mboyer@tesa22-3 (Marc Boyer)
+%%BoundingBox: 0 0 254 123
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 123 moveto 0 0 lineto 254 0 lineto 254 123 lineto closepath clip newpath
+-170.3 198.7 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+%
+% Fig objects follow
+%
+% Polyline
+7.500 slw
+n 2955 1275 m 2850 1275 2850 1920 105 arcto 4 {pop} repeat
+ 2850 2025 4095 2025 105 arcto 4 {pop} repeat
+ 4200 2025 4200 1380 105 arcto 4 {pop} repeat
+ 4200 1275 2955 1275 105 arcto 4 {pop} repeat
+ cp gs col0 s gr
+% Polyline
+n 5805 1575 m 5700 1575 5700 2220 105 arcto 4 {pop} repeat
+ 5700 2325 6945 2325 105 arcto 4 {pop} repeat
+ 7050 2325 7050 1680 105 arcto 4 {pop} repeat
+ 7050 1575 5805 1575 105 arcto 4 {pop} repeat
+ cp gs col0 s gr
+% Polyline
+n 4605 2550 m 4500 2550 4500 3195 105 arcto 4 {pop} repeat
+ 4500 3300 5745 3300 105 arcto 4 {pop} repeat
+ 5850 3300 5850 2655 105 arcto 4 {pop} repeat
+ 5850 2550 4605 2550 105 arcto 4 {pop} repeat
+ cp gs col0 s gr
+% Polyline
+n 4200 1650 m
+ 5700 2025 l gs col0 s gr
+% Polyline
+n 5100 1875 m
+ 5100 2550 l gs col0 s gr
+/Times-Roman ff 240.00 scf sf
+3375 1725 m
+gs 1 -1 sc (IN) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+4875 3000 m
+gs 1 -1 sc (BASE) col0 sh gr
+/Times-Roman ff 240.00 scf sf
+6150 2025 m
+gs 1 -1 sc (OUT) col0 sh gr
+$F2psEnd
+rs
diff --git a/support/pdfrack/testFiles/OtherFigureAgain.fig b/support/pdfrack/testFiles/OtherFigureAgain.fig
new file mode 100644
index 0000000000..528a0ea23d
--- /dev/null
+++ b/support/pdfrack/testFiles/OtherFigureAgain.fig
@@ -0,0 +1,22 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+ 4200 2025 4200 1275 2850 1275 2850 2025 4200 2025
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+ 7050 2325 7050 1575 5700 1575 5700 2325 7050 2325
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+ 5850 3300 5850 2550 4500 2550 4500 3300 5850 3300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 4200 1650 5700 2025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+ 5100 1875 5100 2550
+4 0 0 50 0 0 16 0.0000 4 165 255 3375 1725 IN\001
+4 0 0 50 0 0 16 0.0000 4 165 630 4875 3000 BASE\001
+4 0 0 50 0 0 16 0.0000 4 165 510 6150 2025 OUT\001
diff --git a/support/pdfrack/testFiles/OtherFigureAgain.pdf b/support/pdfrack/testFiles/OtherFigureAgain.pdf
new file mode 100644
index 0000000000..01d6298bb4
--- /dev/null
+++ b/support/pdfrack/testFiles/OtherFigureAgain.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/aSubFile.tex b/support/pdfrack/testFiles/aSubFile.tex
new file mode 100644
index 0000000000..981dd2ff0d
--- /dev/null
+++ b/support/pdfrack/testFiles/aSubFile.tex
@@ -0,0 +1,15 @@
+
+\section{In the subfile}
+And here is the subfile, with the included figure.
+
+
+\begin{figure}[htb]
+ \centering
+ \psfrag{F}{$\Fset$}
+ \psfrag{G}{$\Gset$}
+ \psfrag{f}{$f$}
+ \psfrag{f-inv}{$f^{-1}$}
+ \pdfrackincludegraphics[width=.6\linewidth]{FfG}
+ \caption{The figure in the sub-file}
+ \label{fig:indoc}
+\end{figure} \ No newline at end of file
diff --git a/support/pdfrack/testFiles/fR2R.eps b/support/pdfrack/testFiles/fR2R.eps
new file mode 100644
index 0000000000..0ee48a9df5
--- /dev/null
+++ b/support/pdfrack/testFiles/fR2R.eps
@@ -0,0 +1,109 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: fR2R.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7
+%%CreationDate: Thu Jun 5 11:29:00 2008
+%%For: mboyer@ubu (Marc Boyer)
+%%BoundingBox: 0 0 115 59
+%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 59 moveto 0 0 lineto 115 0 lineto 115 59 lineto closepath clip newpath
+-169.3 227.5 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.06299 0.06299 sc
+%
+% Fig objects follow
+%
+%
+% here starts figure with depth 50
+% Polyline
+0 slj
+0 slc
+7.500 slw
+n 2700 2700 m 4500 2700 l 4500 3600 l 2700 3600 l
+ cp gs col0 s gr
+/Times-Roman ff 190.50 scf sf
+3150 3150 m
+gs 1 -1 sc (f:R2R) col0 sh gr
+% here ends figure;
+$F2psEnd
+rs
+showpage
+%%Trailer
+%EOF
diff --git a/support/pdfrack/testFiles/fR2R.pdf b/support/pdfrack/testFiles/fR2R.pdf
new file mode 100644
index 0000000000..92c7f837e9
--- /dev/null
+++ b/support/pdfrack/testFiles/fR2R.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/makefile b/support/pdfrack/testFiles/makefile
new file mode 100644
index 0000000000..e08b2f64df
--- /dev/null
+++ b/support/pdfrack/testFiles/makefile
@@ -0,0 +1,27 @@
+LATEX_MASTER= nonidealmixture-test.tex \
+ testDoubleImage.tex testpdfrack.tex withInclude.tex
+
+all: ${LATEX_MASTER:tex=ps} ${LATEX_MASTER:tex=pdf} tex-clean
+
+.SUFFIXES:
+.SUFFIXES: .tex .ps .pdf
+
+withInclude.pdf: FfG.pdf
+
+FfG.pdf: FfG.eps aSubFile.tex
+ ./pdfrack.sh -M withInclude.tex aSubFile.tex
+
+.tex.ps:
+ latex $*
+ dvips $*.dvi -o $*.ps
+
+.tex.pdf:
+ ./pdfrack.sh $*.tex
+ pdflatex $*
+
+tex-clean:
+ \rm -rf ${LATEX_MASTER:tex=log} ${LATEX_MASTER:tex=toc} ${LATEX_MASTER:tex=bbl} \
+ ${LATEX_MASTER:tex=blg} ${LATEX_MASTER:tex=thm} ${LATEX_MASTER:tex=pfg}
+clean:
+ \rm -rf ${LATEX_MASTER:tex=dvi} ${LATEX_MASTER:tex=log} ${LATEX_MASTER:tex=toc} ${LATEX_MASTER:tex=bbl} \
+ ${LATEX_MASTER:tex=blg} ${LATEX_MASTER:tex=thm} ${LATEX_MASTER:tex=ps} ${LATEX_MASTER:tex=pdf} \ No newline at end of file
diff --git a/support/pdfrack/testFiles/nonidealmixture-test.tex b/support/pdfrack/testFiles/nonidealmixture-test.tex
new file mode 100644
index 0000000000..a9974ddaac
--- /dev/null
+++ b/support/pdfrack/testFiles/nonidealmixture-test.tex
@@ -0,0 +1,53 @@
+\documentclass[a4paper]{article}
+\usepackage{psfrag,pdfrack}
+\begin{document}
+Some text.
+\begin{figure}
+\begin{psfrags}%
+\psfragscanon%
+%
+% text strings:
+\psfrag{str01}[t][t]{R134a mole fraction in liquid}%
+\psfrag{str02}[B][B]{Pressure Pa}%
+\psfrag{str05}[lB][lB]{T = 300 K}%
+\psfrag{str06}[l][l]{P}%
+\psfrag{str07}[l][l]{P $x_{R134a}$}%
+\psfrag{str08}[l][l]{P $x_{R123}$}%
+%
+% xticklabels:
+\psfrag{x01}[t][t]{0}%
+\psfrag{x02}[t][t]{0.2}%
+\psfrag{x03}[t][t]{0.4}%
+\psfrag{x04}[t][t]{0.6}%
+\psfrag{x05}[t][t]{0.8}%
+\psfrag{x06}[t][t]{1}%
+%
+% yticklabels:
+\psfrag{v01}[r][r]{0}%
+\psfrag{v02}[r][r]{1}%
+\psfrag{v03}[r][r]{2}%
+\psfrag{v04}[r][r]{3}%
+\psfrag{v05}[r][r]{4}%
+\psfrag{v06}[r][r]{5}%
+\psfrag{v07}[r][r]{6}%
+\psfrag{v08}[r][r]{7}%
+\psfrag{v09}[r][r]{8\setlength{\unitlength}{1ex}%
+\begin{picture}(0,0)\put(0.5,1.5){$\times 10^{5}$}\end{picture}}%
+%
+% extra picture(s):
+\psfrag{origin1}[lb][lb]{\setlength{\unitlength}{2.14739cm}%
+\begin{picture}(1,0.54159)%
+\end{picture}%
+}%
+\psfrag{origin2}[lb][lb]{\setlength{\unitlength}{7.75000cm}%
+\begin{picture}(1,0.78871)%
+\end{picture}%
+}%
+%
+% Figure:
+\resizebox{10cm}{!}{\pdfrackincludegraphics{nonidealmixture}}%
+\end{psfrags}%
+\caption{Non-ideal binary zeotropic mixture of R134a and R123}
+\end{figure}
+\end{document}
+ \ No newline at end of file
diff --git a/support/pdfrack/testFiles/nonidealmixture.eps b/support/pdfrack/testFiles/nonidealmixture.eps
new file mode 100644
index 0000000000..396c1ef500
--- /dev/null
+++ b/support/pdfrack/testFiles/nonidealmixture.eps
@@ -0,0 +1,516 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: MATLAB, The Mathworks, Inc.
+%%Title: e:\nov\code\nonidealmixture.eps
+%%CreationDate: 11/12/02 19:19:07
+%%DocumentNeededFonts: Helvetica
+%%DocumentProcessColors: Cyan Magenta Yellow Black
+%%Extensions: CMYK
+%%Pages: 1
+%%BoundingBox: 28 25 297 245
+%%EndComments
+
+%%BeginProlog
+
+% MathWorks dictionary
+/MathWorks 160 dict begin
+
+% definition operators
+/bdef {bind def} bind def
+/ldef {load def} bind def
+/xdef {exch def} bdef
+/xstore {exch store} bdef
+
+% operator abbreviations
+/c /clip ldef
+/cc /concat ldef
+/cp /closepath ldef
+/gr /grestore ldef
+/gs /gsave ldef
+/mt /moveto ldef
+/np /newpath ldef
+/cm /currentmatrix ldef
+/sm /setmatrix ldef
+/rc {rectclip} bdef
+/rf {rectfill} bdef
+/rm /rmoveto ldef
+/rl /rlineto ldef
+/s /show ldef
+/sc {setcmykcolor} bdef
+/sr /setrgbcolor ldef
+/sg /setgray ldef
+/w /setlinewidth ldef
+/j /setlinejoin ldef
+/cap /setlinecap ldef
+
+% page state control
+/pgsv () def
+/bpage {/pgsv save def} bdef
+/epage {pgsv restore} bdef
+/bplot /gsave ldef
+/eplot {stroke grestore} bdef
+
+% orientation switch
+/portraitMode 0 def
+/landscapeMode 1 def
+
+% coordinate system mappings
+/dpi2point 0 def
+
+% font control
+/FontSize 0 def
+/FMS {
+ /FontSize xstore %save size off stack
+ findfont
+ [FontSize 0 0 FontSize neg 0 0]
+ makefont
+ setfont
+ }bdef
+
+/ISOLatin1Encoding where
+{pop
+/WindowsLatin1Encoding 256 array bdef
+ISOLatin1Encoding WindowsLatin1Encoding copy pop
+/.notdef/.notdef/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
+/circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef/.notdef/.notdef
+/.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash
+/tilde/trademark/scaron/guilsinglright/oe/.notdef/.notdef/Ydieresis
+WindowsLatin1Encoding 128 32 getinterval astore pop}
+{/WindowsLatin1Encoding StandardEncoding bdef} ifelse
+
+/reencode {
+exch dup where
+{pop load} {pop StandardEncoding} ifelse
+exch
+dup 3 1 roll
+findfont dup length dict begin
+ { 1 index /FID ne {def}{pop pop} ifelse } forall
+ /Encoding exch def
+ currentdict
+end
+definefont pop
+} bdef
+
+/isroman {
+findfont /CharStrings get
+/Agrave known
+} bdef
+
+/FMSR {
+3 1 roll 1 index
+dup isroman
+{reencode} {pop pop} ifelse
+exch FMS
+} bdef
+
+/csm {
+ 1 dpi2point div -1 dpi2point div scale
+ neg translate
+ landscapeMode eq {90 rotate} if
+ } bdef
+
+% line types: solid, dotted, dashed, dotdash
+/SO { [] 0 setdash } bdef
+/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+/DA { [6 dpi2point mul] 0 setdash } bdef
+/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
+
+% macros for lines and objects
+/L {
+ lineto
+ stroke
+ } bdef
+/MP {
+ 3 1 roll moveto
+ 1 sub {rlineto} repeat
+ } bdef
+/AP {
+ {rlineto} repeat
+ } bdef
+/PP {
+ closepath eofill
+ } bdef
+/DP {
+ closepath stroke
+ } bdef
+/MR {
+ 4 -2 roll moveto
+ dup 0 exch rlineto
+ exch 0 rlineto
+ neg 0 exch rlineto
+ closepath
+ } bdef
+/FR {
+ MR stroke
+ } bdef
+/PR {
+ MR fill
+ } bdef
+/L1i {
+ { currentfile picstr readhexstring pop } image
+ } bdef
+
+/tMatrix matrix def
+/MakeOval {
+ newpath
+ tMatrix currentmatrix pop
+ translate scale
+ 0 0 1 0 360 arc
+ tMatrix setmatrix
+ } bdef
+/FO {
+ MakeOval
+ stroke
+ } bdef
+/PO {
+ MakeOval
+ fill
+ } bdef
+
+/PD {
+ currentlinecap 1 setlinecap 3 1 roll 2 copy moveto lineto stroke setlinecap
+ } bdef
+
+/FA {
+ newpath
+ tMatrix currentmatrix pop
+ translate scale
+ 0 0 1 5 -2 roll arc
+ tMatrix setmatrix
+ stroke
+ } bdef
+/PA {
+ newpath
+ tMatrix currentmatrix pop
+ translate 0 0 moveto scale
+ 0 0 1 5 -2 roll arc
+ closepath
+ tMatrix setmatrix
+ fill
+ } bdef
+
+/FAn {
+ newpath
+ tMatrix currentmatrix pop
+ translate scale
+ 0 0 1 5 -2 roll arcn
+ tMatrix setmatrix
+ stroke
+ } bdef
+/PAn {
+ newpath
+ tMatrix currentmatrix pop
+ translate 0 0 moveto scale
+ 0 0 1 5 -2 roll arcn
+ closepath
+ tMatrix setmatrix
+ fill
+ } bdef
+
+/MRR {
+ /vradius xdef
+ /hradius xdef
+ /lry xdef
+ /lrx xdef
+ /uly xdef
+ /ulx xdef
+ newpath
+ tMatrix currentmatrix pop
+ ulx hradius add uly vradius add translate
+ hradius vradius scale
+ 0 0 1 180 270 arc
+ tMatrix setmatrix
+ lrx hradius sub uly vradius add translate
+ hradius vradius scale
+ 0 0 1 270 360 arc
+ tMatrix setmatrix
+ lrx hradius sub lry vradius sub translate
+ hradius vradius scale
+ 0 0 1 0 90 arc
+ tMatrix setmatrix
+ ulx hradius add lry vradius sub translate
+ hradius vradius scale
+ 0 0 1 90 180 arc
+ tMatrix setmatrix
+ closepath
+ } bdef
+/FRR {
+ MRR stroke } bdef
+/PRR {
+ MRR fill } bdef
+
+/MlrRR {
+ /lry xdef
+ /lrx xdef
+ /uly xdef
+ /ulx xdef
+ /rad lry uly sub 2 div def
+ newpath
+ tMatrix currentmatrix pop
+ ulx rad add uly rad add translate
+ rad rad scale
+ 0 0 1 90 270 arc
+ tMatrix setmatrix
+ lrx rad sub lry rad sub translate
+ rad rad scale
+ 0 0 1 270 90 arc
+ tMatrix setmatrix
+ closepath
+ } bdef
+/FlrRR {
+ MlrRR stroke } bdef
+/PlrRR {
+ MlrRR fill } bdef
+
+/MtbRR {
+ /lry xdef
+ /lrx xdef
+ /uly xdef
+ /ulx xdef
+ /rad lrx ulx sub 2 div def
+ newpath
+ tMatrix currentmatrix pop
+ ulx rad add uly rad add translate
+ rad rad scale
+ 0 0 1 180 360 arc
+ tMatrix setmatrix
+ lrx rad sub lry rad sub translate
+ rad rad scale
+ 0 0 1 0 180 arc
+ tMatrix setmatrix
+ closepath
+ } bdef
+/FtbRR {
+ MtbRR stroke } bdef
+/PtbRR {
+ MtbRR fill } bdef
+
+currentdict end def
+%%EndProlog
+
+%%BeginSetup
+MathWorks begin
+
+0 cap
+
+end
+%%EndSetup
+
+%%Page: 1 1
+%%BeginPageSetup
+%%PageBoundingBox: 31 28 297 245
+MathWorks begin
+bpage
+%%EndPageSetup
+
+%%BeginObject: obj1
+bplot
+
+/dpi2point 12 def
+portraitMode 0336 2892 csm
+
+ 44 -48 3185 2603 MR c np
+85 dict begin %Colortable dictionary
+/c0 { 0 0 0 sr} bdef
+/c1 { 1 1 1 sr} bdef
+/c2 { 1 0 0 sr} bdef
+/c3 { 0 1 0 sr} bdef
+/c4 { 0 0 1 sr} bdef
+/c5 { 1 1 0 sr} bdef
+/c6 { 1 0 1 sr} bdef
+/c7 { 0 1 1 sr} bdef
+1 j
+1 sg
+ 0 0 3409 2556 PR
+6 w
+0 396 731 0 0 -396 555 685 4 MP
+PP
+-731 0 0 396 731 0 0 -396 555 685 5 MP stroke
+4 w
+DO
+SO
+6 w
+0 sg
+ 555 289 mt 1286 289 L
+ 555 685 mt 1286 685 L
+1286 685 mt 1286 289 L
+ 555 685 mt 555 289 L
+ 555 685 mt 1286 685 L
+ 555 685 mt 555 289 L
+ 555 289 mt 1286 289 L
+ 555 685 mt 1286 685 L
+1286 685 mt 1286 289 L
+ 555 685 mt 555 289 L
+%%IncludeResource: font Helvetica
+/Helvetica /WindowsLatin1Encoding 84 FMSR
+
+ 951 418 mt
+(str06) s
+gs 555 289 732 397 MR c np
+/c8 { 0.000000 0.000000 1.000000 sr} bdef
+c8
+211 0 608 388 2 MP stroke
+
+gr
+c8
+0 sg
+ 951 517 mt
+(str07) s
+gs 555 289 732 397 MR c np
+DO
+24 w
+/c9 { 0.000000 0.500000 0.000000 sr} bdef
+c9
+211 0 608 487 2 MP stroke
+SO
+6 w
+
+gr
+c9
+0 sg
+ 951 616 mt
+(str08) s
+gs 555 289 732 397 MR c np
+DA
+24 w
+/c10 { 1.000000 0.000000 0.000000 sr} bdef
+c10
+211 0 608 586 2 MP stroke
+SO
+6 w
+
+gr
+c10
+0 sg
+%%IncludeResource: font Helvetica
+/Helvetica /WindowsLatin1Encoding 24 FMSR
+
+ 555 680 mt
+(origin1) s
+1 sg
+0 2081 2640 0 0 -2081 443 2272 4 MP
+PP
+-2640 0 0 2081 2640 0 0 -2081 443 2272 5 MP stroke
+4 w
+DO
+SO
+6 w
+0 sg
+ 443 191 mt 3083 191 L
+ 443 2272 mt 3083 2272 L
+3083 2272 mt 3083 191 L
+ 443 2272 mt 443 191 L
+ 443 2272 mt 3083 2272 L
+ 443 2272 mt 443 191 L
+ 443 2272 mt 443 2246 L
+ 443 191 mt 443 217 L
+%%IncludeResource: font Helvetica
+/Helvetica /WindowsLatin1Encoding 120 FMSR
+
+ 347 2418 mt
+(x01) s
+ 971 2272 mt 971 2246 L
+ 971 191 mt 971 217 L
+ 875 2418 mt
+(x02) s
+1499 2272 mt 1499 2246 L
+1499 191 mt 1499 217 L
+1403 2418 mt
+(x03) s
+2027 2272 mt 2027 2246 L
+2027 191 mt 2027 217 L
+1931 2418 mt
+(x04) s
+2555 2272 mt 2555 2246 L
+2555 191 mt 2555 217 L
+2459 2418 mt
+(x05) s
+3083 2272 mt 3083 2246 L
+3083 191 mt 3083 217 L
+2987 2418 mt
+(x06) s
+ 443 2272 mt 469 2272 L
+3083 2272 mt 3057 2272 L
+ 215 2316 mt
+(v01) s
+ 443 2012 mt 469 2012 L
+3083 2012 mt 3057 2012 L
+ 215 2056 mt
+(v02) s
+ 443 1752 mt 469 1752 L
+3083 1752 mt 3057 1752 L
+ 215 1796 mt
+(v03) s
+ 443 1492 mt 469 1492 L
+3083 1492 mt 3057 1492 L
+ 215 1536 mt
+(v04) s
+ 443 1232 mt 469 1232 L
+3083 1232 mt 3057 1232 L
+ 215 1276 mt
+(v05) s
+ 443 971 mt 469 971 L
+3083 971 mt 3057 971 L
+ 215 1015 mt
+(v06) s
+ 443 711 mt 469 711 L
+3083 711 mt 3057 711 L
+ 215 755 mt
+(v07) s
+ 443 451 mt 469 451 L
+3083 451 mt 3057 451 L
+ 215 495 mt
+(v08) s
+ 443 191 mt 469 191 L
+3083 191 mt 3057 191 L
+ 215 235 mt
+(v09) s
+ 443 191 mt 3083 191 L
+ 443 2272 mt 3083 2272 L
+3083 2272 mt 3083 191 L
+ 443 2272 mt 443 191 L
+gs 443 191 2641 2082 MR c np
+c8
+264 -153 264 -142 264 -138 264 -137 264 -140 264 -148 264 -156 264 -170
+264 -184 264 -202 443 2017 11 MP stroke
+DO
+24 w
+c9
+264 -320 264 -281 264 -250 264 -221 264 -196 264 -170 264 -144 264 -115
+264 -82 264 -46 443 2272 11 MP stroke
+DA
+c10
+264 167 264 139 264 112 264 84 264 55 264 23 264 -13 264 -54
+264 -102 264 -156 443 2017 11 MP stroke
+
+gr
+24 w
+c10
+DA
+0 sg
+1630 2561 mt
+(str01) s
+ 160 1365 mt -90 rotate
+(str02) s
+90 rotate
+2429 333 mt
+(str05) s
+%%IncludeResource: font Helvetica
+/Helvetica /WindowsLatin1Encoding 24 FMSR
+
+ 443 2267 mt
+(origin2) s
+SO
+6 w
+
+end
+
+eplot
+%%EndObject
+
+epage
+end
+
+showpage
+
+%%Trailer
+%%EOF
diff --git a/support/pdfrack/testFiles/nonidealmixture.pdf b/support/pdfrack/testFiles/nonidealmixture.pdf
new file mode 100644
index 0000000000..d2aa5a7eae
--- /dev/null
+++ b/support/pdfrack/testFiles/nonidealmixture.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/nonidealmixture.pfg b/support/pdfrack/testFiles/nonidealmixture.pfg
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/support/pdfrack/testFiles/nonidealmixture.pfg
diff --git a/support/pdfrack/testFiles/pdfrack.sh b/support/pdfrack/testFiles/pdfrack.sh
new file mode 100755
index 0000000000..8b653ae1f9
--- /dev/null
+++ b/support/pdfrack/testFiles/pdfrack.sh
@@ -0,0 +1,429 @@
+#!/bin/sh -u
+# Authors: Marc Boyer
+# Esa Hyytia (header option)
+# Date : 10/6/2008
+
+# Version : 0.5
+
+# sh options
+# -u Treat unset variables as an error when substituting.
+# -v Print shell input lines as they are read.
+# -x Print commands and their arguments as they are executed.
+
+
+# Erase de LANG environment variable, because it can create bugs with
+# sed. With my "fr_FR@euro" value, some regular expression in ps2epsi
+# fail.
+LANG=
+
+# Tools
+PS2EPS=ps2epsi
+PS2EPS_CMDNAME=ps2epsi
+
+
+# Default options
+
+METHOD=2
+PS2PS_OPT=no
+EPS2EPS_OPT=no
+CLEAN_OPT="yes"
+FORCE_EPSI_OPT="no"
+OWN_HEADER_OPT=""
+MASTER_FILE_OPT=""
+AUTO="no"
+
+TMPD=/tmp
+
+
+# usage method
+usage() {
+cat <<EOF
+Usage: $0 [-h][-p][-e][-a][-m method][-H header_file.tex][-M master_file.tex] file.tex
+ -h: help
+ -m: method: integer in 0..3 (default is 2)
+ the number of the method used to convert dvi to pdf
+ if one method fails, try another, and add -p and/or -e options :-)
+ -p: filter each postscript file with ps2ps
+ -e: filter each encapsulated postscript file with eps2eps
+ -a: auto/all, translate all figures included with \includegraphics (avoid
+ the use of \pdfrackincludegraphics)
+ -i: force use of ps2epsi instead of ps2eps
+ -k: keep (all tempory files are keeped, usefull for debug)
+ -H: own header file (default is to extract from .tex file)
+ -M: master file (to handle sub files)
+
+Authors: Marc Boyer <Marc.Boyer@enseeiht.fr>
+Contributors: Esa Hyytia (header option)
+Version: 1.0
+EOF
+}
+
+
+detect_ps2eps_filter() {
+ ps2eps -V > /dev/null
+ if [ $? -ne 0 ]
+ then
+cat<<EOF
+Warning: ps2eps not found. Using ps2epsi instead
+ this should produce incorrect bounding boxes
+You can disable this warning with option -i
+You can find ps2eps at:
+ http://www.ipv6.tm.uka.de/~bless/ps2eps
+ ps2eps: (C)opyright 1998-2004 Roland Bless
+EOF
+ PS2EPS=ps2epsi
+ PS2EPS_CMDNAME=ps2epsi
+ else
+ PS2EPS=ps2eps_with_output
+ PS2EPS_CMDNAME=ps2eps
+ fi
+}
+
+
+
+cleantexfiles(){
+ if [ $CLEAN_OPT = "yes" ]
+ then
+ \rm -f ${FIGNAME}.tex ${FIGNAME}.dvi ${FIGNAME}.aux ${FIGNAME}.log ${FIGNAME}.thm
+ fi
+}
+
+cleanfiles(){
+ if [ $CLEAN_OPT = "yes" ]
+ then
+ echo "Removing temporary files"
+ cleantexfiles;
+ \rm -f $*
+ fi
+}
+
+
+detect_mktemp(){
+ mktemp /tmp/testMktemp-XXXXXX > /dev/null
+ if [ $? = "1" ]
+ then
+ echo "Warning: no mktemp foumd"
+ MKTEMP=echo
+ else
+ MKTEMP=mktemp
+ fi
+ \rm -f /tmp/testMktemp-*
+}
+
+
+# This function is "like" ps2eps except that his second argument is
+# the name of the output file
+
+ps2eps_with_output() {
+ mv $1 $1.ps
+ ps2eps -q $1.ps
+ mv $1.eps $2
+}
+
+
+# This function just runs ps2ps on its first argument, and uses
+# the second argument to store the old file, if the PS2PS_OPT is set
+# to yes
+# Classical uses are
+# ps2psFilter file.ps file.ps.bak
+# ps2psFilter file.ps file-raw.ps
+ps2psFilter(){
+ if [ ${PS2PS_OPT} = "yes" ]
+ then
+ echo " Cleaning ps with ps2ps filter"
+ mv $1 $2
+ ps2ps $2 $1
+ fi
+}
+
+# Same as ps2ps with eps
+eps2epsFilter(){
+ if [ ${EPS2EPS_OPT} = "yes" ]
+ then
+ echo " Cleaning eps with eps2eps filter"
+ mv $1 $2
+ eps2eps $2 $1
+ fi
+}
+
+# This simple version relies on dvips + ps2pdf.
+# It outputs a too wide bounding box
+dvi2pdfV0() {
+ echo "Method 0: Trying conversion with dvips -|-> ps2pdf"
+ echo "Converting dvi -> ps (dvips)"
+ FIG_DVIPS=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2ps.ps.XXXXXX`
+ FIG_DVIPS_RAW=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2ps-raw.ps.XXXXXX`
+ dvips -f -q ${FIGNAME}.dvi > ${FIG_DVIPS}
+ ps2psFilter ${FIG_DVIPS} ${FIG_DVIPS_RAW}
+ echo "Converting ps -> pdf (ps2pdf)"
+ ps2pdf ${FIG_DVIPS} ${FIGNAME}.pdf
+ cleanfiles ${FIG_DVIPS} {FIG_DVIPS_RAW};
+}
+
+
+
+# This version relies on dvips + PS2EPS + eps2pdf.
+# It often works
+dvi2pdfV1() {
+ echo "Method 1: Trying conversion with dvips -|-> "${PS2EPS_CMDNAME}" -|-> epstopdf"
+ dvi2pdfV1_noPrompt;
+}
+
+dvi2pdfV1_noPrompt() {
+ FIG_DVIPS=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2ps.ps.XXXXXX`
+ FIG_DVIPS_RAW=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2ps-raw.ps.XXXXXX`
+ FIG_DVIPS_EPS=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2ps-ps2eps.eps.XXXXXX`
+ FIG_DVIPS_EPS_RAW=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2ps-ps2eps-raw.eps.XXXXXX`
+ echo "Converting dvi -> ps (dvips)"
+ dvips -f -q ${FIGNAME}.dvi | egrep -v "^%%BoundingBox:" > ${FIG_DVIPS};
+ ps2psFilter ${FIG_DVIPS} ${FIG_DVIPS_RAW}
+ echo "Converting ps -> eps ("${PS2EPS_CMDNAME}")"
+ ${PS2EPS} ${FIG_DVIPS} ${FIG_DVIPS_EPS}
+ eps2epsFilter ${FIG_DVIPS_EPS} ${FIG_DVIPS_EPS_RAW}
+ echo "Converting eps -> pdf (epstopdf)"
+ epstopdf ${FIG_DVIPS_EPS} --outfile=${FIGNAME}.pdf
+ cleanfiles $FIG_DVIPS $FIG_DVIPS_RAW $FIG_DVIPS_EPS $FIG_DVIPS_EPS_RAW;
+}
+
+# This version relies on dvips + PS2EPS + eps2eps + eps2pdf.
+dvi2pdfV2() {
+ echo "Method 2: Trying conversion with dvips -|-> " ${PS2EPS_CMDNAME} "-|-> eps2eps -|-> epstopdf"
+ if [ $EPS2EPS_OPT = "yes" ]
+ then
+ dvi2pdfV1_noPrompt;
+ else
+ EPS2EPS_OPT="yes";
+ dvi2pdfV1_noPrompt;
+ EPS2EPS_OPT="no";
+ fi
+}
+
+
+# This version relies on dvips -E + eps2eps + eps2pdf.
+dvi2pdfV3(){
+ echo "Trying conversion with dvips -E -|-> eps2eps -|-> eps2pdf"
+ FIG_DVIEPS=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2eps.eps.XXXXXX`
+ FIG_DVIEPS_RAW=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2eps-raw.eps.XXXXXX`
+ FIG_DVIEPS_EPS=`${MKTEMP} ${TMPD}/${FIGNAME}-dvi2eps-eps2eps.eps.XXXXXX`
+ echo "Converting dvi -> eps (dvips -E)"
+ dvips -f -q -E ${FIGNAME}.dvi > ${FIG_DVIEPS}
+ echo "Tightening the bounding box (eps2eps)"
+ mv ${FIG_DVIEPS} ${FIG_DVIEPS_RAW}
+ eps2eps ${FIG_DVIEPS_RAW} ${FIG_DVIEPS_EPS}
+ echo "Converting eps -> pdf (epstopdf)"
+ epstopdf ${FIG_DVIEPS_EPS} --outfile=${FIGNAME}.pdf
+ cleanfiles $FIG_DVIEPS $FIG_DVIEPS_RAW $FIG_DVIEPS_EPS;
+}
+
+
+# Compiling one figure
+# Input: File ${MAIN}.header
+# File ${MAIN}.figure
+# ${FIGNAME}.tex
+# ${METHOD}
+compileOneFigure() {
+ echo "Using LaTeX: producting dvi"
+ cat ${MAIN}.header > ${FIGNAME}.tex
+ echo ":pagestyle{empty}:renewcommand{:caption}[1]{}" | \
+ sed 's/:/\\/g' >> ${FIGNAME}.tex
+ # There could be several pdfrackincludegraphics in the same figure
+ # environment... Then, the script should there just keep one.
+ #set -x
+ # Simple expression:
+ # grep -n "^.*\\pdfrackincludegraphics.*{${FIGNAME}}" ${MAIN}.figure
+ # More precise expression
+ KEEPED_LINE=`grep -n "^.*\\pdfrackincludegraphics\(\[[^]]*\]\)*{${FIGNAME}}" ${MAIN}.figure | cut -f1 -d:`
+ sed ${KEEPED_LINE}!s/pdfrackincludegraphics/pdfracknullcommand/ ${MAIN}.figure \
+ >> ${FIGNAME}.tex
+ echo ':end{document}' | sed 's/:/\\/g' >> ${FIGNAME}.tex
+ if [ ! -r ${FIGNAME}.tex ] ; then
+ echo "Fail: no readable file "${FIGNAME}.tex
+ return
+ fi
+ latex -interaction=batchmode ${FIGNAME}.tex
+# The main pb is: how to convert from dvi to pdf, with the right size ?
+# The option "-E" of dvips "only works [...] at marks made by
+# characters and rules, not by any included graphics".
+# So I have tried some versions, and the 2d seems to be the more
+# efficient, but, sometimes, another is better...
+ if [ -r ${FIGNAME}.dvi ]
+ then
+ case ${METHOD} in
+ 0) echo "Warning: Method 0 should produce bad size";
+ dvi2pdfV0;;
+ 1) dvi2pdfV1;;
+ 2) dvi2pdfV2;;
+ 3) dvi2pdfV3;;
+ *) echo "Unknown method "${METHOD};
+ cleantexfiles;;
+ esac
+ else
+ echo "Fail: no readable file "${FIGNAME}.dvi
+ fi
+}
+
+
+
+######################################################################
+## Main
+
+
+# Check paremetes and set options
+
+set - - `getopt ahm:H:M:peki $*`
+if [ $? != 0 ];
+then
+ usage;
+ exit;
+fi
+#echo "Options are:"$*
+for i in $*
+do
+ case $i in
+ -m) METHOD=$3; shift 2;;
+ -p) PS2PS_OPT="yes"; shift 1;;
+ -e) EPS2EPS_OPT="yes"; shift 1;;
+ -a) AUTO="yes"; shift 1;;
+ -k) CLEAN_OPT=no; shift 1;;
+ -i) FORCE_EPSI_OPT="yes"; shift 1;;
+ -H) OWN_HEADER_OPT=$3; shift 2;;
+ -M) MASTER_FILE_OPT=$3; shift 2;;
+ -h)
+ usage;
+ exit;;
+ --) shift
+ break;;
+ esac
+ # echo "Remaining options are:"$*
+ done
+ shift 1; # To drop the -- added by command set - - `getopt cho: $*`
+
+#echo "After all Remaining options are:"$*
+
+
+if [ $# -lt 1 ]
+then
+ echo "Error: No input parameter file";
+ usage;
+ exit;
+fi
+#echo "toto"
+if [ ! -f $1 -o ! -r $1 ] ; then
+ echo "Error: File $1 unreadable"
+ exit 1
+fi
+
+if [ $FORCE_EPSI_OPT = no ] ;
+then
+ detect_ps2eps_filter;
+fi
+
+if [ x$MASTER_FILE_OPT != "x" -a x$OWN_HEADER_OPT != "x" ]; then
+ echo "Error: options -M and -H are incompatible"
+ exit 1
+fi
+if [ x$MASTER_FILE_OPT != "x" ] ; then
+ if [ ! -f $MASTER_FILE_OPT -o ! -r $MASTER_FILE_OPT ]; then
+ echo "Error: file $MASTER_FILE_OPT unreadable"
+ exit 1
+ fi
+fi
+if [ x$OWN_HEADER_OPT != "x" ]; then
+ if [ ! -f $OWN_HEADER_OPT -o ! -r $OWN_HEADER_OPT ]; then
+ echo "Error: file $OWN_HEADER_OPT unreadable"
+ exit 1
+ fi
+fi
+
+
+MAIN=`basename $1 "\..*"`
+
+# Check for Dos files
+if [ `wc -l < $1` -eq 1 ] ; then
+cat <<EOF
+ Suspicious file: your file is only one line long !"
+ If your file comes from Dos/Windows world, you should"
+ try command
+ tr "\r" "\n" < MAIN > unix-MAIN
+ and then run the script on unix-MAIN
+EOF
+ echo " (with MAIN="$MAIN")"
+ exit 1
+fi
+
+# Check for bash noclober option
+if [ `basename $SHELL` = bash ] ; then
+ set +o noclobber
+fi
+
+detect_mktemp;
+
+if [ x$OWN_HEADER_OPT != "x" ]; then
+ cat $OWN_HEADER_OPT > ${MAIN}.header
+else if [ x$MASTER_FILE_OPT != "x" ]; then
+ # Extract the header of the file, is, all from first line to
+ # the "\]begin{document}"
+ HEADERSIZE=`grep -n "^[\]begin{document}" ${MASTER_FILE_OPT} | head -1 | cut -f1 -d:`
+ if [ x${HEADERSIZE} = "x" ]; then
+ echo "Error: no \\\\begin{document} found in file "${MASTER_FILE_OPT}
+ exit 1
+ fi
+ head -${HEADERSIZE} ${MASTER_FILE_OPT} > ${MAIN}.header
+else
+ HEADERSIZE=`grep -n "^[\]begin{document}" $1 | head -1 | cut -f1 -d:`
+ if [ x${HEADERSIZE} = "x" ]; then
+ echo "Error: no \\\\begin{document} found in file "$1
+ exit 1
+ fi
+ head -${HEADERSIZE} $1 > ${MAIN}.header
+fi
+fi
+
+# Create a file with the line number of the figures
+{ grep -n "^[ ]*[\]begin{figure}" $1 ; \
+ grep -n "^[ ]*[\]end{figure}" $1; } | cut -f1 -d: \
+ | sort -n > ${MAIN}.figlines
+
+# Proceedes the files
+cat ${MAIN}.figlines | while read BEGIN
+do {
+ read END
+ # Creates a file
+ DIFF=`expr ${END} - ${BEGIN} + 1`
+ head -${END} $1 | tail -${DIFF} | sed 's/^%.*$//' | \
+ sed 's/\([^\]\)%.*$/\1/'> ${MAIN}.figure
+ # Debug: grep "\pdfrackincludegraphics\[.*\]{.*}" ${MAIN}.figure
+ # Comment on the regular expression used
+ # The (extended) regular expr for egrep has 4 parts:
+ # - ^[^%] : excludes any '%' in the beginning of the line (to
+ # avoid to match a pdfrackincludegraphics in comments
+ # - \pdfrackincludegraphics : just matches the macro name
+ # - (\[[^]]*\])? : the optionnal options
+ # the (...)? means that this subpart is repeated 0 or 1 time (need egrep)
+ # the \[...\] are juste the delimiters of LaTeX option
+ # the [^]]* matches any sequence without any ']'
+ # - {[^}]*} : the name of the figure
+ # The regular expersions used by sed is quite the same, except that,
+ # - because de (...)? is not allowed, two expressions are used
+ # - there are pair of \( \) is used to capture the name of the figure
+ # - there is a .*$ used to capture the end of the line
+ if [ $AUTO = "no" ]; then
+ egrep "^[^%]*\pdfrackincludegraphics(\[[^]]*\])?{[^}]*}" ${MAIN}.figure | \
+ sed -e 's/^[^%]*\\pdfrackincludegraphics\[.*\]{\([^}]*\)}.*$/\1/' \
+ -e 's/^[^%]*\\pdfrackincludegraphics{\([^}]*\)}.*$/\1/' \
+ > ${MAIN}.fignames
+ else
+ egrep "^[^%]*\includegraphics(\[[^]]*\])?{[^}]*}" ${MAIN}.figure | \
+ sed -e 's/^[^%]*\\includegraphics\[.*\]{\([^}]*\)}.*$/\1/' \
+ -e 's/^[^%]*\\includegraphics{\([^}]*\)}.*$/\1/' \
+ > ${MAIN}.fignames
+ fi
+ for FIGNAME in `cat ${MAIN}.fignames`
+ do
+ echo "----------------------------------------------"
+ echo " ---> Converting figure $FIGNAME"
+ compileOneFigure;
+ done
+} done
+
+\rm ${MAIN}.figlines ${MAIN}.header ${MAIN}.figure ${MAIN}.fignames
diff --git a/support/pdfrack/testFiles/pdfrack.sty b/support/pdfrack/testFiles/pdfrack.sty
new file mode 100644
index 0000000000..971d0dad43
--- /dev/null
+++ b/support/pdfrack/testFiles/pdfrack.sty
@@ -0,0 +1,14 @@
+\ProvidesPackage{pdfrack}[2007/10/15 A hack for using psfrag and pdflatex]
+\RequirePackage{psfrag}
+\RequirePackage{ifpdf}
+\RequirePackage{graphicx}
+
+\ifpdf
+ \newcommand{\pdfrackincludegraphics}[2][]{\includegraphics[]{#2}}
+\else
+ \newcommand{\pdfrackincludegraphics}[2][]{\includegraphics[#1]{#2}}
+\fi
+
+% Just a command that hide its arguments
+% It is used to ``hide'' some unexpected \pdfrackincludegraphics
+\newcommand{\pdfracknullcommand}[2][]{} \ No newline at end of file
diff --git a/support/pdfrack/testFiles/pictureFile.tex b/support/pdfrack/testFiles/pictureFile.tex
new file mode 100644
index 0000000000..171f8e53ca
--- /dev/null
+++ b/support/pdfrack/testFiles/pictureFile.tex
@@ -0,0 +1,7 @@
+\documentclass{article}
+
+\title{An exemple with the \}
+
+\begin{document}
+
+\end{document}
diff --git a/support/pdfrack/testFiles/testDoubleImage.tex b/support/pdfrack/testFiles/testDoubleImage.tex
new file mode 100644
index 0000000000..893718f0b6
--- /dev/null
+++ b/support/pdfrack/testFiles/testDoubleImage.tex
@@ -0,0 +1,22 @@
+\documentclass[a4paper]{article}
+\usepackage{psfrag,pdfrack}
+\begin{document}
+Some text.
+\begin{figure}[htbp]
+ \begin{center}
+ \psfrag{CA}{$\mathcal{C}_A$}
+ \psfrag{CB}{$\mathcal{C}_B$}
+ \psfrag{CC}{$\mathcal{C}_C$}
+ \psfrag{AB}{$\overrightarrow{AB}$}
+ \psfrag{AC}{$\overrightarrow{AC}$}
+ \psfrag{BC}{$\overrightarrow{BC}$}
+ \pdfrackincludegraphics[width=.6\linewidth]{OneFigureAgain}
+ \psfrag{IN}{$\displaystyle \int_0^{g(t)}e^{f(x)}\mathrm{d}x$}
+ \psfrag{OUT}{$\displaystyle \int_0^{t}\Theta(x)\mathrm{d}x$}
+ \psfrag{BASE}{$t$}
+ \pdfrackincludegraphics[width=.8\linewidth]{OtherFigureAgain}
+ \end{center}
+\end{figure}
+
+\end{document}
+
diff --git a/support/pdfrack/testFiles/testpdfrack-direct.pdf b/support/pdfrack/testFiles/testpdfrack-direct.pdf
new file mode 100644
index 0000000000..16653f3129
--- /dev/null
+++ b/support/pdfrack/testFiles/testpdfrack-direct.pdf
Binary files differ
diff --git a/support/pdfrack/testFiles/testpdfrack.tex b/support/pdfrack/testFiles/testpdfrack.tex
new file mode 100644
index 0000000000..3a333abc8a
--- /dev/null
+++ b/support/pdfrack/testFiles/testpdfrack.tex
@@ -0,0 +1,40 @@
+\documentclass[a4paper]{article}
+\usepackage{psfrag,pdfrack}
+\usepackage{graphicx}
+\begin{document}
+Some text.
+\begin{figure}
+ \psfrag{CA}{$\mathcal{C}_A$}
+ \psfrag{CB}{$\mathcal{C}_B$}
+ \psfrag{CC}{$\mathcal{C}_C$}
+ \psfrag{AB}{$\overrightarrow{AB}$}
+ \psfrag{AC}{$\overrightarrow{AC}$}
+ \psfrag{BC}{$\overrightarrow{BC}$}
+ \pdfrackincludegraphics[width=.6\linewidth]{OneFigure}
+\end{figure}
+\begin{figure}
+ \psfrag{IN}{$\displaystyle \int_0^{g(t)}e^{f(x)}\mathrm{d}x$}
+ \psfrag{OUT}{$\displaystyle \int_0^{t}\Theta(x)\mathrm{d}x$}
+ \psfrag{BASE}{$t$}
+ \pdfrackincludegraphics[width=.8\linewidth]{OtherFigure}
+\end{figure}
+
+
+\begin{figure}[htbp]
+ \begin{center}
+ \psfrag{CA}{$\mathcal{C}_A$}
+ \psfrag{CB}{$\mathcal{C}_B$}
+ \psfrag{CC}{$\mathcal{C}_C$}
+ \psfrag{AB}{$\overrightarrow{AB}$}
+ \psfrag{AC}{$\overrightarrow{AC}$}
+ \psfrag{BC}{$\overrightarrow{BC}$}
+ \pdfrackincludegraphics[width=.6\linewidth]{OneFigureAgain}
+ \psfrag{IN}{$\displaystyle \int_0^{g(t)}e^{f(x)}\mathrm{d}x$}
+ \psfrag{OUT}{$\displaystyle \int_0^{t}\Theta(x)\mathrm{d}x$}
+ \psfrag{BASE}{$t$}
+ \pdfrackincludegraphics[width=.8\linewidth]{OtherFigureAgain}
+ \end{center}
+\end{figure}
+
+\end{document}
+ \ No newline at end of file
diff --git a/support/pdfrack/testFiles/toto.eps b/support/pdfrack/testFiles/toto.eps
new file mode 100644
index 0000000000..bc9605c329
--- /dev/null
+++ b/support/pdfrack/testFiles/toto.eps
@@ -0,0 +1,157 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%BoundingBox: 0 0 253 199
+%%HiResBoundingBox: 0.000000 0.000000 252.725220 198.624658
+%.........................................
+%%Creator: GNU Ghostscript 705 (epswrite)
+%%CreationDate: 2003/05/26 16:38:08
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 2
+%%EndComments
+%%BeginProlog
+% This copyright applies to everything between here and the %%EndProlog:
+% Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
+%%BeginResource: procset GS_epswrite_2_0_1001
+/GS_epswrite_2_0_1001 80 dict dup begin
+/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
+4 index eq and{ pop pop pop}{ PageSize dup 1
+5 -1 roll put 0 4 -1 roll put dup null eq {false} {dup where} ifelse{ exch get exec}
+{ pop/setpagedevice where
+{ pop 1 dict dup /PageSize PageSize put setpagedevice}
+{ /setpage where{ pop PageSize aload pop pageparams 3 {exch pop} repeat
+setpage}if}ifelse}ifelse}ifelse} bind def
+/!{bind def}bind def/#{load def}!/N/counttomark #
+/rG{3{3 -1 roll 255 div}repeat setrgbcolor}!/G{255 div setgray}!/K{0 G}!
+/r6{dup 3 -1 roll rG}!/r5{dup 3 1 roll rG}!/r3{dup rG}!
+/w/setlinewidth #/J/setlinecap #
+/j/setlinejoin #/M/setmiterlimit #/d/setdash #/i/setflat #
+/m/moveto #/l/lineto #/c/rcurveto #
+/p{N 2 idiv{N -2 roll rlineto}repeat}!
+/P{N 0 gt{N -2 roll moveto p}if}!
+/h{p closepath}!/H{P closepath}!
+/lx{0 rlineto}!/ly{0 exch rlineto}!/v{0 0 6 2 roll c}!/y{2 copy c}!
+/re{4 -2 roll m exch dup lx exch ly neg lx h}!
+/^{3 index neg 3 index neg}!
+/f{P fill}!/f*{P eofill}!/s{H stroke}!/S{P stroke}!
+/q/gsave #/Q/grestore #/rf{re fill}!
+/Y{P clip newpath}!/Y*{P eoclip newpath}!/rY{re Y}!
+/|={pop exch 4 1 roll 1 array astore cvx 3 array astore cvx exch 1 index def exec}!
+/|{exch string readstring |=}!
+/+{dup type/nametype eq{2 index 7 add -3 bitshift 2 index mul}if}!
+/@/currentfile #/${+ @ |}!
+/B{{2 copy string{readstring pop}aload pop 4 array astore cvx
+3 1 roll}repeat pop pop true}!
+/Ix{[1 0 0 1 11 -2 roll exch neg exch neg]exch}!
+/,{true exch Ix imagemask}!/If{false exch Ix imagemask}!/I{exch Ix image}!
+/Ic{exch Ix false 3 colorimage}!
+/F{/Columns counttomark 3 add -2 roll/Rows exch/K -1/BlackIs1 true>>
+/CCITTFaxDecode filter}!/FX{<</EndOfBlock false F}!
+/X{/ASCII85Decode filter}!/@X{@ X}!/&2{2 index 2 index}!
+/@F{@ &2<<F}!/@C{@X &2 FX}!
+/$X{+ @X |}!/&4{4 index 4 index}!/$F{+ @ &4<<F |}!/$C{+ @X &4 FX |}!
+/IC{3 1 roll 10 dict begin 1{/ImageType/Interpolate/Decode/DataSource
+/ImageMatrix/BitsPerComponent/Height/Width}{exch def}forall
+currentdict end image}!
+/~{@ read {pop} if}!
+end readonly def
+%%EndResource
+/pagesave null def
+%%EndProlog
+%%Page: 1 1
+%%BeginPageSetup
+GS_epswrite_2_0_1001 begin
+/pagesave save store 197 dict begin
+0.1 0.1 scale
+%%EndPageSetup
+gsave mark
+K
+0 0 0 0 rf
+Q q
+0 0 2530 1990 re
+Y
+4.5 w
+K
+725 1624 m
+0 -198.82 -161.18 -360 -360 -360 c
+-198.82 0 -360 161.18 -360 360 c
+0 198.82 161.18 360 360 360 c
+198.82 0 360 -161.18 360 -360 c
+h
+S
+2525 1624 m
+0 -198.82 -161.18 -360 -360 -360 c
+-198.82 0 -360 161.18 -360 360 c
+0 198.82 161.18 360 360 360 c
+198.82 0 360 -161.18 360 -360 c
+h
+S
+1625 364 m
+0 -198.82 -161.18 -360 -360 -360 c
+-198.82 0 -360 161.18 -360 360 c
+0 198.82 161.18 360 360 360 c
+198.82 0 360 -161.18 360 -360 c
+h
+S
+365 1264 540 -900 S
+725 1624 1080 0 S
+1625 364 540 900 S
+364 1622 92 99 @C
+,
++Fq+hL/a%bPT\n8_@@.ZiJ0fZ(N=p-%Y=oD";l4lDNf/RDNf13U`7ctkqu&81qbP8lG$?uQiHnh
+s8W-!s1dIjs**PPlYlf-J*jH,Xo5C!CULY-D6:4SQ%l`a_eW\7L)=$#_/+jX0Z8S;K*35('>]dR
+Y99LM^]~>
+460 1624 103 97 @C
+,
+0H$Z[21Nr,EYJ^$KG[aY[9*<6]lh#,\mMpPD:`,qrjT#3l[@4\d_GYoomKsd0'_c;V13W1h-GNA
+]'c`5X08Z"?.IPLFnNK5Dn>eSoXEX.pKpu#Q9/F)p:[YFlMfDColp~>
+2164 1622 92 99 @C
+,
++Fq+hL/a%bPT\n8_@@.ZiJ0fZ(N=p-%Y=oD";l4lDNf/RDNf13U`7ctkqu&81qbP8lG$?uQiHnh
+s8W-!s1dIjs**PPlYlf-J*jH,Xo5C!CULY-D6:4SQ%l`a_eW\7L)=$#_/+jX0Z8S;K*35('>]dR
+Y99LM^]~>
+2260 1624 87 95 @C
+,
+0Ei<u?uU.:/;>-")`/&A-,I<H]a!mDmIpGNqgJG;p]'ses8W,qli6Ulde24gdbugF$#kLW\2WS9
+bJYqI6!P^H'SJip@(8C#K)@>"HoKgKn$i;Rs4dSRs8W,blhu6Ss%B3?V,3Ka/dYH6"*d/0J?pp;
+=TsJA$=Z7~>
+1264 362 92 99 @C
+,
++Fq+hL/a%bPT\n8_@@.ZiJ0fZ(N=p-%Y=oD";l4lDNf/RDNf13U`7ctkqu&81qbP8lG$?uQiHnh
+s8W-!s1dIjs**PPlYlf-J*jH,Xo5C!CULY-D6:4SQ%l`a_eW\7L)=$#_/+jX0Z8S;K*35('>]dR
+Y99LM^]~>
+1360 362 92 99 @C
+,
++Fq+hL/a%bPT\n8_@@.ZiJ0fZ(N=p-%Y=oD";l4lDNf/RDNf13U`7ctkqu&81qbP8lG$?uQiHnh
+s8W-!s1dIjs**PPlYlf-J*jH,Xo5C!CULY-D6:4SQ%l`a_eW\7L)=$#_/+jX0Z8S;K*35('>]dR
+Y99LM^]~>
+1084 1624 103 97 @C
+,
+0H$Z[21Nr,EYJ^$KG[aY[9*<6]lh#,\mMpPD:`,qrjT#3l[@4\d_GYoomKsd0'_c;V13W1h-GNA
+]'c`5X08Z"?.IPLFnNK5Dn>eSoXEX.pKpu#Q9/F)p:[YFlMfDColp~>
+1188 1624 87 95 @C
+,
+0Ei<u?uU.:/;>-")`/&A-,I<H]a!mDmIpGNqgJG;p]'ses8W,qli6Ulde24gdbugF$#kLW\2WS9
+bJYqI6!P^H'SJip@(8C#K)@>"HoKgKn$i;Rs4dSRs8W,blhu6Ss%B3?V,3Ka/dYH6"*d/0J?pp;
+=TsJA$=Z7~>
+1804 904 87 95 @C
+,
+0Ei<u?uU.:/;>-")`/&A-,I<H]a!mDmIpGNqgJG;p]'ses8W,qli6Ulde24gdbugF$#kLW\2WS9
+bJYqI6!P^H'SJip@(8C#K)@>"HoKgKn$i;Rs4dSRs8W,blhu6Ss%B3?V,3Ka/dYH6"*d/0J?pp;
+=TsJA$=Z7~>
+1900 902 92 99 @C
+,
++Fq+hL/a%bPT\n8_@@.ZiJ0fZ(N=p-%Y=oD";l4lDNf/RDNf13U`7ctkqu&81qbP8lG$?uQiHnh
+s8W-!s1dIjs**PPlYlf-J*jH,Xo5C!CULY-D6:4SQ%l`a_eW\7L)=$#_/+jX0Z8S;K*35('>]dR
+Y99LM^]~>
+544 904 103 97 @C
+,
+0H$Z[21Nr,EYJ^$KG[aY[9*<6]lh#,\mMpPD:`,qrjT#3l[@4\d_GYoomKsd0'_c;V13W1h-GNA
+]'c`5X08Z"?.IPLFnNK5Dn>eSoXEX.pKpu#Q9/F)p:[YFlMfDColp~>
+648 902 92 99 @C
+,
++Fq+hL/a%bPT\n8_@@.ZiJ0fZ(N=p-%Y=oD";l4lDNf/RDNf13U`7ctkqu&81qbP8lG$?uQiHnh
+s8W-!s1dIjs**PPlYlf-J*jH,Xo5C!CULY-D6:4SQ%l`a_eW\7L)=$#_/+jX0Z8S;K*35('>]dR
+Y99LM^]~>
+cleartomark end end pagesave restore showpage
+%%PageTrailer
+%%Trailer
+%%Pages: 1
diff --git a/support/pdfrack/testFiles/toto.ps b/support/pdfrack/testFiles/toto.ps
new file mode 100644
index 0000000000..bfd3d12872
--- /dev/null
+++ b/support/pdfrack/testFiles/toto.ps
@@ -0,0 +1,61 @@
+%!PS-Adobe-3.0
+%%Pages: (atend)
+%%BoundingBox: 0 0 0 0
+%%HiResBoundingBox: 0.000000 0.000000 0.000000 0.000000
+%%Creator: GNU Ghostscript 705 (pswrite)
+%%CreationDate: 2003/05/26 16:37:56
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 2
+%%EndComments
+%%BeginProlog
+% This copyright applies to everything between here and the %%EndProlog:
+% Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
+%%BeginResource: procset GS_pswrite_2_0_1001
+/GS_pswrite_2_0_1001 80 dict dup begin
+/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
+4 index eq and{ pop pop pop}{ PageSize dup 1
+5 -1 roll put 0 4 -1 roll put dup null eq {false} {dup where} ifelse{ exch get exec}
+{ pop/setpagedevice where
+{ pop 1 dict dup /PageSize PageSize put setpagedevice}
+{ /setpage where{ pop PageSize aload pop pageparams 3 {exch pop} repeat
+setpage}if}ifelse}ifelse}ifelse} bind def
+/!{bind def}bind def/#{load def}!/N/counttomark #
+/rG{3{3 -1 roll 255 div}repeat setrgbcolor}!/G{255 div setgray}!/K{0 G}!
+/r6{dup 3 -1 roll rG}!/r5{dup 3 1 roll rG}!/r3{dup rG}!
+/w/setlinewidth #/J/setlinecap #
+/j/setlinejoin #/M/setmiterlimit #/d/setdash #/i/setflat #
+/m/moveto #/l/lineto #/c/rcurveto #
+/p{N 2 idiv{N -2 roll rlineto}repeat}!
+/P{N 0 gt{N -2 roll moveto p}if}!
+/h{p closepath}!/H{P closepath}!
+/lx{0 rlineto}!/ly{0 exch rlineto}!/v{0 0 6 2 roll c}!/y{2 copy c}!
+/re{4 -2 roll m exch dup lx exch ly neg lx h}!
+/^{3 index neg 3 index neg}!
+/f{P fill}!/f*{P eofill}!/s{H stroke}!/S{P stroke}!
+/q/gsave #/Q/grestore #/rf{re fill}!
+/Y{P clip newpath}!/Y*{P eoclip newpath}!/rY{re Y}!
+/|={pop exch 4 1 roll 1 array astore cvx 3 array astore cvx exch 1 index def exec}!
+/|{exch string readstring |=}!
+/+{dup type/nametype eq{2 index 7 add -3 bitshift 2 index mul}if}!
+/@/currentfile #/${+ @ |}!
+/B{{2 copy string{readstring pop}aload pop 4 array astore cvx
+3 1 roll}repeat pop pop true}!
+/Ix{[1 0 0 1 11 -2 roll exch neg exch neg]exch}!
+/,{true exch Ix imagemask}!/If{false exch Ix imagemask}!/I{exch Ix image}!
+/Ic{exch Ix false 3 colorimage}!
+/F{/Columns counttomark 3 add -2 roll/Rows exch/K -1/BlackIs1 true>>
+/CCITTFaxDecode filter}!/FX{<</EndOfBlock false F}!
+/X{/ASCII85Decode filter}!/@X{@ X}!/&2{2 index 2 index}!
+/@F{@ &2<<F}!/@C{@X &2 FX}!
+/$X{+ @X |}!/&4{4 index 4 index}!/$F{+ @ &4<<F |}!/$C{+ @X &4 FX |}!
+/IC{3 1 roll 10 dict begin 1{/ImageType/Interpolate/Decode/DataSource
+/ImageMatrix/BitsPerComponent/Height/Width}{exch def}forall
+currentdict end image}!
+/~{@ read {pop} if}!
+end readonly def
+%%EndResource
+/pagesave null def
+%%EndProlog
+%%Trailer
+%%Pages: 0
+%%EOF
diff --git a/support/pdfrack/testFiles/withInclude.tex b/support/pdfrack/testFiles/withInclude.tex
new file mode 100644
index 0000000000..ce23d9615b
--- /dev/null
+++ b/support/pdfrack/testFiles/withInclude.tex
@@ -0,0 +1,38 @@
+\documentclass{article}
+\usepackage{pdfrack}
+\usepackage{verbatim}
+\usepackage{amsfonts}
+
+\newcommand{\Rset}{\mathbb{R}}
+\newcommand{\Fset}{\mathcal{F}}
+\newcommand{\Gset}{\mathcal{G}}
+
+\title{Test and example of the handling of included file}
+
+
+\begin{document}
+
+\maketitle
+
+\section{Example}
+
+A figure in the document itself.
+
+\begin{figure}[htbp]
+ \centering
+ \psfrag{f:R2R}{$f: \Rset \mapsto \Rset$}
+ \pdfrackincludegraphics[width=.3\linewidth]{fR2R}
+ \caption{The figure in the document master file}
+ \label{fig:indoc}
+\end{figure}
+
+\input aSubFile.tex
+
+
+\clearpage
+\subsection{Code of the example}
+
+\verbatiminput{withInclude.tex}
+
+
+\end{document}