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
___________________________________________________________________________________

Reply via email to