[Xy-pic] problem with color option

Les Saper saper at math.duke.edu
Wed Jun 4 12:02:31 CEST 2003


Dear Juergen,

I see the same problem with gv and Ghostscript 7.06.  Here is a 
simpler workaround: 

	\newxyColor{lightgray}{0.8}{gray}{}

(Note the capital 'C'!)

I think there is a bug somewhere, perhaps in xycolor.tex, perhaps 
in the documentation; maybe Ross Moore can explain this.  To help 
folks debug this, I give here is a 3 samples of the postscript 
produced by dvips (with the dvips option fed to XyPic). 

1) First, using the code above:

  SDict begin xyc end
 1057 1007 a 0.8 TeXcolorgray 0.8 TeXcolorgray
1837 983 a
 SDict begin {pu {0.8 gray}cc}xyg  end
 1837 983 a 2097 1133 a @beginspecial @setspecial
 {62.58781 36.135 dt}xy

This works great.

2) Compare this with the postscript produced when using 

	\newxycolor{lightgray}{0.8 gray}

The corresponding sample reads:

 SDict begin xyc end
 1057 1007 a gray TeXcolor0.8 gray TeXcolor0.8
1837 983 a
 SDict begin {pu {0.8 gray}cc}xyg  end
 1837 983 a 2097 1133 a @beginspecial @setspecial
 {62.58781 36.135 dt}xy

This causes errors with gv and Ghostscript 7.06.  Note 
"TeXcolorgray" in the first example versus "TeXcolor0.8" in the 
second. 

3) If you try (!)

	\newxycolor{lightgray}{gray 0.8}

the postscript contains:

 SDict begin xyc end
 1057 1007 a 0.8 TeXcolorgray 0.8 TeXcolorgray
1837 983 a
 SDict begin {pu {gray 0.8}cc}xyg  end
 1837 983 a 2097 1133 a @beginspecial @setspecial
 {62.58781 36.135 dt}xy

This works fine with gv and Ghostscript 7.06.

Incidently, the first two methods work fine when the dvi file is 
displayed by xdvi which also calls Ghostscript 7.06, but the 
third one of course causes an error. 

- Les Saper

On Jun 4,2003 10:19:48 +0200, Jürgen Koslowski <koslowj at iti.cs.tu-bs.de> wrote :
>Hello,
>
>I ran into a problem with the color option.  While TeX and dvips do not
>complain about a line like
>
>\newxycolor{lightgray}{0.8 gray}
>
>ghostscript produces an error message when trying to display the resulting
>PostScript file.  This happens under ghostscript 5.50 as well as 7.05.
>Explicitly, the former complains about
>
>Error: /typecheckGNU Ghostscript: Unrecoverable error, exit code 1
> in --setgray--
>Operand stack:
>   --dict:915/1241(G)--
>Execution stack:
>   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
>Dictionary stack:
>   --dict:915/1241(G)--   --dict:0/20(G)--   --dict:65/200(L)--   --dict:201/300(L)--
>Current allocation mode is local
>Current file position is 516545
>Error: /typecheck in --setgray--GNU Ghostscript: Unrecoverable error, exit code 1
>
>On the other hand, if I emulate the definitions in xycolor.tex by setting
>
>\catcode`\@=11
> \newxycolor@{lightgray}{0.8}{gray}{}\relax
>\catcode`\@=12
>
>everything is fine.  Any ideas?
>
>-- 
>Juergen Koslowski               If I don't see you no more on this world
>ITI, TU Braunschweig               I'll meet you on the next one
>koslowj at iti.cs.tu-bs.de               and don't be late!
>http://www.iti.cs.tu-bs.de/~koslowj      Jimi Hendrix (Voodoo Child, SR)
>_______________________________________________
>Xy-pic mailing list
>http://tug.org/mailman/listinfo/xy-pic
>


-----------------------------------------------------------
Leslie Saper                    e-mail: saper at math.duke.edu
Director of Graduate Studies    phone: 919-660-2843
Department of Mathematics       Fax: 919-660-2821
Duke University
Box 90320
Durham, NC   27708-0320
USA






More information about the Xy-pic mailing list