On 9/12/2025 7:49 AM, jbf wrote:
This is very definitely an MPgraphic and colour issue. I have used the
MPgraphic script below to produce a particular Chapter title (which the
author wants). I resolved another issue I had with it, and had raised
earlier on this list, but the printshop has just contacted me to say
that all chapter titles (10 of them) have come out in 4 colours and they
want them in grayscale.
Now, I can probably resolve the issue outside of ConTeXt by converting
the entire pdf to grayscale later in another program, but I just thought
that before I do that I would ask if there is someone who can point to a
way, within the MPgraphic script below, to ensure that we do not get a
colour, but a grayscale (B&W) product.
Julian
\startuseMPgraphic{MyChapterGraphic}
picture toc, num ;
toc :=
textext("\unframed[width=8cm,align=normal,offset=3mm,leftframe=on,rulethickness=1pt]
{%
{\switchtobodyfont[18pt]\labeltext{mychapter}}\blank[small]
{\switchtobodyfont[12pt] \MPtext{2}}\blank[big]
\placecombinedlist[MyContent]
}") ;
toc := toc shifted (-llcorner toc) ;
num := textext("\MPtext{1}") ;
num := num ysized 0.8(ypart ulcorner toc) ;
num := num shifted (-llcorner num) ;
num := num shifted (-0.65(xpart lrcorner num), 0.1(ypart ulcorner toc) ) ;
clip num to ((-10cm,0) -- (0,0) -- ulcorner toc -- (-10cm, ypart ulcorner
toc) -- cycle) ;
draw toc ;
draw num ;
currentpicture := currentpicture xshifted 0.4(TextWidth - xpart lrcorner toc
- xpart llcorner num) ;
setbounds currentpicture to unitsquare xyscaled (TextWidth, ypart urcorner
toc) ;
\stopuseMPgraphic
This example doesn't show what you do with colors. But
\setupcolors[state=stop]
\starttext
\startMPpage
fill fullsquare scaled 10cm withcolor (.4,.5,.6,.7) ;
fill fullsquare scaled 5cm withcolor (.4,.5,.6) ;
fill fullsquare scaled 2cm withcolor (.4) ;
\stopMPpage
\stoptext
should produce gray scale output when you use the proper commands for
color. In doubt, make some minimal example and look in the pdf page
stream. I wouldn't rely on what a printer tells, definitely not when the
file went throgh some pdf application before printing. I remember two
cases:
- a printing house phoning about some bitmap in a file that only had
vector graphics (experienced printer who basically wanted our
confirmation that the tool they used was crap and then just printed)
- a printing house complaining about zero width lines that actually
resulted from their validation / cleanup toolchain (so they just printed
what we send them and all was fine)
So best look in the file and configure rendering right when there are
colors. Or maybe in your case the cmyk comes from some included image
which you then need to convert.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________