Methylene Chains by methylen.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
methylen methylen.sty
driver  driver for this dtx file

1.2 Version Information

1 ⟨∗methylen⟩

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{methylen}
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 methylen.sty

**********************************
* methylen.sty: list of commands *
**********************************
 <Switches for drawing substituents and bonds>
   \if@adoublebond     \if@bdoublebond

\if@Adoublebond     \if@adoublebond}
\reset@double
\if@linterchainsw   \if@rinterchainsw}
\reset@interchainsw
<Command for drawing substituents and bonds>
\@methsubsta      \@methsubstd   \@methsubstdL
\SKbondA          \SKbondB
\bondA            \bondAA
\bondB            \bondBB
<Basic commands for typesetting aliphatic chains>
\@@trimethylene
\@@dimethylene
<Commands for adjusting substitution sites>
\yltrimethyleneposition
\yldimethyleneposition
<Commands for drawing aliphatic chains>
\trimethylene
\dimethylene
\tetramethylene
\pentamethylene

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 (polymers.sty for the present case). Hence, the combination of \input and \@ifundefined is used to crossload sty files (chemstr.sty etc. 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 \@ifundefined{Westbond}{\input aliphat.sty\relax}{}
17 \@ifundefined{bzdrv}{\input carom.sty\relax}{}
18 \@ifundefined{hbonde}{\input hetaromh.sty\relax}{}
19 \unitlength=0.1pt

4 Setting Substituents

Substitutions on each methylene of a polymethylene chain is typeset by macros \@methsubsta etc. The macro \@methsubsta is used to place substituents on an upper-side methylene. A new bond modifier “W” is added to typeset a terminal substituent.

\@methsubsta
20 \newif\if@wrongbdWa \@wrongbdWafalse
21 \newif\if@wrongbdWd \@wrongbdWdfalse
22 \newif\if@wrongbdWaL \@wrongbdWaLfalse
23 \newif\if@wrongbdWdL \@wrongbdWdLfalse
24 \def\@methsubsta{%
25 \if@aclip% %clipping
26 \if\@tmpb S%single bond
27  \ifx\@tmpc\empty%
28  \yl@xdiff=31\relax
29  \yl@ydiff=-17\relax
30  \put(0,436){\line(0,1){110}}%      % single bond at 1
31  \putlratom{-31}{563}{\@memberb}%   % left or right type
32  \else\if\@tmpc B%(B) beta
33  \yl@xdiff=-36\relax
34  \yl@ydiff=-27\relax
35  \putlatom{-42}{563}{\@memberb}%    % left type
36  {%
37  \thicklines%
38  \put(-18,436){\line(-3,5){60}}%    % single bond at 1
39  }%
40  \else\if\@tmpc A%(A) alpha
41  \yl@xdiff=37\relax
42  \yl@ydiff=-27\relax
43  \putratom{41}{563}{\@memberb}%     % right type
44  \@ifundefined{dottedline}{%
45  \put(18,436){\line(3,5){60}}%      % single bond at 1
46  }{{\thicklines%
47  \dottedline{20}(18,436)(72,526)}}%
48  \else\if\@tmpc b%(b) beta
49  \yl@xdiff=-36\relax
50  \yl@ydiff=-27\relax
51  \putlatom{-42}{563}{\@memberb}%    % left type
52  \put(-18,436){\line(-3,5){60}}%    % single bond at 1
53  \else\if\@tmpc a%(a) alpha
54  \yl@xdiff=37\relax
55  \yl@ydiff=-27\relax
56  \putratom{41}{563}{\@memberb}%     % right type
57  \put(18,436){\line(3,5){60}}%      % single bond at 1
58  \fi\fi\fi\fi\fi%
59 \else\if\@tmpb D%double bond
60  \yl@xdiff=31\relax

61  \yl@ydiff=-17\relax
62  \putlratom{-31}{563}{\@memberb}%   % left or right type
63  \put(-12,436){\line(0,1){110}}%    % double bond at 1
64  \put(12,436){\line(0,1){110}}%     % double bond at 1
65 \else\if\@tmpb B%beta single bond
66  \yl@xdiff=31\relax
67  \yl@ydiff=-17\relax
68  \putlratom{-31}{563}{\@memberb}%   % left or right type
69  {%
70  \thicklines%
71  \put(0,436){\line(0,1){110}}%      % single bond at 1
72  }%
73 \else\if\@tmpb A%alpha single bond
74  \yl@xdiff=31\relax
75  \yl@ydiff=-17\relax
76  \putlratom{-31}{563}{\@memberb}%   % left or right type
77  \@ifundefined{dottedline}{%
78  \put(0,436){\line(0,1){110}}%    % single bond at 1
79  }{{\thicklines%
80  \dottedline{20}(0,436)(0,546)}}%
81 \else\if\@tmpb W%beta single bond
82  \yl@xdiff=-10\relax
83  \yl@ydiff=46\relax
84  \if@wrongbdWa
85  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
86  \fi
87  \putratom{150}{276}{\@memberb}%   % left or right type
88  \put(40,382){\line(5,-3){100}}%      % single bond at 1
89 \else%
90  \yl@xdiff=31\relax
91  \yl@ydiff=-17\relax
92  \putlratom{-31}{563}{\@memberb}%   % left or right type
93  \put(0,436){\line(0,1){110}}%      % single bond at 1
94 \fi\fi\fi\fi\fi%
95 \else% % no clipping
96 \if\@tmpb S%single bond
97  \ifx\@tmpc\empty%
98  \yl@xdiff=31\relax
99  \yl@ydiff=-17\relax
100  \put(0,406){\line(0,1){140}}%      % single bond at 1
101  \putlratom{-31}{563}{\@memberb}%   % left or right type
102  \else\if\@tmpc B%(B) beta
103  \yl@xdiff=-30\relax
104  \yl@ydiff=-37\relax
105  \putlatom{-42}{563}{\@memberb}%    % left type

106 {%

107  \thicklines%
108  \put(0,406){\line(-3,5){72}}%      % single bond at 1

109 }%

110  \else\if\@tmpc A%(A) alpha

111  \yl@xdiff=31\relax
112  \yl@ydiff=-37\relax
113  \putratom{41}{563}{\@memberb}%     % right type
114  \@ifundefined{dottedline}{%
115  \put(0,406){\line(3,5){72}}%       % single bond at 1
116  }{{\thicklines%
117  \dottedline{20}(0,406)(72,526)}}%
118  \else\if\@tmpc b%(b) beta
119  \yl@xdiff=-30\relax
120  \yl@ydiff=-37\relax
121  \putlatom{-42}{563}{\@memberb}%    % left type
122  \put(0,406){\line(-3,5){72}}%      % single bond at 1
123  \else\if\@tmpc a%(a) alpha
124  \yl@xdiff=31\relax
125  \yl@ydiff=-37\relax
126  \putratom{41}{563}{\@memberb}%     % right type
127  \put(0,406){\line(3,5){72}}%       % single bond at 1
128  \fi\fi\fi\fi\fi%
129 \else\if\@tmpb D%double bond
130  \yl@xdiff=31\relax
131  \yl@ydiff=-17\relax
132  \putlratom{-31}{563}{\@memberb}%   % left or right type
133  \put(-12,406){\line(0,1){140}}%    % double bond at 1
134  \put(12,406){\line(0,1){140}}%     % double bond at 1
135 \else\if\@tmpb B%beta single bond
136  \yl@xdiff=31\relax
137  \yl@ydiff=-17\relax
138  \putlratom{-31}{563}{\@memberb}%   % left or right type

139 {%

140  \thicklines%
141  \put(0,406){\line(0,1){140}}%      % single bond at 1

142 }%

143 \else\if\@tmpb A%alpha single bond
144  \yl@xdiff=31\relax
145  \yl@ydiff=-17\relax
146  \putlratom{-31}{563}{\@memberb}%   % left or right type
147  \@ifundefined{dottedline}{%
148  \put(0,406){\line(0,1){140}}%    % single bond at 1
149  }{{\thicklines%
150  \dottedline{20}(0,406)(0,546)}}%
151 \else\if\@tmpb W%beta single bond
152  \yl@xdiff=-10\relax
153  \yl@ydiff=58\relax
154  \if@wrongbdWa
155  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
156  \fi
157  \putratom{130}{276}{\@memberb}%   % left or right type
158  \put(0,406){\line(5,-3){120}}%      % single bond at 1
159 \else%
160  \yl@xdiff=31\relax

161  \yl@ydiff=-17\relax
162  \putlratom{-31}{563}{\@memberb}%   % left or right type
163  \put(0,406){\line(0,1){140}}%      % single bond at 1
164 \fi\fi\fi\fi\fi%
165 \fi}%

The macro \@methsubstd is used to place substituents on a down-side methylene. A new bond modifier “W” is added to typeset a terminal substituent.

\@methsubstd
166 \def\@methsubstd{%
167 \if@clip %clipping
168  \if\@tmpb S%single bond
169  \ifx\@tmpc\empty%
170  \yl@xdiff=31\relax
171  \yl@ydiff=90\relax
172  \putlratom{-31}{-230}{\@memberb}%  % left or right type
173  \put(0,-30){\line(0,-1){110}}%    % single bond at 4
174  \else\if\@tmpc B%(B) beta
175  \yl@xdiff=-36\relax
176  \yl@ydiff=100\relax
177  \putlatom{-42}{-230}{\@memberb}%   % left type

178 {%

179  \thicklines%
180  \put(-18,-30){\line(-3,-5){60}}%   % single bond at 4

181 }%

182  \else\if\@tmpc A%(A) alpha
183  \yl@xdiff=37\relax
184  \yl@ydiff=100\relax
185  \putratom{41}{-230}{\@memberb}%    % right type
186  \@ifundefined{dottedline}{%
187  \put(18,-30){\line(3,-5){60}}%     % single bond at 4
188  }{{\thicklines%
189  \dottedline{20}(18,-30)(72,-120)}}%
190  \else\if\@tmpc b%(b) beta
191  \yl@xdiff=-36\relax
192  \yl@ydiff=100\relax
193  \putlatom{-42}{-230}{\@memberb}%   % left type
194  \put(-18,-30){\line(-3,-5){60}}%   % single bond at 4
195  \else\if\@tmpc a%(a) alpha
196  \yl@xdiff=37\relax
197  \yl@ydiff=100\relax
198  \putratom{41}{-230}{\@memberb}%    % right type
199  \put(18,-30){\line(3,-5){60}}%     % single bond at 4
200  \fi\fi\fi\fi\fi%
201 \else\if\@tmpb D%double bond
202  \yl@xdiff=31\relax
203  \yl@ydiff=90\relax
204  \putlratom{-31}{-230}{\@memberb}%  % left or right type
205  \put(-12,-30){\line(0,-1){110}}%   % double bond at 4

206  \put(12,-30){\line(0,-1){110}}%    % double bond at 4
207 \else\if\@tmpb B%beta single bond
208  \yl@xdiff=31\relax
209  \yl@ydiff=90\relax
210  \putlratom{-31}{-230}{\@memberb}%  % left or right type

211 {%

212  \thicklines%
213  \put(0,-30){\line(0,-1){110}}%    % single bond at 4

214 }%

215 \else\if\@tmpb A%alpha single bond
216  \yl@xdiff=31\relax
217  \yl@ydiff=90\relax
218  \putlratom{-31}{-230}{\@memberb}%  % left or right type
219  \@ifundefined{dottedline}{%
220  \put(0,-30){\line(0,-1){110}}%     % single bond at 4
221  }{{\thicklines%
222  \dottedline{20}(0,-30)(0,-140)}}%
223 \else\if\@tmpb W%beta single bond
224  \yl@xdiff=-10\relax
225  \yl@ydiff=30\relax
226  \putlratom{150}{54}{\@memberb}%  % left or right type
227  \put(40,24){\line(5,3){100}}%    % single bond at 4
228  \if@wrongbdWd
229  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
230  \fi
231 \else%
232  \yl@xdiff=31\relax
233  \yl@ydiff=90\relax
234  \putlratom{-31}{-230}{\@memberb}%  % left or right type
235  \put(0,-30){\line(0,-1){110}}%     % single bond at 4
236 \fi\fi\fi\fi\fi%
237 \else% no clipping
238 \if\@tmpb S%single bond
239  \ifx\@tmpc\empty%
240  \yl@xdiff=31\relax
241  \yl@ydiff=90\relax
242  \putlratom{-31}{-230}{\@memberb}%  % left or right type
243  \put(0,0){\line(0,-1){140}}%      % single bond at 4
244  \else\if\@tmpc B%(B) beta
245  \yl@xdiff=-30\relax
246  \yl@ydiff=110\relax
247  \putlatom{-42}{-230}{\@memberb}%   % left type

248 {%

249  \thicklines%
250  \put(0,0){\line(-3,-5){72}}%       % single bond at 4

251 }%

252  \else\if\@tmpc A%(A) alpha
253  \yl@xdiff=31\relax
254  \yl@ydiff=110\relax
255  \putratom{41}{-230}{\@memberb}%    % right type

256  \@ifundefined{dottedline}{%
257  \put(0,0){\line(3,-5){72}}%        % single bond at 4
258  }{{\thicklines%
259  \dottedline{20}(0,0)(72,-120)}}%
260  \else\if\@tmpc b%(b) beta
261  \yl@xdiff=-30\relax
262  \yl@ydiff=110\relax
263  \putlatom{-42}{-230}{\@memberb}%   % left type
264  \put(0,0){\line(-3,-5){72}}%       % single bond at 4
265  \else\if\@tmpc a%(a) alpha
266  \yl@xdiff=31\relax
267  \yl@ydiff=110\relax
268  \putratom{41}{-230}{\@memberb}%    % right type
269  \put(0,0){\line(3,-5){72}}%        % single bond at 4
270  \fi\fi\fi\fi\fi%
271 \else\if\@tmpb D%double bond
272  \yl@xdiff=31\relax
273  \yl@ydiff=90\relax
274  \putlratom{-31}{-230}{\@memberb}%  % left or right type
275  \put(-12,0){\line(0,-1){140}}%     % double bond at 4
276  \put(12,0){\line(0,-1){140}}%      % double bond at 4
277 \else\if\@tmpb B%beta single bond
278  \yl@xdiff=31\relax
279  \yl@ydiff=90\relax
280  \putlratom{-31}{-230}{\@memberb}%  % left or right type

281 {%

282  \thicklines%
283  \put(0,0){\line(0,-1){140}}%       % single bond at 4

284 }%

285 \else\if\@tmpb A%alpha single bond
286  \yl@xdiff=31\relax
287  \yl@ydiff=90\relax
288  \putlratom{-31}{-230}{\@memberb}%  % left or right type
289  \@ifundefined{dottedline}{%
290  \put(0,0){\line(0,-1){140}}%      % single bond at 4
291  }{{\thicklines%
292  \dottedline{20}(0,0)(0,-140)}}%
293 \else\if\@tmpb W%beta single bond
294  \yl@xdiff=-10\relax
295  \yl@ydiff=30\relax
296  \putlratom{150}{54}{\@memberb}%  % left or right type
297  \put(0,0){\line(5,3){140}}%    % single bond at 4
298  \if@wrongbdWd
299  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
300  \fi
301 \else%
302  \yl@xdiff=31\relax
303  \yl@ydiff=90\relax
304  \putlratom{-31}{-230}{\@memberb}%  % left or right type
305  \put(0,0){\line(0,-1){140}}%       % single bond at 4

306 \fi\fi\fi\fi\fi%
307 \fi}%

The macro \@methsubstdL is used to place substituents on a left-teminal down-side methylene. A new bond modifier “W” is added to typeset a terminal substituent.

\@methsubstdL
308 \def\@methsubstdL{%
309 \if@clip %clipping
310  \if\@tmpb S%single bond
311  \ifx\@tmpc\empty%
312  \yl@xdiff=31\relax
313  \yl@ydiff=90\relax
314  \putlratom{-31}{-230}{\@memberb}%  % left or right type
315  \put(0,-30){\line(0,-1){110}}%    % single bond at 4
316  \else\if\@tmpc B%(B) beta
317  \yl@xdiff=-36\relax
318  \yl@ydiff=100\relax
319  \putlatom{-42}{-230}{\@memberb}%   % left type

320 {%

321  \thicklines%
322  \put(-18,-30){\line(-3,-5){60}}%   % single bond at 4

323 }%

324  \else\if\@tmpc A%(A) alpha
325  \yl@xdiff=37\relax
326  \yl@ydiff=100\relax
327  \putratom{41}{-230}{\@memberb}%    % right type
328  \@ifundefined{dottedline}{%
329  \put(18,-30){\line(3,-5){60}}%     % single bond at 4
330  }{{\thicklines%
331  \dottedline{20}(18,-30)(72,-120)}}%
332  \else\if\@tmpc b%(b) beta
333  \yl@xdiff=-36\relax
334  \yl@ydiff=100\relax
335  \putlatom{-42}{-230}{\@memberb}%   % left type
336  \put(-18,-30){\line(-3,-5){60}}%   % single bond at 4
337  \else\if\@tmpc a%(a) alpha
338  \yl@xdiff=37\relax
339  \yl@ydiff=100\relax
340  \putratom{41}{-230}{\@memberb}%    % right type
341  \put(18,-30){\line(3,-5){60}}%     % single bond at 4
342  \fi\fi\fi\fi\fi%
343 \else\if\@tmpb D%double bond
344  \yl@xdiff=31\relax
345  \yl@ydiff=90\relax
346  \putlratom{-31}{-230}{\@memberb}%  % left or right type
347  \put(-12,-30){\line(0,-1){110}}%   % double bond at 4
348  \put(12,-30){\line(0,-1){110}}%    % double bond at 4
349 \else\if\@tmpb B%beta single bond

350  \yl@xdiff=31\relax
351  \yl@ydiff=90\relax
352  \putlratom{-31}{-230}{\@memberb}%  % left or right type

353 {%

354  \thicklines%
355  \put(0,-30){\line(0,-1){110}}%    % single bond at 4

356 }%

357 \else\if\@tmpb A%alpha single bond
358  \yl@xdiff=31\relax
359  \yl@ydiff=90\relax
360  \putlratom{-31}{-230}{\@memberb}%  % left or right type
361  \@ifundefined{dottedline}{%
362  \put(0,-30){\line(0,-1){110}}%     % single bond at 4
363  }{{\thicklines%
364  \dottedline{20}(0,-30)(0,-140)}}%
365 \else\if\@tmpb W%beta single bond
366  \yl@xdiff=10\relax
367  \yl@ydiff=30\relax
368  \putlatom{-150}{54}{\@memberb}%  % lefttype
369  \put(-40,24){\line(-5,3){100}}%    % single bond at 4
370  \if@wrongbdWdL
371  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
372  \fi
373 \else%
374  \yl@xdiff=31\relax
375  \yl@ydiff=90\relax
376  \putlratom{-31}{-230}{\@memberb}%  % left or right type
377  \put(0,-30){\line(0,-1){110}}%     % single bond at 4
378 \fi\fi\fi\fi\fi%
379 \else% no clipping
380 \if\@tmpb S%single bond
381  \ifx\@tmpc\empty%
382  \yl@xdiff=31\relax
383  \yl@ydiff=90\relax
384  \putlratom{-31}{-230}{\@memberb}%  % left or right type
385  \put(0,0){\line(0,-1){140}}%      % single bond at 4
386  \else\if\@tmpc B%(B) beta
387  \yl@xdiff=-30\relax
388  \yl@ydiff=110\relax
389  \putlatom{-42}{-230}{\@memberb}%   % left type

390 {%

391  \thicklines%
392  \put(0,0){\line(-3,-5){72}}%       % single bond at 4

393 }%

394  \else\if\@tmpc A%(A) alpha
395  \yl@xdiff=31\relax
396  \yl@ydiff=110\relax
397  \putratom{41}{-230}{\@memberb}%    % right type
398  \@ifundefined{dottedline}{%
399  \put(0,0){\line(3,-5){72}}%        % single bond at 4

400  }{{\thicklines%
401  \dottedline{20}(0,0)(72,-120)}}%
402  \else\if\@tmpc b%(b) beta
403  \yl@xdiff=-30\relax
404  \yl@ydiff=110\relax
405  \putlatom{-42}{-230}{\@memberb}%   % left type
406  \put(0,0){\line(-3,-5){72}}%       % single bond at 4
407  \else\if\@tmpc a%(a) alpha
408  \yl@xdiff=31\relax
409  \yl@ydiff=110\relax
410  \putratom{41}{-230}{\@memberb}%    % right type
411  \put(0,0){\line(3,-5){72}}%        % single bond at 4
412  \fi\fi\fi\fi\fi%
413 \else\if\@tmpb D%double bond
414  \yl@xdiff=31\relax
415  \yl@ydiff=90\relax
416  \putlratom{-31}{-230}{\@memberb}%  % left or right type
417  \put(-12,0){\line(0,-1){140}}%     % double bond at 4
418  \put(12,0){\line(0,-1){140}}%      % double bond at 4
419 \else\if\@tmpb B%beta single bond
420  \yl@xdiff=31\relax
421  \yl@ydiff=90\relax
422  \putlratom{-31}{-230}{\@memberb}%  % left or right type

423 {%

424  \thicklines%
425  \put(0,0){\line(0,-1){140}}%       % single bond at 4

426 }%

427 \else\if\@tmpb A%alpha single bond
428  \yl@xdiff=31\relax
429  \yl@ydiff=90\relax
430  \putlratom{-31}{-230}{\@memberb}%  % left or right type
431  \@ifundefined{dottedline}{%
432  \put(0,0){\line(0,-1){140}}%      % single bond at 4
433  }{{\thicklines%
434  \dottedline{20}(0,0)(0,-140)}}%
435 \else\if\@tmpb W%beta single bond
436  \yl@xdiff=10\relax
437  \yl@ydiff=30\relax
438  \putlatom{-150}{54}{\@memberb}%  % left type
439  \put(0,0){\line(-5,3){140}}%    % single bond at 4
440  \if@wrongbdWdL
441  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
442  \fi
443 \else%
444  \yl@xdiff=31\relax
445  \yl@ydiff=90\relax
446  \putlratom{-31}{-230}{\@memberb}%  % left or right type
447  \put(0,0){\line(0,-1){140}}%       % single bond at 4
448 \fi\fi\fi\fi\fi%
449 \fi}%

The macro \@methsubstaL is used to place substituents on a left-teminal upper-side methylene. A new bond modifier “W” is added to typeset a terminal substituent.

\@methsubstaL
450 \def\@methsubstaL{%
451 \if@aclip% %clipping
452 \if\@tmpb S%single bond
453  \ifx\@tmpc\empty%
454  \yl@xdiff=31\relax
455  \yl@ydiff=-17\relax
456  \put(0,436){\line(0,1){110}}%      % single bond at 1
457  \putlratom{-31}{563}{\@memberb}%   % left or right type
458  \else\if\@tmpc B%(B) beta
459  \yl@xdiff=-36\relax
460  \yl@ydiff=-27\relax
461  \putlatom{-42}{563}{\@memberb}%    % left type

462 {%

463  \thicklines%
464  \put(-18,436){\line(-3,5){60}}%    % single bond at 1

465 }%

466  \else\if\@tmpc A%(A) alpha
467  \yl@xdiff=37\relax
468  \yl@ydiff=-27\relax
469  \putratom{41}{563}{\@memberb}%     % right type
470  \@ifundefined{dottedline}{%
471  \put(18,436){\line(3,5){60}}%      % single bond at 1
472  }{{\thicklines%
473  \dottedline{20}(18,436)(72,526)}}%
474  \else\if\@tmpc b%(b) beta
475  \yl@xdiff=-36\relax
476  \yl@ydiff=-27\relax
477  \putlatom{-42}{563}{\@memberb}%    % left type
478  \put(-18,436){\line(-3,5){60}}%    % single bond at 1
479  \else\if\@tmpc a%(a) alpha
480  \yl@xdiff=37\relax
481  \yl@ydiff=-27\relax
482  \putratom{41}{563}{\@memberb}%     % right type
483  \put(18,436){\line(3,5){60}}%      % single bond at 1
484  \fi\fi\fi\fi\fi%
485 \else\if\@tmpb D%double bond
486  \yl@xdiff=31\relax
487  \yl@ydiff=-17\relax
488  \putlratom{-31}{563}{\@memberb}%   % left or right type
489  \put(-12,436){\line(0,1){110}}%    % double bond at 1
490  \put(12,436){\line(0,1){110}}%     % double bond at 1
491 \else\if\@tmpb B%beta single bond
492  \yl@xdiff=31\relax
493  \yl@ydiff=-17\relax
494  \putlratom{-31}{563}{\@memberb}%   % left or right type

495 {%

496  \thicklines%
497  \put(0,436){\line(0,1){110}}%      % single bond at 1

498 }%

499 \else\if\@tmpb A%alpha single bond
500  \yl@xdiff=31\relax
501  \yl@ydiff=-17\relax
502  \putlratom{-31}{563}{\@memberb}%   % left or right type
503  \@ifundefined{dottedline}{%
504  \put(0,436){\line(0,1){110}}%    % single bond at 1
505  }{{\thicklines%
506  \dottedline{20}(0,436)(0,546)}}%
507 \else\if\@tmpb W%beta single bond
508  \yl@xdiff=10\relax
509  \yl@ydiff=46\relax
510  \putlatom{-150}{276}{\@memberb}%   % left type
511  \put(-40,382){\line(-5,-3){100}}%      % single bond at 1
512  \if@wrongbdWaL
513  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
514  \fi
515 \else%
516  \yl@xdiff=31\relax
517  \yl@ydiff=-17\relax
518  \putlratom{-31}{563}{\@memberb}%   % left or right type
519  \put(0,436){\line(0,1){110}}%      % single bond at 1
520 \fi\fi\fi\fi\fi%
521 \else% % no clipping
522 \if\@tmpb S%single bond
523  \ifx\@tmpc\empty%
524  \yl@xdiff=31\relax
525  \yl@ydiff=-17\relax
526  \put(0,406){\line(0,1){140}}%      % single bond at 1
527  \putlratom{-31}{563}{\@memberb}%   % left or right type
528  \else\if\@tmpc B%(B) beta
529  \yl@xdiff=-30\relax
530  \yl@ydiff=-37\relax
531  \putlatom{-42}{563}{\@memberb}%    % left type

532 {%

533  \thicklines%
534  \put(0,406){\line(-3,5){72}}%      % single bond at 1

535 }%

536  \else\if\@tmpc A%(A) alpha
537  \yl@xdiff=31\relax
538  \yl@ydiff=-37\relax
539  \putratom{41}{563}{\@memberb}%     % right type
540  \@ifundefined{dottedline}{%
541  \put(0,406){\line(3,5){72}}%       % single bond at 1
542  }{{\thicklines%
543  \dottedline{20}(0,406)(72,526)}}%
544  \else\if\@tmpc b%(b) beta

545  \yl@xdiff=-30\relax
546  \yl@ydiff=-37\relax
547  \putlatom{-42}{563}{\@memberb}%    % left type
548  \put(0,406){\line(-3,5){72}}%      % single bond at 1
549  \else\if\@tmpc a%(a) alpha
550  \yl@xdiff=31\relax
551  \yl@ydiff=-37\relax
552  \putratom{41}{563}{\@memberb}%     % right type
553  \put(0,406){\line(3,5){72}}%       % single bond at 1
554  \fi\fi\fi\fi\fi%
555 \else\if\@tmpb D%double bond
556  \yl@xdiff=31\relax
557  \yl@ydiff=-17\relax
558  \putlratom{-31}{563}{\@memberb}%   % left or right type
559  \put(-12,406){\line(0,1){140}}%    % double bond at 1
560  \put(12,406){\line(0,1){140}}%     % double bond at 1
561 \else\if\@tmpb B%beta single bond
562  \yl@xdiff=31\relax
563  \yl@ydiff=-17\relax
564  \putlratom{-31}{563}{\@memberb}%   % left or right type

565 {%

566  \thicklines%
567  \put(0,406){\line(0,1){140}}%      % single bond at 1

568 }%

569 \else\if\@tmpb A%alpha single bond
570  \yl@xdiff=31\relax
571  \yl@ydiff=-17\relax
572  \putlratom{-31}{563}{\@memberb}%   % left or right type
573  \@ifundefined{dottedline}{%
574  \put(0,406){\line(0,1){140}}%    % single bond at 1
575  }{{\thicklines%
576  \dottedline{20}(0,406)(0,546)}}%
577 \else\if\@tmpb W%beta single bond
578  \yl@xdiff=10\relax
579  \yl@ydiff=58\relax
580  \putlatom{-130}{276}{\@memberb}%   % left type
581  \put(0,406){\line(-5,-3){120}}%      % single bond at 1
582  \if@wrongbdWaL
583  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
584  \fi
585 \else%
586  \yl@xdiff=31\relax
587  \yl@ydiff=-17\relax
588  \putlratom{-31}{563}{\@memberb}%   % left or right type
589  \put(0,406){\line(0,1){140}}%      % single bond at 1
590 \fi\fi\fi\fi\fi%
591 \fi}%

5 Setting Bonds

5.1 Outer Skeletal Bonds

The macros \SKbondB and \SKbondA are used to typeset outer skeletal bonds of a methylene chain (\..methylene)

\SKbondB
592 \def\SKbondB{%
593 \ifx\bbb\empty%
594  \ifx\ccc\empty%
595  \put(0,406){\line(5,-3){171}}%        %bond 1-2
596  \else%
597  \put(0,406){\line(5,-3){136}}%        %bond 1-2
598  \fi%
599 \else%
600  \ifx\ccc\empty%
601  \put(35,385){\line(5,-3){136}}%       %bond 1-2
602  \else%
603  \put(35,385){\line(5,-3){100}}%       %bond 1-2
604  \fi%
605 \fi}%
\SKbondA
606 \def\SKbondA{%
607 \ifx\bbb\empty%
608  \ifx\aaa\empty%
609  \put(0,406){\line(-5,-3){171}}%       %bond 1-6
610  \else%
611  \put(0,406){\line(-5,-3){136}}%       %bond 1-6
612  \fi%
613 \else%
614  \ifx\aaa\empty%
615  \put(-35,385){\line(-5,-3){136}}%     %bond 1-6
616  \else%
617  \put(-35,385){\line(-5,-3){100}}%     %bond 1-6
618  \fi%
619 \fi}%

The macros \SKbondBi and \SKbondAi are used to typeset outer skeletal bonds of a methylene chain (inverse type \..methylenei).

\SKbondBi
620 \def\SKbondBi{%
621 \begin{picture}(0,0)(0,0)
622 \ifx\bbb\empty%
623  \ifx\ccc\empty%
624  \put(0,0){\line(5,3){171}}%           %bond 4-3
625  \else%

626  \put(0,0){\line(5,3){136}}%           %bond 4-3
627  \fi%
628 \else%
629  \ifx\ccc\empty%
630  \put(35,21){\line(5,3){138}}%         %bond 4-3
631  \else%
632  \put(35,21){\line(5,3){100}}%         %bond 4-3
633  \fi%
634 \fi\end{picture}}%
\SKbondAi
635 \def\SKbondAi{%
636 \begin{picture}(0,0)(0,0)
637 \ifx\bbb\empty%
638  \ifx\aaa\empty%
639  \put(0,0){\line(-5,3){171}}%          %bond 4-5
640  \else%
641  \put(0,0){\line(-5,3){136}}%          %bond 4-5
642  \fi%
643 \else%
644  \ifx\aaa\empty%
645  \put(-35,21){\line(-5,3){138}}%       %bond 4-5
646  \else%
647  \put(-35,21){\line(-5,3){100}}%        %bond 4-5
648  \fi%
649 \fi\end{picture}}%

5.2 Inner Double Bonds

The macros \bondB is used to place a line of a double bond in the (5,-3) direction at the lower side of an outer skeletal bond.

\bondB
650 \def\bondB{%
651 \ifx\bbb\empty%
652 \ifx\ccc\empty%
653  \put(6,364){\line(5,-3){126}}%         %double bond 1-2
654 \else%
655  \put(6,364){\line(5,-3){100}}%         %double bond 1-2
656 \fi%
657 \else%
658 \ifx\ccc\empty%
659  \put(35,340){\line(5,-3){100}}%        %double bond 1-2
660 \else%
661  \put(35,352){\line(5,-3){100}}%        %double bond 1-2
662 \fi%                                    % line <1OO not available
663 \fi%

664 }%

The macros \bondBB is used to place a line of a double bond in the (5,-3) direction at the upper side of an outer skeletal bond.

\bondBB
665 \def\bondBB{%
666 \ifx\bbb\empty%
667 \ifx\ccc\empty%
668  \put(42,420){\line(5,-3){126}}%         %double bond 1-2
669 \else%
670  \put(42,420){\line(5,-3){100}}%         %double bond 1-2
671 \fi%
672 \else%
673 \ifx\ccc\empty%
674  \put(52,412){\line(5,-3){110}}%        %double bond 1-2
675 \else%
676  \put(52,412){\line(5,-3){100}}%        %double bond 1-2
677 \fi%                                    % line <1OO not available
678 \fi%

679 }%

The macros \bondA is used to place a line of a double bond in the (-5,-3) direction at the lower side of an outer skeletal bond.

\bondA
680 \def\bondA{%
681 \ifx\bbb\empty%
682 \ifx\aaa\empty%
683  \put(-6,364){\line(-5,-3){126}}%        %double bond 1-6
684 \else%
685  \put(-6,364){\line(-5,-3){100}}%        %double bond 1-6
686 \fi%
687 \else%
688 \ifx\aaa\empty%
689  \put(-35,340){\line(-5,-3){100}}%       %double bond 1-6
690 \else%
691  \put(-35,352){\line(-5,-3){100}}%       %double bond 1-6
692 \fi%                                     % line <1OO not available
693 \fi%

694 }%

The macros \bondAA is used to place a line of a double bond in the (-5,-3) direction at the upper side of an outer skeletal bond.

\bondAA
695 \def\bondAA{%
696 \ifx\bbb\empty%
697 \ifx\aaa\empty%
698  \put(-42,420){\line(-5,-3){126}}%        %double bond 1-6
699 \else%

700  \put(-42,420){\line(-5,-3){100}}%        %double bond 1-6
701 \fi%
702 \else%
703 \ifx\aaa\empty%
704  \put(-52,412){\line(-5,-3){100}}%       %double bond 1-6
705 \else%
706  \put(-52,412){\line(-5,-3){100}}%       %double bond 1-6
707 \fi%                                     % line <1OO not available
708 \fi%

709 }%

The bond-setting commands with sufix “i” are used in the definitions of commands such as \...methylenei.

The macros \bondBi is used to place a line of a double bond in the (5,3) direction at the upper side of an outer skeletal bond.

\bondBi
710 \def\bondBi{%
711 \ifx\bbb\empty%
712 \ifx\ccc\empty%
713  \put(6,42){\line(5,3){126}}           %double bond 4-3
714 \else%
715  \put(6,42){\line(5,3){100}}           %double bond 4-3
716 \fi%
717 \else%
718 \ifx\ccc\empty%
719  \put(35,66){\line(5,3){100}}%          %double bond 4-3
720 \else%
721  \put(35,60){\line(5,3){100}}%          %double bond 4-3
722 \fi%                                    % line <1OO not available
723 \fi%

724 }%

The macros \bondBBi is used to place a line of a double bond in the (5,3) direction at the lower side of an outer skeletal bond.

\bondBBi
725 \def\bondBBi{%
726 \ifx\bbb\empty%
727 \ifx\ccc\empty%
728 %    \put(6,42){\line(5,3){126}}           %double bond 4-3
729  \put(42,-14){\line(5,3){126}}%        %double bond 1-6
730 \else%
731 %    \put(6,42){\line(5,3){100}}           %double bond 4-3
732 %    \put(42,-14){\line(5,3){100}}%        %double bond 1-6
733  \put(30,-14){\line(5,3){100}}%        %double bond 1-6
734 \fi%
735 \else%
736 \ifx\ccc\empty%

737 %    \put(35,66){\line(5,3){100}}%          %double bond 4-3
738 %    \put(52,6){\line(5,3){100}}%       %double bond 1-6
739  \put(52,0){\line(5,3){100}}%       %double bond 1-6
740 \else%
741 %    \put(35,60){\line(5,3){100}}%          %double bond 4-3
742  \put(52,0){\line(5,3){100}}%        %double bond 4-5
743 \fi%                                    % line <1OO not available
744 \fi%

745 }%

The macros \bondAi is used to place a line of a double bond in the (-5,3) direction at the upper side of an outer skeletal bond.

\bondAi
746 \def\bondAi{%
747 \ifx\bbb\empty%
748 \ifx\aaa\empty%
749  \put(-6,42){\line(-5,3){126}}%         %double bond 4-5
750 \else%
751  \put(-6,42){\line(-5,3){100}}%         %double bond 4-5
752 \fi%
753 \else%
754 \ifx\aaa\empty%
755  \put(-35,66){\line(-5,3){100}}%        %double bond 4-5
756 \else%
757  \put(-35,60){\line(-5,3){100}}%        %double bond 4-5
758 \fi%                                    % line <1OO not available
759 \fi%

760 }%

The macros \bondAAi is used to place a line of a double bond in the (-5,3) direction at the lower side of an outer skeletal bond.

\bondAAi
761 \def\bondAAi{%
762 \ifx\bbb\empty%
763 \ifx\aaa\empty%
764 %    \put(-6,42){\line(-5,3){126}}%         %double bond 4-5
765  \put(-42,-14){\line(-5,3){126}}%        %double bond 1-6
766 \else%
767 %    \put(-6,42){\line(-5,3){100}}%         %double bond 4-5
768  \put(-42,-14){\line(-5,3){100}}%        %double bond 1-6
769 \fi%
770 \else%
771 \ifx\aaa\empty%
772 %    \put(-35,66){\line(-5,3){100}}%        %double bond 4-5
773  \put(-52,6){\line(-5,3){100}}%       %double bond 1-6
774 \else%
775 %    \put(-35,60){\line(-5,3){100}}%        %double bond 4-5
776  \put(-52,0){\line(-5,3){100}}%        %double bond 4-5

777 \fi%                                    % line <1OO not available
778 \fi%

779 }%

6 Switches

\if@adoublebond
\if@bdoublebond
\if@Adoublebond
\if@adoublebond
\reset@double

780 \newif\if@adoublebond \@adoublebondfalse
781 \newif\if@bdoublebond \@bdoublebondfalse
782 \newif\if@Adoublebond \@Adoublebondfalse
783 \newif\if@Bdoublebond \@Bdoublebondfalse
784 \def\reset@double{%
785 \@adoublebondfalse\@bdoublebondfalse
786 \@Adoublebondfalse\@Bdoublebondfalse}
\if@linterchainsw
\if@rinterchainsw
\reset@interchainsw

787 \newif\if@linterchainsw \@linterchainswfalse
788 \newif\if@rinterchainsw \@rinterchainswfalse
789 \def\reset@interchainsw{\@linterchainswfalse\@rinterchainswfalse}

7 Trimethylene

7.1 Normal direction

A trimethylene (or propane) and its hetera analogs can be typeset by the command \trimethylene, which is mainly based on two inner commands:

 \yltrimethyleneposition for adjusting a substitution site and \@@trimethylene

for placing hetero atoms, double bonds, and substituents.

\@@trimethylene   \@@trimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
     <TERMswitch>
       0:  all positions
       1:  positions bbb and ccc
       2:  positions aaa and bbb
        bbb
         2
      a /  `  b
      1      3
     aaa     ccc
     <Adjust>
       a positive or negative integer to adjust locant numbers
790 \def\@@trimethylene#1#2#3#4{%
791 \leavevmode

792 \iniatom\iniflag%initialize
793 \test@vrtx@trimethy{#1}{#4}%
794 %\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
795 \begin{picture}(450,480)(0,0)
796 % %%%%%%%%%%%%%%%%%%
797 % % outer skeleton %
798 % %%%%%%%%%%%%%%%%%%
799 \put(171,-303){\SKbondB}% bond between 1 and 2
800 \put(171,-303){\SKbondA}% bond between 1 and 6
801 % %%%%%%%%%%%%%%%%%%%%%
802 % % inner double bond %
803 % %%%%%%%%%%%%%%%%%%%%%
804 \if@adoublebond\relax\put(171,-303){\bondA}\fi
805 \if@bdoublebond\relax\put(171,-303){\bondB}\fi
806 \if@Adoublebond\relax\put(171,-303){\bondAA}\fi
807 \if@Bdoublebond\relax\put(171,-303){\bondBB}\fi
808 % %%%%%%%%%%%%%%%%%%%%%%%%
809 % % setting hetero atoms %
810 % %%%%%%%%%%%%%%%%%%%%%%%%
811 \test@termcnt=#3\relax
812 %\set@hetatom@methyl{#1}{0}{0}{4}{0}%
813 \set@hetatom@methyl{#1}{#4}{0}{4}{0}%
814 % %%%%%%%%%%%%%%%%%%%%%%%%
815 % % setting substituents %
816 % %%%%%%%%%%%%%%%%%%%%%%%%
817 \@forsemicol\member:=#2\do{%
818 \ifx\member\empty\else
819 \expandafter\@m@mb@r\member;\relax%
820 \expandafter\threech@r\@membera{}{}%
821 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
822 \ifx\@memberb\@yl\else
823 \ifcase\@tmpaa%0 omit
824 \or
825 \ifcase#3
826 {\if@aclip \@cliptrue \else \@clipfalse\fi
827 \put(0,0){\@methsubstdL}}%
828 \or\relax
829 \or
830 {\if@aclip \@cliptrue \else \@clipfalse\fi
831 \put(0,0){\@methsubstdL}}%
832 \fi
833 \or
834 {\if@bclip \@acliptrue \else \@aclipfalse\fi
835 \put(171,-303){\@methsubsta}}
836 \or
837 \ifcase#3
838 {\if@cclip \@cliptrue\else \@clipfalse\fi
839 \put(342,0){\@methsubstd}}%
840 \or
841 {\if@cclip \@cliptrue\else \@clipfalse\fi

842 \put(342,0){\@methsubstd}}%
843 \or\relax
844 \fi
845 \fi%end of ifcase
846 \fi\fi

847 }%

848 \end{picture}}% end of \@@trimethylene
\test@vrtx@trimethy
849 \def\test@vrtx@trimethy#1#2{%
850 \@forsemicol\member:=#1\do{%
851 \ifx\member\empty\else
852 \expandafter\@m@mb@r\member;\relax%
853 \expandafter\twoch@r\@membera{}%
854 \@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
855 \ifcase\@tmpaa%
856 \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
857  \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
858 \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
859  \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
860 \or \if\@tmpb s\relax \xdef\ccc{}\else\if\@tmpb h\relax
861  \xdef\ccc{@}\else\xdef\ccc{@}\fi\fi
862 \fi\fi}}

The \yltrimethyleneposition is used to adjust substitution sites for the

 command \@@trimethylene.
\yltrimethyleneposition   \yltrimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
     <TERMswitch>
       0:  all positions
       1:  positions bbb and ccc
       2:  positions aaa and bbb
        bbb
         2
      a /  `  b
      1      3
     aaa     ccc
     <Adjust>
       a positive or negative integer to adjust locant numbers

863 %

864 \def\yltrimethyleneposition#1#2#3#4{%
865 \@forsemicol\member:=#1\do{%
866 \ifx\member\empty\else
867 \expandafter\@m@mb@r\member;\relax%
868 \expandafter\twoch@r\@membera{}%
869 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax

870 \ifcase\@tmpaa%
871 \or \def\aaa{\@memberb}%
872 \or \def\bbb{\@memberb}%
873 \or \def\ccc{\@memberb}%
874 \fi}%
875 \@@ylswfalse%%%\@reset@ylsw
876 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
877 \expandafter\threech@r\@membera{}{}%
878 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
879 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
880 \if@@ylsw
881 \ifcase\@tmpaa%0 omit
882 \or
883 \ifcase#3
884 \ifx\aaa\empty
885  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
886 \else
887  \if@linterchainsw%interchain position
888  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
889  \else% terminal position
890  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
891  \fi
892 \fi
893 \or\relax
894 \or
895 \ifx\aaa\empty
896  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
897 \else
898  \if@linterchainsw%interchain position
899  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
900  \else% terminal position
901  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
902  \fi
903 \fi
904 \fi
905 \or
906 \ifx\bbb\empty
907  \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
908 \else
909  \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
910 \fi
911 \or
912 \ifcase#3
913 \ifx\ccc\empty
914  \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
915 \else
916  \if@rinterchainsw%interchain position
917  \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
918  \else
919  \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3

920  \fi
921 \fi
922 \or
923 \ifx\ccc\empty
924  \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
925 \else
926  \if@rinterchainsw%interchain position
927  \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
928  \else
929  \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
930  \fi
931 \fi
932 \or\relax
933 \fi
934 \fi%end of ifcase
935 \fi\fi}}% end of \yltrimethyleneposition

The counter \test@termcnt, which is equal to the argument #3 of command \@@trimethylene, is used for testing a terminal point.

\test@termcnt
936 \newcount\test@termcnt

The \set@hetatom@methyl is used to set a hetero atom at each vertex in the

 command \@@trimethylene.
\set@hetatom@methyl
937 \def\set@hetatom@methyl#1#2#3#4#5{%
938 \@forsemicol\member:=#1\do{%
939 \ifx\member\empty\else
940 \expandafter\@m@mb@r\member;\relax%
941 %\expandafter\twoch@r\@membera{}%
942 \expandafter\twoCH@R\@membera//%
943 \ifnum#5 < 0\relax%
944 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
945 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
946 \ifnum\@tmpaa >#3\relax%
947 \ifnum\@tmpaa <#4\relax%
948 \ifcase\@tmpaa%
949 \or%position 1 <--- position 6 of set@hetatom@sixv
950 \ifnum\test@termcnt=1\else%not terminal point (left)
951 \if\@tmpb h\relax%
952  \@acliptrue%
953  \putlatom{0}{30}{\@memberb}%  % right type
954 \else\if\@tmpb s\relax%
955  \@aclipfalse%
956 %     \putlatom{-4}{0}{\@memberb}%  % right type
957  \putlatom{0}{0}{\@memberb}%  % right type
958 \else\if\@tmpb a\relax%omit fused position
959 \else

960  \@acliptrue%
961  \putlatom{36}{-23}{\@memberb}% % left type
962 \fi\fi\fi
963 \fi
964 \or%position 2 <--- position 1 of set@hetatom@sixv
965 \if\@tmpb h\relax%
966  \@bcliptrue%
967  \putratom{171}{53}{\@memberb}%  % right type
968 \else\if\@tmpb s\relax%
969  \@bclipfalse%
970  \putratom{171}{103}{\@memberb}%  % right type
971 \else\if\@tmpb a\relax%omit fused position
972 \else
973  \@bcliptrue%
974 %     \putratom{140}{53}{\@memberb}%  % right type
975  \putratom{140}{65}{\@memberb}%  % right type
976 \fi\fi\fi
977 \or%position 3 <--- position 2 of set@hetatom@sixv
978 \ifnum\test@termcnt=2\else%not terminal point (right)
979 \if\@tmpb h\relax
980  \@ccliptrue%
981 %     \putratom{320}{30}{\@memberb}%  % right type
982  \putratom{330}{30}{\@memberb}%  % right type
983 \else\if\@tmpb s\relax
984  \@cclipfalse%
985  \putratom{346}{0}{\@memberb}%  % right type
986 \else\if\@tmpb a\relax%omit fused position
987 \else
988  \@ccliptrue%
989  \putratom{306}{-23}{\@memberb}%  % right type
990 \fi\fi\fi
991 \fi
992 \fi% end of ifcase
993 \fi\fi\fi}}% end of the macro \set@hetatom@methyl

The macro \trimethylene has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

\trimethylene \@trimethylene         bbb
         2
      a /  ` b  (or uppercase letters)
       /    `
      1      3
     aaa    ccc

  \trimethylene[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character a, A, b, or B each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a lower-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a upperside of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  1,2-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 3 atoms)
       for n = 1 to 3
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

     SUBSLIST: list of substituents
       for n = 1 to 3
           nD         :  exocyclic double bond at n-atom
           n or nS    :  exocyclic single bond at n-atom
           nA         :  alpha single bond at n-atom
           nB         :  beta single bond at n-atom
           nSA        :  alpha single bond at n-atom (boldface)
           nSB        :  beta single bond at n-atom (dotted line)
           nSa        :  alpha (not specified) single bond at n-atom
           nSb        :  beta (not specified) single bond at n-atom
           nW         :  terminal single bond (n=1 or 3)

Several examples are shown as follows.

         e.g.
          \trimethylene{1==N}{1==Cl;2==F}
          \trimethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \trimethylene uses a picture environment and consists of the following unit processes:

1. adjusting substitution site by \yltrimethyleneposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@trimethylene.

 994 \def\trimethylene{%
 995 \@ifnextchar[{\@trimethylene[@}{\@trimethylene[]}}
 996 \def\@trimethylene[#1]#2#3{%
 997 \iniflag\iniatom%
 998 \@reset@ylsw%
 999 \reset@interchainsw%
1000 \yltrimethyleneposition{#2}{#3}{0}{0}%
1001 \if@ylsw
1002 \yl@shiftii=\@ylii
1003 \yl@shifti=\@yli
1004 \advance\yl@shiftii\yl@xdiff
1005 \advance\yl@shifti\yl@ydiff
1006 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1007 \reset@yl@xydiff%1999/1/6 by S. Fujita
1008 \else
1009 \begin{picture}(450,480)(-50,-180)
1010 \iforigpt \put(-50,-180){\circle*{50}}%
1011  \put(0,0){\circle{50}}%
1012 \typeout{command `trimethylene' origin: %
1013  (0,0) ---> (50,180)}\fi%

1014 \fi

1015 \reset@double%
1016 \@tfor\member:=#1\do{%
1017 \if\member a\relax
1018 \@adoublebondtrue
1019 \else\if\member b\relax
1020 \@bdoublebondtrue
1021 \else\if\member A\relax
1022 \@Adoublebondtrue
1023 \else\if\member B\relax
1024 \@Bdoublebondtrue
1025 \else
1026 \expandafter\twoCH@@R\member//%
1027  \set@fusion@trimeth
1028 \fi\fi\fi\fi}%

1029 \@wrongbdWatrue
1030 \@wrongbdWdfalse
1031 \put(0,0){\@@trimethylene{#2}{#3}{0}{0}}%
1032 \end{picture}}% end of \trimethylene \@trimethylene

The inner command \set@fusion@trimeth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@trimeth
1033 \def\set@fusion@trimeth{%
1034 % %%%%%%%%%%%%%%%%%%%%%
1035 % % inner bond fusion %
1036 % %%%%%%%%%%%%%%%%%%%%%
1037 \if\@@tmpa a\relax%
1038  \putlratom{0}{0}{\@@tmpb}%     % bond fused
1039  \FuseWarning{-171}{-103}%
1040  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1041  \else\if\@@tmpa A\relax%
1042  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1043  \FuseWarning{171}{103}%
1044  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1045  \else\if\@@tmpa b\relax%
1046  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1047  \FuseWarning{-171}{103}%
1048  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1049  \else\if\@@tmpa B\relax%
1050  \putlratom{342}{0}{\@@tmpb}%    % bond fused
1051  \FuseWarning{171}{-103}%
1052  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1053 \fi\fi\fi\fi
1054 }% end of the macro \set@fusion@trimeth

7.2 Inverse direction

A trimethylene (or propane) and its hetera analogs can be typeset by the command \trimethylenei, which is mainly based on two inner commands:

  \yltrimethyleneiposition for adjusting a substitution site and \@@trimethylenei

for placing hetero atoms, double bonds, and substituents.

\@@trimethylenei   \@@trimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
      <TERMswitch>
        0:  all positions
        1:  positions bbb and ccc
        2:  positions aaa and bbb
      aaa      ccc
       1       3

       a `    / b
          `  /
          2
         bbb
      <Adjust>
        a positive or negative integer to adjust locant numbers
1055 \def\@@trimethylenei#1#2#3#4{%
1056 \leavevmode
1057 \iniatom\iniflag%initialize
1058 \test@vrtx@trimethy{#1}{#4}%
1059 %\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
1060 \begin{picture}(450,480)(0,0)
1061 % %%%%%%%%%%%%%%%%%%
1062 % % outer skeleton %
1063 % %%%%%%%%%%%%%%%%%%
1064 \put(171,0){\SKbondAi}% bond between 1 and 2
1065 \put(171,0){\SKbondBi}% bond between 2 and 3
1066 % %%%%%%%%%%%%%%%%%%%%%
1067 % % inner double bond %
1068 % %%%%%%%%%%%%%%%%%%%%%
1069 \if@adoublebond\relax\put(171,0){\bondAi}\fi
1070 \if@bdoublebond\relax\put(171,0){\bondBi}\fi
1071 \if@Adoublebond\relax\put(171,0){\bondAAi}\fi
1072 \if@Bdoublebond\relax\put(171,0){\bondBBi}\fi
1073 % %%%%%%%%%%%%%%%%%%%%%%%%
1074 % % setting hetero atoms %
1075 % %%%%%%%%%%%%%%%%%%%%%%%%
1076 \test@termcnt=#3\relax
1077 %\set@hetatom@methyli{#1}{0}{0}{4}{0}%
1078 \set@hetatom@methyli{#1}{#4}{0}{4}{0}%
1079 % %%%%%%%%%%%%%%%%%%%%%%%%
1080 % % setting substituents %
1081 % %%%%%%%%%%%%%%%%%%%%%%%%
1082 \@forsemicol\member:=#2\do{%
1083 \ifx\member\empty\else
1084 \expandafter\@m@mb@r\member;\relax%
1085 \expandafter\threech@r\@membera{}{}%
1086 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1087 \ifx\@memberb\@yl\else
1088 \ifcase\@tmpaa%0 omit

1089 \or

1090 \ifcase#3
1091 \put(0,-303){\@methsubstaL}%
1092 \or\relax

1093 \or

1094 \put(0,-303){\@methsubstaL}%

1095 \fi 1096 \or

1097 {\if@bclip \@cliptrue \else \@clipfalse\fi
1098 \put(171,0){\@methsubstd}}%

1099 \or

1100 \ifcase#3
1101 {\if@cclip \@acliptrue\else \@aclipfalse\fi
1102 \put(342,-303){\@methsubsta}}%

1103 \or

1104 {\if@cclip \@acliptrue\else \@aclipfalse\fi
1105 \put(342,-303){\@methsubsta}}%
1106 \or\relax

1107 \fi

1108 \fi%end of ifcase
1109 \fi\fi

1110 }%

1111 \end{picture}}% end of \@@trimethylenei

The \yltrimethyleneiposition is used to adjust substitution sites.

\yltrimethyleneiposition   \yltrimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
      <TERMswitch>
        0:  all positions
        1:  positions bbb and ccc
        2:  positions aaa and bbb
      aaa      ccc
       1       3
       a `    / b
          `  /
          2
         bbb
      <Adjust>
        a positive or negative integer to adjust locant numbers

1112 %

1113 \def\yltrimethyleneiposition#1#2#3#4{%
1114 \@forsemicol\member:=#1\do{%
1115 \ifx\member\empty\else
1116 \expandafter\@m@mb@r\member;\relax%
1117 \expandafter\twoch@r\@membera{}%
1118 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1119 \ifcase\@tmpaa%
1120 \or \def\aaa{\@memberb}%
1121 \or \def\bbb{\@memberb}%
1122 \or \def\ccc{\@memberb}%
1123 \fi}%
1124 \@@ylswfalse%%%\@reset@ylsw
1125 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%

1126 \expandafter\threech@r\@membera{}{}%
1127 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1128 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1129 \if@@ylsw
1130 \ifcase\@tmpaa%0 omit
1131 \or%%%%%%position 1
1132 \ifcase#3
1133 \ifx\aaa\empty
1134 %%    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1135  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1136 \else
1137  \if@linterchainsw%interchain position
1138 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1139  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1140  \else% terminal position
1141 %%     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1142  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1143 \fi 1144 \fi

1145 \or\relax

1146 \or

1147 \ifx\aaa\empty
1148 %%    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1149  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1150 \else
1151  \if@linterchainsw%interchain position
1152  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1153 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1154  \else% terminal position
1155 %%     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1156  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1157 \fi 1158 \fi 1159 \fi

1160 \or%%%%%%%%position 2
1161 \ifx\bbb\empty
1162 %%    \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1163  \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
1164 \else
1165 %%    \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1166  \gdef\@ylii{-171}\gdef\@yli{50}\global\@ylswtrue% subst. on 2

1167 \fi

1168 \or%%%%%%%%position 3
1169 \ifcase#3
1170 \ifx\ccc\empty
1171 %%    \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1172  \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
1173 \else
1174  \if@rinterchainsw%interchain position
1175 %%     \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3

1176  \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
1177  \else
1178 %%     \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
1179  \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3

1180 \fi 1181 \fi 1182 \or

1183 \ifx\ccc\empty
1184 %    \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1185  \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
1186 \else
1187  \if@rinterchainsw%interchain position
1188 %     \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1189  \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
1190  \else
1191 %     \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
1192  \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3

1193 \fi 1194 \fi

1195 \or\relax

1196 \fi

1197 \fi%end of ifcase
1198 \fi\fi}}% end of \yltrimethyleneiposition

The \set@hetatom@methyli is used to set a hetero atom at each vertex in the

  command \@@trimethylenei.
\set@hetatom@methyli
1199 \def\set@hetatom@methyli#1#2#3#4#5{%
1200 \@forsemicol\member:=#1\do{%
1201 \ifx\member\empty\else
1202 \expandafter\@m@mb@r\member;\relax%
1203 \expandafter\twoch@r\@membera{}%
1204 \ifnum#5 < 0\relax%
1205 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
1206 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
1207 \ifnum\@tmpaa >#3\relax%
1208 \ifnum\@tmpaa <#4\relax%
1209 \ifcase\@tmpaa%
1210 \or%position 1 <-- \set@hetatom@sixv position 5
1211 \ifnum\test@termcnt=1\else%not terminal point (left)
1212 \if\@tmpb h\relax
1213  \@acliptrue%
1214  \putlatom{0}{70}{\@memberb}%  % right type
1215 \else\if\@tmpb s\relax
1216  \@aclipfalse%
1217  \putlatom{0}{103}{\@memberb}%  % right type
1218 \else\if\@tmpb a\relax%omit fused position
1219 \else
1220  \@acliptrue%

1221  \putlatom{36}{65}{\@memberb}%  % left type
1222 \fi\fi\fi

1223 \fi

1224 \or%position 2 <-- \set@hetatom@sixv position 4
1225 \if\@tmpb h\relax
1226  \@bcliptrue%
1227  \putratom{171}{50}{\@memberb}%  % right type
1228 \else\if\@tmpb s\relax
1229  \@bclipfalse%
1230  \putratom{171}{0}{\@memberb}%  % right type
1231 \else\if\@tmpb a\relax%omit fused position
1232 \else
1233  \@bcliptrue%
1234 %     \putratom{140}{-10}{\@memberb}%  % right type
1235  \putratom{140}{-23}{\@memberb}%  % right type
1236 \fi\fi\fi
1237 \or%position 3 <-- \set@hetatom@sixv position 3
1238 \ifnum\test@termcnt=2\else%not terminal point (right)
1239 \if\@tmpb h\relax
1240  \@ccliptrue%
1241  \putratom{342}{70}{\@memberb}%  % right type
1242 \else\if\@tmpb s\relax
1243  \@cclipfalse%
1244  \putratom{342}{103}{\@memberb}%  % right type
1245 \else\if\@tmpb a\relax%omit fused position
1246 \else
1247  \@ccliptrue%
1248  \putratom{306}{65}{\@memberb}%   % right type
1249 \fi\fi\fi

1250 \fi

1251 \fi% end of ifcase
1252 \fi\fi\fi}}% end of the macro \set@hetatom@methyli
    The macro \trimethylenei has two arguments ATOMLIST and SUBSLIST as

well as an optional argument BONDLIST.

\trimethylenei \@trimethylenei      aaa      ccc
       1       3
       a `    / b (or uppercase letters)
          `  /
          2
         bbb

   \trimethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character a, A, b, or B each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a upper-side of an outer skeletal bond, while a uppercase letter typesets a double bond at a lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  1,2-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 3 atoms)
       for n = 1 to 3
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

     SUBSLIST: list of substituents
       for n = 1 to 3
           nD         :  exocyclic double bond at n-atom
           n or nS    :  exocyclic single bond at n-atom
           nA         :  alpha single bond at n-atom
           nB         :  beta single bond at n-atom
           nSA        :  alpha single bond at n-atom (boldface)
           nSB        :  beta single bond at n-atom (dotted line)
           nSa        :  alpha (not specified) single bond at n-atom
           nSb        :  beta (not specified) single bond at n-atom
           nW         :  terminal single bond (n=1 or 3)

Several examples are shown as follows.

         e.g.
          \trimethylenei{1==N}{1==Cl;2==F}
          \trimethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \trimethylene uses a picture environment and consists of the following unit processes:

1. adjusting substitution site by \yltrimethyleneiposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@trimethylenei.

1253 \def\trimethylenei{%
1254 \@ifnextchar[{\@trimethylenei[@}{\@trimethylenei[]}}
1255 \def\@trimethylenei[#1]#2#3{%
1256 \iniflag\iniatom%
1257 \@reset@ylsw%
1258 \reset@interchainsw%
1259 \yltrimethyleneiposition{#2}{#3}{0}{0}%
1260 \if@ylsw
1261 \yl@shiftii=\@ylii
1262 \yl@shifti=\@yli
1263 \advance\yl@shiftii\yl@xdiff
1264 \advance\yl@shifti\yl@ydiff
1265 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1266 \reset@yl@xydiff%1999/1/6 by S. Fujita
1267 \else
1268 \begin{picture}(450,480)(-50,-180)
1269 \iforigpt \put(-50,-180){\circle*{50}}%
1270  \put(0,0){\circle{50}}%
1271 \typeout{command `trimethylene' origin: %
1272  (0,0) ---> (50,180)}\fi%

1273 \fi

1274 \reset@double%
1275 %\@adoublebondfalse
1276 %\@bdoublebondfalse
1277 %\@Adoublebondfalse
1278 %\@Bdoublebondfalse
1279 \@tfor\member:=#1\do{%
1280 \if\member a\relax
1281 \@adoublebondtrue
1282 \else\if\member b\relax
1283 \@bdoublebondtrue
1284 \else\if\member A\relax
1285 \@Adoublebondtrue
1286 \else\if\member B\relax
1287 \@Bdoublebondtrue
1288 \else
1289 \expandafter\twoCH@@R\member//%

1290  \set@fusion@trimethi
1291 \fi\fi\fi\fi}%
1292 \@wrongbdWafalse
1293 \@wrongbdWdtrue
1294 \put(0,0){\@@trimethylenei{#2}{#3}{0}{0}}%
1295 \end{picture}}% end of \trimethylenei

The inner command \set@fusion@trimethi is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@trimethi
1296 \def\set@fusion@trimethi{%
1297 % %%%%%%%%%%%%%%%%%%%%%
1298 % % inner bond fusion %
1299 % %%%%%%%%%%%%%%%%%%%%%
1300 \if\@@tmpa a\relax%
1301  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1302  \FuseWarning{-171}{103}%
1303  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1304  \else\if\@@tmpa A\relax%
1305  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1306  \FuseWarning{171}{-103}%
1307  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1308  \else\if\@@tmpa b\relax%
1309  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1310  \FuseWarning{-171}{-103}%
1311  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1312  \else\if\@@tmpa B\relax%
1313  \putlratom{342}{103}{\@@tmpb}%    % bond fused
1314  \FuseWarning{171}{103}%
1315  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1316 \fi\fi\fi\fi
1317 }% end of the macro \set@fusion@trimethi

8 Dimethylene

8.1 Normal direction

A dimethylene (or ethane) and its hetera analogs can be typeset by the command \dimethylene, which is mainly based on two inner commands:

  \yldimethyleneposition for adjusting a substitution site and \@@dimethylene

for placing hetero atoms, double bonds, and substituents.

\@@dimethylene   \@@dimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
      <TERMswitch>
        0:  all positions
        1:  position bbb

        2:  position aaa
         bbb
          2
       a /
       1
      aaa
      <Adjust>
        a positive or negative integer to adjust locant numbers
1318 \def\@@dimethylene#1#2#3#4{%
1319 \leavevmode
1320 \iniatom\iniflag%initialize
1321 \test@vrtx@dimethy{#1}{#4}%
1322 %\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
1323 \begin{picture}(250,480)(0,0)
1324 % %%%%%%%%%%%%%%%%%%
1325 % % outer skeleton %
1326 % %%%%%%%%%%%%%%%%%%
1327 \put(171,-303){\SKbondA}% bond between 1 and 2
1328 % %%%%%%%%%%%%%%%%%%%%%
1329 % % inner double bond %
1330 % %%%%%%%%%%%%%%%%%%%%%
1331 \if@adoublebond
1332 \put(171,-303){\bondA}%upper side double bond
1333 \else\if@Adoublebond
1334 \put(171,-303){\bondAA}%lower side double bond
1335 \fi\fi%
1336 % %%%%%%%%%%%%%%%%%%%%%%%%
1337 % % setting hetero atoms %
1338 % %%%%%%%%%%%%%%%%%%%%%%%%
1339 \test@termcnt=#3\relax
1340 %\set@hetatom@methyl{#1}{0}{0}{3}{0}%
1341 \set@hetatom@methyl{#1}{#4}{0}{3}{0}%
1342 % %%%%%%%%%%%%%%%%%%%%%%%%
1343 % % setting substituents %
1344 % %%%%%%%%%%%%%%%%%%%%%%%%
1345 \@forsemicol\member:=#2\do{%
1346 \ifx\member\empty\else
1347 \expandafter\@m@mb@r\member;\relax%
1348 \expandafter\threech@r\@membera{}{}%
1349 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1350 \ifx\@memberb\@yl\else
1351 \ifcase\@tmpaa%0 omit

1352 \or

1353 \ifcase#3
1354 {\if@aclip \@cliptrue \else \@clipfalse\fi
1355 \put(0,0){\@methsubstdL}}%

1356 \or\relax

1357 \or

1358 {\if@aclip \@cliptrue \else \@clipfalse\fi
1359 \put(0,0){\@methsubstdL}}%

1360 \fi 1361 \or

1362 \ifcase#3
1363 {\if@bclip \@acliptrue \else \@aclipfalse\fi
1364 \put(171,-303){\@methsubsta}}

1365 \or

1366 {\if@bclip \@acliptrue \else \@aclipfalse\fi
1367 \put(171,-303){\@methsubsta}}
1368 \or\relax

1369 \fi

1370 \fi%end of ifcase
1371 \fi\fi%

1372 }%

1373 \end{picture}}% end of \@@dimethylene
\test@vrtx@dimethy
1374 \def\test@vrtx@dimethy#1#2{%
1375 \@forsemicol\member:=#1\do{%
1376 \ifx\member\empty\else
1377 \expandafter\@m@mb@r\member;\relax%
1378 \expandafter\twoch@r\@membera{}%
1379 \@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
1380 \ifcase\@tmpaa%
1381 \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
1382  \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
1383 \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
1384  \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
1385 \fi\fi}}

The \yldimethyleneposition is used to adjust substitution sites.

\yldimethyleneposition   \yldimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
      <TERMswitch>
        0:  all positions
        1:  position bbb
        2:  position aaa
         bbb
          2
       a /
       1
      aaa
      <Adjust>
        a positive or negative integer to adjust locant numbers

1387 \def\yldimethyleneposition#1#2#3#4{%
1388 \@forsemicol\member:=#1\do{%
1389 \ifx\member\empty\else
1390 \expandafter\@m@mb@r\member;\relax%
1391 \expandafter\twoch@r\@membera{}%
1392 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1393 \ifcase\@tmpaa%
1394 \or \def\aaa{\@memberb}%
1395 \or \def\bbb{\@memberb}%
1396 \fi\fi}%
1397 \@@ylswfalse%%%\@reset@ylsw
1398 \@forsemicol\member:=#2\do{%
1399 \ifx\member\empty\else
1400 \expandafter\@m@mb@r\member;\relax%
1401 \expandafter\threech@r\@membera{}{}%
1402 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1403 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1404 \if@@ylsw
1405 \ifcase\@tmpaa%0 omit

1406 \or

1407 \ifcase#3
1408 \ifx\aaa\empty
1409 %    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1410  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1411 \else
1412  \if@linterchainsw%interchain position
1413  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1414  \else%terminal position
1415  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1

1416 \fi 1417 \fi

1418 \or\relax

1419 \or

1420 \ifx\aaa\empty
1421  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1422 \else
1423  \if@linterchainsw%interchain position
1424  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1425  \else%terminal position
1426  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1

1427 \fi 1428 \fi 1429 \fi 1430 \or

1431 \ifcase#3
1432 \ifx\bbb\empty
1433  \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2

1434 \else
1435  \if@rinterchainsw%interchain position
1436  \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1437  \else%terminal position
1438  \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2

1439 \fi 1440 \fi 1441 \or

1442 \ifx\bbb\empty
1443  \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1444 \else
1445  \if@rinterchainsw%interchain position
1446  \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1447  \else%terminal position
1448  \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2

1449 \fi 1450 \fi

1451 \or \relax

1452 \fi

1453 \fi%end of ifcase
1454 \fi\fi}}% end of \yldimethyleneposition

The macro \dimethylene has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

\dimethylene \@dimethylene         bbb
          2
       a /      (or uppercase letters)
        /
       1
      aaa

   \dimethylene[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character a or A, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a lower-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a upper-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc. )

       BONDLIST =
             [] or none :  no double bond
             a          :  1,2-double bond
             A          :  1,2-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 2 atoms)
       for n = 1 and 2
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

     SUBSLIST: list of substituents
       for n = 1 and 2
           nD         :  exocyclic double bond at n-atom
           n or nS    :  exocyclic single bond at n-atom
           nA         :  alpha single bond at n-atom
           nB         :  beta single bond at n-atom
           nSA        :  alpha single bond at n-atom (boldface)
           nSB        :  beta single bond at n-atom (dotted line)
           nSa        :  alpha (not specified) single bond at n-atom
           nSb        :  beta (not specified) single bond at n-atom
           nW         :  terminal single bond (n=1 or 2)

Several examples are shown as follows.

       e.g.
        \dimethylene{1==N}{1==Cl;2==F}
        \dimethylene[a]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \dimethylene uses a picture environment and consists of the following unit processes:

1. adjusting substitution site by \yldimethyleneposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@dimethylene.

1455 \def\dimethylene{%
1456 \@ifnextchar[{\@dimethylene[@}{\@dimethylene[]}}
1457 \def\@dimethylene[#1]#2#3{%
1458 \iniflag\iniatom%
1459 \@reset@ylsw%
1460 \reset@interchainsw%
1461 \yldimethyleneposition{#2}{#3}{0}{0}%
1462 \if@ylsw
1463 \yl@shiftii=\@ylii
1464 \yl@shifti=\@yli
1465 \advance\yl@shiftii\yl@xdiff
1466 \advance\yl@shifti\yl@ydiff
1467 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1468 \reset@yl@xydiff%1999/1/6 by S. Fujita
1469 \else
1470 \begin{picture}(250,480)(-50,-180)
1471 \iforigpt \put(-50,-180){\circle*{50}}%
1472  \put(0,0){\circle{50}}%
1473 \typeout{command `dimethylene' origin: %
1474  (0,0) ---> (50,180)}\fi%

1475 \fi

1476 \reset@double%
1477 \@tfor\member:=#1\do{%
1478 \if\member a\relax
1479 \@adoublebondtrue
1480 \else\if\member A\relax
1481 \@Adoublebondtrue
1482 \else
1483 \expandafter\twoCH@@R\member//%
1484  \set@fusion@dimeth
1485 \fi\fi}%
1486 \@wrongbdWafalse
1487 \@wrongbdWdfalse
1488 \put(0,0){\@@dimethylene{#2}{#3}{0}{0}}%
1489 \end{picture}}% end of \dimethylene

The inner command \set@fusion@dimeth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ringfusions are based on the command \FuseWarning.

\set@fusion@dimeth
1490 \def\set@fusion@dimeth{%
1491 % %%%%%%%%%%%%%%%%%%%%%
1492 % % inner bond fusion %
1493 % %%%%%%%%%%%%%%%%%%%%%
1494 \if\@@tmpa a\relax%
1495  \putlratom{0}{0}{\@@tmpb}%     % bond fused
1496  \FuseWarning{-171}{-103}%
1497  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1498 \else\if\@@tmpa A\relax%

1499  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1500  \FuseWarning{171}{103}%
1501  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1502 \fi\fi
1503 }% end of the macro \set@fusion@dimeth

8.2 Inverse direction

A dimethylene (or ethane) and its hetera analogs (of inverse direction) can be typeset by the command \dimethylenei, which is mainly based on two inner commands: \yldimethyleneiposition for adjusting a substitution site and \@@dimethylenei for placing hetero atoms, double bonds, and substituents.

\@@dimethylenei   \@@dimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
      <TERMswitch>
        0:  all positions
        1:  position bbb
        2:  positions aaa
      aaa
       1
       a `
          `
            2
           bbb
      <Adjust>
        a positive or negative integer to adjust locant numbers
1504 \def\@@dimethylenei#1#2#3#4{%
1505 \leavevmode
1506 \iniatom\iniflag%initialize
1507 \test@vrtx@dimethy{#1}{#4}%
1508 %\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
1509 \begin{picture}(250,480)(0,0)
1510 % %%%%%%%%%%%%%%%%%%
1511 % % outer skeleton %
1512 % %%%%%%%%%%%%%%%%%%
1513 \put(171,0){\SKbondAi}% bond between 1 and 2
1514 % %%%%%%%%%%%%%%%%%%%%%
1515 % % inner double bond %
1516 % %%%%%%%%%%%%%%%%%%%%%
1517 \if@adoublebond
1518 \put(171,0){\bondAi}%upper side double bond
1519 \else\if@Adoublebond
1520 \put(171,0){\bondAAi}%lower side double bond
1521 \fi\fi%
1522 % %%%%%%%%%%%%%%%%%%%%%%%%

1523 % % setting hetero atoms %
1524 % %%%%%%%%%%%%%%%%%%%%%%%%
1525 \test@termcnt=#3\relax
1526 %\set@hetatom@methyli{#1}{0}{0}{3}{0}%
1527 \set@hetatom@methyli{#1}{#4}{0}{3}{0}%
1528 % %%%%%%%%%%%%%%%%%%%%%%%%
1529 % % setting substituents %
1530 % %%%%%%%%%%%%%%%%%%%%%%%%
1531 \@forsemicol\member:=#2\do{%
1532 \ifx\member\empty\else
1533 \expandafter\@m@mb@r\member;\relax%
1534 \expandafter\threech@r\@membera{}{}%
1535 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1536 \ifx\@memberb\@yl\else
1537 \ifcase\@tmpaa%0 omit

1538 \or

1539 \ifcase#3
1540 \put(0,-303){\@methsubstaL}%
1541 \or\relax

1542 \or

1543 \put(0,-303){\@methsubstaL}%

1544 \fi 1545 \or

1546 \ifcase#3
1547 {\if@bclip \@cliptrue \else \@clipfalse\fi
1548 \put(171,0){\@methsubstd}}

1549 \or

1550 {\if@bclip \@cliptrue \else \@clipfalse\fi
1551 \put(171,0){\@methsubstd}}
1552 \or\relax

1553 \fi

1554 \fi%end of ifcase
1555 \fi\fi%

1556 }%

1557 \end{picture}}% end of \@@dimethylenei

The \yldimethyleneiposition is used to adjust substitution sites.

\yldimethyleneiposition   \yldimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
      <TERMswitch>
        0:  all positions
        1:  position bbb
        2:  position aaa
      aaa
       1
       a `
          `
            2

           bbb
      <Adjust>
        a positive or negative integer to adjust locant numbers

1558 %

1559 \def\yldimethyleneiposition#1#2#3#4{%
1560 \@forsemicol\member:=#1\do{%
1561 \ifx\member\empty\else
1562 \expandafter\@m@mb@r\member;\relax%
1563 \expandafter\twoch@r\@membera{}%
1564 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1565 \ifcase\@tmpaa%
1566 \or \def\aaa{\@memberb}%
1567 \or \def\bbb{\@memberb}%
1568 \fi}%
1569 \@@ylswfalse%%%\@reset@ylsw
1570 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
1571 \expandafter\threech@r\@membera{}{}%
1572 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1573 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1574 \if@@ylsw
1575 \ifcase\@tmpaa%0 omit
1576 \or%%%%%%%%position 1
1577 \ifcase#3
1578 \ifx\aaa\empty
1579 %    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1580  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1581 \else
1582  \if@linterchainsw%interchain position
1583 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1584  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1585  \else%terminal position
1586 %     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1587  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1588 \fi 1589 \fi

1590 \or\relax

1591 \or

1592 \ifx\aaa\empty
1593 %    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1594  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1595 \else
1596  \if@linterchainsw%interchain position
1597 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1598  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1599  \else%terminal position
1600 %     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1601  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1602 \fi 1603 \fi 1604 \fi

1605 \or%%%%%%%%position 2
1606 \ifcase#3
1607 \ifx\bbb\empty
1608 %    \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1609  \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
1610 \else
1611  \if@rinterchainsw%interchain position
1612 %     \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1613  \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
1614  \else%terminal position
1615 %    \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
1616  \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2

1617 \fi 1618 \fi 1619 \or

1620 \ifx\bbb\empty
1621 %    \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1622  \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
1623 \else
1624  \if@rinterchainsw%interchain position
1625 %     \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1626  \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
1627  \else%terminal position
1628 %     \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
1629  \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2

1630 \fi 1631 \fi

1632 \or \relax

1633 \fi

1634 \fi%end of ifcase
1635 \fi\fi}}% end of \yldimethyleneiposition

The macro \dimethylenei has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

\dimethylenei \@dimethylenei      aaa
       1
       a `   (or uppercase letter)
          `
            2
           bbb

   \dimethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character a or A, each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc. )

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 2 atoms)
       for n = 1 and 2
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

     SUBSLIST: list of substituents
       for n = 1 and 2
           nD         :  exocyclic double bond at n-atom
           n or nS    :  exocyclic single bond at n-atom
           nA         :  alpha single bond at n-atom
           nB         :  beta single bond at n-atom
           nSA        :  alpha single bond at n-atom (boldface)
           nSB        :  beta single bond at n-atom (dotted line)
           nSa        :  alpha (not specified) single bond at n-atom
           nSb        :  beta (not specified) single bond at n-atom
           nW         :  terminal single bond (n=1 or 2)

Several examples are shown as follows.

         e.g.
          \dimethylenei{1==N}{1==Cl;2==F}
          \dimethylenei[a]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \dimethylenei uses a picture environment and consists of the following unit processes:

1. adjusting substitution site by \yldimethyleneposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@dimethylene.

1636 \def\dimethylenei{%
1637 \@ifnextchar[{\@dimethylenei[@}{\@dimethylenei[]}}
1638 \def\@dimethylenei[#1]#2#3{%
1639 \iniflag\iniatom%
1640 \@reset@ylsw%
1641 \reset@interchainsw%
1642 \yldimethyleneiposition{#2}{#3}{0}{0}%
1643 \if@ylsw
1644 \yl@shiftii=\@ylii
1645 \yl@shifti=\@yli
1646 \advance\yl@shiftii\yl@xdiff
1647 \advance\yl@shifti\yl@ydiff
1648 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1649 \reset@yl@xydiff%1999/1/6 by S. Fujita
1650 \else
1651 \begin{picture}(250,480)(-50,-180)
1652 \iforigpt \put(-50,-180){\circle*{50}}%
1653  \put(0,0){\circle{50}}%
1654 \typeout{command `dimethylene' origin: %
1655  (0,0) ---> (50,180)}\fi%

1656 \fi

1657 \reset@double%
1658 \@tfor\member:=#1\do{%
1659 \if\member a\relax
1660 \@adoublebondtrue
1661 \else\if\member A\relax
1662 \@Adoublebondtrue
1663 \else
1664 \expandafter\twoCH@@R\member//%
1665  \set@fusion@dimethi
1666 \fi\fi}%
1667 \@wrongbdWafalse
1668 \@wrongbdWdfalse
1669 \put(0,0){\@@dimethylenei{#2}{#3}{0}{0}}%
1670 \end{picture}}% end of \dimethylenei

The inner command \set@fusion@dimethi is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@dimethi
1671 \def\set@fusion@dimethi{%
1672 % %%%%%%%%%%%%%%%%%%%%%
1673 % % inner bond fusion %
1674 % %%%%%%%%%%%%%%%%%%%%%
1675 \if\@@tmpa a\relax%
1676  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1677  \FuseWarning{-171}{103}%
1678  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1679 \else\if\@@tmpa A\relax%
1680  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1681  \FuseWarning{171}{-103}%
1682  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1683 \fi\fi
1684 }% end of the macro \set@fusion@dimethi

9 Tetramethylenes

9.1 Normal direction

The macro \tetramethylene has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

\tetramethylene \@tetramethylene         bbb     ddd
        2       4
     a /  ` b  / c (or uppercase letters)
      /    `  /
     1      3
    aaa    ccc

 \tetramethylene[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to c (or A to C), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a lower-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a upper-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond

a          :  1,2-double bond
A          :  1,2-double bond in an opposite side
b          :  2,3-double bond
B          :  2,3-double bond in an opposite side
c          :  3,4-double bond
C          :  3,4-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 4 atoms)
for n = 1 to 4
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 4
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)
nSa        :  alpha (not specified) single bond at n-atom
nSb        :  beta (not specified) single bond at n-atom
nW         :  terminal single bond (n=1 or 4)

Several examples are shown as follows.

e.g.
\tetramethylene{1==N}{1==Cl;2==F}
\tetramethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \tetramethylene uses a picture environment and is based on \@@trimethylene and \@@dimethylene, each of which is consist of the following unit processes:

    1. adjusting substitution site by \yltrimethyleneposition or \yldimethyleneposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@trimethyleneor \@@dimethylene.

1685 \def\tetramethylene{%
1686 \@ifnextchar[{\@tetramethylene[@}{\@tetramethylene[]}}
1687 \def\@tetramethylene[#1]#2#3{%
1688 \iniflag\iniatom%
1689 \@reset@ylsw%
1690 {\@linterchainswfalse%
1691 \@rinterchainswtrue%
1692 \yltrimethyleneposition{#2}{#3}{0}{0}}%
1693 \if@ylsw \ifx\@@ylii\empty
1694 \def\@@ylii{0}\def\@@yli{0}\fi
1695 \else
1696 {\@rinterchainswfalse%
1697 \@linterchainswtrue%
1698 \yldimethyleneposition{#2}{#3}{1}{-2}}%
1699 \if@ylsw \ifx\@@ylii\empty
1700 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

1701 \fi

1702 \if@ylsw
1703 \yl@shiftii=\@ylii
1704 \yl@shifti=\@yli
1705 \advance\yl@shiftii\@@ylii
1706 \advance\yl@shifti\@@yli
1707 \advance\yl@shiftii\yl@xdiff
1708 \advance\yl@shifti\yl@ydiff
1709 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1710 \reset@yl@xydiff%1999/1/6 by S. Fujita
1711 \else
1712 \begin{picture}(900,480)(-200,-180)
1713 \iforigpt \put(-200,-180){\circle*{50}}%
1714  \put(0,0){\circle{50}}%
1715 \typeout{command `tetramethylene' origin: %
1716  (0,0) ---> (200,180)}\fi%

1717 \fi

1718 {\reset@double%
1719 \@tfor\member:=#1\do{%
1720 \if\member a\relax
1721 \@adoublebondtrue
1722 \else\if\member b\relax
1723 \@bdoublebondtrue
1724 \else\if\member A\relax
1725 \@Adoublebondtrue

1726 \else\if\member B\relax
1727 \@Bdoublebondtrue
1728 \else\if\member c\relax%dummy
1729 \else\if\member C\relax%dummy
1730 \else
1731 \expandafter\twoCH@@R\member//%
1732  \set@fusion@tetrameth
1733 \fi\fi
1734 \fi\fi\fi\fi}%
1735 \@wrongbdWatrue
1736 \@wrongbdWdtrue
1737 \put(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
1738 {\reset@double%
1739 \@tfor\member:=#1\do{%
1740 \if\member c\relax
1741 \@adoublebondtrue
1742 \else\if\member C\relax
1743 \@Adoublebondtrue
1744 \fi\fi}%
1745 \@wrongbdWafalse
1746 \@wrongbdWdtrue
1747 \put(342,0){\@@dimethylene{#2}{#3}{1}{-2}}}%
1748 \end{picture}}% end of \tetramethylene

The inner command \set@fusion@tetrameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@tetrameth
1749 \def\set@fusion@tetrameth{%
1750 % %%%%%%%%%%%%%%%%%%%%%
1751 % % inner bond fusion %
1752 % %%%%%%%%%%%%%%%%%%%%%
1753 \if\@@tmpa a\relax%
1754  \putlratom{0}{0}{\@@tmpb}%     % bond fused
1755  \FuseWarning{-171}{-103}%
1756  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1757  \else\if\@@tmpa A\relax%
1758  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1759  \FuseWarning{171}{103}%
1760  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1761  \else\if\@@tmpa b\relax%
1762  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1763  \FuseWarning{-171}{103}%
1764  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1765  \else\if\@@tmpa B\relax%
1766  \putlratom{342}{0}{\@@tmpb}%    % bond fused
1767  \FuseWarning{171}{-103}%
1768  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1769  \else\if\@@tmpa c\relax%

1770  \putlratom{342}{0}{\@@tmpb}%     % bond fused
1771  \FuseWarning{-171}{-103}%
1772  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
1773  \else\if\@@tmpa C\relax%
1774  \putlratom{513}{103}{\@@tmpb}%       % bond fused
1775  \FuseWarning{171}{103}%
1776  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
1777 \fi\fi
1778 \fi\fi\fi\fi
1779 }% end of the macro \set@fusion@tetrameth

9.2 Inverse direction

The macro \tetramethylenei has two arguments ATOMLIST and SUBSLIST as well

as an optional argument BONDLIST.

\tetramethylenei \@tetramethylenei    aaa      ccc
    1       3
   a `   b /  ` c  (or uppercase letters)
       `  /    `
        2        4
       bbb       ddd

 \tetramethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to c (or A to C), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a lower-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a upper-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side
           c          :  3,4-double bond
           C          :  3,4-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 4 atoms)
for n = 1 to 4
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 4
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)
nSa        :  alpha (not specified) single bond at n-atom
nSb        :  beta (not specified) single bond at n-atom
nW         :  terminal single bond (n=1 or 4)

Several examples are shown as follows.

e.g.
\tetramethylenei{1==N}{1==Cl;2==F}
\tetramethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \tetramethylenei uses a picture environment and is based

on \@@trimethylenei and \@@dimethylenei, each of which is consist of the

following unit processes:

1. adjusting substitution site by \yltrimethylenieposition or \yldimethyleneiposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@trimethylenei or \@@dimethylenei.

1780 \def\tetramethylenei{%
1781 \@ifnextchar[{\@tetramethylenei[@}{\@tetramethylenei[]}}
1782 \def\@tetramethylenei[#1]#2#3{%
1783 \iniflag\iniatom%

1784 \@reset@ylsw%
1785 {\@linterchainswfalse%
1786 \@rinterchainswtrue%
1787 \yltrimethyleneiposition{#2}{#3}{0}{0}}%
1788 \if@ylsw \ifx\@@ylii\empty
1789 \def\@@ylii{0}\def\@@yli{0}\fi
1790 \else
1791 {\@rinterchainswfalse%
1792 \@linterchainswtrue%
1793 \yldimethyleneiposition{#2}{#3}{1}{-2}}%
1794 \if@ylsw \ifx\@@ylii\empty
1795 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

1796 \fi

1797 \if@ylsw
1798 \yl@shiftii=\@ylii
1799 \yl@shifti=\@yli
1800 \advance\yl@shiftii\@@ylii
1801 \advance\yl@shifti\@@yli
1802 \advance\yl@shiftii\yl@xdiff
1803 \advance\yl@shifti\yl@ydiff
1804 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1805 \reset@yl@xydiff%1999/1/6 by S. Fujita
1806 \else
1807 \begin{picture}(900,480)(-200,-180)
1808 \iforigpt \put(-200,-180){\circle*{50}}%
1809  \put(0,0){\circle{50}}%
1810 \typeout{command `tetramethylene' origin: %
1811  (0,0) ---> (200,180)}\fi%

1812 \fi

1813 {\reset@double%
1814 \@tfor\member:=#1\do{%
1815 \if\member a\relax
1816 \@adoublebondtrue
1817 \else\if\member b\relax
1818 \@bdoublebondtrue
1819 \else\if\member A\relax
1820 \@Adoublebondtrue
1821 \else\if\member B\relax
1822 \@Bdoublebondtrue
1823 \else\if\member c\relax%dummy
1824 \else\if\member C\relax%dummy
1825 \else
1826 \expandafter\twoCH@@R\member//%
1827  \set@fusion@tetramethi
1828 \fi\fi
1829 \fi\fi\fi\fi}%
1830 \@wrongbdWatrue
1831 \@wrongbdWdtrue
1832 \put(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}
1833 {\reset@double%

1834 \@tfor\member:=#1\do{%
1835 \if\member c\relax
1836 \@adoublebondtrue
1837 \else\if\member C\relax
1838 \@Adoublebondtrue
1839 \fi\fi}%
1840 \@wrongbdWatrue
1841 \@wrongbdWdfalse
1842 \put(342,0){\@@dimethylenei{#2}{#3}{1}{-2}}}
1843 \end{picture}}%end of \tetramethylenei

The inner command \set@fusion@tetramethi is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@tetramethi
1844 \def\set@fusion@tetramethi{%
1845 % %%%%%%%%%%%%%%%%%%%%%
1846 % % inner bond fusion %
1847 % %%%%%%%%%%%%%%%%%%%%%
1848 \if\@@tmpa a\relax%
1849  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1850  \FuseWarning{-171}{103}%
1851  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1852  \else\if\@@tmpa A\relax%
1853  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1854  \FuseWarning{171}{-103}%
1855  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1856  \else\if\@@tmpa b\relax%
1857  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1858  \FuseWarning{-171}{-103}%
1859  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1860  \else\if\@@tmpa B\relax%
1861  \putlratom{342}{103}{\@@tmpb}%    % bond fused
1862  \FuseWarning{171}{103}%
1863  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1864  \else\if\@@tmpa c\relax%
1865  \putlratom{342}{103}{\@@tmpb}%     % bond fused
1866  \FuseWarning{-171}{103}%
1867  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
1868  \else\if\@@tmpa C\relax%
1869  \putlratom{513}{0}{\@@tmpb}%       % bond fused
1870  \FuseWarning{171}{-103}%
1871  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
1872 \fi\fi
1873 \fi\fi\fi\fi
1874 }% end of the macro \set@fusion@tetramethi

9.3 Cisoid types

The macros \tetramethylenecup and \tetramethylenecap are used to draw

tetramethylenes of cisoid types.

  Cup:
    aaa           ddd
     1           4
      `         /
     a `       / c (or uppercase letters)
        2------3
       bbb  b  ccc
  Cap:
       bbb  b  ccc
        2------3
     a /       ` c (or uppercase letters)
      /         `
     1           4
    aaa           ddd

The macros have two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

 \tetramethylenecup[BONDLIST]{ATOMLIST}{SUBSLIST}
 \tetramethylenecap[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to c (or A to C), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a lower-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a upper-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side
           c          :  3,4-double bond
           C          :  3,4-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 4 atoms)
for n = 1 to 4
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 4
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)
nSa        :  alpha (not specified) single bond at n-atom
nSb        :  beta (not specified) single bond at n-atom
nW         :  terminal single bond (n=1 or 4)

Several examples are shown as follows.

e.g.
\tetramethylenecup{1==N}{1==Cl;2==F}
\tetramethylenecap[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

\tetramethylenecup
\@tetramethylenecup
1875 \def\tetramethylenecup{%
1876 \@ifnextchar[{\@tetramethylenecup[@}{\@tetramethylenecup[]}}
1877 \def\@tetramethylenecup[#1]#2#3{%
1878 \iniflag\iniatom%
1879 \@reset@ylsw%
1880 {\@linterchainswfalse%
1881 \@rinterchainswtrue%

1882 \yldimethyleneiposition{#2}{#3}{0}{0}}%
1883 \if@ylsw \ifx\@@ylii\empty
1884 \def\@@ylii{0}\def\@@yli{0}\fi
1885 \else
1886 {\@rinterchainswfalse%
1887 \@linterchainswtrue%
1888 \yldimethyleneposition{#2}{#3}{0}{-2}}%

1889 \fi

1890 \if@ylsw \ifx\@@ylii\empty
1891 \def\@@ylii{-371}\def\@@yli{0}\fi\fi
1892 \if@ylsw
1893 \yl@shiftii=\@ylii
1894 \yl@shifti=\@yli
1895 \advance\yl@shiftii\@@ylii
1896 \advance\yl@shifti\@@yli
1897 \advance\yl@shiftii\yl@xdiff
1898 \advance\yl@shifti\yl@ydiff
1899 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
1900 \reset@yl@xydiff
1901 \else
1902 \begin{picture}(900,480)(-200,-180)
1903 \iforigpt \put(-200,-180){\circle*{50}}%
1904  \put(0,0){\circle{50}}%
1905 \typeout{command `tetramethylenecup' origin: %
1906  (0,0) ---> (200,180)}\fi%
1907 \fi%
1908 %bond a and atoms 1 and 2
1909 {\reset@double%
1910 \@tfor\member:=#1\do{%
1911 \if\member a\relax
1912 \@adoublebondtrue
1913 \else\if\member A\relax
1914 \@Adoublebondtrue
1915 \else\if\member b\relax%dummy
1916 \else\if\member B\relax%dummy
1917 \else\if\member c\relax%dummy
1918 \else\if\member C\relax%dummy
1919 \else
1920 \expandafter\twoCH@@R\member//%
1921  \set@fusion@tetracup% for all bonds
1922 \fi\fi\fi\fi
1923 \fi\fi}%
1924 \@wrongbdWafalse
1925 \@wrongbdWdtrue
1926 \put(0,0){\@@dimethylenei{#2}{#3}{0}{0}}}%
1927 %bond b
1928 {\@forsemicol\member:=#2\do{%
1929 \ifx\member\empty\else
1930 \expandafter\@m@mb@r\member;\relax%
1931 \expandafter\twoch@r\@membera{}%

1932 \ifcase\@tmpa%
1933 \or \relax%
1934 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
1935  \xdef\fff{@}\xdef\bbb{@}\else
1936  \xdef\fff{@}\xdef\bbb{@}\fi\fi
1937 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
1938  \xdef\eee{@}\xdef\ccc{@}\else
1939  \xdef\eee{@}\xdef\ccc{@}\fi\fi
1940 \fi\fi}%
1941 \put(68,171){\hskbonde}%
1942 \reset@double%
1943 \@tfor\member:=#1\do{%
1944 \if\member b\relax
1945 \@bdoublebondtrue
1946 \put(68,171){\hbonde}%
1947 \else\if\member B\relax
1948 \@bdoublebondtrue
1949 \put(68,-171){\hbondb}%
1950 \fi\fi}}%
1951 %bond c and atoms 3 and 4
1952 {\reset@double%
1953 \@tfor\member:=#1\do{%
1954 \if\member c\relax
1955 \@adoublebondtrue
1956 \else\if\member C\relax
1957 \@Adoublebondtrue
1958 \else\if\member d\relax
1959 \@bdoublebondtrue
1960 \else\if\member D\relax
1961 \@Bdoublebondtrue
1962 \fi\fi\fi\fi}%
1963 \@wrongbdWafalse
1964 \@wrongbdWdLtrue
1965 \put(371,0){\@@dimethylene{#2}{#3}{0}{-2}}}%
1966 \end{picture}}% end of \tetramethylenecup

The inner command \set@fusion@tetracup is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@tetracup
1967 \def\set@fusion@tetracup{%
1968 % %%%%%%%%%%%%%%%%%%%%%
1969 % % inner bond fusion %
1970 % %%%%%%%%%%%%%%%%%%%%%
1971 \if\@@tmpa a\relax%
1972  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1973  \FuseWarning{-171}{103}%
1974  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1975  \else\if\@@tmpa A\relax%

1976  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1977  \FuseWarning{171}{-103}%
1978  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1979  \else\if\@@tmpa b\relax%
1980  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1981  \FuseWarning{-200}{0}%
1982  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1983  \else\if\@@tmpa B\relax%
1984  \putlratom{371}{0}{\@@tmpb}%    % bond fused
1985  \FuseWarning{200}{0}%
1986  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1987  \else\if\@@tmpa c\relax%
1988  \putlratom{371}{0}{\@@tmpb}%     % bond fused
1989  \FuseWarning{-171}{-103}%
1990  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
1991  \else\if\@@tmpa C\relax%
1992  \putlratom{542}{103}{\@@tmpb}%       % bond fused
1993  \FuseWarning{171}{103}%
1994  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
1995 \fi\fi
1996 \fi\fi\fi\fi
1997 }% end of the macro \set@fusion@tetracup
\tetramethylenecap
\@tetramethylenecap
1998 \def\tetramethylenecap{%
1999 \@ifnextchar[{\@tetramethylenecap[@}{\@tetramethylenecap[]}}
2000 \def\@tetramethylenecap[#1]#2#3{%
2001 \iniflag\iniatom%
2002 \@reset@ylsw%
2003 {\@linterchainswfalse%
2004 \@rinterchainswtrue%
2005 \yldimethyleneposition{#2}{#3}{0}{0}}%
2006 \if@ylsw \ifx\@@ylii\empty
2007 \def\@@ylii{0}\def\@@yli{0}\fi
2008 \else
2009 {\@rinterchainswfalse%
2010 \@linterchainswtrue%
2011 \yldimethyleneiposition{#2}{#3}{0}{-2}}%

2012 \fi

2013 \if@ylsw \ifx\@@ylii\empty
2014 \def\@@ylii{-371}\def\@@yli{0}\fi\fi
2015 \if@ylsw
2016 \yl@shiftii=\@ylii
2017 \yl@shifti=\@yli
2018 \advance\yl@shiftii\@@ylii
2019 \advance\yl@shifti\@@yli
2020 \advance\yl@shiftii\yl@xdiff
2021 \advance\yl@shifti\yl@ydiff
2022 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2023 \reset@yl@xydiff%1999/1/6 by S. Fujita

2024 \else
2025 \begin{picture}(900,480)(-200,-180)
2026 \iforigpt \put(-200,-180){\circle*{50}}%
2027  \put(0,0){\circle{50}}%
2028 \typeout{command `tetramethylenecap' origin: %
2029  (0,0) ---> (50,180)}\fi%
2030 \fi%
2031 {\reset@double%
2032 \@tfor\member:=#1\do{%
2033 \if\member a\relax
2034 \@adoublebondtrue
2035 \else\if\member A\relax
2036 \@Adoublebondtrue
2037 \else\if\member b\relax%dummy
2038 \else\if\member B\relax%dummy
2039 \else\if\member c\relax%dummy
2040 \else\if\member C\relax%dummy
2041 \else
2042 \expandafter\twoCH@@R\member//%
2043  \set@fusion@tetracap% for all bonds
2044 \fi\fi\fi\fi
2045 \fi\fi}%
2046 \@wrongbdWatrue
2047 \put(0,0){\@@dimethylene{#2}{#3}{0}{0}}}%
2048 {\@forsemicol\member:=#2\do{%
2049 \ifx\member\empty\else
2050 \expandafter\@m@mb@r\member;\relax%
2051 \expandafter\twoch@r\@membera{}%
2052 \ifcase\@tmpa%
2053 \or \relax%
2054 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
2055  \xdef\fff{@}\xdef\bbb{@}\else
2056  \xdef\fff{@}\xdef\bbb{@}\fi\fi
2057 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
2058  \xdef\eee{@}\xdef\ccc{@}\else
2059  \xdef\eee{@}\xdef\ccc{@}\fi\fi
2060 \fi\fi}%
2061 \put(68,-68){\hskbondb}%
2062 \reset@double%
2063 \@tfor\member:=#1\do{%
2064 \if\member b\relax
2065 \@bdoublebondtrue
2066 \put(68,-68){\hbondb}%
2067 \else\if\member B\relax
2068 \@bdoublebondtrue
2069 \put(68,274){\hbonde}%
2070 \fi\fi}}%
2071 {\reset@double%
2072 \@tfor\member:=#1\do{%
2073 \if\member c\relax

2074 \@adoublebondtrue
2075 \else\if\member C\relax
2076 \@Adoublebondtrue
2077 \else\if\member d\relax
2078 \@bdoublebondtrue
2079 \else\if\member D\relax
2080 \@Bdoublebondtrue
2081 \fi\fi\fi\fi}%
2082 \@wrongbdWaLtrue
2083 \put(371,0){\@@dimethylenei{#2}{#3}{0}{-2}}}%
2084 \end{picture}}% end of \tetramethylenecap

The inner command \set@fusion@tetracap is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@tetracap
2085 \def\set@fusion@tetracap{%
2086 % %%%%%%%%%%%%%%%%%%%%%
2087 % % inner bond fusion %
2088 % %%%%%%%%%%%%%%%%%%%%%
2089 \if\@@tmpa a\relax%
2090  \putlratom{0}{0}{\@@tmpb}%     % bond fused
2091  \FuseWarning{-171}{-103}%
2092  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2093  \else\if\@@tmpa A\relax%
2094  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2095  \FuseWarning{171}{103}%
2096  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2097  \else\if\@@tmpa b\relax%
2098  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2099  \FuseWarning{-200}{0}%
2100  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2101  \else\if\@@tmpa B\relax%
2102  \putlratom{371}{103}{\@@tmpb}%    % bond fused
2103  \FuseWarning{200}{0}%
2104  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2105  \else\if\@@tmpa c\relax%
2106  \putlratom{371}{103}{\@@tmpb}%     % bond fused
2107  \FuseWarning{-171}{103}%
2108  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
2109  \else\if\@@tmpa C\relax%
2110  \putlratom{542}{0}{\@@tmpb}%       % bond fused
2111  \FuseWarning{171}{-103}%
2112  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2113 \fi\fi
2114 \fi\fi\fi\fi
2115 }% end of the macro \set@fusion@tetracap

10 Pentamethylene

10.1 Normal direction

The macro \pentamethylene has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

\pentamethylene \@pentamethylene         bbb     ddd
        2       4
     a /  ` b  / c` d (or uppercase letters)
      /    `  /    `
     1      3        5
    aaa    ccc

 \pentamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to d (or A to D), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at a lower-side of an outer skeletal bond, while an uppercase letter typesets a double bond at a upper-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side
           c          :  3,4-double bond
           C          :  3,4-double bond in an opposite side
           d          :  4,5-double bond
           D          :  4,5-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 5 atoms)
       for n = 1 to 5
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,

                          e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

       SUBSLIST: list of substituents
         for n = 1 to 5
             nD         :  exocyclic double bond at n-atom
             n or nS    :  exocyclic single bond at n-atom
             nA         :  alpha single bond at n-atom
             nB         :  beta single bond at n-atom
             nSA        :  alpha single bond at n-atom (boldface)
             nSB        :  beta single bond at n-atom (dotted line)
             nSa        :  alpha (not specified) single bond at n-atom
             nSb        :  beta (not specified) single bond at n-atom
             nW         :  terminal single bond (n=1 or 5)

Several examples are shown as follows.

         e.g.
          \pentamethylene{1==N}{1==Cl;2==F}
          \pentamethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \pentamethylene uses a picture environment and is based on two \@@trimethylene commands, each of which is consist of the following unit processes:

1. adjusting substitution site by \yltrimethyleneposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@trimethylene.

2116 \def\pentamethylene{%
2117 \@ifnextchar[{\@pentamethylene[@}{\@pentamethylene[]}}
2118 \def\@pentamethylene[#1]#2#3{%
2119 \iniflag\iniatom%
2120 \@reset@ylsw%
2121 {\@linterchainswfalse%
2122 \@rinterchainswtrue%
2123 \yltrimethyleneposition{#2}{#3}{0}{0}}%
2124 \if@ylsw \ifx\@@ylii\empty
2125 \def\@@ylii{0}\def\@@yli{0}\fi

2126 \else
2127 {\@rinterchainswfalse%
2128 \@linterchainswtrue%
2129 \yltrimethyleneposition{#2}{#3}{1}{-2}}%
2130 \if@ylsw \ifx\@@ylii\empty
2131 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

2132 \fi

2133 \if@ylsw
2134 \yl@shiftii=\@ylii
2135 \yl@shifti=\@yli
2136 \advance\yl@shiftii\@@ylii
2137 \advance\yl@shifti\@@yli
2138 \advance\yl@shiftii\yl@xdiff
2139 \advance\yl@shifti\yl@ydiff
2140 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2141 \reset@yl@xydiff%1999/1/6 by S. Fujita
2142 \else
2143 \begin{picture}(1100,480)(-200,-180)
2144 \iforigpt \put(-200,-180){\circle*{50}}%
2145  \put(0,0){\circle{50}}%
2146 \typeout{command `pentamethylene' origin: %
2147  (0,0) ---> (200,180)}\fi%
2148 \fi%
2149 {\reset@double%
2150 \@tfor\member:=#1\do{%
2151 \if\member a\relax
2152 \@adoublebondtrue
2153 \else\if\member b\relax
2154 \@bdoublebondtrue
2155 \else\if\member A\relax
2156 \@Adoublebondtrue
2157 \else\if\member B\relax
2158 \@Bdoublebondtrue
2159 \else\if\member c\relax%dummy
2160 \else\if\member C\relax%dummy
2161 \else\if\member d\relax%dummy
2162 \else\if\member D\relax%dummy
2163 \else
2164 \expandafter\twoCH@@R\member//%
2165  \set@fusion@pentameth% for all bonds
2166 \fi\fi\fi\fi
2167 \fi\fi\fi\fi}%
2168 \@wrongbdWatrue
2169 \@wrongbdWdtrue
2170 \put(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
2171 {\reset@double%
2172 \@tfor\member:=#1\do{%
2173 \if\member c\relax
2174 \@adoublebondtrue
2175 \else\if\member d\relax

2176 \@bdoublebondtrue
2177 \else\if\member C\relax
2178 \@Adoublebondtrue
2179 \else\if\member D\relax
2180 \@Bdoublebondtrue
2181 \fi\fi\fi\fi}%
2182 \@wrongbdWatrue
2183 \@wrongbdWdfalse
2184 \put(342,0){\@@trimethylene{#2}{#3}{1}{-2}}}%
2185 \end{picture}}% end of \pentamethylene

The inner command \set@fusion@pentameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@pentameth
2186 \def\set@fusion@pentameth{%
2187 % %%%%%%%%%%%%%%%%%%%%%
2188 % % inner bond fusion %
2189 % %%%%%%%%%%%%%%%%%%%%%
2190 \if\@@tmpa a\relax%
2191  \putlratom{0}{0}{\@@tmpb}%     % bond fused
2192  \FuseWarning{-171}{-103}%
2193  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2194  \else\if\@@tmpa A\relax%
2195  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2196  \FuseWarning{171}{103}%
2197  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2198  \else\if\@@tmpa b\relax%
2199  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2200  \FuseWarning{-171}{103}%
2201  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2202  \else\if\@@tmpa B\relax%
2203  \putlratom{342}{0}{\@@tmpb}%    % bond fused
2204  \FuseWarning{171}{-103}%
2205  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2206  \else\if\@@tmpa c\relax%
2207  \putlratom{342}{0}{\@@tmpb}%     % bond fused
2208  \FuseWarning{-171}{-103}%
2209  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
2210  \else\if\@@tmpa C\relax%
2211  \putlratom{513}{103}{\@@tmpb}%       % bond fused
2212  \FuseWarning{171}{103}%
2213  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2214  \else\if\@@tmpa d\relax%
2215  \putlratom{513}{103}{\@@tmpb}%     % bond fused
2216  \FuseWarning{-171}{103}%
2217  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
2218  \else\if\@@tmpa D\relax%
2219  \putlratom{684}{0}{\@@tmpb}%       % bond fused

2220  \FuseWarning{171}{-103}%
2221  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
2222 \fi\fi\fi\fi
2223 \fi\fi\fi\fi
2224 }% end of the macro \set@fusion@pentameth

10.2 Inverse direction

The macro \pentamethylenei has two arguments ATOMLIST and SUBSLIST as well

as an optional argument BONDLIST.

\begin{matrix}\pentamethylenei \\ \@pentamethylenei \end{matrix}               (aaa)
  aaa      ccc      eee (ccc)
    1       3        5
   a `   b /  ` c   / d
       `  /    `   /
        2        4
       bbb       ddd (bbb)

 \pentamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to d (or A to D), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at the upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at the lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side
           c          :  3,4-double bond
           C          :  3,4-double bond in an opposite side
           d          :  4,5-double bond
           D          :  4,5-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 5 atoms)
for n = 1 to 5
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 5
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)
nSa        :  alpha (not specified) single bond at n-atom
nSb        :  beta (not specified) single bond at n-atom
nW         :  terminal single bond (n=1 or 5)

Several examples are shown as follows.

e.g.
\pentamethylenei{1==N}{1==Cl;2==F}
\pentamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The definition of \pentamethylenei uses a picture environment and is based on two \@@trimethylenei commands, each of which is consist of the following unit processes:

1. adjusting substitution site by \yltrimethyleneiposition

2. treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents by \@@trimethylenei.

2225 \def\pentamethylenei{%
2226 \@ifnextchar[{\@pentamethylenei[@}{\@pentamethylenei[]}}
2227 \def\@pentamethylenei[#1]#2#3{%
2228 \iniflag\iniatom%
2229 \@reset@ylsw%

2230 {\@linterchainswfalse%
2231 \@rinterchainswtrue%
2232 \yltrimethyleneiposition{#2}{#3}{0}{0}}%
2233 \if@ylsw \ifx\@@ylii\empty
2234 \def\@@ylii{0}\def\@@yli{0}\fi
2235 \else
2236 {\@rinterchainswfalse%
2237 \@linterchainswtrue%
2238 \yltrimethyleneiposition{#2}{#3}{1}{-2}}%
2239 \if@ylsw \ifx\@@ylii\empty
2240 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

2241 \fi

2242 \if@ylsw
2243 \yl@shiftii=\@ylii
2244 \yl@shifti=\@yli
2245 \advance\yl@shiftii\@@ylii
2246 \advance\yl@shifti\@@yli
2247 \advance\yl@shiftii\yl@xdiff
2248 \advance\yl@shifti\yl@ydiff
2249 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2250 \reset@yl@xydiff%1999/1/6 by S. Fujita
2251 \else
2252 \begin{picture}(1100,480)(-200,-180)
2253 \iforigpt \put(-200,-180){\circle*{50}}%
2254  \put(0,0){\circle{50}}%
2255 \typeout{command `pentamethylene' origin: %
2256  (0,0) ---> (200,180)}\fi%
2257 \fi%
2258 {\reset@double%
2259 \@tfor\member:=#1\do{%
2260 \if\member a\relax
2261 \@adoublebondtrue
2262 \else\if\member b\relax
2263 \@bdoublebondtrue
2264 \else\if\member A\relax
2265 \@Adoublebondtrue
2266 \else\if\member B\relax
2267 \@Bdoublebondtrue
2268 \else\if\member c\relax%dummy
2269 \else\if\member C\relax%dummy
2270 \else\if\member d\relax%dummy
2271 \else\if\member D\relax%dummy
2272 \else
2273 \expandafter\twoCH@@R\member//%
2274  \set@fusion@pentamethi% for all bonds
2275 \fi\fi\fi\fi
2276 \fi\fi\fi\fi}%
2277 \@wrongbdWatrue
2278 \@wrongbdWdtrue
2279 \put(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}%

2280 {\reset@double%
2281 \@tfor\member:=#1\do{%
2282 \if\member c\relax
2283 \@adoublebondtrue
2284 \else\if\member d\relax
2285 \@bdoublebondtrue
2286 \else\if\member C\relax
2287 \@Adoublebondtrue
2288 \else\if\member D\relax
2289 \@Bdoublebondtrue
2290 \fi\fi\fi\fi}%
2291 \@wrongbdWafalse
2292 \@wrongbdWdtrue
2293 \put(342,0){\@@trimethylenei{#2}{#3}{1}{-2}}}
2294 \end{picture}}% end of \pentamethylenei

The inner command \set@fusion@pentamethi is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@pentamethi
2295 \def\set@fusion@pentamethi{%
2296 % %%%%%%%%%%%%%%%%%%%%%
2297 % % inner bond fusion %
2298 % %%%%%%%%%%%%%%%%%%%%%
2299 \if\@@tmpa a\relax%
2300  \putlratom{0}{103}{\@@tmpb}%     % bond fused
2301  \FuseWarning{-171}{103}%
2302  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2303  \else\if\@@tmpa A\relax%
2304  \putlratom{171}{0}{\@@tmpb}%       % bond fused
2305  \FuseWarning{171}{-103}%
2306  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2307  \else\if\@@tmpa b\relax%
2308  \putlratom{171}{0}{\@@tmpb}%       % bond fused
2309  \FuseWarning{-171}{-103}%
2310  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2311  \else\if\@@tmpa B\relax%
2312  \putlratom{342}{103}{\@@tmpb}%    % bond fused
2313  \FuseWarning{171}{103}%
2314  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2315  \else\if\@@tmpa c\relax%
2316  \putlratom{342}{103}{\@@tmpb}%     % bond fused
2317  \FuseWarning{-171}{103}%
2318  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
2319  \else\if\@@tmpa C\relax%
2320  \putlratom{513}{0}{\@@tmpb}%       % bond fused
2321  \FuseWarning{171}{103}%
2322  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2323  \else\if\@@tmpa d\relax%

2324  \putlratom{513}{0}{\@@tmpb}%     % bond fused
2325  \FuseWarning{-171}{-103}%
2326  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
2327  \else\if\@@tmpa D\relax%
2328  \putlratom{684}{103}{\@@tmpb}%       % bond fused
2329  \FuseWarning{171}{103}%
2330  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
2331 \fi\fi\fi\fi
2332 \fi\fi\fi\fi
2333 }% end of the macro \set@fusion@pentamethi

11 Switches for Selecting Normal and Inverse Directions

The switch \@normorinvsw is used to select normal or inverse direction in the definition of commands for drawing hexametylenes and higher homologs. The value of this switch is false for normal direction and true for inverse direction.

\if@normorinvsw
2334 \newif\if@normorinvsw \@normorinvswfalse

The macro \set@normaldirection assigns active commands to temporary commands in the definition of a command for drawing hexametylenes or higher homologs of normal direction.

\set@normaldirection
2335 \def\set@normaldirection{%
2336 \@normorinvswfalse
2337 \let\@yltrinormorinv=\yltrimethyleneposition
2338 \let\@yldinormorinv=\yldimethyleneposition
2339 \let\@@trinormorinv=\@@trimethylene
2340 \let\@@dinormorinv=\@@dimethylene}

The macro \set@inversedirection assigns active commands to temporary commands in the definition of a command for drawing hexametylenes or higher homologs of inverse direction.

\set@inversedirection
2341 \def\set@inversedirection{%
2342 \@normorinvswtrue
2343 \let\@yltrinormorinv=\yltrimethyleneiposition
2344 \let\@yldinormorinv=\yldimethyleneiposition
2345 \let\@@trinormorinv=\@@trimethylenei
2346 \let\@@dinormorinv=\@@dimethylenei}

12 Hexamethylenes of normal and inverse direction

Hexamethylene and hetera derivatives are typeset with the commands \hexamethylene and \hexamethylenei. The former macro is to draw hexamethylenes of normal direction, while the latter is to draw ones of inverse directions.

  Normal direction:
              (bbb)     ((bbb))
       bbb     ddd      fff
        2       4        6
     a /  ` b  / c` d   / e
      /    `  /    `   /
     1      3        5
    aaa    ccc      eee
           (aaa)    (ccc)
                    ((aaa))
  Inverse direction:
             (aaa)
  aaa      ccc      eee (ccc) ((aaa))
    1       3        5
   a `   b /  ` c   / d ` e
       `  /    `   /     `
        2        4         6
       bbb       ddd (bbb) fff((bbb))

The macros have two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

 \hexamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
 \hexamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to e (or A to E), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at the upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at the lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side

c          :  3,4-double bond
C          :  3,4-double bond in an opposite side
d          :  4,5-double bond
D          :  4,5-double bond in an opposite side
e          :  5,6-double bond
E          :  5,6-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 6 atoms)
for n = 1 to 6
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 6
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)
nSa        :  alpha (not specified) single bond at n-atom
nSb        :  beta (not specified) single bond at n-atom
nW         :  terminal single bond (n=1 or 6)

Several examples are shown as follows.

e.g.
\hexamethylene{1==N}{1==Cl;2==F}
\hexamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

    The macros \hexamethylene and \hexamethylenei are based on a common

inner macro \@hexamethylene, the definition of which uses a picture environment.

\hexamethylene
2347 \def\hexamethylene{%
2348 \@ifnextchar[{\set@normaldirection\@hexamethylene[@}{%
2349 \set@normaldirection\@hexamethylene[]}}
\hexamethylenei
2350 \def\hexamethylenei{%
2351 \@ifnextchar[{\set@inversedirection\@hexamethylene[@}{%
2352 \set@inversedirection\@hexamethylene[]}}

Inner temporary commands such as \@@trinormorinv and \@@dinormorinv in the common \@hexamethylene macro are replaced by active commands such as \@@trimethylene and \@@dimethylene. They carry out the following unit processes.

    1. Adjusting substitution site: \yltrimethyleneposition or \yldimethyleneposition
      for normal direction; \yltrimethyleneiposition or \yldimethyleneiposition

for inverse direction.

2. Treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents: \@@trimethylene or \@@dimethylene

      for normal direction; \@@trimethylenei or \@@dimethylenei for normal

direction.

\@hexamethylene
2353 \def\@hexamethylene[#1]#2#3{%
2354 \iniflag\iniatom%
2355 \@reset@ylsw%
2356 {\@linterchainswfalse%
2357 \@rinterchainswtrue%
2358 \@yltrinormorinv{#2}{#3}{0}{0}}%
2359 \if@ylsw \ifx\@@ylii\empty
2360 \def\@@ylii{0}\def\@@yli{0}\fi
2361 \else
2362 {\@rinterchainswtrue%
2363 \@linterchainswtrue%
2364 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2365 \fi

2366 \if@ylsw \ifx\@@ylii\empty
2367 \def\@@ylii{-342}\def\@@yli{0}\fi
2368 \else
2369 {\@rinterchainswfalse%
2370 \@linterchainswtrue%
2371 \@yldinormorinv{#2}{#3}{1}{-4}}%

2372 \fi

2373 \if@ylsw \ifx\@@ylii\empty

2374 \def\@@ylii{-684}\def\@@yli{0}\fi\fi
2375 \if@ylsw
2376 \yl@shiftii=\@ylii
2377 \yl@shifti=\@yli
2378 \advance\yl@shiftii\@@ylii
2379 \advance\yl@shifti\@@yli
2380 \advance\yl@shiftii\yl@xdiff
2381 \advance\yl@shifti\yl@ydiff
2382 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2383 \reset@yl@xydiff%1999/1/6 by S. Fujita
2384 \else
2385 \begin{picture}(1100,480)(-200,-180)
2386 \iforigpt \put(-200,-180){\circle*{50}}%
2387  \put(0,0){\circle{50}}%
2388 \typeout{command `hexamethylene' origin: %
2389  (0,0) ---> (200,180)}\fi%
2390 \fi%
2391 {\reset@double%
2392 \@tfor\member:=#1\do{%
2393 \if\member a\relax
2394 \@adoublebondtrue
2395 \else\if\member b\relax
2396 \@bdoublebondtrue
2397 \else\if\member A\relax
2398 \@Adoublebondtrue
2399 \else\if\member B\relax
2400 \@Bdoublebondtrue
2401 \else\if\member c\relax%dummy
2402 \else\if\member C\relax%dummy
2403 \else\if\member d\relax%dummy
2404 \else\if\member D\relax%dummy
2405 \else\if\member e\relax%dummy
2406 \else\if\member E\relax%dummy
2407 \else
2408 \expandafter\twoCH@@R\member//%
2409  \set@fusion@hexameth% for all bonds
2410 \fi\fi\fi\fi\fi\fi
2411 \fi\fi\fi\fi}%
2412 \@wrongbdWatrue
2413 \@wrongbdWdtrue
2414 \put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2415 {\reset@double%
2416 \@tfor\member:=#1\do{%
2417 \if\member c\relax
2418 \@adoublebondtrue
2419 \else\if\member d\relax
2420 \@bdoublebondtrue
2421 \else\if\member C\relax
2422 \@Adoublebondtrue
2423 \else\if\member D\relax

2424 \@Bdoublebondtrue
2425 \fi\fi\fi\fi}%
2426 \@wrongbdWatrue
2427 \@wrongbdWdtrue
2428 \put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2429 {\reset@double%
2430 \@tfor\member:=#1\do{%
2431 \if\member e\relax
2432 \@adoublebondtrue
2433 \else\if\member E\relax
2434 \@Adoublebondtrue
2435 \fi\fi}%
2436 \if@normorinvsw% inverse
2437 \@wrongbdWatrue
2438 \@wrongbdWdfalse
2439 \else% normal
2440 \@wrongbdWafalse
2441 \@wrongbdWdtrue

2442 \fi

2443 \put(684,0){\@@dinormorinv{#2}{#3}{1}{-4}}}%
2444 \end{picture}}% end of \@hexamethylene

The inner command \set@fusion@hexameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@hexameth
2445 \def\set@fusion@hexameth{%
2446 % %%%%%%%%%%%%%%%%%%%%%
2447 % % inner bond fusion %
2448 % %%%%%%%%%%%%%%%%%%%%%
2449 \if@normorinvsw
2450 \if\@@tmpa e\relax%
2451  \putlratom{684}{103}{\@@tmpb}%     % bond fused
2452  \FuseWarning{-171}{103}%
2453  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2454  \else\if\@@tmpa E\relax%
2455  \putlratom{855}{0}{\@@tmpb}%       % bond fused
2456  \FuseWarning{171}{-103}%
2457  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2458  \else
2459  \set@fusion@pentamethi
2460 \fi\fi
2461 \else
2462 \if\@@tmpa e\relax%
2463  \putlratom{684}{0}{\@@tmpb}%     % bond fused
2464  \FuseWarning{-171}{-103}%
2465  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2466  \else\if\@@tmpa E\relax%
2467  \putlratom{855}{103}{\@@tmpb}%       % bond fused

2468  \FuseWarning{171}{103}%
2469  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2470  \else
2471  \set@fusion@pentameth
2472 \fi\fi

2473 \fi

2474 }% end of the macro \set@fusion@hexameth

13 Heptamethylenes of normal and inverse direction

Heptamethylene and hetera derivatives are typeset with the commands \heptamethylene and \heptamethylenei. The former macro is to draw heptamethylenes of normal direction, while the latter is to draw ones of inverse directions.

  Normal direction:
              (bbb)     ((bbb))
       bbb     ddd      fff
        2       4        6
     a /  ` b  / c` d   / e ` f
      /    `  /    `   /     `
     1      3        5        7
    aaa    ccc      eee       gggg
           (aaa)    (ccc)     ((ccc))
                    ((aaa))
  Inverse direction:
             (aaa)       ((aaa)) ((ccc))
  aaa      ccc      eee (ccc)    ggg
    1       3        5           7
   a `   b /  ` c   / d ` e     /f
       `  /    `   /     `    /
        2        4         6
       bbb       ddd (bbb) fff((bbb))
             (aaa)

The macros have two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

 \heptamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
 \heptamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to f (or A to F), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at the upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at the lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

BONDLIST =
[] or none :  no double bond
a          :  1,2-double bond
A          :  1,2-double bond in an opposite side
b          :  2,3-double bond
B          :  2,3-double bond in an opposite side
c          :  3,4-double bond
C          :  3,4-double bond in an opposite side
d          :  4,5-double bond
D          :  4,5-double bond in an opposite side
e          :  5,6-double bond
E          :  5,6-double bond in an opposite side
f          :  6,7-double bond
F          :  6,7-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 7 atoms)
for n = 1 to 7
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 7
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)

      nSa        :  alpha (not specified) single bond at n-atom
      nSb        :  beta (not specified) single bond at n-atom
      nW         :  terminal single bond (n=1 or 7)

Several examples are shown as follows.

  e.g.
   \heptamethylene{1==N}{1==Cl;2==F}
   \heptamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The macros \heptamethylene and \heptamethylenei are based on a common

inner macro \@heptamethylene, the definition of which uses a picture environment.

\heptamethylene
2475 \def\heptamethylene{%
2476 \@ifnextchar[{\set@normaldirection\@heptamethylene[@}{%
2477 \set@normaldirection\@heptamethylene[]}}
\heptamethylenei
2478 \def\heptamethylenei{%
2479 \@ifnextchar[{\set@inversedirection\@heptamethylene[@}{%
2480 \set@inversedirection\@heptamethylene[]}}

Inner temporary commands such as \@@trinormorinv and \@@dinormorinv in the common \@heptamethylene macro are replaced by active commands such as \@@trimethylene and \@@dimethylene. They carry out the following unit processes.

1. Adjusting substitution site: \yltrimethyleneposition or \yldimethyleneposition
for normal direction; \yltrimethyleneiposition or \yldimethyleneiposition

for inverse direction.

2. Treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents: \@@trimethylene or \@@dimethylene

for normal direction; \@@trimethylenei or \@@dimethylenei for normal

direction.

\@heptamethylene
2481 \def\@heptamethylene[#1]#2#3{%
2482 \iniflag\iniatom%
2483 \@reset@ylsw%
2484 {\@linterchainswfalse%
2485 \@rinterchainswtrue%
2486 \@yltrinormorinv{#2}{#3}{0}{0}}%
2487 \if@ylsw \ifx\@@ylii\empty
2488 \def\@@ylii{0}\def\@@yli{0}\fi

2489 \else
2490 {\@rinterchainswtrue%
2491 \@linterchainswtrue%
2492 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2493 \fi

2494 \if@ylsw \ifx\@@ylii\empty
2495 \def\@@ylii{-342}\def\@@yli{0}\fi
2496 \else
2497 {\@rinterchainswfalse%
2498 \@linterchainswtrue%
2499 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2500 \fi

2501 \if@ylsw \ifx\@@ylii\empty
2502 \def\@@ylii{-684}\def\@@yli{0}\fi\fi
2503 \if@ylsw
2504 \yl@shiftii=\@ylii
2505 \yl@shifti=\@yli
2506 \advance\yl@shiftii\@@ylii
2507 \advance\yl@shifti\@@yli
2508 \advance\yl@shiftii\yl@xdiff
2509 \advance\yl@shifti\yl@ydiff
2510 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2511 \reset@yl@xydiff%1999/1/6 by S. Fujita
2512 \else
2513 \begin{picture}(1450,480)(-200,-180)
2514 \iforigpt \put(-200,-180){\circle*{50}}%
2515  \put(0,0){\circle{50}}%
2516 \typeout{command `heptamethylene' origin: %
2517  (0,0) ---> (200,180)}\fi%
2518 \fi%
2519 {\reset@double%
2520 \@tfor\member:=#1\do{%
2521 \if\member a\relax
2522 \@adoublebondtrue
2523 \else\if\member b\relax
2524 \@bdoublebondtrue
2525 \else\if\member A\relax
2526 \@Adoublebondtrue
2527 \else\if\member B\relax
2528 \@Bdoublebondtrue
2529 \else\if\member c\relax%dummy
2530 \else\if\member C\relax%dummy
2531 \else\if\member d\relax%dummy
2532 \else\if\member D\relax%dummy
2533 \else\if\member e\relax%dummy
2534 \else\if\member E\relax%dummy
2535 \else\if\member f\relax%dummy
2536 \else\if\member F\relax%dummy
2537 \else
2538 \expandafter\twoCH@@R\member//%

2539  \set@fusion@heptameth% for all bonds
2540 \fi\fi\fi\fi\fi\fi\fi\fi
2541 \fi\fi\fi\fi}%
2542 \@wrongbdWatrue
2543 \@wrongbdWdtrue
2544 \put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2545 {\reset@double%
2546 \@tfor\member:=#1\do{%
2547 \if\member c\relax
2548 \@adoublebondtrue
2549 \else\if\member d\relax
2550 \@bdoublebondtrue
2551 \else\if\member C\relax
2552 \@Adoublebondtrue
2553 \else\if\member D\relax
2554 \@Bdoublebondtrue
2555 \fi\fi\fi\fi}%
2556 \@wrongbdWatrue
2557 \@wrongbdWdtrue
2558 \put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2559 {\reset@double%
2560 \@tfor\member:=#1\do{%
2561 \if\member e\relax
2562 \@adoublebondtrue
2563 \else\if\member E\relax
2564 \@Adoublebondtrue
2565 \else\if\member f\relax
2566 \@bdoublebondtrue
2567 \else\if\member F\relax
2568 \@Bdoublebondtrue
2569 \fi\fi\fi\fi}%
2570 \if@normorinvsw% inverse
2571 \@wrongbdWafalse
2572 \@wrongbdWdtrue
2573 \else%normal
2574 \@wrongbdWatrue
2575 \@wrongbdWdfalse

2576 \fi

2577 \put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2578 \end{picture}}% end of \@heptamethylene

The inner command \set@fusion@heptameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@heptameth
2579 \def\set@fusion@heptameth{%
2580 % %%%%%%%%%%%%%%%%%%%%%
2581 % % inner bond fusion %
2582 % %%%%%%%%%%%%%%%%%%%%%

2583 \if@normorinvsw
2584 \if\@@tmpa e\relax%
2585  \putlratom{684}{103}{\@@tmpb}%     % bond fused
2586  \FuseWarning{-171}{103}%
2587  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2588  \else\if\@@tmpa E\relax%
2589  \putlratom{855}{0}{\@@tmpb}%       % bond fused
2590  \FuseWarning{171}{-103}%
2591  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2592  \else\if\@@tmpa f\relax%
2593  \putlratom{855}{0}{\@@tmpb}%     % bond fused
2594  \FuseWarning{-171}{-103}%
2595  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2596  \else\if\@@tmpa F\relax%
2597  \putlratom{1027}{103}{\@@tmpb}%       % bond fused
2598  \FuseWarning{171}{103}%
2599  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2600  \else
2601  \set@fusion@pentamethi
2602 \fi\fi\fi\fi
2603 \else
2604 \if\@@tmpa e\relax%
2605  \putlratom{684}{0}{\@@tmpb}%     % bond fused
2606  \FuseWarning{-171}{-103}%
2607  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2608  \else\if\@@tmpa E\relax%
2609  \putlratom{855}{103}{\@@tmpb}%       % bond fused
2610  \FuseWarning{171}{103}%
2611  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2612  \else\if\@@tmpa f\relax%
2613  \putlratom{855}{103}{\@@tmpb}%     % bond fused
2614  \FuseWarning{-171}{103}%
2615  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2616  \else\if\@@tmpa F\relax%
2617  \putlratom{1027}{0}{\@@tmpb}%       % bond fused
2618  \FuseWarning{171}{-103}%
2619  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2620  \else
2621  \set@fusion@pentameth
2622 \fi\fi\fi\fi

2623 \fi

2624 }% end of the macro \set@fusion@heptameth

14 Octamethylenes of normal and inverse directions

Octamethylene and hetera derivatives are typeset with the commands \octamethylene and \octamethylenei. The former macro is to draw octamethylenes of normal direction, while the latter is to draw ones of inverse directions.

Normal direction:
   (bbb)     ((bbb))  (((bbb)))
bbb     ddd      fff      hhh
2       4        6       8
a /  ` b  / c` d   / e ` f /g
/    `  /    `   /     ` /
1      3        5        7
aaa    ccc      eee       gggg
(aaa)    (ccc)     ((ccc))
         ((aaa))   (((aaa)))
Inverse direction:
                      (((aaa)))
  (aaa)       ((aaa)) ((ccc))
aaa      ccc      eee (ccc)    ggg
1       3        5           7
a `   b /  ` c   / d ` e     /f `  g
`  /    `   /     `    /      `
2        4         6          8
bbb       ddd     fff          hhh
      (bbb)   ((bbb))       (((bbb)))

The macros has two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

\octamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
\octamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to g (or A to G), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at the upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at the lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

BONDLIST =
[] or none :  no double bond
a          :  1,2-double bond
A          :  1,2-double bond in an opposite side
b          :  2,3-double bond
B          :  2,3-double bond in an opposite side
c          :  3,4-double bond
C          :  3,4-double bond in an opposite side
d          :  4,5-double bond
D          :  4,5-double bond in an opposite side
e          :  5,6-double bond

E          :  5,6-double bond in an opposite side
f          :  6,7-double bond
F          :  6,7-double bond in an opposite side
g          :  7,8-double bond
G          :  7,8-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

ATOMLIST: list of heteroatoms (max 8 atoms)
for n = 1 to 8
n==?    : Hetero atom, e.g. N, O, etc. at n-position,
             e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
for n = 1 to 8
nD         :  exocyclic double bond at n-atom
n or nS    :  exocyclic single bond at n-atom
nA         :  alpha single bond at n-atom
nB         :  beta single bond at n-atom
nSA        :  alpha single bond at n-atom (boldface)
nSB        :  beta single bond at n-atom (dotted line)
nSa        :  alpha (not specified) single bond at n-atom
nSb        :  beta (not specified) single bond at n-atom
nW         :  terminal single bond (n=1 or 8)

Several examples are shown as follows.

e.g.
\octamethylene{1==N}{1==Cl;2==F}
\octamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

    The macros \octamethylene and \octamethylenei are based on a common

inner macro \@octamethylene, the definition of which uses a picture environment.

\octamethylene
2625 \def\octamethylene{%
2626 \@ifnextchar[{\set@normaldirection\@octamethylene[@}{%
2627 \set@normaldirection\@octamethylene[]}}
\octamethylenei
2628 \def\octamethylenei{%
2629 \@ifnextchar[{\set@inversedirection\@octamethylene[@}{%
2630 \set@inversedirection\@octamethylene[]}}

Inner temporary commands such as \@@trinormorinv and \@@dinormorinv in the common \@octamethylene macro are replaced by active commands such as \@@trimethylene and \@@dimethylene. They carry out the following unit processes.

    1. Adjusting substitution site: \yltrimethyleneposition or \yldimethyleneposition
      for normal direction; \yltrimethyleneiposition or \yldimethyleneiposition

for inverse direction.

2. Treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents: \@@trimethylene or \@@dimethylene

      for normal direction; \@@trimethylenei or \@@dimethylenei for normal

direction.

\@octamethylene
2631 \def\@octamethylene[#1]#2#3{%
2632 \iniflag\iniatom%
2633 \@reset@ylsw%
2634 {\@linterchainswfalse%
2635 \@rinterchainswtrue%
2636 \@yltrinormorinv{#2}{#3}{0}{0}}%
2637 \if@ylsw \ifx\@@ylii\empty
2638 \def\@@ylii{0}\def\@@yli{0}\fi
2639 \else
2640 {\@rinterchainswtrue%
2641 \@linterchainswtrue%
2642 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2643 \fi

2644 \if@ylsw \ifx\@@ylii\empty
2645 \def\@@ylii{-342}\def\@@yli{0}\fi
2646 \else
2647 {\@rinterchainswtrue%
2648 \@linterchainswtrue%
2649 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2650 \fi

2651 \if@ylsw \ifx\@@ylii\empty

2652 \def\@@ylii{-684}\def\@@yli{0}\fi
2653 \else
2654 {\@rinterchainswfalse%
2655 \@linterchainswtrue%
2656 \@yldinormorinv{#2}{#3}{1}{-6}}%

2657 \fi

2658 \if@ylsw \ifx\@@ylii\empty
2659 \def\@@ylii{-1026}\def\@@yli{0}\fi\fi
2660 \if@ylsw
2661 \yl@shiftii=\@ylii
2662 \yl@shifti=\@yli
2663 \advance\yl@shiftii\@@ylii
2664 \advance\yl@shifti\@@yli
2665 \advance\yl@shiftii\yl@xdiff
2666 \advance\yl@shifti\yl@ydiff
2667 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2668 \reset@yl@xydiff%1999/1/6 by S. Fujita
2669 \else
2670 \begin{picture}(1620,480)(-200,-180)
2671 \iforigpt \put(-200,-180){\circle*{50}}%
2672  \put(0,0){\circle{50}}%
2673 \typeout{command `octamethylene' origin: %
2674  (0,0) ---> (200,180)}\fi%
2675 \fi%
2676 {\reset@double%
2677 \@tfor\member:=#1\do{%
2678 \if\member a\relax
2679 \@adoublebondtrue
2680 \else\if\member b\relax
2681 \@bdoublebondtrue
2682 \else\if\member A\relax
2683 \@Adoublebondtrue
2684 \else\if\member B\relax
2685 \@Bdoublebondtrue
2686 \else\if\member c\relax%dummy
2687 \else\if\member C\relax%dummy
2688 \else\if\member d\relax%dummy
2689 \else\if\member D\relax%dummy
2690 \else\if\member e\relax%dummy
2691 \else\if\member E\relax%dummy
2692 \else\if\member f\relax%dummy
2693 \else\if\member F\relax%dummy
2694 \else\if\member g\relax%dummy
2695 \else\if\member G\relax%dummy
2696 \else
2697 \expandafter\twoCH@@R\member//%
2698  \set@fusion@octameth% for all bonds
2699 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
2700 \fi\fi\fi\fi}%
2701 \@wrongbdWatrue

2702 \@wrongbdWdtrue
2703 \put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2704 {\reset@double%
2705 \@tfor\member:=#1\do{%
2706 \if\member c\relax
2707 \@adoublebondtrue
2708 \else\if\member d\relax
2709 \@bdoublebondtrue
2710 \else\if\member C\relax
2711 \@Adoublebondtrue
2712 \else\if\member D\relax
2713 \@Bdoublebondtrue
2714 \fi\fi\fi\fi}%
2715 \@wrongbdWatrue
2716 \@wrongbdWdtrue
2717 \put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2718 {\reset@double%
2719 \@tfor\member:=#1\do{%
2720 \if\member e\relax
2721 \@adoublebondtrue
2722 \else\if\member E\relax
2723 \@Adoublebondtrue
2724 \else\if\member f\relax
2725 \@bdoublebondtrue
2726 \else\if\member F\relax
2727 \@Bdoublebondtrue
2728 \fi\fi\fi\fi}%
2729 \@wrongbdWatrue
2730 \@wrongbdWdtrue
2731 \put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2732 {\reset@double%
2733 \@tfor\member:=#1\do{%
2734 \if\member g\relax
2735 \@adoublebondtrue
2736 \else\if\member G\relax
2737 \@Adoublebondtrue
2738 \fi\fi}%
2739 \if@normorinvsw% inverse
2740 \@wrongbdWatrue
2741 \@wrongbdWdfalse
2742 \else% normal
2743 \@wrongbdWafalse
2744 \@wrongbdWdtrue

2745 \fi

2746 \put(1026,0){\@@dinormorinv{#2}{#3}{1}{-6}}}%
2747 \end{picture}}% end of \@octamethylene

The inner command \set@fusion@octameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@octameth
2748 \def\set@fusion@octameth{%
2749 % %%%%%%%%%%%%%%%%%%%%%
2750 % % inner bond fusion %
2751 % %%%%%%%%%%%%%%%%%%%%%
2752 \if@normorinvsw
2753 \if\@@tmpa e\relax%
2754  \putlratom{684}{103}{\@@tmpb}%     % bond fused
2755  \FuseWarning{-171}{103}%
2756  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2757  \else\if\@@tmpa E\relax%
2758  \putlratom{855}{0}{\@@tmpb}%       % bond fused
2759  \FuseWarning{171}{-103}%
2760  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2761  \else\if\@@tmpa f\relax%
2762  \putlratom{855}{0}{\@@tmpb}%     % bond fused
2763  \FuseWarning{-171}{-103}%
2764  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2765  \else\if\@@tmpa F\relax%
2766  \putlratom{1027}{103}{\@@tmpb}%       % bond fused
2767  \FuseWarning{171}{103}%
2768  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2769  \else\if\@@tmpa g\relax%
2770  \putlratom{1027}{103}{\@@tmpb}%     % bond fused
2771  \FuseWarning{-171}{103}%
2772  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
2773  \else\if\@@tmpa G\relax%
2774  \putlratom{1198}{0}{\@@tmpb}%       % bond fused
2775  \FuseWarning{171}{-103}%
2776  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
2777  \else
2778  \set@fusion@pentamethi
2779 \fi\fi\fi\fi\fi\fi
2780 \else
2781 \if\@@tmpa e\relax%
2782  \putlratom{684}{0}{\@@tmpb}%     % bond fused
2783  \FuseWarning{-171}{-103}%
2784  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2785  \else\if\@@tmpa E\relax%
2786  \putlratom{855}{103}{\@@tmpb}%       % bond fused
2787  \FuseWarning{171}{103}%
2788  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2789  \else\if\@@tmpa f\relax%
2790  \putlratom{855}{103}{\@@tmpb}%     % bond fused
2791  \FuseWarning{-171}{103}%
2792  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2793  \else\if\@@tmpa F\relax%
2794  \putlratom{1027}{0}{\@@tmpb}%       % bond fused
2795  \FuseWarning{171}{-103}%

2796  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2797  \else\if\@@tmpa g\relax%
2798  \putlratom{1027}{0}{\@@tmpb}%     % bond fused
2799  \FuseWarning{-171}{-103}%
2800  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
2801  \else\if\@@tmpa G\relax%
2802  \putlratom{1198}{103}{\@@tmpb}%       % bond fused
2803  \FuseWarning{171}{103}%
2804  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
2805  \else
2806  \set@fusion@pentameth
2807 \fi\fi\fi\fi\fi\fi

2808 \fi

2809 }% end of the macro \set@fusion@octameth

15 Nonamethylenes of normal and inverse direction

Nonamethylene and hetera derivatives are typeset with the commands \nonamethylene and \nonamethylenei. The former macro is to draw nonamethylenes of normal direction, while the latter is to draw ones of inverse directions.

    Normal direction:
                (bbb)     ((bbb))  (((bbb)))
         bbb     ddd      fff      hhh
          2       4        6       8
       a /  ` b  / c` d   / e ` f /g` h
        /    `  /    `   /     ` /    `
       1      3        5        7       9
      aaa    ccc      eee       gggg    (((ccc)))
             (aaa)    (ccc)     ((ccc))
                      ((aaa))   (((aaa)))
    Inverse direction:
                                   (((aaa)))
               (aaa)       ((aaa)) ((ccc))
    aaa      ccc      eee (ccc)    ggg     (((ccc)))
      1       3        5           7        9
     a `   b /  ` c   / d ` e     /f `  g  / h
         `  /    `   /     `    /      `  /
          2        4         6          8
         bbb       ddd     fff          hhh
                   (bbb)   ((bbb))       (((bbb)))
               (aaa)       ((aaa)) ((ccc))

The macros have two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

 \nonamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
 \nonamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to h (or A to H), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at the upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at the lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side
           c          :  3,4-double bond
           C          :  3,4-double bond in an opposite side
           d          :  4,5-double bond
           D          :  4,5-double bond in an opposite side
           e          :  5,6-double bond
           E          :  5,6-double bond in an opposite side
           f          :  6,7-double bond
           F          :  6,7-double bond in an opposite side
           g          :  7,8-double bond
           G          :  7,8-double bond in an opposite side
           h          :  8,9-double bond
           H          :  8,9-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 9 atoms)
       for n = 1 to 9
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

SUBSLIST: list of substituents
  for n = 1 to 9
      nD         :  exocyclic double bond at n-atom
      n or nS    :  exocyclic single bond at n-atom
      nA         :  alpha single bond at n-atom
      nB         :  beta single bond at n-atom
      nSA        :  alpha single bond at n-atom (boldface)
      nSB        :  beta single bond at n-atom (dotted line)
      nSa        :  alpha (not specified) single bond at n-atom
      nSb        :  beta (not specified) single bond at n-atom
      nW         :  terminal single bond (n=1 or 9)

Several examples are shown as follows.

  e.g.
   \nonamethylene{1==N}{1==Cl;2==F}
   \nonamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The macros \nonamethylene and \nonamethylenei are based on a common

inner macro \@nonamethylene, the definition of which uses a picture environment.

\nonamethylene
2810 \def\nonamethylene{%
2811 \@ifnextchar[{\set@normaldirection\@nonamethylene[@}{%
2812 \set@normaldirection\@nonamethylene[]}}
\nonamethylenei
2813 \def\nonamethylenei{%
2814 \@ifnextchar[{\set@inversedirection\@nonamethylene[@}{%
2815 \set@inversedirection\@nonamethylene[]}}

Inner temporary commands such as \@@trinormorinv and \@@dinormorinv in the common \@nonamethylene macro are replaced by active commands such as \@@trimethylene and \@@dimethylene. They carry out the following unit processes.

1. Adjusting substitution site: \yltrimethyleneposition or \yldimethyleneposition
for normal direction; \yltrimethyleneiposition or \yldimethyleneiposition

for inverse direction.

2. Treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents: \@@trimethylene or \@@dimethylene

for normal direction; \@@trimethylenei or \@@dimethylenei for normal

direction.

\@nonamethylene
2816 \def\@nonamethylene[#1]#2#3{%
2817 \iniflag\iniatom%
2818 \@reset@ylsw%
2819 {\@linterchainswfalse%
2820 \@rinterchainswtrue%
2821 \@yltrinormorinv{#2}{#3}{0}{0}}%
2822 \if@ylsw \ifx\@@ylii\empty
2823 \def\@@ylii{0}\def\@@yli{0}\fi
2824 \else
2825 {\@rinterchainswtrue%
2826 \@linterchainswtrue%
2827 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2828 \fi

2829 \if@ylsw \ifx\@@ylii\empty
2830 \def\@@ylii{-342}\def\@@yli{0}\fi
2831 \else
2832 {\@rinterchainswtrue%
2833 \@linterchainswtrue%
2834 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2835 \fi

2836 \if@ylsw \ifx\@@ylii\empty
2837 \def\@@ylii{-684}\def\@@yli{0}\fi
2838 \else
2839 {\@rinterchainswfalse%
2840 \@linterchainswtrue%
2841 \@yltrinormorinv{#2}{#3}{1}{-6}}%

2842 \fi

2843 \if@ylsw \ifx\@@ylii\empty
2844 \def\@@ylii{-1026}\def\@@yli{0}\fi\fi
2845 \if@ylsw
2846 \yl@shiftii=\@ylii
2847 \yl@shifti=\@yli
2848 \advance\yl@shiftii\@@ylii
2849 \advance\yl@shifti\@@yli
2850 \advance\yl@shiftii\yl@xdiff
2851 \advance\yl@shifti\yl@ydiff
2852 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
2853 \reset@yl@xydiff%1999/1/6 by S. Fujita
2854 \else
2855 \begin{picture}(1790,480)(-200,-180)
2856 \iforigpt \put(-200,-180){\circle*{50}}%
2857  \put(0,0){\circle{50}}%
2858 \typeout{command `nonamethylene' origin: %
2859  (0,0) ---> (200,180)}\fi%
2860 \fi%
2861 {\reset@double%
2862 \@tfor\member:=#1\do{%
2863 \if\member a\relax

2864 \@adoublebondtrue
2865 \else\if\member b\relax
2866 \@bdoublebondtrue
2867 \else\if\member A\relax
2868 \@Adoublebondtrue
2869 \else\if\member B\relax
2870 \@Bdoublebondtrue
2871 \else\if\member c\relax%dummy
2872 \else\if\member C\relax%dummy
2873 \else\if\member d\relax%dummy
2874 \else\if\member D\relax%dummy
2875 \else\if\member e\relax%dummy
2876 \else\if\member E\relax%dummy
2877 \else\if\member f\relax%dummy
2878 \else\if\member F\relax%dummy
2879 \else\if\member g\relax%dummy
2880 \else\if\member G\relax%dummy
2881 \else\if\member h\relax%dummy
2882 \else\if\member H\relax%dummy
2883 \else
2884 \expandafter\twoCH@@R\member//%
2885  \set@fusion@nonameth% for all bonds
2886 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
2887 \fi\fi\fi\fi}%
2888 \@wrongbdWatrue
2889 \@wrongbdWdtrue
2890 \put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2891 {\reset@double%
2892 \@tfor\member:=#1\do{%
2893 \if\member c\relax
2894 \@adoublebondtrue
2895 \else\if\member d\relax
2896 \@bdoublebondtrue
2897 \else\if\member C\relax
2898 \@Adoublebondtrue
2899 \else\if\member D\relax
2900 \@Bdoublebondtrue
2901 \fi\fi\fi\fi}%
2902 \@wrongbdWatrue
2903 \@wrongbdWdtrue
2904 \put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2905 {\reset@double%
2906 \@tfor\member:=#1\do{%
2907 \if\member e\relax
2908 \@adoublebondtrue
2909 \else\if\member E\relax
2910 \@Adoublebondtrue
2911 \else\if\member f\relax
2912 \@bdoublebondtrue
2913 \else\if\member F\relax

2914 \@Bdoublebondtrue
2915 \fi\fi\fi\fi}%
2916 \@wrongbdWatrue
2917 \@wrongbdWdtrue
2918 \put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2919 {\reset@double%
2920 \@tfor\member:=#1\do{%
2921 \if\member g\relax
2922 \@adoublebondtrue
2923 \else\if\member G\relax
2924 \@Adoublebondtrue
2925 \else\if\member h\relax
2926 \@bdoublebondtrue
2927 \else\if\member H\relax
2928 \@Bdoublebondtrue
2929 \fi\fi\fi\fi}%
2930 \if@normorinvsw% inverse
2931 \@wrongbdWafalse
2932 \@wrongbdWdtrue
2933 \else% normal
2934 \@wrongbdWatrue
2935 \@wrongbdWdfalse

2936 \fi

2937 \put(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
2938 \end{picture}}% end of \@nonamethylene

The inner command \set@fusion@nonameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@nonameth
2939 \def\set@fusion@nonameth{%
2940 % %%%%%%%%%%%%%%%%%%%%%
2941 % % inner bond fusion %
2942 % %%%%%%%%%%%%%%%%%%%%%
2943 \if@normorinvsw
2944 \if\@@tmpa h\relax%
2945  \putlratom{1198}{0}{\@@tmpb}%     % bond fused
2946  \FuseWarning{-171}{-103}%
2947  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
2948  \else\if\@@tmpa H\relax%
2949  \putlratom{1369}{103}{\@@tmpb}%       % bond fused
2950  \FuseWarning{171}{103}%
2951  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
2952  \else
2953  \set@fusion@octameth
2954 \fi\fi
2955 \else
2956 \if\@@tmpa h\relax%
2957  \putlratom{1198}{103}{\@@tmpb}%     % bond fused

2958  \FuseWarning{-171}{103}%
2959  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
2960  \else\if\@@tmpa H\relax%
2961  \putlratom{1369}{0}{\@@tmpb}%       % bond fused
2962  \FuseWarning{171}{-103}%
2963  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
2964  \else
2965  \set@fusion@octameth
2966 \fi\fi

2967 \fi

2968 }% end of the macro \set@fusion@nonameth

16 Decamethylenes of normal and inverse directions

Decamethylene and hetera derivatives are typeset with the commands \decamethylene and \decamethylenei. The former macro is to draw decamethylenes of normal direction, while the latter is to draw ones of inverse directions.

    Normal direction:
                (bbb)     ((bbb))  (((bbb)))
         bbb     ddd      fff      hhh     <bbb>
          2       4        6       8      10
       a /  ` b  / c` d   / e ` f /g ` h   / i
        /    `  /    `   /     ` /    `   /
       1      3        5        7       9
      aaa    ccc      eee       gggg    (((ccc)))
             (aaa)    (ccc)     ((ccc))   <aaa>
                      ((aaa))   (((aaa)))
    Inverse direction:
                                   (((aaa)))
               (aaa)       ((aaa)) ((ccc))  <aaa>
    aaa      ccc      eee (ccc)    ggg     (((ccc)))
      1       3        5           7        9
     a `   b /  ` c   / d ` e     /f `  g  / h ` i
         `  /    `   /     `    /      `  /     `
          2        4         6          8         10
         bbb       ddd     fff          hhh       <bbb>
                   (bbb)   ((bbb))       (((bbb)))

The macros have two arguments ATOMLIST and SUBSLIST as well as an optional argument BONDLIST.

   \decamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
   \decamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}

The BONDLIST argument contains one character selected from a to i (or A to I), each of which indicates the presence of an inner (endcyclic) double bond on the corresponding position. A lowercase letter is used to typeset a double bond at the upper-side of an outer skeletal bond, while an uppercase letter typesets a double bond at the lower-side of an outer skeletal bond. (Note that the option ‘A’ represents an aromatic circle in commands \sixheterov etc.)

     BONDLIST =
           [] or none :  no double bond
           a          :  1,2-double bond
           A          :  1,2-double bond in an opposite side
           b          :  2,3-double bond
           B          :  2,3-double bond in an opposite side
           c          :  3,4-double bond
           C          :  3,4-double bond in an opposite side
           d          :  4,5-double bond
           D          :  4,5-double bond in an opposite side
           e          :  5,6-double bond
           E          :  5,6-double bond in an opposite side
           f          :  6,7-double bond
           F          :  6,7-double bond in an opposite side
           g          :  7,8-double bond
           G          :  7,8-double bond in an opposite side
           h          :  8,9-double bond
           H          :  8,9-double bond in an opposite side
           i          :  9,10-double bond
           I          :  9,10-double bond in an opposite side

The ATOMLIST argument contains one or more heteroatom descriptors which are separated from each other by a semicolon. Each heteroatom descriptor consists of a locant number and a heteroatom, where these are separated with a double equality symbol.

     ATOMLIST: list of heteroatoms (max 10 atoms)
       for n = 1 to 10
           n==?    : Hetero atom, e.g. N, O, etc. at n-position,
                        e.g. 1==N for N at 1-position

The SUBSLIST argument contains one or more substitution descriptors which are separated from each other by a semicolon. Each substitution descriptor has a locant number with a bond modifier and a substituent, where these are separated with a double equality symbol.

  for n = 1 to 10
      nD         :  exocyclic double bond at n-atom
      n or nS    :  exocyclic single bond at n-atom
      nA         :  alpha single bond at n-atom
      nB         :  beta single bond at n-atom
      nSA        :  alpha single bond at n-atom (boldface)
      nSB        :  beta single bond at n-atom (dotted line)
      nSa        :  alpha (not specified) single bond at n-atom
      nSb        :  beta (not specified) single bond at n-atom
      nW         :  terminal single bond (n=1 or 10)

Several examples are shown as follows.

  e.g.
   \decamethylene{1==N}{1==Cl;2==F}
   \decamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}

The macros \decamethylene and \decamethylenei are based on a common

inner macro \@decamethylene, the definition of which uses a picture environment.

\decamethylene
2969 \def\decamethylene{%
2970 \@ifnextchar[{\set@normaldirection\@decamethylene[@}{%
2971 \set@normaldirection\@decamethylene[]}}
\decamethylenei
2972 \def\decamethylenei{%
2973 \@ifnextchar[{\set@inversedirection\@decamethylene[@}{%
2974 \set@inversedirection\@decamethylene[]}}

Inner temporary commands such as \@@trinormorinv and \@@dinormorinv in the common \@decamethylene macro are replaced by active commands such as \@@trimethylene and \@@dimethylene. They carry out the following unit processes.

1. Adjusting substitution site: \yltrimethyleneposition or \yldimethyleneposition
for normal direction; \yltrimethyleneiposition or \yldimethyleneiposition

for inverse direction.

2. Treating atom list, placing outer skeletons, inner double bonds, setting hetero atoms, and placing substituents: \@@trimethylene or \@@dimethylene

for normal direction; \@@trimethylenei or \@@dimethylenei for normal

direction.

\@decamethylene
2975 \def\@decamethylene[#1]#2#3{%
2976 \iniflag\iniatom%
2977 \@reset@ylsw%
2978 {\@linterchainswfalse%
2979 \@rinterchainswtrue%
2980 \@yltrinormorinv{#2}{#3}{0}{0}}%
2981 \if@ylsw \ifx\@@ylii\empty
2982 \def\@@ylii{0}\def\@@yli{0}\fi
2983 \else
2984 {\@rinterchainswtrue%
2985 \@linterchainswtrue%
2986 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2987 \fi

2988 \if@ylsw \ifx\@@ylii\empty
2989 \def\@@ylii{-342}\def\@@yli{0}\fi
2990 \else
2991 {\@rinterchainswtrue%
2992 \@linterchainswtrue%
2993 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2994 \fi

2995 \if@ylsw \ifx\@@ylii\empty
2996 \def\@@ylii{-684}\def\@@yli{0}\fi
2997 \else
2998 {\@rinterchainswtrue%
2999 \@linterchainswtrue%
3000 \@yltrinormorinv{#2}{#3}{1}{-6}}%

3001 \fi

3002 \if@ylsw \ifx\@@ylii\empty
3003 \def\@@ylii{-1026}\def\@@yli{0}\fi
3004 \else
3005 {\@rinterchainswfalse%
3006 \@linterchainswtrue%
3007 \@yldinormorinv{#2}{#3}{1}{-8}}%

3008 \fi

3009 \if@ylsw \ifx\@@ylii\empty
3010 \def\@@ylii{-1368}\def\@@yli{0}\fi\fi
3011 \if@ylsw
3012 \yl@shiftii=\@ylii
3013 \yl@shifti=\@yli
3014 \advance\yl@shiftii\@@ylii
3015 \advance\yl@shifti\@@yli
3016 \advance\yl@shiftii\yl@xdiff
3017 \advance\yl@shifti\yl@ydiff
3018 \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
3019 \reset@yl@xydiff%1999/1/6 by S. Fujita
3020 \else
3021 \begin{picture}(1960,480)(-200,-180)
3022 \iforigpt \put(-200,-180){\circle*{50}}%

3023  \put(0,0){\circle{50}}%
3024 \typeout{command `decamethylene' origin: %
3025  (0,0) ---> (200,180)}\fi%
3026 \fi%
3027 {\reset@double%
3028 \@tfor\member:=#1\do{%
3029 \if\member a\relax
3030 \@adoublebondtrue
3031 \else\if\member b\relax
3032 \@bdoublebondtrue
3033 \else\if\member A\relax
3034 \@Adoublebondtrue
3035 \else\if\member B\relax
3036 \@Bdoublebondtrue
3037 \else\if\member c\relax%dummy
3038 \else\if\member C\relax%dummy
3039 \else\if\member d\relax%dummy
3040 \else\if\member D\relax%dummy
3041 \else\if\member e\relax%dummy
3042 \else\if\member E\relax%dummy
3043 \else\if\member f\relax%dummy
3044 \else\if\member F\relax%dummy
3045 \else\if\member g\relax%dummy
3046 \else\if\member G\relax%dummy
3047 \else\if\member h\relax%dummy
3048 \else\if\member H\relax%dummy
3049 \else\if\member i\relax%dummy
3050 \else\if\member I\relax%dummy
3051 \else
3052 \expandafter\twoCH@@R\member//%
3053  \set@fusion@decameth% for all bonds
3054 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
3055 \fi\fi\fi\fi}%
3056 \@wrongbdWatrue
3057 \@wrongbdWdtrue
3058 \put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
3059 {\reset@double%
3060 \@tfor\member:=#1\do{%
3061 \if\member c\relax
3062 \@adoublebondtrue
3063 \else\if\member d\relax
3064 \@bdoublebondtrue
3065 \else\if\member C\relax
3066 \@Adoublebondtrue
3067 \else\if\member D\relax
3068 \@Bdoublebondtrue
3069 \fi\fi\fi\fi}%
3070 \@wrongbdWatrue
3071 \@wrongbdWdtrue
3072 \put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%

3073 {\reset@double%
3074 \@tfor\member:=#1\do{%
3075 \if\member e\relax
3076 \@adoublebondtrue
3077 \else\if\member E\relax
3078 \@Adoublebondtrue
3079 \else\if\member f\relax
3080 \@bdoublebondtrue
3081 \else\if\member F\relax
3082 \@Bdoublebondtrue
3083 \fi\fi\fi\fi}%
3084 \@wrongbdWatrue
3085 \@wrongbdWdtrue
3086 \put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
3087 {\reset@double%
3088 \@tfor\member:=#1\do{%
3089 \if\member g\relax
3090 \@adoublebondtrue
3091 \else\if\member G\relax
3092 \@Adoublebondtrue
3093 \else\if\member h\relax
3094 \@bdoublebondtrue
3095 \else\if\member H\relax
3096 \@Bdoublebondtrue
3097 \fi\fi\fi\fi}%
3098 \@wrongbdWatrue
3099 \@wrongbdWdtrue
3100 \put(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
3101 {\reset@double%
3102 \@tfor\member:=#1\do{%
3103 \if\member i\relax
3104 \@adoublebondtrue
3105 \else\if\member I\relax
3106 \@Adoublebondtrue
3107 \fi\fi}%
3108 \if@normorinvsw% inverse
3109 \@wrongbdWatrue
3110 \@wrongbdWdfalse
3111 \else% normal
3112 \@wrongbdWafalse
3113 \@wrongbdWdtrue

3114 \fi

3115 \put(1368,0){\@@dinormorinv{#2}{#3}{1}{-8}}}%
3116 \end{picture}}% end \@decamethylene

The inner command \set@fusion@decameth is used for typesetting a fused ring at each bond represented by \@@tmpa. Warnings concerning mismatched ring-fusions are based on the command \FuseWarning.

\set@fusion@decameth

3117 \def\set@fusion@decameth{%
3118 % %%%%%%%%%%%%%%%%%%%%%
3119 % % inner bond fusion %
3120 % %%%%%%%%%%%%%%%%%%%%%
3121 \if@normorinvsw
3122 \if\@@tmpa h\relax%
3123  \putlratom{1198}{0}{\@@tmpb}%     % bond fused
3124  \FuseWarning{-171}{-103}%
3125  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
3126  \else\if\@@tmpa H\relax%
3127  \putlratom{1369}{103}{\@@tmpb}%       % bond fused
3128  \FuseWarning{171}{103}%
3129  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
3130  \else\if\@@tmpa i\relax%
3131  \putlratom{1369}{103}{\@@tmpb}%       % bond fused
3132  \FuseWarning{-171}{103}%
3133  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
3134  \else\if\@@tmpa I\relax%
3135  \putlratom{1540}{0}{\@@tmpb}%       % bond fused
3136  \FuseWarning{171}{-103}%
3137  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
3138  \else
3139  \set@fusion@octameth
3140 \fi\fi\fi\fi
3141 \else
3142 \if\@@tmpa h\relax%
3143  \putlratom{1198}{103}{\@@tmpb}%     % bond fused
3144  \FuseWarning{-171}{103}%
3145  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
3146  \else\if\@@tmpa H\relax%
3147  \putlratom{1369}{0}{\@@tmpb}%       % bond fused
3148  \FuseWarning{171}{-103}%
3149  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
3150  \else\if\@@tmpa i\relax%
3151  \putlratom{1369}{0}{\@@tmpb}%     % bond fused
3152  \FuseWarning{-171}{-103}%
3153  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
3154  \else\if\@@tmpa I\relax%
3155  \putlratom{1540}{103}{\@@tmpb}%       % bond fused
3156  \FuseWarning{171}{103}%
3157  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
3158  \else
3159  \set@fusion@octameth
3160 \fi\fi\fi\fi
3161 \fi%
3162 }% end of the macro \set@fusion@decameth

3163 ⟨/methylen⟩