Aliphatic compounds by aliphat.sty (v2.00) of XΥMTEX

Shinsaku Fujita Department of Chemistry and Materials Technology, Kyoto Institute of Technology, Matsugasaki, Sakyoku, Kyoto, 606 Japan

1998/12/25

1 Introduction

1.1 Options for docstrip

option function
aliphat aliphat.sty
driver driver for this dtx file

1.2 Version Information

1 ⟨∗aliphat⟩

2 \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
3 \typeout{       -- Released December 25, 1998 by Shinsaku Fujita}
4 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 \def\j@urnalname{aliphat}
6 \def\versi@ndate{December 25, 1998}
7 \def\versi@nno{ver2.00}
8 \def\copyrighth@lder{SF} % Shinsaku Fujita
9 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10 \typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
11 \space[\copyrighth@lder]}

2 List of commands for aliphat.sty

*********************************
* aliphat.sty: list of commands *
*********************************
<Conventions for bond-setting>
    \Northbond

\Eastbond
\Southbond
\Westbond
\NEBond
\NEbond
\SEBond
\SEbond
\NWBond
\NWbond
\SWBond
\SWbond
\NEBOND
\NWBOND
\SEBOND
\SWBOND
<Macros for position adjustment>
\ylrtrigonalposition
\ylRtrigonalposition
\ylltrigonalposition
\ylLtrigonalposition
\ylutrigonalposition
\ylUtrigonalposition
\yldtrigonalposition
\ylDtrigonalposition
\yltethedralposition
\ylsquareposition
\ylethylenepositiona
\ylethylenepositionb
\ylethylenevpositiona
\ylethylenevpositionb
<Macros for tetravalent atoms>
\tetrahedral                       \@tetrahedral
\square                            \@square
<Macros for trivalent atoms>
\rtrigonal                         \@rtrigonal
\Rtrigonal                         \@Rtrigonal
\ltrigonal                         \@ltrigonal
\Ltrigonal                         \@Ltrigonal
\utrigonal                         \@utrigonal
\Utrigonal                         \@Utrigonal
\dtrigonal                         \@dtrigonal
\Dtrigonal                         \@Dtrigonal

  <Macros for two-carbon compounds>
     \ethylene                          \@ethylene
     \Ethylene                          \@Ethylene
     \ethylenev                         \@ethylenev
     \Ethylenev                         \@Ethylenev
  <Macros for stereo-projection>
     \tetrastereo                       \@tetrastereo
     \dtetrastereo                      \@dtetrastereo
     \ethanestereo                      \@ethanestereo

3 Input of basic macros

To assure the compatibility to L^{A}TEX2.09 (the native mode), the commands added by L^{A}TEX 2ε have not been used in the resulting sty files (aliphat.sty for the present case). Hence, the combination of \input and \@ifundefined is used to crossload sty files (chemstr.sty for the present case) in place of the \RequirePackage command of L^{A}TEX 2ε.

12 % *************************
13 % * input of basic macros *
14 % *************************
15 \@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
16 \unitlength=0.1pt

4 Macros for bond-setting

Single, double and triple bonds of aliphatic compounds are represented by horizontal, vertical or sloped lines, which can be drawn by such commands as

\Eastbond, \Northbond and \SEbond.
\Northbond
17 % ********************************
18 % * Conventions for bond-setting *
19 % ********************************
20 \def\Northbond{%
21 \yl@xdiff=40
22 \yl@ydiff=-15
23 \begin{picture}(100,200)(0,0)
24 \if\@tmpb D\relax%
25  \multiput(-13,52)(26,0){2}{\line(0,1){100}}% double bond up
26 \else\if\@tmpb T\relax%
27  \multiput(-20,52)(20,0){3}{\line(0,1){100}}% triple bond up
28 \else\if\@tmpb A%(A) alpha

29  {\thicklines\put(-8,52){\line(0,1){100}}}% single bond (alpha)
30 \else\if\@tmpb B%(B) beta
31  \@ifundefined{dottedline}{\put(0,52){\line(0,1){100}}}%
32  {{\thicklines \dottedline{20}(0,52)(0,152)}}%
33 \else\if\@tmpb S%
34  \put(0,52){\line(0,1){100}}%
35 \else \put(0,52){\line(0,1){100}}%
36 \fi\fi\fi\fi\fi%
37 \putlratom{-40}{167}{\@memberb}%==1 upper substituent
38 \end{picture}}%
\Eastbond
39 \def\Eastbond{%
40 \yl@xdiff=-10
41 \yl@ydiff=33
42 \begin{picture}(200,200)(0,0)
43 \if\@tmpb D\relax%
44  \multiput(50,-13)(0,26){2}{\line(1,0){140}}% double bond right
45 \else\if\@tmpb T\relax%
46  \multiput(50,-20)(0,20){3}{\line(1,0){140}}% double bond right
47 \else\if\@tmpb A%(A) alpha
48  {\thicklines\put(50,0){\line(1,0){140}}}% single bond (alpha)
49 \else\if\@tmpb B%(B) beta
50  \@ifundefined{dottedline}{\put(50,0){\line(1,0){140}}}%
51  {{\thicklines \dottedline{20}(50,0)(203,0)}}%
52 \else\if\@tmpb S%
53  \put(50,0){\line(1,0){140}}%
54  \else \put(50,0){\line(1,0){140}}%
55 \fi\fi\fi\fi\fi%
56 \putratom{200}{-33}{\@memberb}%==2 right substituent
57 \end{picture}}%
\Southbond
58 \def\Southbond{%
59 \yl@xdiff=40
60 \yl@ydiff=95
61 \begin{picture}(100,300)(0,0)
62 \if\@tmpb D\relax%
63  \multiput(-13,-48)(26,0){2}{\line(0,-1){100}}% double bond down
64 \else\if\@tmpb T\relax%
65  \multiput(-20,-48)(20,0){3}{\line(0,-1){100}}% double bond down
66 \else\if\@tmpb A%(A) alpha
67  {\thicklines\put(-8,-48){\line(0,-1){100}}}% single bond (alpha)
68 \else\if\@tmpb B%(B) beta
69  \@ifundefined{dottedline}{\put(0,-48){\line(0,-1){100}}}%
70  {{\thicklines \dottedline{20}(0,-48)(0,-148)}}%
71 \else\if\@tmpb S%
72  \put(0,-48){\line(0,-1){100}}%
73  \else \put(0,-48){\line(0,-1){100}}%
74 \fi\fi\fi\fi\fi%

75 \putlratom{-40}{-243}{\@memberb}%==3 down substituent
76 \end{picture}}%
\Westbond
77 \def\Westbond{%
78 \yl@xdiff=10
79 \yl@ydiff=33
80 \begin{picture}(100,300)(0,0)
81 \if\@tmpb D\relax%
82  \multiput(-190,-13)(0,26){2}{\line(1,0){140}}% double bond left
83 \else\if\@tmpb T\relax%
84  \multiput(-190,-20)(0,20){3}{\line(1,0){140}}% double bond left
85 \else\if\@tmpb A%(A) alpha
86  {\thicklines\put(-190,0){\line(1,0){140}}}% single bond (alpha)
87 \else\if\@tmpb B%(B) beta
88  \@ifundefined{dottedline}{\put(-190,0){\line(1,0){140}}}%
89  {{\thicklines \dottedline{20}(-190,0)(-40,0)}}%
90 \else\if\@tmpb S%
91  \put(-190,0){\line(1,0){140}}%
92 \else \put(-190,0){\line(1,0){140}}%
93 \fi\fi\fi\fi\fi%
94 \putlatom{-200}{-33}{\@memberb}%==4 left substituent
95 \end{picture}}%
\NEBond
96 \def\NEBond{%degree 120
97 \yl@xdiff=-9
98 \yl@ydiff=13
99 \begin{picture}(100,300)(0,0)
100 \if\@tmpb D\relax%
101  \put(33,48){\line(5,3){121}}%
102  \put(47,26){\line(5,3){121}}%northeast double bond
103 \else\if\@tmpb T\relax%
104  \put(31,52){\line(5,3){121}}%
105  \put(40,37){\line(5,3){121}}%
106  \put(49,22){\line(5,3){121}}%northeast triple bond
107 \else\if\@tmpb A%(A) alpha
108  {\thicklines\put(40,47){\line(5,3){121}}}% single bond (alpha)
109 \else\if\@tmpb B%(B) beta
110  \@ifundefined{dottedline}{\put(40,47){\line(5,3){121}}}%
111  {{\thicklines \dottedline{20}(40,47)(161,120)}}%
112 \else\if\@tmpb S%
113  \put(40,47){\line(5,3){121}}%
114 \else \put(40,47){\line(5,3){121}}%
115 \fi\fi\fi\fi\fi%
116 \putratom{170}{107}{\@memberb}%==2 (northeast substituent)
117 \end{picture}}%
\NEbond

118 \def\NEbond{%degree 90
119 \yl@xdiff=-5
120 \yl@ydiff=10
121 \begin{picture}(100,300)(0,0)
122 \if\@tmpb D\relax%
123  \put(31,46){\line(1,1){100}}%
124  \put(49,28){\line(1,1){100}}%northeast double bond
125 \else\if\@tmpb T\relax%
126  \put(27,50){\line(1,1){100}}%
127  \put(40,37){\line(1,1){100}}%
128  \put(53,24){\line(1,1){100}}%northeast triple bond
129 \else\if\@tmpb A%(A) alpha
130  {\thicklines\put(40,47){\line(1,1){100}}}% single bond (alpha)
131 \else\if\@tmpb B%(B) beta
132  \@ifundefined{dottedline}{\put(40,47){\line(1,1){100}}}%
133  {{\thicklines \dottedline{20}(40,47)(140,147)}}%
134 \else\if\@tmpb S%
135  \put(40,47){\line(1,1){100}}%
136 \else \put(40,47){\line(1,1){100}}%
137 \fi\fi\fi\fi\fi%
138 \putratom{145}{137}{\@memberb}%==2 (northeast substituent)
139 \end{picture}}%
\SEBond
140 \def\SEBond{%degree 120
141 \yl@xdiff=-9
142 \yl@ydiff=67
143 \begin{picture}(100,300)(0,0)
144 \if\@tmpb D\relax%
145  \put(33,-48){\line(5,-3){121}}%
146  \put(47,-26){\line(5,-3){121}}%southeast double bond
147 \else\if\@tmpb T\relax%
148  \put(31,-52){\line(5,-3){121}}%
149  \put(40,-37){\line(5,-3){121}}%
150  \put(49,-22){\line(5,-3){121}}%southeast triple bond
151 \else\if\@tmpb A%(A) alpha
152  {\thicklines\put(40,-47){\line(5,-3){121}}}% single bond (alpha)
153 \else\if\@tmpb B%(B) beta
154  \@ifundefined{dottedline}{\put(40,-47){\line(5,-3){121}}}%
155  {{\thicklines \dottedline{20}(40,-47)(161,-120)}}%
156 \else\if\@tmpb S%
157  \put(40,-47){\line(5,-3){121}}%
158 \else \put(40,-47){\line(5,-3){121}}%
159 \fi\fi\fi\fi\fi%
160 \putratom{170}{-187}{\@memberb}%==2 (southeast substituent)
161 \end{picture}}%
\SEbond
162 \def\SEbond{%degree 90
163 \yl@xdiff=-5

164 \yl@ydiff=56
165 \begin{picture}(100,300)(0,0)
166 \if\@tmpb D\relax%
167  \put(31,-46){\line(1,-1){100}}%
168  \put(49,-28){\line(1,-1){100}}%southeast double bond
169 \else\if\@tmpb T\relax%
170  \put(27,-50){\line(1,-1){100}}%
171  \put(40,-37){\line(1,-1){100}}%
172  \put(53,-24){\line(1,-1){100}}%southeast triple bond
173 \else\if\@tmpb A%(A) alpha
174  {\thicklines\put(53,-47){\line(1,-1){100}}}% single bond (alpha)
175 \else\if\@tmpb B%(B) beta
176  \@ifundefined{dottedline}{\put(40,-47){\line(1,-1){100}}}%
177  {{\thicklines \dottedline{20}(40,-47)(140,-147)}}%
178 \else\if\@tmpb S%
179  \put(40,-47){\line(1,-1){100}}%
180 \else \put(40,-47){\line(1,-1){100}}%
181 \fi\fi\fi\fi\fi%
182 \putratom{145}{-203}{\@memberb}%==3 (southeast substituent)
183 \end{picture}}%
\NWBbond
184 \def\NWBond{%
185 \begin{picture}(100,300)(0,0)
186 \yl@xdiff=9
187 \yl@ydiff=13
188 \if\@tmpb D\relax%
189  \put(-59,48){\line(-5,3){121}}%
190  \put(-73,26){\line(-5,3){121}}%northwest double bond
191 \else\if\@tmpb T\relax%
192  \put(-57,52){\line(-5,3){121}}%
193  \put(-66,37){\line(-5,3){121}}%
194  \put(-75,22){\line(-5,3){121}}%northwest triple bond
195 \else\if\@tmpb A%(A) alpha
196  {\thicklines\put(-66,47){\line(-5,3){121}}}% single bond (alpha)
197 \else\if\@tmpb B%(B) beta
198  \@ifundefined{dottedline}{\put(-66,47){\line(-5,3){121}}}%
199  {{\thicklines \dottedline{20}(-66,47)(-187,120)}}%
200 \else\if\@tmpb S%
201  \put(-66,47){\line(-5,3){121}}%
202 \else \put(-66,47){\line(-5,3){121}}%
203 \fi\fi\fi\fi\fi%
204 \putlatom{-196}{107}{\@memberb}%==2 (northwest substituent)
205 \end{picture}}%
\NWbond
206 \def\NWbond{%
207 \begin{picture}(100,300)(0,0)
208 \yl@xdiff=13
209 \yl@ydiff=10

210 \if\@tmpb D\relax%
211  \put(-41,46){\line(-1,1){100}}%
212  \put(-59,28){\line(-1,1){100}}%northwest double bond
213 \else\if\@tmpb T\relax%
214  \put(-37,50){\line(-1,1){100}}%
215  \put(-50,37){\line(-1,1){100}}%
216  \put(-63,24){\line(-1,1){100}}%northwest triple bond
217 \else\if\@tmpb A%(A) alpha
218  {\thicklines\put(-50,47){\line(-1,1){100}}}% single bond (alpha)
219 \else\if\@tmpb B%(B) beta
220  \@ifundefined{dottedline}{\put(-50,47){\line(-1,1){100}}}%
221  {{\thicklines \dottedline{20}(-50,47)(-137,147)}}%
222 \else\if\@tmpb S%
223  \put(-50,47){\line(-1,1){100}}%
224 \else \put(-50,47){\line(-1,1){100}}%
225 \fi\fi\fi\fi\fi%
226 \putlatom{-163}{137}{\@memberb}%==2 (northwest substituent)
227 \end{picture}}%
\SWBond
228 \def\SWBond{%
229 \yl@xdiff=9
230 \yl@ydiff=67
231 \begin{picture}(100,300)(0,0)
232 \if\@tmpb D\relax%
233  \put(-59,-48){\line(-5,-3){121}}%
234  \put(-73,-26){\line(-5,-3){121}}%southwest double bond
235 \else\if\@tmpb T\relax%
236  \put(-57,-52){\line(-5,-3){121}}%
237  \put(-66,-37){\line(-5,-3){121}}%
238  \put(-75,-22){\line(-5,-3){121}}%southwest triple bond
239 \else\if\@tmpb A%(A) alpha
240  {\thicklines\put(-66,-47){\line(-5,-3){121}}}% single bond (alpha)
241 \else\if\@tmpb B%(B) beta
242  \@ifundefined{dottedline}{\put(-66,-47){\line(-5,-3){121}}}%
243  {{\thicklines \dottedline{20}(-66,-47)(-187,-120)}}%
244 \else\if\@tmpb S%
245  \put(-66,-47){\line(-5,-3){121}}%
246 \else \put(-66,-47){\line(-5,-3){121}}%
247 \fi\fi\fi\fi\fi%
248 \putlatom{-196}{-187}{\@memberb}%==2 (southwest substituent)
249 \end{picture}}%
\SWbond
250 \def\SWbond{%
251 \yl@xdiff=13
252 \yl@ydiff=56
253 \begin{picture}(100,300)(0,0)
254 \if\@tmpb D\relax%
255  \put(-41,-46){\line(-1,-1){100}}%

256  \put(-59,-28){\line(-1,-1){100}}%southwest double bond
257 \else\if\@tmpb T\relax%
258  \put(-37,-50){\line(-1,-1){100}}%
259  \put(-50,-37){\line(-1,-1){100}}%
260  \put(-63,-24){\line(-1,-1){100}}%southwest triple bond
261 \else\if\@tmpb A%(A) alpha
262  {\thicklines\put(-50,-47){\line(-1,-1){100}}}% single bond (alpha)
263 \else\if\@tmpb B%(B) beta
264  \@ifundefined{dottedline}{\put(-50,-47){\line(-1,-1){100}}}%
265  {{\thicklines \dottedline{20}(-50,-47)(-137,-147)}}%
266 \else\if\@tmpb S%
267  \put(-50,-47){\line(-1,-1){100}}%
268 \else \put(-50,-47){\line(-1,-1){100}}%
269 \fi\fi\fi\fi\fi%
270 \putlatom{-163}{-203}{\@memberb}%==3 (southwest substituent)
271 \end{picture}}%
\NEBOND
272 \def\NEBOND{%degree 120
273 \yl@xdiff=-1
274 \yl@ydiff=-10
275 \begin{picture}(100,300)(0,0)
276 \if\@tmpb D\relax%
277  \put(48,33){\line(3,5){72}}%
278  \put(26,47){\line(3,5){72}}%northeast double bond
279 \else\if\@tmpb T\relax%
280  \put(52,31){\line(3,5){72}}%
281  \put(37,40){\line(3,5){72}}%
282  \put(22,49){\line(3,5){72}}%northeast triple bond
283 \else\if\@tmpb A%(A) alpha
284  {\thicklines\put(40,47){\line(3,5){72}}}% single bond (alpha)
285 \else\if\@tmpb B%(B) beta
286  \@ifundefined{dottedline}{\put(47,40){\line(3,5){72}}}%
287  {{\thicklines \dottedline{20}(47,40)(120,161)}}%
288 \else\if\@tmpb S%
289  \put(47,40){\line(3,5){72}}%
290 \else \put(47,40){\line(3,5){72}}%
291 \fi\fi\fi\fi\fi%
292 \putratom{120}{170}{\@memberb}%==2 (northeast substituent)
293 \end{picture}}%
\SEBOND
294 \def\SEBOND{%degree 120
295 \yl@xdiff=-1
296 \yl@ydiff=70
297 \begin{picture}(100,300)(0,0)
298 \if\@tmpb D\relax%
299  \put(48,-33){\line(3,-5){72}}%
300  \put(26,-47){\line(3,-5){72}}%southeast double bond
301 \else\if\@tmpb T\relax%

302  \put(52,-31){\line(3,-5){72}}%
303  \put(37,-40){\line(3,-5){72}}%
304  \put(22,-49){\line(3,-5){72}}%southeast triple bond
305 \else\if\@tmpb A%(A) alpha
306  {\thicklines\put(47,-40){\line(3,-5){72}}}% single bond (alpha)
307 \else\if\@tmpb B%(B) beta
308  \@ifundefined{dottedline}{\put(47,-40){\line(3,-5){72}}}%
309  {{\thicklines \dottedline{20}(47,-40)(120,-161)}}%
310 \else\if\@tmpb S%
311  \put(47,-40){\line(3,-5){72}}%
312 \else \put(47,-40){\line(3,-5){72}}%
313 \fi\fi\fi\fi\fi%
314 \putratom{120}{-230}{\@memberb}%==2 (southeast substituent)
315 \end{picture}}%
\NWBOND
316 \def\NWBOND{%
317 \yl@xdiff=1
318 \yl@ydiff=-10
319 \begin{picture}(100,300)(0,0)
320 \if\@tmpb D\relax%
321  \put(-48,33){\line(-3,5){72}}%
322  \put(-26,47){\line(-3,5){72}}%northwest double bond
323 \else\if\@tmpb T\relax%
324  \put(-52,31){\line(-3,5){72}}%
325  \put(-37,40){\line(-3,5){72}}%
326  \put(-22,49){\line(-3,5){72}}%northwest triple bond
327 \else\if\@tmpb A%(A) alpha
328  {\thicklines\put(-40,47){\line(-3,5){72}}}% single bond (alpha)
329 \else\if\@tmpb B%(B) beta
330  \@ifundefined{dottedline}{\put(-47,40){\line(-3,5){72}}}%
331  {{\thicklines \dottedline{20}(-47,40)(-120,161)}}%
332 \else\if\@tmpb S%
333  \put(-47,40){\line(-3,5){72}}%
334 \else \put(-47,40){\line(-3,5){72}}%
335 \fi\fi\fi\fi\fi%
336 \putlatom{-120}{170}{\@memberb}%==2 (northwest substituent)
337 %\yl@xdiff=11
338 %\yl@ydiff=-14
339 %  \if\@tmpb D\relax%
340 %    \put(-48,59){\line(-3,5){72}}%
341 %    \put(-26,73){\line(-3,5){72}}%northwest double bond
342 %  \else\if\@tmpb T\relax%
343 %    \put(-52,57){\line(-3,5){72}}%
344 %    \put(-37,66){\line(-3,5){72}}%
345 %    \put(-22,75){\line(-3,5){72}}%northwest triple bond
346 %  \else\if\@tmpb A%(A) alpha
347 %    {\thicklines\put(-47,66){\line(-3,5){72}}}% single bond (alpha)
348 %  \else\if\@tmpb B%(B) beta
349 %       \@ifundefined{dottedline}{\put(-47,66){\line(-3,5){72}}}%

350 %         {{\thicklines \dottedline{20}(-47,66)(-120,187)}}%
351 %  \else\if\@tmpb S%
352 %       \put(-47,66){\line(-3,5){72}}%
353 %  \else \put(-47,66){\line(-3,5){72}}%
354 %  \fi\fi\fi\fi\fi%
355 %  \putlatom{-130}{200}{\@memberb}%==2 (northwest substituent)
356 %%  \putlatom{-120}{170}{\@memberb}%==2 (northwest substituent)
357 \end{picture}}%
\SWBOND
358 \def\SWBOND{%
359 \yl@xdiff=1
360 \yl@ydiff=70
361 \begin{picture}(100,300)(0,0)
362 \if\@tmpb D\relax%
363  \put(-48,-33){\line(-3,-5){72}}%
364  \put(-26,-47){\line(-3,-5){72}}%southwest double bond
365 \else\if\@tmpb T\relax%
366  \put(-52,-31){\line(-3,-5){72}}%
367  \put(-37,-40){\line(-3,-5){72}}%
368  \put(-22,-49){\line(-3,-5){72}}%southwest triple bond
369 \else\if\@tmpb A%(A) alpha
370  {\thicklines\put(-47,-40){\line(-3,-5){72}}}% single bond (alpha)
371 \else\if\@tmpb B%(B) beta
372  \@ifundefined{dottedline}{\put(-47,-40){\line(-3,-5){72}}}%
373  {{\thicklines \dottedline{20}(-47,-40)(-120,-161)}}%
374 \else\if\@tmpb S%
375  \put(-47,-40){\line(-3,-5){72}}%
376 \else \put(-47,-40){\line(-3,-5){72}}%
377 \fi\fi\fi\fi\fi%
378 \putlatom{-120}{-230}{\@memberb}%==2 (southwest substituent)
379 \end{picture}}%

5 Tetrahedral unit

The macro \tetrahedral typesets a compound of tetravalency. The following numbering is adopted in this macro.

  ********************
  * tetrahedral unit *
  ********************
                 1
                 |
           2  -- 0 --  4       0 <== the original point
                 |
                 3

This macro has an argument SUBSLIST as well as an optional argument

 AUXLIST.
    \tetrahedral[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

      AUXLIST =
         {0+} :  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

      SUBSLIST: list of substituents
        for n = 1 to 4
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \tetrahedral{1==Cl;2==F}
         \tetrahedral{1==Cl;4==F;2==CH$_{3}$}

\tetrahedral
\@tetrahedral
380 \def\tetrahedral{\@ifnextchar[{\@tetrahedral[r}{\@tetrahedral[r]}}
381 \def\@tetrahedral#1]#2{%
382 %\def\tetrahedral{\@ifnextchar[{\@tetrahedral}{\@tetrahedral[]}}
383 %\def\@tetrahedral[#1]#2{%
384 \@reset@ylsw%
385 \yltetrahedralposition{#2}%
386 \if@ylsw \ifx\@@ylii\empty
387 \def\@@ylii{0}\def\@@yli{0}\fi
388 \fi
389 \if@ylsw
390 \yl@shiftii=\@ylii
391 \yl@shifti=\@yli

392 \advance\yl@shiftii\@@ylii
393 \advance\yl@shifti\@@yli
394 \advance\yl@shiftii\yl@xdiff
395 \advance\yl@shifti\yl@ydiff
396 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
397 \reset@yl@xydiff%1999/1/6 by S. Fujita
398 \else
399 \begin{picture}(600,600)(-300,-300)%
400 \iforigpt \put(-300,-300){\circle*{50}}%
401  \put(-\noshift,-\noshift){\circle{50}}%
402 \typeout{command `tetrahedral' origin: %
403  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
404 \fi
405 \@tfor\member:=#1\do{%
406 \expandafter\twoch@@r\member{}{}%
407 \if\@@tmpa 0\relax {\putratom{47}{50}{\scriptsize\@@tmpb}}\fi}%
408 \@forsemicol\member:=#2\do{
409 \ifx\member\empty\else
410 \expandafter\@m@mb@r\member;\relax%
411 \expandafter\threech@r\@membera{}{}%
412 \ifx\@memberb\@yl\else
413 \ifcase\@tmpa
414 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%central atom
415 \or\put(0,0){\Northbond}%
416 \or\put(0,0){\Westbond}%
417 \or\put(0,0){\Southbond}%
418 \or\put(0,0){\Eastbond}\fi%end of ifcase
419 \fi\fi}%
420 \end{picture}}%end of macro tetrahedral
    The command \yltetrahedralposition is used in \tetrahedral to adjust a

substitution position.

\yltetrahedralposition
421 \def\yltetrahedralposition#1{%
422 \@@ylswfalse%%%\@reset@ylsw
423 \@forsemicol\member:=#1\do{%
424 \if@@ylsw\else
425 \ifx\member\empty\else
426 \expandafter\@m@mb@r\member;\relax
427 \expandafter\threech@r\@membera{}{}\relax
428 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
429 \if@@ylsw
430 \ifcase\@tmpa
431 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
432 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
433 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
434 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%E subst. on 1
435 \fi%end of ifcase
436 \fi\fi\fi}}%

6 Divalenth unit

The command \divalenth produces a length-variable divalent unit.

  ******************
  * Divalenth unit *
  ******************

           1  -- (group) --  2       0 <== the original point

This macro has an argument SUBSLIST as well as an optional argument GROUP.

    \divalenth{GROUP}{SUBSLIST}

The arugument GROUP designates a character strings representing a divalent group. The locant number is fixed to be zero.

The arugument SUBLIST designates a set of substitutients.

      SUBSLIST: list of substituents
        for n = 1 to 4
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

\divalenth
437 \def\divalenth#1#2{%
438 \@reset@ylsw%
439 \yldivalenthposition{#1}{#2}%
440 \if@ylsw \ifx\@@ylii\empty
441 \def\@@ylii{0}\def\@@yli{0}\fi
442 \fi
443 \if@ylsw
444 \yl@shiftii=\@ylii
445 \yl@shifti=\@yli
446 \advance\yl@shiftii\@@ylii
447 \advance\yl@shifti\@@yli
448 \advance\yl@shiftii\yl@xdiff
449 \advance\yl@shifti\yl@ydiff

450 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
451 \reset@yl@xydiff%1999/1/6 by S. Fujita
452 \else
453 \begin{picture}(600,400)(-300,-200)%
454 \iforigpt \put(-300,-200){\circle*{50}}%
455  \put(-\noshift,-\noshift){\circle{50}}%
456 \typeout{command `tetrahedral' origin: %
457  (\the\noshift,\the\noshift) ---> (300,200)}\fi%
458 \fi
459 {\expandafter\@m@mb@r#1;\relax
460 \putratom{-30}{-33}{\@memberb}}%
461 \@forsemicol\member:=#2\do{%
462 \ifx\member\empty\else
463 \expandafter\@m@mb@r\member;\relax%
464 \expandafter\threech@r\@membera{}{}%
465 \ifx\@memberb\@yl\else
466 \ifcase\@tmpa
467 \or\put(0,0){\Westbond}%
468 \or\put(\the\@tempcnta,0){\Eastbond}\fi%end of ifcase
469 \fi\fi}%
470 \end{picture}}%end of macro tetrahedral
    The command \yldivalenthposition is used in \tetrahedral to adjust a

substitution position.

\yldivalenthposition
471 \def\yldivalenthposition#1#2{%
472 {\expandafter\@m@mb@r#1;\relax
473 \setbox0=\hbox{\@memberb}%
474 \@tempcnta=\wd0
475 \@tempcntb=\unitlength
476 \divide\@tempcnta by\@tempcntb
477 \global\advance\@tempcnta by-62%
478 \@tempcntb=\@tempcnta \global\advance\@tempcntb by50\relax

479 }%

480 \@@ylswfalse%
481 \@forsemicol\member:=#2\do{%
482 \if@@ylsw\else
483 \ifx\member\empty\else
484 \expandafter\@m@mb@r\member;\relax
485 \expandafter\threech@r\@membera{}{}\relax
486 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
487 \if@@ylsw
488 \ifcase\@tmpa
489 \or \gdef\@ylii{50}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
490 \or \edef\@ylii{-\the\@tempcntb}\gdef\@yli{0}\global\@ylswtrue%E subst. on 1
491 \fi%end of ifcase
492 \fi\fi\fi}}%

7 Trigonal unit

7.1 Right-hand trigonal unit (narrow type)

The macro \rtrigonal typesets a compound of trivalency. The following numbering is adopted in this macro. The two right-hand bonds form an angle of 90^{∘} (narrow type), while the left-hand bond is typeset horizontally.

 *************************
 * trigonal unit (right) *
 *************************
                      3
                    /
                  /
         1  --- 0  90      0 <== the original point
                 `
                   `
                     2

This macro has an argument SUBSLIST as well as an optional argument

AUXLIST.
   \rtrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

     AUXLIST =
       {0+}:  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

     SUBSLIST: list of substituents
       for n = 1 to 3
           nT         :  triple bond at n-atom
           nD         :  double bond at n-atom
           n or nS    :  single bond at n-atom
           nA         :  alpha single bond at n-atom
           nB         :  beta single bond at n-atom
       for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \rtrigonal{1==Cl;2==F}
         \rtrigonal{1==Cl;4==F;2==CH$_{3}$}

\rtrigonal \@rtrigonal
493 \def\rtrigonal{\@ifnextchar[{\@rtrigonal[r}{\@rtrigonal[r]}}
494 \def\@rtrigonal#1]#2{%
495 \@reset@ylsw%
496 \ylrtrigonalposition{#2}%
497 \if@ylsw \ifx\@@ylii\empty
498 \def\@@ylii{0}\def\@@yli{0}\fi
499 \fi
500 \if@ylsw
501 \yl@shiftii=\@ylii
502 \yl@shifti=\@yli
503 \advance\yl@shiftii\@@ylii
504 \advance\yl@shifti\@@yli
505 \advance\yl@shiftii\yl@xdiff
506 \advance\yl@shifti\yl@ydiff
507 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
508 \reset@yl@xydiff%1999/1/6 by S. Fujita
509 \else
510 \begin{picture}(600,600)(-300,-300)%
511 \iforigpt \put(-300,-300){\circle*{50}}%
512  \put(-\noshift,-\noshift){\circle{50}}%
513 \typeout{command `rtrigonal' origin: %
514  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
515 \fi
516 \@tfor\member:=#1\do{%
517 \expandafter\twoch@@r\member{}{}%
518 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
519 \@forsemicol\member:=#2\do{%
520 \ifx\member\empty\else
521 \expandafter\@m@mb@r\member;\relax%
522 \expandafter\threech@r\@membera{}{}%
523 \ifx\@memberb\@yl\else
524 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
525 \or\put(0,0){\Westbond}%
526 \or\put(0,0){\SEbond}%
527 \or\put(0,0){\NEbond}%
528 \fi%end of ifcase
529 \fi\fi}%
530 \end{picture}}%end of macro rtrigonal
    The command \ylrtrigonalposition is used in \rtrigonal to adjust a

substitution position.

\ylrtrigonalposition

531 \def\ylrtrigonalposition#1{%
532 \@@ylswfalse%%%\@reset@ylsw
533 \@forsemicol\member:=#1\do{%
534 \if@@ylsw\else
535 \ifx\member\empty\else
536 \expandafter\@m@mb@r\member;\relax
537 \expandafter\threech@r\@membera{}{}\relax
538 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
539 \if@@ylsw
540 \ifcase\@tmpa
541 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
542 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
543 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
544 \fi%end of ifcase
545 \fi\fi\fi}}%

7.2 Right-hand trigonal unit (broad type)

The macro \Rtrigonal typesets a compound of trivalency. The following numbering is adopted in this macro. The two right-hand bonds form an angle of 120^{∘} (broad type), while the left-hand bond is typeset horizontally.

  *************************
  * trigonal unit (right) *
  *************************
                       3
                     /
                   /
          1  --- 0  120      0 <== the original point
                  `
                    `
                      2

This macro has an argument SUBSLIST as well as an optional argument

 AUXLIST.
    \rtrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

      AUXLIST =
        {0+}:  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

      SUBSLIST: list of substituents
        for n = 1 to 3
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \rtrigonal{1==Cl;2==F}
         \rtrigonal{1==Cl;4==F;2==CH$_{3}$}

\Rtrigonal \@Rtrigonal
546 \def\Rtrigonal{\@ifnextchar[{\@Rtrigonal[r}{\@Rtrigonal[r]}}
547 \def\@Rtrigonal#1]#2{%
548 \@reset@ylsw%
549 \ylRtrigonalposition{#2}%
550 \if@ylsw \ifx\@@ylii\empty
551 \def\@@ylii{0}\def\@@yli{0}\fi
552 \fi
553 \if@ylsw
554 \yl@shiftii=\@ylii
555 \yl@shifti=\@yli
556 \advance\yl@shiftii\@@ylii
557 \advance\yl@shifti\@@yli
558 \advance\yl@shiftii\yl@xdiff
559 \advance\yl@shifti\yl@ydiff
560 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
561 \reset@yl@xydiff%1999/1/6 by S. Fujita
562 \else
563 \begin{picture}(600,600)(-300,-300)%
564 \iforigpt \put(-300,-300){\circle*{50}}%
565  \put(-\noshift,-\noshift){\circle{50}}%
566 \typeout{command `Rtrigonal' origin: %
567  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
568 \fi
569 \@tfor\member:=#1\do{%
570 \expandafter\twoch@@r\member{}{}%
571 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
572 \@forsemicol\member:=#2\do{%
573 \ifx\member\empty\else

574 \expandafter\@m@mb@r\member;\relax%
575 \expandafter\threech@r\@membera{}{}%
576 \ifx\@memberb\@yl\else
577 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
578 \or\put(0,0){\Westbond}%
579 \or\put(0,0){\SEBOND}%
580 \or\put(0,0){\NEBOND}%
581 \fi%end of ifcase
582 \fi\fi}%
583 \end{picture}}%end of macro Rtrigonal
    The command \ylRtrigonalposition is used in \Rtrigonal to adjust a

substitution position.

\ylRtrigonalposition
584 \def\ylRtrigonalposition#1{%
585 \@@ylswfalse%%%\@reset@ylsw
586 \@forsemicol\member:=#1\do{%
587 \if@@ylsw\else
588 \ifx\member\empty\else
589 \expandafter\@m@mb@r\member;\relax
590 \expandafter\threech@r\@membera{}{}\relax
591 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
592 \if@@ylsw
593 \ifcase\@tmpa
594 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
595 \or \gdef\@ylii{-47}\gdef\@yli{40}\global\@ylswtrue% SE subst. on 1
596 \or \gdef\@ylii{-47}\gdef\@yli{-40}\global\@ylswtrue% NE subst. on 1
597 \fi%end of ifcase
598 \fi\fi\fi}}%

7.3 Left-hand trigonal unit (narrow type)

The macro \ltrigonal typesets a compound of trivalency. The following numbering is adopted in this macro. The two left-hand bonds form an angle of 90^{∘} (narrow type), while the right-hand bond is typeset horizontally.

  ************************
  * trigonal unit (left) *
  ************************
          2
            `
              `
           90   0 --- 1       0 <== the original point
              /
            /
          3

    \ltrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

      AUXLIST =
       {0+} :  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

      SUBSLIST: list of substituents
        for n = 1 to 3
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \ltrigonal{1==Cl;2==F}
         \ltrigonal{1==Cl;4==F;2==CH$_{3}$}

\ltrigonal \@ltrigonal
599 \def\ltrigonal{\@ifnextchar[{\@ltrigonal[r}{\@ltrigonal[r]}}
600 \def\@ltrigonal#1]#2{%
601 \@reset@ylsw%
602 \ylltrigonalposition{#2}%
603 \if@ylsw \ifx\@@ylii\empty
604 \def\@@ylii{0}\def\@@yli{0}\fi
605 \fi
606 \if@ylsw
607 \yl@shiftii=\@ylii
608 \yl@shifti=\@yli
609 \advance\yl@shiftii\@@ylii
610 \advance\yl@shifti\@@yli
611 \advance\yl@shiftii\yl@xdiff
612 \advance\yl@shifti\yl@ydiff

613 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
614 \reset@yl@xydiff%1999/1/6 by S. Fujita
615 \else
616 \begin{picture}(600,600)(-300,-300)%
617 \iforigpt \put(-300,-300){\circle*{50}}%
618  \put(-\noshift,-\noshift){\circle{50}}%
619 \typeout{command `ltrigonal' origin: %
620  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
621 \fi
622 \@tfor\member:=#1\do{%
623 \expandafter\twoch@@r\member{}{}%
624 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
625 \@forsemicol\member:=#2\do{%
626 \ifx\member\empty\else
627 \expandafter\@m@mb@r\member;\relax%
628 \expandafter\threech@r\@membera{}{}%
629 \ifx\@memberb\@yl\else
630 \ifcase\@tmpa
631 {\putlratom{-40}{-33}{\@memberb}}%central atom
632 \or\put(0,0){\Eastbond}%
633 \or\put(0,0){\NWbond}%
634 \or\put(0,0){\SWbond}%
635 \fi%end of ifcase
636 \fi\fi}%
637 \end{picture}}%end of macro ltrigonal
    The command \ylltrigonalposition is used in \ltrigonal to adjust a

substitution position.

\ylltrigonalposition
638 \def\ylltrigonalposition#1{%
639 \@@ylswfalse%%%\@reset@ylsw
640 \@forsemicol\member:=#1\do{%
641 \if@@ylsw\else
642 \ifx\member\empty\else
643 \expandafter\@m@mb@r\member;\relax
644 \expandafter\threech@r\@membera{}{}\relax
645 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
646 \if@@ylsw
647 \ifcase\@tmpa
648 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
649 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
650 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
651 \fi%end of ifcase
652 \fi\fi\fi}}%

7.4 Left-hand trigonal unit (broad type)

The macro \Ltrigonal typesets a compound of trivalency. The following numbering is adopted in this macro. The two left-hand bonds form an angle of 120^{∘} (broad type), while the right-hand bond is typeset horizontally.

************************
* trigonal unit (left) *
************************
2
`
  `
120   0 --- 1       0 <== the original point
  /
/
3

This macro has an argument SUBSLIST as well as an optional argument

AUXLIST.
\ltrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

AUXLIST =
{0+} :  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

SUBSLIST: list of substituents
for n = 1 to 3
nT         :  triple bond at n-atom
nD         :  double bond at n-atom
n or nS    :  single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
for 0          :  cetral atom (e.g. 0==C)

e.g.
\Ltrigonal{1==Cl;2==F}
\Ltrigonal{1==Cl;4==F;2==CH$_{3}$}

\Ltrigonal \@Ltrigonal
653 \def\Ltrigonal{\@ifnextchar[{\@Ltrigonal[r}{\@Ltrigonal[r]}}
654 \def\@Ltrigonal#1]#2{%
655 \@reset@ylsw%
656 \ylLtrigonalposition{#2}%
657 \if@ylsw \ifx\@@ylii\empty
658 \def\@@ylii{0}\def\@@yli{0}\fi
659 \fi
660 \if@ylsw
661 \yl@shiftii=\@ylii
662 \yl@shifti=\@yli
663 \advance\yl@shiftii\@@ylii
664 \advance\yl@shifti\@@yli
665 \advance\yl@shiftii\yl@xdiff
666 \advance\yl@shifti\yl@ydiff
667 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
668 \reset@yl@xydiff%1999/1/6 by S. Fujita
669 \else
670 \begin{picture}(600,600)(-300,-300)%
671 \iforigpt \put(-300,-300){\circle*{50}}%
672  \put(-\noshift,-\noshift){\circle{50}}%
673 \typeout{command `Ltrigonal' origin: %
674  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
675 \fi
676 \@tfor\member:=#1\do{%
677 \expandafter\twoch@@r\member{}{}%
678 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
679 \@forsemicol\member:=#2\do{%
680 \ifx\member\empty\else
681 \expandafter\@m@mb@r\member;\relax%
682 \expandafter\threech@r\@membera{}{}%
683 \ifx\@memberb\@yl\else
684 \ifcase\@tmpa
685 {\putlratom{-40}{-33}{\@memberb}}%central atom
686 \or\put(0,0){\Eastbond}%
687 \or\put(0,0){\NWBOND}%
688 \or\put(0,0){\SWBOND}%
689 \fi%end of ifcase
690 \fi\fi}%
691 \end{picture}}%end of macro Ltrigonal
    The command \ylLtrigonalposition is used in \Ltrigonal to adjust a

substitution position.

\ylLtrigonalposition
692 \def\ylLtrigonalposition#1{%
693 \@@ylswfalse%%%\@reset@ylsw
694 \@forsemicol\member:=#1\do{%
695 \if@@ylsw\else
696 \ifx\member\empty\else

697 \expandafter\@m@mb@r\member;\relax
698 \expandafter\threech@r\@membera{}{}\relax
699 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
700 \if@@ylsw
701 \ifcase\@tmpa
702 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
703 \or \gdef\@ylii{47}\gdef\@yli{-40}\global\@ylswtrue% NWB subst. on 1
704 % \or \gdef\@ylii{47}\gdef\@yli{-66}\global\@ylswtrue% NWB subst. on 1
705 \or \gdef\@ylii{47}\gdef\@yli{40}\global\@ylswtrue% SWB subst. on 1
706 % \or \gdef\@ylii{47}\gdef\@yli{66}\global\@ylswtrue% SWB subst. on 1
707 \fi%end of ifcase
708 \fi\fi\fi}}%

7.5 Upward trigonal unit (narrow type)

The macro \utrigonal typesets a compound of trivalency. The two upward bonds form an angle of 90^{∘} (narrow type), while the downward bond is typeset vertically. The following numbering is adopted in this macro.

  **********************
  * trigonal unit (up) *
  **********************
  The following numbering is adopted in this macro.
          3       .   2
            `   90  /
              `   /
                0        0 <== the original point
                |
                |
                1

This macro has an argument SUBSLIST as well as an optional argument

 AUXLIST.
    \utrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

      AUXLIST =
       {0+}:  + charge (or another one chararacter) on the center

      SUBSLIST: list of substituents
        for n = 1 to 3
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \utrigonal{1==Cl;2==F}
         \utrigonal{1==Cl;4==F;2==CH$_{3}$}

\utrigonal \@utrigonal
709 \def\utrigonal{\@ifnextchar[{\@utrigonal[r}{\@utrigonal[r]}}
710 \def\@utrigonal#1]#2{%
711 \@reset@ylsw%
712 \ylutrigonalposition{#2}%
713 \if@ylsw \ifx\@@ylii\empty
714 \def\@@ylii{0}\def\@@yli{0}\fi
715 \fi
716 \if@ylsw
717 \yl@shiftii=\@ylii
718 \yl@shifti=\@yli
719 \advance\yl@shiftii\@@ylii
720 \advance\yl@shifti\@@yli
721 \advance\yl@shiftii\yl@xdiff
722 \advance\yl@shifti\yl@ydiff
723 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
724 \reset@yl@xydiff%1999/1/6 by S. Fujita
725 \else
726 \begin{picture}(600,600)(-300,-300)%
727 \iforigpt \put(-300,-300){\circle*{50}}%
728  \put(-\noshift,-\noshift){\circle{50}}%
729 \typeout{command `utrigonal' origin: %
730  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
731 \fi
732 \@tfor\member:=#1\do{%
733 \expandafter\twoch@@r\member{}{}%
734 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
735 \@forsemicol\member:=#2\do{%
736 \ifx\member\empty\else

737 \expandafter\@m@mb@r\member;\relax%
738 \expandafter\threech@r\@membera{}{}%
739 \ifx\@memberb\@yl\else
740 \ifcase\@tmpa
741 {\putlratom{-40}{-33}{\@memberb}}%central atom
742 \or\put(0,0){\Southbond}%
743 \or\put(0,0){\NEbond}%
744 \or\put(0,0){\NWbond}%
745 \fi%end of ifcase
746 \fi\fi}%
747 \end{picture}}%end of macro utrigonal
    The command \ylutrigonalposition is used in \utrigonal to adjust a

substitution position.

\ylutrigonalposition
748 \def\ylutrigonalposition#1{%
749 \@@ylswfalse%%%\@reset@ylsw
750 \@forsemicol\member:=#1\do{%
751 \if@@ylsw\else
752 \ifx\member\empty\else
753 \expandafter\@m@mb@r\member;\relax
754 \expandafter\threech@r\@membera{}{}\relax
755 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
756 \if@@ylsw
757 \ifcase\@tmpa
758 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
759 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
760 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
761 \fi%end of ifcase
762 \fi\fi\fi}}%

7.6 Upward trigonal unit (broad type)

The macro \Utrigonal typesets a compound of trivalency. The two upward bonds form an angle of 120^{∘} (broad type), while the downward bond is typeset vertically. The following numbering is adopted in this macro.

  **********************
  * trigonal unit (up) *
  **********************
          3           2
            `  120  /
              `   /
                0        0 <== the original point
                |
                |
                1

    \Utrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

      AUXLIST =
      {0+}:  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

      SUBSLIST: list of substituents
        for n = 1 to 3
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \Utrigonal{1==Cl;2==F}
         \Utrigonal{1==Cl;4==F;2==CH$_{3}$}

\Utrigonal \@Utrigonal
763 \def\Utrigonal{\@ifnextchar[{\@Utrigonal[r}{\@Utrigonal[r]}}
764 \def\@Utrigonal#1]#2{%
765 \@reset@ylsw%
766 \ylUtrigonalposition{#2}%
767 \if@ylsw \ifx\@@ylii\empty
768 \def\@@ylii{0}\def\@@yli{0}\fi
769 \fi
770 \if@ylsw
771 \yl@shiftii=\@ylii
772 \yl@shifti=\@yli
773 \advance\yl@shiftii\@@ylii

774 \advance\yl@shifti\@@yli
775 \advance\yl@shiftii\yl@xdiff
776 \advance\yl@shifti\yl@ydiff
777 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
778 \reset@yl@xydiff%1999/1/6 by S. Fujita
779 \else
780 \begin{picture}(600,600)(-300,-300)%
781 \iforigpt \put(-300,-300){\circle*{50}}%
782  \put(-\noshift,-\noshift){\circle{50}}%
783 \typeout{command `Utrigonal' origin: %
784  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
785 \fi
786 \@tfor\member:=#1\do{%
787 \expandafter\twoch@@r\member{}{}%
788 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
789 \@forsemicol\member:=#2\do{%
790 \ifx\member\empty\else
791 \expandafter\@m@mb@r\member;\relax%
792 \expandafter\threech@r\@membera{}{}%
793 \ifx\@memberb\@yl\else
794 \ifcase\@tmpa
795 {\putlratom{-40}{-33}{\@memberb}}%central atom
796 \or\put(0,0){\Southbond}%
797 \or\put(0,0){\NEBond}%
798 \or\put(0,0){\NWBond}%
799 \fi%end of ifcase
800 \fi\fi}%
801 \end{picture}}%end of macro Utrigonal
    The command \ylUtrigonalposition is used in \Utrigonal to adjust a

substitution position.

\ylUtrigonalposition
802 \def\ylUtrigonalposition#1{%
803 \@@ylswfalse%%%\@reset@ylsw
804 \@forsemicol\member:=#1\do{%
805 \if@@ylsw\else
806 \ifx\member\empty\else
807 \expandafter\@m@mb@r\member;\relax
808 \expandafter\threech@r\@membera{}{}\relax
809 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
810 \if@@ylsw
811 \ifcase\@tmpa
812 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
813 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NEB subst. on 1
814 \or \gdef\@ylii{66}\gdef\@yli{-47}\global\@ylswtrue% NWB subst. on 1
815 \fi%end of ifcase
816 \fi\fi\fi}}%

7.7 Downward trigonal unit (narrow type)

The macro \dtrigonal typesets a compound of trivalency. The upward bond is typeset vertically. The following numbering is adopted in this macro.

************************
* trigonal unit (down) *
************************
The following numbering is adopted in this macro.
     1
     |
     |
     0       0 <== the original point
   /  `
 /  90  `
2          3

This macro has an argument SUBSLIST as well as an optional argument

AUXLIST.
\dtrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

AUXLIST =
{0+} :  + charge (or another one chararacter) on the center

The arugument SUBLIST designates a set of substitutients.

SUBSLIST: list of substituents
for n = 1 to 3
nT         :  triple bond at n-atom
nD         :  double bond at n-atom
n or nS    :  single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
for 0          :  cetral atom (e.g. 0==C)

         \dtrigonal{1==Cl;2==F}
         \dtrigonal{1==Cl;4==F;2==CH$_{3}$}

\dtrigonal \@dtrigonal
817 \def\dtrigonal{\@ifnextchar[{\@dtrigonal[r}{\@dtrigonal[r]}}
818 \def\@dtrigonal#1]#2{%
819 \@reset@ylsw%
820 \yldtrigonalposition{#2}%
821 \if@ylsw \ifx\@@ylii\empty
822 \def\@@ylii{0}\def\@@yli{0}\fi
823 \fi
824 \if@ylsw
825 \yl@shiftii=\@ylii
826 \yl@shifti=\@yli
827 \advance\yl@shiftii\@@ylii
828 \advance\yl@shifti\@@yli
829 \advance\yl@shiftii\yl@xdiff
830 \advance\yl@shifti\yl@ydiff
831 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
832 \reset@yl@xydiff%1999/1/6 by S. Fujita
833 \else
834 \begin{picture}(600,600)(-300,-300)
835 \iforigpt \put(-300,-300){\circle*{50}}%
836  \put(-\noshift,-\noshift){\circle{50}}%
837 \typeout{command `dtrigonal' origin: %
838  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
839 \fi
840 \@tfor\member:=#1\do{%
841 \expandafter\twoch@@r\member{}{}%
842 \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}%
843 \@forsemicol\member:=#2\do{%
844 \ifx\member\empty\else
845 \expandafter\@m@mb@r\member;\relax%
846 \expandafter\threech@r\@membera{}{}%
847 \ifx\@memberb\@yl\else
848 \ifcase\@tmpa
849 {\putlratom{-40}{-33}{\@memberb}}%central atom
850 \or\put(0,0){\Northbond}%
851 \or\put(0,0){\SEbond}%
852 \or\put(0,0){\SWbond}%
853 \fi%end of ifcase
854 \fi\fi}%
855 \end{picture}}%end of macro dtrigonal
    The command \yldtrigonalposition is used in \dtrigonal to adjust a

substitution position.

\yldtrigonalposition
856 \def\yldtrigonalposition#1{%
857 \@@ylswfalse%%%\@reset@ylsw
858 \@forsemicol\member:=#1\do{%
859 \if@@ylsw\else
860 \ifx\member\empty\else
861 \expandafter\@m@mb@r\member;\relax
862 \expandafter\threech@r\@membera{}{}\relax
863 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
864 \if@@ylsw
865 \ifcase\@tmpa
866 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
867 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
868 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
869 \fi%end of ifcase
870 \fi\fi\fi}}%

7.8 Downward trigonal unit (broad type)

The macro \Dtrigonal typesets a compound of trivalency. The upward bond is typeset vertically. The following numbering is adopted in this macro.

  ************************
  * trigonal unit (down) *
  ************************
  The following numbering is adopted in this macro.
                 1
                 |
                 |
                 0       0 <== the original point
               /  `
             /  120 `
           2          3

This macro has an argument SUBSLIST as well as an optional argument

 AUXLIST.
    \Dtrigonal[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

      AUXLIST =
      {0+}:  + charge (or another one chararacter) on the center

      SUBSLIST: list of substituents
        for n = 1 to 3
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom
        for 0          :  cetral atom (e.g. 0==C)

        e.g.
         \Dtrigonal{1==Cl;2==F}
         \Dtrigonal{1==Cl;4==F;2==CH$_{3}$}

\Dtrigonal \@Dtrigonal
871 \def\Dtrigonal{\@ifnextchar[{\@Dtrigonal[r}{\@Dtrigonal[r]}}
872 \def\@Dtrigonal#1]#2{%
873 \@reset@ylsw%
874 \ylDtrigonalposition{#2}%
875 \if@ylsw \ifx\@@ylii\empty
876 \def\@@ylii{0}\def\@@yli{0}\fi
877 \fi
878 \if@ylsw
879 \yl@shiftii=\@ylii
880 \yl@shifti=\@yli
881 \advance\yl@shiftii\@@ylii
882 \advance\yl@shifti\@@yli
883 \advance\yl@shiftii\yl@xdiff
884 \advance\yl@shifti\yl@ydiff
885 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
886 \reset@yl@xydiff%1999/1/6 by S. Fujita
887 \else
888 \begin{picture}(600,600)(-300,-300)
889 \iforigpt \put(-300,-300){\circle*{50}}%
890  \put(-\noshift,-\noshift){\circle{50}}%
891 \typeout{command `Dtrigonal' origin: %
892  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
893 \fi
894 \@tfor\member:=#1\do{%
895 \expandafter\twoch@@r\member{}{}%
896 \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}%
897 \@forsemicol\member:=#2\do{%
898 \ifx\member\empty\else

899 \expandafter\@m@mb@r\member;\relax%
900 \expandafter\threech@r\@membera{}{}%
901 \ifx\@memberb\@yl\else
902 \ifcase\@tmpa
903 {\putlratom{-40}{-33}{\@memberb}}%central atom
904 \or\put(0,0){\Northbond}%
905 \or\put(0,0){\SEBond}%
906 \or\put(0,0){\SWBond}%
907 \fi%end of ifcase
908 \fi\fi}%
909 \end{picture}}%end of macro Dtrigonal
    The command \ylDtrigonalposition is used in \Dtrigonal to adjust a

substitution position.

\ylDtrigonalposition
910 \def\ylDtrigonalposition#1{%
911 \@@ylswfalse%%%\@reset@ylsw
912 \@forsemicol\member:=#1\do{%
913 \if@@ylsw\else
914 \ifx\member\empty\else
915 \expandafter\@m@mb@r\member;\relax
916 \expandafter\threech@r\@membera{}{}\relax
917 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
918 \if@@ylsw
919 \ifcase\@tmpa
920 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
921 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SEB subst. on 1
922 \or \gdef\@ylii{66}\gdef\@yli{47}\global\@ylswtrue% SWB subst. on 1
923 \fi%end of ifcase
924 \fi\fi\fi}}%

8 Ethylene derivative

8.1 Horizontal ethylene unit (narrow type)

The macro \ethylene typesets ethylene derivatives. The following numbering is adopted in this macro.

  *****************
  * ethylene unit *
  *****************
          1                4
            `            /
              `        /
           90  (1)===(2) 90     (1) <== the original point
              /        `
            /            `

          2                3

    \ethylene[BONDLIST]{ATOMLIST}{SUBSLIST}

The arugument BONDLIST designates the bond between atom (1) and atom (2) as well as charges on these centeral atoms.

      BONDLIST: list of inner bonds and charges
            {n+}       :  + charge (or another one chararacter) on n-atom
              d        :  inner double bond (between (1) and (2))
              t        :  inner triple bond (between (1) and (2))

The arugument SUBLIST designates a set of substitutients.

      SUBSLIST: list of substituents
        for n = 1 to 4
            nT         :  triple bond at n-atom
            nD         :  double bond at n-atom
            n or nS    :  single bond at n-atom
            nA         :  alpha single bond at n-atom
            nB         :  beta single bond at n-atom

The arugument ATOMLIST designates the list of central atoms.

      ATOMLIST: list of central atoms
            n          :  atom for n-position (e.g. 1==C)

        e.g.
         \ethylene{}{1==Cl;2==F}
         \ethylene{}{1==Cl;4==F;2==CH$_{3}$}

\ethylene \@ethylene
925 \def\ethylene{\@ifnextchar[{\@ethylene}{\@ethylene[]}}
926 \def\@ethylene[#1]#2#3{%
927 \@reset@ylsw%
928 \ylethylenepositiona{#3}%
929 \if@ylsw \ifx\@@ylii\empty
930 \def\@@ylii{0}\def\@@yli{0}\fi
931 \else
932 \ylethylenepositionb{#3}%

933 \fi
934 \if@ylsw \ifx\@@ylii\empty
935 \def\@@ylii{-230}\def\@@yli{0}\fi
936 \fi
937 \if@ylsw
938 \yl@shiftii=\@ylii
939 \yl@shifti=\@yli
940 \advance\yl@shiftii\@@ylii
941 \advance\yl@shifti\@@yli
942 \advance\yl@shiftii\yl@xdiff
943 \advance\yl@shifti\yl@ydiff
944 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
945 \reset@yl@xydiff%1999/1/6 by S. Fujita
946 \else
947 \begin{picture}(800,600)(-300,-300)
948 \iforigpt \put(-300,-300){\circle*{50}}%
949  \put(-\noshift,-\noshift){\circle{50}}%
950 \typeout{command `ethylene' origin: %
951  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
952 \fi
953 {\def\aaa{#1}\ifx\aaa\empty%
954 \multiput(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond

955 }%

956 \@tfor\member:=#1\do{%
957 \expandafter\twoch@@r\member{}{}%
958 \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}%
959 \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}%
960 \else\if\@@tmpa d\relax%
961  {\multiput(42,-13)(0,25){2}{\line(1,0){140}}}% double bond
962 \else\if\@@tmpa t\relax%
963  {\multiput(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right
964 \fi\fi\fi\fi}%
965 {\def\aaa{#2}%
966 \ifx\aaa\empty%
967 \putratom{-40}{-33}{C}%central atom
968 \putratom{190}{-33}{C}%central atom
969 \else%
970 \@forsemicol\member:=#2\do{%
971 \ifx\member\empty\else
972 \expandafter\@m@mb@r\member;\relax%
973 \expandafter\threech@r\@membera{}{}%
974 \ifcase\@tmpa%
975 \or\putratom{-40}{-33}{\@memberb}%central atom
976 \or\putratom{190}{-33}{\@memberb}%central atom
977 \fi\fi}%end of ifcase
978 \fi%

979 }%

980 \@forsemicol\member:=#3\do{%
981 \ifx\member\empty\else
982 \expandafter\@m@mb@r\member;\relax%

 983 \expandafter\threech@r\@membera{}{}%
 984 \ifx\@memberb\@yl\else
 985 \ifcase\@tmpa%
 986 \or\put(0,0){\NWbond}%
 987 \or\put(0,0){\SWbond}%
 988 \or\put(230,0){\SEbond}%
 989 \or\put(230,0){\NEbond}%
 990 \fi%end of ifcase
 991 \fi\fi}%
 992 \end{picture}}%end of macro ethylene
\ethyleneh
 993 \let\ethyleneh=\ethylene
    The commands \ylethylenepositiona and \ylethylenepositiona are used

in \ethylene to adjust a substitution position.

\ylethylenepositiona
\ylethylenepositionb
 994 \def\ylethylenepositiona#1{%
 995 \@@ylswfalse%%%\@reset@ylsw
 996 \@forsemicol\member:=#1\do{%
 997 \if@@ylsw\else
 998 \ifx\member\empty\else
 999 \expandafter\@m@mb@r\member;\relax
1000 \expandafter\threech@r\@membera{}{}\relax
1001 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1002 \if@@ylsw
1003 \ifcase\@tmpa
1004 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
1005 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
1006 \fi%end of ifcase
1007 \fi\fi\fi}}%
1008 \def\ylethylenepositionb#1{%
1009 \@@ylswfalse%%%\@reset@ylsw
1010 \@forsemicol\member:=#1\do{%
1011 \if@@ylsw\else
1012 \ifx\member\empty\else
1013 \expandafter\@m@mb@r\member;\relax
1014 \expandafter\threech@r\@membera{}{}\relax
1015 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1016 \if@@ylsw
1017 \ifcase\@tmpa
1018 \or%omit
1019 \or%omit
1020 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
1021 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
1022 \fi%end of ifcase
1023 \fi\fi\fi}}%

8.2 Horizontal ethylene unit (broad type)

The macro \Ethylene typesets ethylene derivatives. The following numbering is adopted in this macro.

*****************
* ethylene unit *
*****************
1                4
`            /
  `        /
120  (1)===(2) 120     (1) <== the original point
  /        `
/            `
2                3

\Ethylene[BONDLIST]{ATOMLIST}{SUBSLIST}

The arugument BONDLIST designates the bond between atom (1) and atom (2) as well as charges on these centeral atoms.

BONDLIST: list of inner bonds and charges
{n+}       :  + charge (or another one chararacter) on n-atom
  d        :  inner double bond (between (1) and (2))
  t        :  inner triple bond (between (1) and (2))

The arugument SUBLIST designates a set of substitutients.

SUBSLIST: list of substituents
for n = 1 to 4
nT         :  triple bond at n-atom
nD         :  double bond at n-atom
n or nS    :  single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom

The arugument ATOMLIST designates the list of central atoms.

ATOMLIST: list of central atoms
n          :  atom for n-position (e.g. 1==C)

          \Ethylene{}{1==Cl;2==F}
          \Ethylene{}{1==Cl;4==F;2==CH$_{3}$}

\Ethylene \@Ethylene
1024 \def\Ethylene{\@ifnextchar[{\@ethylene}{\@ethylene[]}}
1025 \def\@ethylene[#1]#2#3{%
1026 \@reset@ylsw%
1027 \ylethylenepositiona{#3}%
1028 \if@ylsw \ifx\@@ylii\empty
1029 \def\@@ylii{0}\def\@@yli{0}\fi
1030 \else
1031 \ylethylenepositionb{#3}%

1032 \fi

1033 \if@ylsw \ifx\@@ylii\empty
1034 \def\@@ylii{-230}\def\@@yli{0}\fi

1035 \fi

1036 \if@ylsw
1037 \yl@shiftii=\@ylii
1038 \yl@shifti=\@yli
1039 \advance\yl@shiftii\@@ylii
1040 \advance\yl@shifti\@@yli
1041 \advance\yl@shiftii\yl@xdiff
1042 \advance\yl@shifti\yl@ydiff
1043 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1044 \reset@yl@xydiff%1999/1/6 by S. Fujita
1045 \else
1046 \begin{picture}(800,600)(-300,-300)
1047 \iforigpt \put(-300,-300){\circle*{50}}%
1048  \put(-\noshift,-\noshift){\circle{50}}%
1049 \typeout{command `ethylene' origin: %
1050  (\the\noshift,\the\noshift) ---> (300,300)}\fi%

1051 \fi

1052 {\def\aaa{#1}\ifx\aaa\empty%
1053 \multiput(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond

1054 }%

1055 \@tfor\member:=#1\do{%
1056 \expandafter\twoch@@r\member{}{}%
1057 \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}%
1058 \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}%
1059 \else\if\@@tmpa d\relax%
1060  {\multiput(42,-13)(0,25){2}{\line(1,0){140}}}% double bond
1061 \else\if\@@tmpa t\relax%
1062  {\multiput(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right
1063 \fi\fi\fi\fi}%
1064 {\def\aaa{#2}%
1065 \ifx\aaa\empty%
1066 \putratom{-40}{-33}{C}%central atom

1067 \putratom{190}{-33}{C}%central atom
1068 \else%
1069 \@forsemicol\member:=#2\do{%
1070 \ifx\member\empty\else
1071 \expandafter\@m@mb@r\member;\relax%
1072 \expandafter\threech@r\@membera{}{}%
1073 \ifcase\@tmpa%
1074 \or\putratom{-40}{-33}{\@memberb}%central atom
1075 \or\putratom{190}{-33}{\@memberb}%central atom
1076 \fi\fi}%end of ifcase
1077 \fi%

1078 }%

1079 \@forsemicol\member:=#3\do{%
1080 \ifx\member\empty\else
1081 \expandafter\@m@mb@r\member;\relax%
1082 \expandafter\threech@r\@membera{}{}%
1083 \ifx\@memberb\@yl\else
1084 \ifcase\@tmpa%
1085 \or\put(0,0){\NWBOND}%
1086 \or\put(0,0){\SWBOND}%
1087 \or\put(230,0){\SEBOND}%
1088 \or\put(230,0){\NEBOND}%
1089 \fi%end of ifcase
1090 \fi\fi}%
1091 \end{picture}}%end of macro Ethylene
\Ethyleneh
1092 \let\Ethyleneh=\Ethylene

8.3 Vertical ethylene unit (narrow type)

The macro \ethylenev typesets ethylene derivatives in a vatical manner. The following numbering is adopted in this macro.

   ****************************
   * ethylene unit (vertical) *
   ****************************
   The following numbering is adopted in this macro.
           4          3
             `  90  /
               `  /
                (2)
                 ||
                 ||
                (1)  <== the original point
               /  `
             /  90 `
           1         2

     \ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST}

       BONDLIST: list of inner bonds and charges
             {n+}  :  + charge (or another one chararacter) on n-atom
               d   :  inner double bond (between (1) and (2))
               t   :  inner triple bond (between (1) and (2))

       SUBSLIST: list of substituents
         for n = 1 to 4
             nT         :  triple bond at n-atom
             nD         :  double bond at n-atom
             n or nS    :  single bond at n-atom
             nA         :  alpha single bond at n-atom
             nB         :  beta single bond at n-atom

       ATOMLIST: list of central atoms
             n          :  atom for n-position (e.g. 1==C)

         e.g.
          \ethylenev{1==Cl;2==F}
          \ethylenev{1==Cl;4==F;2==CH$_{3}$}

\ethylenev \@ethylenev
1093 \def\ethylenev{\@ifnextchar[{\@ethylenev}{\@ethylenev[]}}
1094 \def\@ethylenev[#1]#2#3{%
1095 \@reset@ylsw%
1096 \ylethylenevpositiona{#3}%
1097 \if@ylsw \ifx\@@ylii\empty
1098 \def\@@ylii{0}\def\@@yli{0}\fi
1099 \else
1100 \ylethylenevpositionb{#3}%

1101 \fi

1102 \if@ylsw \ifx\@@ylii\empty
1103 \def\@@ylii{0}\def\@@yli{-230}\fi

1104 \fi

1105 \if@ylsw
1106 \yl@shiftii=\@ylii
1107 \yl@shifti=\@yli

1108 \advance\yl@shiftii\@@ylii
1109 \advance\yl@shifti\@@yli
1110 \advance\yl@shiftii\yl@xdiff
1111 \advance\yl@shifti\yl@ydiff
1112 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1113 \reset@yl@xydiff%1999/1/6 by S. Fujita
1114 \else
1115 \begin{picture}(600,800)(-300,-300)
1116 \iforigpt \put(-300,-300){\circle*{50}}%
1117  \put(-\noshift,-\noshift){\circle{50}}%
1118 \typeout{command `ethylenev' origin: %
1119  (\the\noshift,\the\noshift) ---> (300,300)}\fi%

1120 \fi

1121 \def\aaa{#1}\ifx\aaa\empty%
1122  \put(-20,47){\line(0,1){140}}% vertical
1123  \put(6,47){\line(0,1){140}}\fi%  double bond
1124 \@tfor\member:=#1\do{%
1125 \expandafter\twoch@@r\member{}{}%
1126 \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb}
1127 \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb}
1128 \else\if\@@tmpa d\relax%
1129  \put(-13,47){\line(0,1){140}}% vertical
1130  \put(13,47){\line(0,1){140}}%  double bond
1131 \else\if\@@tmpa t\relax%
1132  \put(-20,47){\line(0,1){140}}% vertical
1133  \put(-0,47){\line(0,1){140}}%   triple bond
1134  \put(20,47){\line(0,1){140}}%
1135 \fi\fi\fi\fi}%
1136 \def\aaa{#2}%
1137 \ifx\aaa\empty%
1138 \putratom{-40}{-33}{C}%central atom
1139 \putratom{-40}{197}{C}%central atom
1140 \else%
1141 \@forsemicol\member:=#2\do{%
1142 \ifx\member\empty\else
1143 \expandafter\@m@mb@r\member;\relax%
1144 \expandafter\threech@r\@membera{}{}%
1145 \ifcase\@tmpa%
1146 \or\putratom{-40}{-33}{\@memberb}%central atom
1147 \or\putratom{-40}{197}{\@memberb}%central atom
1148 \fi\fi}%end of ifcase
1149 \fi%
1150 \@forsemicol\member:=#3\do{%
1151 \ifx\member\empty\else
1152 \expandafter\@m@mb@r\member;\relax%
1153 \expandafter\threech@r\@membera{}{}%
1154 \ifx\@memberb\@yl\else
1155 \ifcase\@tmpa%
1156 \or\put(0,0){\SWbond}%
1157 \or\put(0,0){\SEbond}%

1158 \or\put(0,230){\NEbond}%
1159 \or\put(0,230){\NWbond}%
1160 \fi%end of ifcase
1161 \fi\fi}%
1162 \end{picture}}%end of macro ethylenev
    The commands \ylethylenevpositiona and \ylethylenevpositiona are

used in \ethylenev to adjust a substitution position.

\ylethylenepositiona
\ylethylenepositionb
1163 \def\ylethylenevpositiona#1{%
1164 \@@ylswfalse%%%\@reset@ylsw
1165 \@forsemicol\member:=#1\do{%
1166 \if@@ylsw\else
1167 \ifx\member\empty\else
1168 \expandafter\@m@mb@r\member;\relax
1169 \expandafter\threech@r\@membera{}{}\relax
1170 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1171 \if@@ylsw
1172 \ifcase\@tmpa
1173 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
1174 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
1175 \fi%end of ifcase
1176 \fi\fi\fi}}%
1177 \def\ylethylenevpositionb#1{%
1178 \@@ylswfalse%%%\@reset@ylsw
1179 \@forsemicol\member:=#1\do{%
1180 \if@@ylsw\else
1181 \ifx\member\empty\else
1182 \expandafter\@m@mb@r\member;\relax
1183 \expandafter\threech@r\@membera{}{}\relax
1184 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1185 \if@@ylsw
1186 \ifcase\@tmpa
1187 \or%omit
1188 \or%omit
1189 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
1190 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
1191 \fi%end of ifcase
1192 \fi\fi\fi}}%

8.4 Vertical ethylene unit (broad type)

The macro \Ethylenev typesets ethylene derivatives in a vatical manner. The following numbering is adopted in this macro.

   ****************************
   * ethylene unit (vertical) *
   ****************************

4          3
`  120 /
  `  /
   (2)
    ||
    ||
   (1)  <== the original point
  /  `
/  120 `
1          2

\Ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST}

BONDLIST: list of inner bonds and charges
{n+} :  + charge (or another one chararacter) on n-atom
  d  :  inner double bond (between (1) and (2))
  t  :  inner triple bond (between (1) and (2))

SUBSLIST: list of substituents
for n = 1 to 4
nT         :  triple bond at n-atom
nD         :  double bond at n-atom
n or nS    :  single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom

ATOMLIST: list of central atoms
n          :  atom for n-position (e.g. 1==C)

e.g.
\Ethylenev{1==Cl;2==F}
\Ethylenev{1==Cl;4==F;2==CH$_{3}$}

\Ethylenev \@Ethylenev
1193 \def\Ethylenev{\@ifnextchar[{\@Ethylenev}{\@Ethylenev[]}}
1194 \def\@Ethylenev[#1]#2#3{%
1195 \@reset@ylsw%
1196 \ylethylenevpositiona{#3}%
1197 \if@ylsw \ifx\@@ylii\empty
1198 \def\@@ylii{0}\def\@@yli{0}\fi

1199 \else
1200 \ylethylenevpositionb{#3}%

1201 \fi

1202 \if@ylsw \ifx\@@ylii\empty
1203 \def\@@ylii{0}\def\@@yli{-230}\fi

1204 \fi

1205 \if@ylsw
1206 \yl@shiftii=\@ylii
1207 \yl@shifti=\@yli
1208 \advance\yl@shiftii\@@ylii
1209 \advance\yl@shifti\@@yli
1210 \advance\yl@shiftii\yl@xdiff
1211 \advance\yl@shifti\yl@ydiff
1212 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1213 \reset@yl@xydiff%1999/1/6 by S. Fujita
1214 \else
1215 \begin{picture}(600,800)(-300,-300)
1216 \iforigpt \put(-300,-300){\circle*{50}}%
1217  \put(-\noshift,-\noshift){\circle{50}}%
1218 \typeout{command `Ethylenev' origin: %
1219  (\the\noshift,\the\noshift) ---> (300,300)}\fi%

1220 \fi

1221 \def\aaa{#1}\ifx\aaa\empty%
1222  \put(-20,47){\line(0,1){140}}% vertical
1223  \put(6,47){\line(0,1){140}}\fi%  double bond
1224 \@tfor\member:=#1\do{%
1225 \expandafter\twoch@@r\member{}{}%
1226 \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb}
1227 \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb}
1228 \else\if\@@tmpa d\relax%
1229  \put(-13,47){\line(0,1){140}}% vertical
1230  \put(13,47){\line(0,1){140}}%   double bond
1231 \else\if\@@tmpa t\relax%
1232  \put(-20,47){\line(0,1){140}}% vertical
1233  \put(-0,47){\line(0,1){140}}%   triple bond
1234  \put(20,47){\line(0,1){140}}%
1235 \fi\fi\fi\fi}%
1236 \def\aaa{#2}%
1237 \ifx\aaa\empty%
1238 \putratom{-40}{-33}{C}%central atom
1239 \putratom{-40}{197}{C}%central atom
1240 \else%
1241 \@forsemicol\member:=#2\do{%
1242 \ifx\member\empty\else
1243 \expandafter\@m@mb@r\member;\relax%
1244 \expandafter\threech@r\@membera{}{}%
1245 \ifcase\@tmpa%
1246 \or\putratom{-40}{-33}{\@memberb}%central atom
1247 \or\putratom{-40}{197}{\@memberb}%central atom
1248 \fi\fi}%end of ifcase

1249 \fi%
1250 \@forsemicol\member:=#3\do{%
1251 \ifx\member\empty\else
1252 \expandafter\@m@mb@r\member;\relax%
1253 \expandafter\threech@r\@membera{}{}%
1254 \ifx\@memberb\@yl\else
1255 \ifcase\@tmpa%
1256 \or\put(0,0){\SWBond}%
1257 \or\put(0,0){\SEBond}%
1258 \or\put(0,230){\NEBond}%
1259 \or\put(0,230){\NWBond}%
1260 \fi%end of ifcase
1261 \fi\fi}%
1262 \end{picture}}%end of macro Ethylenev

9 Square unit

The macro \square typesets a compound of tetravalency. The following numbering is adopted in this macro.

   ***************
   * square unit *
   ***************
   The following numbering is adopted in this macro.
           4          1
             `      /
               `  /
                (0)  <== the original point
               /  `
             /     `
           3         2

This macro has an argument SUBSLIST as well as an optional argument

  AUXLIST.
     \square[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

       AUXLIST =
       {0+}:  + charge (or another one chararacter) on the center

       SUBSLIST: list of substituents
         for n = 1 to 4
             nT         :  triple bond at n-atom
             nD         :  double bond at n-atom
             n or nS    :  single bond at n-atom
             nA         :  alpha single bond at n-atom
             nB         :  beta single bond at n-atom
         for 0          :  cetral atom (e.g. 0==C)

         e.g.
          \square{0==C;1==Cl;2==F}
          \square{0==C;1==Cl;4==F;2==CH$_{3}$}

\square \@square
1263 \def\square{\@ifnextchar[{\@square[r}{\@square[r]}}
1264 \def\@square#1]#2{%
1265 \@reset@ylsw%
1266 \ylsquareposition{#2}%
1267 \if@ylsw \ifx\@@ylii\empty
1268 \def\@@ylii{0}\def\@@yli{0}\fi

1269 \fi

1270 \if@ylsw
1271 \yl@shiftii=\@ylii
1272 \yl@shifti=\@yli
1273 \advance\yl@shiftii\@@ylii
1274 \advance\yl@shifti\@@yli
1275 \advance\yl@shiftii\yl@xdiff
1276 \advance\yl@shifti\yl@ydiff
1277 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1278 \reset@yl@xydiff%1999/1/6 by S. Fujita
1279 \else
1280 \begin{picture}(600,600)(-300,-300)
1281 \iforigpt \put(-300,-300){\circle*{50}}%
1282  \put(-\noshift,-\noshift){\circle{50}}%
1283 \typeout{command `square' origin: %
1284  (\the\noshift,\the\noshift) ---> (300,300)}\fi%

1285 \fi

1286 \@tfor\member:=#1\do{%
1287 \expandafter\twoch@@r\member{}{}%
1288 \if\@@tmpa 0\relax {\putratom{37}{0}{\scriptsize\@@tmpb}}\fi}%
1289 \@forsemicol\member:=#2\do{%
1290 \ifx\member\empty\else
1291 \expandafter\@m@mb@r\member;\relax%
1292 \expandafter\threech@r\@membera{}{}%

1293 \ifx\@memberb\@yl\else
1294 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
1295 \or\put(0,0){\NEbond}%
1296 \or\put(0,0){\SEbond}%
1297 \or\put(0,0){\SWbond}%
1298 \or\put(0,0){\NWbond}%
1299 \fi%end of ifcase
1300 \fi\fi}%
1301 \end{picture}}%end of macro square
    The commands \ylsquarepositiona and \ylsquarepositiona are used in

\square to adjust a substitution position.

\ylsquareposition
1302 \def\ylsquareposition#1{%
1303 \@@ylswfalse%%%\@reset@ylsw
1304 \@forsemicol\member:=#1\do{%
1305 \if@@ylsw\else
1306 \ifx\member\empty\else
1307 \expandafter\@m@mb@r\member;\relax
1308 \expandafter\threech@r\@membera{}{}\relax
1309 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1310 \if@@ylsw
1311 \ifcase\@tmpa
1312 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
1313 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
1314 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
1315 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
1316 \fi%end of ifcase
1317 \fi\fi\fi}}%

10 Ball-stick models

10.1 Tetrahedral unit of stereo type

The macro \tetrastereo typesets a tetrahedral unit in a ball-stick fashion. The following numbering is adopted in this macro.

   *****************************
   * tetrahedral unit (stereo) *
   *****************************
   The following numbering is adopted in this macro.
                  1
                  |
            2  -- 0 --  4       0 <== the original point
                  |

This macro has an argument SUBSLIST as well as an optional argument

  AUXLIST.
     \tetrastereo[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

       AUXLIST =
       {0+} :  + charge (or another one chararacter) on the center

       SUBSLIST: list of substituents
         for n = 1 to 4
             n          :  single bond at n-atom
         for 0          :  cetral atom (e.g. 0==C)

         e.g.
          \tetrastereo{1==Cl;2==F}
          \tetrastereo{1==Cl;4==F;2==CH$_{3}$}

\tetrastereo
\@tetrastero
1318 \def\tetrastereo{\@ifnextchar[{\@tetrastereo[r}{\@tetrastereo[r]}}
1319 \def\@tetrastereo#1]#2{%
1320 \begin{picture}(600,600)(-300,-300)
1321 \iforigpt \put(-300,-300){\circle*{50}}%
1322  \put(-\noshift,-\noshift){\circle{50}}%
1323 \typeout{command `tetrastero' origin: %
1324  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
1325 \put(0,0){\circle{200}}%
1326 \@tfor\member:=#1\do{%
1327 \expandafter\twoch@@r\member{}{}%
1328 \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}%
1329 \@forsemicol\member:=#2\do{%
1330 \ifx\member\empty\else
1331 \expandafter\@m@mb@r\member;\relax%
1332 \expandafter\threech@r\@membera{}{}%
1333 \ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom

1334 \or%
1335 \put(0,100){\line(0,1){70}}% behind
1336 \putlratom{-30}{180}{\@memberb}%   and up
1337 \or%
1338 {\thicklines%
1339 \put(-60,10){\line(-5,2){140}}%   in front
1340 \putlatom{-205}{30}{\@memberb}}%  and left
1341 \or%
1342 \put(0,-100){\line(0,-1){90}}%     behind and
1343 \putlratom{-30}{-260}{\@memberb}% down
1344 \or%
1345 {\thicklines%
1346 \put(60,10){\line(5,2){140}}%     in front
1347 \putratom{210}{30}{\@memberb}}%   and right
1348 \fi\fi}%end of ifcase
1349 \end{picture}}%end of macro tetrastereo

10.2 Tetrahedral unit of inverse stereo type

The macro \dtetrastereo typesets another tetrahedral unit in a ball-stick fashion. The following numbering is adopted in this macro.

   *****************************
   * tetrahedral unit (stereo) *
   *****************************
   The following numbering is adopted in this macro.
                  1
                  |
            2  -- 0 --  4       0 <== the original point
                  |
                  3

This macro has an argument SUBSLIST as well as an optional argument

  AUXLIST.
     \dtetrastereo[AUXLIST]{SUBSLIST}

The arugument AUXLIST designates an character on the central atom of the formula drawn by this macro. It can be used a plus or minus charge on the center.

       AUXLIST =
       {0+} :  + charge (or another one chararacter) on the center

         for n = 1 to 4
             n          :  single bond at n-atom
         for 0          :  cetral atom (e.g. 0==C)

         e.g.
          \dtetrastereo{1==Cl;2==F}
          \dtetrastereo{1==Cl;4==F;2==CH$_{3}$}

\dtetrastereo
\@dtetrastereo
1350 \def\dtetrastereo{\@ifnextchar[{\@dtetrastereo[r}{\@dtetrastereo[r]}}
1351 \def\@dtetrastereo#1]#2{%
1352 \begin{picture}(600,600)(-300,-300)
1353 \iforigpt \put(-300,-300){\circle*{50}}%
1354  \put(-\noshift,-\noshift){\circle{50}}%
1355 \typeout{command `dtetrastero' origin: %
1356  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
1357 \put(0,0){\circle{200}}%
1358 \@tfor\member:=#1\do{%
1359 \expandafter\twoch@@r\member{}{}%
1360 \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}%
1361 \@forsemicol\member:=#2\do{%
1362 \ifx\member\empty\else
1363 \expandafter\@m@mb@r\member;\relax%
1364 \expandafter\threech@r\@membera{}{}%
1365 \ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
1366 \or%
1367 \put(0,100){\line(0,1){70}}% behind
1368 \putlratom{-30}{180}{\@memberb}%   and up
1369 \or%
1370 \put(-94,-10){\line(-5,-2){108}}%   in back
1371 \putlatom{-205}{-110}{\@memberb}%  and left
1372 \or%
1373 {\thicklines%
1374 \put(0,-50){\line(0,-1){150}}%     behind and
1375 \putlratom{-30}{-260}{\@memberb}}% down
1376 \or%
1377 \put(94,-10){\line(5,-2){108}}%     in back
1378 \putratom{210}{-110}{\@memberb}%   and right
1379 \fi\fi}%end of ifcase
1380 \end{picture}}%end of macro dtetrastereo

10.3 Ethane unit of stereo type

The macro \ethanestereo typesets an ethane molecule in a ball-stick fashion. The following numbering is adopted in this macro.

**************************
* ethane unit (vertical) *
**************************
5
|
6 --  (2) -- 4
|
|
1 --  (1) -- 3 <== the original point
|
2

This macro has an argument SUBSLIST as well as an optional argument

AUXLIST.
\ethanestereo[AUXLIST]{ATOMLIST}{SUBSLIST}

AUXLIST: list of charges
{n+}   :  + charge (or another one chararacter) on n-atom

SUBSLIST: list of substituents
for n = 1 to 6
n          :  single bond at n-atom

ATOMLIST: list of central atoms
n          :  atom for n-position (e.g. 1==C)

e.g.
\ethanestereo{1==Cl;2==F}
\ethanestereo{1==C;2==C}{1==Cl;4==F;2==CH$_{3}$}

\ethanestereo
\@ethanestereo
1381 \def\ethanestereo{\@ifnextchar[{\@ethanestereo}{\@ethanestereo[]}}
1382 \def\@ethanestereo[#1]#2#3{%
1383 \begin{picture}(600,800)(-300,-300)
1384 \iforigpt \put(-300,-300){\circle*{50}}%
1385  \put(-\noshift,-\noshift){\circle{50}}%
1386 \typeout{command `ethanestereo' origin: %
1387  (\the\noshift,\the\noshift) ---> (300,300)}\fi%
1388 \put(0,0){\circle{200}}%
1389 \put(0,270){\circle{200}}%
1390 \put(0,100){\line(0,1){70}}% central bond
1391 \@tfor\member:=#1\do{%
1392 \expandafter\twoch@@r\member{}{}%
1393 \if\@@tmpa 1\relax \putratom{87}{90}{\scriptsize\@@tmpb}
1394 \else\if\@@tmpa 2\relax \putratom{87}{360}{\scriptsize\@@tmpb}
1395 \fi\fi}%
1396 \def\aaa{#2}%
1397 \ifx\aaa\empty\else%
1398 \@forsemicol\member:=#2\do{%
1399 \ifx\member\empty\else
1400 \expandafter\@m@mb@r\member;\relax%
1401 \expandafter\threech@r\@membera{}{}%
1402 \ifcase\@tmpa%
1403 \or\putratom{-40}{-33}{\@memberb}%central atom
1404 \or\putratom{-40}{237}{\@memberb}%central atom
1405 \fi\fi}%end of ifcase
1406 \fi%
1407 \@forsemicol\member:=#3\do{%
1408 \ifx\member\empty\else
1409 \expandafter\@m@mb@r\member;\relax%
1410 \expandafter\threech@r\@membera{}{}%
1411 \ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
1412 \or%
1413 \put(-94,-10){\line(-5,-2){108}}%   in back
1414 \putlatom{-205}{-110}{\@memberb}%  and left
1415 \or%
1416 {\thicklines%
1417 \put(0,-50){\line(0,-1){150}}%     behind and
1418 \putlratom{-30}{-260}{\@memberb}}% down
1419 \or%
1420 \put(94,-10){\line(5,-2){108}}%     in back
1421 \putratom{210}{-110}{\@memberb}%   and right
1422 % %%%%%%%%
1423 \or%
1424 {\thicklines%
1425 \put(60,280){\line(5,2){140}}%     in front
1426 \putratom{210}{300}{\@memberb}}%   and right
1427 \or%
1428 \put(0,370){\line(0,1){70}}% behind

1429 \putlratom{-30}{450}{\@memberb}%   and up
1430 \or%
1431 {\thicklines%
1432 \put(-60,280){\line(-5,2){140}}%   in front
1433 \putlatom{-205}{300}{\@memberb}}%  and left
1434 \fi\fi}%end of ifcase
1435 \end{picture}}%end of macro ethanestereo

1436 ⟨/aliphat⟩