From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ppchtex color
Date: Tue, 12 May 2009 20:17:39 +0200 [thread overview]
Message-ID: <4A09BD43.9070008@wxs.nl> (raw)
In-Reply-To: <200905121529.14981.alan.braslau@cea.fr>
Alan BRASLAU wrote:
> No, ppchtex is not dead...
>
> I would like to use color.
>
> 1. color= and rulecolor= does not appear to be implemented (mkiv)...
> 2. how can one change the color of the bonds?
> 3. using \color[red]{} causes the text to be offset.
>
> "minimal" example:
>
> \setupcolors[state=start]
> \usemodule[chemic]
> \starttext
>
> \startchemical
> \chemical[ONE,SB,Z0][C]
> \stopchemical
>
> \startchemical
> \color[red]{\chemical[ONE,SB,Z0][C]}
> \stopchemical
> % text "C" is offset...
>
> \startchemical
> \chemical[ONE,SB,Z0][{\red C}]
> \stopchemical
> % OK, but I would like to draw the bonds as well in red.
>
> \startchemical[color=red]
> \chemical[ONE,SB,Z0][C]
> \stopchemical
> % "C" is red in mkii, black in mkiv
>
> \startchemical[rulecolor=red]
> \chemical[ONE,SB,Z0][C]
> \stopchemical
setting happened at the outer level (ok, that's broken now but we can
fix that later); so now, each formula must have the settings; when i
have time i'll make a mkiv variant so that we can upgrade (i don't want
interference with mkii since that version is also used in latex and we
don't need to upgrade that)
\def\setchemicalattributes
{\scratchdimen\@@chemicalrulethickness
\def\chemicalattributes
{withpen pencircle scaled \the\scratchdimen\space
withcolor }%
\doifelsenothing\@@chemicalrulecolor
{\edef\chemicalattributes{\chemicalattributes black}}
{\edef\chemicalattributes{\chemicalattributes
\MPcolor{\@@chemicalrulecolor}}}%
\startMPdrawing
drawoptions (\chemicalattributes) ;
\stopMPdrawing}
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2009-05-12 18:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 9:22 The ultimate (?) float problem Piotr Kopszak
2009-05-12 10:02 ` Hans Hagen
2009-05-12 10:16 ` Piotr Kopszak
2009-05-12 10:44 ` Hans Hagen
2009-05-12 10:28 ` luigi scarso
2009-05-12 11:28 ` Piotr Kopszak
2009-05-12 11:46 ` luigi scarso
2009-05-12 13:03 ` Piotr Kopszak
2009-05-12 13:11 ` luigi scarso
2009-05-12 13:18 ` Piotr Kopszak
2009-05-12 13:32 ` Wolfgang Schuster
2009-05-12 13:45 ` Piotr Kopszak
2009-05-12 14:16 ` luigi scarso
2009-05-14 9:17 ` Piotr Kopszak
2009-05-12 13:29 ` ppchtex color Alan BRASLAU
2009-05-12 17:57 ` Hans Hagen
2009-05-12 18:07 ` Hans Hagen
2009-05-12 18:17 ` Hans Hagen [this message]
2009-05-12 20:45 ` Hans Hagen
2009-05-12 21:30 ` Alan BRASLAU
2009-05-12 21:53 ` Hans Hagen
2009-05-12 21:51 ` Alan BRASLAU
2009-05-13 8:33 ` Hans Hagen
2009-05-13 8:55 ` Alan BRASLAU
2009-05-13 11:25 ` Hans Hagen
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=4A09BD43.9070008@wxs.nl \
--to=pragma@wxs.nl \
--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).