[Tex/LaTex] Automatically converting pictures to black-and-white

colorprintingpstricks

I am submitting a paper to an Elsevier journal, and they ask that "For reproduction in black-and-white, please supply black-and-white versions of the figures for printing purposes."

My figures are all pspictures, and they are done with different colors. Is there a way to automatically make them appear in black-and-white?

Best Answer

The following also works for included eps images.

RGB to CMYK Put the following code into your preamble if you cannot change the PostScript code yourself.

\AtBeginDocument{\special{ps:
/setrgbcolor { 
  1 sub neg /Y exch def 
  1 sub neg /M exch def
  1 sub neg /C exch def 
  /K 1 def
  C K lt { /K C def } if
  M K lt { /K M def } if
  Y K lt { /K Y def } if
  K 1 eq { 0 0 0 }{ % Black 0 0 0 1
    /K1 1 K sub def
    C K sub K1 div M K sub K1 div Y K sub K1 div } ifelse
  K setcmykcolor
 } def 
}}

or/and RGB to GRAY

\AtBeginDocument{\special{ps:
/setrgbcolor { 0.07 mul exch 0.71 mul add exch 0.21 mul add setgray } def 
}}