[metapost] Problem with colors

Steve Checkoway s at pahtak.org
Sat Aug 7 22:25:01 CEST 2010


If I use the following MP program, I get a red X exactly as I would expect. If I change red to any of cyan, magenta, or yellow, I get an error. I'm not entirely sure what I'm doing wrong.

If I change the \color{yellow} to \color[rgb]{1,1,0} then I can get yellow text. (Presumably, I can do the same with cyan or magenta, but I didn't test it.)

$ cat foo.mp
prologues := 3;
outputtemplate := "%j.mps";
verbatimtex
%&latex
\documentclass{article}
\usepackage{color}
\begin{document}
etex
beginfig(1);
label(btex \color{red}X etex, origin);
endfig;
end

$ cat foo.log
This is MetaPost, version 1.208 (kpathsea version 5.0.0) (mem=mpost 2010.07.27)  7 AUG 2010 13:19
**foo
(./foo.mp
>> cmyk
! Improper type.
<to be read again> 
                   (
<argument> withcolor.cmyk(
                          0,0,1,0)
_s->...caled(EXPR4)shifted((EXPR5),(EXPR6))(TEXT7)
                                                  ;endgroup
l.8 )
     ;
? 
! Extra tokens will be flushed.
<to be read again> 
                   (
<argument> withcolor.cmyk(
                          0,0,1,0)
_s->...caled(EXPR4)shifted((EXPR5),(EXPR6))(TEXT7)
                                                  ;endgroup
l.8 )
     ;
? 
[1{pdftex.map}<cmr10.pfb>] )
1 output file written: foo.mps

-- 
Steve Checkoway







More information about the metapost mailing list