ma-cb-en-chemical.tex /size: 1964 b    last modification: 2020-07-01 14:35
1\startcomponent ma-cb-en-chemical
2
3\enablemode[**en-us]
4
5\project ma-cb
6
7\startchapter[title=Chemical stuf,reference=chemical]
8
9\index{chemistry}
10\index{chemical equitation}
11
12\Command{\tex{}chemical}
13
14Chemical structures may look very impressive.
15
16\startbuffer
17\startchemical[scale=small,width=fit,top=3000,bottom=3000]
18  \chemical[SIX,SB2356,DB14,Z2346,SR3,RZ3,SR6,-RZ6,+RZ6]
19           [C,N,C,C,H,H]
20  \chemical[PB:Z1,ONE,Z0,MOV8,Z0,SB24,DB7,Z27,PE][C,C,CH_3,O]
21  \chemical[PB:Z5,ONE,Z0,MOV6,Z0,SB24,DB7,Z47,PE][C,C,H_3C,O]
22  \chemical[SR24,RZ24][CH_3,H_3C]
23  \bottext{Compound A}
24\stopchemical
25\stopbuffer
26
27\placeformula[-]
28\startformula
29  \getbuffer
30\stopformula
31
32\CONTEXT\ relies on \METAPOST\ to draw these kind of chemical structures.
33Although these chemical structures are defined with only two or three commands,
34it takes some practice to get the right results. This is how the input looks:
35
36\typebuffer
37
38Chemical reactions can be typeset within a paragraph or as a display formula with
39the \type{\inlinechemical} and \type{\startchemicalformula} commands:
40
41\startbuffer
42\definefloat
43  [chemicalformula]
44  [chemicalformulas]
45
46One of the steps in the Hasselt canal water treatment is the removal of
47phosphate by means of a chemical reaction with iron:
48
49\placechemicalformula[none][]{}
50  {\startchemicalformula
51    \chemical{Fe(OH)_3}{iron hydroxide}
52    \chemical{PLUS}
53    \chemical{H_3PO_4}{phosphoric acid}
54    \chemical{GIVES}{\hphantom{whatever}}
55    \chemical{FePO_4}{iron phosphate}
56    \chemical{PLUS}
57    \chemical{H_2O}{water}
58  \stopchemicalformula}
59
60The \inlinechemical{FePO_4} is a solid and precipitates in water. It
61is filtered and re-used as a furtilizer resource.
62\stopbuffer
63
64\getbuffer
65
66This is defined by:
67
68\typebuffer
69
70The use of the chemical commands is described in the \goto{PPCHTeX Manual}[ url(manual:chemic) ]
71and the example manual \goto{Chemical Formulas in \CONTEXT} [ url(manual:chemic-ex) ].
72
73\stopchapter
74
75\stopcomponent
76
77
78