Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

why normal text color changes to CMYK when any color applied on some part of text

5 views
Skip to first unread message

david

unread,
Sep 29, 2006, 9:54:20 AM9/29/06
to
Dear All,

This seems to be a bug of LaTeX or DVIPS that it changes the normal
text color from Gray to CMYK when any color applied on some part of
text even when we have properly kept the colored text in grouping. It
happens after the instance of color text, thus before the first
occurence of color text portion, normal text comes as Gray but after
that it comes as CMYK. For testing here I have attached the small
sample tex file.

------------------------------------------------------------
\documentclass{article}

\begin{document}

This is normal.

\begingroup{\special{color push rgb 0 0 1}This is Blue.\special{color
pop}}\endgroup

This is normal.

\end{document}
------------------------------------------------------------

Can any one put some expert comment on this and tell how one can solve
this problem.

Thanks
David

Robin Fairbairns

unread,
Sep 29, 2006, 11:39:54 AM9/29/06
to

if you use the latex color package, this effect doesn't occur: the
document is firmly in cmyk from the start (apart from the interlude in
rgb).

your document pulls the default element from the top of dvips' colour
stack at the end of its colour section. that default is actually a
cmyk black.
--
Robin Fairbairns, Cambridge

david

unread,
Sep 29, 2006, 11:16:24 PM9/29/06
to

I have already checked that, using color package changes the normal
text to CMYK since begining of document, but my question is why it
converted to 4 color CMYK where black is 100% and rest other are 0%, it
nornal should remain in one color (Gray) not in 4 color CMYK.

The solution that I think is to chage (cmyk 0,0,0,1) globally to Gray
but that do not seems to be good to me.

Can anyone suggest how to over come of this problem by being in tex.

> Robin Fairbairns, Cambridge

david

unread,
Sep 29, 2006, 11:23:04 PM9/29/06
to
I have already checked with color package, it changes the normal text
to CMYK since begining of the document, but it should be Gray only.

How we can overcome of this problem by being in TeX.

Robin Fairbairns

unread,
Sep 30, 2006, 6:35:17 AM9/30/06
to
"david" <davi...@yahoo.com> writes:
>I have already checked with color package, it changes the normal text
>to CMYK since begining of the document, but it should be Gray only.

what's this "grey only" anyway? what sort of output device is
confused by what dvips does? or are you worried about the raw-
postscript-reader-in-the-street might find? (i wouldn't be. such
people are rare enough and eccentric enough that i don't care about
them.)

>How we can overcome of this problem by being in TeX.

push something of your own choosing at the start of the document?
(\AtBeginDvi if you're using latex). or hack your copy of color.pro
-- though i've not sorted in my own mind where that top-of-stack thing
is created.
--
Robin Fairbairns, Cambridge

david

unread,
Sep 30, 2006, 12:41:31 PM9/30/06
to

Robin Fairbairns wrote:
> "david" <davi...@yahoo.com> writes:
> >I have already checked with color package, it changes the normal text
> >to CMYK since begining of the document, but it should be Gray only.
>
> what's this "grey only" anyway? what sort of output device is
> confused by what dvips does? or are you worried about the raw-
> postscript-reader-in-the-street might find? (i wouldn't be. such
> people are rare enough and eccentric enough that i don't care about
> them.)
>

Gray only means only one color in PDF not 4 color (in Acrobat it
appears as color scheme: Gray, value 0).

DVIPS puts the color "Black" in the PS file for the remaining normal
text after the first occurrence of colored text (e.g. {\special{color
push rgb 0 0 1}This is Blue.\special{color pop}}). If color package
used (color.sty) same happens from the begining of the document.
Problem here with output device is that when it reads the normal text
also in CMYK color scheme (cmyk --> 0,0,0,1) then it process this as
colored text where only black is on and rest other are off.

> >How we can overcome of this problem by being in TeX.
>
> push something of your own choosing at the start of the document?
> (\AtBeginDvi if you're using latex). or hack your copy of color.pro
> -- though i've not sorted in my own mind where that top-of-stack thing
> is created.

Yes, I was knowing that I can rectify this by having my own copy of
color.pro and redefing "Black" from "Black{0 0 0 1 setcmykcolor}" to
"Black{0 setgray}" and this will solve my problem, but I was thinking
that there something can be done at macro level which can instruct
DVIPS not to put black after any occurrence of color however it should
retain the color that was set before the occurrence of colored text or
I should say it should retain the color of nornal text (Gray scheme,
value).

I hope I have explained it in detail, if somebody have any idea about
dealing this problem at LaTeX macro level or there is any patch to
dvips to do same, then please let me know.

Thanks Robin to suggest me the case of putting value at begining of
DVI, I will definitely check it...

> --
> Robin Fairbairns, Cambridge

Robin Fairbairns

unread,
Sep 30, 2006, 3:43:57 PM9/30/06
to
"david" <davi...@yahoo.com> writes:
Yes, I knew that I can rectify this by having my own copy of

>color.pro and redefing "Black" from "Black{0 0 0 1 setcmykcolor}" to
>"Black{0 setgray}" and this will solve my problem, but I was thinking
>that there something can be done at macro level which can instruct
>DVIPS not to put black after any occurrence of color however it should
>retain the color that was set before the occurrence of colored text or
>I should say it should retain the color of nornal text (Gray scheme,
>value).

you're not using any macros. if you want something that behaves
differently than the standard, you need to change the only control
you're using, which is color.pro

>I hope I have explained it in detail, if somebody have any idea about
>dealing this problem at LaTeX macro level or there is any patch to
>dvips to do same, then please let me know.

i suspect the patch is to color.pro, which is part of the dvips
distribution. (or was, when dvips was distributed separately.)

(why are you bothering about postscript anyway?)
--
Robin Fairbairns, Cambridge

david

unread,
Oct 4, 2006, 3:37:17 AM10/4/06
to

I am bothering because unnecessarily it is going change the normal one
color text into 4 color text. Is there not any configuration file for
dvips where one can add his own profiles (same like color.pro) to
override the default behaviour of translating colors using color.pro.?

> --
> Robin Fairbairns, Cambridge

Dan

unread,
Oct 4, 2006, 10:19:07 AM10/4/06
to

david wrote:
> Robin Fairbairns wrote:
> > "david" <davi...@yahoo.com> writes:
[...]

> >
> > i suspect the patch is to color.pro, which is part of the dvips
> > distribution. (or was, when dvips was distributed separately.)
> >
> > (why are you bothering about postscript anyway?)
>
> I am bothering because unnecessarily it is going change the normal one
> color text into 4 color text. Is there not any configuration file for
> dvips where one can add his own profiles (same like color.pro) to
> override the default behaviour of translating colors using color.pro.?

If you run "dvips --help" (or read the dvips documentation) you will
see there is one option to include "header files":
dvips -h mycolor.pro ...

Unfortunately, that file is added at the beginning, before color.pro.
But fortunately color.pro only defines a color name if that name is
not known. So you can probably get away including a definition for
Black (and probably also White and Gray).


Dan

david

unread,
Oct 6, 2006, 4:58:16 AM10/6/06
to

Thanks Dan, it is even better soulution to overcome of this problem.
Now finally I am underatanding that there is no way to tell DVIPS not
to write "Black" after the colored text occurence.

>
> Dan

0 new messages