diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/atfidvips.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/atfidvips.def | 530 |
1 files changed, 265 insertions, 265 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/atfidvips.def b/Master/texmf-dist/tex/latex/oberdiek/atfidvips.def index 9ee14c614ca..f9b80825029 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/atfidvips.def +++ b/Master/texmf-dist/tex/latex/oberdiek/atfidvips.def @@ -29,7 +29,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atfipdftex.def}% - [2006/08/16 v2.2 attachfile2 driver for dvips (HO)] + [2007/04/11 v2.3 attachfile2 driver for dvips (HO)]% \def\atfi@literal#1{% \special{ps:atfi_dict begin{#1}atfi_?pdfmark end}% } @@ -40,194 +40,194 @@ \atfi@header{% - userdict begin 20 dict dup /atfi_dict exch def end begin - /atfi_?pdfmark systemdict - dup /pdfmark known - { - /exec get def - }{ - /pop get def - } ifelse - { + userdict begin 20 dict dup /atfi_dict exch def end begin% + /atfi_?pdfmark systemdict % + dup/pdfmark known% + {% + /exec get def% + }{% + /pop get def% + } ifelse% + {% % % x y width height atfi_re -> - languagelevel 2 ge { - /atfi_rectfill { rectfill } bind def - /atfi_rectstroke { rectstroke } bind def + languagelevel 2 ge {% + /atfi_rectfill { rectfill } bind def% + /atfi_rectstroke { rectstroke } bind def% }{% - /atfi_rect { - /atfi_height exch def - /atfi_width exch def - /atfi_x exch def - /atfi_y exch def - newpath - atfi_x atfi_y moveto - atfi_x atfi_width add atfi_y lineto - atfi_x atfi_width add atfi_y atfi_height add lineto - atfi_x atfi_y atfi_height add lineto - closepath - } bind def - /atfi_rectfill { - atfi_rect fill - } bind def - /atfi_rectstroke { - atfi_rect stroke - } bind def - } ifelse - /atfi_curveto_v { - currentpoint 6 2 roll curveto - } bind def - /atfi_curveto_y { - 2 copy curveto - } bind def + /atfi_rect {% + /atfi_height exch def% + /atfi_width exch def% + /atfi_x exch def% + /atfi_y exch def % + newpath % + atfi_x atfi_y moveto % + atfi_x atfi_width add atfi_y lineto % + atfi_x atfi_width add atfi_y atfi_height add lineto % + atfi_x atfi_y atfi_height add lineto % + closepath% + } bind def% + /atfi_rectfill {% + atfi_rect fill% + } bind def% + /atfi_rectstroke {% + atfi_rect stroke% + } bind def% + } ifelse% + /atfi_curveto_v {% + currentpoint 6 2 roll curveto% + } bind def% + /atfi_curveto_y {% + 2 copy curveto% + } bind def% % % help macro for atfi_convert_date - /atfi_two { - dup 10 lt - { - 1 string cvs - exch 1 add exch - }{ - 2 string cvs - } ifelse - putinterval - } bind def + /atfi_two {% + dup 10 lt% + {% + 1 string cvs % + exch 1 add exch% + }{% + 2 string cvs% + } ifelse % + putinterval% + } bind def% % % <seconds since 1970-01-01> atfi_convert_date -> (D:...Z) - /atfi_convert_date { - dup - /atfi_days exch 3600 idiv 24 idiv def + /atfi_convert_date {% + dup% + /atfi_days exch 3600 idiv 24 idiv def% % calc date part - /atfi_year 1970 def - { - atfi_year 400 mod 0 eq - atfi_year 100 mod 0 ne - atfi_year 4 mod 0 eq - and or - { 366 } { 365 } ifelse - dup atfi_days lt - { - atfi_days exch sub /atfi_days exch def - /atfi_year atfi_year 1 add def - }{ - exit - } ifelse - } loop - /atfi_month 1 def - /atfi_days atfi_days 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 366 eq { 29 } { 28 } ifelse dup atfi_days lt - { - atfi_days exch sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 30 atfi_days lt - { - atfi_days 30 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 30 atfi_days lt - { - atfi_days 30 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 30 atfi_days lt - { - atfi_days 30 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 30 atfi_days lt - { - atfi_days 30 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - 31 atfi_days lt - { - atfi_days 31 sub /atfi_days exch def - /atfi_month atfi_month 1 add def - } if - } if - } if - } if - } if - } if - } if - } if - } if - } if - } { pop } ifelse - }{ pop } ifelse + /atfi_year 1970 def% + {% + atfi_year 400 mod 0 eq % + atfi_year 100 mod 0 ne % + atfi_year 4 mod 0 eq % + and or% + {366} {365} ifelse % + dup atfi_days lt% + {% + atfi_days exch sub /atfi_days exch def% + /atfi_year atfi_year 1 add def% + }{% + exit% + } ifelse% + } loop% + /atfi_month 1 def% + /atfi_days atfi_days 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 366 eq {29} {28} ifelse dup atfi_days lt% + {% + atfi_days exch sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 30 atfi_days lt% + {% + atfi_days 30 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 30 atfi_days lt% + {% + atfi_days 30 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 30 atfi_days lt% + {% + atfi_days 30 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 30 atfi_days lt% + {% + atfi_days 30 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def % + 31 atfi_days lt% + {% + atfi_days 31 sub /atfi_days exch def% + /atfi_month atfi_month 1 add def% + } if% + } if% + } if% + } if% + } if% + } if% + } if% + } if% + } if% + } if% + } { pop } ifelse% + }{ pop } ifelse % % calc time part - 3600 24 mul mod - dup 3600 idiv dup /atfi_hour exch def - 3600 mul sub - dup 60 idiv dup /atfi_min exch def - 60 mul sub - /atfi_sec exch def - (D:19700101000000Z) - dup 2 atfi_year 4 string cvs putinterval - dup 6 atfi_month atfi_two - dup 8 atfi_days atfi_two - dup 10 atfi_hour atfi_two - dup 12 atfi_min atfi_two - dup 14 atfi_sec atfi_two - } bind def + 3600 24 mul mod % + dup 3600 idiv dup /atfi_hour exch def % + 3600 mul sub % + dup 60 idiv dup /atfi_min exch def % + 60 mul sub % + /atfi_sec exch def% + (D:19700101000000Z)% + dup 2 atfi_year 4 string cvs putinterval % + dup 6 atfi_month atfi_two % + dup 8 atfi_days atfi_two % + dup 10 atfi_hour atfi_two % + dup 12 atfi_min atfi_two % + dup 14 atfi_sec atfi_two% + } bind def % % % <filename> atfi_calc_checksum -> /CheckSum <checksum> % or returns nothing, if MD5Encode is not given - false - languagelevel 2 ge { - (MD5Encode) - { pop true or } - (MD5Encode) length string - /Filter - resourceforall - } if - { - /atfi_calc_checksum { - /atfi_checksum 16 string def - /atfi_file exch (r) file def - /atfi_md5sum atfi_checksum /MD5Encode filter def + false % + languagelevel 2 ge {% + (MD5Encode)% + { pop true or }% + (MD5Encode) length string% + /Filter % + resourceforall% + } if% + {% + /atfi_calc_checksum {% + /atfi_checksum 16 string def% + /atfi_file exch (r) file def% + /atfi_md5sum atfi_checksum /MD5Encode filter def % % not too efficient to read and write byte by byte, % using a buffer is probably faster - atfi_size { - atfi_file read - { - atfi_md5sum exch write - } if - } repeat - atfi_md5sum closefile - atfi_file closefile - /CheckSum atfi_checksum - } bind def - }{ - /atfi_calc_checksum { pop } bind def - } ifelse + atfi_size {% + atfi_file read% + {% + atfi_md5sum exch write% + } if% + } repeat % + atfi_md5sum closefile % + atfi_file closefile% + /CheckSum atfi_checksum% + } bind def% + }{% + /atfi_calc_checksum { pop } bind def% + } ifelse% % - /atfi_pttobp { 72.27 div 72 mul } bind def - /atfi_pdftodvipsx { 72.27 div Resolution mul } bind def - /atfi_pdftodvipsy { 72.27 div VResolution mul } bind def + /atfi_pttobp { 72.27 div 72 mul } bind def% + /atfi_pdftodvipsx { 72.27 div Resolution mul } bind def% + /atfi_pdftodvipsy { 72.27 div VResolution mul } bind def% % - } atfi_?pdfmark - end + } atfi_?pdfmark % + end% } \def\atfi@GSAVE{gsave } @@ -246,10 +246,10 @@ \def\atfi@RECTSTROKEFILL#1#2#3{% #3% #1% - gsave atfi_rectfill grestore + gsave atfi_rectfill grestore % #2% #3% - atfi_rectstroke + atfi_rectstroke % #1% } \def\atfi@SETMITERLIMIT{setmiterlimit } @@ -282,14 +282,14 @@ \x }% \atfi@literal{% - /atfi_filename (\atfi@psfilename) def - atfi_filename status - { + /atfi_filename(\atfi@psfilename)def % + atfi_filename status% + {% % ok: file found % save parameters of status command - /atfi_created exch def - /atfi_referenced exch def - /atfi_size exch def + /atfi_created exch def% + /atfi_referenced exch def% + /atfi_size exch def % pop % drop parameter "pages" (storage space), never needed % ghostscript: % created: stat.st_ctime @@ -306,63 +306,63 @@ % TODO: how are these values interpreted by other distiller % programs? % - [ + [% /_objdef \theatfi@obj - /type /stream - /OBJ pdfmark - [ + /type/stream% + /OBJ pdfmark% + [% \theatfi@obj - << - /Type /EmbeddedFile + <<% + /Type/EmbeddedFile% \atfi@mimetype - /Params - << + /Params% + <<% \atfi@params % - /Size atfi_size + /Size atfi_size% % - /product where - { - pop + /product where% + {% + pop % % check for ghostscript - product (Ghostscript) search - { - pop pop pop + product (Ghostscript) search% + {% + pop pop pop % % ghostscript is running % \ifatfi@creationdate \else false % TODO: test for windows - { - /CreationDate atfi_created atfi_convert_date - } if + {% + /CreationDate atfi_created atfi_convert_date% + } if% \fi \ifatfi@moddate \else - /ModDate atfi_referenced atfi_convert_date + /ModDate atfi_referenced atfi_convert_date% \fi - } if + } if% % % look for MD5Encode filter and calculate CheckSum - } if + } if % \ifatfi@checksum \else - atfi_filename atfi_calc_checksum + atfi_filename atfi_calc_checksum% \fi - >> - >> - /PUT pdfmark - [ + >>% + >>% + /PUT pdfmark% + [% \theatfi@obj - atfi_filename (r) file - /PUT pdfmark - [ + atfi_filename (r) file% + /PUT pdfmark% + [% \theatfi@obj - /CLOSE pdfmark - }{ + /CLOSE pdfmark% + }{% % error: file not found % currently nothing is done - } ifelse + } ifelse% }% \endgroup }{% @@ -375,19 +375,19 @@ \stepcounter{atfi@obj}% \edef\atfi@appearanceobj{\theatfi@obj}% \atfi@literal{% - [ + [% /_objdef \atfi@appearanceobj - /BBox [ - 0 - 0 - \strip@pt\wd\atfi@appearancebox\space atfi_pttobp + /BBox[% + 0 % + 0 % + \strip@pt\wd\atfi@appearancebox\space atfi_pttobp % \strip@pt\dimexpr\dp\atfi@appearancebox - +\ht\atfi@appearancebox\relax\space atfi_pttobp - ] - /BP pdfmark + +\ht\atfi@appearancebox\relax\space atfi_pttobp% + ]% + /BP pdfmark % \csname atfi@acro\atfi@icon@icon @data\endcsname - [ - /EP pdfmark + [% + /EP pdfmark% }% } \def\atfi@xform{% @@ -396,27 +396,27 @@ \begingroup \setbox0=\hbox{% \atfi@literal{% - [ + [% /_objdef \atfi@appearanceobj - /BBox [ - currentpoint - \strip@pt\dp\atfi@appearancebox\space sub - currentpoint - exch \strip@pt\wd\atfi@appearancebox\space add - exch \strip@pt\ht\atfi@appearancebox\space add - ] - /BP pdfmark - gsave - currentpoint - 2 copy translate - 72.27 Resolution div 72.27 VResolution div neg scale - exch neg exch neg translate + /BBox[% + currentpoint % + \strip@pt\dp\atfi@appearancebox\space sub % + currentpoint % + exch \strip@pt\wd\atfi@appearancebox\space add % + exch \strip@pt\ht\atfi@appearancebox\space add% + ]% + /BP pdfmark % + gsave % + currentpoint % + 2 copy translate % + 72.27 Resolution div 72.27 VResolution div neg scale % + exch neg exch neg translate% }% \usebox{\atfi@appearancebox}% \atfi@literal{% - grestore - [ - /EP pdfmark + grestore% + [% + /EP pdfmark% }% }% % do not allocate any space for xobject definition @@ -430,11 +430,11 @@ \def\atfi@refxform#1{% \raisebox{-\atfi@appearancedepth}{% \atfi@literal{% - gsave - currentpoint translate - Resolution 72 div VResolution neg 72 div scale - [ #1 /SP pdfmark - grestore + gsave % + currentpoint translate % + Resolution 72 div VResolution neg 72 div scale% + [#1 /SP pdfmark % + grestore% }% \makebox[\atfi@appearancewidth]{}% }% @@ -460,25 +460,25 @@ \expandafter\xdef\csname atfi@fsobj@#1\endcsname{\theatfi@obj}% \atfi@pdfstringdef\atfi@file{#1}% \atfi@literal{% - [ + [% /_objdef \theatfi@obj - /type /dict - /OBJ pdfmark - [ + /type/dict% + /OBJ pdfmark% + [% \theatfi@obj - << - /Type /Filespec - /F (\atfi@file) - /EF << + <<% + /Type/Filespec% + /F(\atfi@file)% + /EF<<% /F \csname atfi@fileobj@#1\endcsname - >> - >> - /PUT pdfmark + >>% + >>% + /PUT pdfmark% }% }{% }% \atfi@literal{% - [ + [% /Subtype/FileAttachment% \atfi@icon \atfi@color @@ -490,17 +490,17 @@ \atfi@appearance@dict /F \theatfi@flags /FS \csname atfi@fsobj@#1\endcsname - /Rect [ - currentpoint + /Rect[% + currentpoint % \strip@pt\dimexpr\atfi@scale\atfi@appearancedepth\relax - \space atfi_pdftodvipsy add - currentpoint + \space atfi_pdftodvipsy add % + currentpoint % exch \strip@pt\dimexpr\atfi@scale\atfi@appearancewidth\relax - \space atfi_pdftodvipsx add + \space atfi_pdftodvipsx add % exch \strip@pt\dimexpr\atfi@scale\atfi@appearanceheight\relax - \space atfi_pdftodvipsy sub - ] - /ANN pdfmark + \space atfi_pdftodvipsy sub % + ]% + /ANN pdfmark% }% \rule{0pt}{\atfi@appearanceheight}% \rule[-\atfi@appearancedepth]{0pt}{\atfi@appearancedepth}% |