diff options
Diffstat (limited to 'Master/texmf-dist/dvips/tex-ps')
-rw-r--r-- | Master/texmf-dist/dvips/tex-ps/crops.pro | 196 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/tex-ps/mirr.hd | 32 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/tex-ps/separate.pro | 144 |
3 files changed, 372 insertions, 0 deletions
diff --git a/Master/texmf-dist/dvips/tex-ps/crops.pro b/Master/texmf-dist/dvips/tex-ps/crops.pro new file mode 100644 index 00000000000..79614ba8b1f --- /dev/null +++ b/Master/texmf-dist/dvips/tex-ps/crops.pro @@ -0,0 +1,196 @@ +userdict begin +% [PL] Domy/slne parametry | [E] Default parameters +% Odst/ep linii obci/ecia od | Cutting distance from the sheet +% arkusza (mm) | body (in mm) +/cropmarkdistance 3 def % [0..5] +% Rozmiar paser/ow (mm) | Cropmarks size (in mm) +/cropmarksize 10 def +% Rozmiar pask/ow barwnych (mm) | Color bar size (in mm) +/barsize 5 def +/colorbars 1 def +% 0 - bez paskow barwnych | 0 - without color steps and bars +% (np. do monta/zu) | (e.g. for plate composition) +% 1 - komplet pask/ow barwnych | 1 - complete set of color steps and bars +% 2 - tylko ze skalami kolor/ow | 2 - color steps only +% 3 - tylko z brudzikami | 3 - color bars only +% +/mirror 0 def +% 0 - normalny widok | 0 - normal view +% 1 - lustrzane odbicie | 1 - mirror +% +% opis na marginesie | marginal label +/marglabel 1 def % 0 -- off, 1 -- on +% dodatkowe przesuni/ecie strony | additional page offset +/xoffset 0 def +/yoffset 0 def +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +/h_size {hsize} def /v_size {vsize} def +statusdict /setpageparams known { + statusdict /orisetpageparams statusdict /setpageparams get put + statusdict /setpageparams {4 2 roll CMdim 2 mul add x_offset add 4 1 roll + CMdim 2 mul add y_offset add 4 1 roll orisetpageparams} put +}{ + statusdict /setpage known { + statusdict /orisetpage statusdict /setpage get put + statusdict /setpage {3 1 roll CMdim 2 mul add x_offset add 3 1 roll + CMdim 2 mul add y_offset add 3 1 roll orisetpage} put + } if +} ifelse +% + /mm{25.4 div 72 mul}def + /bd{bind def}def + /_y{exch}def + /origin{0 0 moveto}def + /T{translate}def + /K{setcmykcolor}def + /box{_y dup 0 rlineto _y 0 _y rlineto neg 0 rlineto closepath}bd + /_distance {cropmarkdistance mm} def + /CMdim {cropmarksize mm} def + /boxdim {barsize mm} def + /dist{_distance 5 mm le{_distance}{5 mm}ifelse}def + /x_offset {xoffset mm} def + /y_offset {yoffset mm} def + /cmdim{dist neg CMdim add}def + /cmhalf{cmdim 2 div}def + /horver{h_size v_size le}def + /setsep 0 def +% +/rm { + 0 cmhalf moveto cmdim cmhalf lineto stroke + cmhalf 0 moveto cmhalf cmdim lineto stroke + cmhalf cmhalf cmdim 3 div 0 360 arc stroke + } bd +/cm { + 0 CMdim moveto cmdim CMdim lineto stroke + CMdim 0 moveto CMdim cmdim lineto stroke + rm} bd +/cmarks{ cm + h_size CMdim 2 mul add 0 T -1 1 scale cm + 0 v_size CMdim 2 mul add T 1 -1 scale cm + CMdim 2 mul h_size add 0 T -1 1 scale cm + } bd +% +/halfmarks{gsave + 0 v_size 2 div CMdim 2 div add dist 2 div add T rm + h_size cmdim add dist 2 mul add 0 T rm + h_size 2 div neg cmhalf sub dist sub + v_size 2 div cmdim 2 div add dist add T rm + 0 v_size neg cmdim sub dist 2 mul sub T rm + grestore}bd +% +/boxfill{boxdim boxdim box fill}bd +/_step{boxfill horver{0 boxdim}{boxdim 0} ifelse T}bd +/contour{origin + horver{boxdim boxdim 11 mul}{boxdim 11 mul boxdim} ifelse + box stroke}bd +/csteps{ + setsep 1 eq { + gsave 0 .1 1 {origin setgray _step} for grestore + 0 setgray contour % /cbar {0 setgray} bd + }{ + setsep 0 eq { + gsave 1 .1 neg 0 {origin 0 _y 0 0 _y 0 _y K _step} for grestore + 1 0 0 0 K contour % /cbar {1 0 0 0 K} bd + }{ % /cbar {1 setgray} bd + } ifelse + } ifelse + } bd +/cbar {setsep 1 eq {0 setgray}{setsep 0 eq {1 0 0 0 K}{1 setgray + } ifelse} ifelse} bd +% +/msteps{setsep 2 eq {gsave 0 .1 1 {origin setgray _step} for grestore + 0 setgray contour % /mbar {0 setgray} bd + }{setsep 0 eq { + gsave 1 .1 neg 0 {origin 0 _y 0 _y 0 0 _y K _step} for grestore + 0 1 0 0 K contour %/mbar {0 1 0 0 K} bd + }{ % /mbar {1 setgray} bd + } ifelse + } ifelse } bd +/mbar {setsep 2 eq {0 setgray}{setsep 0 eq {0 1 0 0 K}{1 setgray + } ifelse} ifelse} bd +% +/ysteps{setsep 3 eq {gsave 0 .1 1 {origin setgray _step} for grestore + 0 setgray contour % /ybar {0 setgray} bd + }{setsep 0 eq { + gsave 1 .1 neg 0 {origin 0 _y 0 _y 0 _y 0 K _step} for grestore + 0 0 1 0 K contour % /ybar {0 0 1 0 K} bd + }{ % /ybar {1 setgray} bd + } ifelse + } ifelse } bd +/ybar {setsep 3 eq {0 setgray}{setsep 0 eq {0 0 1 0 K}{1 setgray + } ifelse} ifelse} bd +% +/gsteps{setsep 4 eq {gsave 0 .1 1 {origin setgray _step} for grestore + 0 setgray contour % /gbar {0 setgray} bd + }{setsep 0 eq { + gsave 0 .1 1 {origin setgray _step} for grestore + 0 setgray contour % /gbar {0 setgray} bd + }{ % /gbar {1 setgray} bd + } ifelse + } ifelse } bd +/gbar {setsep 4 eq {0 setgray}{setsep 0 eq {0 setgray}{1 setgray + } ifelse} ifelse} bd +% +/colorsteps{gsave + horver {CMdim boxdim sub dist sub CMdim boxdim add} + {CMdim boxdim add CMdim boxdim sub dist sub} ifelse T gsteps + horver {0 boxdim 12 mul}{boxdim 12 mul 0} ifelse T ysteps + grestore gsave + horver {CMdim boxdim sub dist sub v_size CMdim add boxdim 12 mul sub} + {h_size CMdim add boxdim 12 mul sub CMdim boxdim sub dist sub} + ifelse T csteps + horver {0 boxdim 12 mul neg}{boxdim 12 mul neg 0} ifelse T msteps + grestore} bd +% +/colorbar {gsave + horver { + h_size CMdim add dist add CMdim T + /begbar {boxdim 4 boxdim mul v_size CMdim 2 mul sub} bd + /endbar {for 0 boxdim T}bd /mt {0 exch moveto} bd + }{ + CMdim boxdim add v_size CMdim add dist add T + /begbar {boxdim 4 boxdim mul h_size CMdim 2 mul sub} bd + /endbar {for boxdim 0 T} bd /mt {exch 0 moveto} bd + } ifelse + begbar {mt cbar boxfill} endbar begbar {mt mbar boxfill} endbar + begbar {mt ybar boxfill} endbar begbar {mt gbar boxfill} endbar + grestore} bd +% +/color_sep -1 def +/label_s{ + marglabel 1 eq { + /Helvetica findfont 8 scalefont setfont + (Page (PS/TeX): ) show page_num_ps 20 string cvs show + ( / ) show page_num_tex 20 string cvs show + color_sep 0 ge { + color_sep 0 eq {(, \ \ Plate CYAN ) show} if + color_sep 1 eq {(, \ \ Plate MAGENTA ) show} if + color_sep 2 eq {(, \ \ Plate YELLOW ) show} if + color_sep 3 eq {(, \ \ Plate BLACK ) show} if + }{(, \ \ COMPOSITE) show} ifelse + } if + } bd +/page_number{gsave + horver {CMdim 2 mul 10 moveto label_s} + {10 CMdim 2 mul moveto 90 rotate label_s} ifelse + grestore} def +% +/_mirror {mirror 1 eq {-1 1 scale h_size neg 0 T} if}bd +% +/full {.1 setlinewidth + 1 colorbars eq {colorsteps colorbar}{ + 2 colorbars eq {colorsteps}{ + 3 colorbars eq {colorbar}{} ifelse + } ifelse + } ifelse + 1 1 1 1 setcmykcolor page_number cmarks halfmarks} bd +% +/save_page_num{pstack 2 copy 1 add + /page_num_ps exch def /page_num_tex exch def}def +% +[/bop-hook where {pop /bop-hook load aload pop} if +{x_offset y_offset T + gsave save_page_num full grestore + CMdim CMdim T _mirror} aload pop] cvx +/bop-hook exch def +end diff --git a/Master/texmf-dist/dvips/tex-ps/mirr.hd b/Master/texmf-dist/dvips/tex-ps/mirr.hd new file mode 100644 index 00000000000..5c39e74fa79 --- /dev/null +++ b/Master/texmf-dist/dvips/tex-ps/mirr.hd @@ -0,0 +1,32 @@ +% The following header can be used for producing mirrored output on +% printers (phototypesetters don't need this) with T. Rokicki's DVIPS +% driver. +% +% USAGE: +% dvips -hmirr.hd [other_options1] <file_name> [other_options2] +% +% WARNING: +% Be careful when you use DVIDVI or DVI2DVI in the context of global +% specials like `\special{landscape}'; fortunately, `\special{landscape}' +% works smoothly with DVIDVI but not with DVI2DVI (Sawatzki's +% implementation)---you have to use `\special{landscape}' on every +% page that appears to be the first one after splitting a DVI by DVI2DVI; +% the same technique concerns both DVIDVI and DVI2DVI if user-defined +% global specials are used. +% +% In the case of difficulties mail to: +% Piotr Pianowski or Bogus\l{}aw Jackowski or Piotr Strzelczyk +% B.Jackowski@GUST.org.pl +% +userdict begin +/bop-hook {-1 1 scale isls {vsize} {hsize} ifelse neg 0 translate} def +/appenddef { +% use this for lengthening `bop-hook' in your TeX program, i.e., +% instead of \special{ps:... userdict begin ... /bop-hook{...}def ... end} +% say \special{ps:... userdict begin ... /bop-hook{...}appenddef ... end} + /stuff-to-append exch def /to-append exch def + [/to-append load where {pop /to-append load load aload pop} if + /stuff-to-append load aload pop] cvx /to-append load exch store +} def +end + diff --git a/Master/texmf-dist/dvips/tex-ps/separate.pro b/Master/texmf-dist/dvips/tex-ps/separate.pro new file mode 100644 index 00000000000..44eb9ce9849 --- /dev/null +++ b/Master/texmf-dist/dvips/tex-ps/separate.pro @@ -0,0 +1,144 @@ +% [PL] Parametry separacji: [E] Separation parameters: +% Odkomentuj TYLKO JEDNO Uncomment EXACTLY ONE +% z poni/zszych ustawie/n: of the following settings: +%%%%% +% /color_sep 0 def % cyan +% /color_sep 1 def % magenta +% /color_sep 2 def % yellow +/color_sep 3 def % black +%%%%% +/ScreenFrequency 150 def +/Cangle 15 def +/Mangle 75 def +/Yangle 0 def +/Kangle 45 def +% +userdict begin /ori_setcmykcolor where {pop} {/ori_setcmykcolor /setcmykcolor +load def} ifelse /ori_setrgbcolor where {pop} {/ori_setrgbcolor /setrgbcolor +load def} ifelse /ori_setgray where {pop} {/ori_setgray /setgray load +def} ifelse /ori_colorimage where {pop} {/ori_colorimage /colorimage +load def} ifelse /ori_image where {pop} {/ori_image /image load def} +ifelse /ori_imagemask where {pop} {/ori_imagemask /imagemask load def} +ifelse /ori_fill where {pop} {/ori_fill /fill load def} ifelse /ori_eofill +where {pop} {/ori_eofill /eofill load def} ifelse /ori_stroke where +{pop} {/ori_stroke /stroke load def} ifelse /ori_show where {pop} {/ori_show +/show load def} ifelse /hax_setcmykcolor /ori_setcmykcolor load def +/maybe_black { 4 copy 1 sub abs epsilon le exch 0 sub abs epsilon le +and exch 0 sub abs epsilon le and exch 0 sub abs epsilon le and /if_delblack +exch def } def /my_fill {userdict begin if_delblack {newpath} {ori_fill} +ifelse end} def /my_eofill {userdict begin if_delblack {newpath} {ori_eofill} +ifelse end} def /my_stroke {userdict begin if_delblack {newpath} {ori_stroke} +ifelse end} def /my_show {userdict begin if_delblack {false charpath +currentpoint newpath moveto} {ori_show} ifelse end} def /eofill {userdict +begin my_eofill end} def /fill {userdict begin my_fill end} def /stroke +{userdict begin my_stroke end} def /show {userdict begin my_show end} +def /setcmykcolor {userdict begin /k_ exch def /y_ exch def /m_ exch +def /c_ exch def c_ m_ y_ k_ hax_setcmykcolor end} def /setgray {ori_setgray +currentcmykcolor setcmykcolor} def /setrgbcolor {ori_setrgbcolor currentcmykcolor +setcmykcolor} def /hax_image { dup type cvlit /dicttype eq { /ImageDict +exch def currentcolorspace dup length 1 eq ImageDict /ImageType get +1 eq and {0 get dup /DeviceRGB eq {/ncomp 3 def} if dup /DeviceGray +eq {/ncomp 1 def} if /DeviceCMYK eq {/ncomp 4 def} if ImageDict /BitsPerComponent +get 8 ne /ncomp 1 ne and {/ncomp 0 def} if } {pop /ncomp 0 def} ifelse +} { false 1 makeimagedict } ifelse ncomp 0 eq {ImageDict ori_image} +{hax_image_} ifelse } def /hax_colorimage { makeimagedict hax_image_ +} def /makeimagedict { dup /ncomp exch def dup 4 eq {/DeviceCMYK setcolorspace} +if dup 3 eq {/DeviceRGB setcolorspace} if 1 eq {/DeviceGray setcolorspace} +if /ImageDict 7 dict def ImageDict begin {/MultipleDataSources true +def ncomp array astore} if /DataSource exch def /ImageMatrix exch def +/BitsPerComponent exch def /Height exch def /Width exch def /Decode +[ncomp {0 1} repeat] def /ImageType 1 def end } def /data_str 65532 +string def /data_str_ 8192 string def /merge_multi4 { ImageDict /DataSource +get aload pop dup type cvlit /filetype eq { /fdatsrck exch def /fdatsrcy +exch def /fdatsrcm exch def /fdatsrcc exch def /datasrck {fdatsrck +data_str_ readstring pop} def /datasrcy {fdatsrcy data_str_ readstring +pop} def /datasrcm {fdatsrcm data_str_ readstring pop} def /datasrcc +{fdatsrcc data_str_ readstring pop} def } { /datasrck exch def /datasrcy +exch def /datasrcm exch def /datasrcc exch def } ifelse ImageDict /DataSource +{ data_str 0 datasrcc {3 copy put pop 4 add} forall pop 1 datasrcm +{3 copy put pop 4 add} forall pop 2 datasrcy {3 copy put pop 4 add} +forall pop 3 datasrck {3 copy put pop 4 add} forall 3 sub 0 exch getinterval +} put } def /merge_multi3 { ImageDict /DataSource get aload pop dup +type cvlit /filetype eq { /fdatsrcb exch def /fdatsrcg exch def /fdatsrcr +exch def /datasrcb {fdatsrcb data_str_ readstring pop} def /datasrcg +{fdatsrcg data_str_ readstring pop} def /datasrcr {fdatsrcr data_str_ +readstring pop} def } { /datasrcb exch def /datasrcg exch def /datasrcr +exch def } ifelse ImageDict /DataSource { data_str 0 datasrcr {3 copy +put pop 3 add} forall pop 1 datasrcg {3 copy put pop 3 add} forall +pop 2 datasrcb {3 copy put pop 3 add} forall 2 sub 0 exch getinterval +} put } def /i_Str 3 string def /O_Str 4 string def /UCR {0.5 mul} +def /BG {0.5 mul} def /min {1 index 1 index le {pop} {exch pop} ifelse} +def /max {1 index 1 index ge {pop} {exch pop} ifelse} def /RGBtoCMYK +{dup 0 get R_scale mul R_shift add /c_i exch def dup 1 get G_scale +mul G_shift add /m_i exch def 2 get B_scale mul B_shift add /y_i exch +def /k_i c_i m_i y_i min min def O_Str dup 0 255 0 c_i k_i UCR sub +cvi max min put dup 1 255 0 m_i k_i UCR sub cvi max min put dup 2 255 +0 y_i k_i UCR sub cvi max min put dup 3 255 0 k_i BG cvi max min put +} def /RGBtoCMYKfilter { ImageDict /Decode get aload pop 2 copy sub +/B_scale exch def pop 255 mul 255 exch sub /B_shift exch def 2 copy +sub /G_scale exch def pop 255 mul 255 exch sub /G_shift exch def 2 +copy sub /R_scale exch def pop 255 mul 255 exch sub /R_shift exch def +/rtc_file ImageDict /DataSource get def ImageDict /DataSource {rtc_file +i_Str readstring {RGBtoCMYK} if} 0 () /SubFileDecode filter put /DeviceCMYK +setcolorspace /ncomp 4 def ImageDict /Decode [0 1 0 1 0 1 0 1] put +} def /sep_str 8192 string def /SEP_CMYK { 0 hax_sep 4 3 index length +1 sub { 2 index exch get 3 copy put pop 1 add } for dup 0 ne {0 exch +getinterval}{pop pop ()} ifelse } def /SEPfilters { ncomp 4 eq { hax_sep +3 le { /sepproc /SEP_CMYK load def ImageDict begin /Decode [ Decode +hax_sep 2 mul 1 add get Decode hax_sep 2 mul get ] def end } { /sepproc +{dup length 4 idiv 0 exch getinterval} def } ifelse /sep_file ImageDict +/DataSource get def ImageDict /DataSource {sep_file sep_str readstring +pop sepproc} 0 () /SubFileDecode filter put /DeviceGray setcolorspace +} {hax_sep 3 ne {ImageDict /Decode [ 1 1 ] put} if } ifelse hax_sep +4 eq {ImageDict /Decode [ 1 1 ] put} if hax_sep 5 eq {ImageDict /Decode +[ 0 0 ] put} if } def /change_str 12288 string def /CHANGEfilter { +/change_file ImageDict /DataSource get def ImageDict /DataSource { +change_file change_str readstring pop 0 ncomp 2 index length ncomp +sub { 1 index exch 2 copy ncomp getinterval changebits putinterval +} for } 0 () /SubFileDecode filter put } def /hax_image_ { ImageDict +/MultipleDataSources known { ImageDict /MultipleDataSources get { ImageDict +/MultipleDataSources false put ImageDict /DataSource get length dup +4 eq {merge_multi4} if dup 3 eq {merge_multi3} if 1 eq {ImageDict begin +/DataSource DataSource aload pop def end} if } if } if ImageDict begin +/DataSource dup load Width BitsPerComponent mul 7 add 8 idiv Height +ncomp mul mul () /SubFileDecode filter def end to_change_bitmap {CHANGEfilter} +if ncomp 3 eq to_convert_bitmap and {RGBtoCMYKfilter} if ncomp 3 ne +to_sep_bitmap and {SEPfilters} if ImageDict ori_image } def /zero_data_str +65532 string def /hax_imagemask { if_delblack { dup type cvlit /dicttype +eq { /ImageDict exch def } { /ImageDict 7 dict def ImageDict begin +/DataSource exch def /ImageMatrix exch def /Decode exch {[1 0]} {[0 +1]} ifelse def /Height exch def /Width exch def /BitsPerComponent 1 +def /ImageType 1 def end } ifelse ImageDict begin /DataSource load +Width 7 add 8 idiv Height mul () /SubFileDecode filter end /mask_file +exch def ImageDict /DataSource { zero_data_str 0 mask_file data_str +readstring pop length getinterval } 0 () /SubFileDecode filter put +ImageDict /Decode [1 0] put ImageDict ori_imagemask } {ori_imagemask} +ifelse } def /epsilon 0.005 def /if_delblack false def /to_change_bitmap +false def /to_convert_bitmap false def /to_sep_bitmap false def +currentcmykcolor setcmykcolor end +% + /dot_spot {dup mul exch dup mul add 1 exch sub 2 div} def 150 0 {dot_spot} +setscreen +% +userdict begin + color_sep 0 eq + {/hax_setcmykcolor {maybe_black pop pop pop 1 exch sub ori_setgray} def + ScreenFrequency Cangle {dot_spot} setscreen} + {color_sep 1 eq + {/hax_setcmykcolor {maybe_black pop pop exch pop 1 exch sub ori_setgray} def + ScreenFrequency Mangle {dot_spot} setscreen} + {color_sep 2 eq + {/hax_setcmykcolor {maybe_black pop exch pop exch pop 1 exch sub ori_setgray} def + ScreenFrequency Yangle {dot_spot} setscreen} + {/hax_setcmykcolor {exch pop exch pop exch pop 1 exch sub ori_setgray} def + ScreenFrequency Kangle {dot_spot} setscreen} + ifelse + } ifelse + } ifelse +end +% +userdict begin /image /hax_image load def /colorimage /hax_colorimage + load def /imagemask /hax_imagemask load def + /to_sep_bitmap true def /to_convert_bitmap true def +end +currentcmykcolor setcmykcolor |