<html><body bgcolor="#FFFFFF"><div><br>Hi Vadim,</div><div><br>On 03/08/2010, at 11:49 PM, Vadim Radionov &lt;<a href="mailto:vadim.radionov@gmail.com">vadim.radionov@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><span>Hi Ross,</span><br><span></span><br><span>thank you for the explanation.</span><br><span></span><br><blockquote type="cite"><span>Why do you need this?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Once before I had to do this, since a publisher objected to having RGB in the PDF.</span><br></blockquote><blockquote type="cite"><span>Is yours a similar problem?</span><br></blockquote><span></span><br><span>Yes, it's exactly my case.</span><br></div></blockquote><div><br></div><div>Thought so. Which publisher?</div><br><blockquote type="cite"><div><span></span><span>I used your recipe with \dump and \usePSheaders. &nbsp;There's no explicit</span><br><span>"0 0 0 setrgb" in the dump, so is it the line</span><br><span></span><br><span>/xycolor{0 1 2{xycolarray exch get}for setrgbcolor}def</span><br><span></span><br></div></blockquote><div><br></div><div>It's so long since I've worked in PostScript that I forget the exact names.</div><div>Also whether '0 setgray' gives black or white.</div><div><br></div><br><blockquote type="cite"><div><span>that I have to change? &nbsp;And is</span><br><span></span><br><span>/xycolor{0 setgray}def</span><br></div></blockquote><div><br></div><div>Yes, this forces a single color.</div><div><br></div><div>Another way is to define setrgbcolor to throw away 2 components and invert the 3rd.</div><div>E.g. &nbsp;/setrgbcolor{pop pop 1 sub neg}def</div><div>Or take a weighted sum of the components to convert to grayscale</div><div>&nbsp;&nbsp;/setrgbcolor{1 sub .6 mul neg&nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exch <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">1 sub .15 mul neg add</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exch&nbsp;<span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">1 sub .25 mul neg add</span></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.226562); -webkit-composition-frame-color: rgba(77, 128, 180, 0.226562);">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}def</span></div><div><br></div><div>I don't understand why the publisher doesn't just do this kind of thing as a matter of course. It's not rocket science, and was a pretty standard technique for grayscale conversion years back.</div><br><blockquote type="cite"><div><span></span><br><span>a suitable replacement (it looks fine in my case, but probably I'm</span><br><span>breaking something)?</span><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#0023A3"><br></font></font></div></blockquote><div><br></div><div>The PostScript to PDF translation would fail if there was an error in this coding.</div><div>So test it using any distiller, and printing a few pages that have Xy-pic diagrams.</div><div><br></div><div>Daniel Müllner's solution should work too, as it avoids my PostScript stuff altogether, going directly to PDF.</div><br><blockquote type="cite"><div><span>Thank you again,</span><br><span></span><br><span>Vadim</span><br></div></blockquote><br><div><br></div><div>Hope this helps,</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;Ross</div><div><br></div><div><br></div><div><br></div><div>And it is good to have this problem and solution in the Xy-pic mailing list archives.</div><div><br></div></body></html>