ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hartmut Henkel <hartmut_henkel@gmx.de>
Subject: Re: color in pdfTeX
Date: Thu, 4 Mar 2004 23:56:10 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.58.0403042349260.1679@hahepc1.hahe> (raw)
In-Reply-To: <4047ACA2.7080005@poczta.onet.pl>

On Thu, 4 Mar 2004, pawcoo wrote:

> > Lines with width <= 1 bp are stroked by pdftex, lines wider than that
> > are filled (procedure pdf_set_rule). Stroking CMYK color is set by K,
> > nonstroking by k, so you need both:

Note, forgot this: This only affects the \hrule and \vrule primitives.
When you do lines by literals, you are on your own...

> > \pdfliteral{0 1 0 0 k}
> > \pdfliteral{0 1 0 0 K}
>
> Thanks! That works. I'll dare to ask one more question. How to use
> colors in (some kind of) groups, meaning localy? In example, how to
> set some nice color for given object only (word, letter or rule)? Or
> should I always say something like
>
> \pdfliteral{0 1 0 0 k}
>   colorized text
> \pdfliteral{0 0 0 1 k} % come back to black

Seems to be currently the only way. The \pdfliteral{} primitives are
done between two x/y transformations, so you can't use q/Q grouping.
And the \pdfliteral direct{} variant doesn't help either, as it comes
before BT, but also _before_ ET, so grouping would be broken also.
Probably something to consider for a change...

Regards, Hartmut

  reply	other threads:[~2004-03-04 22:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03  0:45 color in hairlines pawcoo
2004-03-03 21:36 ` Hartmut Henkel
2004-03-04 22:24   ` color in pdfTeX pawcoo
2004-03-04 22:56     ` Hartmut Henkel [this message]
2004-03-05  7:21       ` pawcoo
2004-03-05 15:33         ` Henning Hraban Ramm
2004-03-05 16:16           ` pawcoo
2004-03-11  2:16     ` Guy Worthington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0403042349260.1679@hahepc1.hahe \
    --to=hartmut_henkel@gmx.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).