ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: DesdeChaves <desdechaves@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: PPCHTEX: bonds overlaps the radicals groups
Date: Mon, 28 Sep 2015 14:01:24 +0200	[thread overview]
Message-ID: <20150928140124.145621c1@iram-hb-003386.extra.cea.fr> (raw)
In-Reply-To: <CAPBmU9EDh4ypfMAbmrhitYEEvpk5zW_-XPaesdybshr9j1+B6Q@mail.gmail.com>

On Sun, 27 Sep 2015 18:00:23 +0100
DesdeChaves <desdechaves@gmail.com> wrote:

> Some time ago I wrote the code attached to create random branched
> organic molecules. However, with recent versions of Context the
> carbon-carbon bonds overwrites the radicals. How can I fix this?

The mkiv chemistry module (replacing the mkii PPCHTEX code) uses
tighter spacing around the nodes, which looks nicer with single atomic
symbols. You are placing CH and CH_2 groups so it is necessary to
increasing the spacing at these spots. One trick could be:
  \chemical [ONE,.2MOV1]
which moves .2 bond lengths in the x-direction.

You also need to pay attention to the automatic alignment of symbols,
in particular when using ONE. For Z0 is centered, Z1 is right adjusted,
Z5 is left adjusted... One can explicitly fix the alignment using:
  \chemical [ONE,simalign=lft,Z1]
(MetaPost alignment keys) but it is much easier to leave simalign=auto
and to choose appropriate nodes (using [ONE,MOV1,Z0] rather than
[ONE,Z1] for example).


> Another question: is there a way to change the bonds color? I would
> like to blank some radicals and bonds and ask the students to draw it.

\chemical [rulecolor=red,ONE,B]

Of course, it is a "global" so you will need to use multiple calls in
order to color particular bonds.

Alan
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-09-28 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 17:00 DesdeChaves
2015-09-28 12:01 ` Alan BRASLAU [this message]
     [not found]   ` <CAPBmU9HRsFT6MnAkPWa73256r-t+vgh6aHPo4A6r5_Uy0dNbfg@mail.gmail.com>
2015-09-28 15:20     ` Alan BRASLAU

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=20150928140124.145621c1@iram-hb-003386.extra.cea.fr \
    --to=alan.braslau@cea.fr \
    --cc=desdechaves@gmail.com \
    --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).