Re: [NTG-context] PPCHTEX: bonds overlaps the radicals groups
On Mon, 28 Sep 2015 15:37:27 +0100 DesdeChaveswrote: > I try inserting several \chemical[ONE, .2MOV1] statements in some key > places, but without success. Can you provide me a very simple example? The idea is to draw the bond, then move, then the atom: \chemical [ONE,SB5,Z5,.2MOV1,Z0,.2MOV1,SB1,1.2MOV1,Z0] [H_3C,CH_2,CH_2] a bit sloppy, perhaps, but such is the syntax. On the other hand, one can make multiple calls to \chemical, thus making the code more readable. Alternately, one can shorten the bond segments which are defined as [.25,.75] of the bond length, but this turns out to be less aesthetic than adding small moves. One could imagine also to draw the text inside a framed box using a white background, as in \framed[frame=off,background=color,backgroundcolor=white]{\chemical{CH_2}} but I do not like this solution at all. I suppose that we could modify the underlying MP code to avoid extending any bond over the text box, but this would impose that the user draw the nodes before the bonds and would surely fail as one builds molecules in segments (unless the user be fully aware of the drawing process). We decided that this would be worse. 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 ___
Re: [NTG-context] PPCHTEX: bonds overlaps the radicals groups
On Sun, 27 Sep 2015 18:00:23 +0100 DesdeChaveswrote: > 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 ___
[NTG-context] PPCHTEX: bonds overlaps the radicals groups
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? 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. Thanks and have a nice sunday. teste.tex Description: TeX document ___ 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 ___