Changes

Jump to navigation Jump to search
1,087 bytes added ,  16:49, 26 January 2009
added some examples of chemical structures
The main difference with the official chemic module is that the <code>\modlecule</code> from this example uses the same font as the one in surrounding text, while the official module always uses roman font (which is probably the proper way if you're writing dozens of formulas). Hans's module is also more powerful (can do much more trickery than a simple conversion of subscripts and superscripts). See the manuals listed above.
 
== Chemical structures ==
 
(see also [http://mitglied.lycos.de/ppchtex/00index.html PPCHTeX structure database])
 
<texcode>
\usemodule[chemic]
 
\starttext
 
\startchemical
\chemical[FIVE,FRONT,BB125,+SB3,-SB4,Z4][O]
\chemical[FIVE,FRONT,+R1235,+RZ1235][H,H,\SR{HOH_2C},OH]
\chemical[FIVE,FRONT,-R1235,-RZ1235][H,OH,H,H]
\stopchemical
 
\stoptext
</texcode>
 
[[Image:Chemistry_example1.png]]
 
<texcode>
\usemodule[chemic]
\setupchemical[width=fit]
 
\starttext
 
\startchemical
\chemical[SIX,B,C,MOV2,B,C,R234,RZ234,MOV5,MOV6,B,C,R561,RZ561]
[R,R,R,R,R,R]
\stopchemical
 
\stoptext
</texcode>
 
[[Image:chemistry_example2.png]]
 
To draw this structure horizontally:
<texcode>
\usemodule[chemic]
\setupchemical[width=fit]
 
\starttext
 
\rotate[rotation=90]{
\startchemical
\chemical[SIX,B,C,MOV2,B,C,R234,RZ234,MOV5,MOV6,B,C,R561,RZ561]
[\RotR,\RotR,\RotR,\RotR,\RotR,\RotR]
\stopchemical
}
 
/stoptext
</texcode>
 
[[Image:chemistry_example3.png]]
[[Category:Graphics]]
[[Category:Chemistry]]
148

edits

Navigation menu