Methylene Chains by methylen.sty (v4.03) of XΥMTEX

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

2005/07/20

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 4.03}
3 \typeout{       -- Released July 20, 2005 by Shinsaku Fujita}
4 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 \def\j@urnalname{methylen}
6 \def\versi@ndate{July 20, 2005}
7 \def\versi@nno{ver4.03}
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@Line(0,436)(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@Line(-18,436)(-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  \dotorline(18,436)(3,5){60}/(18,436)(72,526)%
45  \else\if\@tmpc b%(b) beta
46  \yl@xdiff=-36\relax
47  \yl@ydiff=-27\relax
48  \putlatom{-42}{563}{\@memberb}%    % left type
49  \Put@Line(-18,436)(-3,5){60}%    % single bond at 1
50  \else\if\@tmpc a%(a) alpha
51  \yl@xdiff=37\relax
52  \yl@ydiff=-27\relax
53  \putratom{41}{563}{\@memberb}%     % right type
54  \Put@Line(18,436)(3,5){60}%      % single bond at 1
55  \fi\fi\fi\fi\fi%
56 \else\if\@tmpb D%double bond
57  \yl@xdiff=31\relax
58  \yl@ydiff=-17\relax
59  \putlratom{-31}{563}{\@memberb}%   % left or right type
60  \Put@Line(-12,436)(0,1){110}%    % double bond at 1
61  \Put@Line(12,436)(0,1){110}%     % double bond at 1
62 \else\if\@tmpb B%beta single bond
63  \yl@xdiff=31\relax
64  \yl@ydiff=-17\relax
65  \putlratom{-31}{563}{\@memberb}%   % left or right type
66  {%
67  \thicklines%
68  \Put@Line(0,436)(0,1){110}%      % single bond at 1
69  }%
70 \else\if\@tmpb A%alpha single bond
71  \yl@xdiff=31\relax
72  \yl@ydiff=-17\relax
73  \putlratom{-31}{563}{\@memberb}%   % left or right type
74  \dotorline(0,436)(0,1){110}/(0,436)(0,546)%

 75 \else\if\@tmpb U% undefined
 76  \yl@xdiff=31\relax
 77  \yl@ydiff=-17\relax
 78  \putlratom{-31}{563}{\@memberb}%   % left or right type
 79  {%
 80  \WaveBonds%
 81  \Put@Line(0,436)(0,1){110}%      % single bond at 1
 82  }%
 83 \else\if\@tmpb W%beta single bond
 84  \yl@xdiff=-10\relax
 85  \yl@ydiff=46\relax
 86  \if@wrongbdWa
 87  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
 88  \fi
 89  \putratom{150}{276}{\@memberb}%   % left or right type
 90  \Put@Line(40,382)(5,-3){100}%      % single bond at 1
 91 \else%
 92  \yl@xdiff=31\relax
 93  \yl@ydiff=-17\relax
 94  \putlratom{-31}{563}{\@memberb}%   % left or right type
 95  \Put@Line(0,436)(0,1){110}%      % single bond at 1
 96 \fi\fi\fi\fi\fi\fi%
 97 \else% % no clipping
 98 \if\@tmpb S%single bond
 99  \ifx\@tmpc\empty%
100  \yl@xdiff=31\relax
101  \yl@ydiff=-17\relax
102  \Put@Line(0,406)(0,1){140}%      % single bond at 1
103  \putlratom{-31}{563}{\@memberb}%   % left or right type
104  \else\if\@tmpc B%(B) beta
105  \yl@xdiff=-30\relax
106  \yl@ydiff=-37\relax
107  \putlatom{-42}{563}{\@memberb}%    % left type

108 {%

109  \thicklines%
110  \Put@Line(0,406)(-3,5){72}%      % single bond at 1

111 }%

112  \else\if\@tmpc A%(A) alpha
113  \yl@xdiff=31\relax
114  \yl@ydiff=-37\relax
115  \putratom{41}{563}{\@memberb}%     % right type
116  \dotorline(0,406)(3,5){72}/(0,406)(72,526)%
117  \else\if\@tmpc b%(b) beta
118  \yl@xdiff=-30\relax
119  \yl@ydiff=-37\relax
120  \putlatom{-42}{563}{\@memberb}%    % left type
121  \Put@Line(0,406)(-3,5){72}%      % single bond at 1
122  \else\if\@tmpc a%(a) alpha
123  \yl@xdiff=31\relax
124  \yl@ydiff=-37\relax
125  \putratom{41}{563}{\@memberb}%     % right type
126  \Put@Line(0,406)(3,5){72}%       % single bond at 1
127  \fi\fi\fi\fi\fi%
128 \else\if\@tmpb D%double bond

129  \yl@xdiff=31\relax
130  \yl@ydiff=-17\relax
131  \putlratom{-31}{563}{\@memberb}%   % left or right type
132  \Put@Line(-12,406)(0,1){140}%    % double bond at 1
133  \Put@Line(12,406)(0,1){140}%     % double bond at 1
134 \else\if\@tmpb B%beta single bond
135  \yl@xdiff=31\relax
136  \yl@ydiff=-17\relax
137  \putlratom{-31}{563}{\@memberb}%   % left or right type

138 {%

139  \thicklines%
140  \Put@Line(0,406)(0,1){140}%      % single bond at 1

141 }%

142 \else\if\@tmpb A%alpha single bond
143  \yl@xdiff=31\relax
144  \yl@ydiff=-17\relax
145  \putlratom{-31}{563}{\@memberb}%   % left or right type
146  \dotorline(0,406)(0,1){140}/(0,406)(0,546)%
147 \else\if\@tmpb U%undefined
148  \yl@xdiff=31\relax
149  \yl@ydiff=-17\relax
150  \putlratom{-31}{563}{\@memberb}%   % left or right type

151 {%

152  \WaveBonds%
153  \Put@Line(0,406)(0,1){140}%      % single bond at 1

154 }%

155 \else\if\@tmpb W%beta single bond
156  \yl@xdiff=-10\relax
157  \yl@ydiff=58\relax
158  \if@wrongbdWa
159  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
160  \fi
161  \putratom{130}{276}{\@memberb}%   % left or right type
162  \Put@Line(0,406)(5,-3){120}%      % single bond at 1
163 \else%
164  \yl@xdiff=31\relax
165  \yl@ydiff=-17\relax
166  \putlratom{-31}{563}{\@memberb}%   % left or right type
167  \Put@Line(0,406)(0,1){140}%      % single bond at 1
168 \fi\fi\fi\fi\fi\fi%
169 \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
170 \def\@methsubstd{%
171 \if@clip %clipping
172  \if\@tmpb S%single bond
173  \ifx\@tmpc\empty%
174  \yl@xdiff=31\relax
175  \yl@ydiff=90\relax
176  \putlratom{-31}{-230}{\@memberb}%  % left or right type
177  \Put@Line(0,-30)(0,-1){110}%    % single bond at 4

178  \else\if\@tmpc B%(B) beta
179  \yl@xdiff=-36\relax
180  \yl@ydiff=100\relax
181  \putlatom{-42}{-230}{\@memberb}%   % left type

182 {%

183  \thicklines%
184  \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4

185 }%

186  \else\if\@tmpc A%(A) alpha
187  \yl@xdiff=37\relax
188  \yl@ydiff=100\relax
189  \putratom{41}{-230}{\@memberb}%    % right type
190  \dotorline(18,-30)(3,-5){60}/(18,-30)(72,-120)%
191  \else\if\@tmpc b%(b) beta
192  \yl@xdiff=-36\relax
193  \yl@ydiff=100\relax
194  \putlatom{-42}{-230}{\@memberb}%   % left type
195  \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4
196  \else\if\@tmpc a%(a) alpha
197  \yl@xdiff=37\relax
198  \yl@ydiff=100\relax
199  \putratom{41}{-230}{\@memberb}%    % right type
200  \Put@Line(18,-30)(3,-5){60}%     % single bond at 4
201  \fi\fi\fi\fi\fi%
202 \else\if\@tmpb D%double bond
203  \yl@xdiff=31\relax
204  \yl@ydiff=90\relax
205  \putlratom{-31}{-230}{\@memberb}%  % left or right type
206  \Put@Line(-12,-30)(0,-1){110}%   % double bond at 4
207  \Put@Line(12,-30)(0,-1){110}%    % double bond at 4
208 \else\if\@tmpb B%beta single bond
209  \yl@xdiff=31\relax
210  \yl@ydiff=90\relax
211  \putlratom{-31}{-230}{\@memberb}%  % left or right type

212 {%

213  \thicklines%
214  \Put@Line(0,-30)(0,-1){110}%    % single bond at 4

215 }%

216 \else\if\@tmpb A%alpha single bond
217  \yl@xdiff=31\relax
218  \yl@ydiff=90\relax
219  \putlratom{-31}{-230}{\@memberb}%  % left or right type
220  \dotorline(0,-30)(0,-1){110}/(0,-30)(0,-140)%
221 \else\if\@tmpb U% undefined
222  \yl@xdiff=31\relax
223  \yl@ydiff=90\relax
224  \putlratom{-31}{-230}{\@memberb}%  % left or right type

225 {%

226  \WaveBonds%
227  \Put@Line(0,-30)(0,-1){110}%    % single bond at 4

228 }%

229 \else\if\@tmpb W%beta single bond
230  \yl@xdiff=-10\relax
231  \yl@ydiff=30\relax

232  \putlratom{150}{54}{\@memberb}%  % left or right type
233  \Put@Line(40,24)(5,3){100}%    % single bond at 4
234  \if@wrongbdWd
235  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
236  \fi
237 \else%
238  \yl@xdiff=31\relax
239  \yl@ydiff=90\relax
240  \putlratom{-31}{-230}{\@memberb}%  % left or right type
241  \Put@Line(0,-30)(0,-1){110}%     % single bond at 4
242 \fi\fi\fi\fi\fi\fi%
243 \else% no clipping
244 \if\@tmpb S%single bond
245  \ifx\@tmpc\empty%
246  \yl@xdiff=31\relax
247  \yl@ydiff=90\relax
248  \putlratom{-31}{-230}{\@memberb}%  % left or right type
249  \Put@Line(0,0)(0,-1){140}%      % single bond at 4
250  \else\if\@tmpc B%(B) beta
251  \yl@xdiff=-30\relax
252  \yl@ydiff=110\relax
253  \putlatom{-42}{-230}{\@memberb}%   % left type

254 {%

255  \thicklines%
256  \Put@Line(0,0)(-3,-5){72}%       % single bond at 4

257 }%

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

284 {%

285  \thicklines%

286  \Put@Line(0,0)(0,-1){140}%       % single bond at 4

287 }%

288 \else\if\@tmpb A%alpha single bond
289  \yl@xdiff=31\relax
290  \yl@ydiff=90\relax
291  \putlratom{-31}{-230}{\@memberb}%  % left or right type
292  \dotorline(0,0)(0,-1){140}/(0,0)(0,-140)%
293 \else\if\@tmpb U% undefined
294  \yl@xdiff=31\relax
295  \yl@ydiff=90\relax
296  \putlratom{-31}{-230}{\@memberb}%  % left or right type

297 {%

298  \WaveBonds%
299  \Put@Line(0,0)(0,-1){140}%       % single bond at 4

300 }%

301 \else\if\@tmpb W%beta single bond
302  \yl@xdiff=-10\relax
303  \yl@ydiff=30\relax
304  \putlratom{150}{54}{\@memberb}%  % left or right type
305  \Put@Line(0,0)(5,3){140}%    % single bond at 4
306  \if@wrongbdWd
307  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
308  \fi
309 \else%
310  \yl@xdiff=31\relax
311  \yl@ydiff=90\relax
312  \putlratom{-31}{-230}{\@memberb}%  % left or right type
313  \Put@Line(0,0)(0,-1){140}%       % single bond at 4
314 \fi\fi\fi\fi\fi\fi%
315 \fi}%

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

\@methsubstdL
316 \def\@methsubstdL{%
317 \if@clip %clipping
318  \if\@tmpb S%single bond
319  \ifx\@tmpc\empty%
320  \yl@xdiff=31\relax
321  \yl@ydiff=90\relax
322  \putlratom{-31}{-230}{\@memberb}%  % left or right type
323  \Put@Line(0,-30)(0,-1){110}%    % single bond at 4
324  \else\if\@tmpc B%(B) beta
325  \yl@xdiff=-36\relax
326  \yl@ydiff=100\relax
327  \putlatom{-42}{-230}{\@memberb}%   % left type

328 {%

329  \thicklines%
330  \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4

331 }%

332  \else\if\@tmpc A%(A) alpha
333  \yl@xdiff=37\relax

334  \yl@ydiff=100\relax
335  \putratom{41}{-230}{\@memberb}%    % right type
336  \dotorline(18,-30)(3,-5){60}/(18,-30)(72,-120)%
337  \else\if\@tmpc b%(b) beta
338  \yl@xdiff=-36\relax
339  \yl@ydiff=100\relax
340  \putlatom{-42}{-230}{\@memberb}%   % left type
341  \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4
342  \else\if\@tmpc a%(a) alpha
343  \yl@xdiff=37\relax
344  \yl@ydiff=100\relax
345  \putratom{41}{-230}{\@memberb}%    % right type
346  \Put@Line(18,-30)(3,-5){60}%     % single bond at 4

347

348  \else\if\@tmpc V%(V) beta undefined
349  \yl@xdiff=-36\relax
350  \yl@ydiff=100\relax
351  \putlatom{-42}{-230}{\@memberb}%   % left type

352 {%

353  \WaveBonds%
354  \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4

355 }%

356  \else\if\@tmpc U%(U) alpha undefined
357  \yl@xdiff=37\relax
358  \yl@ydiff=100\relax
359  \putratom{41}{-230}{\@memberb}%    % right type

360 {%

361  \WaveBonds%
362  \Put@Line(18,-30)(3,-5){60}%     % single bond at 4

363 }%

364  \fi\fi\fi\fi\fi\fi\fi%
365 \else\if\@tmpb D%double bond
366  \yl@xdiff=31\relax
367  \yl@ydiff=90\relax
368  \putlratom{-31}{-230}{\@memberb}%  % left or right type
369  \Put@Line(-12,-30)(0,-1){110}%   % double bond at 4
370  \Put@Line(12,-30)(0,-1){110}%    % double bond at 4
371 \else\if\@tmpb B%beta single bond
372  \yl@xdiff=31\relax
373  \yl@ydiff=90\relax
374  \putlratom{-31}{-230}{\@memberb}%  % left or right type

375 {%

376  \thicklines%
377  \Put@Line(0,-30)(0,-1){110}%    % single bond at 4

378 }%

379 \else\if\@tmpb A%alpha single bond
380  \yl@xdiff=31\relax
381  \yl@ydiff=90\relax
382  \putlratom{-31}{-230}{\@memberb}%  % left or right type
383  \dotorline(0,-30)(0,-1){110}/(0,-30)(0,-140)%
384 \else\if\@tmpb U% undefined
385  \yl@xdiff=31\relax
386  \yl@ydiff=90\relax
387  \putlratom{-31}{-230}{\@memberb}%  % left or right type

388 {%

389  \WaveBonds%
390  \Put@Line(0,-30)(0,-1){110}%    % single bond at 4

391 }%

392 \else\if\@tmpb W%beta single bond
393  \yl@xdiff=10\relax
394  \yl@ydiff=30\relax
395  \putlatom{-150}{54}{\@memberb}%  % lefttype
396  \Put@Line(-40,24)(-5,3){100}%    % single bond at 4
397  \if@wrongbdWdL
398  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
399  \fi
400 \else%
401  \yl@xdiff=31\relax
402  \yl@ydiff=90\relax
403  \putlratom{-31}{-230}{\@memberb}%  % left or right type
404  \Put@Line(0,-30)(0,-1){110}%     % single bond at 4
405 \fi\fi\fi\fi\fi\fi%
406 \else% no clipping
407 \if\@tmpb S%single bond
408  \ifx\@tmpc\empty%
409  \yl@xdiff=31\relax
410  \yl@ydiff=90\relax
411  \putlratom{-31}{-230}{\@memberb}%  % left or right type
412  \Put@Line(0,0)(0,-1){140}%      % single bond at 4
413  \else\if\@tmpc B%(B) beta
414  \yl@xdiff=-30\relax
415  \yl@ydiff=110\relax
416  \putlatom{-42}{-230}{\@memberb}%   % left type

417 {%

418  \thicklines%
419  \Put@Line(0,0)(-3,-5){72}%       % single bond at 4

420 }%

421  \else\if\@tmpc A%(A) alpha
422  \yl@xdiff=31\relax
423  \yl@ydiff=110\relax
424  \putratom{41}{-230}{\@memberb}%    % right type
425  \dotorline(0,0)(3,-5){72}/(0,0)(72,-120)%
426  \else\if\@tmpc b%(b) beta
427  \yl@xdiff=-30\relax
428  \yl@ydiff=110\relax
429  \putlatom{-42}{-230}{\@memberb}%   % left type
430  \Put@Line(0,0)(-3,-5){72}%       % single bond at 4
431  \else\if\@tmpc a%(a) alpha
432  \yl@xdiff=31\relax
433  \yl@ydiff=110\relax
434  \putratom{41}{-230}{\@memberb}%    % right type
435  \Put@Line(0,0)(3,-5){72}%        % single bond at 4

436

437  \else\if\@tmpc V%(V) beta undefined
438  \yl@xdiff=-30\relax
439  \yl@ydiff=110\relax
440  \putlatom{-42}{-230}{\@memberb}%   % left type

441 {%

442  \WaveBonds%
443  \Put@Line(0,0)(-3,-5){72}%       % single bond at 4

444 }%

445  \else\if\@tmpc U%(U) alpha undefined
446  \yl@xdiff=31\relax
447  \yl@ydiff=110\relax
448  \putratom{41}{-230}{\@memberb}%    % right type

449 {%

450  \WaveBonds%
451  \Put@Line(0,0)(3,-5){72}%        % single bond at 4

452 }%

453  \fi\fi\fi\fi\fi\fi\fi%
454 \else\if\@tmpb D%double bond
455  \yl@xdiff=31\relax
456  \yl@ydiff=90\relax
457  \putlratom{-31}{-230}{\@memberb}%  % left or right type
458  \Put@Line(-12,0)(0,-1){140}%     % double bond at 4
459  \Put@Line(12,0)(0,-1){140}%      % double bond at 4
460 \else\if\@tmpb B%beta single bond
461  \yl@xdiff=31\relax
462  \yl@ydiff=90\relax
463  \putlratom{-31}{-230}{\@memberb}%  % left or right type

464 {%

465  \thicklines%
466  \Put@Line(0,0)(0,-1){140}%       % single bond at 4

467 }%

468 \else\if\@tmpb A%alpha single bond
469  \yl@xdiff=31\relax
470  \yl@ydiff=90\relax
471  \putlratom{-31}{-230}{\@memberb}%  % left or right type
472  \dotorline(0,0)(0,-1){140}/(0,0)(0,-140)%
473 \else\if\@tmpb U%beta undefined
474  \yl@xdiff=31\relax
475  \yl@ydiff=90\relax
476  \putlratom{-31}{-230}{\@memberb}%  % left or right type

477 {%

478  \WaveBonds%
479  \Put@Line(0,0)(0,-1){140}%       % single bond at 4

480 }%

481 \else\if\@tmpb W%beta single bond
482  \yl@xdiff=10\relax
483  \yl@ydiff=30\relax
484  \putlatom{-150}{54}{\@memberb}%  % left type
485  \Put@Line(0,0)(-5,3){140}%    % single bond at 4
486  \if@wrongbdWdL
487  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
488  \fi
489 \else%
490  \yl@xdiff=31\relax
491  \yl@ydiff=90\relax
492  \putlratom{-31}{-230}{\@memberb}%  % left or right type
493  \Put@Line(0,0)(0,-1){140}%       % single bond at 4
494 \fi\fi\fi\fi\fi\fi%
495 \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
496 \def\@methsubstaL{%
497 \if@aclip% %clipping
498 \if\@tmpb S%single bond
499  \ifx\@tmpc\empty%
500  \yl@xdiff=31\relax
501  \yl@ydiff=-17\relax
502  \Put@Line(0,436)(0,1){110}%      % single bond at 1
503  \putlratom{-31}{563}{\@memberb}%   % left or right type
504  \else\if\@tmpc B%(B) beta
505  \yl@xdiff=-36\relax
506  \yl@ydiff=-27\relax
507  \putlatom{-42}{563}{\@memberb}%    % left type

508 {%

509  \thicklines%
510  \Put@Line(-18,436)(-3,5){60}%    % single bond at 1

511 }%

512  \else\if\@tmpc A%(A) alpha
513  \yl@xdiff=37\relax
514  \yl@ydiff=-27\relax
515  \putratom{41}{563}{\@memberb}%     % right type
516  \dotorline(18,436)(3,5){60}/(18,436)(72,526)%
517  \else\if\@tmpc b%(b) beta
518  \yl@xdiff=-36\relax
519  \yl@ydiff=-27\relax
520  \putlatom{-42}{563}{\@memberb}%    % left type
521  \Put@Line(-18,436)(-3,5){60}%    % single bond at 1
522  \else\if\@tmpc a%(a) alpha
523  \yl@xdiff=37\relax
524  \yl@ydiff=-27\relax
525  \putratom{41}{563}{\@memberb}%     % right type
526  \Put@Line(18,436)(3,5){60}%      % single bond at 1
527  \else\if\@tmpc V%(V) beta undefined
528  \yl@xdiff=-36\relax
529  \yl@ydiff=-27\relax
530  \putlatom{-42}{563}{\@memberb}%    % left type

531 {%

532  \WaveBonds%
533  \Put@Line(-18,436)(-3,5){60}%    % single bond at 1

534 }%

535  \else\if\@tmpc U%(U) alpha undefined
536  \yl@xdiff=37\relax
537  \yl@ydiff=-27\relax
538  \putratom{41}{563}{\@memberb}%     % right type

539 {%

540  \WaveBonds%
541  \Put@Line(18,436)(3,5){60}%      % single bond at 1

542 }%

543  \fi\fi\fi\fi\fi\fi\fi%
544 \else\if\@tmpb D%double bond

545  \yl@xdiff=31\relax
546  \yl@ydiff=-17\relax
547  \putlratom{-31}{563}{\@memberb}%   % left or right type
548  \Put@Line(-12,436)(0,1){110}%    % double bond at 1
549  \Put@Line(12,436)(0,1){110}%     % double bond at 1
550 \else\if\@tmpb B%beta single bond
551  \yl@xdiff=31\relax
552  \yl@ydiff=-17\relax
553  \putlratom{-31}{563}{\@memberb}%   % left or right type

554 {%

555  \thicklines%
556  \Put@Line(0,436)(0,1){110}%      % single bond at 1

557 }%

558 \else\if\@tmpb A%alpha single bond
559  \yl@xdiff=31\relax
560  \yl@ydiff=-17\relax
561  \putlratom{-31}{563}{\@memberb}%   % left or right type
562  \dotorline(0,436)(0,1){110}/(0,436)(0,546)%
563 \else\if\@tmpb U%beta undefined
564  \yl@xdiff=31\relax
565  \yl@ydiff=-17\relax
566  \putlratom{-31}{563}{\@memberb}%   % left or right type

567 {%

568  \WaveBonds%
569  \Put@Line(0,436)(0,1){110}%      % single bond at 1

570 }%

571 \else\if\@tmpb W%beta single bond
572  \yl@xdiff=10\relax
573  \yl@ydiff=46\relax
574  \putlatom{-150}{276}{\@memberb}%   % left type
575  \Put@Line(-40,382)(-5,-3){100}%      % single bond at 1
576  \if@wrongbdWaL
577  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
578  \fi
579 \else%
580  \yl@xdiff=31\relax
581  \yl@ydiff=-17\relax
582  \putlratom{-31}{563}{\@memberb}%   % left or right type
583  \Put@Line(0,436)(0,1){110}%      % single bond at 1
584 \fi\fi\fi\fi\fi\fi%
585 \else% % no clipping
586 \if\@tmpb S%single bond
587  \ifx\@tmpc\empty%
588  \yl@xdiff=31\relax
589  \yl@ydiff=-17\relax
590  \Put@Line(0,406)(0,1){140}%      % single bond at 1
591  \putlratom{-31}{563}{\@memberb}%   % left or right type
592  \else\if\@tmpc B%(B) beta
593  \yl@xdiff=-30\relax
594  \yl@ydiff=-37\relax
595  \putlatom{-42}{563}{\@memberb}%    % left type

596 {%

597  \thicklines%
598  \Put@Line(0,406)(-3,5){72}%      % single bond at 1

599 }%

600  \else\if\@tmpc A%(A) alpha
601  \yl@xdiff=31\relax
602  \yl@ydiff=-37\relax
603  \putratom{41}{563}{\@memberb}%     % right type
604  \dotorline(0,406)(3,5){72}/(0,406)(72,526)%
605  \else\if\@tmpc b%(b) beta
606  \yl@xdiff=-30\relax
607  \yl@ydiff=-37\relax
608  \putlatom{-42}{563}{\@memberb}%    % left type
609  \Put@Line(0,406)(-3,5){72}%      % single bond at 1
610  \else\if\@tmpc a%(a) alpha
611  \yl@xdiff=31\relax
612  \yl@ydiff=-37\relax
613  \putratom{41}{563}{\@memberb}%     % right type
614  \Put@Line(0,406)(3,5){72}%       % single bond at 1
615  \else\if\@tmpc V%(V) beta undefined
616  \yl@xdiff=-30\relax
617  \yl@ydiff=-37\relax
618  \putlatom{-42}{563}{\@memberb}%    % left type

619 {%

620  \WaveBonds%
621  \Put@Line(0,406)(-3,5){72}%      % single bond at 1

622 }%

623  \else\if\@tmpc U%(U) alpha undefined
624  \yl@xdiff=31\relax
625  \yl@ydiff=-37\relax
626  \putratom{41}{563}{\@memberb}%     % right type

627 {%

628  \WaveBonds%
629  \Put@Line(0,406)(3,5){72}%       % single bond at 1

630 }%

631  \fi\fi\fi\fi\fi\fi\fi%
632 \else\if\@tmpb D%double bond
633  \yl@xdiff=31\relax
634  \yl@ydiff=-17\relax
635  \putlratom{-31}{563}{\@memberb}%   % left or right type
636  \Put@Line(-12,406)(0,1){140}%    % double bond at 1
637  \Put@Line(12,406)(0,1){140}%     % double bond at 1
638 \else\if\@tmpb B%beta single bond
639  \yl@xdiff=31\relax
640  \yl@ydiff=-17\relax
641  \putlratom{-31}{563}{\@memberb}%   % left or right type

642 {%

643  \thicklines%
644  \Put@Line(0,406)(0,1){140}%      % single bond at 1

645 }%

646 \else\if\@tmpb A%alpha single bond
647  \yl@xdiff=31\relax
648  \yl@ydiff=-17\relax
649  \putlratom{-31}{563}{\@memberb}%   % left or right type
650  \dotorline(0,406)(0,1){140}/(0,406)(0,546)%
651 \else\if\@tmpb U%beta undefined
652  \yl@xdiff=31\relax

653  \yl@ydiff=-17\relax
654  \putlratom{-31}{563}{\@memberb}%   % left or right type

655 {%

656  \WaveBonds%
657  \Put@Line(0,406)(0,1){140}%      % single bond at 1

658 }%

659 \else\if\@tmpb W%beta single bond
660  \yl@xdiff=10\relax
661  \yl@ydiff=58\relax
662  \putlatom{-130}{276}{\@memberb}%   % left type
663  \Put@Line(0,406)(-5,-3){120}%      % single bond at 1
664  \if@wrongbdWaL
665  \XyMTeXWarning{Wrong Bond-Modifier (W)}%
666  \fi
667 \else%
668  \yl@xdiff=31\relax
669  \yl@ydiff=-17\relax
670  \putlratom{-31}{563}{\@memberb}%   % left or right type
671  \Put@Line(0,406)(0,1){140}%      % single bond at 1
672 \fi\fi\fi\fi\fi\fi%
673 \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
674 \def\SKbondB{%
675 \ifx\bbb\empty%
676  \ifx\ccc\empty%
677  \Put@Line(0,406)(5,-3){171}%        %bond 1-2
678  \else%
679  \Put@Line(0,406)(5,-3){136}%        %bond 1-2
680  \fi%
681 \else%
682  \ifx\ccc\empty%
683  \Put@Line(35,385)(5,-3){136}%       %bond 1-2
684  \else%
685  \Put@Line(35,385)(5,-3){100}%       %bond 1-2
686  \fi%
687 \fi}%
\SKbondA
688 \def\SKbondA{%
689 \ifx\bbb\empty%
690  \ifx\aaa\empty%
691  \Put@Line(0,406)(-5,-3){171}%       %bond 1-6
692  \else%
693  \Put@Line(0,406)(-5,-3){136}%       %bond 1-6
694  \fi%

695 \else%
696  \ifx\aaa\empty%
697  \Put@Line(-35,385)(-5,-3){136}%     %bond 1-6
698  \else%
699  \Put@Line(-35,385)(-5,-3){100}%     %bond 1-6
700  \fi%
701 \fi}%

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

\SKbondBi
702 \def\SKbondBi{%
703 \begin{sfpicture}(0,0)(0,0)
704 \ifx\bbb\empty%
705  \ifx\ccc\empty%
706  \Put@Line(0,0)(5,3){171}%           %bond 4-3
707  \else%
708  \Put@Line(0,0)(5,3){136}%           %bond 4-3
709  \fi%
710 \else%
711  \ifx\ccc\empty%
712  \Put@Line(35,21)(5,3){138}%         %bond 4-3
713  \else%
714  \Put@Line(35,21)(5,3){100}%         %bond 4-3
715  \fi%
716 \fi\end{sfpicture}}%
\SKbondAi
717 \def\SKbondAi{%
718 \begin{sfpicture}(0,0)(0,0)
719 \ifx\bbb\empty%
720  \ifx\aaa\empty%
721  \Put@Line(0,0)(-5,3){171}%          %bond 4-5
722  \else%
723  \Put@Line(0,0)(-5,3){136}%          %bond 4-5
724  \fi%
725 \else%
726  \ifx\aaa\empty%
727  \Put@Line(-35,21)(-5,3){138}%       %bond 4-5
728  \else%
729  \Put@Line(-35,21)(-5,3){100}%        %bond 4-5
730  \fi%
731 \fi\end{sfpicture}}%

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
732 \def\bondB{%
733 \ifx\bbb\empty%

734 \ifx\ccc\empty%
735  \Put@Line(6,364)(5,-3){126}%         %double bond 1-2
736 \else%
737  \Put@Line(6,364)(5,-3){100}%         %double bond 1-2
738 \fi%
739 \else%
740 \ifx\ccc\empty%
741  \Put@Line(35,340)(5,-3){100}%        %double bond 1-2
742 \else%
743  \Put@Line(35,352)(5,-3){100}%        %double bond 1-2
744 \fi%                                    % line <1OO not available
745 \fi%

746 }%

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
747 \def\bondBB{%
748 \ifx\bbb\empty%
749 \ifx\ccc\empty%
750  \Put@Line(42,420)(5,-3){126}%         %double bond 1-2
751 \else%
752  \Put@Line(42,420)(5,-3){100}%         %double bond 1-2
753 \fi%
754 \else%
755 \ifx\ccc\empty%
756  \Put@Line(52,412)(5,-3){110}%        %double bond 1-2
757 \else%
758  \Put@Line(52,412)(5,-3){100}%        %double bond 1-2
759 \fi%                                    % line <1OO not available
760 \fi%

761 }%

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
762 \def\bondA{%
763 \ifx\bbb\empty%
764 \ifx\aaa\empty%
765  \Put@Line(-6,364)(-5,-3){126}%        %double bond 1-6
766 \else%
767  \Put@Line(-6,364)(-5,-3){100}%        %double bond 1-6
768 \fi%
769 \else%
770 \ifx\aaa\empty%
771  \Put@Line(-35,340)(-5,-3){100}%       %double bond 1-6
772 \else%
773  \Put@Line(-35,352)(-5,-3){100}%       %double bond 1-6
774 \fi%                                     % line <1OO not available
775 \fi%

776 }%

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
777 \def\bondAA{%
778 \ifx\bbb\empty%
779 \ifx\aaa\empty%
780  \Put@Line(-42,420)(-5,-3){126}%        %double bond 1-6
781 \else%
782  \Put@Line(-42,420)(-5,-3){100}%        %double bond 1-6
783 \fi%
784 \else%
785 \ifx\aaa\empty%
786  \Put@Line(-52,412)(-5,-3){100}%       %double bond 1-6
787 \else%
788  \Put@Line(-52,412)(-5,-3){100}%       %double bond 1-6
789 \fi%                                     % line <1OO not available
790 \fi%

791 }%

The bond-setting commands with sufix “i” are used in the definitions of com-

 mands 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
792 \def\bondBi{%
793 \ifx\bbb\empty%
794 \ifx\ccc\empty%
795  \Put@Line(6,42)(5,3){126}%           %double bond 4-3
796 \else%
797  \Put@Line(6,42)(5,3){100}%           %double bond 4-3
798 \fi%
799 \else%
800 \ifx\ccc\empty%
801  \Put@Line(35,66)(5,3){100}%          %double bond 4-3
802 \else%
803  \Put@Line(35,60)(5,3){100}%          %double bond 4-3
804 \fi%                                    % line <1OO not available
805 \fi%

806 }%

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
807 \def\bondBBi{%
808 \ifx\bbb\empty%
809 \ifx\ccc\empty%
810 %    \Put@Line(6,42)(5,3){126}%           %double bond 4-3
811  \Put@Line(42,-14)(5,3){126}%        %double bond 1-6
812 \else%
813 %    \Put@Line(6,42)(5,3){100}%           %double bond 4-3
814 %    \Put@Line(42,-14)(5,3){100}%        %double bond 1-6

815  \Put@Line(30,-14)(5,3){100}%        %double bond 1-6
816 \fi%
817 \else%
818 \ifx\ccc\empty%
819 %    \Put@Line(35,66)(5,3){100}%          %double bond 4-3
820 %    \Put@Line(52,6)(5,3){100}%       %double bond 1-6
821  \Put@Line(52,0)(5,3){100}%       %double bond 1-6
822 \else%
823 %    \Put@Line(35,60)(5,3){100}%          %double bond 4-3
824  \Put@Line(52,0)(5,3){100}%        %double bond 4-5
825 \fi%                                    % line <1OO not available
826 \fi%

827 }%

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
828 \def\bondAi{%
829 \ifx\bbb\empty%
830 \ifx\aaa\empty%
831  \Put@Line(-6,42)(-5,3){126}%         %double bond 4-5
832 \else%
833  \Put@Line(-6,42)(-5,3){100}%         %double bond 4-5
834 \fi%
835 \else%
836 \ifx\aaa\empty%
837  \Put@Line(-35,66)(-5,3){100}%        %double bond 4-5
838 \else%
839  \Put@Line(-35,60)(-5,3){100}%        %double bond 4-5
840 \fi%                                    % line <1OO not available
841 \fi%

842 }%

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
843 \def\bondAAi{%
844 \ifx\bbb\empty%
845 \ifx\aaa\empty%
846 %    \Put@Line(-6,42)(-5,3){126}%         %double bond 4-5
847  \Put@Line(-42,-14)(-5,3){126}%        %double bond 1-6
848 \else%
849 %    \Put@Line(-6,42)(-5,3){100}%         %double bond 4-5
850  \Put@Line(-42,-14)(-5,3){100}%        %double bond 1-6
851 \fi%
852 \else%
853 \ifx\aaa\empty%
854 %    \Put@Line(-35,66)(-5,3){100}%        %double bond 4-5
855  \Put@Line(-52,6)(-5,3){100}%       %double bond 1-6
856 \else%
857 %    \Put@Line(-35,60)(-5,3){100}%        %double bond 4-5
858  \Put@Line(-52,0)(-5,3){100}%        %double bond 4-5

859 \fi%                                    % line <1OO not available
860 \fi%

861 }%

6 Switches

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

862 \newif\if@adoublebond \@adoublebondfalse
863 \newif\if@bdoublebond \@bdoublebondfalse
864 \newif\if@Adoublebond \@Adoublebondfalse
865 \newif\if@Bdoublebond \@Bdoublebondfalse
866 \def\reset@double{%
867 \@adoublebondfalse\@bdoublebondfalse
868 \@Adoublebondfalse\@Bdoublebondfalse}
\if@linterchainsw
\if@rinterchainsw
\reset@interchainsw

869 \newif\if@linterchainsw \@linterchainswfalse
870 \newif\if@rinterchainsw \@rinterchainswfalse
871 \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
872 \def\@@trimethylene#1#2#3#4{%
873 \leavevmode
874 \iniatom\iniflag%initialize
875 \test@vrtx@trimethy{#1}{#4}%
876 %\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
877 \begin{sfpicture}(450,480)(0,0)%

878 % %%%%%%%%%%%%%%%%%%
879 % % outer skeleton %
880 % %%%%%%%%%%%%%%%%%%
881 \Put@Direct(171,-303){\SKbondB}% bond between 1 and 2
882 \Put@Direct(171,-303){\SKbondA}% bond between 1 and 6
883 % %%%%%%%%%%%%%%%%%%%%%
884 % % inner double bond %
885 % %%%%%%%%%%%%%%%%%%%%%
886 \if@adoublebond\relax\Put@Direct(171,-303){\bondA}\fi
887 \if@bdoublebond\relax\Put@Direct(171,-303){\bondB}\fi
888 \if@Adoublebond\relax\Put@Direct(171,-303){\bondAA}\fi
889 \if@Bdoublebond\relax\Put@Direct(171,-303){\bondBB}\fi
890 % %%%%%%%%%%%%%%%%%%%%%%%%
891 % % setting hetero atoms %
892 % %%%%%%%%%%%%%%%%%%%%%%%%
893 \test@termcnt=#3\relax
894 %\set@hetatom@methyl{#1}{0}{0}{4}{0}%
895 \set@hetatom@methyl{#1}{#4}{0}{4}{0}%
896 % %%%%%%%%%%%%%%%%%%%%%%%%
897 % % setting substituents %
898 % %%%%%%%%%%%%%%%%%%%%%%%%
899 \@forsemicol\member:=#2\do{%
900 \ifx\member\empty\else
901 \expandafter\@m@mb@r\member;\relax%
902 \expandafter\threech@r\@membera{}{}%
903 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
904 \ifx\@memberb\@yl\else
905 \ifcase\@tmpaa%0 omit
906 \or
907 \ifcase#3
908 {\if@aclip \@cliptrue \else \@clipfalse\fi
909 \Put@Direct(0,0){\@methsubstdL}}%
910 \or\relax
911 \or
912 {\if@aclip \@cliptrue \else \@clipfalse\fi
913 \Put@Direct(0,0){\@methsubstdL}}%
914 \fi
915 \or
916 {\if@bclip \@acliptrue \else \@aclipfalse\fi
917 \Put@Direct(171,-303){\@methsubsta}}%
918 \or
919 \ifcase#3
920 {\if@cclip \@cliptrue\else \@clipfalse\fi
921 \Put@Direct(342,0){\@methsubstd}}%
922 \or
923 {\if@cclip \@cliptrue\else \@clipfalse\fi
924 \Put@Direct(342,0){\@methsubstd}}%
925 \or\relax
926 \fi
927 \fi%end of ifcase
928 \fi\fi

929 }%

930 \end{sfpicture}}% end of \@@trimethylene

\test@vrtx@trimethy
931 \def\test@vrtx@trimethy#1#2{%
932 \@forsemicol\member:=#1\do{%
933 \ifx\member\empty\else
934 \expandafter\@m@mb@r\member;\relax%
935 \expandafter\twoch@r\@membera{}%
936 \@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
937 \ifcase\@tmpaa%
938 \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
939  \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
940 \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
941  \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
942 \or \if\@tmpb s\relax \xdef\ccc{}\else\if\@tmpb h\relax
943  \xdef\ccc{@}\else\xdef\ccc{@}\fi\fi
944 \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

945 %

946 \def\yltrimethyleneposition#1#2#3#4{%
947 \@forsemicol\member:=#1\do{%
948 \ifx\member\empty\else
949 \expandafter\@m@mb@r\member;\relax%
950 \expandafter\twoch@r\@membera{}%
951 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
952 \ifcase\@tmpaa%
953 \or \def\aaa{@}%\def\aaa{\@memberb}%
954 \or \def\bbb{@}%\def\bbb{\@memberb}%
955 \or \def\ccc{@}%\def\ccc{\@memberb}%
956 \fi\fi}%
957 \@@ylswfalse%%%\@reset@ylsw
958 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
959 \expandafter\threech@r\@membera{}{}%
960 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
961 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
962 \if@@ylsw
963 \ifcase\@tmpaa%0 omit

964 \or
965 \ifcase#3
966 \ifx\aaa\empty
967  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
968 \else
969  \if@linterchainsw%interchain position
970  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
971  \else% terminal position
972  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
973  \fi
974 \fi
975 \or\relax
976 \or
977 \ifx\aaa\empty
978  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
979 \else
980  \if@linterchainsw%interchain position
981  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
982  \else% terminal position
983  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
984  \fi
985 \fi
986 \fi
987 \or
988 \ifx\bbb\empty
989  \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
990 \else
991  \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
992 \fi
993 \or
994 \ifcase#3
995 \ifx\ccc\empty
996  \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
997 \else
998  \if@rinterchainsw%interchain position
999  \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1000  \else
1001  \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3

1002 \fi 1003 \fi 1004 \or

1005 \ifx\ccc\empty
1006  \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1007 \else
1008  \if@rinterchainsw%interchain position
1009  \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1010  \else
1011  \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3

1012 \fi 1013 \fi

1014 \or\relax

1015 \fi

1016 \fi%end of ifcase
1017 \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
1018 \newcount\test@termcnt

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

  command \@@trimethylene.
\set@hetatom@methyl
1019 \def\set@hetatom@methyl#1#2#3#4#5{%
1020 \@forsemicol\member:=#1\do{%
1021 \ifx\member\empty\else
1022 \expandafter\@m@mb@r\member;\relax%
1023 %\expandafter\twoch@r\@membera{}%
1024 \expandafter\twoCH@R\@membera//%
1025 \ifnum#5 < 0\relax%
1026 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
1027 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
1028 \ifnum\@tmpaa >#3\relax%
1029 \ifnum\@tmpaa <#4\relax%
1030 \ifcase\@tmpaa%
1031 \or%position 1 <--- position 6 of set@hetatom@sixv
1032 \ifnum\test@termcnt=1\else%not terminal point (left)
1033 \if\@tmpb h\relax%
1034  \@acliptrue%
1035  \putlatom{0}{30}{\@memberb}%  % right type
1036 \else\if\@tmpb s\relax%
1037  \@aclipfalse%
1038 %     \putlatom{-4}{0}{\@memberb}%  % right type
1039  \putlatom{0}{0}{\@memberb}%  % right type
1040 \else\if\@tmpb a\relax%omit fused position
1041 \else
1042  \@acliptrue%
1043  \putlatom{36}{-23}{\@memberb}% % left type
1044 \fi\fi\fi

1045 \fi

1046 \or%position 2 <--- position 1 of set@hetatom@sixv
1047 \if\@tmpb h\relax%
1048  \@bcliptrue%
1049  \putratom{171}{53}{\@memberb}%  % right type
1050 \else\if\@tmpb s\relax%
1051  \@bclipfalse%
1052  \putratom{171}{103}{\@memberb}%  % right type
1053 \else\if\@tmpb a\relax%omit fused position
1054 \else
1055  \@bcliptrue%
1056 %     \putratom{140}{53}{\@memberb}%  % right type
1057  \putratom{140}{65}{\@memberb}%  % right type
1058 \fi\fi\fi
1059 \or%position 3 <--- position 2 of set@hetatom@sixv
1060 \ifnum\test@termcnt=2\else%not terminal point (right)
1061 \if\@tmpb h\relax
1062  \@ccliptrue%

1063 %     \putratom{320}{30}{\@memberb}%  % right type
1064  \putratom{330}{30}{\@memberb}%  % right type
1065 \else\if\@tmpb s\relax
1066  \@cclipfalse%
1067  \putratom{346}{0}{\@memberb}%  % right type
1068 \else\if\@tmpb a\relax%omit fused position
1069 \else
1070  \@ccliptrue%
1071  \putratom{306}{-23}{\@memberb}%  % right type
1072 \fi\fi\fi

1073 \fi

1074 \fi% end of ifcase
1075 \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.

1076 \def\trimethylene{%
1077 \@ifnextchar[{\@trimethylene[@}{\@trimethylene[]}}
1078 \def\@trimethylene[#1]#2#3{%
1079 \iniflag\iniatom%
1080 \@reset@ylsw%
1081 \reset@interchainsw%
1082 \yltrimethyleneposition{#2}{#3}{0}{0}%
1083 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1084 (450,480)(-50,-180){trimethylene}%2002/4/30 by S. Fujita
1085 (50,180)%
1086 \reset@double%
1087 \@tfor\member:=#1\do{%
1088 \if\member a\relax
1089 \@adoublebondtrue

1090 \else\if\member b\relax
1091 \@bdoublebondtrue
1092 \else\if\member A\relax
1093 \@Adoublebondtrue
1094 \else\if\member B\relax
1095 \@Bdoublebondtrue
1096 \else
1097 \expandafter\twoCH@@R\member//%
1098  \set@fusion@trimeth
1099 \fi\fi\fi\fi}%
1100 \@wrongbdWatrue
1101 \@wrongbdWdfalse
1102 \Put@Direct(0,0){\@@trimethylene{#2}{#3}{0}{0}}%
1103 \end{ShiftPicEnv}%
1104 }% 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
1105 \def\set@fusion@trimeth{%
1106 % %%%%%%%%%%%%%%%%%%%%%
1107 % % inner bond fusion %
1108 % %%%%%%%%%%%%%%%%%%%%%
1109 \if\@@tmpa a\relax%
1110  \putlratom{0}{0}{\@@tmpb}%     % bond fused
1111  \FuseWarning{-171}{-103}%
1112  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1113  \else\if\@@tmpa A\relax%
1114  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1115  \FuseWarning{171}{103}%
1116  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1117  \else\if\@@tmpa b\relax%
1118  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1119  \FuseWarning{-171}{103}%
1120  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1121  \else\if\@@tmpa B\relax%
1122  \putlratom{342}{0}{\@@tmpb}%    % bond fused
1123  \FuseWarning{171}{-103}%
1124  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1125 \fi\fi\fi\fi
1126 }% 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
1127 \def\@@trimethylenei#1#2#3#4{%
1128 \leavevmode
1129 \iniatom\iniflag%initialize
1130 \test@vrtx@trimethy{#1}{#4}%
1131 %\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
1132 \begin{sfpicture}(450,480)(0,0)
1133 % %%%%%%%%%%%%%%%%%%
1134 % % outer skeleton %
1135 % %%%%%%%%%%%%%%%%%%
1136 \Put@Direct(171,0){\SKbondAi}% bond between 1 and 2
1137 \Put@Direct(171,0){\SKbondBi}% bond between 2 and 3
1138 % %%%%%%%%%%%%%%%%%%%%%
1139 % % inner double bond %
1140 % %%%%%%%%%%%%%%%%%%%%%
1141 \if@adoublebond\relax\Put@Direct(171,0){\bondAi}\fi
1142 \if@bdoublebond\relax\Put@Direct(171,0){\bondBi}\fi
1143 \if@Adoublebond\relax\Put@Direct(171,0){\bondAAi}\fi
1144 \if@Bdoublebond\relax\Put@Direct(171,0){\bondBBi}\fi
1145 % %%%%%%%%%%%%%%%%%%%%%%%%
1146 % % setting hetero atoms %
1147 % %%%%%%%%%%%%%%%%%%%%%%%%
1148 \test@termcnt=#3\relax
1149 %\set@hetatom@methyli{#1}{0}{0}{4}{0}%
1150 \set@hetatom@methyli{#1}{#4}{0}{4}{0}%
1151 % %%%%%%%%%%%%%%%%%%%%%%%%
1152 % % setting substituents %
1153 % %%%%%%%%%%%%%%%%%%%%%%%%
1154 \@forsemicol\member:=#2\do{%
1155 \ifx\member\empty\else
1156 \expandafter\@m@mb@r\member;\relax%
1157 \expandafter\threech@r\@membera{}{}%
1158 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1159 \ifx\@memberb\@yl\else
1160 \ifcase\@tmpaa%0 omit

1161 \or

1162 \ifcase#3
1163 \Put@Direct(0,-303){\@methsubstaL}%
1164 \or\relax

1165 \or

1166 \Put@Direct(0,-303){\@methsubstaL}%

1167 \fi 1168 \or

1169 {\if@bclip \@cliptrue \else \@clipfalse\fi
1170 \Put@Direct(171,0){\@methsubstd}}%

1171 \or

1172 \ifcase#3
1173 {\if@cclip \@acliptrue\else \@aclipfalse\fi
1174 \Put@Direct(342,-303){\@methsubsta}}%

1175 \or

1176 {\if@cclip \@acliptrue\else \@aclipfalse\fi
1177 \Put@Direct(342,-303){\@methsubsta}}%
1178 \or\relax

1179 \fi

1180 \fi%end of ifcase
1181 \fi\fi

1182 }%

1183 \end{sfpicture}}% 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

1184 %

1185 \def\yltrimethyleneiposition#1#2#3#4{%
1186 \@forsemicol\member:=#1\do{%
1187 \ifx\member\empty\else
1188 \expandafter\@m@mb@r\member;\relax%
1189 %\expandafter\twoch@r\@membera{}%
1190 \expandafter\twoCH@R\@membera//%
1191 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1192 \ifcase\@tmpaa%
1193 \or \def\aaa{@}%\def\aaa{\@memberb}%
1194 \or \def\bbb{@}%\def\bbb{\@memberb}%
1195 \or \def\ccc{@}%\def\ccc{\@memberb}%
1196 \fi%
1197 \fi}%
1198 \@@ylswfalse%%%\@reset@ylsw
1199 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
1200 \expandafter\threech@r\@membera{}{}%

1201 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1202 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1203 \if@@ylsw
1204 \ifcase\@tmpaa%0 omit
1205 \or%%%%%%position 1
1206 \ifcase#3
1207 \ifx\aaa\empty
1208 %%    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1209  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1210 \else
1211  \if@linterchainsw%interchain position
1212 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1213  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1214  \else% terminal position
1215 %%     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1216  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1217 \fi 1218 \fi

1219 \or\relax

1220 \or

1221 \ifx\aaa\empty
1222 %%    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1223  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1224 \else
1225  \if@linterchainsw%interchain position
1226  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1227 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1228  \else% terminal position
1229 %%     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1230  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1231 \fi 1232 \fi 1233 \fi

1234 \or%%%%%%%%position 2
1235 \ifx\bbb\empty
1236 %%    \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1237  \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
1238 \else
1239 %%    \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1240  \gdef\@ylii{-171}\gdef\@yli{50}\global\@ylswtrue% subst. on 2

1241 \fi

1242 \or%%%%%%%%position 3
1243 \ifcase#3
1244 \ifx\ccc\empty
1245 %%    \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1246  \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
1247 \else
1248  \if@rinterchainsw%interchain position
1249 %%     \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1250  \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
1251  \else
1252 %%     \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
1253  \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3

1254 \fi 1255 \fi 1256 \or

1257 \ifx\ccc\empty
1258 %    \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1259  \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
1260 \else
1261  \if@rinterchainsw%interchain position
1262 %     \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1263  \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
1264  \else
1265 %     \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
1266  \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3

1267 \fi 1268 \fi

1269 \or\relax

1270 \fi

1271 \fi%end of ifcase
1272 \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
1273 \def\set@hetatom@methyli#1#2#3#4#5{%
1274 \@forsemicol\member:=#1\do{%
1275 \ifx\member\empty\else
1276 \expandafter\@m@mb@r\member;\relax%
1277 \expandafter\twoch@r\@membera{}%
1278 \ifnum#5 < 0\relax%
1279 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
1280 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
1281 \ifnum\@tmpaa >#3\relax%
1282 \ifnum\@tmpaa <#4\relax%
1283 \ifcase\@tmpaa%
1284 \or%position 1 <-- \set@hetatom@sixv position 5
1285 \ifnum\test@termcnt=1\else%not terminal point (left)
1286 \if\@tmpb h\relax
1287  \@acliptrue%
1288  \putlatom{0}{70}{\@memberb}%  % right type
1289 \else\if\@tmpb s\relax
1290  \@aclipfalse%
1291  \putlatom{0}{103}{\@memberb}%  % right type
1292 \else\if\@tmpb a\relax%omit fused position
1293 \else
1294  \@acliptrue%
1295  \putlatom{36}{65}{\@memberb}%  % left type
1296 \fi\fi\fi

1297 \fi

1298 \or%position 2 <-- \set@hetatom@sixv position 4
1299 \if\@tmpb h\relax
1300  \@bcliptrue%
1301  \putratom{171}{50}{\@memberb}%  % right type
1302 \else\if\@tmpb s\relax
1303  \@bclipfalse%

1304  \putratom{171}{0}{\@memberb}%  % right type
1305 \else\if\@tmpb a\relax%omit fused position
1306 \else
1307  \@bcliptrue%
1308 %     \putratom{140}{-10}{\@memberb}%  % right type
1309  \putratom{140}{-23}{\@memberb}%  % right type
1310 \fi\fi\fi
1311 \or%position 3 <-- \set@hetatom@sixv position 3
1312 \ifnum\test@termcnt=2\else%not terminal point (right)
1313 \if\@tmpb h\relax
1314  \@ccliptrue%
1315  \putratom{342}{70}{\@memberb}%  % right type
1316 \else\if\@tmpb s\relax
1317  \@cclipfalse%
1318  \putratom{342}{103}{\@memberb}%  % right type
1319 \else\if\@tmpb a\relax%omit fused position
1320 \else
1321  \@ccliptrue%
1322  \putratom{306}{65}{\@memberb}%   % right type
1323 \fi\fi\fi

1324 \fi

1325 \fi% end of ifcase
1326 \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.

1327 \def\trimethylenei{%
1328 \@ifnextchar[{\@trimethylenei[@}{\@trimethylenei[]}}
1329 \def\@trimethylenei[#1]#2#3{%
1330 \iniflag\iniatom%

1331 \@reset@ylsw%
1332 \reset@interchainsw%
1333 \yltrimethyleneiposition{#2}{#3}{0}{0}%
1334 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1335 (450,480)(-50,-180){trimethylenei}%2002/4/30 by S. Fujita
1336 (50,180)%
1337 \reset@double%
1338 %\@adoublebondfalse
1339 %\@bdoublebondfalse
1340 %\@Adoublebondfalse
1341 %\@Bdoublebondfalse
1342 \@tfor\member:=#1\do{%
1343 \if\member a\relax
1344 \@adoublebondtrue
1345 \else\if\member b\relax
1346 \@bdoublebondtrue
1347 \else\if\member A\relax
1348 \@Adoublebondtrue
1349 \else\if\member B\relax
1350 \@Bdoublebondtrue
1351 \else
1352 \expandafter\twoCH@@R\member//%
1353  \set@fusion@trimethi
1354 \fi\fi\fi\fi}%
1355 \@wrongbdWafalse
1356 \@wrongbdWdtrue
1357 \Put@Direct(0,0){\@@trimethylenei{#2}{#3}{0}{0}}%
1358 \end{ShiftPicEnv}%
1359 }% 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
1360 \def\set@fusion@trimethi{%
1361 % %%%%%%%%%%%%%%%%%%%%%
1362 % % inner bond fusion %
1363 % %%%%%%%%%%%%%%%%%%%%%
1364 \if\@@tmpa a\relax%
1365  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1366  \FuseWarning{-171}{103}%
1367  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1368  \else\if\@@tmpa A\relax%
1369  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1370  \FuseWarning{171}{-103}%
1371  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1372  \else\if\@@tmpa b\relax%
1373  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1374  \FuseWarning{-171}{-103}%
1375  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1376  \else\if\@@tmpa B\relax%
1377  \putlratom{342}{103}{\@@tmpb}%    % bond fused
1378  \FuseWarning{171}{103}%

1379  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1380 \fi\fi\fi\fi
1381 }% 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
1382 \def\@@dimethylene#1#2#3#4{%
1383 \leavevmode
1384 \iniatom\iniflag%initialize
1385 \test@vrtx@dimethy{#1}{#4}%
1386 %\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
1387 \begin{sfpicture}(250,480)(0,0)%
1388 % %%%%%%%%%%%%%%%%%%
1389 % % outer skeleton %
1390 % %%%%%%%%%%%%%%%%%%
1391 \Put@Direct(171,-303){\SKbondA}% bond between 1 and 2
1392 % %%%%%%%%%%%%%%%%%%%%%
1393 % % inner double bond %
1394 % %%%%%%%%%%%%%%%%%%%%%
1395 \if@adoublebond
1396 \Put@Direct(171,-303){\bondA}%upper side double bond
1397 \else\if@Adoublebond
1398 \Put@Direct(171,-303){\bondAA}%lower side double bond
1399 \fi\fi%
1400 % %%%%%%%%%%%%%%%%%%%%%%%%
1401 % % setting hetero atoms %
1402 % %%%%%%%%%%%%%%%%%%%%%%%%
1403 \test@termcnt=#3\relax
1404 %\set@hetatom@methyl{#1}{0}{0}{3}{0}%
1405 \set@hetatom@methyl{#1}{#4}{0}{3}{0}%

1406 % %%%%%%%%%%%%%%%%%%%%%%%%
1407 % % setting substituents %
1408 % %%%%%%%%%%%%%%%%%%%%%%%%
1409 \@forsemicol\member:=#2\do{%
1410 \ifx\member\empty\else
1411 \expandafter\@m@mb@r\member;\relax%
1412 \expandafter\threech@r\@membera{}{}%
1413 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1414 \ifx\@memberb\@yl\else
1415 \ifcase\@tmpaa%0 omit

1416 \or

1417 \ifcase#3
1418 {\if@aclip \@cliptrue \else \@clipfalse\fi
1419 \Put@Direct(0,0){\@methsubstdL}}%
1420 \or\relax

1421 \or

1422 {\if@aclip \@cliptrue \else \@clipfalse\fi
1423 \Put@Direct(0,0){\@methsubstdL}}%

1424 \fi 1425 \or

1426 \ifcase#3
1427 {\if@bclip \@acliptrue \else \@aclipfalse\fi
1428 \Put@Direct(171,-303){\@methsubsta}}%

1429 \or

1430 {\if@bclip \@acliptrue \else \@aclipfalse\fi
1431 \Put@Direct(171,-303){\@methsubsta}}%
1432 \or\relax

1433 \fi

1434 \fi%end of ifcase
1435 \fi\fi%

1436 }%

1437 \end{sfpicture}}% end of \@@dimethylene
\test@vrtx@dimethy
1438 \def\test@vrtx@dimethy#1#2{%
1439 \@forsemicol\member:=#1\do{%
1440 \ifx\member\empty\else
1441 \expandafter\@m@mb@r\member;\relax%
1442 \expandafter\twoch@r\@membera{}%
1443 \@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
1444 \ifcase\@tmpaa%
1445 \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
1446  \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
1447 \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
1448  \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
1449 \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

1450 %

1451 \def\yldimethyleneposition#1#2#3#4{%
1452 \@forsemicol\member:=#1\do{%
1453 \ifx\member\empty\else
1454 \expandafter\@m@mb@r\member;\relax%
1455 \expandafter\twoch@r\@membera{}%
1456 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1457 \ifcase\@tmpaa%
1458 \or \def\aaa{\@memberb}%
1459 \or \def\bbb{\@memberb}%
1460 \fi\fi}%
1461 \@@ylswfalse%%%\@reset@ylsw
1462 \@forsemicol\member:=#2\do{%
1463 \ifx\member\empty\else
1464 \expandafter\@m@mb@r\member;\relax%
1465 \expandafter\threech@r\@membera{}{}%
1466 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1467 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1468 \if@@ylsw
1469 \ifcase\@tmpaa%0 omit

1470 \or

1471 \ifcase#3
1472 \ifx\aaa\empty
1473 %    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1474  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1475 \else
1476  \if@linterchainsw%interchain position
1477  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1478  \else%terminal position
1479  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1

1480 \fi 1481 \fi

1482 \or\relax

1483 \or

1484 \ifx\aaa\empty
1485  \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1486 \else
1487  \if@linterchainsw%interchain position
1488  \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1489  \else%terminal position
1490  \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1

1491 \fi 1492 \fi 1493 \fi 1494 \or

1495 \ifcase#3
1496 \ifx\bbb\empty
1497  \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1498 \else
1499  \if@rinterchainsw%interchain position
1500  \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1501  \else%terminal position
1502  \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2

1503 \fi 1504 \fi 1505 \or

1506 \ifx\bbb\empty
1507  \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1508 \else
1509  \if@rinterchainsw%interchain position
1510  \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1511  \else%terminal position
1512  \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2

1513 \fi 1514 \fi

1515 \or \relax

1516 \fi

1517 \fi%end of ifcase
1518 \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.

1519 \def\dimethylene{%
1520 \@ifnextchar[{\@dimethylene[@}{\@dimethylene[]}}
1521 \def\@dimethylene[#1]#2#3{%
1522 \iniflag\iniatom%

1523 \@reset@ylsw%
1524 \reset@interchainsw%
1525 \yldimethyleneposition{#2}{#3}{0}{0}%
1526 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1527 (250,480)(-50,-180){dimethylene}%2002/4/30 by S. Fujita
1528 (50,180)%
1529 \reset@double%
1530 \@tfor\member:=#1\do{%
1531 \if\member a\relax
1532 \@adoublebondtrue
1533 \else\if\member A\relax
1534 \@Adoublebondtrue
1535 \else
1536 \expandafter\twoCH@@R\member//%
1537  \set@fusion@dimeth
1538 \fi\fi}%
1539 \@wrongbdWafalse
1540 \@wrongbdWdfalse
1541 \Put@Direct(0,0){\@@dimethylene{#2}{#3}{0}{0}}%
1542 \end{ShiftPicEnv}%
1543 }% 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
1544 \def\set@fusion@dimeth{%
1545 % %%%%%%%%%%%%%%%%%%%%%
1546 % % inner bond fusion %
1547 % %%%%%%%%%%%%%%%%%%%%%
1548 \if\@@tmpa a\relax%
1549  \putlratom{0}{0}{\@@tmpb}%     % bond fused
1550  \FuseWarning{-171}{-103}%
1551  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1552 \else\if\@@tmpa A\relax%
1553  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1554  \FuseWarning{171}{103}%
1555  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1556 \fi\fi
1557 }% 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
1558 \def\@@dimethylenei#1#2#3#4{%
1559 \leavevmode
1560 \iniatom\iniflag%initialize
1561 \test@vrtx@dimethy{#1}{#4}%
1562 %\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
1563 \begin{sfpicture}(250,480)(0,0)%
1564 % %%%%%%%%%%%%%%%%%%
1565 % % outer skeleton %
1566 % %%%%%%%%%%%%%%%%%%
1567 \Put@Direct(171,0){\SKbondAi}% bond between 1 and 2
1568 % %%%%%%%%%%%%%%%%%%%%%
1569 % % inner double bond %
1570 % %%%%%%%%%%%%%%%%%%%%%
1571 \if@adoublebond
1572 \Put@Direct(171,0){\bondAi}%upper side double bond
1573 \else\if@Adoublebond
1574 \Put@Direct(171,0){\bondAAi}%lower side double bond
1575 \fi\fi%
1576 % %%%%%%%%%%%%%%%%%%%%%%%%
1577 % % setting hetero atoms %
1578 % %%%%%%%%%%%%%%%%%%%%%%%%
1579 \test@termcnt=#3\relax
1580 %\set@hetatom@methyli{#1}{0}{0}{3}{0}%
1581 \set@hetatom@methyli{#1}{#4}{0}{3}{0}%
1582 % %%%%%%%%%%%%%%%%%%%%%%%%
1583 % % setting substituents %
1584 % %%%%%%%%%%%%%%%%%%%%%%%%
1585 \@forsemicol\member:=#2\do{%
1586 \ifx\member\empty\else
1587 \expandafter\@m@mb@r\member;\relax%
1588 \expandafter\threech@r\@membera{}{}%
1589 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1590 \ifx\@memberb\@yl\else
1591 \ifcase\@tmpaa%0 omit

1592 \or

1593 \ifcase#3
1594 \Put@Direct(0,-303){\@methsubstaL}%
1595 \or\relax

1596 \or

1597 \Put@Direct(0,-303){\@methsubstaL}%

1598 \fi 1599 \or

1600 \ifcase#3
1601 {\if@bclip \@cliptrue \else \@clipfalse\fi
1602 \Put@Direct(171,0){\@methsubstd}}%

1603 \or

1604 {\if@bclip \@cliptrue \else \@clipfalse\fi
1605 \Put@Direct(171,0){\@methsubstd}}%
1606 \or\relax

1607 \fi

1608 \fi%end of ifcase
1609 \fi\fi%

1610 }%

1611 \end{sfpicture}}% 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

1612 %

1613 \def\yldimethyleneiposition#1#2#3#4{%
1614 \@forsemicol\member:=#1\do{%
1615 \ifx\member\empty\else
1616 \expandafter\@m@mb@r\member;\relax%
1617 \expandafter\twoch@r\@membera{}%
1618 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1619 \ifcase\@tmpaa%
1620 \or \def\aaa{\@memberb}%
1621 \or \def\bbb{\@memberb}%
1622 \fi\fi}%
1623 \@@ylswfalse%%%\@reset@ylsw
1624 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
1625 \expandafter\threech@r\@membera{}{}%
1626 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1627 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1628 \if@@ylsw
1629 \ifcase\@tmpaa%0 omit
1630 \or%%%%%%%%position 1
1631 \ifcase#3
1632 \ifx\aaa\empty
1633 %    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1

1634  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1635 \else
1636  \if@linterchainsw%interchain position
1637 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1638  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1639  \else%terminal position
1640 %     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1641  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1642 \fi 1643 \fi

1644 \or\relax

1645 \or

1646 \ifx\aaa\empty
1647 %    \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1648  \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
1649 \else
1650  \if@linterchainsw%interchain position
1651 %     \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1652  \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
1653  \else%terminal position
1654 %     \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1655  \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1

1656 \fi 1657 \fi 1658 \fi

1659 \or%%%%%%%%position 2
1660 \ifcase#3
1661 \ifx\bbb\empty
1662 %    \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1663  \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
1664 \else
1665  \if@rinterchainsw%interchain position
1666 %     \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1667  \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
1668  \else%terminal position
1669 %    \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
1670  \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2

1671 \fi 1672 \fi 1673 \or

1674 \ifx\bbb\empty
1675 %    \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1676  \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
1677 \else
1678  \if@rinterchainsw%interchain position
1679 %     \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1680  \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
1681  \else%terminal position
1682 %     \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
1683  \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2

1684 \fi 1685 \fi

1686 \or \relax

1687 \fi

1688 \fi%end of ifcase
1689 \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.

1690 \def\dimethylenei{%
1691 \@ifnextchar[{\@dimethylenei[@}{\@dimethylenei[]}}
1692 \def\@dimethylenei[#1]#2#3{%
1693 \iniflag\iniatom%
1694 \@reset@ylsw%
1695 \reset@interchainsw%
1696 \yldimethyleneiposition{#2}{#3}{0}{0}%
1697 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1698 (250,480)(-50,-180){dimethylenei}%2002/4/30 by S. Fujita
1699 (50,180)%
1700 \reset@double%
1701 \@tfor\member:=#1\do{%
1702 \if\member a\relax
1703 \@adoublebondtrue
1704 \else\if\member A\relax
1705 \@Adoublebondtrue
1706 \else
1707 \expandafter\twoCH@@R\member//%
1708  \set@fusion@dimethi
1709 \fi\fi}%
1710 \@wrongbdWafalse
1711 \@wrongbdWdfalse
1712 \Put@Direct(0,0){\@@dimethylenei{#2}{#3}{0}{0}}%
1713 \end{ShiftPicEnv}%
1714 }% 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
1715 \def\set@fusion@dimethi{%
1716 % %%%%%%%%%%%%%%%%%%%%%
1717 % % inner bond fusion %
1718 % %%%%%%%%%%%%%%%%%%%%%
1719 \if\@@tmpa a\relax%
1720  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1721  \FuseWarning{-171}{103}%
1722  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1723 \else\if\@@tmpa A\relax%
1724  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1725  \FuseWarning{171}{-103}%
1726  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1727 \fi\fi
1728 }% 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.

1729 \def\tetramethylene{%
1730 \@ifnextchar[{\@tetramethylene[@}{\@tetramethylene[]}}
1731 \def\@tetramethylene[#1]#2#3{%
1732 \iniflag\iniatom%
1733 \@reset@ylsw%
1734 {\@linterchainswfalse%
1735 \@rinterchainswtrue%
1736 \yltrimethyleneposition{#2}{#3}{0}{0}}%
1737 \if@ylsw \ifx\@@ylii\empty
1738 \def\@@ylii{0}\def\@@yli{0}\fi
1739 \else
1740 {\@rinterchainswfalse%
1741 \@linterchainswtrue%
1742 \yldimethyleneposition{#2}{#3}{1}{-2}}%
1743 \if@ylsw \ifx\@@ylii\empty
1744 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

1745 \fi

1746 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1747 (900,480)(-200,-180){tetramethylene}%2002/4/30 by S. Fujita
1748 (200,180)%
1749 {\reset@double%
1750 \@tfor\member:=#1\do{%
1751 \if\member a\relax
1752 \@adoublebondtrue
1753 \else\if\member b\relax
1754 \@bdoublebondtrue
1755 \else\if\member A\relax
1756 \@Adoublebondtrue
1757 \else\if\member B\relax
1758 \@Bdoublebondtrue
1759 \else\if\member c\relax%dummy
1760 \else\if\member C\relax%dummy
1761 \else
1762 \expandafter\twoCH@@R\member//%
1763  \set@fusion@tetrameth
1764 \fi\fi
1765 \fi\fi\fi\fi}%
1766 \@wrongbdWatrue
1767 \@wrongbdWdtrue
1768 \Put@Direct(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
1769 {\reset@double%
1770 \@tfor\member:=#1\do{%
1771 \if\member c\relax
1772 \@adoublebondtrue
1773 \else\if\member C\relax
1774 \@Adoublebondtrue
1775 \fi\fi}%
1776 \@wrongbdWafalse
1777 \@wrongbdWdtrue
1778 \Put@Direct(342,0){\@@dimethylene{#2}{#3}{1}{-2}}}%
1779 \end{ShiftPicEnvB}%
1780 }% 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
1781 \def\set@fusion@tetrameth{%
1782 % %%%%%%%%%%%%%%%%%%%%%
1783 % % inner bond fusion %
1784 % %%%%%%%%%%%%%%%%%%%%%
1785 \if\@@tmpa a\relax%
1786  \putlratom{0}{0}{\@@tmpb}%     % bond fused
1787  \FuseWarning{-171}{-103}%
1788  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1789  \else\if\@@tmpa A\relax%
1790  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1791  \FuseWarning{171}{103}%
1792  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1793  \else\if\@@tmpa b\relax%
1794  \putlratom{171}{103}{\@@tmpb}%       % bond fused
1795  \FuseWarning{-171}{103}%
1796  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1797  \else\if\@@tmpa B\relax%
1798  \putlratom{342}{0}{\@@tmpb}%    % bond fused
1799  \FuseWarning{171}{-103}%
1800  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1801  \else\if\@@tmpa c\relax%
1802  \putlratom{342}{0}{\@@tmpb}%     % bond fused
1803  \FuseWarning{-171}{-103}%
1804  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
1805  \else\if\@@tmpa C\relax%
1806  \putlratom{513}{103}{\@@tmpb}%       % bond fused
1807  \FuseWarning{171}{103}%
1808  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
1809 \fi\fi
1810 \fi\fi\fi\fi
1811 }% 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.

1812 \def\tetramethylenei{%
1813 \@ifnextchar[{\@tetramethylenei[@}{\@tetramethylenei[]}}
1814 \def\@tetramethylenei[#1]#2#3{%
1815 \iniflag\iniatom%
1816 \@reset@ylsw%
1817 {\@linterchainswfalse%
1818 \@rinterchainswtrue%
1819 \yltrimethyleneiposition{#2}{#3}{0}{0}}%
1820 \if@ylsw \ifx\@@ylii\empty
1821 \def\@@ylii{0}\def\@@yli{0}\fi
1822 \else
1823 {\@rinterchainswfalse%
1824 \@linterchainswtrue%
1825 \yldimethyleneiposition{#2}{#3}{1}{-2}}%
1826 \if@ylsw \ifx\@@ylii\empty
1827 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

1828 \fi

1829 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1830 (900,480)(-200,-180){tetramethylenei}%2002/4/30 by S. Fujita
1831 (200,180)%
1832 {\reset@double%
1833 \@tfor\member:=#1\do{%
1834 \if\member a\relax
1835 \@adoublebondtrue
1836 \else\if\member b\relax
1837 \@bdoublebondtrue
1838 \else\if\member A\relax
1839 \@Adoublebondtrue
1840 \else\if\member B\relax
1841 \@Bdoublebondtrue
1842 \else\if\member c\relax%dummy
1843 \else\if\member C\relax%dummy
1844 \else
1845 \expandafter\twoCH@@R\member//%
1846  \set@fusion@tetramethi
1847 \fi\fi
1848 \fi\fi\fi\fi}%
1849 \@wrongbdWatrue

1850 \@wrongbdWdtrue
1851 \Put@Direct(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}%
1852 {\reset@double%
1853 \@tfor\member:=#1\do{%
1854 \if\member c\relax
1855 \@adoublebondtrue
1856 \else\if\member C\relax
1857 \@Adoublebondtrue
1858 \fi\fi}%
1859 \@wrongbdWatrue
1860 \@wrongbdWdfalse
1861 \Put@Direct(342,0){\@@dimethylenei{#2}{#3}{1}{-2}}}%
1862 \end{ShiftPicEnvB}%
1863 }%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
1864 \def\set@fusion@tetramethi{%
1865 % %%%%%%%%%%%%%%%%%%%%%
1866 % % inner bond fusion %
1867 % %%%%%%%%%%%%%%%%%%%%%
1868 \if\@@tmpa a\relax%
1869  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1870  \FuseWarning{-171}{103}%
1871  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1872  \else\if\@@tmpa A\relax%
1873  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1874  \FuseWarning{171}{-103}%
1875  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1876  \else\if\@@tmpa b\relax%
1877  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1878  \FuseWarning{-171}{-103}%
1879  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1880  \else\if\@@tmpa B\relax%
1881  \putlratom{342}{103}{\@@tmpb}%    % bond fused
1882  \FuseWarning{171}{103}%
1883  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1884  \else\if\@@tmpa c\relax%
1885  \putlratom{342}{103}{\@@tmpb}%     % bond fused
1886  \FuseWarning{-171}{103}%
1887  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
1888  \else\if\@@tmpa C\relax%
1889  \putlratom{513}{0}{\@@tmpb}%       % bond fused
1890  \FuseWarning{171}{-103}%
1891  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
1892 \fi\fi
1893 \fi\fi\fi\fi
1894 }% 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
1895 \def\tetramethylenecup{%
1896 \@ifnextchar[{\@tetramethylenecup[@}{\@tetramethylenecup[]}}
1897 \def\@tetramethylenecup[#1]#2#3{%
1898 \iniflag\iniatom%
1899 \@reset@ylsw%
1900 {\@linterchainswfalse%
1901 \@rinterchainswtrue%
1902 \yldimethyleneiposition{#2}{#3}{0}{0}}%
1903 \if@ylsw \ifx\@@ylii\empty
1904 \def\@@ylii{0}\def\@@yli{0}\fi
1905 \else
1906 {\@rinterchainswfalse%
1907 \@linterchainswtrue%
1908 \yldimethyleneposition{#2}{#3}{0}{-2}}%

1909 \fi

1910 \if@ylsw \ifx\@@ylii\empty
1911 \def\@@ylii{-371}\def\@@yli{0}\fi\fi
1912 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%

1913 (900,480)(-200,-180){tetramethylenecup}%2002/4/30 by S. Fujita
1914 (200,180)%
1915 %bond a and atoms 1 and 2
1916 {\reset@double%
1917 \@tfor\member:=#1\do{%
1918 \if\member a\relax
1919 \@adoublebondtrue
1920 \else\if\member A\relax
1921 \@Adoublebondtrue
1922 \else\if\member b\relax%dummy
1923 \else\if\member B\relax%dummy
1924 \else\if\member c\relax%dummy
1925 \else\if\member C\relax%dummy
1926 \else
1927 \expandafter\twoCH@@R\member//%
1928  \set@fusion@tetracup% for all bonds
1929 \fi\fi\fi\fi
1930 \fi\fi}%
1931 \@wrongbdWafalse
1932 \@wrongbdWdtrue
1933 \Put@Direct(0,0){\@@dimethylenei{#2}{#3}{0}{0}}}%
1934 %bond b
1935 {\@forsemicol\member:=#2\do{%
1936 \ifx\member\empty\else
1937 \expandafter\@m@mb@r\member;\relax%
1938 \expandafter\twoch@r\@membera{}%
1939 \ifcase\@tmpa%
1940 \or \relax%
1941 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
1942  \xdef\fff{@}\xdef\bbb{@}\else
1943  \xdef\fff{@}\xdef\bbb{@}\fi\fi
1944 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
1945  \xdef\eee{@}\xdef\ccc{@}\else
1946  \xdef\eee{@}\xdef\ccc{@}\fi\fi
1947 \fi\fi}%
1948 \Put@Direct(68,171){\hskbonde}%
1949 \reset@double%
1950 \@tfor\member:=#1\do{%
1951 \if\member b\relax
1952 \@bdoublebondtrue
1953 \Put@Direct(68,171){\hbonde}%
1954 \else\if\member B\relax
1955 \@bdoublebondtrue
1956 \Put@Direct(68,-171){\hbondb}%
1957 \fi\fi}}%
1958 %bond c and atoms 3 and 4
1959 {\reset@double%
1960 \@tfor\member:=#1\do{%
1961 \if\member c\relax
1962 \@adoublebondtrue
1963 \else\if\member C\relax
1964 \@Adoublebondtrue
1965 \else\if\member d\relax
1966 \@bdoublebondtrue

1967 \else\if\member D\relax
1968 \@Bdoublebondtrue
1969 \fi\fi\fi\fi}%
1970 \@wrongbdWafalse
1971 \@wrongbdWdLtrue
1972 \Put@Direct(371,0){\@@dimethylene{#2}{#3}{0}{-2}}}%
1973 \end{ShiftPicEnvB}%
1974 }% 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
1975 \def\set@fusion@tetracup{%
1976 % %%%%%%%%%%%%%%%%%%%%%
1977 % % inner bond fusion %
1978 % %%%%%%%%%%%%%%%%%%%%%
1979 \if\@@tmpa a\relax%
1980  \putlratom{0}{103}{\@@tmpb}%     % bond fused
1981  \FuseWarning{-171}{103}%
1982  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
1983  \else\if\@@tmpa A\relax%
1984  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1985  \FuseWarning{171}{-103}%
1986  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
1987  \else\if\@@tmpa b\relax%
1988  \putlratom{171}{0}{\@@tmpb}%       % bond fused
1989  \FuseWarning{-200}{0}%
1990  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
1991  \else\if\@@tmpa B\relax%
1992  \putlratom{371}{0}{\@@tmpb}%    % bond fused
1993  \FuseWarning{200}{0}%
1994  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
1995  \else\if\@@tmpa c\relax%
1996  \putlratom{371}{0}{\@@tmpb}%     % bond fused
1997  \FuseWarning{-171}{-103}%
1998  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
1999  \else\if\@@tmpa C\relax%
2000  \putlratom{542}{103}{\@@tmpb}%       % bond fused
2001  \FuseWarning{171}{103}%
2002  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2003 \fi\fi
2004 \fi\fi\fi\fi
2005 }% end of the macro \set@fusion@tetracup
\tetramethylenecap
\@tetramethylenecap
2006 \def\tetramethylenecap{%
2007 \@ifnextchar[{\@tetramethylenecap[@}{\@tetramethylenecap[]}}
2008 \def\@tetramethylenecap[#1]#2#3{%
2009 \iniflag\iniatom%
2010 \@reset@ylsw%
2011 {\@linterchainswfalse%
2012 \@rinterchainswtrue%

2013 \yldimethyleneposition{#2}{#3}{0}{0}}%
2014 \if@ylsw \ifx\@@ylii\empty
2015 \def\@@ylii{0}\def\@@yli{0}\fi
2016 \else
2017 {\@rinterchainswfalse%
2018 \@linterchainswtrue%
2019 \yldimethyleneiposition{#2}{#3}{0}{-2}}%

2020 \fi

2021 \if@ylsw \ifx\@@ylii\empty
2022 \def\@@ylii{-371}\def\@@yli{0}\fi\fi
2023 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2024 (900,480)(-200,-180){tetramethylenecap}%2002/4/30 by S. Fujita
2025 (200,180)%
2026 {\reset@double%
2027 \@tfor\member:=#1\do{%
2028 \if\member a\relax
2029 \@adoublebondtrue
2030 \else\if\member A\relax
2031 \@Adoublebondtrue
2032 \else\if\member b\relax%dummy
2033 \else\if\member B\relax%dummy
2034 \else\if\member c\relax%dummy
2035 \else\if\member C\relax%dummy
2036 \else
2037 \expandafter\twoCH@@R\member//%
2038  \set@fusion@tetracap% for all bonds
2039 \fi\fi\fi\fi
2040 \fi\fi}%
2041 \@wrongbdWatrue
2042 \Put@Direct(0,0){\@@dimethylene{#2}{#3}{0}{0}}}%
2043 {\@forsemicol\member:=#2\do{%
2044 \ifx\member\empty\else
2045 \expandafter\@m@mb@r\member;\relax%
2046 \expandafter\twoch@r\@membera{}%
2047 \ifcase\@tmpa%
2048 \or \relax%
2049 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
2050  \xdef\fff{@}\xdef\bbb{@}\else
2051  \xdef\fff{@}\xdef\bbb{@}\fi\fi
2052 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
2053  \xdef\eee{@}\xdef\ccc{@}\else
2054  \xdef\eee{@}\xdef\ccc{@}\fi\fi
2055 \fi\fi}%
2056 \Put@Direct(68,-68){\hskbondb}%
2057 \reset@double%
2058 \@tfor\member:=#1\do{%
2059 \if\member b\relax
2060 \@bdoublebondtrue
2061 \Put@Direct(68,-68){\hbondb}%
2062 \else\if\member B\relax
2063 \@bdoublebondtrue
2064 \Put@Direct(68,274){\hbonde}%
2065 \fi\fi}}%
2066 {\reset@double%

2067 \@tfor\member:=#1\do{%
2068 \if\member c\relax
2069 \@adoublebondtrue
2070 \else\if\member C\relax
2071 \@Adoublebondtrue
2072 \else\if\member d\relax
2073 \@bdoublebondtrue
2074 \else\if\member D\relax
2075 \@Bdoublebondtrue
2076 \fi\fi\fi\fi}%
2077 \@wrongbdWaLtrue
2078 \Put@Direct(371,0){\@@dimethylenei{#2}{#3}{0}{-2}}}%
2079 \end{ShiftPicEnvB}%
2080 }% 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
2081 \def\set@fusion@tetracap{%
2082 % %%%%%%%%%%%%%%%%%%%%%
2083 % % inner bond fusion %
2084 % %%%%%%%%%%%%%%%%%%%%%
2085 \if\@@tmpa a\relax%
2086  \putlratom{0}{0}{\@@tmpb}%     % bond fused
2087  \FuseWarning{-171}{-103}%
2088  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2089  \else\if\@@tmpa A\relax%
2090  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2091  \FuseWarning{171}{103}%
2092  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2093  \else\if\@@tmpa b\relax%
2094  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2095  \FuseWarning{-200}{0}%
2096  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2097  \else\if\@@tmpa B\relax%
2098  \putlratom{371}{103}{\@@tmpb}%    % bond fused
2099  \FuseWarning{200}{0}%
2100  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2101  \else\if\@@tmpa c\relax%
2102  \putlratom{371}{103}{\@@tmpb}%     % bond fused
2103  \FuseWarning{-171}{103}%
2104  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
2105  \else\if\@@tmpa C\relax%
2106  \putlratom{542}{0}{\@@tmpb}%       % bond fused
2107  \FuseWarning{171}{-103}%
2108  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2109 \fi\fi
2110 \fi\fi\fi\fi
2111 }% 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.

2112 \def\pentamethylene{%
2113 \@ifnextchar[{\@pentamethylene[@}{\@pentamethylene[]}}
2114 \def\@pentamethylene[#1]#2#3{%
2115 \iniflag\iniatom%
2116 \@reset@ylsw%
2117 {\@linterchainswfalse%
2118 \@rinterchainswtrue%
2119 \yltrimethyleneposition{#2}{#3}{0}{0}}%
2120 \if@ylsw \ifx\@@ylii\empty
2121 \def\@@ylii{0}\def\@@yli{0}\fi
2122 \else
2123 {\@rinterchainswfalse%
2124 \@linterchainswtrue%
2125 \yltrimethyleneposition{#2}{#3}{1}{-2}}%
2126 \if@ylsw \ifx\@@ylii\empty
2127 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

2128 \fi

2129 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2130 (1100,480)(-200,-180){pentamethylene}%2002/4/30 by S. Fujita

2131 (200,180)%
2132 {\reset@double%
2133 \@tfor\member:=#1\do{%
2134 \if\member a\relax
2135 \@adoublebondtrue
2136 \else\if\member b\relax
2137 \@bdoublebondtrue
2138 \else\if\member A\relax
2139 \@Adoublebondtrue
2140 \else\if\member B\relax
2141 \@Bdoublebondtrue
2142 \else\if\member c\relax%dummy
2143 \else\if\member C\relax%dummy
2144 \else\if\member d\relax%dummy
2145 \else\if\member D\relax%dummy
2146 \else
2147 \expandafter\twoCH@@R\member//%
2148  \set@fusion@pentameth% for all bonds
2149 \fi\fi\fi\fi
2150 \fi\fi\fi\fi}%
2151 \@wrongbdWatrue
2152 \@wrongbdWdtrue
2153 \Put@Direct(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
2154 {\reset@double%
2155 \@tfor\member:=#1\do{%
2156 \if\member c\relax
2157 \@adoublebondtrue
2158 \else\if\member d\relax
2159 \@bdoublebondtrue
2160 \else\if\member C\relax
2161 \@Adoublebondtrue
2162 \else\if\member D\relax
2163 \@Bdoublebondtrue
2164 \fi\fi\fi\fi}%
2165 \@wrongbdWatrue
2166 \@wrongbdWdfalse
2167 \Put@Direct(342,0){\@@trimethylene{#2}{#3}{1}{-2}}}%
2168 \end{ShiftPicEnvB}%
2169 }% 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
2170 \def\set@fusion@pentameth{%
2171 % %%%%%%%%%%%%%%%%%%%%%
2172 % % inner bond fusion %
2173 % %%%%%%%%%%%%%%%%%%%%%
2174 \if\@@tmpa a\relax%
2175  \putlratom{0}{0}{\@@tmpb}%     % bond fused
2176  \FuseWarning{-171}{-103}%
2177  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2178  \else\if\@@tmpa A\relax%

2179  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2180  \FuseWarning{171}{103}%
2181  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2182  \else\if\@@tmpa b\relax%
2183  \putlratom{171}{103}{\@@tmpb}%       % bond fused
2184  \FuseWarning{-171}{103}%
2185  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2186  \else\if\@@tmpa B\relax%
2187  \putlratom{342}{0}{\@@tmpb}%    % bond fused
2188  \FuseWarning{171}{-103}%
2189  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2190  \else\if\@@tmpa c\relax%
2191  \putlratom{342}{0}{\@@tmpb}%     % bond fused
2192  \FuseWarning{-171}{-103}%
2193  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
2194  \else\if\@@tmpa C\relax%
2195  \putlratom{513}{103}{\@@tmpb}%       % bond fused
2196  \FuseWarning{171}{103}%
2197  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2198  \else\if\@@tmpa d\relax%
2199  \putlratom{513}{103}{\@@tmpb}%     % bond fused
2200  \FuseWarning{-171}{103}%
2201  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
2202  \else\if\@@tmpa D\relax%
2203  \putlratom{684}{0}{\@@tmpb}%       % bond fused
2204  \FuseWarning{171}{-103}%
2205  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
2206 \fi\fi\fi\fi
2207 \fi\fi\fi\fi
2208 }% 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.

2209 \def\pentamethylenei{%
2210 \@ifnextchar[{\@pentamethylenei[@}{\@pentamethylenei[]}}
2211 \def\@pentamethylenei[#1]#2#3{%
2212 \iniflag\iniatom%
2213 \@reset@ylsw%
2214 {\@linterchainswfalse%
2215 \@rinterchainswtrue%
2216 \yltrimethyleneiposition{#2}{#3}{0}{0}}%
2217 \if@ylsw \ifx\@@ylii\empty
2218 \def\@@ylii{0}\def\@@yli{0}\fi
2219 \else
2220 {\@rinterchainswfalse%
2221 \@linterchainswtrue%
2222 \yltrimethyleneiposition{#2}{#3}{1}{-2}}%
2223 \if@ylsw \ifx\@@ylii\empty
2224 \def\@@ylii{-342}\def\@@yli{0}\fi\fi

2225 \fi

2226 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2227 (1100,480)(-200,-180){pentamethylenei}%2002/4/30 by S. Fujita
2228 (200,180)%
2229 {\reset@double%
2230 \@tfor\member:=#1\do{%
2231 \if\member a\relax
2232 \@adoublebondtrue
2233 \else\if\member b\relax
2234 \@bdoublebondtrue
2235 \else\if\member A\relax
2236 \@Adoublebondtrue
2237 \else\if\member B\relax
2238 \@Bdoublebondtrue
2239 \else\if\member c\relax%dummy
2240 \else\if\member C\relax%dummy
2241 \else\if\member d\relax%dummy
2242 \else\if\member D\relax%dummy
2243 \else
2244 \expandafter\twoCH@@R\member//%
2245  \set@fusion@pentamethi% for all bonds
2246 \fi\fi\fi\fi
2247 \fi\fi\fi\fi}%
2248 \@wrongbdWatrue
2249 \@wrongbdWdtrue

2250 \Put@Direct(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}%
2251 {\reset@double%
2252 \@tfor\member:=#1\do{%
2253 \if\member c\relax
2254 \@adoublebondtrue
2255 \else\if\member d\relax
2256 \@bdoublebondtrue
2257 \else\if\member C\relax
2258 \@Adoublebondtrue
2259 \else\if\member D\relax
2260 \@Bdoublebondtrue
2261 \fi\fi\fi\fi}%
2262 \@wrongbdWafalse
2263 \@wrongbdWdtrue
2264 \Put@Direct(342,0){\@@trimethylenei{#2}{#3}{1}{-2}}}
2265 \end{ShiftPicEnvB}%
2266 }% 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
2267 \def\set@fusion@pentamethi{%
2268 % %%%%%%%%%%%%%%%%%%%%%
2269 % % inner bond fusion %
2270 % %%%%%%%%%%%%%%%%%%%%%
2271 \if\@@tmpa a\relax%
2272  \putlratom{0}{103}{\@@tmpb}%     % bond fused
2273  \FuseWarning{-171}{103}%
2274  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2275  \else\if\@@tmpa A\relax%
2276  \putlratom{171}{0}{\@@tmpb}%       % bond fused
2277  \FuseWarning{171}{-103}%
2278  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2279  \else\if\@@tmpa b\relax%
2280  \putlratom{171}{0}{\@@tmpb}%       % bond fused
2281  \FuseWarning{-171}{-103}%
2282  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2283  \else\if\@@tmpa B\relax%
2284  \putlratom{342}{103}{\@@tmpb}%    % bond fused
2285  \FuseWarning{171}{103}%
2286  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2287  \else\if\@@tmpa c\relax%
2288  \putlratom{342}{103}{\@@tmpb}%     % bond fused
2289  \FuseWarning{-171}{103}%
2290  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
2291  \else\if\@@tmpa C\relax%
2292  \putlratom{513}{0}{\@@tmpb}%       % bond fused
2293  \FuseWarning{171}{103}%
2294  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
2295  \else\if\@@tmpa d\relax%
2296  \putlratom{513}{0}{\@@tmpb}%     % bond fused
2297  \FuseWarning{-171}{-103}%

2298  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
2299  \else\if\@@tmpa D\relax%
2300  \putlratom{684}{103}{\@@tmpb}%       % bond fused
2301  \FuseWarning{171}{103}%
2302  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
2303 \fi\fi\fi\fi
2304 \fi\fi\fi\fi
2305 }% 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
2306 \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
2307 \def\set@normaldirection{%
2308 \@normorinvswfalse
2309 \let\@yltrinormorinv=\yltrimethyleneposition
2310 \let\@yldinormorinv=\yldimethyleneposition
2311 \let\@@trinormorinv=\@@trimethylene
2312 \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
2313 \def\set@inversedirection{%
2314 \@normorinvswtrue
2315 \let\@yltrinormorinv=\yltrimethyleneiposition
2316 \let\@yldinormorinv=\yldimethyleneiposition
2317 \let\@@trinormorinv=\@@trimethylenei
2318 \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
2319 \def\hexamethylene{%
2320 \@ifnextchar[{\set@normaldirection\@hexamethylene[@}{%
2321 \set@normaldirection\@hexamethylene[]}}
\hexamethylenei
2322 \def\hexamethylenei{%
2323 \@ifnextchar[{\set@inversedirection\@hexamethylene[@}{%
2324 \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
2325 \def\@hexamethylene[#1]#2#3{%
2326 \iniflag\iniatom%
2327 \@reset@ylsw%
2328 {\@linterchainswfalse%
2329 \@rinterchainswtrue%
2330 \@yltrinormorinv{#2}{#3}{0}{0}}%
2331 \if@ylsw \ifx\@@ylii\empty
2332 \def\@@ylii{0}\def\@@yli{0}\fi
2333 \else
2334 {\@rinterchainswtrue%
2335 \@linterchainswtrue%
2336 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2337 \fi

2338 \if@ylsw \ifx\@@ylii\empty
2339 \def\@@ylii{-342}\def\@@yli{0}\fi
2340 \else
2341 {\@rinterchainswfalse%
2342 \@linterchainswtrue%
2343 \@yldinormorinv{#2}{#3}{1}{-4}}%

2344 \fi

2345 \if@ylsw \ifx\@@ylii\empty
2346 \def\@@ylii{-684}\def\@@yli{0}\fi\fi
2347 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2348 (1100,480)(-200,-180){hexamethylene}%2002/4/30 by S. Fujita
2349 (200,180)%
2350 {\reset@double%
2351 \@tfor\member:=#1\do{%
2352 \if\member a\relax
2353 \@adoublebondtrue
2354 \else\if\member b\relax
2355 \@bdoublebondtrue
2356 \else\if\member A\relax
2357 \@Adoublebondtrue
2358 \else\if\member B\relax
2359 \@Bdoublebondtrue
2360 \else\if\member c\relax%dummy
2361 \else\if\member C\relax%dummy
2362 \else\if\member d\relax%dummy
2363 \else\if\member D\relax%dummy

2364 \else\if\member e\relax%dummy
2365 \else\if\member E\relax%dummy
2366 \else
2367 \expandafter\twoCH@@R\member//%
2368  \set@fusion@hexameth% for all bonds
2369 \fi\fi\fi\fi\fi\fi
2370 \fi\fi\fi\fi}%
2371 \@wrongbdWatrue
2372 \@wrongbdWdtrue
2373 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2374 {\reset@double%
2375 \@tfor\member:=#1\do{%
2376 \if\member c\relax
2377 \@adoublebondtrue
2378 \else\if\member d\relax
2379 \@bdoublebondtrue
2380 \else\if\member C\relax
2381 \@Adoublebondtrue
2382 \else\if\member D\relax
2383 \@Bdoublebondtrue
2384 \fi\fi\fi\fi}%
2385 \@wrongbdWatrue
2386 \@wrongbdWdtrue
2387 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2388 {\reset@double%
2389 \@tfor\member:=#1\do{%
2390 \if\member e\relax
2391 \@adoublebondtrue
2392 \else\if\member E\relax
2393 \@Adoublebondtrue
2394 \fi\fi}%
2395 \if@normorinvsw% inverse
2396 \@wrongbdWatrue
2397 \@wrongbdWdfalse
2398 \else% normal
2399 \@wrongbdWafalse
2400 \@wrongbdWdtrue

2401 \fi

2402 \Put@Direct(684,0){\@@dinormorinv{#2}{#3}{1}{-4}}}%
2403 \end{ShiftPicEnvB}%
2404 }% 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
2405 \def\set@fusion@hexameth{%
2406 % %%%%%%%%%%%%%%%%%%%%%
2407 % % inner bond fusion %
2408 % %%%%%%%%%%%%%%%%%%%%%
2409 \if@normorinvsw
2410 \if\@@tmpa e\relax%
2411  \putlratom{684}{103}{\@@tmpb}%     % bond fused

2412  \FuseWarning{-171}{103}%
2413  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2414  \else\if\@@tmpa E\relax%
2415  \putlratom{855}{0}{\@@tmpb}%       % bond fused
2416  \FuseWarning{171}{-103}%
2417  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2418  \else
2419  \set@fusion@pentamethi
2420 \fi\fi
2421 \else
2422 \if\@@tmpa e\relax%
2423  \putlratom{684}{0}{\@@tmpb}%     % bond fused
2424  \FuseWarning{-171}{-103}%
2425  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2426  \else\if\@@tmpa E\relax%
2427  \putlratom{855}{103}{\@@tmpb}%       % bond fused
2428  \FuseWarning{171}{103}%
2429  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2430  \else
2431  \set@fusion@pentameth
2432 \fi\fi

2433 \fi

2434 }% 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

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
2435 \def\heptamethylene{%
2436 \@ifnextchar[{\set@normaldirection\@heptamethylene[@}{%
2437 \set@normaldirection\@heptamethylene[]}}
\heptamethylenei
2438 \def\heptamethylenei{%
2439 \@ifnextchar[{\set@inversedirection\@heptamethylene[@}{%
2440 \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
2441 \def\@heptamethylene[#1]#2#3{%
2442 \iniflag\iniatom%

2443 \@reset@ylsw%
2444 {\@linterchainswfalse%
2445 \@rinterchainswtrue%
2446 \@yltrinormorinv{#2}{#3}{0}{0}}%
2447 \if@ylsw \ifx\@@ylii\empty
2448 \def\@@ylii{0}\def\@@yli{0}\fi
2449 \else
2450 {\@rinterchainswtrue%
2451 \@linterchainswtrue%
2452 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2453 \fi

2454 \if@ylsw \ifx\@@ylii\empty
2455 \def\@@ylii{-342}\def\@@yli{0}\fi
2456 \else
2457 {\@rinterchainswfalse%
2458 \@linterchainswtrue%
2459 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2460 \fi

2461 \if@ylsw \ifx\@@ylii\empty
2462 \def\@@ylii{-684}\def\@@yli{0}\fi\fi
2463 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2464 (1450,480)(-200,-180){heptamethylene}%2002/4/30 by S. Fujita
2465 (200,180)%
2466 {\reset@double%
2467 \@tfor\member:=#1\do{%
2468 \if\member a\relax
2469 \@adoublebondtrue
2470 \else\if\member b\relax
2471 \@bdoublebondtrue
2472 \else\if\member A\relax
2473 \@Adoublebondtrue
2474 \else\if\member B\relax
2475 \@Bdoublebondtrue
2476 \else\if\member c\relax%dummy
2477 \else\if\member C\relax%dummy
2478 \else\if\member d\relax%dummy
2479 \else\if\member D\relax%dummy
2480 \else\if\member e\relax%dummy
2481 \else\if\member E\relax%dummy
2482 \else\if\member f\relax%dummy
2483 \else\if\member F\relax%dummy
2484 \else
2485 \expandafter\twoCH@@R\member//%
2486  \set@fusion@heptameth% for all bonds
2487 \fi\fi\fi\fi\fi\fi\fi\fi
2488 \fi\fi\fi\fi}%
2489 \@wrongbdWatrue
2490 \@wrongbdWdtrue
2491 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2492 {\reset@double%
2493 \@tfor\member:=#1\do{%
2494 \if\member c\relax
2495 \@adoublebondtrue
2496 \else\if\member d\relax

2497 \@bdoublebondtrue
2498 \else\if\member C\relax
2499 \@Adoublebondtrue
2500 \else\if\member D\relax
2501 \@Bdoublebondtrue
2502 \fi\fi\fi\fi}%
2503 \@wrongbdWatrue
2504 \@wrongbdWdtrue
2505 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2506 {\reset@double%
2507 \@tfor\member:=#1\do{%
2508 \if\member e\relax
2509 \@adoublebondtrue
2510 \else\if\member E\relax
2511 \@Adoublebondtrue
2512 \else\if\member f\relax
2513 \@bdoublebondtrue
2514 \else\if\member F\relax
2515 \@Bdoublebondtrue
2516 \fi\fi\fi\fi}%
2517 \if@normorinvsw% inverse
2518 \@wrongbdWafalse
2519 \@wrongbdWdtrue
2520 \else%normal
2521 \@wrongbdWatrue
2522 \@wrongbdWdfalse

2523 \fi

2524 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2525 \end{ShiftPicEnvB}%
2526 }% 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
2527 \def\set@fusion@heptameth{%
2528 % %%%%%%%%%%%%%%%%%%%%%
2529 % % inner bond fusion %
2530 % %%%%%%%%%%%%%%%%%%%%%
2531 \if@normorinvsw
2532 \if\@@tmpa e\relax%
2533  \putlratom{684}{103}{\@@tmpb}%     % bond fused
2534  \FuseWarning{-171}{103}%
2535  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2536  \else\if\@@tmpa E\relax%
2537  \putlratom{855}{0}{\@@tmpb}%       % bond fused
2538  \FuseWarning{171}{-103}%
2539  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2540  \else\if\@@tmpa f\relax%
2541  \putlratom{855}{0}{\@@tmpb}%     % bond fused
2542  \FuseWarning{-171}{-103}%
2543  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2544  \else\if\@@tmpa F\relax%

2545  \putlratom{1027}{103}{\@@tmpb}%       % bond fused
2546  \FuseWarning{171}{103}%
2547  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2548  \else
2549  \set@fusion@pentamethi
2550 \fi\fi\fi\fi
2551 \else
2552 \if\@@tmpa e\relax%
2553  \putlratom{684}{0}{\@@tmpb}%     % bond fused
2554  \FuseWarning{-171}{-103}%
2555  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2556  \else\if\@@tmpa E\relax%
2557  \putlratom{855}{103}{\@@tmpb}%       % bond fused
2558  \FuseWarning{171}{103}%
2559  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2560  \else\if\@@tmpa f\relax%
2561  \putlratom{855}{103}{\@@tmpb}%     % bond fused
2562  \FuseWarning{-171}{103}%
2563  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2564  \else\if\@@tmpa F\relax%
2565  \putlratom{1027}{0}{\@@tmpb}%       % bond fused
2566  \FuseWarning{171}{-103}%
2567  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2568  \else
2569  \set@fusion@pentameth
2570 \fi\fi\fi\fi

2571 \fi

2572 }% 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
2573 \def\octamethylene{%
2574 \@ifnextchar[{\set@normaldirection\@octamethylene[@}{%
2575 \set@normaldirection\@octamethylene[]}}
\octamethylenei
2576 \def\octamethylenei{%
2577 \@ifnextchar[{\set@inversedirection\@octamethylene[@}{%
2578 \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
2579 \def\@octamethylene[#1]#2#3{%
2580 \iniflag\iniatom%
2581 \@reset@ylsw%
2582 {\@linterchainswfalse%
2583 \@rinterchainswtrue%
2584 \@yltrinormorinv{#2}{#3}{0}{0}}%
2585 \if@ylsw \ifx\@@ylii\empty
2586 \def\@@ylii{0}\def\@@yli{0}\fi
2587 \else
2588 {\@rinterchainswtrue%
2589 \@linterchainswtrue%
2590 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2591 \fi

2592 \if@ylsw \ifx\@@ylii\empty
2593 \def\@@ylii{-342}\def\@@yli{0}\fi
2594 \else
2595 {\@rinterchainswtrue%
2596 \@linterchainswtrue%
2597 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2598 \fi

2599 \if@ylsw \ifx\@@ylii\empty
2600 \def\@@ylii{-684}\def\@@yli{0}\fi
2601 \else
2602 {\@rinterchainswfalse%
2603 \@linterchainswtrue%
2604 \@yldinormorinv{#2}{#3}{1}{-6}}%

2605 \fi

2606 \if@ylsw \ifx\@@ylii\empty
2607 \def\@@ylii{-1026}\def\@@yli{0}\fi\fi
2608 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2609 (1620,480)(-200,-180){octamethylene}%2002/4/30 by S. Fujita
2610 (200,180)%
2611 {\reset@double%
2612 \@tfor\member:=#1\do{%
2613 \if\member a\relax
2614 \@adoublebondtrue
2615 \else\if\member b\relax
2616 \@bdoublebondtrue
2617 \else\if\member A\relax
2618 \@Adoublebondtrue
2619 \else\if\member B\relax
2620 \@Bdoublebondtrue
2621 \else\if\member c\relax%dummy
2622 \else\if\member C\relax%dummy
2623 \else\if\member d\relax%dummy
2624 \else\if\member D\relax%dummy
2625 \else\if\member e\relax%dummy
2626 \else\if\member E\relax%dummy
2627 \else\if\member f\relax%dummy
2628 \else\if\member F\relax%dummy
2629 \else\if\member g\relax%dummy
2630 \else\if\member G\relax%dummy
2631 \else

2632 \expandafter\twoCH@@R\member//%
2633  \set@fusion@octameth% for all bonds
2634 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
2635 \fi\fi\fi\fi}%
2636 \@wrongbdWatrue
2637 \@wrongbdWdtrue
2638 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2639 {\reset@double%
2640 \@tfor\member:=#1\do{%
2641 \if\member c\relax
2642 \@adoublebondtrue
2643 \else\if\member d\relax
2644 \@bdoublebondtrue
2645 \else\if\member C\relax
2646 \@Adoublebondtrue
2647 \else\if\member D\relax
2648 \@Bdoublebondtrue
2649 \fi\fi\fi\fi}%
2650 \@wrongbdWatrue
2651 \@wrongbdWdtrue
2652 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2653 {\reset@double%
2654 \@tfor\member:=#1\do{%
2655 \if\member e\relax
2656 \@adoublebondtrue
2657 \else\if\member E\relax
2658 \@Adoublebondtrue
2659 \else\if\member f\relax
2660 \@bdoublebondtrue
2661 \else\if\member F\relax
2662 \@Bdoublebondtrue
2663 \fi\fi\fi\fi}%
2664 \@wrongbdWatrue
2665 \@wrongbdWdtrue
2666 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2667 {\reset@double%
2668 \@tfor\member:=#1\do{%
2669 \if\member g\relax
2670 \@adoublebondtrue
2671 \else\if\member G\relax
2672 \@Adoublebondtrue
2673 \fi\fi}%
2674 \if@normorinvsw% inverse
2675 \@wrongbdWatrue
2676 \@wrongbdWdfalse
2677 \else% normal
2678 \@wrongbdWafalse
2679 \@wrongbdWdtrue

2680 \fi

2681 \Put@Direct(1026,0){\@@dinormorinv{#2}{#3}{1}{-6}}}%
2682 \end{ShiftPicEnvB}%
2683 }% 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
2684 \def\set@fusion@octameth{%
2685 % %%%%%%%%%%%%%%%%%%%%%
2686 % % inner bond fusion %
2687 % %%%%%%%%%%%%%%%%%%%%%
2688 \if@normorinvsw
2689 \if\@@tmpa e\relax%
2690  \putlratom{684}{103}{\@@tmpb}%     % bond fused
2691  \FuseWarning{-171}{103}%
2692  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2693  \else\if\@@tmpa E\relax%
2694  \putlratom{855}{0}{\@@tmpb}%       % bond fused
2695  \FuseWarning{171}{-103}%
2696  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2697  \else\if\@@tmpa f\relax%
2698  \putlratom{855}{0}{\@@tmpb}%     % bond fused
2699  \FuseWarning{-171}{-103}%
2700  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2701  \else\if\@@tmpa F\relax%
2702  \putlratom{1027}{103}{\@@tmpb}%       % bond fused
2703  \FuseWarning{171}{103}%
2704  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
2705  \else\if\@@tmpa g\relax%
2706  \putlratom{1027}{103}{\@@tmpb}%     % bond fused
2707  \FuseWarning{-171}{103}%
2708  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
2709  \else\if\@@tmpa G\relax%
2710  \putlratom{1198}{0}{\@@tmpb}%       % bond fused
2711  \FuseWarning{171}{-103}%
2712  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
2713  \else
2714  \set@fusion@pentamethi
2715 \fi\fi\fi\fi\fi\fi
2716 \else
2717 \if\@@tmpa e\relax%
2718  \putlratom{684}{0}{\@@tmpb}%     % bond fused
2719  \FuseWarning{-171}{-103}%
2720  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
2721  \else\if\@@tmpa E\relax%
2722  \putlratom{855}{103}{\@@tmpb}%       % bond fused
2723  \FuseWarning{171}{103}%
2724  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
2725  \else\if\@@tmpa f\relax%
2726  \putlratom{855}{103}{\@@tmpb}%     % bond fused
2727  \FuseWarning{-171}{103}%
2728  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
2729  \else\if\@@tmpa F\relax%
2730  \putlratom{1027}{0}{\@@tmpb}%       % bond fused
2731  \FuseWarning{171}{-103}%
2732  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%

2733  \else\if\@@tmpa g\relax%
2734  \putlratom{1027}{0}{\@@tmpb}%     % bond fused
2735  \FuseWarning{-171}{-103}%
2736  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
2737  \else\if\@@tmpa G\relax%
2738  \putlratom{1198}{103}{\@@tmpb}%       % bond fused
2739  \FuseWarning{171}{103}%
2740  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
2741  \else
2742  \set@fusion@pentameth
2743 \fi\fi\fi\fi\fi\fi

2744 \fi

2745 }% 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
2746 \def\nonamethylene{%
2747 \@ifnextchar[{\set@normaldirection\@nonamethylene[@}{%
2748 \set@normaldirection\@nonamethylene[]}}
\nonamethylenei
2749 \def\nonamethylenei{%
2750 \@ifnextchar[{\set@inversedirection\@nonamethylene[@}{%
2751 \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
2752 \def\@nonamethylene[#1]#2#3{%
2753 \iniflag\iniatom%
2754 \@reset@ylsw%
2755 {\@linterchainswfalse%
2756 \@rinterchainswtrue%
2757 \@yltrinormorinv{#2}{#3}{0}{0}}%
2758 \if@ylsw \ifx\@@ylii\empty
2759 \def\@@ylii{0}\def\@@yli{0}\fi

2760 \else
2761 {\@rinterchainswtrue%
2762 \@linterchainswtrue%
2763 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2764 \fi

2765 \if@ylsw \ifx\@@ylii\empty
2766 \def\@@ylii{-342}\def\@@yli{0}\fi
2767 \else
2768 {\@rinterchainswtrue%
2769 \@linterchainswtrue%
2770 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2771 \fi

2772 \if@ylsw \ifx\@@ylii\empty
2773 \def\@@ylii{-684}\def\@@yli{0}\fi
2774 \else
2775 {\@rinterchainswfalse%
2776 \@linterchainswtrue%
2777 \@yltrinormorinv{#2}{#3}{1}{-6}}%

2778 \fi

2779 \if@ylsw \ifx\@@ylii\empty
2780 \def\@@ylii{-1026}\def\@@yli{0}\fi\fi
2781 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2782 (1790,480)(-200,-180){nonamethylene}%2002/4/30 by S. Fujita
2783 (200,180)%
2784 {\reset@double%
2785 \@tfor\member:=#1\do{%
2786 \if\member a\relax
2787 \@adoublebondtrue
2788 \else\if\member b\relax
2789 \@bdoublebondtrue
2790 \else\if\member A\relax
2791 \@Adoublebondtrue
2792 \else\if\member B\relax
2793 \@Bdoublebondtrue
2794 \else\if\member c\relax%dummy
2795 \else\if\member C\relax%dummy
2796 \else\if\member d\relax%dummy
2797 \else\if\member D\relax%dummy
2798 \else\if\member e\relax%dummy
2799 \else\if\member E\relax%dummy
2800 \else\if\member f\relax%dummy
2801 \else\if\member F\relax%dummy
2802 \else\if\member g\relax%dummy
2803 \else\if\member G\relax%dummy
2804 \else\if\member h\relax%dummy
2805 \else\if\member H\relax%dummy
2806 \else
2807 \expandafter\twoCH@@R\member//%
2808  \set@fusion@nonameth% for all bonds
2809 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
2810 \fi\fi\fi\fi}%
2811 \@wrongbdWatrue
2812 \@wrongbdWdtrue
2813 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%

2814 {\reset@double%
2815 \@tfor\member:=#1\do{%
2816 \if\member c\relax
2817 \@adoublebondtrue
2818 \else\if\member d\relax
2819 \@bdoublebondtrue
2820 \else\if\member C\relax
2821 \@Adoublebondtrue
2822 \else\if\member D\relax
2823 \@Bdoublebondtrue
2824 \fi\fi\fi\fi}%
2825 \@wrongbdWatrue
2826 \@wrongbdWdtrue
2827 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2828 {\reset@double%
2829 \@tfor\member:=#1\do{%
2830 \if\member e\relax
2831 \@adoublebondtrue
2832 \else\if\member E\relax
2833 \@Adoublebondtrue
2834 \else\if\member f\relax
2835 \@bdoublebondtrue
2836 \else\if\member F\relax
2837 \@Bdoublebondtrue
2838 \fi\fi\fi\fi}%
2839 \@wrongbdWatrue
2840 \@wrongbdWdtrue
2841 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2842 {\reset@double%
2843 \@tfor\member:=#1\do{%
2844 \if\member g\relax
2845 \@adoublebondtrue
2846 \else\if\member G\relax
2847 \@Adoublebondtrue
2848 \else\if\member h\relax
2849 \@bdoublebondtrue
2850 \else\if\member H\relax
2851 \@Bdoublebondtrue
2852 \fi\fi\fi\fi}%
2853 \if@normorinvsw% inverse
2854 \@wrongbdWafalse
2855 \@wrongbdWdtrue
2856 \else% normal
2857 \@wrongbdWatrue
2858 \@wrongbdWdfalse

2859 \fi

2860 \Put@Direct(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
2861 \end{ShiftPicEnvB}%
2862 }% 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
2863 \def\set@fusion@nonameth{%
2864 % %%%%%%%%%%%%%%%%%%%%%
2865 % % inner bond fusion %
2866 % %%%%%%%%%%%%%%%%%%%%%
2867 \if@normorinvsw
2868 \if\@@tmpa h\relax%
2869  \putlratom{1198}{0}{\@@tmpb}%     % bond fused
2870  \FuseWarning{-171}{-103}%
2871  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
2872  \else\if\@@tmpa H\relax%
2873  \putlratom{1369}{103}{\@@tmpb}%       % bond fused
2874  \FuseWarning{171}{103}%
2875  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
2876  \else
2877  \set@fusion@octameth
2878 \fi\fi
2879 \else
2880 \if\@@tmpa h\relax%
2881  \putlratom{1198}{103}{\@@tmpb}%     % bond fused
2882  \FuseWarning{-171}{103}%
2883  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
2884  \else\if\@@tmpa H\relax%
2885  \putlratom{1369}{0}{\@@tmpb}%       % bond fused
2886  \FuseWarning{171}{-103}%
2887  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
2888  \else
2889  \set@fusion@octameth
2890 \fi\fi

2891 \fi

2892 }% 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.

SUBSLIST: list of substituents
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
2893 \def\decamethylene{%
2894 \@ifnextchar[{\set@normaldirection\@decamethylene[@}{%
2895 \set@normaldirection\@decamethylene[]}}
\decamethylenei
2896 \def\decamethylenei{%
2897 \@ifnextchar[{\set@inversedirection\@decamethylene[@}{%
2898 \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
2899 \def\@decamethylene[#1]#2#3{%
2900 \iniflag\iniatom%
2901 \@reset@ylsw%
2902 {\@linterchainswfalse%
2903 \@rinterchainswtrue%
2904 \@yltrinormorinv{#2}{#3}{0}{0}}%
2905 \if@ylsw \ifx\@@ylii\empty
2906 \def\@@ylii{0}\def\@@yli{0}\fi
2907 \else
2908 {\@rinterchainswtrue%
2909 \@linterchainswtrue%
2910 \@yltrinormorinv{#2}{#3}{1}{-2}}%

2911 \fi

2912 \if@ylsw \ifx\@@ylii\empty
2913 \def\@@ylii{-342}\def\@@yli{0}\fi
2914 \else
2915 {\@rinterchainswtrue%
2916 \@linterchainswtrue%
2917 \@yltrinormorinv{#2}{#3}{1}{-4}}%

2918 \fi

2919 \if@ylsw \ifx\@@ylii\empty
2920 \def\@@ylii{-684}\def\@@yli{0}\fi
2921 \else
2922 {\@rinterchainswtrue%
2923 \@linterchainswtrue%
2924 \@yltrinormorinv{#2}{#3}{1}{-6}}%

2925 \fi

2926 \if@ylsw \ifx\@@ylii\empty
2927 \def\@@ylii{-1026}\def\@@yli{0}\fi
2928 \else
2929 {\@rinterchainswfalse%
2930 \@linterchainswtrue%
2931 \@yldinormorinv{#2}{#3}{1}{-8}}%

2932 \fi

2933 \if@ylsw \ifx\@@ylii\empty
2934 \def\@@ylii{-1368}\def\@@yli{0}\fi\fi
2935 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2936 (1960,480)(-200,-180){decamethylene}%2002/4/30 by S. Fujita
2937 (200,180)%
2938 {\reset@double%
2939 \@tfor\member:=#1\do{%
2940 \if\member a\relax
2941 \@adoublebondtrue
2942 \else\if\member b\relax

2943 \@bdoublebondtrue
2944 \else\if\member A\relax
2945 \@Adoublebondtrue
2946 \else\if\member B\relax
2947 \@Bdoublebondtrue
2948 \else\if\member c\relax%dummy
2949 \else\if\member C\relax%dummy
2950 \else\if\member d\relax%dummy
2951 \else\if\member D\relax%dummy
2952 \else\if\member e\relax%dummy
2953 \else\if\member E\relax%dummy
2954 \else\if\member f\relax%dummy
2955 \else\if\member F\relax%dummy
2956 \else\if\member g\relax%dummy
2957 \else\if\member G\relax%dummy
2958 \else\if\member h\relax%dummy
2959 \else\if\member H\relax%dummy
2960 \else\if\member i\relax%dummy
2961 \else\if\member I\relax%dummy
2962 \else
2963 \expandafter\twoCH@@R\member//%
2964  \set@fusion@decameth% for all bonds
2965 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
2966 \fi\fi\fi\fi}%
2967 \@wrongbdWatrue
2968 \@wrongbdWdtrue
2969 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
2970 {\reset@double%
2971 \@tfor\member:=#1\do{%
2972 \if\member c\relax
2973 \@adoublebondtrue
2974 \else\if\member d\relax
2975 \@bdoublebondtrue
2976 \else\if\member C\relax
2977 \@Adoublebondtrue
2978 \else\if\member D\relax
2979 \@Bdoublebondtrue
2980 \fi\fi\fi\fi}%
2981 \@wrongbdWatrue
2982 \@wrongbdWdtrue
2983 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
2984 {\reset@double%
2985 \@tfor\member:=#1\do{%
2986 \if\member e\relax
2987 \@adoublebondtrue
2988 \else\if\member E\relax
2989 \@Adoublebondtrue
2990 \else\if\member f\relax
2991 \@bdoublebondtrue
2992 \else\if\member F\relax
2993 \@Bdoublebondtrue
2994 \fi\fi\fi\fi}%
2995 \@wrongbdWatrue
2996 \@wrongbdWdtrue

2997 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
2998 {\reset@double%
2999 \@tfor\member:=#1\do{%
3000 \if\member g\relax
3001 \@adoublebondtrue
3002 \else\if\member G\relax
3003 \@Adoublebondtrue
3004 \else\if\member h\relax
3005 \@bdoublebondtrue
3006 \else\if\member H\relax
3007 \@Bdoublebondtrue
3008 \fi\fi\fi\fi}%
3009 \@wrongbdWatrue
3010 \@wrongbdWdtrue
3011 \Put@Direct(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
3012 {\reset@double%
3013 \@tfor\member:=#1\do{%
3014 \if\member i\relax
3015 \@adoublebondtrue
3016 \else\if\member I\relax
3017 \@Adoublebondtrue
3018 \fi\fi}%
3019 \if@normorinvsw% inverse
3020 \@wrongbdWatrue
3021 \@wrongbdWdfalse
3022 \else% normal
3023 \@wrongbdWafalse
3024 \@wrongbdWdtrue

3025 \fi

3026 \Put@Direct(1368,0){\@@dinormorinv{#2}{#3}{1}{-8}}}%
3027 \end{ShiftPicEnvB}%
3028 }% 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
3029 \def\set@fusion@decameth{%
3030 % %%%%%%%%%%%%%%%%%%%%%
3031 % % inner bond fusion %
3032 % %%%%%%%%%%%%%%%%%%%%%
3033 \if@normorinvsw
3034 \if\@@tmpa h\relax%
3035  \putlratom{1198}{0}{\@@tmpb}%     % bond fused
3036  \FuseWarning{-171}{-103}%
3037  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
3038  \else\if\@@tmpa H\relax%
3039  \putlratom{1369}{103}{\@@tmpb}%       % bond fused
3040  \FuseWarning{171}{103}%
3041  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
3042  \else\if\@@tmpa i\relax%
3043  \putlratom{1369}{103}{\@@tmpb}%       % bond fused
3044  \FuseWarning{-171}{103}%

3045  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
3046  \else\if\@@tmpa I\relax%
3047  \putlratom{1540}{0}{\@@tmpb}%       % bond fused
3048  \FuseWarning{171}{-103}%
3049  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
3050  \else
3051  \set@fusion@octameth
3052 \fi\fi\fi\fi
3053 \else
3054 \if\@@tmpa h\relax%
3055  \putlratom{1198}{103}{\@@tmpb}%     % bond fused
3056  \FuseWarning{-171}{103}%
3057  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
3058  \else\if\@@tmpa H\relax%
3059  \putlratom{1369}{0}{\@@tmpb}%       % bond fused
3060  \FuseWarning{171}{-103}%
3061  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
3062  \else\if\@@tmpa i\relax%
3063  \putlratom{1369}{0}{\@@tmpb}%     % bond fused
3064  \FuseWarning{-171}{-103}%
3065  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
3066  \else\if\@@tmpa I\relax%
3067  \putlratom{1540}{103}{\@@tmpb}%       % bond fused
3068  \FuseWarning{171}{103}%
3069  {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
3070  \else
3071  \set@fusion@octameth
3072 \fi\fi\fi\fi
3073 \fi%
3074 }% end of the macro \set@fusion@decameth

3075 ⟨/methylen⟩