Debian Codegraph @

texmf-dist/source/latex/xymtex/base/methylen.dtx

raw
1 % \iffalse meta-comment
2 %% File: methylen.dtx
3 %
4 % Copyright 1998,2001,2002,2004,2005,2010,2013 by Shinsaku Fujita
5 %
6 % This file is part of XyMTeX system.
7 % -------------------------------------
8 %
9 % This file is a part of the macro package ``XyMTeX'' which has been
10 % designed for typesetting chemical structural formulas.
11 %
12 % This file is to be contained in the ``xymtex'' directory which is
13 % an input directory for TeX. It is a LaTeX optional style file and
14 % should be used only within LaTeX, because several macros of the file
15 % are based on LaTeX commands.
16 %
17 % For the review of XyMTeX, see
18 % (1) Shinsaku Fujita, ``Typesetting structural formulas with the text
19 % formatter TeX/LaTeX'', Computers and Chemistry, in press.
20 % The following book deals with an application of TeX/LaTeX to
21 % preparation of manuscripts of chemical fields:
22 % (2) Shinsaku Fujita, ``LaTeX for Chemists and Biochemists''
23 % Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].
24 %
25 % This work may be distributed and/or modified under the
26 % conditions of the LaTeX Project Public License, either version 1.3
27 % of this license or (at your option) any later version.
28 % The latest version of this license is in
29 % http://www.latex-project.org/lppl.txt
30 % and version 1.3 or later is part of all distributions of LaTeX
31 % version 2005/12/01 or later.
32 %
33 % This work has the LPPL maintenance status `maintained'.
34 % The Current Maintainer of this work is Shinsaku Fujita.
35 %
36 % This work consists of the files methylen.dtx and methylen.ins
37 % and the derived file methylen.sty.
38 %
39 % Please report any bugs, comments, suggestions, etc. to:
40 % Shinsaku Fujita,
41 % Shonan Institute of Chemoinformatics and Mathematical Chemistry
42 % Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan
43 % (old address)
44 % Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
45 % Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
46 % (old address)
47 % Department of Chemistry and Materials Technology,
48 % Kyoto Institute of Technology, \\
49 % Matsugasaki, Sakyoku, Kyoto, 606 Japan
50 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 % \def\j@urnalname{methylen}
52 % \def\versi@ndate{October 31, 1998}
53 % \def\versi@nno{ver1.02}
54 % \def\copyrighth@lder{SF} % Shinsaku Fujita
55 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 % \def\j@urnalname{methylen}
57 % \def\versi@ndate{December 25, 1998}
58 % \def\versi@nno{ver2.00}
59 % \def\copyrighth@lder{SF} % Shinsaku Fujita
60 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61 % \def\j@urnalname{methylen}
62 % \def\versi@ndate{June 20, 2001}
63 % \def\versi@nno{ver2.01}
64 % \def\copyrighth@lder{SF} % Shinsaku Fujita
65 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 % \def\j@urnalname{methylen}
67 % \def\versi@ndate{April 30, 2002}
68 % \def\versi@nno{ver3.00}
69 % \def\copyrighth@lder{SF} % Shinsaku Fujita
70 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 % \def\j@urnalname{methylen}
72 % \def\versi@ndate{May 30, 2002}
73 % \def\versi@nno{ver4.00}
74 % \def\copyrighth@lder{SF} % Shinsaku Fujita
75 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76 % \def\j@urnalname{methylen}
77 % \def\versi@ndate{August 30, 2004}
78 % \def\versi@nno{ver4.01}
79 % \def\copyrighth@lder{SF} % Shinsaku Fujita
80 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81 % \def\j@urnalname{methylen}
82 % \def\versi@ndate{July 20, 2005}
83 % \def\versi@nno{ver4.03}
84 % \def\copyrighth@lder{SF} % Shinsaku Fujita
85 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86 % \def\j@urnalname{methylen}
87 % \def\versi@ndate{October 01, 2010}
88 % \def\versi@nno{ver5.00}
89 % \def\copyrighth@lder{SF} % Shinsaku Fujita
90 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91 % \def\j@urnalname{methylen}
92 % \def\versi@ndate{March 29, 2013}
93 % \def\versi@nno{ver5.01b}
94 % \def\copyrighth@lder{SF} % Shinsaku Fujita
95 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
96 % \def\j@urnalname{methylen}
97 % \def\versi@ndate{June 27, 2013}
98 % \def\versi@nno{ver5.01bbb}
99 \def\copyrighth@lder{SF} % Shinsaku Fujita
100 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 %
102 % \fi
103 %
104 % \CheckSum{8103}
105 %% \CharacterTable
106 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
107 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
108 %% Digits \0\1\2\3\4\5\6\7\8\9
109 %% Exclamation \! Double quote \" Hash (number) \#
110 %% Dollar \$ Percent \% Ampersand \&
111 %% Acute accent \' Left paren \( Right paren \)
112 %% Asterisk \* Plus \+ Comma \,
113 %% Minus \- Point \. Solidus \/
114 %% Colon \: Semicolon \; Less than \<
115 %% Equals \= Greater than \> Question mark \?
116 %% Commercial at \@ Left bracket \[ Backslash \\
117 %% Right bracket \] Circumflex \^ Underscore \_
118 %% Grave accent \` Left brace \{ Vertical bar \|
119 %% Right brace \} Tilde \~}
120 %
121 % \setcounter{StandardModuleDepth}{1}
122 %
123 % \StopEventually{}
124 % \MakeShortVerb{\|}
125 %
126 % \iffalse
127 % \changes{v1.02}{1998/10/31}{first edition for LaTeX2e}
128 % \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
129 % \changes{v2.01}{2001/06/20}{Size reduction and Clip information}
130 % \changes{v2.01}{2001/6/20}{Size reduction and clipping information}
131 % \changes{v3.00}{2002/4/30}{sfpicture environment, etc.}
132 % \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv}
133 % \changes{v4.01}{2004/08/30}{Minor additions}
134 % \changes{v4.03}{2005/07/20}{Wave bonds}
135 % \changes{v5.00}{2010/10/01}{For bond coloring and the LaTeX Project Public License}
136 % \changes{v5.01b}{2013/03/29}{bug fix for \cs{yltrimethyleneposition}}
137 % \changes{v5.01bb}{2013/06/22}{another bug fix for \cs{yltrimethyleneposition} etc.}
138 % \changes{v5.01bbb}{2013/06/27}{addition: Sd, Su, WU, WV, WA, WB etc. }
139 % \changes{v5.01}{2013/07/20}{bug fix}
140 % \fi
141 %
142 % \iffalse
143 %<*driver>
144 \NeedsTeXFormat{pLaTeX2e}
145 % \fi
146 \ProvidesFile{methylen.dtx}[2013/07/20 v5.01 XyMTeX{} package file]
147 % \iffalse
148 \documentclass{ltxdoc}
149 \GetFileInfo{methylen.dtx}
150 %
151 % %%XyMTeX Logo: Definition 2%%%
152 \def\UPSILON{\char'7}
153 \def\XyM{X\kern-.30em\smash{%
154 \raise.50ex\hbox{\UPSILON}}\kern-.30em{M}}
155 \def\XyMTeX{\XyM\kern-.1em\TeX}
156 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157 \title{Methylene Chains by {\sffamily methylen.sty}
158 (\fileversion) of \XyMTeX{}}
159 \author{Shinsaku Fujita \\
160 Shonan Institute of Chemoinformatics and Mathematical Chemistry, \\
161 Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan
162 % % (old address)
163 % %Department of Chemistry and Materials Technology, \\
164 % %Kyoto Institute of Technology, \\
165 % %Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
166 }
167 \date{\filedate}
168 %
169 \begin{document}
170 \maketitle
171 \DocInput{methylen.dtx}
172 \end{document}
173 %</driver>
174 % \fi
175 %
176 % \section{Introduction}\label{methylen:intro}
177 %
178 % \subsection{Options for {\sffamily docstrip}}
179 %
180 % \DeleteShortVerb{\|}
181 % \begin{center}
182 % \begin{tabular}{|l|l|}
183 % \hline
184 % \emph{option} & \emph{function}\\ \hline
185 % methylen & methylen.sty \\
186 % driver & driver for this dtx file \\
187 % \hline
188 % \end{tabular}
189 % \end{center}
190 % \MakeShortVerb{\|}
191 %
192 % \subsection{Version Information}
193 %
194 % \begin{macrocode}
195 %<*methylen>
196 \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.01}
197 \typeout{ -- Released July 20, 2013 by Shinsaku Fujita}
198 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199 \def\j@urnalname{methylen}
200 \def\versi@ndate{July 20, 2013}
201 \def\versi@nno{ver5.01}
202 \def\copyrighth@lder{SF} % Shinsaku Fujita
203 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
204 \typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
205 \space[\copyrighth@lder]}
206 % \end{macrocode}
207 %
208 % \section{List of commands for methylen.sty}
209 %
210 % \begin{verbatim}
211 % **********************************
212 % * methylen.sty: list of commands *
213 % **********************************
214 %
215 % <Switches for drawing substituents and bonds>
216 %
217 % \if@adoublebond \if@bdoublebond
218 % \if@Adoublebond \if@adoublebond}
219 % \reset@double
220 % \if@linterchainsw \if@rinterchainsw}
221 % \reset@interchainsw
222 %
223 % <Command for drawing substituents and bonds>
224 %
225 % \@methsubsta \@methsubstd \@methsubstdL
226 % \SKbondA \SKbondB
227 % \bondA \bondAA
228 % \bondB \bondBB
229 %
230 % <Basic commands for typesetting aliphatic chains>
231 %
232 % \@@trimethylene
233 % \@@dimethylene
234 %
235 % <Commands for adjusting substitution sites>
236 %
237 % \yltrimethyleneposition
238 % \yldimethyleneposition
239 %
240 % <Commands for drawing aliphatic chains>
241 %
242 % \trimethylene \trimethylenei
243 % \dimethylene \dimethylenei
244 % \tetramethylene \tetramethylenei
245 % \pentamethylene \pentamethylenei
246 % \hexamethylene \hexamethylenei
247 % \heptamethylene \heptamethylenei
248 % \octamethylene octamethylenei
249 % \nonamethylene \nonamethylenei
250 % \decamethylene \decamethylenei
251 %
252 % \end{verbatim}
253 %
254 % \section{Input of basic macros}
255 %
256 % To assure the compatibility to \LaTeX{}2.09 (the native mode),
257 % the commands added by \LaTeXe{} have not been used in the resulting sty
258 % files ({\sf polymers.sty} for the present case). Hence, the combination
259 % of |\input| and |\@ifundefined| is used to crossload sty
260 % files ({\sf chemstr.sty} etc. for the present case) in place of the
261 % |\RequirePackage| command of \LaTeXe{}.
262 %
263 % \begin{macrocode}
264 % *************************
265 % * input of basic macros *
266 % *************************
267 \@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
268 \@ifundefined{Westbond}{\input aliphat.sty\relax}{}
269 \@ifundefined{bzdrv}{\input carom.sty\relax}{}
270 \@ifundefined{hbonde}{\input hetaromh.sty\relax}{}
271 \unitlength=0.1pt
272 % \end{macrocode}
273 %
274 % \section{Setting Substituents}
275 %
276 % Substitutions on each methylene of a polymethylene chain
277 % is typeset by macros |\@methsubsta| etc.
278 % The macro |\@methsubsta| is used to place substituents on an
279 % upper-side methylene. A new bond modifier ``W'' is added to
280 % typeset a terminal substituent.
281 %
282 % \changes{v5.01}{2013/06/27}{Addition Su, Sd, WU, WA, WB}
283 %
284 % \begin{macro}{\@methsubsta}
285 % \begin{macrocode}
286 \newif\if@wrongbdWa \@wrongbdWafalse
287 \newif\if@wrongbdWd \@wrongbdWdfalse
288 \newif\if@wrongbdWaL \@wrongbdWaLfalse
289 \newif\if@wrongbdWdL \@wrongbdWdLfalse
290 \def\@methsubsta{%
291 \if@aclip% %clipping
292 \if\@tmpb S%single bond
293 \ifx\@tmpc\empty%
294 \yl@xdiff=31\relax
295 \yl@ydiff=-17\relax
296 \Put@Line(0,436)(0,1){110}% % single bond at 1
297 \putlratom{-31}{563}{\@memberb}% % left or right type
298 \else\if\@tmpc B%(B) beta
299 \yl@xdiff=-36\relax
300 \yl@ydiff=-27\relax
301 {%
302 \thicklines%
303 \Put@Line(-18,436)(-3,5){60}% % single bond at 1
304 }%
305 \putlatom{-42}{563}{\@memberb}% % left type
306 \else\if\@tmpc A%(A) alpha
307 \yl@xdiff=37\relax
308 \yl@ydiff=-27\relax
309 \dotorline(18,436)(3,5){60}/(18,436)(72,526)%
310 \putratom{41}{563}{\@memberb}% % right type
311 \else\if\@tmpc b%(b) beta
312 \yl@xdiff=-36\relax
313 \yl@ydiff=-27\relax
314 \putlatom{-42}{563}{\@memberb}% % left type
315 \Put@Line(-18,436)(-3,5){60}% % single bond at 1
316 \else\if\@tmpc a%(a) alpha
317 \yl@xdiff=37\relax
318 \yl@ydiff=-27\relax
319 \Put@Line(18,436)(3,5){60}% % single bond at 1
320 \putratom{41}{563}{\@memberb}% % right type
321 %2023/06/27
322 \else\if\@tmpc U% undefined
323 \yl@xdiff=-36\relax
324 \yl@ydiff=-27\relax
325 {%
326 \WaveBonds%
327 \Put@Line(-18,436)(-3,5){60}% % single bond at 1
328 }%
329 \putlatom{-42}{563}{\@memberb}% % left type
330 \else\if\@tmpc V% undefined
331 \yl@xdiff=37\relax
332 \yl@ydiff=-27\relax
333 {%
334 \WaveBonds%
335 \Put@Line(18,436)(3,5){60}% % wavy single bond at 1
336 }%
337 \putratom{41}{563}{\@memberb}% % right type
338 \else\if\@tmpc d%(d) alpha
339 \yl@xdiff=-36\relax
340 \yl@ydiff=-27\relax
341 \dotorline(-18,436)(-3,5){60}/(-18,436)(-72,536)%
342 \putlatom{-42}{563}{\@memberb}% % left type
343 \else\if\@tmpc u%(u) beta
344 \yl@xdiff=37\relax
345 \yl@ydiff=-27\relax
346 {%
347 \thicklines%
348 \Put@Line(18,436)(3,5){60}% % single bond at 1
349 }%
350 \putratom{41}{563}{\@memberb}% % right type
351 %
352 \fi\fi
353 \fi\fi\fi\fi\fi\fi\fi%
354 \else\if\@tmpb D%double bond
355 \yl@xdiff=31\relax
356 \yl@ydiff=-17\relax
357 \putlratom{-31}{563}{\@memberb}% % left or right type
358 \Put@Line(-12,436)(0,1){110}% % double bond at 1
359 \Put@Line(12,436)(0,1){110}% % double bond at 1
360 \else\if\@tmpb B%beta single bond
361 \yl@xdiff=31\relax
362 \yl@ydiff=-17\relax
363 \putlratom{-31}{563}{\@memberb}% % left or right type
364 {%
365 \thicklines%
366 \Put@Line(0,436)(0,1){110}% % single bond at 1
367 }%
368 \else\if\@tmpb A%alpha single bond
369 \yl@xdiff=31\relax
370 \yl@ydiff=-17\relax
371 \putlratom{-31}{563}{\@memberb}% % left or right type
372 \dotorline(0,436)(0,1){110}/(0,436)(0,546)%
373 \else\if\@tmpb U% undefined
374 \yl@xdiff=31\relax
375 \yl@ydiff=-17\relax
376 \putlratom{-31}{563}{\@memberb}% % left or right type
377 {%
378 \WaveBonds%
379 \Put@Line(0,436)(0,1){110}% % single bond at 1
380 }%
381 \else\if\@tmpb W%beta single bond
382 \ifx\@tmpc\empty%
383 \yl@xdiff=-10\relax
384 \yl@ydiff=46\relax
385 \if@wrongbdWa
386 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
387 \fi
388 \Put@Line(40,382)(5,-3){100}% % single bond at 1
389 \putratom{150}{276}{\@memberb}% % left or right type
390 %2013/06/27
391 \else\if\@tmpc U%beta undefined
392 \yl@xdiff=-10\relax
393 \yl@ydiff=46\relax
394 {%
395 \WaveBonds%
396 \Put@Line(40,382)(5,-3){100}% % single bond at 1
397 }%
398 \putratom{150}{276}{\@memberb}% % left or right type
399 \else\if\@tmpc B%beta
400 \yl@xdiff=-10\relax
401 \yl@ydiff=46\relax
402 {%
403 \thicklines%
404 \Put@Line(40,382)(5,-3){100}% % single bond at 1
405 }%
406 \putratom{150}{276}{\@memberb}% % left or right type
407 \else\if\@tmpc A%alpha
408 \yl@xdiff=-10\relax
409 \yl@ydiff=46\relax
410 \dotorline(40,382)(5,-3){100}/(40,382)(140,322)%
411 \putratom{150}{276}{\@memberb}% % left or right type
412 %
413 \fi\fi\fi\fi
414 \else%
415 \yl@xdiff=31\relax
416 \yl@ydiff=-17\relax
417 \putlratom{-31}{563}{\@memberb}% % left or right type
418 \Put@Line(0,436)(0,1){110}% % single bond at 1
419 \fi\fi\fi\fi\fi\fi%
420 \else% % no clipping
421 \if\@tmpb S%single bond
422 \ifx\@tmpc\empty%
423 \yl@xdiff=31\relax
424 \yl@ydiff=-17\relax
425 \Put@Line(0,406)(0,1){140}% % single bond at 1
426 \putlratom{-31}{563}{\@memberb}% % left or right type
427 \else\if\@tmpc B%(B) beta
428 \yl@xdiff=-30\relax
429 \yl@ydiff=-37\relax
430 \putlatom{-42}{563}{\@memberb}% % left type
431 {%
432 \thicklines%
433 \Put@Line(0,406)(-3,5){72}% % single bond at 1
434 }%
435 \else\if\@tmpc A%(A) alpha
436 \yl@xdiff=31\relax
437 \yl@ydiff=-37\relax
438 \putratom{41}{563}{\@memberb}% % right type
439 \dotorline(0,406)(3,5){72}/(0,406)(72,526)%
440 \else\if\@tmpc b%(b) beta
441 \yl@xdiff=-30\relax
442 \yl@ydiff=-37\relax
443 \putlatom{-42}{563}{\@memberb}% % left type
444 \Put@Line(0,406)(-3,5){72}% % single bond at 1
445 \else\if\@tmpc a%(a) alpha
446 \yl@xdiff=31\relax
447 \yl@ydiff=-37\relax
448 \putratom{41}{563}{\@memberb}% % right type
449 \Put@Line(0,406)(3,5){72}% % single bond at 1
450 %2023/06/27
451 \else\if\@tmpc U% undefined
452 \yl@xdiff=-30\relax
453 \yl@ydiff=-37\relax
454 {%
455 \WaveBonds%
456 \Put@Line(0,406)(-3,5){72}% % single bond at 1
457 }%
458 \putlatom{-42}{563}{\@memberb}% % left type
459 \else\if\@tmpc V% undefined
460 \yl@xdiff=31\relax
461 \yl@ydiff=-37\relax
462 {%
463 \WaveBonds%
464 \Put@Line(0,406)(3,5){72}% % wavy single bond at 1
465 }%
466 \putratom{41}{563}{\@memberb}% % right type
467 \else\if\@tmpc d%(d) alpha
468 \yl@xdiff=-30\relax
469 \yl@ydiff=-37\relax
470 \dotorline(0,406)(-3,5){72}/(0,406)(-72,526)%
471 \putlatom{-42}{563}{\@memberb}% % left type
472 \else\if\@tmpc u%(u) beta
473 \yl@xdiff=31\relax
474 \yl@ydiff=-37\relax
475 {%
476 \thicklines%
477 \Put@Line(0,406)(3,5){72}% % single bond at 1
478 }%
479 \putratom{41}{563}{\@memberb}% % right type
480 %
481 \fi\fi\fi\fi
482 \fi\fi\fi\fi\fi%
483 \else\if\@tmpb D%double bond
484 \yl@xdiff=31\relax
485 \yl@ydiff=-17\relax
486 \putlratom{-31}{563}{\@memberb}% % left or right type
487 \Put@Line(-12,406)(0,1){140}% % double bond at 1
488 \Put@Line(12,406)(0,1){140}% % double bond at 1
489 \else\if\@tmpb B%beta single bond
490 \yl@xdiff=31\relax
491 \yl@ydiff=-17\relax
492 \putlratom{-31}{563}{\@memberb}% % left or right type
493 {%
494 \thicklines%
495 \Put@Line(0,406)(0,1){140}% % single bond at 1
496 }%
497 \else\if\@tmpb A%alpha single bond
498 \yl@xdiff=31\relax
499 \yl@ydiff=-17\relax
500 \putlratom{-31}{563}{\@memberb}% % left or right type
501 \dotorline(0,406)(0,1){140}/(0,406)(0,546)%
502 \else\if\@tmpb U%undefined
503 \yl@xdiff=31\relax
504 \yl@ydiff=-17\relax
505 \putlratom{-31}{563}{\@memberb}% % left or right type
506 {%
507 \WaveBonds%
508 \Put@Line(0,406)(0,1){140}% % single bond at 1
509 }%
510 \else\if\@tmpb W%beta single bond
511 \ifx\@tmpc\empty%
512 \yl@xdiff=-10\relax
513 \yl@ydiff=58\relax
514 \if@wrongbdWa
515 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
516 \fi
517 \Put@Line(0,406)(5,-3){120}% % single bond at 1
518 \putratom{130}{276}{\@memberb}% % left or right type
519 %2013/06/27
520 \else\if\@tmpc U%beta undefined
521 \yl@xdiff=-10\relax
522 \yl@ydiff=58\relax
523 {%
524 \WaveBonds%
525 \Put@Line(0,406)(5,-3){120}% % single bond at 1
526 }%
527 \putratom{130}{276}{\@memberb}% % left or right type
528 \else\if\@tmpc B%beta
529 \yl@xdiff=-10\relax
530 \yl@ydiff=58\relax
531 {%
532 \thicklines%
533 \Put@Line(0,406)(5,-3){120}% % single bond at 1
534 }%
535 \putratom{130}{276}{\@memberb}% % left or right type
536 \else\if\@tmpc A%alpha
537 \yl@xdiff=-10\relax
538 \yl@ydiff=58\relax
539 \dotorline(0,406)(5,-3){120}/(0,406)(120,334)%
540 \putratom{130}{276}{\@memberb}% % left or right type
541 %
542 \fi\fi\fi\fi
543 \else%
544 \yl@xdiff=31\relax
545 \yl@ydiff=-17\relax
546 \putlratom{-31}{563}{\@memberb}% % left or right type
547 \Put@Line(0,406)(0,1){140}% % single bond at 1
548 \fi\fi\fi\fi\fi\fi%
549 \fi}%
550 % \end{macrocode}
551 % \end{macro}
552 %
553 % The macro |\@methsubstd| is used to place substituents on a
554 % down-side methylene. A new bond modifier ``W'' is added to
555 % typeset a terminal substituent.
556 %
557 % \changes{v5.01}{2013/06/27}{Addition Su, Sd, WU, WA, WB}
558 %
559 % \begin{macro}{\@methsubstd}
560 % \begin{macrocode}
561 \def\@methsubstd{%
562 \if@clip %clipping
563 \if\@tmpb S%single bond
564 \ifx\@tmpc\empty%
565 \yl@xdiff=31\relax
566 \yl@ydiff=90\relax
567 \putlratom{-31}{-230}{\@memberb}% % left or right type
568 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
569 \else\if\@tmpc B%(B) beta
570 \yl@xdiff=-36\relax
571 \yl@ydiff=100\relax
572 {%
573 \thicklines%
574 \Put@Line(-18,-30)(-3,-5){60}% % single bond at 4
575 }%
576 \putlatom{-42}{-230}{\@memberb}% % left type
577 \else\if\@tmpc A%(A) alpha
578 \yl@xdiff=37\relax
579 \yl@ydiff=100\relax
580 \dotorline(18,-30)(3,-5){60}/(18,-30)(72,-120)%
581 \putratom{41}{-230}{\@memberb}% % right type
582 \else\if\@tmpc b%(b) beta
583 \yl@xdiff=-36\relax
584 \yl@ydiff=100\relax
585 \putlatom{-42}{-230}{\@memberb}% % left type
586 \Put@Line(-18,-30)(-3,-5){60}% % single bond at 4
587 \else\if\@tmpc a%(a) alpha
588 \yl@xdiff=37\relax
589 \yl@ydiff=100\relax
590 \putratom{41}{-230}{\@memberb}% % right type
591 \Put@Line(18,-30)(3,-5){60}% % single bond at 4
592 %2023/06/27
593 \else\if\@tmpc U% undefined
594 \yl@xdiff=-36\relax
595 \yl@ydiff=100\relax
596 {%
597 \WaveBonds%
598 \Put@Line(-18,-30)(-3,-5){60}% % single bond at 4
599 }%
600 \putlatom{-42}{-230}{\@memberb}% % left type
601 \else\if\@tmpc V% undefined
602 \yl@xdiff=37\relax
603 \yl@ydiff=100\relax
604 {%
605 \WaveBonds%
606 \Put@Line(18,-30)(3,-5){60}% % wavy single bond at 1
607 }%
608 \putratom{41}{-230}{\@memberb}% % right type
609 \else\if\@tmpc d%(d) alpha
610 \yl@xdiff=-36\relax
611 \yl@ydiff=100\relax
612 \dotorline(-18,-30)(-3,-5){60}/(-18,-30)(-78,-130)%
613 \putlatom{-42}{-230}{\@memberb}% % left type
614 \else\if\@tmpc u%(u) beta
615 \yl@xdiff=37\relax
616 \yl@ydiff=100\relax
617 {%
618 \thicklines%
619 \Put@Line(18,-30)(3,-5){60}% % single bond at 4
620 }%
621 \putratom{41}{-230}{\@memberb}% % right type
622 %
623 \fi\fi\fi\fi
624 \fi\fi\fi\fi\fi%
625 \else\if\@tmpb D%double bond
626 \yl@xdiff=31\relax
627 \yl@ydiff=90\relax
628 \putlratom{-31}{-230}{\@memberb}% % left or right type
629 \Put@Line(-12,-30)(0,-1){110}% % double bond at 4
630 \Put@Line(12,-30)(0,-1){110}% % double bond at 4
631 \else\if\@tmpb B%beta single bond
632 \yl@xdiff=31\relax
633 \yl@ydiff=90\relax
634 \putlratom{-31}{-230}{\@memberb}% % left or right type
635 {%
636 \thicklines%
637 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
638 }%
639 \else\if\@tmpb A%alpha single bond
640 \yl@xdiff=31\relax
641 \yl@ydiff=90\relax
642 \putlratom{-31}{-230}{\@memberb}% % left or right type
643 \dotorline(0,-30)(0,-1){110}/(0,-30)(0,-140)%
644 \else\if\@tmpb U% undefined
645 \yl@xdiff=31\relax
646 \yl@ydiff=90\relax
647 \putlratom{-31}{-230}{\@memberb}% % left or right type
648 {%
649 \WaveBonds%
650 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
651 }%
652 \else\if\@tmpb W%beta single bond
653 \ifx\@tmpc\empty%
654 \yl@xdiff=-10\relax
655 \yl@ydiff=30\relax
656 \putlratom{150}{54}{\@memberb}% % left or right type
657 \Put@Line(40,24)(5,3){100}% % single bond at 4
658 \if@wrongbdWd
659 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
660 \fi
661 %2013/06/27
662 \else\if\@tmpc U%beta undefined
663 \yl@xdiff=-10\relax
664 \yl@ydiff=30\relax
665 {%
666 \WaveBonds%
667 \Put@Line(40,24)(5,3){100}% % single bond at 4
668 }%
669 \putlratom{150}{54}{\@memberb}% % left or right type
670 \else\if\@tmpc B%beta
671 \yl@xdiff=-10\relax
672 \yl@ydiff=30\relax
673 {%
674 \thicklines%
675 \Put@Line(40,24)(5,3){100}% % single bond at 4
676 }%
677 \putlratom{150}{54}{\@memberb}% % left or right type
678 \else\if\@tmpc A%alpha
679 \yl@xdiff=-10\relax
680 \yl@ydiff=30\relax
681 \dotorline(40,24)(5,3){100}/(40,24)(140,84)%
682 \putlratom{150}{54}{\@memberb}% % left or right type
683 %
684 \fi\fi\fi\fi
685 \else%
686 \yl@xdiff=31\relax
687 \yl@ydiff=90\relax
688 \putlratom{-31}{-230}{\@memberb}% % left or right type
689 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
690 \fi\fi\fi\fi\fi\fi%
691 \else% no clipping
692 \if\@tmpb S%single bond
693 \ifx\@tmpc\empty%
694 \yl@xdiff=31\relax
695 \yl@ydiff=90\relax
696 \putlratom{-31}{-230}{\@memberb}% % left or right type
697 \Put@Line(0,0)(0,-1){140}% % single bond at 4
698 \else\if\@tmpc B%(B) beta
699 \yl@xdiff=-30\relax
700 \yl@ydiff=110\relax
701 \putlatom{-42}{-230}{\@memberb}% % left type
702 {%
703 \thicklines%
704 \Put@Line(0,0)(-3,-5){72}% % single bond at 4
705 }%
706 \else\if\@tmpc A%(A) alpha
707 \yl@xdiff=31\relax
708 \yl@ydiff=110\relax
709 \putratom{41}{-230}{\@memberb}% % right type
710 \dotorline(0,0)(3,-5){72}/(0,0)(72,-120)%
711 \else\if\@tmpc b%(b) beta
712 \yl@xdiff=-30\relax
713 \yl@ydiff=110\relax
714 \putlatom{-42}{-230}{\@memberb}% % left type
715 \Put@Line(0,0)(-3,-5){72}% % single bond at 4
716 \else\if\@tmpc a%(a) alpha
717 \yl@xdiff=31\relax
718 \yl@ydiff=110\relax
719 \putratom{41}{-230}{\@memberb}% % right type
720 \Put@Line(0,0)(3,-5){72}% % single bond at 4
721 %2023/06/27
722 \else\if\@tmpc U% undefined
723 \yl@xdiff=-30\relax
724 \yl@ydiff=110\relax
725 {%
726 \WaveBonds%
727 \Put@Line(0,0)(-3,-5){72}% % single bond at 4
728 }%
729 \putlatom{-42}{-230}{\@memberb}% % left type
730 \else\if\@tmpc V% undefined
731 \yl@xdiff=31\relax
732 \yl@ydiff=110\relax
733 {%
734 \WaveBonds%
735 \Put@Line(0,0)(3,-5){72}% % wavy single bond at 1
736 }%
737 \putratom{41}{-230}{\@memberb}% % right type
738 \else\if\@tmpc d%(d) alpha
739 \yl@xdiff=-30\relax
740 \yl@ydiff=110\relax
741 \dotorline(0,0)(-3,-5){72}/(0,0)(-72,-120)%
742 \putlatom{-42}{-230}{\@memberb}% % left type
743 \else\if\@tmpc u%(u) beta
744 \yl@xdiff=31\relax
745 \yl@ydiff=110\relax
746 {%
747 \thicklines%
748 \Put@Line(0,0)(3,-5){72}% % single bond at 4
749 }%
750 \putratom{41}{-230}{\@memberb}% % right type
751 %
752 \fi\fi\fi\fi
753 \fi\fi\fi\fi\fi%
754 \else\if\@tmpb D%double bond
755 \yl@xdiff=31\relax
756 \yl@ydiff=90\relax
757 \putlratom{-31}{-230}{\@memberb}% % left or right type
758 \Put@Line(-12,0)(0,-1){140}% % double bond at 4
759 \Put@Line(12,0)(0,-1){140}% % double bond at 4
760 \else\if\@tmpb B%beta single bond
761 \yl@xdiff=31\relax
762 \yl@ydiff=90\relax
763 \putlratom{-31}{-230}{\@memberb}% % left or right type
764 {%
765 \thicklines%
766 \Put@Line(0,0)(0,-1){140}% % single bond at 4
767 }%
768 \else\if\@tmpb A%alpha single bond
769 \yl@xdiff=31\relax
770 \yl@ydiff=90\relax
771 \putlratom{-31}{-230}{\@memberb}% % left or right type
772 \dotorline(0,0)(0,-1){140}/(0,0)(0,-140)%
773 \else\if\@tmpb U% undefined
774 \yl@xdiff=31\relax
775 \yl@ydiff=90\relax
776 \putlratom{-31}{-230}{\@memberb}% % left or right type
777 {%
778 \WaveBonds%
779 \Put@Line(0,0)(0,-1){140}% % single bond at 4
780 }%
781 \else\if\@tmpb W%beta single bond
782 \ifx\@tmpc\empty%
783 \yl@xdiff=-10\relax
784 \yl@ydiff=30\relax
785 \putlratom{150}{54}{\@memberb}% % left or right type
786 \Put@Line(0,0)(5,3){140}% % single bond at 4
787 \if@wrongbdWd
788 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
789 \fi
790 %2013/06/27
791 \else\if\@tmpc U%beta undefined
792 \yl@xdiff=-10\relax
793 \yl@ydiff=30\relax
794 {%
795 \WaveBonds%
796 \Put@Line(0,0)(5,3){140}% % single bond at 4
797 }%
798 \putlratom{150}{54}{\@memberb}% % left or right type
799 \else\if\@tmpc B%beta
800 \yl@xdiff=-10\relax
801 \yl@ydiff=30\relax
802 {%
803 \thicklines%
804 \Put@Line(0,0)(5,3){140}% % single bond at 4
805 }%
806 \putlratom{150}{54}{\@memberb}% % left or right type
807 \else\if\@tmpc A%alpha
808 \yl@xdiff=-10\relax
809 \yl@ydiff=30\relax
810 \dotorline(0,0)(5,3){140}/(0,0)(140,84)%
811 \putlratom{150}{54}{\@memberb}% % left or right type
812 %
813 \fi\fi\fi\fi
814 \else%
815 \yl@xdiff=31\relax
816 \yl@ydiff=90\relax
817 \putlratom{-31}{-230}{\@memberb}% % left or right type
818 \Put@Line(0,0)(0,-1){140}% % single bond at 4
819 \fi\fi\fi\fi\fi\fi%
820 \fi}%
821 % \end{macrocode}
822 % \end{macro}
823 %
824 % The macro |\@methsubstdL| is used to place substituents on a
825 % left-teminal down-side methylene. A new bond modifier ``W'' is
826 % added to typeset a terminal substituent.
827 % \changes{v5.01}{2013/06/27}{bug fix SU to SV, SV to SU. Addition Su, Sd, WU, WA, WB}
828 %
829 % \begin{macro}{\@methsubstdL}
830 % \begin{macrocode}
831 \def\@methsubstdL{%
832 \if@clip %clipping
833 \if\@tmpb S%single bond
834 \ifx\@tmpc\empty%
835 \yl@xdiff=31\relax
836 \yl@ydiff=90\relax
837 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
838 \putlratom{-31}{-230}{\@memberb}% % left or right type
839 \else\if\@tmpc B%(B) beta
840 \yl@xdiff=-36\relax
841 \yl@ydiff=100\relax
842 {%
843 \thicklines%
844 \Put@Line(-18,-30)(-3,-5){60}% % single bond at 4
845 }%
846 \putlatom{-42}{-230}{\@memberb}% % left type
847 \else\if\@tmpc A%(A) alpha
848 \yl@xdiff=37\relax
849 \yl@ydiff=100\relax
850 \dotorline(18,-30)(3,-5){60}/(18,-30)(72,-120)%
851 \putratom{41}{-230}{\@memberb}% % right type
852 \else\if\@tmpc b%(b) beta
853 \yl@xdiff=-36\relax
854 \yl@ydiff=100\relax
855 \Put@Line(-18,-30)(-3,-5){60}% % single bond at 4
856 \putlatom{-42}{-230}{\@memberb}% % left type
857 \else\if\@tmpc a%(a) alpha
858 \yl@xdiff=37\relax
859 \yl@ydiff=100\relax
860 \Put@Line(18,-30)(3,-5){60}% % single bond at 4
861 \putratom{41}{-230}{\@memberb}% % right type
862 \else\if\@tmpc U%(U) beta undefined%bug fix 2013/06/27 V-->U
863 \yl@xdiff=-36\relax
864 \yl@ydiff=100\relax
865 {%
866 \WaveBonds%
867 \Put@Line(-18,-30)(-3,-5){60}% % single bond at 4
868 }%
869 \putlatom{-42}{-230}{\@memberb}% % left type
870 \else\if\@tmpc V%(V) alpha undefined%bug fix 2013/06/27 U-->V
871 \yl@xdiff=37\relax
872 \yl@ydiff=100\relax
873 {%
874 \WaveBonds%
875 \Put@Line(18,-30)(3,-5){60}% % single bond at 4
876 }%
877 \putratom{41}{-230}{\@memberb}% % right type
878 %2013/06/27
879 \else\if\@tmpc d%(d) alpha
880 \yl@xdiff=-36\relax
881 \yl@ydiff=100\relax
882 \dotorline(-18,-30)(-3,-5){60}/(-18,-30)(-78,-130)%
883 \putlatom{-42}{-230}{\@memberb}% % left type
884 \else\if\@tmpc u%(u) beta
885 \yl@xdiff=37\relax
886 \yl@ydiff=100\relax
887 {%
888 \thicklines%
889 \Put@Line(18,-30)(3,-5){60}% % single bond at 4
890 }%
891 \putratom{41}{-230}{\@memberb}% % right type
892 %
893 \fi\fi
894 \fi\fi\fi\fi\fi\fi\fi%
895 \else\if\@tmpb D%double bond
896 \yl@xdiff=31\relax
897 \yl@ydiff=90\relax
898 \Put@Line(-12,-30)(0,-1){110}% % double bond at 4
899 \Put@Line(12,-30)(0,-1){110}% % double bond at 4
900 \putlratom{-31}{-230}{\@memberb}% % left or right type
901 \else\if\@tmpb B%beta single bond
902 \yl@xdiff=31\relax
903 \yl@ydiff=90\relax
904 {%
905 \thicklines%
906 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
907 }%
908 \putlratom{-31}{-230}{\@memberb}% % left or right type
909 \else\if\@tmpb A%alpha single bond
910 \yl@xdiff=31\relax
911 \yl@ydiff=90\relax
912 \dotorline(0,-30)(0,-1){110}/(0,-30)(0,-140)%
913 \putlratom{-31}{-230}{\@memberb}% % left or right type
914 \else\if\@tmpb U% undefined
915 \yl@xdiff=31\relax
916 \yl@ydiff=90\relax
917 {%
918 \WaveBonds%
919 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
920 }%
921 \putlratom{-31}{-230}{\@memberb}% % left or right type
922 \else\if\@tmpb W%beta single bond
923 \ifx\@tmpc\empty%
924 \yl@xdiff=10\relax
925 \yl@ydiff=30\relax
926 \Put@Line(-40,24)(-5,3){100}% % single bond at 4
927 \putlatom{-150}{54}{\@memberb}% % lefttype
928 \if@wrongbdWdL
929 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
930 \fi
931 %2013/06/27
932 \else\if\@tmpc U%beta undefined
933 \yl@xdiff=10\relax
934 \yl@ydiff=30\relax
935 {%
936 \WaveBonds%
937 \Put@Line(-40,24)(-5,3){100}% % single bond at 4
938 }%
939 \putlatom{-150}{54}{\@memberb}% % left type
940 \else\if\@tmpc B%beta
941 \yl@xdiff=10\relax
942 \yl@ydiff=30\relax
943 {%
944 \thicklines%
945 \Put@Line(-40,24)(-5,3){100}% % single bond at 4
946 }%
947 \putlatom{-150}{54}{\@memberb}% % left type
948 \else\if\@tmpc A%alpha
949 \yl@xdiff=10\relax
950 \yl@ydiff=30\relax
951 \dotorline(-40,24)(-5,3){100}/(-40,24)(-140,84)%
952 \putlatom{-150}{54}{\@memberb}% % left type
953 %
954 \fi\fi\fi\fi
955 \else%
956 \yl@xdiff=31\relax
957 \yl@ydiff=90\relax
958 \Put@Line(0,-30)(0,-1){110}% % single bond at 4
959 \putlratom{-31}{-230}{\@memberb}% % left or right type
960 \fi\fi\fi\fi\fi\fi%
961 \else% no clipping
962 \if\@tmpb S%single bond
963 \ifx\@tmpc\empty%
964 \yl@xdiff=31\relax
965 \yl@ydiff=90\relax
966 \Put@Line(0,0)(0,-1){140}% % single bond at 4
967 \putlratom{-31}{-230}{\@memberb}% % left or right type
968 \else\if\@tmpc B%(B) beta
969 \yl@xdiff=-30\relax
970 \yl@ydiff=110\relax
971 {%
972 \thicklines%
973 \Put@Line(0,0)(-3,-5){72}% % single bond at 4
974 }%
975 \putlatom{-42}{-230}{\@memberb}% % left type
976 \else\if\@tmpc A%(A) alpha
977 \yl@xdiff=31\relax
978 \yl@ydiff=110\relax
979 \dotorline(0,0)(3,-5){72}/(0,0)(72,-120)%
980 \putratom{41}{-230}{\@memberb}% % right type
981 \else\if\@tmpc b%(b) beta
982 \yl@xdiff=-30\relax
983 \yl@ydiff=110\relax
984 \Put@Line(0,0)(-3,-5){72}% % single bond at 4
985 \putlatom{-42}{-230}{\@memberb}% % left type
986 \else\if\@tmpc a%(a) alpha
987 \yl@xdiff=31\relax
988 \yl@ydiff=110\relax
989 \Put@Line(0,0)(3,-5){72}% % single bond at 4
990 \putratom{41}{-230}{\@memberb}% % right type
991 \else\if\@tmpc U%(U) beta undefined%bug fix 2013/06/27 V-->U
992 \yl@xdiff=-30\relax
993 \yl@ydiff=110\relax
994 {%
995 \WaveBonds%
996 \Put@Line(0,0)(-3,-5){72}% % single bond at 4
997 }%
998 \putlatom{-42}{-230}{\@memberb}% % left type
999 \else\if\@tmpc V%(V) alpha undefined%bug fix 2013/06/27 U-->V
1000 \yl@xdiff=31\relax
1001 \yl@ydiff=110\relax
1002 {%
1003 \WaveBonds%
1004 \Put@Line(0,0)(3,-5){72}% % single bond at 4
1005 }%
1006 \putratom{41}{-230}{\@memberb}% % right type
1007 %2013/06/27
1008 \else\if\@tmpc d%(d) alpha
1009 \yl@xdiff=-30\relax
1010 \yl@ydiff=110\relax
1011 \dotorline(0,0)(-3,-5){72}/(0,0)(-72,-120)%
1012 \putlatom{-42}{-230}{\@memberb}% % left type
1013 \else\if\@tmpc u%(u) beta
1014 \yl@xdiff=31\relax
1015 \yl@ydiff=110\relax
1016 {%
1017 \thicklines%
1018 \Put@Line(0,0)(3,-5){72}% % single bond at 4
1019 }%
1020 \putratom{41}{-230}{\@memberb}% % right type
1021 %
1022 \fi\fi
1023 \fi\fi\fi\fi\fi\fi\fi%
1024 \else\if\@tmpb D%double bond
1025 \yl@xdiff=31\relax
1026 \yl@ydiff=90\relax
1027 \Put@Line(-12,0)(0,-1){140}% % double bond at 4
1028 \Put@Line(12,0)(0,-1){140}% % double bond at 4
1029 \putlratom{-31}{-230}{\@memberb}% % left or right type
1030 \else\if\@tmpb B%beta single bond
1031 \yl@xdiff=31\relax
1032 \yl@ydiff=90\relax
1033 {%
1034 \thicklines%
1035 \Put@Line(0,0)(0,-1){140}% % single bond at 4
1036 }%
1037 \putlratom{-31}{-230}{\@memberb}% % left or right type
1038 \else\if\@tmpb A%alpha single bond
1039 \yl@xdiff=31\relax
1040 \yl@ydiff=90\relax
1041 \dotorline(0,0)(0,-1){140}/(0,0)(0,-140)%
1042 \putlratom{-31}{-230}{\@memberb}% % left or right type
1043 \else\if\@tmpb U%beta undefined
1044 \yl@xdiff=31\relax
1045 \yl@ydiff=90\relax
1046 {%
1047 \WaveBonds%
1048 \Put@Line(0,0)(0,-1){140}% % single bond at 4
1049 }%
1050 \putlratom{-31}{-230}{\@memberb}% % left or right type
1051 \else\if\@tmpb W%beta single bond
1052 \ifx\@tmpc\empty%
1053 \yl@xdiff=10\relax
1054 \yl@ydiff=30\relax
1055 \Put@Line(0,0)(-5,3){140}% % single bond at 4
1056 \putlatom{-150}{54}{\@memberb}% % left type
1057 \if@wrongbdWdL
1058 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
1059 \fi
1060 %2013/06/27
1061 \else\if\@tmpc U%beta undefined
1062 \yl@xdiff=10\relax
1063 \yl@ydiff=30\relax
1064 {%
1065 \WaveBonds%
1066 \Put@Line(0,0)(-5,3){140}% % single bond at 4
1067 }%
1068 \putlatom{-150}{54}{\@memberb}% % left type
1069 \else\if\@tmpc B%beta
1070 \yl@xdiff=10\relax
1071 \yl@ydiff=30\relax
1072 {%
1073 \thicklines%
1074 \Put@Line(0,0)(-5,3){140}% % single bond at 4
1075 }%
1076 \putlatom{-150}{54}{\@memberb}% % left type
1077 \else\if\@tmpc A%alpha
1078 \yl@xdiff=10\relax
1079 \yl@ydiff=30\relax
1080 \dotorline(0,0)(-5,3){140}/(0,0)(-140,84)%
1081 \putlatom{-150}{54}{\@memberb}% % left type
1082 %
1083 \fi\fi\fi\fi
1084 \else%
1085 \yl@xdiff=31\relax
1086 \yl@ydiff=90\relax
1087 \Put@Line(0,0)(0,-1){140}% % single bond at 4
1088 \putlratom{-31}{-230}{\@memberb}% % left or right type
1089 \fi\fi\fi\fi\fi\fi%
1090 \fi}%end of \@methsubstdL
1091 % \end{macrocode}
1092 % \end{macro}
1093 %
1094 % The macro |\@methsubstaL| is used to place substituents on a
1095 % left-teminal upper-side methylene. A new bond modifier ``W'' is
1096 % added to typeset a terminal substituent.
1097 % \changes{v5.01}{2013/06/27}{bug fix SU to SV, SV to SU. Addition Su, Sd, WU, WA, WB}
1098 %
1099 % \begin{macro}{\@methsubstaL}
1100 % \begin{macrocode}
1101 \def\@methsubstaL{%
1102 \if@aclip% %clipping
1103 \if\@tmpb S%single bond
1104 \ifx\@tmpc\empty%
1105 \yl@xdiff=31\relax
1106 \yl@ydiff=-17\relax
1107 \Put@Line(0,436)(0,1){110}% % single bond at 1
1108 \putlratom{-31}{563}{\@memberb}% % left or right type
1109 \else\if\@tmpc B%(B) beta
1110 \yl@xdiff=-36\relax
1111 \yl@ydiff=-27\relax
1112 {%
1113 \thicklines%
1114 \Put@Line(-18,436)(-3,5){60}% % single bond at 1
1115 }%
1116 \putlatom{-42}{563}{\@memberb}% % left type
1117 \else\if\@tmpc A%(A) alpha
1118 \yl@xdiff=37\relax
1119 \yl@ydiff=-27\relax
1120 \dotorline(18,436)(3,5){60}/(18,436)(72,526)%
1121 \putratom{41}{563}{\@memberb}% % right type
1122 \else\if\@tmpc b%(b) beta
1123 \yl@xdiff=-36\relax
1124 \yl@ydiff=-27\relax
1125 \Put@Line(-18,436)(-3,5){60}% % single bond at 1
1126 \putlatom{-42}{563}{\@memberb}% % left type
1127 \else\if\@tmpc a%(a) alpha
1128 \yl@xdiff=37\relax
1129 \yl@ydiff=-27\relax
1130 \Put@Line(18,436)(3,5){60}% % single bond at 1
1131 \putratom{41}{563}{\@memberb}% % right type
1132 \else\if\@tmpc U%(U) beta undefined%bug fix 2013/06/27 V-->U
1133 \yl@xdiff=-36\relax
1134 \yl@ydiff=-27\relax
1135 {%
1136 \WaveBonds%
1137 \Put@Line(-18,436)(-3,5){60}% % single bond at 1
1138 }%
1139 \putlatom{-42}{563}{\@memberb}% % left type
1140 \else\if\@tmpc V%(V) alpha undefined%bug fix 2013/06/27 U-->V
1141 \yl@xdiff=37\relax
1142 \yl@ydiff=-27\relax
1143 {%
1144 \WaveBonds%
1145 \Put@Line(18,436)(3,5){60}% % single bond at 1
1146 }%
1147 \putratom{41}{563}{\@memberb}% % right type
1148 %2013/06/27
1149 \else\if\@tmpc d%(d) alpha
1150 \yl@xdiff=-36\relax
1151 \yl@ydiff=-27\relax
1152 \dotorline(-18,436)(-3,5){60}/(-18,436)(-78,536)%
1153 \putlatom{-42}{563}{\@memberb}% % left type
1154 \else\if\@tmpc u%(u) beta
1155 \yl@xdiff=37\relax
1156 \yl@ydiff=-27\relax
1157 {%
1158 \thicklines%
1159 \Put@Line(18,436)(3,5){60}% % single bond at 1
1160 }%
1161 \putratom{41}{563}{\@memberb}% % right type
1162 %
1163 \fi\fi
1164 \fi\fi\fi\fi\fi\fi\fi%
1165 \else\if\@tmpb D%double bond
1166 \yl@xdiff=31\relax
1167 \yl@ydiff=-17\relax
1168 \Put@Line(-12,436)(0,1){110}% % double bond at 1
1169 \Put@Line(12,436)(0,1){110}% % double bond at 1
1170 \putlratom{-31}{563}{\@memberb}% % left or right type
1171 \else\if\@tmpb B%beta single bond
1172 \yl@xdiff=31\relax
1173 \yl@ydiff=-17\relax
1174 {%
1175 \thicklines%
1176 \Put@Line(0,436)(0,1){110}% % single bond at 1
1177 }%
1178 \putlratom{-31}{563}{\@memberb}% % left or right type
1179 \else\if\@tmpb A%alpha single bond
1180 \yl@xdiff=31\relax
1181 \yl@ydiff=-17\relax
1182 \dotorline(0,436)(0,1){110}/(0,436)(0,546)%
1183 \putlratom{-31}{563}{\@memberb}% % left or right type
1184 \else\if\@tmpb U%beta undefined
1185 \yl@xdiff=31\relax
1186 \yl@ydiff=-17\relax
1187 {%
1188 \WaveBonds%
1189 \Put@Line(0,436)(0,1){110}% % single bond at 1
1190 }%
1191 \putlratom{-31}{563}{\@memberb}% % left or right type
1192 \else\if\@tmpb W%beta single bond
1193 \ifx\@tmpc\empty%
1194 \yl@xdiff=10\relax
1195 \yl@ydiff=46\relax
1196 \Put@Line(-40,382)(-5,-3){100}% % single bond at 1
1197 \putlatom{-150}{276}{\@memberb}% % left type
1198 \if@wrongbdWaL
1199 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
1200 \fi
1201 %2013/06/27
1202 \else\if\@tmpc U%undefined
1203 \yl@xdiff=10\relax
1204 \yl@ydiff=46\relax
1205 {%
1206 \WaveBonds%
1207 \Put@Line(-40,382)(-5,-3){100}% % single bond at 1
1208 }%
1209 \putlatom{-150}{276}{\@memberb}% % left type
1210 \else\if\@tmpc B%beta
1211 \yl@xdiff=10\relax
1212 \yl@ydiff=46\relax
1213 {%
1214 \thicklines%
1215 \Put@Line(-40,382)(-5,-3){100}% % single bond at 1
1216 }%
1217 \putlatom{-150}{276}{\@memberb}% % left type
1218 \else\if\@tmpc A%alpha
1219 \yl@xdiff=10\relax
1220 \yl@ydiff=46\relax
1221 \dotorline(-40,382)(-5,-3){100}/(-40,382)(-140,322)%
1222 \putlatom{-150}{276}{\@memberb}% % left type
1223 %
1224 \fi\fi\fi\fi
1225 \else%
1226 \yl@xdiff=31\relax
1227 \yl@ydiff=-17\relax
1228 \Put@Line(0,436)(0,1){110}% % single bond at 1
1229 \putlratom{-31}{563}{\@memberb}% % left or right type
1230 \fi\fi\fi\fi\fi\fi%
1231 \else% % no clipping
1232 \if\@tmpb S%single bond
1233 \ifx\@tmpc\empty%
1234 \yl@xdiff=31\relax
1235 \yl@ydiff=-17\relax
1236 \Put@Line(0,406)(0,1){140}% % single bond at 1
1237 \putlratom{-31}{563}{\@memberb}% % left or right type
1238 \else\if\@tmpc B%(B) beta
1239 \yl@xdiff=-30\relax
1240 \yl@ydiff=-37\relax
1241 {%
1242 \thicklines%
1243 \Put@Line(0,406)(-3,5){72}% % single bond at 1
1244 }%
1245 \putlatom{-42}{563}{\@memberb}% % left type
1246 \else\if\@tmpc A%(A) alpha
1247 \yl@xdiff=31\relax
1248 \yl@ydiff=-37\relax
1249 \dotorline(0,406)(3,5){72}/(0,406)(72,526)%
1250 \putratom{41}{563}{\@memberb}% % right type
1251 \else\if\@tmpc b%(b) beta
1252 \yl@xdiff=-30\relax
1253 \yl@ydiff=-37\relax
1254 \Put@Line(0,406)(-3,5){72}% % single bond at 1
1255 \putlatom{-42}{563}{\@memberb}% % left type
1256 \else\if\@tmpc a%(a) alpha
1257 \yl@xdiff=31\relax
1258 \yl@ydiff=-37\relax
1259 \Put@Line(0,406)(3,5){72}% % single bond at 1
1260 \putratom{41}{563}{\@memberb}% % right type
1261 \else\if\@tmpc V%(V) beta undefined
1262 \yl@xdiff=-30\relax
1263 \yl@ydiff=-37\relax
1264 {%
1265 \WaveBonds%
1266 \Put@Line(0,406)(-3,5){72}% % single bond at 1
1267 }%
1268 \putlatom{-42}{563}{\@memberb}% % left type
1269 \else\if\@tmpc U%(U) alpha undefined
1270 \yl@xdiff=31\relax
1271 \yl@ydiff=-37\relax
1272 {%
1273 \WaveBonds%
1274 \Put@Line(0,406)(3,5){72}% % single bond at 1
1275 }%
1276 \putratom{41}{563}{\@memberb}% % right type
1277 %2013/06/27
1278 \else\if\@tmpc d%(d) alpha
1279 \yl@xdiff=-30\relax
1280 \yl@ydiff=-37\relax
1281 \dotorline(0,406)(-3,5){72}/(0,406)(-72,526)%
1282 \putlatom{-42}{563}{\@memberb}% % left type
1283 \else\if\@tmpc u%(u) beta
1284 \yl@xdiff=31\relax
1285 \yl@ydiff=-37\relax
1286 {%
1287 \thicklines%
1288 \Put@Line(0,406)(3,5){72}% % single bond at 1
1289 }%
1290 \putratom{41}{563}{\@memberb}% % right type
1291 %
1292 \fi\fi
1293 \fi\fi\fi\fi\fi\fi\fi%
1294 \else\if\@tmpb D%double bond
1295 \yl@xdiff=31\relax
1296 \yl@ydiff=-17\relax
1297 \Put@Line(-12,406)(0,1){140}% % double bond at 1
1298 \Put@Line(12,406)(0,1){140}% % double bond at 1
1299 \putlratom{-31}{563}{\@memberb}% % left or right type
1300 \else\if\@tmpb B%beta single bond
1301 \yl@xdiff=31\relax
1302 \yl@ydiff=-17\relax
1303 {%
1304 \thicklines%
1305 \Put@Line(0,406)(0,1){140}% % single bond at 1
1306 }%
1307 \putlratom{-31}{563}{\@memberb}% % left or right type
1308 \else\if\@tmpb A%alpha single bond
1309 \yl@xdiff=31\relax
1310 \yl@ydiff=-17\relax
1311 \dotorline(0,406)(0,1){140}/(0,406)(0,546)%
1312 \putlratom{-31}{563}{\@memberb}% % left or right type
1313 \else\if\@tmpb U%beta undefined
1314 \yl@xdiff=31\relax
1315 \yl@ydiff=-17\relax
1316 {%
1317 \WaveBonds%
1318 \Put@Line(0,406)(0,1){140}% % single bond at 1
1319 }%
1320 \putlratom{-31}{563}{\@memberb}% % left or right type
1321 \else\if\@tmpb W%beta single bond
1322 \ifx\@tmpc\empty%
1323 \yl@xdiff=10\relax
1324 \yl@ydiff=58\relax
1325 \Put@Line(0,406)(-5,-3){120}% % single bond at 1
1326 \putlatom{-130}{276}{\@memberb}% % left type
1327 \if@wrongbdWaL
1328 \XyMTeXWarning{Wrong Bond-Modifier (W)}%
1329 \fi
1330 %2013/06/27
1331 \else\if\@tmpc U%undefined
1332 \yl@xdiff=10\relax
1333 \yl@ydiff=58\relax
1334 {%
1335 \WaveBonds%
1336 \Put@Line(0,406)(-5,-3){120}% % single bond at 1
1337 }%
1338 \putlatom{-130}{276}{\@memberb}% % left type
1339 \else\if\@tmpc B%beta
1340 \yl@xdiff=10\relax
1341 \yl@ydiff=58\relax
1342 {%
1343 \thicklines%
1344 \Put@Line(0,406)(-5,-3){120}% % single bond at 1
1345 }%
1346 \putlatom{-130}{276}{\@memberb}% % left type
1347 \else\if\@tmpc A%alpha
1348 \yl@xdiff=10\relax
1349 \yl@ydiff=58\relax
1350 \dotorline(0,406)(-5,-3){120}/(0,406)(-120,334)%
1351 \putlatom{-130}{276}{\@memberb}% % left type
1352 %
1353 \fi\fi\fi\fi
1354 \else%
1355 \yl@xdiff=31\relax
1356 \yl@ydiff=-17\relax
1357 \Put@Line(0,406)(0,1){140}% % single bond at 1
1358 \putlratom{-31}{563}{\@memberb}% % left or right type
1359 \fi\fi\fi\fi\fi\fi%
1360 \fi}%
1361 % \end{macrocode}
1362 % \end{macro}
1363 %
1364 % \section{Setting Bonds}
1365 % \subsection{Outer Skeletal Bonds}
1366 %
1367 % The macros |\SKbondB| and |\SKbondA| are used to typeset
1368 % outer skeletal bonds of a methylene chain (|\..methylene|)
1369 %
1370 % \begin{macro}{\SKbondB}
1371 % \begin{macrocode}
1372 \def\SKbondB{%
1373 \ifx\bbb\empty%
1374 \ifx\ccc\empty%
1375 \Put@Line(0,406)(5,-3){171}% %bond 1-2
1376 \else%
1377 \Put@Line(0,406)(5,-3){136}% %bond 1-2
1378 \fi%
1379 \else%
1380 \ifx\ccc\empty%
1381 \Put@Line(35,385)(5,-3){136}% %bond 1-2
1382 \else%
1383 \Put@Line(35,385)(5,-3){100}% %bond 1-2
1384 \fi%
1385 \fi}%
1386 % \end{macrocode}
1387 % \end{macro}
1388 %
1389 % \begin{macro}{\SKbondA}
1390 % \begin{macrocode}
1391 \def\SKbondA{%
1392 \ifx\bbb\empty%
1393 \ifx\aaa\empty%
1394 \Put@Line(0,406)(-5,-3){171}% %bond 1-6
1395 \else%
1396 \Put@Line(0,406)(-5,-3){136}% %bond 1-6
1397 \fi%
1398 \else%
1399 \ifx\aaa\empty%
1400 \Put@Line(-35,385)(-5,-3){136}% %bond 1-6
1401 \else%
1402 \Put@Line(-35,385)(-5,-3){100}% %bond 1-6
1403 \fi%
1404 \fi}%
1405 % \end{macrocode}
1406 % \end{macro}
1407 %
1408 % The macros |\SKbondBi| and |\SKbondAi| are used to typeset
1409 % outer skeletal bonds of a methylene chain (inverse type |\..methylenei|).
1410 %
1411 % \begin{macro}{\SKbondBi}
1412 % \begin{macrocode}
1413 \def\SKbondBi{%
1414 \begin{sfpicture}(0,0)(0,0)
1415 \ifx\bbb\empty%
1416 \ifx\ccc\empty%
1417 \Put@Line(0,0)(5,3){171}% %bond 4-3
1418 \else%
1419 \Put@Line(0,0)(5,3){136}% %bond 4-3
1420 \fi%
1421 \else%
1422 \ifx\ccc\empty%
1423 \Put@Line(35,21)(5,3){138}% %bond 4-3
1424 \else%
1425 \Put@Line(35,21)(5,3){100}% %bond 4-3
1426 \fi%
1427 \fi\end{sfpicture}}%
1428 % \end{macrocode}
1429 % \end{macro}
1430 %
1431 % \begin{macro}{\SKbondAi}
1432 % \begin{macrocode}
1433 \def\SKbondAi{%
1434 \begin{sfpicture}(0,0)(0,0)
1435 \ifx\bbb\empty%
1436 \ifx\aaa\empty%
1437 \Put@Line(0,0)(-5,3){171}% %bond 4-5
1438 \else%
1439 \Put@Line(0,0)(-5,3){136}% %bond 4-5
1440 \fi%
1441 \else%
1442 \ifx\aaa\empty%
1443 \Put@Line(-35,21)(-5,3){138}% %bond 4-5
1444 \else%
1445 \Put@Line(-35,21)(-5,3){100}% %bond 4-5
1446 \fi%
1447 \fi\end{sfpicture}}%
1448 % \end{macrocode}
1449 % \end{macro}
1450 %
1451 % \subsection{Inner Double Bonds}
1452 %
1453 % The macros |\bondB| is used to place a line of
1454 % a double bond in the (5,-3) direction at the lower side
1455 % of an outer skeletal bond.
1456 %
1457 % \begin{macro}{\bondB}
1458 % \begin{macrocode}
1459 \def\bondB{%
1460 \ifx\bbb\empty%
1461 \ifx\ccc\empty%
1462 \Put@Line(6,364)(5,-3){126}% %double bond 1-2
1463 \else%
1464 \Put@Line(6,364)(5,-3){100}% %double bond 1-2
1465 \fi%
1466 \else%
1467 \ifx\ccc\empty%
1468 \Put@Line(35,340)(5,-3){100}% %double bond 1-2
1469 \else%
1470 \Put@Line(35,352)(5,-3){100}% %double bond 1-2
1471 \fi% % line <1OO not available
1472 \fi%
1473 }%
1474 % \end{macrocode}
1475 % \end{macro}
1476 %
1477 % The macros |\bondBB| is used to place a line of
1478 % a double bond in the (5,-3) direction at the upper side
1479 % of an outer skeletal bond.
1480 %
1481 % \begin{macro}{\bondBB}
1482 % \begin{macrocode}
1483 \def\bondBB{%
1484 \ifx\bbb\empty%
1485 \ifx\ccc\empty%
1486 \Put@Line(42,420)(5,-3){126}% %double bond 1-2
1487 \else%
1488 \Put@Line(42,420)(5,-3){100}% %double bond 1-2
1489 \fi%
1490 \else%
1491 \ifx\ccc\empty%
1492 \Put@Line(52,412)(5,-3){110}% %double bond 1-2
1493 \else%
1494 \Put@Line(52,412)(5,-3){100}% %double bond 1-2
1495 \fi% % line <1OO not available
1496 \fi%
1497 }%
1498 % \end{macrocode}
1499 % \end{macro}
1500 %
1501 % The macros |\bondA| is used to place a line of
1502 % a double bond in the (-5,-3) direction at the lower
1503 % side of an outer skeletal bond.
1504 %
1505 % \begin{macro}{\bondA}
1506 % \begin{macrocode}
1507 \def\bondA{%
1508 \ifx\bbb\empty%
1509 \ifx\aaa\empty%
1510 \Put@Line(-6,364)(-5,-3){126}% %double bond 1-6
1511 \else%
1512 \Put@Line(-6,364)(-5,-3){100}% %double bond 1-6
1513 \fi%
1514 \else%
1515 \ifx\aaa\empty%
1516 \Put@Line(-35,340)(-5,-3){100}% %double bond 1-6
1517 \else%
1518 \Put@Line(-35,352)(-5,-3){100}% %double bond 1-6
1519 \fi% % line <1OO not available
1520 \fi%
1521 }%
1522 % \end{macrocode}
1523 % \end{macro}
1524 %
1525 % The macros |\bondAA| is used to place a line of
1526 % a double bond in the (-5,-3) direction at the upper side
1527 % of an outer skeletal bond.
1528 %
1529 % \begin{macro}{\bondAA}
1530 % \begin{macrocode}
1531 \def\bondAA{%
1532 \ifx\bbb\empty%
1533 \ifx\aaa\empty%
1534 \Put@Line(-42,420)(-5,-3){126}% %double bond 1-6
1535 \else%
1536 \Put@Line(-42,420)(-5,-3){100}% %double bond 1-6
1537 \fi%
1538 \else%
1539 \ifx\aaa\empty%
1540 \Put@Line(-52,412)(-5,-3){100}% %double bond 1-6
1541 \else%
1542 \Put@Line(-52,412)(-5,-3){100}% %double bond 1-6
1543 \fi% % line <1OO not available
1544 \fi%
1545 }%
1546 % \end{macrocode}
1547 % \end{macro}
1548 %
1549 % The bond-setting commands with sufix ``i'' are used in the definitions
1550 % of commands such as |\...methylenei|.
1551 %
1552 % The macros |\bondBi| is used to place a line of
1553 % a double bond in the (5,3) direction at the upper side
1554 % of an outer skeletal bond.
1555 %
1556 % \begin{macro}{\bondBi}
1557 % \begin{macrocode}
1558 \def\bondBi{%
1559 \ifx\bbb\empty%
1560 \ifx\ccc\empty%
1561 \Put@Line(6,42)(5,3){126}% %double bond 4-3
1562 \else%
1563 \Put@Line(6,42)(5,3){100}% %double bond 4-3
1564 \fi%
1565 \else%
1566 \ifx\ccc\empty%
1567 \Put@Line(35,66)(5,3){100}% %double bond 4-3
1568 \else%
1569 \Put@Line(35,60)(5,3){100}% %double bond 4-3
1570 \fi% % line <1OO not available
1571 \fi%
1572 }%
1573 % \end{macrocode}
1574 % \end{macro}
1575 %
1576 % The macros |\bondBBi| is used to place a line of
1577 % a double bond in the (5,3) direction at the lower
1578 % side of an outer skeletal bond.
1579 %
1580 % \begin{macro}{\bondBBi}
1581 % \begin{macrocode}
1582 \def\bondBBi{%
1583 \ifx\bbb\empty%
1584 \ifx\ccc\empty%
1585 % \Put@Line(6,42)(5,3){126}% %double bond 4-3
1586 \Put@Line(42,-14)(5,3){126}% %double bond 1-6
1587 \else%
1588 % \Put@Line(6,42)(5,3){100}% %double bond 4-3
1589 % \Put@Line(42,-14)(5,3){100}% %double bond 1-6
1590 \Put@Line(30,-14)(5,3){100}% %double bond 1-6
1591 \fi%
1592 \else%
1593 \ifx\ccc\empty%
1594 % \Put@Line(35,66)(5,3){100}% %double bond 4-3
1595 % \Put@Line(52,6)(5,3){100}% %double bond 1-6
1596 \Put@Line(52,0)(5,3){100}% %double bond 1-6
1597 \else%
1598 % \Put@Line(35,60)(5,3){100}% %double bond 4-3
1599 \Put@Line(52,0)(5,3){100}% %double bond 4-5
1600 \fi% % line <1OO not available
1601 \fi%
1602 }%
1603 % \end{macrocode}
1604 % \end{macro}
1605 %
1606 % The macros |\bondAi| is used to place a line of
1607 % a double bond in the (-5,3) direction at the upper
1608 % side of an outer skeletal bond.
1609
1610 % \begin{macro}{\bondAi}
1611 % \begin{macrocode}
1612 \def\bondAi{%
1613 \ifx\bbb\empty%
1614 \ifx\aaa\empty%
1615 \Put@Line(-6,42)(-5,3){126}% %double bond 4-5
1616 \else%
1617 \Put@Line(-6,42)(-5,3){100}% %double bond 4-5
1618 \fi%
1619 \else%
1620 \ifx\aaa\empty%
1621 \Put@Line(-35,66)(-5,3){100}% %double bond 4-5
1622 \else%
1623 \Put@Line(-35,60)(-5,3){100}% %double bond 4-5
1624 \fi% % line <1OO not available
1625 \fi%
1626 }%
1627 % \end{macrocode}
1628 % \end{macro}
1629 %
1630 % The macros |\bondAAi| is used to place a line of
1631 % a double bond in the (-5,3) direction at the lower
1632 % side of an outer skeletal bond.
1633 %
1634 % \begin{macro}{\bondAAi}
1635 % \begin{macrocode}
1636 \def\bondAAi{%
1637 \ifx\bbb\empty%
1638 \ifx\aaa\empty%
1639 % \Put@Line(-6,42)(-5,3){126}% %double bond 4-5
1640 \Put@Line(-42,-14)(-5,3){126}% %double bond 1-6
1641 \else%
1642 % \Put@Line(-6,42)(-5,3){100}% %double bond 4-5
1643 \Put@Line(-42,-14)(-5,3){100}% %double bond 1-6
1644 \fi%
1645 \else%
1646 \ifx\aaa\empty%
1647 % \Put@Line(-35,66)(-5,3){100}% %double bond 4-5
1648 \Put@Line(-52,6)(-5,3){100}% %double bond 1-6
1649 \else%
1650 % \Put@Line(-35,60)(-5,3){100}% %double bond 4-5
1651 \Put@Line(-52,0)(-5,3){100}% %double bond 4-5
1652 \fi% % line <1OO not available
1653 \fi%
1654 }%
1655 % \end{macrocode}
1656 % \end{macro}
1657 %
1658 % \section{Switches}
1659 %
1660 % \begin{macro}{\if@adoublebond}
1661 % \begin{macro}{\if@bdoublebond}
1662 % \begin{macro}{\if@Adoublebond}
1663 % \begin{macro}{\if@adoublebond}
1664 % \begin{macro}{\reset@double}
1665 % \begin{macrocode}
1666 \newif\if@adoublebond \@adoublebondfalse
1667 \newif\if@bdoublebond \@bdoublebondfalse
1668 \newif\if@Adoublebond \@Adoublebondfalse
1669 \newif\if@Bdoublebond \@Bdoublebondfalse
1670 \def\reset@double{%
1671 \@adoublebondfalse\@bdoublebondfalse
1672 \@Adoublebondfalse\@Bdoublebondfalse}
1673 % \end{macrocode}
1674 % \end{macro}
1675 % \end{macro}
1676 % \end{macro}
1677 % \end{macro}
1678 % \end{macro}
1679 %
1680 % \begin{macro}{\if@linterchainsw}
1681 % \begin{macro}{\if@rinterchainsw}
1682 % \begin{macro}{\reset@interchainsw}
1683 % \begin{macrocode}
1684 \newif\if@linterchainsw \@linterchainswfalse
1685 \newif\if@rinterchainsw \@rinterchainswfalse
1686 \def\reset@interchainsw{\@linterchainswfalse\@rinterchainswfalse}
1687 % \end{macrocode}
1688 % \end{macro}
1689 % \end{macro}
1690 % \end{macro}
1691 %
1692 % \section{Trimethylene}
1693 % \subsection{Normal direction}
1694 %
1695 % A trimethylene (or propane) and its hetera analogs can be typeset
1696 % by the command |\trimethylene|, which is mainly based on
1697 % two inner commands: |\yltrimethyleneposition| for adjusting a
1698 % substitution site and |\@@trimethylene| for
1699 % placing hetero atoms, double bonds, and substituents.
1700 %
1701 % \begin{macro}{\@@trimethylene}
1702 % \begin{verbatim}
1703 % \@@trimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
1704 %
1705 % <TERMswitch>
1706 % 0: all positions
1707 % 1: positions bbb and ccc
1708 % 2: positions aaa and bbb
1709 %
1710 % bbb
1711 % 2
1712 % a / ` b
1713 % 1 3
1714 % aaa ccc
1715 %
1716 % <Adjust>
1717 % a positive or negative integer to adjust locant numbers
1718 % \end{verbatim}
1719 %
1720 % \changes{v5.00}{2010/10/01}{For bond coloring}
1721 % \begin{macrocode}
1722 \def\@@trimethylene#1#2#3#4{%
1723 \leavevmode
1724 \iniatom\iniflag%initialize
1725 \test@vrtx@trimethy{#1}{#4}%
1726 %\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
1727 \begin{sfpicture}(450,480)(0,0)%
1728 % %%%%%%%%%%%%%%%%%%
1729 % % outer skeleton %
1730 % %%%%%%%%%%%%%%%%%%
1731 \Put@Direct(171,-303){\SKbondB}% bond between 1 and 2
1732 \Put@Direct(171,-303){\SKbondA}% bond between 1 and 6
1733 % %%%%%%%%%%%%%%%%%%%%%
1734 % % inner double bond %
1735 % %%%%%%%%%%%%%%%%%%%%%
1736 \if@adoublebond\relax\Put@Direct(171,-303){\bondA}\fi
1737 \if@bdoublebond\relax\Put@Direct(171,-303){\bondB}\fi
1738 \if@Adoublebond\relax\Put@Direct(171,-303){\bondAA}\fi
1739 \if@Bdoublebond\relax\Put@Direct(171,-303){\bondBB}\fi
1740 % %%%%%%%%%%%%%%%%%%%%%%%%
1741 % % setting hetero atoms %
1742 % %%%%%%%%%%%%%%%%%%%%%%%%
1743 \test@termcnt=#3\relax
1744 %\set@hetatom@methyl{#1}{0}{0}{4}{0}%
1745 \set@hetatom@methyl{#1}{#4}{0}{4}{0}%
1746 % %%%%%%%%%%%%%%%%%%%%%%%%
1747 % % setting substituents %
1748 % %%%%%%%%%%%%%%%%%%%%%%%%
1749 \@forsemicol\member:=#2\do{%
1750 \ifx\member\empty\else
1751 \expandafter\@m@mb@r\member;\relax%
1752 \expandafter\threech@r\@membera{}{}%
1753 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1754 \ifx\@memberb\@yl\else
1755 \ifcase\@tmpaa%0 omit
1756 \or
1757 \ifcase#3
1758 \setBScolor{\if@aclip \@cliptrue \else \@clipfalse\fi
1759 \Put@Direct(0,0){\@methsubstdL}}%
1760 \or\relax
1761 \or
1762 \setBScolor{\if@aclip \@cliptrue \else \@clipfalse\fi
1763 \Put@Direct(0,0){\@methsubstdL}}%
1764 \fi
1765 \or
1766 \setBScolor{\if@bclip \@acliptrue \else \@aclipfalse\fi
1767 \Put@Direct(171,-303){\@methsubsta}}%
1768 \or
1769 \ifcase#3
1770 \setBScolor{\if@cclip \@cliptrue\else \@clipfalse\fi
1771 \Put@Direct(342,0){\@methsubstd}}%
1772 \or
1773 \setBScolor{\if@cclip \@cliptrue\else \@clipfalse\fi
1774 \Put@Direct(342,0){\@methsubstd}}%
1775 \or\relax
1776 \fi
1777 \fi%end of ifcase
1778 \fi\fi
1779 }%
1780 \end{sfpicture}}% end of \@@trimethylene
1781 % \end{macrocode}
1782 % \end{macro}
1783 %
1784 % \begin{macro}{\test@vrtx@trimethy}
1785 % \changes{v2.00}{1998/12/21}{New command: \cs{test@vrtx@trimethy}}
1786 % \begin{macrocode}
1787 \def\test@vrtx@trimethy#1#2{%
1788 \@forsemicol\member:=#1\do{%
1789 \ifx\member\empty\else
1790 \expandafter\@m@mb@r\member;\relax%
1791 \expandafter\twoch@r\@membera{}%
1792 \@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
1793 \ifcase\@tmpaa%
1794 \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
1795 \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
1796 \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
1797 \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
1798 \or \if\@tmpb s\relax \xdef\ccc{}\else\if\@tmpb h\relax
1799 \xdef\ccc{@}\else\xdef\ccc{@}\fi\fi
1800 \fi\fi}}
1801 % \end{macrocode}
1802 % \end{macro}
1803 %
1804 % The |\yltrimethyleneposition| is used to adjust
1805 % substitution sites for the command |\@@trimethylene|.
1806 % \changes{v5.01}{2013/06/22}{bug fix}
1807 %
1808 % \begin{macro}{\yltrimethyleneposition}
1809 % \begin{verbatim}
1810 % \yltrimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
1811 %
1812 % <TERMswitch>
1813 % 0: all positions
1814 % 1: positions bbb and ccc
1815 % 2: positions aaa and bbb
1816 %
1817 % bbb
1818 % 2
1819 % a / ` b
1820 % 1 3
1821 % aaa ccc
1822 %
1823 % <Adjust>
1824 % a positive or negative integer to adjust locant numbers
1825 % \end{verbatim}
1826 %
1827 % \changes{v5.01}{2013/03/29}{bug fix on a terminal position}
1828 % \changes{v5.01}{2013/07/20}{bug fix}
1829 % \begin{macrocode}%
1830 \def\yltrimethyleneposition#1#2#3#4{%
1831 \iniatom\iniflag%initialize2013/06/22
1832 \reset@@yl%%2013/07/20bug fix
1833 \@forsemicol\member:=#1\do{%
1834 \ifx\member\empty\else
1835 \expandafter\@m@mb@r\member;\relax%
1836 \expandafter\twoch@r\@membera{}%
1837 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1838 \if\@tmpb s\else%2013/06/22added for bug fix
1839 \ifcase\@tmpaa%
1840 \or \def\aaa{@}%\def\aaa{\@memberb}%
1841 \or \def\bbb{@}%\def\bbb{\@memberb}%
1842 \or \def\ccc{@}%\def\ccc{\@memberb}%
1843 \fi\fi
1844 \fi
1845 }%
1846 \@@ylswfalse%%%\@reset@ylsw
1847 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
1848 \expandafter\threech@r\@membera{}{}%
1849 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
1850 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1851 \if@@ylsw
1852 \ifcase\@tmpaa%0 omit
1853 \or
1854 \ifcase#3
1855 \ifx\aaa\empty
1856 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1857 \else
1858 \if@linterchainsw%interchain position
1859 \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1860 \else% terminal position
1861 % \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1862 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1%bug fix 2013/03/29
1863 \fi
1864 \fi
1865 \or\relax
1866 \or
1867 \ifx\aaa\empty
1868 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
1869 \else
1870 \if@linterchainsw%interchain position
1871 \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
1872 \else% terminal position
1873 \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
1874 \fi
1875 \fi
1876 \fi
1877 \or
1878 \ifx\bbb\empty
1879 \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
1880 \else
1881 \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
1882 \fi
1883 \or
1884 \ifcase#3
1885 \ifx\ccc\empty
1886 \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1887 \else
1888 \if@rinterchainsw%interchain position
1889 \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1890 \else
1891 \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
1892 \fi
1893 \fi
1894 \or
1895 \ifx\ccc\empty
1896 \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
1897 \else
1898 \if@rinterchainsw%interchain position
1899 \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
1900 \else
1901 \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
1902 \fi
1903 \fi
1904 \or\relax
1905 \fi
1906 \fi%end of ifcase
1907 \fi}}% end of \yltrimethyleneposition
1908 % \end{macrocode}
1909 % \end{macro}
1910 %
1911 % The counter |\test@termcnt|, which is equal to
1912 % the argument \#3 of command |\@@trimethylene|,
1913 % is used for testing a terminal point.
1914 %
1915 % \begin{macro}{\test@termcnt}
1916 % \changes{v2.00}{1998/12/21}{New command: \cs{test@termcnt}}
1917 % \begin{macrocode}
1918 \newcount\test@termcnt
1919 % \end{macrocode}
1920 % \end{macro}
1921 %
1922 % The |\set@hetatom@methyl| is used to set a hetero atom
1923 % at each vertex in the command |\@@trimethylene|.
1924 %
1925 % \begin{macro}{\set@hetatom@methyl}
1926 % \changes{v2.00}{1998/12/20}{New command: \cs{set@hetatom@methyl}}
1927 % \begin{macrocode}
1928 \def\set@hetatom@methyl#1#2#3#4#5{%
1929 \@forsemicol\member:=#1\do{%
1930 \ifx\member\empty\else
1931 \expandafter\@m@mb@r\member;\relax%
1932 %\expandafter\twoch@r\@membera{}%
1933 \expandafter\twoCH@R\@membera//%
1934 \ifnum#5 < 0\relax%
1935 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
1936 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
1937 \ifnum\@tmpaa >#3\relax%
1938 \ifnum\@tmpaa <#4\relax%
1939 \ifcase\@tmpaa%
1940 \or%position 1 <--- position 6 of set@hetatom@sixv
1941 \ifnum\test@termcnt=1\else%not terminal point (left)
1942 \if\@tmpb h\relax%
1943 \@acliptrue%
1944 \putlatom{0}{30}{\@memberb}% % right type
1945 \else\if\@tmpb s\relax%
1946 \@aclipfalse%
1947 % \putlatom{-4}{0}{\@memberb}% % right type
1948 \putlatom{0}{0}{\@memberb}% % right type
1949 \else\if\@tmpb a\relax%omit fused position
1950 \else
1951 \@acliptrue%
1952 \putlatom{36}{-23}{\@memberb}% % left type
1953 \fi\fi\fi
1954 \fi
1955 \or%position 2 <--- position 1 of set@hetatom@sixv
1956 \if\@tmpb h\relax%
1957 \@bcliptrue%
1958 \putratom{171}{53}{\@memberb}% % right type
1959 \else\if\@tmpb s\relax%
1960 \@bclipfalse%
1961 \putratom{171}{103}{\@memberb}% % right type
1962 \else\if\@tmpb a\relax%omit fused position
1963 \else
1964 \@bcliptrue%
1965 % \putratom{140}{53}{\@memberb}% % right type
1966 \putratom{140}{65}{\@memberb}% % right type
1967 \fi\fi\fi
1968 \or%position 3 <--- position 2 of set@hetatom@sixv
1969 \ifnum\test@termcnt=2\else%not terminal point (right)
1970 \if\@tmpb h\relax
1971 \@ccliptrue%
1972 % \putratom{320}{30}{\@memberb}% % right type
1973 \putratom{330}{30}{\@memberb}% % right type
1974 \else\if\@tmpb s\relax
1975 \@cclipfalse%
1976 \putratom{346}{0}{\@memberb}% % right type
1977 \else\if\@tmpb a\relax%omit fused position
1978 \else
1979 \@ccliptrue%
1980 \putratom{306}{-23}{\@memberb}% % right type
1981 \fi\fi\fi
1982 \fi
1983 \fi% end of ifcase
1984 \fi\fi\fi}}% end of the macro \set@hetatom@methyl
1985 % \end{macrocode}
1986 % \end{macro}
1987 %
1988 % The macro |\trimethylene| has two arguments |ATOMLIST| and |SUBSLIST|
1989 % as well as an optional argument |BONDLIST|.
1990 %
1991 % \begin{macro}{\trimethylene}
1992 % \begin{macro}{\@trimethylene}
1993 %
1994 % \begin{verbatim}
1995 %
1996 % bbb
1997 % 2
1998 % a / ` b (or uppercase letters)
1999 % / `
2000 % 1 3
2001 % aaa ccc
2002 % \end{verbatim}
2003 %
2004 %
2005 % \begin{verbatim}
2006 % \trimethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
2007 % \end{verbatim}
2008 %
2009 % The |BONDLIST| argument contains one character a, A, b, or B
2010 % each of which indicates the presence of an inner (endcyclic) double
2011 % bond on the corresponding position. A lowercase letter is used
2012 % to typeset a double bond at a lower-side of an outer skeletal bond,
2013 % while an uppercase letter typesets a double bond at a upper-side of
2014 % an outer skeletal bond.
2015 % (Note that the option `A' represents an aromatic circle in
2016 % commands |\sixheterov| etc.
2017 %
2018 % \begin{verbatim}
2019 % BONDLIST =
2020 %
2021 % [] or none : no double bond
2022 % a : 1,2-double bond
2023 % A : 1,2-double bond in an opposite side
2024 % b : 2,3-double bond
2025 % B : 1,2-double bond in an opposite side
2026 % \end{verbatim}
2027 %
2028 % The |ATOMLIST| argument contains one or more heteroatom descriptors
2029 % which are separated from each other by a semicolon. Each heteroatom
2030 % descriptor consists of a locant number and a heteroatom,
2031 % where these are separated with a double equality symbol.
2032 %
2033 % \begin{verbatim}
2034 %
2035 % ATOMLIST: list of heteroatoms (max 3 atoms)
2036 %
2037 % for n = 1 to 3
2038 %
2039 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
2040 % e.g. 1==N for N at 1-position
2041 % \end{verbatim}
2042 %
2043 % The |SUBSLIST| argument contains one or more substitution descriptors
2044 % which are separated from each other by a semicolon. Each substitution
2045 % descriptor has a locant number with a bond modifier and a substituent,
2046 % where these are separated with a double equality symbol.
2047 % \begin{verbatim}
2048 %
2049 % SUBSLIST: list of substituents
2050 %
2051 % for n = 1 to 3
2052 %
2053 % nD : exocyclic double bond at n-atom
2054 % n or nS : exocyclic single bond at n-atom
2055 % nA : alpha single bond at n-atom
2056 % nB : beta single bond at n-atom
2057 % nSA : alpha single bond at n-atom (boldface)
2058 % nSB : beta single bond at n-atom (dotted line)
2059 % nSa : alpha (not specified) single bond at n-atom
2060 % nSb : beta (not specified) single bond at n-atom
2061 % nW : terminal single bond (n=1 or 3)
2062 %
2063 % \end{verbatim}
2064 %
2065 % Several examples are shown as follows.
2066 % \begin{verbatim}
2067 % e.g.
2068 %
2069 % \trimethylene{1==N}{1==Cl;2==F}
2070 % \trimethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
2071 % \end{verbatim}
2072 %
2073 % The definition of |\trimethylene| uses a picture environment and
2074 % consists of the following unit processes:
2075 % \begin{enumerate}
2076 % \item adjusting substitution site by
2077 % |\yltrimethyleneposition|
2078 % \item treating atom list,
2079 % placing outer skeletons, inner double bonds,
2080 % setting hetero atoms, and
2081 % placing substituents by |\@@trimethylene|.
2082 % \end{enumerate}
2083 %
2084 % \changes{v3.01}{2002/4/30}{Replaced by \cs{ShiftPicEnv}}
2085 %
2086 % \begin{macrocode}
2087 \def\trimethylene{%
2088 \@ifnextchar[{\@trimethylene[@}{\@trimethylene[]}}
2089 \def\@trimethylene[#1]#2#3{%
2090 \iniflag\iniatom%
2091 \@reset@ylsw%
2092 \reset@interchainsw%
2093 \yltrimethyleneposition{#2}{#3}{0}{0}%
2094 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2095 (450,480)(-50,-180){trimethylene}%2002/4/30 by S. Fujita
2096 (50,180)%
2097 \reset@double%
2098 \@tfor\member:=#1\do{%
2099 \if\member a\relax
2100 \@adoublebondtrue
2101 \else\if\member b\relax
2102 \@bdoublebondtrue
2103 \else\if\member A\relax
2104 \@Adoublebondtrue
2105 \else\if\member B\relax
2106 \@Bdoublebondtrue%
2107 %\else
2108 % \expandafter\twoCH@@R\member//%
2109 % \set@fusion@trimeth%
2110 \fi\fi\fi\fi}%
2111 \@wrongbdWatrue%
2112 \@wrongbdWdfalse%
2113 \Put@Direct(0,0){\@@trimethylene{#2}{#3}{0}{0}}%
2114 %
2115 %for fused rings
2116 %shifted for coloring skeletal bond 2010/10/01
2117 %
2118 {\reset@double%
2119 \@tfor\member:=#1\do{%
2120 \if\member a\relax%dummy
2121 \else\if\member b\relax%dummy
2122 \else\if\member A\relax%dummy
2123 \else\if\member B\relax%dummy
2124 \else
2125 \expandafter\twoCH@@R\member//%
2126 \set@fusion@trimeth%
2127 \fi\fi\fi\fi}}%
2128 \end{ShiftPicEnv}%
2129 }% end of \trimethylene \@trimethylene
2130 % \end{macrocode}
2131 % \end{macro}
2132 % \end{macro}
2133 %
2134 % The inner command |\set@fusion@trimeth| is used for typesetting
2135 % a fused ring at each bond represented by |\@@tmpa|. Warnings
2136 % concerning mismatched ring-fusions are based on the command
2137 % |\FuseWarning|.
2138 %
2139 % \begin{macro}{\set@fusion@trimeth}
2140 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@trimeth}}
2141 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
2142 % \begin{macrocode}
2143 \def\set@fusion@trimeth{%
2144 % %%%%%%%%%%%%%%%%%%%%%
2145 % % inner bond fusion %
2146 % %%%%%%%%%%%%%%%%%%%%%
2147 \if\@@tmpa a\relax%
2148 \putlratom{0}{0}{\@@tmpb}% % bond fused
2149 \FuseWarning{-171}{-103}%
2150 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2151 \else\if\@@tmpa A\relax%
2152 \putlratom{171}{103}{\@@tmpb}% % bond fused
2153 \FuseWarning{171}{103}%
2154 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2155 \else\if\@@tmpa b\relax%
2156 \putlratom{171}{103}{\@@tmpb}% % bond fused
2157 \FuseWarning{-171}{103}%
2158 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2159 \else\if\@@tmpa B\relax%
2160 \putlratom{342}{0}{\@@tmpb}% % bond fused
2161 \FuseWarning{171}{-103}%
2162 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2163 \fi\fi\fi\fi
2164 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
2165 }% end of the macro \set@fusion@trimeth
2166 % \end{macrocode}
2167 % \end{macro}
2168 %
2169 % \subsection{Inverse direction}
2170 %
2171 % A trimethylene (or propane) and its hetera analogs can be typeset
2172 % by the command |\trimethylenei|, which is mainly based on
2173 % two inner commands: |\yltrimethyleneiposition| for adjusting a
2174 % substitution site and |\@@trimethylenei| for
2175 % placing hetero atoms, double bonds, and substituents.
2176 %
2177 % \begin{macro}{\@@trimethylenei}
2178 % \begin{verbatim}
2179 % \@@trimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
2180 %
2181 % <TERMswitch>
2182 % 0: all positions
2183 % 1: positions bbb and ccc
2184 % 2: positions aaa and bbb
2185 %
2186 % aaa ccc
2187 % 1 3
2188 % a ` / b
2189 % ` /
2190 % 2
2191 % bbb
2192 %
2193 % <Adjust>
2194 % a positive or negative integer to adjust locant numbers
2195 % \end{verbatim}
2196 %
2197 % \changes{v5.00}{2010/10/01}{For bond coloring}
2198 % \begin{macrocode}
2199 \def\@@trimethylenei#1#2#3#4{%
2200 \leavevmode
2201 \iniatom\iniflag%initialize
2202 \test@vrtx@trimethy{#1}{#4}%
2203 %\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
2204 \begin{sfpicture}(450,480)(0,0)
2205 % %%%%%%%%%%%%%%%%%%
2206 % % outer skeleton %
2207 % %%%%%%%%%%%%%%%%%%
2208 \Put@Direct(171,0){\SKbondAi}% bond between 1 and 2
2209 \Put@Direct(171,0){\SKbondBi}% bond between 2 and 3
2210 % %%%%%%%%%%%%%%%%%%%%%
2211 % % inner double bond %
2212 % %%%%%%%%%%%%%%%%%%%%%
2213 \if@adoublebond\relax\Put@Direct(171,0){\bondAi}\fi
2214 \if@bdoublebond\relax\Put@Direct(171,0){\bondBi}\fi
2215 \if@Adoublebond\relax\Put@Direct(171,0){\bondAAi}\fi
2216 \if@Bdoublebond\relax\Put@Direct(171,0){\bondBBi}\fi
2217 % %%%%%%%%%%%%%%%%%%%%%%%%
2218 % % setting hetero atoms %
2219 % %%%%%%%%%%%%%%%%%%%%%%%%
2220 \test@termcnt=#3\relax
2221 %\set@hetatom@methyli{#1}{0}{0}{4}{0}%
2222 \set@hetatom@methyli{#1}{#4}{0}{4}{0}%
2223 % %%%%%%%%%%%%%%%%%%%%%%%%
2224 % % setting substituents %
2225 % %%%%%%%%%%%%%%%%%%%%%%%%
2226 \@forsemicol\member:=#2\do{%
2227 \ifx\member\empty\else
2228 \expandafter\@m@mb@r\member;\relax%
2229 \expandafter\threech@r\@membera{}{}%
2230 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
2231 \ifx\@memberb\@yl\else
2232 \ifcase\@tmpaa%0 omit
2233 \or
2234 \ifcase#3
2235 \setBScolor{\Put@Direct(0,-303){\@methsubstaL}}%
2236 \or\relax
2237 \or
2238 \setBScolor{\Put@Direct(0,-303){\@methsubstaL}}%
2239 \fi
2240 \or
2241 \setBScolor{\if@bclip \@cliptrue \else \@clipfalse\fi
2242 \Put@Direct(171,0){\@methsubstd}}%
2243 \or
2244 \ifcase#3
2245 \setBScolor{\if@cclip \@acliptrue\else \@aclipfalse\fi
2246 \Put@Direct(342,-303){\@methsubsta}}%
2247 \or
2248 \setBScolor{\if@cclip \@acliptrue\else \@aclipfalse\fi
2249 \Put@Direct(342,-303){\@methsubsta}}%
2250 \or\relax
2251 \fi
2252 \fi%end of ifcase
2253 \fi\fi
2254 }%
2255 \end{sfpicture}}% end of \@@trimethylenei
2256 % \end{macrocode}
2257 % \end{macro}
2258 %
2259 % The |\yltrimethyleneiposition| is used to adjust
2260 % substitution sites.
2261 % \changes{v5.01}{2013/06/22}{bug fix}
2262 % \changes{v5.01}{2013/07/20}{bug fix}
2263 %
2264 % \begin{macro}{\yltrimethyleneiposition}
2265 % \begin{verbatim}
2266 % \yltrimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
2267 %
2268 % <TERMswitch>
2269 % 0: all positions
2270 % 1: positions bbb and ccc
2271 % 2: positions aaa and bbb
2272 %
2273 % aaa ccc
2274 % 1 3
2275 % a ` / b
2276 % ` /
2277 % 2
2278 % bbb
2279 %
2280 % <Adjust>
2281 % a positive or negative integer to adjust locant numbers
2282 % \end{verbatim}
2283 %
2284 % \begin{macrocode}%
2285 \def\yltrimethyleneiposition#1#2#3#4{%
2286 \iniatom\iniflag%initialize2013/06/22
2287 \reset@@yl%%2013/07/20bug fix
2288 \@forsemicol\member:=#1\do{%
2289 \ifx\member\empty\else
2290 \expandafter\@m@mb@r\member;\relax%
2291 %\expandafter\twoch@r\@membera{}%
2292 \expandafter\twoCH@R\@membera//%
2293 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
2294 \if\@tmpb s\else%2013/06/22added for bug fix
2295 \ifcase\@tmpaa%
2296 \or \def\aaa{@}%\def\aaa{\@memberb}%
2297 \or \def\bbb{@}%\def\bbb{\@memberb}%
2298 \or \def\ccc{@}%\def\ccc{\@memberb}%
2299 \fi\fi
2300 \fi
2301 }%
2302 \@@ylswfalse%%%\@reset@ylsw
2303 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
2304 \expandafter\threech@r\@membera{}{}%
2305 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
2306 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2307 \if@@ylsw
2308 \ifcase\@tmpaa%0 omit
2309 \or%%%%%%position 1
2310 \ifcase#3
2311 \ifx\aaa\empty
2312 %% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
2313 \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
2314 \else
2315 \if@linterchainsw%interchain position
2316 % \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
2317 \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
2318 \else% terminal position
2319 %% \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
2320 \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
2321 \fi
2322 \fi
2323 \or\relax
2324 \or
2325 \ifx\aaa\empty
2326 %% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
2327 \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
2328 \else
2329 \if@linterchainsw%interchain position
2330 \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
2331 % \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
2332 \else% terminal position
2333 %% \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
2334 \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
2335 \fi
2336 \fi
2337 \fi
2338 \or%%%%%%%%position 2
2339 \ifx\bbb\empty
2340 %% \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
2341 \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
2342 \else
2343 %% \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
2344 \gdef\@ylii{-171}\gdef\@yli{50}\global\@ylswtrue% subst. on 2
2345 \fi
2346 \or%%%%%%%%position 3
2347 \ifcase#3
2348 \ifx\ccc\empty
2349 %% \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
2350 \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
2351 \else
2352 \if@rinterchainsw%interchain position
2353 %% \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
2354 \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
2355 \else
2356 %% \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
2357 \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3
2358 \fi
2359 \fi
2360 \or
2361 \ifx\ccc\empty
2362 % \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
2363 \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
2364 \else
2365 \if@rinterchainsw%interchain position
2366 % \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
2367 \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
2368 \else
2369 % \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
2370 \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3
2371 \fi
2372 \fi
2373 \or\relax
2374 \fi
2375 \fi%end of ifcase
2376 \fi}}% end of \yltrimethyleneiposition
2377 % \end{macrocode}
2378 % \end{macro}
2379 %
2380 % The |\set@hetatom@methyli| is used to set a hetero atom
2381 % at each vertex in the command |\@@trimethylenei|.
2382 %
2383 % \begin{macro}{\set@hetatom@methyli}
2384 % \changes{v2.00}{1998/12/20}{New command: \cs{set@hetatom@methyli}}
2385 % \begin{macrocode}
2386 \def\set@hetatom@methyli#1#2#3#4#5{%
2387 \@forsemicol\member:=#1\do{%
2388 \ifx\member\empty\else
2389 \expandafter\@m@mb@r\member;\relax%
2390 \expandafter\twoch@r\@membera{}%
2391 \ifnum#5 < 0\relax%
2392 \@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
2393 \else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
2394 \ifnum\@tmpaa >#3\relax%
2395 \ifnum\@tmpaa <#4\relax%
2396 \ifcase\@tmpaa%
2397 \or%position 1 <-- \set@hetatom@sixv position 5
2398 \ifnum\test@termcnt=1\else%not terminal point (left)
2399 \if\@tmpb h\relax
2400 \@acliptrue%
2401 \putlatom{0}{70}{\@memberb}% % right type
2402 \else\if\@tmpb s\relax
2403 \@aclipfalse%
2404 \putlatom{0}{103}{\@memberb}% % right type
2405 \else\if\@tmpb a\relax%omit fused position
2406 \else
2407 \@acliptrue%
2408 \putlatom{36}{65}{\@memberb}% % left type
2409 \fi\fi\fi
2410 \fi
2411 \or%position 2 <-- \set@hetatom@sixv position 4
2412 \if\@tmpb h\relax
2413 \@bcliptrue%
2414 \putratom{171}{50}{\@memberb}% % right type
2415 \else\if\@tmpb s\relax
2416 \@bclipfalse%
2417 \putratom{171}{0}{\@memberb}% % right type
2418 \else\if\@tmpb a\relax%omit fused position
2419 \else
2420 \@bcliptrue%
2421 % \putratom{140}{-10}{\@memberb}% % right type
2422 \putratom{140}{-23}{\@memberb}% % right type
2423 \fi\fi\fi
2424 \or%position 3 <-- \set@hetatom@sixv position 3
2425 \ifnum\test@termcnt=2\else%not terminal point (right)
2426 \if\@tmpb h\relax
2427 \@ccliptrue%
2428 \putratom{342}{70}{\@memberb}% % right type
2429 \else\if\@tmpb s\relax
2430 \@cclipfalse%
2431 \putratom{342}{103}{\@memberb}% % right type
2432 \else\if\@tmpb a\relax%omit fused position
2433 \else
2434 \@ccliptrue%
2435 \putratom{306}{65}{\@memberb}% % right type
2436 \fi\fi\fi
2437 \fi
2438 \fi% end of ifcase
2439 \fi\fi\fi}}% end of the macro \set@hetatom@methyli
2440 % \end{macrocode}
2441 % \end{macro}
2442 %
2443 % The macro |\trimethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
2444 % as well as an optional argument |BONDLIST|.
2445 %
2446 % \begin{macro}{\trimethylenei}
2447 % \begin{macro}{\@trimethylenei}
2448 %
2449 % \begin{verbatim}
2450 % aaa ccc
2451 % 1 3
2452 % a ` / b (or uppercase letters)
2453 % ` /
2454 % 2
2455 % bbb
2456 % \end{verbatim}
2457 %
2458 %
2459 % \begin{verbatim}
2460 % \trimethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
2461 % \end{verbatim}
2462 %
2463 % The |BONDLIST| argument contains one character a, A, b, or B
2464 % each of which indicates the presence of an inner (endcyclic) double
2465 % bond on the corresponding position. A lowercase letter is used
2466 % to typeset a double bond at a upper-side of an outer skeletal bond,
2467 % while a uppercase letter typesets a double bond at a lower-side of
2468 % an outer skeletal bond.
2469 % (Note that the option `A' represents an aromatic circle in
2470 % commands |\sixheterov| etc.
2471 %
2472 % \begin{verbatim}
2473 % BONDLIST =
2474 %
2475 % [] or none : no double bond
2476 % a : 1,2-double bond
2477 % A : 1,2-double bond in an opposite side
2478 % b : 2,3-double bond
2479 % B : 1,2-double bond in an opposite side
2480 % \end{verbatim}
2481 %
2482 % The |ATOMLIST| argument contains one or more heteroatom descriptors
2483 % which are separated from each other by a semicolon. Each heteroatom
2484 % descriptor consists of a locant number and a heteroatom,
2485 % where these are separated with a double equality symbol.
2486 %
2487 % \begin{verbatim}
2488 %
2489 % ATOMLIST: list of heteroatoms (max 3 atoms)
2490 %
2491 % for n = 1 to 3
2492 %
2493 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
2494 % e.g. 1==N for N at 1-position
2495 % \end{verbatim}
2496 %
2497 % The |SUBSLIST| argument contains one or more substitution descriptors
2498 % which are separated from each other by a semicolon. Each substitution
2499 % descriptor has a locant number with a bond modifier and a substituent,
2500 % where these are separated with a double equality symbol.
2501 % \begin{verbatim}
2502 %
2503 % SUBSLIST: list of substituents
2504 %
2505 % for n = 1 to 3
2506 %
2507 % nD : exocyclic double bond at n-atom
2508 % n or nS : exocyclic single bond at n-atom
2509 % nA : alpha single bond at n-atom
2510 % nB : beta single bond at n-atom
2511 % nSA : alpha single bond at n-atom (boldface)
2512 % nSB : beta single bond at n-atom (dotted line)
2513 % nSa : alpha (not specified) single bond at n-atom
2514 % nSb : beta (not specified) single bond at n-atom
2515 % nW : terminal single bond (n=1 or 3)
2516 %
2517 % \end{verbatim}
2518 %
2519 % Several examples are shown as follows.
2520 % \begin{verbatim}
2521 % e.g.
2522 %
2523 % \trimethylenei{1==N}{1==Cl;2==F}
2524 % \trimethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
2525 % \end{verbatim}
2526 %
2527 % The definition of |\trimethylene| uses a picture environment and
2528 % consists of the following unit processes:
2529 % \begin{enumerate}
2530 % \item adjusting substitution site by
2531 % |\yltrimethyleneiposition|
2532 % \item treating atom list,
2533 % placing outer skeletons, inner double bonds,
2534 % setting hetero atoms, and
2535 % placing substituents by |\@@trimethylenei|.
2536 % \end{enumerate}
2537 %
2538 % \begin{macrocode}
2539 \def\trimethylenei{%
2540 \@ifnextchar[{\@trimethylenei[@}{\@trimethylenei[]}}
2541 \def\@trimethylenei[#1]#2#3{%
2542 \iniflag\iniatom%
2543 \@reset@ylsw%
2544 \reset@interchainsw%
2545 \yltrimethyleneiposition{#2}{#3}{0}{0}%
2546 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2547 (450,480)(-50,-180){trimethylenei}%2002/4/30 by S. Fujita
2548 (50,180)%
2549 \reset@double%
2550 %\@adoublebondfalse
2551 %\@bdoublebondfalse
2552 %\@Adoublebondfalse
2553 %\@Bdoublebondfalse
2554 \@tfor\member:=#1\do{%
2555 \if\member a\relax
2556 \@adoublebondtrue
2557 \else\if\member b\relax
2558 \@bdoublebondtrue
2559 \else\if\member A\relax
2560 \@Adoublebondtrue
2561 \else\if\member B\relax
2562 \@Bdoublebondtrue
2563 %\else
2564 % \expandafter\twoCH@@R\member//%
2565 % \set@fusion@trimethi
2566 \fi\fi\fi\fi}%
2567 \@wrongbdWafalse
2568 \@wrongbdWdtrue
2569 \Put@Direct(0,0){\@@trimethylenei{#2}{#3}{0}{0}}%
2570 %
2571 %originally for fused rings
2572 %shifted for coloring skeletal bond 2010/10/01
2573 %
2574 {\reset@double%
2575 \@tfor\member:=#1\do{%
2576 \if\member a\relax%dummy
2577 \else\if\member b\relax%dummy
2578 \else\if\member A\relax%dummy
2579 \else\if\member B\relax%dummy
2580 \else
2581 \expandafter\twoCH@@R\member//%
2582 \set@fusion@trimethi
2583 \fi\fi\fi\fi}}%
2584 \end{ShiftPicEnv}%
2585 }% end of \trimethylenei
2586 % \end{macrocode}
2587 % \end{macro}
2588 % \end{macro}
2589 %
2590 % The inner command |\set@fusion@trimethi| is used for typesetting
2591 % a fused ring at each bond represented by |\@@tmpa|. Warnings
2592 % concerning mismatched ring-fusions are based on the command
2593 % |\FuseWarning|.
2594 %
2595 % \begin{macro}{\set@fusion@trimethi}
2596 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@trimethi}}
2597 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
2598 % \begin{macrocode}
2599 \def\set@fusion@trimethi{%
2600 % %%%%%%%%%%%%%%%%%%%%%
2601 % % inner bond fusion %
2602 % %%%%%%%%%%%%%%%%%%%%%
2603 \if\@@tmpa a\relax%
2604 \putlratom{0}{103}{\@@tmpb}% % bond fused
2605 \FuseWarning{-171}{103}%
2606 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2607 \else\if\@@tmpa A\relax%
2608 \putlratom{171}{0}{\@@tmpb}% % bond fused
2609 \FuseWarning{171}{-103}%
2610 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2611 \else\if\@@tmpa b\relax%
2612 \putlratom{171}{0}{\@@tmpb}% % bond fused
2613 \FuseWarning{-171}{-103}%
2614 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
2615 \else\if\@@tmpa B\relax%
2616 \putlratom{342}{103}{\@@tmpb}% % bond fused
2617 \FuseWarning{171}{103}%
2618 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
2619 \fi\fi\fi\fi
2620 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
2621 }% end of the macro \set@fusion@trimethi
2622 % \end{macrocode}
2623 % \end{macro}
2624 %
2625 % \section{Dimethylene}
2626 % \subsection{Normal direction}
2627 %
2628 % A dimethylene (or ethane) and its hetera analogs can be typeset
2629 % by the command |\dimethylene|, which is mainly based on
2630 % two inner commands: |\yldimethyleneposition| for adjusting a
2631 % substitution site and |\@@dimethylene| for
2632 % placing hetero atoms, double bonds, and substituents.
2633 %
2634 % \begin{macro}{\@@dimethylene}
2635 % \begin{verbatim}
2636 % \@@dimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
2637 %
2638 % <TERMswitch>
2639 % 0: all positions
2640 % 1: position bbb
2641 % 2: position aaa
2642 %
2643 % bbb
2644 % 2
2645 % a /
2646 % 1
2647 % aaa
2648 %
2649 % <Adjust>
2650 % a positive or negative integer to adjust locant numbers
2651 % \end{verbatim}
2652 %
2653 % \changes{v5.00}{2010/10/01}{For bond coloring}
2654 % \begin{macrocode}
2655 \def\@@dimethylene#1#2#3#4{%
2656 \leavevmode
2657 \iniatom\iniflag%initialize
2658 \test@vrtx@dimethy{#1}{#4}%
2659 %\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
2660 \begin{sfpicture}(250,480)(0,0)%
2661 % %%%%%%%%%%%%%%%%%%
2662 % % outer skeleton %
2663 % %%%%%%%%%%%%%%%%%%
2664 \Put@Direct(171,-303){\SKbondA}% bond between 1 and 2
2665 % %%%%%%%%%%%%%%%%%%%%%
2666 % % inner double bond %
2667 % %%%%%%%%%%%%%%%%%%%%%
2668 \if@adoublebond
2669 \Put@Direct(171,-303){\bondA}%upper side double bond
2670 \else\if@Adoublebond
2671 \Put@Direct(171,-303){\bondAA}%lower side double bond
2672 \fi\fi%
2673 % %%%%%%%%%%%%%%%%%%%%%%%%
2674 % % setting hetero atoms %
2675 % %%%%%%%%%%%%%%%%%%%%%%%%
2676 \test@termcnt=#3\relax
2677 %\set@hetatom@methyl{#1}{0}{0}{3}{0}%
2678 \set@hetatom@methyl{#1}{#4}{0}{3}{0}%
2679 % %%%%%%%%%%%%%%%%%%%%%%%%
2680 % % setting substituents %
2681 % %%%%%%%%%%%%%%%%%%%%%%%%
2682 \@forsemicol\member:=#2\do{%
2683 \ifx\member\empty\else
2684 \expandafter\@m@mb@r\member;\relax%
2685 \expandafter\threech@r\@membera{}{}%
2686 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
2687 \ifx\@memberb\@yl\else
2688 \ifcase\@tmpaa%0 omit
2689 \or
2690 \ifcase#3
2691 \setBScolor{\if@aclip \@cliptrue \else \@clipfalse\fi
2692 \Put@Direct(0,0){\@methsubstdL}}%
2693 \or\relax
2694 \or
2695 \setBScolor{\if@aclip \@cliptrue \else \@clipfalse\fi
2696 \Put@Direct(0,0){\@methsubstdL}}%
2697 \fi
2698 \or
2699 \ifcase#3
2700 \setBScolor{\if@bclip \@acliptrue \else \@aclipfalse\fi
2701 \Put@Direct(171,-303){\@methsubsta}}%
2702 \or
2703 \setBScolor{\if@bclip \@acliptrue \else \@aclipfalse\fi
2704 \Put@Direct(171,-303){\@methsubsta}}%
2705 \or\relax
2706 \fi
2707 \fi%end of ifcase
2708 \fi\fi%
2709 }%
2710 \end{sfpicture}}% end of \@@dimethylene
2711 % \end{macrocode}
2712 % \end{macro}
2713 %
2714 % \begin{macro}{\test@vrtx@dimethy}
2715 % \changes{v2.00}{1998/12/21}{New command: \cs{test@vrtx@dimethy}}
2716 % \begin{macrocode}
2717 \def\test@vrtx@dimethy#1#2{%
2718 \@forsemicol\member:=#1\do{%
2719 \ifx\member\empty\else
2720 \expandafter\@m@mb@r\member;\relax%
2721 \expandafter\twoch@r\@membera{}%
2722 \@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
2723 \ifcase\@tmpaa%
2724 \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
2725 \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
2726 \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
2727 \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
2728 \fi\fi}}
2729 % \end{macrocode}
2730 % \end{macro}
2731 %
2732 % The |\yldimethyleneposition| is used to adjust
2733 % substitution sites.
2734 % \changes{v5.01}{2013/06/22}{bug fix}
2735 %
2736 % \begin{macro}{\yldimethyleneposition}
2737 % \begin{verbatim}
2738 % \yldimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
2739 %
2740 % <TERMswitch>
2741 % 0: all positions
2742 % 1: position bbb
2743 % 2: position aaa
2744 %
2745 % bbb
2746 % 2
2747 % a /
2748 % 1
2749 % aaa
2750 %
2751 % <Adjust>
2752 % a positive or negative integer to adjust locant numbers
2753 % \end{verbatim}
2754 %
2755 % \changes{v5.01}{2013/07/20}{Bug fix}
2756 %
2757 % \begin{macrocode}%
2758 \def\yldimethyleneposition#1#2#3#4{%
2759 \iniatom\iniflag%initialize2013/06/22
2760 \reset@@yl%%2013/07/20bug fix
2761 \@forsemicol\member:=#1\do{%
2762 \ifx\member\empty\else
2763 \expandafter\@m@mb@r\member;\relax%
2764 \expandafter\twoch@r\@membera{}%
2765 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
2766 \if\@tmpb s\else%2013/06/22added for bug fix
2767 \ifcase\@tmpaa%
2768 \or \def\aaa{@}%\def\aaa{\@memberb}%2013/06/22
2769 \or \def\bbb{@}%\def\bbb{\@memberb}%2013/06/22
2770 \fi\fi
2771 \fi
2772 }%
2773 \@@ylswfalse%%%\@reset@ylsw
2774 \@forsemicol\member:=#2\do{%
2775 \ifx\member\empty\else
2776 \expandafter\@m@mb@r\member;\relax%
2777 \expandafter\threech@r\@membera{}{}%
2778 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
2779 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2780 \if@@ylsw
2781 \ifcase\@tmpaa%0 omit
2782 \or
2783 \ifcase#3
2784 \ifx\aaa\empty
2785 % \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
2786 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
2787 \else
2788 \if@linterchainsw%interchain position
2789 \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
2790 \else%terminal position
2791 \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
2792 \fi
2793 \fi
2794 \or\relax
2795 \or
2796 \ifx\aaa\empty
2797 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
2798 \else
2799 \if@linterchainsw%interchain position
2800 \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
2801 \else%terminal position
2802 \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
2803 \fi
2804 \fi
2805 \fi
2806 \or
2807 \ifcase#3
2808 \ifx\bbb\empty
2809 \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
2810 \else
2811 \if@rinterchainsw%interchain position
2812 \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
2813 \else%terminal position
2814 \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
2815 \fi
2816 \fi
2817 \or
2818 \ifx\bbb\empty
2819 \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
2820 \else
2821 \if@rinterchainsw%interchain position
2822 \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
2823 \else%terminal position
2824 \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
2825 \fi
2826 \fi
2827 \or \relax
2828 \fi
2829 \fi%end of ifcase
2830 \fi\fi}}% end of \yldimethyleneposition
2831 % \end{macrocode}
2832 % \end{macro}
2833 %
2834 %
2835 % The macro |\dimethylene| has two arguments |ATOMLIST| and |SUBSLIST|
2836 % as well as an optional argument |BONDLIST|.
2837 %
2838 % \begin{macro}{\dimethylene}
2839 % \begin{macro}{\@dimethylene}
2840 % \begin{verbatim}
2841 %
2842 % bbb
2843 % 2
2844 % a / (or uppercase letters)
2845 % /
2846 % 1
2847 % aaa
2848 % \end{verbatim}
2849 %
2850 %
2851 % \begin{verbatim}
2852 % \dimethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
2853 % \end{verbatim}
2854 %
2855 % The |BONDLIST| argument contains one character a or A,
2856 % each of which indicates the presence of an inner (endcyclic) double
2857 % bond on the corresponding position. A lowercase letter is used
2858 % to typeset a double bond at a lower-side of an outer skeletal bond,
2859 % while an uppercase letter typesets a double bond at a upper-side of
2860 % an outer skeletal bond.
2861 % (Note that the option `A' represents an aromatic circle in
2862 % commands |\sixheterov| etc. )
2863 %
2864 % \begin{verbatim}
2865 % BONDLIST =
2866 %
2867 % [] or none : no double bond
2868 % a : 1,2-double bond
2869 % A : 1,2-double bond in an opposite side
2870 % \end{verbatim}
2871 %
2872 % The |ATOMLIST| argument contains one or more heteroatom descriptors
2873 % which are separated from each other by a semicolon. Each heteroatom
2874 % descriptor consists of a locant number and a heteroatom,
2875 % where these are separated with a double equality symbol.
2876 %
2877 % \begin{verbatim}
2878 %
2879 % ATOMLIST: list of heteroatoms (max 2 atoms)
2880 %
2881 % for n = 1 and 2
2882 %
2883 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
2884 % e.g. 1==N for N at 1-position
2885 % \end{verbatim}
2886 %
2887 % The |SUBSLIST| argument contains one or more substitution descriptors
2888 % which are separated from each other by a semicolon. Each substitution
2889 % descriptor has a locant number with a bond modifier and a substituent,
2890 % where these are separated with a double equality symbol.
2891 % \begin{verbatim}
2892 %
2893 % SUBSLIST: list of substituents
2894 %
2895 % for n = 1 and 2
2896 %
2897 % nD : exocyclic double bond at n-atom
2898 % n or nS : exocyclic single bond at n-atom
2899 % nA : alpha single bond at n-atom
2900 % nB : beta single bond at n-atom
2901 % nSA : alpha single bond at n-atom (boldface)
2902 % nSB : beta single bond at n-atom (dotted line)
2903 % nSa : alpha (not specified) single bond at n-atom
2904 % nSb : beta (not specified) single bond at n-atom
2905 % nW : terminal single bond (n=1 or 2)
2906 %
2907 % \end{verbatim}
2908 %
2909 % Several examples are shown as follows.
2910 % \begin{verbatim}
2911 % e.g.
2912 %
2913 % \dimethylene{1==N}{1==Cl;2==F}
2914 % \dimethylene[a]{1==N}{1==Cl;4==F;2==CH$_{3}$}
2915 % \end{verbatim}
2916 %
2917 % The definition of |\dimethylene| uses a picture environment and
2918 % consists of the following unit processes:
2919 % \begin{enumerate}
2920 % \item adjusting substitution site by
2921 % |\yldimethyleneposition|
2922 % \item treating atom list,
2923 % placing outer skeletons, inner double bonds,
2924 % setting hetero atoms, and
2925 % placing substituents by |\@@dimethylene|.
2926 % \end{enumerate}
2927 %
2928 % \begin{macrocode}
2929 \def\dimethylene{%
2930 \@ifnextchar[{\@dimethylene[@}{\@dimethylene[]}}
2931 \def\@dimethylene[#1]#2#3{%
2932 \iniflag\iniatom%
2933 \@reset@ylsw%
2934 \reset@interchainsw%
2935 \yldimethyleneposition{#2}{#3}{0}{0}%
2936 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2937 (250,480)(-50,-180){dimethylene}%2002/4/30 by S. Fujita
2938 (50,180)%
2939 \reset@double%
2940 \@tfor\member:=#1\do{%
2941 \if\member a\relax
2942 \@adoublebondtrue
2943 \else\if\member A\relax
2944 \@Adoublebondtrue
2945 %\else
2946 % \expandafter\twoCH@@R\member//%
2947 % \set@fusion@dimeth
2948 \fi\fi}%
2949 \@wrongbdWafalse
2950 \@wrongbdWdfalse
2951 \Put@Direct(0,0){\@@dimethylene{#2}{#3}{0}{0}}%
2952 %
2953 %originally for fused rings
2954 %shifted for coloring skeletal bond 2010/10/01
2955 %
2956 {\reset@double%
2957 \@tfor\member:=#1\do{%
2958 \if\member a\relax%dummy
2959 \else\if\member A\relax%dummy
2960 \else
2961 \expandafter\twoCH@@R\member//%
2962 \set@fusion@dimeth
2963 \fi\fi}}%
2964 \end{ShiftPicEnv}%
2965 }% end of \dimethylene
2966 % \end{macrocode}
2967 % \end{macro}
2968 % \end{macro}
2969 %
2970 % The inner command |\set@fusion@dimeth| is used for typesetting
2971 % a fused ring at each bond represented by |\@@tmpa|. Warnings
2972 % concerning mismatched ring-fusions are based on the command
2973 % |\FuseWarning|.
2974 %
2975 % \begin{macro}{\set@fusion@dimeth}
2976 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@dimeth}}
2977 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
2978 % \begin{macrocode}
2979 \def\set@fusion@dimeth{%
2980 % %%%%%%%%%%%%%%%%%%%%%
2981 % % inner bond fusion %
2982 % %%%%%%%%%%%%%%%%%%%%%
2983 \if\@@tmpa a\relax%
2984 \putlratom{0}{0}{\@@tmpb}% % bond fused
2985 \FuseWarning{-171}{-103}%
2986 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
2987 \else\if\@@tmpa A\relax%
2988 \putlratom{171}{103}{\@@tmpb}% % bond fused
2989 \FuseWarning{171}{103}%
2990 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
2991 \fi\fi
2992 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
2993 }% end of the macro \set@fusion@dimeth
2994 % \end{macrocode}
2995 % \end{macro}
2996 %
2997 % \subsection{Inverse direction}
2998 %
2999 % A dimethylene (or ethane) and its hetera analogs (of inverse direction)
3000 % can be typeset by the command |\dimethylenei|, which is mainly based on
3001 % two inner commands: |\yldimethyleneiposition| for adjusting a
3002 % substitution site and |\@@dimethylenei| for
3003 % placing hetero atoms, double bonds, and substituents.
3004 %
3005 % \begin{macro}{\@@dimethylenei}
3006 % \begin{verbatim}
3007 % \@@dimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
3008 %
3009 % <TERMswitch>
3010 % 0: all positions
3011 % 1: position bbb
3012 % 2: positions aaa
3013 %
3014 % aaa
3015 % 1
3016 % a `
3017 % `
3018 % 2
3019 % bbb
3020 %
3021 % <Adjust>
3022 % a positive or negative integer to adjust locant numbers
3023 % \end{verbatim}
3024 %
3025 % \changes{v5.00}{2010/10/01}{For bond coloring}
3026 % \begin{macrocode}
3027 \def\@@dimethylenei#1#2#3#4{%
3028 \leavevmode
3029 \iniatom\iniflag%initialize
3030 \test@vrtx@dimethy{#1}{#4}%
3031 %\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
3032 \begin{sfpicture}(250,480)(0,0)%
3033 % %%%%%%%%%%%%%%%%%%
3034 % % outer skeleton %
3035 % %%%%%%%%%%%%%%%%%%
3036 \Put@Direct(171,0){\SKbondAi}% bond between 1 and 2
3037 % %%%%%%%%%%%%%%%%%%%%%
3038 % % inner double bond %
3039 % %%%%%%%%%%%%%%%%%%%%%
3040 \if@adoublebond
3041 \Put@Direct(171,0){\bondAi}%upper side double bond
3042 \else\if@Adoublebond
3043 \Put@Direct(171,0){\bondAAi}%lower side double bond
3044 \fi\fi%
3045 % %%%%%%%%%%%%%%%%%%%%%%%%
3046 % % setting hetero atoms %
3047 % %%%%%%%%%%%%%%%%%%%%%%%%
3048 \test@termcnt=#3\relax
3049 %\set@hetatom@methyli{#1}{0}{0}{3}{0}%
3050 \set@hetatom@methyli{#1}{#4}{0}{3}{0}%
3051 % %%%%%%%%%%%%%%%%%%%%%%%%
3052 % % setting substituents %
3053 % %%%%%%%%%%%%%%%%%%%%%%%%
3054 \@forsemicol\member:=#2\do{%
3055 \ifx\member\empty\else
3056 \expandafter\@m@mb@r\member;\relax%
3057 \expandafter\threech@r\@membera{}{}%
3058 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
3059 \ifx\@memberb\@yl\else
3060 \ifcase\@tmpaa%0 omit
3061 \or
3062 \ifcase#3
3063 \setBScolor{\Put@Direct(0,-303){\@methsubstaL}}%
3064 \or\relax
3065 \or
3066 \setBScolor{\Put@Direct(0,-303){\@methsubstaL}}%
3067 \fi
3068 \or
3069 \ifcase#3
3070 \setBScolor{\if@bclip \@cliptrue \else \@clipfalse\fi
3071 \Put@Direct(171,0){\@methsubstd}}%
3072 \or
3073 \setBScolor{\if@bclip \@cliptrue \else \@clipfalse\fi
3074 \Put@Direct(171,0){\@methsubstd}}%
3075 \or\relax
3076 \fi
3077 \fi%end of ifcase
3078 \fi\fi%
3079 }%
3080 \end{sfpicture}}% end of \@@dimethylenei
3081 % \end{macrocode}
3082 % \end{macro}
3083 %
3084 % The |\yldimethyleneiposition| is used to adjust
3085 % substitution sites.
3086 % \changes{v5.01}{2013/06/22}{bug fix}
3087 % \changes{v5.01}{2013/07/20}{bug fix}
3088 %
3089 % \begin{macro}{\yldimethyleneiposition}
3090 % \begin{verbatim}
3091 % \yldimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
3092 %
3093 % <TERMswitch>
3094 % 0: all positions
3095 % 1: position bbb
3096 % 2: position aaa
3097 %
3098 % aaa
3099 % 1
3100 % a `
3101 % `
3102 % 2
3103 % bbb
3104 %
3105 % <Adjust>
3106 % a positive or negative integer to adjust locant numbers
3107 % \end{verbatim}
3108 %
3109 % \begin{macrocode}%
3110 \def\yldimethyleneiposition#1#2#3#4{%
3111 \iniatom\iniflag%initialize2013/06/22
3112 \reset@@yl%%2013/07/20bug fix
3113 \@forsemicol\member:=#1\do{%
3114 \ifx\member\empty\else
3115 \expandafter\@m@mb@r\member;\relax%
3116 \expandafter\twoch@r\@membera{}%
3117 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
3118 \if\@tmpb s\else%2013/06/22added for bug fix
3119 \ifcase\@tmpaa%
3120 \or \def\aaa{@}%\def\aaa{\@memberb}%2013/06/22
3121 \or \def\bbb{@}%\def\bbb{\@memberb}%2013/06/22
3122 \fi\fi
3123 \fi
3124 }%
3125 \@@ylswfalse%%%\@reset@ylsw
3126 \@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
3127 \expandafter\threech@r\@membera{}{}%
3128 \@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
3129 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3130 \if@@ylsw
3131 \ifcase\@tmpaa%0 omit
3132 \or%%%%%%%%position 1
3133 \ifcase#3
3134 \ifx\aaa\empty
3135 % \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
3136 \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
3137 \else
3138 \if@linterchainsw%interchain position
3139 % \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
3140 \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
3141 \else%terminal position
3142 % \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
3143 \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
3144 \fi
3145 \fi
3146 \or\relax
3147 \or
3148 \ifx\aaa\empty
3149 % \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
3150 \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
3151 \else
3152 \if@linterchainsw%interchain position
3153 % \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
3154 \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
3155 \else%terminal position
3156 % \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
3157 \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
3158 \fi
3159 \fi
3160 \fi
3161 \or%%%%%%%%position 2
3162 \ifcase#3
3163 \ifx\bbb\empty
3164 % \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
3165 \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
3166 \else
3167 \if@rinterchainsw%interchain position
3168 % \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
3169 \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
3170 \else%terminal position
3171 % \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
3172 \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2
3173 \fi
3174 \fi
3175 \or
3176 \ifx\bbb\empty
3177 % \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
3178 \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
3179 \else
3180 \if@rinterchainsw%interchain position
3181 % \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
3182 \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
3183 \else%terminal position
3184 % \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
3185 \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2
3186 \fi
3187 \fi
3188 \or \relax
3189 \fi
3190 \fi%end of ifcase
3191 \fi}}% end of \yldimethyleneiposition
3192 % \end{macrocode}
3193 % \end{macro}
3194 %
3195 % The macro |\dimethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
3196 % as well as an optional argument |BONDLIST|.
3197 %
3198 % \begin{macro}{\dimethylenei}
3199 % \begin{macro}{\@dimethylenei}
3200 % \begin{verbatim}
3201 %
3202 % aaa
3203 % 1
3204 % a ` (or uppercase letter)
3205 % `
3206 % 2
3207 % bbb
3208 % \end{verbatim}
3209 %
3210 % \begin{verbatim}
3211 % \dimethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
3212 % \end{verbatim}
3213 %
3214 % The |BONDLIST| argument contains one character a or A,
3215 % each of which indicates the presence of an inner (endcyclic) double
3216 % bond on the corresponding position. A lowercase letter is used
3217 % to typeset a double bond at a upper-side of an outer skeletal bond,
3218 % while an uppercase letter typesets a double bond at a lower-side of
3219 % an outer skeletal bond.
3220 % (Note that the option `A' represents an aromatic circle in
3221 % commands |\sixheterov| etc. )
3222 %
3223 % \begin{verbatim}
3224 % BONDLIST =
3225 %
3226 % [] or none : no double bond
3227 % a : 1,2-double bond
3228 % A : 1,2-double bond in an opposite side
3229 % \end{verbatim}
3230 %
3231 % The |ATOMLIST| argument contains one or more heteroatom descriptors
3232 % which are separated from each other by a semicolon. Each heteroatom
3233 % descriptor consists of a locant number and a heteroatom,
3234 % where these are separated with a double equality symbol.
3235 %
3236 % \begin{verbatim}
3237 %
3238 % ATOMLIST: list of heteroatoms (max 2 atoms)
3239 %
3240 % for n = 1 and 2
3241 %
3242 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
3243 % e.g. 1==N for N at 1-position
3244 % \end{verbatim}
3245 %
3246 % The |SUBSLIST| argument contains one or more substitution descriptors
3247 % which are separated from each other by a semicolon. Each substitution
3248 % descriptor has a locant number with a bond modifier and a substituent,
3249 % where these are separated with a double equality symbol.
3250 % \begin{verbatim}
3251 %
3252 % SUBSLIST: list of substituents
3253 %
3254 % for n = 1 and 2
3255 %
3256 % nD : exocyclic double bond at n-atom
3257 % n or nS : exocyclic single bond at n-atom
3258 % nA : alpha single bond at n-atom
3259 % nB : beta single bond at n-atom
3260 % nSA : alpha single bond at n-atom (boldface)
3261 % nSB : beta single bond at n-atom (dotted line)
3262 % nSa : alpha (not specified) single bond at n-atom
3263 % nSb : beta (not specified) single bond at n-atom
3264 % nW : terminal single bond (n=1 or 2)
3265 %
3266 % \end{verbatim}
3267 %
3268 % Several examples are shown as follows.
3269 % \begin{verbatim}
3270 % e.g.
3271 %
3272 % \dimethylenei{1==N}{1==Cl;2==F}
3273 % \dimethylenei[a]{1==N}{1==Cl;4==F;2==CH$_{3}$}
3274 % \end{verbatim}
3275 %
3276 % The definition of |\dimethylenei| uses a picture environment and
3277 % consists of the following unit processes:
3278 % \begin{enumerate}
3279 % \item adjusting substitution site by
3280 % |\yldimethyleneposition|
3281 % \item treating atom list,
3282 % placing outer skeletons, inner double bonds,
3283 % setting hetero atoms, and
3284 % placing substituents by |\@@dimethylene|.
3285 % \end{enumerate}
3286 %
3287 % \begin{macrocode}
3288 \def\dimethylenei{%
3289 \@ifnextchar[{\@dimethylenei[@}{\@dimethylenei[]}}
3290 \def\@dimethylenei[#1]#2#3{%
3291 \iniflag\iniatom%
3292 \@reset@ylsw%
3293 \reset@interchainsw%
3294 \yldimethyleneiposition{#2}{#3}{0}{0}%
3295 \begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3296 (250,480)(-50,-180){dimethylenei}%2002/4/30 by S. Fujita
3297 (50,180)%
3298 \reset@double%
3299 \@tfor\member:=#1\do{%
3300 \if\member a\relax
3301 \@adoublebondtrue
3302 \else\if\member A\relax
3303 \@Adoublebondtrue
3304 %\else
3305 % \expandafter\twoCH@@R\member//%
3306 % \set@fusion@dimethi
3307 \fi\fi}%
3308 \@wrongbdWafalse
3309 \@wrongbdWdfalse
3310 \Put@Direct(0,0){\@@dimethylenei{#2}{#3}{0}{0}}%
3311 %
3312 %originally for fused rings
3313 %shifted for coloring skeletal bond 2010/10/01
3314 %
3315 {\reset@double%
3316 \@tfor\member:=#1\do{%
3317 \if\member a\relax%dummy
3318 \else\if\member A\relax%dummy
3319 \else
3320 \expandafter\twoCH@@R\member//%
3321 \set@fusion@dimethi
3322 \fi\fi}}%
3323 \end{ShiftPicEnv}%
3324 }% end of \dimethylenei
3325 % \end{macrocode}
3326 % \end{macro}
3327 % \end{macro}
3328 %
3329 % The inner command |\set@fusion@dimethi| is used for typesetting
3330 % a fused ring at each bond represented by |\@@tmpa|. Warnings
3331 % concerning mismatched ring-fusions are based on the command
3332 % |\FuseWarning|.
3333 %
3334 % \begin{macro}{\set@fusion@dimethi}
3335 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@dimethi}}
3336 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
3337 % \begin{macrocode}
3338 \def\set@fusion@dimethi{%
3339 % %%%%%%%%%%%%%%%%%%%%%
3340 % % inner bond fusion %
3341 % %%%%%%%%%%%%%%%%%%%%%
3342 \if\@@tmpa a\relax%
3343 \putlratom{0}{103}{\@@tmpb}% % bond fused
3344 \FuseWarning{-171}{103}%
3345 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
3346 \else\if\@@tmpa A\relax%
3347 \putlratom{171}{0}{\@@tmpb}% % bond fused
3348 \FuseWarning{171}{-103}%
3349 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
3350 \fi\fi
3351 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
3352 }% end of the macro \set@fusion@dimethi
3353 % \end{macrocode}
3354 % \end{macro}
3355 %
3356 % \section{Tetramethylenes}
3357 % \subsection{Normal direction}
3358 %
3359 % The macro |\tetramethylene| has two arguments |ATOMLIST| and |SUBSLIST|
3360 % as well as an optional argument |BONDLIST|.
3361 %
3362 % \begin{macro}{\tetramethylene}
3363 % \begin{macro}{\@tetramethylene}
3364 %
3365 % \begin{verbatim}
3366 %
3367 % bbb ddd
3368 % 2 4
3369 % a / ` b / c (or uppercase letters)
3370 % / ` /
3371 % 1 3
3372 % aaa ccc
3373 % \end{verbatim}
3374 %
3375 % \begin{verbatim}
3376 % \tetramethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
3377 % \end{verbatim}
3378 %
3379 % The |BONDLIST| argument contains one character selected from
3380 % a to c (or A to C),
3381 % each of which indicates the presence of an inner (endcyclic) double
3382 % bond on the corresponding position. A lowercase letter is used
3383 % to typeset a double bond at a lower-side of an outer skeletal bond,
3384 % while an uppercase letter typesets a double bond at a upper-side of
3385 % an outer skeletal bond.
3386 % (Note that the option `A' represents an aromatic circle in
3387 % commands |\sixheterov| etc.)
3388 %
3389 % \begin{verbatim}
3390 % BONDLIST =
3391 %
3392 % [] or none : no double bond
3393 % a : 1,2-double bond
3394 % A : 1,2-double bond in an opposite side
3395 % b : 2,3-double bond
3396 % B : 2,3-double bond in an opposite side
3397 % c : 3,4-double bond
3398 % C : 3,4-double bond in an opposite side
3399 % \end{verbatim}
3400 %
3401 % The |ATOMLIST| argument contains one or more heteroatom descriptors
3402 % which are separated from each other by a semicolon. Each heteroatom
3403 % descriptor consists of a locant number and a heteroatom,
3404 % where these are separated with a double equality symbol.
3405 %
3406 % \begin{verbatim}
3407 %
3408 % ATOMLIST: list of heteroatoms (max 4 atoms)
3409 %
3410 % for n = 1 to 4
3411 %
3412 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
3413 % e.g. 1==N for N at 1-position
3414 % \end{verbatim}
3415 %
3416 % The |SUBSLIST| argument contains one or more substitution descriptors
3417 % which are separated from each other by a semicolon. Each substitution
3418 % descriptor has a locant number with a bond modifier and a substituent,
3419 % where these are separated with a double equality symbol.
3420 % \begin{verbatim}
3421 %
3422 % SUBSLIST: list of substituents
3423 %
3424 % for n = 1 to 4
3425 %
3426 % nD : exocyclic double bond at n-atom
3427 % n or nS : exocyclic single bond at n-atom
3428 % nA : alpha single bond at n-atom
3429 % nB : beta single bond at n-atom
3430 % nSA : alpha single bond at n-atom (boldface)
3431 % nSB : beta single bond at n-atom (dotted line)
3432 % nSa : alpha (not specified) single bond at n-atom
3433 % nSb : beta (not specified) single bond at n-atom
3434 % nW : terminal single bond (n=1 or 4)
3435 %
3436 % \end{verbatim}
3437 %
3438 % Several examples are shown as follows.
3439 % \begin{verbatim}
3440 % e.g.
3441 %
3442 % \tetramethylene{1==N}{1==Cl;2==F}
3443 % \tetramethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
3444 % \end{verbatim}
3445 %
3446 % The definition of |\tetramethylene| uses a picture environment and
3447 % is based on |\@@trimethylene| and |\@@dimethylene|, each of which
3448 % is consist of the following unit processes:
3449 % \begin{enumerate}
3450 % \item adjusting substitution site by
3451 % |\yltrimethyleneposition| or
3452 % |\yldimethyleneposition|
3453 % \item treating atom list,
3454 % placing outer skeletons, inner double bonds,
3455 % setting hetero atoms, and
3456 % placing substituents by |\@@trimethylene|or |\@@dimethylene|.
3457 % \end{enumerate}
3458 %
3459 % \begin{macrocode}
3460 \def\tetramethylene{%
3461 \@ifnextchar[{\@tetramethylene[@}{\@tetramethylene[]}}
3462 \def\@tetramethylene[#1]#2#3{%
3463 \iniflag\iniatom%
3464 \@reset@ylsw%
3465 {\@linterchainswfalse%
3466 \@rinterchainswtrue%
3467 \yltrimethyleneposition{#2}{#3}{0}{0}}%
3468 \if@ylsw \ifx\@@ylii\empty
3469 \def\@@ylii{0}\def\@@yli{0}\fi
3470 \else
3471 {\@rinterchainswfalse%
3472 \@linterchainswtrue%
3473 \yldimethyleneposition{#2}{#3}{1}{-2}}%
3474 \if@ylsw \ifx\@@ylii\empty
3475 \def\@@ylii{-342}\def\@@yli{0}\fi\fi
3476 \fi
3477 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3478 (900,480)(-200,-180){tetramethylene}%2002/4/30 by S. Fujita
3479 (200,180)%
3480 {\reset@double%
3481 \@tfor\member:=#1\do{%
3482 \if\member a\relax
3483 \@adoublebondtrue
3484 \else\if\member b\relax
3485 \@bdoublebondtrue
3486 \else\if\member A\relax
3487 \@Adoublebondtrue
3488 \else\if\member B\relax
3489 \@Bdoublebondtrue
3490 %\else\if\member c\relax%dummy
3491 %\else\if\member C\relax%dummy
3492 %\else
3493 % \expandafter\twoCH@@R\member//%
3494 % \set@fusion@tetrameth
3495 %\fi\fi
3496 \fi\fi\fi\fi}%
3497 \@wrongbdWatrue
3498 \@wrongbdWdtrue
3499 \Put@Direct(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
3500 {\reset@double%
3501 \@tfor\member:=#1\do{%
3502 \if\member c\relax
3503 \@adoublebondtrue
3504 \else\if\member C\relax
3505 \@Adoublebondtrue
3506 \fi\fi}%
3507 \@wrongbdWafalse
3508 \@wrongbdWdtrue
3509 \Put@Direct(342,0){\@@dimethylene{#2}{#3}{1}{-2}}}%
3510 %
3511 %originally for fused rings
3512 %shifted for coloring skeletal bond 2010/10/01
3513 %
3514 {\reset@double%
3515 \@tfor\member:=#1\do{%
3516 \if\member a\relax%dummy
3517 \else\if\member b\relax%dummy
3518 \else\if\member A\relax%dummy
3519 \else\if\member B\relax%dummy
3520 \else\if\member c\relax%dummy
3521 \else\if\member C\relax%dummy
3522 \else
3523 \expandafter\twoCH@@R\member//%
3524 \set@fusion@tetrameth
3525 \fi\fi
3526 \fi\fi\fi\fi}}%
3527 \end{ShiftPicEnvB}%
3528 }% end of \tetramethylene
3529 % \end{macrocode}
3530 % \end{macro}
3531 % \end{macro}
3532 %
3533 % The inner command |\set@fusion@tetrameth| is used for typesetting
3534 % a fused ring at each bond represented by |\@@tmpa|. Warnings
3535 % concerning mismatched ring-fusions are based on the command
3536 % |\FuseWarning|.
3537 %
3538 % \begin{macro}{\set@fusion@tetrameth}
3539 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetrameth}}
3540 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
3541 % \begin{macrocode}
3542 \def\set@fusion@tetrameth{%
3543 % %%%%%%%%%%%%%%%%%%%%%
3544 % % inner bond fusion %
3545 % %%%%%%%%%%%%%%%%%%%%%
3546 \if\@@tmpa a\relax%
3547 \putlratom{0}{0}{\@@tmpb}% % bond fused
3548 \FuseWarning{-171}{-103}%
3549 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
3550 \else\if\@@tmpa A\relax%
3551 \putlratom{171}{103}{\@@tmpb}% % bond fused
3552 \FuseWarning{171}{103}%
3553 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
3554 \else\if\@@tmpa b\relax%
3555 \putlratom{171}{103}{\@@tmpb}% % bond fused
3556 \FuseWarning{-171}{103}%
3557 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
3558 \else\if\@@tmpa B\relax%
3559 \putlratom{342}{0}{\@@tmpb}% % bond fused
3560 \FuseWarning{171}{-103}%
3561 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
3562 \else\if\@@tmpa c\relax%
3563 \putlratom{342}{0}{\@@tmpb}% % bond fused
3564 \FuseWarning{-171}{-103}%
3565 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
3566 \else\if\@@tmpa C\relax%
3567 \putlratom{513}{103}{\@@tmpb}% % bond fused
3568 \FuseWarning{171}{103}%
3569 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
3570 \fi\fi
3571 \fi\fi\fi\fi
3572 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
3573 }% end of the macro \set@fusion@tetrameth
3574 % \end{macrocode}
3575 % \end{macro}
3576 %
3577 % \subsection{Inverse direction}
3578 %
3579 % The macro |\tetramethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
3580 % as well as an optional argument |BONDLIST|.
3581 %
3582 % \begin{macro}{\tetramethylenei}
3583 % \begin{macro}{\@tetramethylenei}
3584 %
3585 % \begin{verbatim}
3586 %
3587 % aaa ccc
3588 % 1 3
3589 % a ` b / ` c (or uppercase letters)
3590 % ` / `
3591 % 2 4
3592 % bbb ddd
3593 % \end{verbatim}
3594 %
3595 % \begin{verbatim}
3596 % \tetramethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
3597 % \end{verbatim}
3598 %
3599 % The |BONDLIST| argument contains one character selected from
3600 % a to c (or A to C),
3601 % each of which indicates the presence of an inner (endcyclic) double
3602 % bond on the corresponding position. A lowercase letter is used
3603 % to typeset a double bond at a lower-side of an outer skeletal bond,
3604 % while an uppercase letter typesets a double bond at a upper-side of
3605 % an outer skeletal bond.
3606 % (Note that the option `A' represents an aromatic circle in
3607 % commands |\sixheterov| etc.)
3608 %
3609 % \begin{verbatim}
3610 % BONDLIST =
3611 %
3612 % [] or none : no double bond
3613 % a : 1,2-double bond
3614 % A : 1,2-double bond in an opposite side
3615 % b : 2,3-double bond
3616 % B : 2,3-double bond in an opposite side
3617 % c : 3,4-double bond
3618 % C : 3,4-double bond in an opposite side
3619 % \end{verbatim}
3620 %
3621 % The |ATOMLIST| argument contains one or more heteroatom descriptors
3622 % which are separated from each other by a semicolon. Each heteroatom
3623 % descriptor consists of a locant number and a heteroatom,
3624 % where these are separated with a double equality symbol.
3625 %
3626 % \begin{verbatim}
3627 %
3628 % ATOMLIST: list of heteroatoms (max 4 atoms)
3629 %
3630 % for n = 1 to 4
3631 %
3632 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
3633 % e.g. 1==N for N at 1-position
3634 % \end{verbatim}
3635 %
3636 % The |SUBSLIST| argument contains one or more substitution descriptors
3637 % which are separated from each other by a semicolon. Each substitution
3638 % descriptor has a locant number with a bond modifier and a substituent,
3639 % where these are separated with a double equality symbol.
3640 % \begin{verbatim}
3641 %
3642 % SUBSLIST: list of substituents
3643 %
3644 % for n = 1 to 4
3645 %
3646 % nD : exocyclic double bond at n-atom
3647 % n or nS : exocyclic single bond at n-atom
3648 % nA : alpha single bond at n-atom
3649 % nB : beta single bond at n-atom
3650 % nSA : alpha single bond at n-atom (boldface)
3651 % nSB : beta single bond at n-atom (dotted line)
3652 % nSa : alpha (not specified) single bond at n-atom
3653 % nSb : beta (not specified) single bond at n-atom
3654 % nW : terminal single bond (n=1 or 4)
3655 %
3656 % \end{verbatim}
3657 %
3658 % Several examples are shown as follows.
3659 % \begin{verbatim}
3660 % e.g.
3661 %
3662 % \tetramethylenei{1==N}{1==Cl;2==F}
3663 % \tetramethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
3664 % \end{verbatim}
3665 %
3666 % The definition of |\tetramethylenei| uses a picture environment and
3667 % is based on |\@@trimethylenei| and |\@@dimethylenei|, each of which
3668 % is consist of the following unit processes:
3669 % \begin{enumerate}
3670 % \item adjusting substitution site by
3671 % |\yltrimethylenieposition| or
3672 % |\yldimethyleneiposition|
3673 % \item treating atom list,
3674 % placing outer skeletons, inner double bonds,
3675 % setting hetero atoms, and
3676 % placing substituents by |\@@trimethylenei| or |\@@dimethylenei|.
3677 % \end{enumerate}
3678 %
3679 % \begin{macrocode}
3680 \def\tetramethylenei{%
3681 \@ifnextchar[{\@tetramethylenei[@}{\@tetramethylenei[]}}
3682 \def\@tetramethylenei[#1]#2#3{%
3683 \iniflag\iniatom%
3684 \@reset@ylsw%
3685 {\@linterchainswfalse%
3686 \@rinterchainswtrue%
3687 \yltrimethyleneiposition{#2}{#3}{0}{0}}%
3688 \if@ylsw \ifx\@@ylii\empty
3689 \def\@@ylii{0}\def\@@yli{0}\fi
3690 \else
3691 {\@rinterchainswfalse%
3692 \@linterchainswtrue%
3693 \yldimethyleneiposition{#2}{#3}{1}{-2}}%
3694 \if@ylsw \ifx\@@ylii\empty
3695 \def\@@ylii{-342}\def\@@yli{0}\fi\fi
3696 \fi
3697 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3698 (900,480)(-200,-180){tetramethylenei}%2002/4/30 by S. Fujita
3699 (200,180)%
3700 {\reset@double%
3701 \@tfor\member:=#1\do{%
3702 \if\member a\relax
3703 \@adoublebondtrue
3704 \else\if\member b\relax
3705 \@bdoublebondtrue
3706 \else\if\member A\relax
3707 \@Adoublebondtrue
3708 \else\if\member B\relax
3709 \@Bdoublebondtrue
3710 %\else\if\member c\relax%dummy
3711 %\else\if\member C\relax%dummy
3712 %\else
3713 % \expandafter\twoCH@@R\member//%
3714 % \set@fusion@tetramethi
3715 %\fi\fi
3716 \fi\fi\fi\fi}%
3717 \@wrongbdWatrue
3718 \@wrongbdWdtrue
3719 \Put@Direct(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}%
3720 {\reset@double%
3721 \@tfor\member:=#1\do{%
3722 \if\member c\relax
3723 \@adoublebondtrue
3724 \else\if\member C\relax
3725 \@Adoublebondtrue
3726 \fi\fi}%
3727 \@wrongbdWatrue
3728 \@wrongbdWdfalse
3729 \Put@Direct(342,0){\@@dimethylenei{#2}{#3}{1}{-2}}}%
3730 %
3731 %originally for fused rings
3732 %shifted for coloring skeletal bond 2010/10/01
3733 %
3734 {\reset@double%
3735 \@tfor\member:=#1\do{%
3736 \if\member a\relax
3737 \else\if\member b\relax
3738 \else\if\member A\relax
3739 \else\if\member B\relax
3740 \else\if\member c\relax%dummy
3741 \else\if\member C\relax%dummy
3742 \else
3743 \expandafter\twoCH@@R\member//%
3744 \set@fusion@tetramethi
3745 \fi\fi
3746 \fi\fi\fi\fi}}%
3747 \end{ShiftPicEnvB}%
3748 }%end of \tetramethylenei
3749 % \end{macrocode}
3750 % \end{macro}
3751 % \end{macro}
3752 %
3753 % The inner command |\set@fusion@tetramethi| is used for typesetting
3754 % a fused ring at each bond represented by |\@@tmpa|. Warnings
3755 % concerning mismatched ring-fusions are based on the command
3756 % |\FuseWarning|.
3757 %
3758 % \begin{macro}{\set@fusion@tetramethi}
3759 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetramethi}}
3760 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
3761 % \begin{macrocode}
3762 \def\set@fusion@tetramethi{%
3763 % %%%%%%%%%%%%%%%%%%%%%
3764 % % inner bond fusion %
3765 % %%%%%%%%%%%%%%%%%%%%%
3766 \if\@@tmpa a\relax%
3767 \putlratom{0}{103}{\@@tmpb}% % bond fused
3768 \FuseWarning{-171}{103}%
3769 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
3770 \else\if\@@tmpa A\relax%
3771 \putlratom{171}{0}{\@@tmpb}% % bond fused
3772 \FuseWarning{171}{-103}%
3773 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
3774 \else\if\@@tmpa b\relax%
3775 \putlratom{171}{0}{\@@tmpb}% % bond fused
3776 \FuseWarning{-171}{-103}%
3777 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
3778 \else\if\@@tmpa B\relax%
3779 \putlratom{342}{103}{\@@tmpb}% % bond fused
3780 \FuseWarning{171}{103}%
3781 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
3782 \else\if\@@tmpa c\relax%
3783 \putlratom{342}{103}{\@@tmpb}% % bond fused
3784 \FuseWarning{-171}{103}%
3785 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
3786 \else\if\@@tmpa C\relax%
3787 \putlratom{513}{0}{\@@tmpb}% % bond fused
3788 \FuseWarning{171}{-103}%
3789 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
3790 \fi\fi
3791 \fi\fi\fi\fi
3792 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
3793 }% end of the macro \set@fusion@tetramethi
3794 % \end{macrocode}
3795 % \end{macro}
3796 %
3797 % \subsection{Cisoid types}
3798 %
3799 % The macros |\tetramethylenecup| and |\tetramethylenecap| are
3800 % used to draw tetramethylenes of cisoid types.
3801 %
3802 % \begin{verbatim}
3803 % Cup:
3804 % aaa ddd
3805 % 1 4
3806 % ` /
3807 % a ` / c (or uppercase letters)
3808 % 2------3
3809 % bbb b ccc
3810 %
3811 % Cap:
3812 % bbb b ccc
3813 % 2------3
3814 % a / ` c (or uppercase letters)
3815 % / `
3816 % 1 4
3817 % aaa ddd
3818 % \end{verbatim}
3819 %
3820 % The macros have two arguments |ATOMLIST| and |SUBSLIST|
3821 % as well as an optional argument |BONDLIST|.
3822 % \begin{verbatim}
3823 % \tetramethylenecup[BONDLIST]{ATOMLIST}{SUBSLIST}
3824 % \tetramethylenecap[BONDLIST]{ATOMLIST}{SUBSLIST}
3825 % \end{verbatim}
3826 %
3827 % The |BONDLIST| argument contains one character selected from
3828 % a to c (or A to C),
3829 % each of which indicates the presence of an inner (endcyclic) double
3830 % bond on the corresponding position. A lowercase letter is used
3831 % to typeset a double bond at a lower-side of an outer skeletal bond,
3832 % while an uppercase letter typesets a double bond at a upper-side of
3833 % an outer skeletal bond.
3834 % (Note that the option `A' represents an aromatic circle in
3835 % commands |\sixheterov| etc.)
3836 %
3837 % \begin{verbatim}
3838 % BONDLIST =
3839 %
3840 % [] or none : no double bond
3841 % a : 1,2-double bond
3842 % A : 1,2-double bond in an opposite side
3843 % b : 2,3-double bond
3844 % B : 2,3-double bond in an opposite side
3845 % c : 3,4-double bond
3846 % C : 3,4-double bond in an opposite side
3847 % \end{verbatim}
3848 %
3849 % The |ATOMLIST| argument contains one or more heteroatom descriptors
3850 % which are separated from each other by a semicolon. Each heteroatom
3851 % descriptor consists of a locant number and a heteroatom,
3852 % where these are separated with a double equality symbol.
3853 %
3854 % \begin{verbatim}
3855 %
3856 % ATOMLIST: list of heteroatoms (max 4 atoms)
3857 %
3858 % for n = 1 to 4
3859 %
3860 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
3861 % e.g. 1==N for N at 1-position
3862 % \end{verbatim}
3863 %
3864 % The |SUBSLIST| argument contains one or more substitution descriptors
3865 % which are separated from each other by a semicolon. Each substitution
3866 % descriptor has a locant number with a bond modifier and a substituent,
3867 % where these are separated with a double equality symbol.
3868 % \begin{verbatim}
3869 %
3870 % SUBSLIST: list of substituents
3871 %
3872 % for n = 1 to 4
3873 %
3874 % nD : exocyclic double bond at n-atom
3875 % n or nS : exocyclic single bond at n-atom
3876 % nA : alpha single bond at n-atom
3877 % nB : beta single bond at n-atom
3878 % nSA : alpha single bond at n-atom (boldface)
3879 % nSB : beta single bond at n-atom (dotted line)
3880 % nSa : alpha (not specified) single bond at n-atom
3881 % nSb : beta (not specified) single bond at n-atom
3882 % nW : terminal single bond (n=1 or 4)
3883 %
3884 % \end{verbatim}
3885 %
3886 % Several examples are shown as follows.
3887 % \begin{verbatim}
3888 % e.g.
3889 %
3890 % \tetramethylenecup{1==N}{1==Cl;2==F}
3891 % \tetramethylenecap[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
3892 % \end{verbatim}
3893 %
3894 % \begin{macro}{\tetramethylenecup}
3895 % \begin{macro}{\@tetramethylenecup}
3896 % \begin{macrocode}
3897 \def\tetramethylenecup{%
3898 \@ifnextchar[{\@tetramethylenecup[@}{\@tetramethylenecup[]}}
3899 \def\@tetramethylenecup[#1]#2#3{%
3900 \iniflag\iniatom%
3901 \@reset@ylsw%
3902 {\@linterchainswfalse%
3903 \@rinterchainswtrue%
3904 \yldimethyleneiposition{#2}{#3}{0}{0}}%
3905 \if@ylsw \ifx\@@ylii\empty
3906 \def\@@ylii{0}\def\@@yli{0}\fi
3907 \else
3908 {\@rinterchainswfalse%
3909 \@linterchainswtrue%
3910 \yldimethyleneposition{#2}{#3}{0}{-2}}%
3911 \fi
3912 \if@ylsw \ifx\@@ylii\empty
3913 \def\@@ylii{-371}\def\@@yli{0}\fi\fi
3914 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3915 (900,480)(-200,-180){tetramethylenecup}%2002/4/30 by S. Fujita
3916 (200,180)%
3917 %bond a and atoms 1 and 2
3918 {\reset@double%
3919 \@tfor\member:=#1\do{%
3920 \if\member a\relax
3921 \@adoublebondtrue
3922 \else\if\member A\relax
3923 \@Adoublebondtrue
3924 %\else\if\member b\relax%dummy
3925 %\else\if\member B\relax%dummy
3926 %\else\if\member c\relax%dummy
3927 %\else\if\member C\relax%dummy
3928 %\else
3929 % \expandafter\twoCH@@R\member//%
3930 % \set@fusion@tetracup% for all bonds
3931 %\fi\fi\fi\fi
3932 \fi\fi}%
3933 \@wrongbdWafalse
3934 \@wrongbdWdtrue
3935 \Put@Direct(0,0){\@@dimethylenei{#2}{#3}{0}{0}}}%
3936 %bond b
3937 {\@forsemicol\member:=#2\do{%
3938 \ifx\member\empty\else
3939 \expandafter\@m@mb@r\member;\relax%
3940 \expandafter\twoch@r\@membera{}%
3941 \ifcase\@tmpa%
3942 \or \relax%
3943 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
3944 \xdef\fff{@}\xdef\bbb{@}\else
3945 \xdef\fff{@}\xdef\bbb{@}\fi\fi
3946 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
3947 \xdef\eee{@}\xdef\ccc{@}\else
3948 \xdef\eee{@}\xdef\ccc{@}\fi\fi
3949 \fi\fi}%
3950 \Put@Direct(68,171){\hskbonde}%
3951 \reset@double%
3952 \@tfor\member:=#1\do{%
3953 \if\member b\relax
3954 \@bdoublebondtrue
3955 \Put@Direct(68,171){\hbonde}%
3956 \else\if\member B\relax
3957 \@bdoublebondtrue
3958 \Put@Direct(68,-171){\hbondb}%
3959 \fi\fi}}%
3960 %bond c and atoms 3 and 4
3961 {\reset@double%
3962 \@tfor\member:=#1\do{%
3963 \if\member c\relax
3964 \@adoublebondtrue
3965 \else\if\member C\relax
3966 \@Adoublebondtrue
3967 \else\if\member d\relax
3968 \@bdoublebondtrue
3969 \else\if\member D\relax
3970 \@Bdoublebondtrue
3971 \fi\fi\fi\fi}%
3972 \@wrongbdWafalse
3973 \@wrongbdWdLtrue
3974 \Put@Direct(371,0){\@@dimethylene{#2}{#3}{0}{-2}}}%
3975 %
3976 %originally for fused rings
3977 %shifted for coloring skeletal bond 2010/10/01
3978 %
3979 {\reset@double%
3980 \@tfor\member:=#1\do{%
3981 \if\member a\relax%dummy
3982 \else\if\member A\relax%dummy
3983 \else\if\member b\relax%dummy
3984 \else\if\member B\relax%dummy
3985 \else\if\member c\relax%dummy
3986 \else\if\member C\relax%dummy
3987 \else
3988 \expandafter\twoCH@@R\member//%
3989 \set@fusion@tetracup% for all bonds
3990 \fi\fi\fi\fi
3991 \fi\fi}}%
3992 \end{ShiftPicEnvB}%
3993 }% end of \tetramethylenecup
3994 % \end{macrocode}
3995 % \end{macro}
3996 % \end{macro}
3997 %
3998 % The inner command |\set@fusion@tetracup| is used for typesetting
3999 % a fused ring at each bond represented by |\@@tmpa|. Warnings
4000 % concerning mismatched ring-fusions are based on the command
4001 % |\FuseWarning|.
4002 %
4003 % \begin{macro}{\set@fusion@tetracup}
4004 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetracup}}
4005 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
4006 % \begin{macrocode}
4007 \def\set@fusion@tetracup{%
4008 % %%%%%%%%%%%%%%%%%%%%%
4009 % % inner bond fusion %
4010 % %%%%%%%%%%%%%%%%%%%%%
4011 \if\@@tmpa a\relax%
4012 \putlratom{0}{103}{\@@tmpb}% % bond fused
4013 \FuseWarning{-171}{103}%
4014 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
4015 \else\if\@@tmpa A\relax%
4016 \putlratom{171}{0}{\@@tmpb}% % bond fused
4017 \FuseWarning{171}{-103}%
4018 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
4019 \else\if\@@tmpa b\relax%
4020 \putlratom{171}{0}{\@@tmpb}% % bond fused
4021 \FuseWarning{-200}{0}%
4022 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
4023 \else\if\@@tmpa B\relax%
4024 \putlratom{371}{0}{\@@tmpb}% % bond fused
4025 \FuseWarning{200}{0}%
4026 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
4027 \else\if\@@tmpa c\relax%
4028 \putlratom{371}{0}{\@@tmpb}% % bond fused
4029 \FuseWarning{-171}{-103}%
4030 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
4031 \else\if\@@tmpa C\relax%
4032 \putlratom{542}{103}{\@@tmpb}% % bond fused
4033 \FuseWarning{171}{103}%
4034 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
4035 \fi\fi
4036 \fi\fi\fi\fi
4037 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
4038 }% end of the macro \set@fusion@tetracup
4039 % \end{macrocode}
4040 % \end{macro}
4041 %
4042 %
4043 % \begin{macro}{\tetramethylenecap}
4044 % \begin{macro}{\@tetramethylenecap}
4045 % \begin{macrocode}
4046 \def\tetramethylenecap{%
4047 \@ifnextchar[{\@tetramethylenecap[@}{\@tetramethylenecap[]}}
4048 \def\@tetramethylenecap[#1]#2#3{%
4049 \iniflag\iniatom%
4050 \@reset@ylsw%
4051 {\@linterchainswfalse%
4052 \@rinterchainswtrue%
4053 \yldimethyleneposition{#2}{#3}{0}{0}}%
4054 \if@ylsw \ifx\@@ylii\empty
4055 \def\@@ylii{0}\def\@@yli{0}\fi
4056 \else
4057 {\@rinterchainswfalse%
4058 \@linterchainswtrue%
4059 \yldimethyleneiposition{#2}{#3}{0}{-2}}%
4060 \fi
4061 \if@ylsw \ifx\@@ylii\empty
4062 \def\@@ylii{-371}\def\@@yli{0}\fi\fi
4063 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4064 (900,480)(-200,-180){tetramethylenecap}%2002/4/30 by S. Fujita
4065 (200,180)%
4066 {\reset@double%
4067 \@tfor\member:=#1\do{%
4068 \if\member a\relax
4069 \@adoublebondtrue
4070 \else\if\member A\relax
4071 \@Adoublebondtrue
4072 %\else\if\member b\relax%dummy
4073 %\else\if\member B\relax%dummy
4074 %\else\if\member c\relax%dummy
4075 %\else\if\member C\relax%dummy
4076 %\else
4077 % \expandafter\twoCH@@R\member//%
4078 % \set@fusion@tetracap% for all bonds
4079 %\fi\fi\fi\fi
4080 \fi\fi}%
4081 \@wrongbdWatrue
4082 \Put@Direct(0,0){\@@dimethylene{#2}{#3}{0}{0}}}%
4083 {\@forsemicol\member:=#2\do{%
4084 \ifx\member\empty\else
4085 \expandafter\@m@mb@r\member;\relax%
4086 \expandafter\twoch@r\@membera{}%
4087 \ifcase\@tmpa%
4088 \or \relax%
4089 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
4090 \xdef\fff{@}\xdef\bbb{@}\else
4091 \xdef\fff{@}\xdef\bbb{@}\fi\fi
4092 \or \if\@tmpb s\relax\else\if\@tmpb h\relax
4093 \xdef\eee{@}\xdef\ccc{@}\else
4094 \xdef\eee{@}\xdef\ccc{@}\fi\fi
4095 \fi\fi}%
4096 \Put@Direct(68,-68){\hskbondb}%
4097 \reset@double%
4098 \@tfor\member:=#1\do{%
4099 \if\member b\relax
4100 \@bdoublebondtrue
4101 \Put@Direct(68,-68){\hbondb}%
4102 \else\if\member B\relax
4103 \@bdoublebondtrue
4104 \Put@Direct(68,274){\hbonde}%
4105 \fi\fi}}%
4106 {\reset@double%
4107 \@tfor\member:=#1\do{%
4108 \if\member c\relax
4109 \@adoublebondtrue
4110 \else\if\member C\relax
4111 \@Adoublebondtrue
4112 \else\if\member d\relax
4113 \@bdoublebondtrue
4114 \else\if\member D\relax
4115 \@Bdoublebondtrue
4116 \fi\fi\fi\fi}%
4117 \@wrongbdWaLtrue
4118 \Put@Direct(371,0){\@@dimethylenei{#2}{#3}{0}{-2}}}%
4119 %
4120 %originally for fused rings
4121 %shifted for coloring skeletal bond 2010/10/01
4122 %
4123 {\reset@double%
4124 \@tfor\member:=#1\do{%
4125 \if\member a\relax%dummy
4126 \else\if\member A\relax%dummy
4127 \else\if\member b\relax%dummy
4128 \else\if\member B\relax%dummy
4129 \else\if\member c\relax%dummy
4130 \else\if\member C\relax%dummy
4131 \else
4132 \expandafter\twoCH@@R\member//%
4133 \set@fusion@tetracap% for all bonds
4134 \fi\fi\fi\fi
4135 \fi\fi}}%
4136 \end{ShiftPicEnvB}%
4137 }% end of \tetramethylenecap
4138 % \end{macrocode}
4139 % \end{macro}
4140 % \end{macro}
4141 %
4142 % The inner command |\set@fusion@tetracap| is used for typesetting
4143 % a fused ring at each bond represented by |\@@tmpa|. Warnings
4144 % concerning mismatched ring-fusions are based on the command
4145 % |\FuseWarning|.
4146 %
4147 % \begin{macro}{\set@fusion@tetracap}
4148 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetracap}}
4149 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
4150 % \begin{macrocode}
4151 \def\set@fusion@tetracap{%
4152 % %%%%%%%%%%%%%%%%%%%%%
4153 % % inner bond fusion %
4154 % %%%%%%%%%%%%%%%%%%%%%
4155 \if\@@tmpa a\relax%
4156 \putlratom{0}{0}{\@@tmpb}% % bond fused
4157 \FuseWarning{-171}{-103}%
4158 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
4159 \else\if\@@tmpa A\relax%
4160 \putlratom{171}{103}{\@@tmpb}% % bond fused
4161 \FuseWarning{171}{103}%
4162 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
4163 \else\if\@@tmpa b\relax%
4164 \putlratom{171}{103}{\@@tmpb}% % bond fused
4165 \FuseWarning{-200}{0}%
4166 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
4167 \else\if\@@tmpa B\relax%
4168 \putlratom{371}{103}{\@@tmpb}% % bond fused
4169 \FuseWarning{200}{0}%
4170 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
4171 \else\if\@@tmpa c\relax%
4172 \putlratom{371}{103}{\@@tmpb}% % bond fused
4173 \FuseWarning{-171}{103}%
4174 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
4175 \else\if\@@tmpa C\relax%
4176 \putlratom{542}{0}{\@@tmpb}% % bond fused
4177 \FuseWarning{171}{-103}%
4178 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
4179 \fi\fi
4180 \fi\fi\fi\fi
4181 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
4182 }% end of the macro \set@fusion@tetracap
4183 % \end{macrocode}
4184 % \end{macro}
4185 %
4186 % \section{Pentamethylene}
4187 % \subsection{Normal direction}
4188 %
4189 % The macro |\pentamethylene| has two arguments |ATOMLIST| and |SUBSLIST|
4190 % as well as an optional argument |BONDLIST|.
4191 %
4192 % \begin{macro}{\pentamethylene}
4193 % \begin{macro}{\@pentamethylene}
4194 %
4195 % \begin{verbatim}
4196 %
4197 % bbb ddd
4198 % 2 4
4199 % a / ` b / c` d (or uppercase letters)
4200 % / ` / `
4201 % 1 3 5
4202 % aaa ccc
4203 % \end{verbatim}
4204 %
4205 %
4206 % \begin{verbatim}
4207 % \pentamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
4208 % \end{verbatim}
4209 %
4210 % The |BONDLIST| argument contains one character selected from
4211 % a to d (or A to D),
4212 % each of which indicates the presence of an inner (endcyclic) double
4213 % bond on the corresponding position. A lowercase letter is used
4214 % to typeset a double bond at a lower-side of an outer skeletal bond,
4215 % while an uppercase letter typesets a double bond at a upper-side of
4216 % an outer skeletal bond.
4217 % (Note that the option `A' represents an aromatic circle in
4218 % commands |\sixheterov| etc.)
4219 %
4220 % \begin{verbatim}
4221 % BONDLIST =
4222 %
4223 % [] or none : no double bond
4224 % a : 1,2-double bond
4225 % A : 1,2-double bond in an opposite side
4226 % b : 2,3-double bond
4227 % B : 2,3-double bond in an opposite side
4228 % c : 3,4-double bond
4229 % C : 3,4-double bond in an opposite side
4230 % d : 4,5-double bond
4231 % D : 4,5-double bond in an opposite side
4232 % \end{verbatim}
4233 %
4234 % The |ATOMLIST| argument contains one or more heteroatom descriptors
4235 % which are separated from each other by a semicolon. Each heteroatom
4236 % descriptor consists of a locant number and a heteroatom,
4237 % where these are separated with a double equality symbol.
4238 %
4239 % \begin{verbatim}
4240 %
4241 % ATOMLIST: list of heteroatoms (max 5 atoms)
4242 %
4243 % for n = 1 to 5
4244 %
4245 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
4246 % e.g. 1==N for N at 1-position
4247 % \end{verbatim}
4248 %
4249 % The |SUBSLIST| argument contains one or more substitution descriptors
4250 % which are separated from each other by a semicolon. Each substitution
4251 % descriptor has a locant number with a bond modifier and a substituent,
4252 % where these are separated with a double equality symbol.
4253 % \begin{verbatim}
4254 %
4255 % SUBSLIST: list of substituents
4256 %
4257 % for n = 1 to 5
4258 %
4259 % nD : exocyclic double bond at n-atom
4260 % n or nS : exocyclic single bond at n-atom
4261 % nA : alpha single bond at n-atom
4262 % nB : beta single bond at n-atom
4263 % nSA : alpha single bond at n-atom (boldface)
4264 % nSB : beta single bond at n-atom (dotted line)
4265 % nSa : alpha (not specified) single bond at n-atom
4266 % nSb : beta (not specified) single bond at n-atom
4267 % nW : terminal single bond (n=1 or 5)
4268 %
4269 % \end{verbatim}
4270 %
4271 % Several examples are shown as follows.
4272 % \begin{verbatim}
4273 % e.g.
4274 %
4275 % \pentamethylene{1==N}{1==Cl;2==F}
4276 % \pentamethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
4277 % \end{verbatim}
4278 %
4279 % The definition of |\pentamethylene| uses a picture environment and
4280 % is based on two |\@@trimethylene| commands, each of which
4281 % is consist of the following unit processes:
4282 % \begin{enumerate}
4283 % \item adjusting substitution site by
4284 % |\yltrimethyleneposition|
4285 % \item treating atom list,
4286 % placing outer skeletons, inner double bonds,
4287 % setting hetero atoms, and
4288 % placing substituents by |\@@trimethylene|.
4289 % \end{enumerate}
4290 %
4291 % \begin{macrocode}
4292 \def\pentamethylene{%
4293 \@ifnextchar[{\@pentamethylene[@}{\@pentamethylene[]}}
4294 \def\@pentamethylene[#1]#2#3{%
4295 \iniflag\iniatom%
4296 \@reset@ylsw%
4297 {\@linterchainswfalse%
4298 \@rinterchainswtrue%
4299 \yltrimethyleneposition{#2}{#3}{0}{0}}%
4300 \if@ylsw \ifx\@@ylii\empty
4301 \def\@@ylii{0}\def\@@yli{0}\fi
4302 \else
4303 {\@rinterchainswfalse%
4304 \@linterchainswtrue%
4305 \yltrimethyleneposition{#2}{#3}{1}{-2}}%
4306 \if@ylsw \ifx\@@ylii\empty
4307 \def\@@ylii{-342}\def\@@yli{0}\fi\fi
4308 \fi
4309 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4310 (1100,480)(-200,-180){pentamethylene}%2002/4/30 by S. Fujita
4311 (200,180)%
4312 {\reset@double%
4313 \@tfor\member:=#1\do{%
4314 \if\member a\relax
4315 \@adoublebondtrue
4316 \else\if\member b\relax
4317 \@bdoublebondtrue
4318 \else\if\member A\relax
4319 \@Adoublebondtrue
4320 \else\if\member B\relax
4321 \@Bdoublebondtrue
4322 %\else\if\member c\relax%dummy
4323 %\else\if\member C\relax%dummy
4324 %\else\if\member d\relax%dummy
4325 %\else\if\member D\relax%dummy
4326 %\else
4327 % \expandafter\twoCH@@R\member//%
4328 % \set@fusion@pentameth% for all bonds
4329 %\fi\fi\fi\fi
4330 \fi\fi\fi\fi}%
4331 \@wrongbdWatrue
4332 \@wrongbdWdtrue
4333 \Put@Direct(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
4334 {\reset@double%
4335 \@tfor\member:=#1\do{%
4336 \if\member c\relax
4337 \@adoublebondtrue
4338 \else\if\member d\relax
4339 \@bdoublebondtrue
4340 \else\if\member C\relax
4341 \@Adoublebondtrue
4342 \else\if\member D\relax
4343 \@Bdoublebondtrue
4344 \fi\fi\fi\fi}%
4345 \@wrongbdWatrue
4346 \@wrongbdWdfalse
4347 \Put@Direct(342,0){\@@trimethylene{#2}{#3}{1}{-2}}}%
4348 %
4349 %originally for fused rings
4350 %shifted for coloring skeletal bond 2010/10/01
4351 %
4352 {\reset@double%
4353 \@tfor\member:=#1\do{%
4354 \if\member a\relax%dummy
4355 \else\if\member b\relax%dummy
4356 \else\if\member A\relax%dummy
4357 \else\if\member B\relax%dummy
4358 \else\if\member c\relax%dummy
4359 \else\if\member C\relax%dummy
4360 \else\if\member d\relax%dummy
4361 \else\if\member D\relax%dummy
4362 \else
4363 \expandafter\twoCH@@R\member//%
4364 \set@fusion@pentameth% for all bonds
4365 \fi\fi\fi\fi
4366 \fi\fi\fi\fi}}%
4367 \end{ShiftPicEnvB}%
4368 }% end of \pentamethylene
4369 % \end{macrocode}
4370 % \end{macro}
4371 % \end{macro}
4372 %
4373 % The inner command |\set@fusion@pentameth| is used for typesetting
4374 % a fused ring at each bond represented by |\@@tmpa|. Warnings
4375 % concerning mismatched ring-fusions are based on the command
4376 % |\FuseWarning|.
4377 %
4378 % \begin{macro}{\set@fusion@pentameth}
4379 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@pentameth}}
4380 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
4381 % \begin{macrocode}
4382 \def\set@fusion@pentameth{%
4383 % %%%%%%%%%%%%%%%%%%%%%
4384 % % inner bond fusion %
4385 % %%%%%%%%%%%%%%%%%%%%%
4386 \if\@@tmpa a\relax%
4387 \putlratom{0}{0}{\@@tmpb}% % bond fused
4388 \FuseWarning{-171}{-103}%
4389 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
4390 \else\if\@@tmpa A\relax%
4391 \putlratom{171}{103}{\@@tmpb}% % bond fused
4392 \FuseWarning{171}{103}%
4393 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
4394 \else\if\@@tmpa b\relax%
4395 \putlratom{171}{103}{\@@tmpb}% % bond fused
4396 \FuseWarning{-171}{103}%
4397 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
4398 \else\if\@@tmpa B\relax%
4399 \putlratom{342}{0}{\@@tmpb}% % bond fused
4400 \FuseWarning{171}{-103}%
4401 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
4402 \else\if\@@tmpa c\relax%
4403 \putlratom{342}{0}{\@@tmpb}% % bond fused
4404 \FuseWarning{-171}{-103}%
4405 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
4406 \else\if\@@tmpa C\relax%
4407 \putlratom{513}{103}{\@@tmpb}% % bond fused
4408 \FuseWarning{171}{103}%
4409 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
4410 \else\if\@@tmpa d\relax%
4411 \putlratom{513}{103}{\@@tmpb}% % bond fused
4412 \FuseWarning{-171}{103}%
4413 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
4414 \else\if\@@tmpa D\relax%
4415 \putlratom{684}{0}{\@@tmpb}% % bond fused
4416 \FuseWarning{171}{-103}%
4417 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
4418 \fi\fi\fi\fi
4419 \fi\fi\fi\fi
4420 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
4421 }% end of the macro \set@fusion@pentameth
4422 % \end{macrocode}
4423 % \end{macro}
4424 %
4425 % \subsection{Inverse direction}
4426 %
4427 % The macro |\pentamethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
4428 % as well as an optional argument |BONDLIST|.
4429 %
4430 % \begin{macro}{\pentamethylenei}
4431 % \begin{macro}{\@pentamethylenei}
4432 %
4433 % \begin{verbatim}
4434 %
4435 % (aaa)
4436 % aaa ccc eee (ccc)
4437 % 1 3 5
4438 % a ` b / ` c / d
4439 % ` / ` /
4440 % 2 4
4441 % bbb ddd (bbb)
4442 % \end{verbatim}
4443 %
4444 % \begin{verbatim}
4445 % \pentamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
4446 % \end{verbatim}
4447 %
4448 % The |BONDLIST| argument contains one character selected from
4449 % a to d (or A to D),
4450 % each of which indicates the presence of an inner (endcyclic) double
4451 % bond on the corresponding position. A lowercase letter is used
4452 % to typeset a double bond at the upper-side of an outer skeletal bond,
4453 % while an uppercase letter typesets a double bond at the lower-side of
4454 % an outer skeletal bond.
4455 % (Note that the option `A' represents an aromatic circle in
4456 % commands |\sixheterov| etc.)
4457 %
4458 % \begin{verbatim}
4459 % BONDLIST =
4460 %
4461 % [] or none : no double bond
4462 % a : 1,2-double bond
4463 % A : 1,2-double bond in an opposite side
4464 % b : 2,3-double bond
4465 % B : 2,3-double bond in an opposite side
4466 % c : 3,4-double bond
4467 % C : 3,4-double bond in an opposite side
4468 % d : 4,5-double bond
4469 % D : 4,5-double bond in an opposite side
4470 % \end{verbatim}
4471 %
4472 % The |ATOMLIST| argument contains one or more heteroatom descriptors
4473 % which are separated from each other by a semicolon. Each heteroatom
4474 % descriptor consists of a locant number and a heteroatom,
4475 % where these are separated with a double equality symbol.
4476 %
4477 % \begin{verbatim}
4478 %
4479 % ATOMLIST: list of heteroatoms (max 5 atoms)
4480 %
4481 % for n = 1 to 5
4482 %
4483 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
4484 % e.g. 1==N for N at 1-position
4485 % \end{verbatim}
4486 %
4487 % The |SUBSLIST| argument contains one or more substitution descriptors
4488 % which are separated from each other by a semicolon. Each substitution
4489 % descriptor has a locant number with a bond modifier and a substituent,
4490 % where these are separated with a double equality symbol.
4491 % \begin{verbatim}
4492 %
4493 % SUBSLIST: list of substituents
4494 %
4495 % for n = 1 to 5
4496 %
4497 % nD : exocyclic double bond at n-atom
4498 % n or nS : exocyclic single bond at n-atom
4499 % nA : alpha single bond at n-atom
4500 % nB : beta single bond at n-atom
4501 % nSA : alpha single bond at n-atom (boldface)
4502 % nSB : beta single bond at n-atom (dotted line)
4503 % nSa : alpha (not specified) single bond at n-atom
4504 % nSb : beta (not specified) single bond at n-atom
4505 % nW : terminal single bond (n=1 or 5)
4506 %
4507 % \end{verbatim}
4508 %
4509 % Several examples are shown as follows.
4510 % \begin{verbatim}
4511 % e.g.
4512 %
4513 % \pentamethylenei{1==N}{1==Cl;2==F}
4514 % \pentamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
4515 % \end{verbatim}
4516 %
4517 % The definition of |\pentamethylenei| uses a picture environment and
4518 % is based on two |\@@trimethylenei| commands, each of which
4519 % is consist of the following unit processes:
4520 % \begin{enumerate}
4521 % \item adjusting substitution site by
4522 % |\yltrimethyleneiposition|
4523 % \item treating atom list,
4524 % placing outer skeletons, inner double bonds,
4525 % setting hetero atoms, and
4526 % placing substituents by |\@@trimethylenei|.
4527 % \end{enumerate}
4528 %
4529 % \begin{macrocode}
4530 \def\pentamethylenei{%
4531 \@ifnextchar[{\@pentamethylenei[@}{\@pentamethylenei[]}}
4532 \def\@pentamethylenei[#1]#2#3{%
4533 \iniflag\iniatom%
4534 \@reset@ylsw%
4535 {\@linterchainswfalse%
4536 \@rinterchainswtrue%
4537 \yltrimethyleneiposition{#2}{#3}{0}{0}}%
4538 \if@ylsw \ifx\@@ylii\empty
4539 \def\@@ylii{0}\def\@@yli{0}\fi
4540 \else
4541 {\@rinterchainswfalse%
4542 \@linterchainswtrue%
4543 \yltrimethyleneiposition{#2}{#3}{1}{-2}}%
4544 \if@ylsw \ifx\@@ylii\empty
4545 \def\@@ylii{-342}\def\@@yli{0}\fi\fi
4546 \fi
4547 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4548 (1100,480)(-200,-180){pentamethylenei}%2002/4/30 by S. Fujita
4549 (200,180)%
4550 {\reset@double%
4551 \@tfor\member:=#1\do{%
4552 \if\member a\relax
4553 \@adoublebondtrue
4554 \else\if\member b\relax
4555 \@bdoublebondtrue
4556 \else\if\member A\relax
4557 \@Adoublebondtrue
4558 \else\if\member B\relax
4559 \@Bdoublebondtrue
4560 %\else\if\member c\relax%dummy
4561 %\else\if\member C\relax%dummy
4562 %\else\if\member d\relax%dummy
4563 %\else\if\member D\relax%dummy
4564 %\else
4565 % \expandafter\twoCH@@R\member//%
4566 % \set@fusion@pentamethi% for all bonds
4567 %\fi\fi\fi\fi
4568 \fi\fi\fi\fi}%
4569 \@wrongbdWatrue
4570 \@wrongbdWdtrue
4571 \Put@Direct(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}%
4572 {\reset@double%
4573 \@tfor\member:=#1\do{%
4574 \if\member c\relax
4575 \@adoublebondtrue
4576 \else\if\member d\relax
4577 \@bdoublebondtrue
4578 \else\if\member C\relax
4579 \@Adoublebondtrue
4580 \else\if\member D\relax
4581 \@Bdoublebondtrue
4582 \fi\fi\fi\fi}%
4583 \@wrongbdWafalse
4584 \@wrongbdWdtrue
4585 \Put@Direct(342,0){\@@trimethylenei{#2}{#3}{1}{-2}}}%
4586 %
4587 %originally for fused rings
4588 %shifted for coloring skeletal bond 2010/10/01
4589 %
4590 {\reset@double%
4591 \@tfor\member:=#1\do{%
4592 \if\member a\relax%dummy
4593 \else\if\member b\relax%dummy
4594 \else\if\member A\relax%dummy
4595 \else\if\member B\relax%dummy
4596 \else\if\member c\relax%dummy
4597 \else\if\member C\relax%dummy
4598 \else\if\member d\relax%dummy
4599 \else\if\member D\relax%dummy
4600 \else
4601 \expandafter\twoCH@@R\member//%
4602 \set@fusion@pentamethi% for all bonds
4603 \fi\fi\fi\fi
4604 \fi\fi\fi\fi}}%
4605 \end{ShiftPicEnvB}%
4606 }% end of \pentamethylenei
4607 % \end{macrocode}
4608 % \end{macro}
4609 % \end{macro}
4610 %
4611 % The inner command |\set@fusion@pentamethi| is used for typesetting
4612 % a fused ring at each bond represented by |\@@tmpa|. Warnings
4613 % concerning mismatched ring-fusions are based on the command
4614 % |\FuseWarning|.
4615 %
4616 % \begin{macro}{\set@fusion@pentamethi}
4617 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@pentamethi}}
4618 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
4619 % \begin{macrocode}
4620 \def\set@fusion@pentamethi{%
4621 % %%%%%%%%%%%%%%%%%%%%%
4622 % % inner bond fusion %
4623 % %%%%%%%%%%%%%%%%%%%%%
4624 \if\@@tmpa a\relax%
4625 \putlratom{0}{103}{\@@tmpb}% % bond fused
4626 \FuseWarning{-171}{103}%
4627 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
4628 \else\if\@@tmpa A\relax%
4629 \putlratom{171}{0}{\@@tmpb}% % bond fused
4630 \FuseWarning{171}{-103}%
4631 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
4632 \else\if\@@tmpa b\relax%
4633 \putlratom{171}{0}{\@@tmpb}% % bond fused
4634 \FuseWarning{-171}{-103}%
4635 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
4636 \else\if\@@tmpa B\relax%
4637 \putlratom{342}{103}{\@@tmpb}% % bond fused
4638 \FuseWarning{171}{103}%
4639 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
4640 \else\if\@@tmpa c\relax%
4641 \putlratom{342}{103}{\@@tmpb}% % bond fused
4642 \FuseWarning{-171}{103}%
4643 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
4644 \else\if\@@tmpa C\relax%
4645 \putlratom{513}{0}{\@@tmpb}% % bond fused
4646 \FuseWarning{171}{103}%
4647 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
4648 \else\if\@@tmpa d\relax%
4649 \putlratom{513}{0}{\@@tmpb}% % bond fused
4650 \FuseWarning{-171}{-103}%
4651 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
4652 \else\if\@@tmpa D\relax%
4653 \putlratom{684}{103}{\@@tmpb}% % bond fused
4654 \FuseWarning{171}{103}%
4655 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
4656 \fi\fi\fi\fi
4657 \fi\fi\fi\fi
4658 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
4659 }% end of the macro \set@fusion@pentamethi
4660 % \end{macrocode}
4661 % \end{macro}
4662 %
4663 % \section{Switches for Selecting Normal and Inverse Directions}
4664 %
4665 % The switch |\@normorinvsw| is used to select normal or
4666 % inverse direction in the definition of commands for drawing
4667 % hexametylenes and higher homologs. The value of this switch is
4668 % false for normal direction and true for inverse direction.
4669 %
4670 % \begin{macro}{\if@normorinvsw}
4671 % \begin{macrocode}
4672 \newif\if@normorinvsw \@normorinvswfalse
4673 % \end{macrocode}
4674 % \end{macro}
4675 %
4676 % The macro |\set@normaldirection| assigns active commands to
4677 % temporary commands in the definition of a command for drawing
4678 % hexametylenes or higher homologs of normal direction.
4679 % \begin{macro}{\set@normaldirection}
4680 % \begin{macrocode}
4681 \def\set@normaldirection{%
4682 \@normorinvswfalse
4683 \let\@yltrinormorinv=\yltrimethyleneposition
4684 \let\@yldinormorinv=\yldimethyleneposition
4685 \let\@@trinormorinv=\@@trimethylene
4686 \let\@@dinormorinv=\@@dimethylene}
4687 % \end{macrocode}
4688 % \end{macro}
4689 %
4690 % The macro |\set@inversedirection| assigns active commands to
4691 % temporary commands in the definition of a command for drawing
4692 % hexametylenes or higher homologs of inverse direction.
4693 % \begin{macro}{\set@inversedirection}
4694 % \begin{macrocode}
4695 \def\set@inversedirection{%
4696 \@normorinvswtrue
4697 \let\@yltrinormorinv=\yltrimethyleneiposition
4698 \let\@yldinormorinv=\yldimethyleneiposition
4699 \let\@@trinormorinv=\@@trimethylenei
4700 \let\@@dinormorinv=\@@dimethylenei}
4701 % \end{macrocode}
4702 % \end{macro}
4703 %
4704 % \section{Hexamethylenes of normal and inverse direction}
4705 %
4706 % Hexamethylene and hetera derivatives are typeset with the commands
4707 % |\hexamethylene| and |\hexamethylenei|. The former macro
4708 % is to draw hexamethylenes of normal direction, while the latter
4709 % is to draw ones of inverse directions.
4710 %
4711 % \begin{verbatim}
4712 % Normal direction:
4713 %
4714 % (bbb) ((bbb))
4715 % bbb ddd fff
4716 % 2 4 6
4717 % a / ` b / c` d / e
4718 % / ` / ` /
4719 % 1 3 5
4720 % aaa ccc eee
4721 % (aaa) (ccc)
4722 % ((aaa))
4723 %
4724 % Inverse direction:
4725 %
4726 % (aaa)
4727 % aaa ccc eee (ccc) ((aaa))
4728 % 1 3 5
4729 % a ` b / ` c / d ` e
4730 % ` / ` / `
4731 % 2 4 6
4732 % bbb ddd (bbb) fff((bbb))
4733 % \end{verbatim}
4734 %
4735 % The macros have two arguments |ATOMLIST| and |SUBSLIST|
4736 % as well as an optional argument |BONDLIST|.
4737 %
4738 % \begin{verbatim}
4739 % \hexamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
4740 % \hexamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
4741 % \end{verbatim}
4742 %
4743 % The |BONDLIST| argument contains one character selected from
4744 % a to e (or A to E),
4745 % each of which indicates the presence of an inner (endcyclic) double
4746 % bond on the corresponding position. A lowercase letter is used
4747 % to typeset a double bond at the upper-side of an outer skeletal bond,
4748 % while an uppercase letter typesets a double bond at the lower-side of
4749 % an outer skeletal bond.
4750 % (Note that the option `A' represents an aromatic circle in
4751 % commands |\sixheterov| etc.)
4752 %
4753 % \begin{verbatim}
4754 % BONDLIST =
4755 %
4756 % [] or none : no double bond
4757 % a : 1,2-double bond
4758 % A : 1,2-double bond in an opposite side
4759 % b : 2,3-double bond
4760 % B : 2,3-double bond in an opposite side
4761 % c : 3,4-double bond
4762 % C : 3,4-double bond in an opposite side
4763 % d : 4,5-double bond
4764 % D : 4,5-double bond in an opposite side
4765 % e : 5,6-double bond
4766 % E : 5,6-double bond in an opposite side
4767 % \end{verbatim}
4768 %
4769 % The |ATOMLIST| argument contains one or more heteroatom descriptors
4770 % which are separated from each other by a semicolon. Each heteroatom
4771 % descriptor consists of a locant number and a heteroatom,
4772 % where these are separated with a double equality symbol.
4773 %
4774 % \begin{verbatim}
4775 %
4776 % ATOMLIST: list of heteroatoms (max 6 atoms)
4777 %
4778 % for n = 1 to 6
4779 %
4780 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
4781 % e.g. 1==N for N at 1-position
4782 % \end{verbatim}
4783 %
4784 % The |SUBSLIST| argument contains one or more substitution descriptors
4785 % which are separated from each other by a semicolon. Each substitution
4786 % descriptor has a locant number with a bond modifier and a substituent,
4787 % where these are separated with a double equality symbol.
4788 % \begin{verbatim}
4789 %
4790 % SUBSLIST: list of substituents
4791 %
4792 % for n = 1 to 6
4793 %
4794 % nD : exocyclic double bond at n-atom
4795 % n or nS : exocyclic single bond at n-atom
4796 % nA : alpha single bond at n-atom
4797 % nB : beta single bond at n-atom
4798 % nSA : alpha single bond at n-atom (boldface)
4799 % nSB : beta single bond at n-atom (dotted line)
4800 % nSa : alpha (not specified) single bond at n-atom
4801 % nSb : beta (not specified) single bond at n-atom
4802 % nW : terminal single bond (n=1 or 6)
4803 %
4804 % \end{verbatim}
4805 %
4806 % Several examples are shown as follows.
4807 % \begin{verbatim}
4808 % e.g.
4809 %
4810 % \hexamethylene{1==N}{1==Cl;2==F}
4811 % \hexamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
4812 % \end{verbatim}
4813 %
4814 % The macros |\hexamethylene| and |\hexamethylenei| are
4815 % based on a common inner macro |\@hexamethylene|,
4816 % the definition of which uses a picture environment.
4817 %
4818 % \begin{macro}{\hexamethylene}
4819 % \begin{macrocode}
4820 \def\hexamethylene{%
4821 \@ifnextchar[{\set@normaldirection\@hexamethylene[@}{%
4822 \set@normaldirection\@hexamethylene[]}}
4823 % \end{macrocode}
4824 % \end{macro}
4825 %
4826 % \begin{macro}{\hexamethylenei}
4827 % \begin{macrocode}
4828 \def\hexamethylenei{%
4829 \@ifnextchar[{\set@inversedirection\@hexamethylene[@}{%
4830 \set@inversedirection\@hexamethylene[]}}
4831 % \end{macrocode}
4832 % \end{macro}
4833 %
4834 % Inner temporary commands such as |\@@trinormorinv| and
4835 % |\@@dinormorinv| in the common |\@hexamethylene| macro
4836 % are replaced by active commands such as |\@@trimethylene| and
4837 % |\@@dimethylene|. They carry out the following unit processes.
4838 % \begin{enumerate}
4839 % \item Adjusting substitution site:
4840 % |\yltrimethyleneposition|
4841 % or |\yldimethyleneposition| for normal direction;
4842 % |\yltrimethyleneiposition|
4843 % or |\yldimethyleneiposition| for inverse direction.
4844 % \item Treating atom list,
4845 % placing outer skeletons, inner double bonds,
4846 % setting hetero atoms, and
4847 % placing substituents:
4848 % |\@@trimethylene|
4849 % or |\@@dimethylene| for normal direction;
4850 % |\@@trimethylenei|
4851 % or |\@@dimethylenei| for normal direction.
4852 % \end{enumerate}
4853 %
4854 % \begin{macro}{\@hexamethylene}
4855 % \begin{macrocode}
4856 \def\@hexamethylene[#1]#2#3{%
4857 \iniflag\iniatom%
4858 \@reset@ylsw%
4859 {\@linterchainswfalse%
4860 \@rinterchainswtrue%
4861 \@yltrinormorinv{#2}{#3}{0}{0}}%
4862 \if@ylsw \ifx\@@ylii\empty
4863 \def\@@ylii{0}\def\@@yli{0}\fi
4864 \else
4865 {\@rinterchainswtrue%
4866 \@linterchainswtrue%
4867 \@yltrinormorinv{#2}{#3}{1}{-2}}%
4868 \fi
4869 \if@ylsw \ifx\@@ylii\empty
4870 \def\@@ylii{-342}\def\@@yli{0}\fi
4871 \else
4872 {\@rinterchainswfalse%
4873 \@linterchainswtrue%
4874 \@yldinormorinv{#2}{#3}{1}{-4}}%
4875 \fi
4876 \if@ylsw \ifx\@@ylii\empty
4877 \def\@@ylii{-684}\def\@@yli{0}\fi\fi
4878 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4879 (1100,480)(-200,-180){hexamethylene}%2002/4/30 by S. Fujita
4880 (200,180)%
4881 {\reset@double%
4882 \@tfor\member:=#1\do{%
4883 \if\member a\relax
4884 \@adoublebondtrue
4885 \else\if\member b\relax
4886 \@bdoublebondtrue
4887 \else\if\member A\relax
4888 \@Adoublebondtrue
4889 \else\if\member B\relax
4890 \@Bdoublebondtrue
4891 %\else\if\member c\relax%dummy
4892 %\else\if\member C\relax%dummy
4893 %\else\if\member d\relax%dummy
4894 %\else\if\member D\relax%dummy
4895 %\else\if\member e\relax%dummy
4896 %\else\if\member E\relax%dummy
4897 %\else
4898 % \expandafter\twoCH@@R\member//%
4899 % \set@fusion@hexameth% for all bonds
4900 %\fi\fi\fi\fi\fi\fi
4901 \fi\fi\fi\fi}%
4902 \@wrongbdWatrue
4903 \@wrongbdWdtrue
4904 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
4905 {\reset@double%
4906 \@tfor\member:=#1\do{%
4907 \if\member c\relax
4908 \@adoublebondtrue
4909 \else\if\member d\relax
4910 \@bdoublebondtrue
4911 \else\if\member C\relax
4912 \@Adoublebondtrue
4913 \else\if\member D\relax
4914 \@Bdoublebondtrue
4915 \fi\fi\fi\fi}%
4916 \@wrongbdWatrue
4917 \@wrongbdWdtrue
4918 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
4919 {\reset@double%
4920 \@tfor\member:=#1\do{%
4921 \if\member e\relax
4922 \@adoublebondtrue
4923 \else\if\member E\relax
4924 \@Adoublebondtrue
4925 \fi\fi}%
4926 \if@normorinvsw% inverse
4927 \@wrongbdWatrue
4928 \@wrongbdWdfalse
4929 \else% normal
4930 \@wrongbdWafalse
4931 \@wrongbdWdtrue
4932 \fi
4933 \Put@Direct(684,0){\@@dinormorinv{#2}{#3}{1}{-4}}}%
4934 %
4935 %originally for fused rings
4936 %shifted for coloring skeletal bond 2010/10/01
4937 %
4938 {\reset@double%
4939 \@tfor\member:=#1\do{%
4940 \if\member a\relax%dummy
4941 \else\if\member b\relax%dummy
4942 \else\if\member A\relax%dummy
4943 \else\if\member B\relax%dummy
4944 \else\if\member c\relax%dummy
4945 \else\if\member C\relax%dummy
4946 \else\if\member d\relax%dummy
4947 \else\if\member D\relax%dummy
4948 \else\if\member e\relax%dummy
4949 \else\if\member E\relax%dummy
4950 \else
4951 \expandafter\twoCH@@R\member//%
4952 \set@fusion@hexameth% for all bonds
4953 \fi\fi\fi\fi\fi\fi
4954 \fi\fi\fi\fi}}%
4955 \end{ShiftPicEnvB}%
4956 }% end of \@hexamethylene
4957 % \end{macrocode}
4958 % \end{macro}
4959 %
4960 % The inner command |\set@fusion@hexameth| is used for typesetting
4961 % a fused ring at each bond represented by |\@@tmpa|. Warnings
4962 % concerning mismatched ring-fusions are based on the command
4963 % |\FuseWarning|.
4964 %
4965 % \begin{macro}{\set@fusion@hexameth}
4966 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@hexameth}}
4967 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
4968 % \begin{macrocode}
4969 \def\set@fusion@hexameth{%
4970 % %%%%%%%%%%%%%%%%%%%%%
4971 % % inner bond fusion %
4972 % %%%%%%%%%%%%%%%%%%%%%
4973 \if@normorinvsw
4974 \if\@@tmpa e\relax%
4975 \putlratom{684}{103}{\@@tmpb}% % bond fused
4976 \FuseWarning{-171}{103}%
4977 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
4978 \else\if\@@tmpa E\relax%
4979 \putlratom{855}{0}{\@@tmpb}% % bond fused
4980 \FuseWarning{171}{-103}%
4981 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
4982 \else
4983 \set@fusion@pentamethi
4984 \fi\fi
4985 \else
4986 \if\@@tmpa e\relax%
4987 \putlratom{684}{0}{\@@tmpb}% % bond fused
4988 \FuseWarning{-171}{-103}%
4989 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
4990 \else\if\@@tmpa E\relax%
4991 \putlratom{855}{103}{\@@tmpb}% % bond fused
4992 \FuseWarning{171}{103}%
4993 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
4994 \else
4995 \set@fusion@pentameth
4996 \fi\fi
4997 \fi
4998 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
4999 }% end of the macro \set@fusion@hexameth
5000 % \end{macrocode}
5001 % \end{macro}
5002 %
5003 % \section{Heptamethylenes of normal and inverse direction}
5004 %
5005 % Heptamethylene and hetera derivatives are typeset with the commands
5006 % |\heptamethylene| and |\heptamethylenei|. The former macro
5007 % is to draw heptamethylenes of normal direction, while the latter
5008 % is to draw ones of inverse directions.
5009 %
5010 % \begin{verbatim}
5011 % Normal direction:
5012 %
5013 % (bbb) ((bbb))
5014 % bbb ddd fff
5015 % 2 4 6
5016 % a / ` b / c` d / e ` f
5017 % / ` / ` / `
5018 % 1 3 5 7
5019 % aaa ccc eee gggg
5020 % (aaa) (ccc) ((ccc))
5021 % ((aaa))
5022 %
5023 % Inverse direction:
5024 %
5025 % (aaa) ((aaa)) ((ccc))
5026 % aaa ccc eee (ccc) ggg
5027 % 1 3 5 7
5028 % a ` b / ` c / d ` e /f
5029 % ` / ` / ` /
5030 % 2 4 6
5031 % bbb ddd (bbb) fff((bbb))
5032 % (aaa)
5033 % \end{verbatim}
5034 %
5035 % The macros have two arguments |ATOMLIST| and |SUBSLIST|
5036 % as well as an optional argument |BONDLIST|.
5037 % \begin{verbatim}
5038 % \heptamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
5039 % \heptamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
5040 % \end{verbatim}
5041 %
5042 % The |BONDLIST| argument contains one character selected from
5043 % a to f (or A to F),
5044 % each of which indicates the presence of an inner (endcyclic) double
5045 % bond on the corresponding position. A lowercase letter is used
5046 % to typeset a double bond at the upper-side of an outer skeletal bond,
5047 % while an uppercase letter typesets a double bond at the lower-side of
5048 % an outer skeletal bond.
5049 % (Note that the option `A' represents an aromatic circle in
5050 % commands |\sixheterov| etc.)
5051 %
5052 % \begin{verbatim}
5053 % BONDLIST =
5054 %
5055 % [] or none : no double bond
5056 % a : 1,2-double bond
5057 % A : 1,2-double bond in an opposite side
5058 % b : 2,3-double bond
5059 % B : 2,3-double bond in an opposite side
5060 % c : 3,4-double bond
5061 % C : 3,4-double bond in an opposite side
5062 % d : 4,5-double bond
5063 % D : 4,5-double bond in an opposite side
5064 % e : 5,6-double bond
5065 % E : 5,6-double bond in an opposite side
5066 % f : 6,7-double bond
5067 % F : 6,7-double bond in an opposite side
5068 % \end{verbatim}
5069 %
5070 % The |ATOMLIST| argument contains one or more heteroatom descriptors
5071 % which are separated from each other by a semicolon. Each heteroatom
5072 % descriptor consists of a locant number and a heteroatom,
5073 % where these are separated with a double equality symbol.
5074 %
5075 % \begin{verbatim}
5076 %
5077 % ATOMLIST: list of heteroatoms (max 7 atoms)
5078 %
5079 % for n = 1 to 7
5080 %
5081 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
5082 % e.g. 1==N for N at 1-position
5083 % \end{verbatim}
5084 %
5085 % The |SUBSLIST| argument contains one or more substitution descriptors
5086 % which are separated from each other by a semicolon. Each substitution
5087 % descriptor has a locant number with a bond modifier and a substituent,
5088 % where these are separated with a double equality symbol.
5089 % \begin{verbatim}
5090 %
5091 % SUBSLIST: list of substituents
5092 %
5093 % for n = 1 to 7
5094 %
5095 % nD : exocyclic double bond at n-atom
5096 % n or nS : exocyclic single bond at n-atom
5097 % nA : alpha single bond at n-atom
5098 % nB : beta single bond at n-atom
5099 % nSA : alpha single bond at n-atom (boldface)
5100 % nSB : beta single bond at n-atom (dotted line)
5101 % nSa : alpha (not specified) single bond at n-atom
5102 % nSb : beta (not specified) single bond at n-atom
5103 % nW : terminal single bond (n=1 or 7)
5104 %
5105 % \end{verbatim}
5106 %
5107 % Several examples are shown as follows.
5108 % \begin{verbatim}
5109 % e.g.
5110 %
5111 % \heptamethylene{1==N}{1==Cl;2==F}
5112 % \heptamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
5113 % \end{verbatim}
5114 %
5115 % The macros |\heptamethylene| and |\heptamethylenei| are
5116 % based on a common inner macro |\@heptamethylene|,
5117 % the definition of which uses a picture environment.
5118 %
5119 % \begin{macro}{\heptamethylene}
5120 % \begin{macrocode}
5121 \def\heptamethylene{%
5122 \@ifnextchar[{\set@normaldirection\@heptamethylene[@}{%
5123 \set@normaldirection\@heptamethylene[]}}
5124 % \end{macrocode}
5125 % \end{macro}
5126 %
5127 % \begin{macro}{\heptamethylenei}
5128 % \begin{macrocode}
5129 \def\heptamethylenei{%
5130 \@ifnextchar[{\set@inversedirection\@heptamethylene[@}{%
5131 \set@inversedirection\@heptamethylene[]}}
5132 % \end{macrocode}
5133 % \end{macro}
5134 %
5135 % Inner temporary commands such as |\@@trinormorinv| and
5136 % |\@@dinormorinv| in the common |\@heptamethylene| macro
5137 % are replaced by active commands such as |\@@trimethylene| and
5138 % |\@@dimethylene|. They carry out the following unit processes.
5139 % \begin{enumerate}
5140 % \item Adjusting substitution site:
5141 % |\yltrimethyleneposition|
5142 % or |\yldimethyleneposition| for normal direction;
5143 % |\yltrimethyleneiposition|
5144 % or |\yldimethyleneiposition| for inverse direction.
5145 % \item Treating atom list,
5146 % placing outer skeletons, inner double bonds,
5147 % setting hetero atoms, and
5148 % placing substituents:
5149 % |\@@trimethylene|
5150 % or |\@@dimethylene| for normal direction;
5151 % |\@@trimethylenei|
5152 % or |\@@dimethylenei| for normal direction.
5153 % \end{enumerate}
5154 %
5155 % \begin{macro}{\@heptamethylene}
5156 % \begin{macrocode}
5157 \def\@heptamethylene[#1]#2#3{%
5158 \iniflag\iniatom%
5159 \@reset@ylsw%
5160 {\@linterchainswfalse%
5161 \@rinterchainswtrue%
5162 \@yltrinormorinv{#2}{#3}{0}{0}}%
5163 \if@ylsw \ifx\@@ylii\empty
5164 \def\@@ylii{0}\def\@@yli{0}\fi
5165 \else
5166 {\@rinterchainswtrue%
5167 \@linterchainswtrue%
5168 \@yltrinormorinv{#2}{#3}{1}{-2}}%
5169 \fi
5170 \if@ylsw \ifx\@@ylii\empty
5171 \def\@@ylii{-342}\def\@@yli{0}\fi
5172 \else
5173 {\@rinterchainswfalse%
5174 \@linterchainswtrue%
5175 \@yltrinormorinv{#2}{#3}{1}{-4}}%
5176 \fi
5177 \if@ylsw \ifx\@@ylii\empty
5178 \def\@@ylii{-684}\def\@@yli{0}\fi\fi
5179 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
5180 (1450,480)(-200,-180){heptamethylene}%2002/4/30 by S. Fujita
5181 (200,180)%
5182 {\reset@double%
5183 \@tfor\member:=#1\do{%
5184 \if\member a\relax
5185 \@adoublebondtrue
5186 \else\if\member b\relax
5187 \@bdoublebondtrue
5188 \else\if\member A\relax
5189 \@Adoublebondtrue
5190 \else\if\member B\relax
5191 \@Bdoublebondtrue
5192 %\else\if\member c\relax%dummy
5193 %\else\if\member C\relax%dummy
5194 %\else\if\member d\relax%dummy
5195 %\else\if\member D\relax%dummy
5196 %\else\if\member e\relax%dummy
5197 %\else\if\member E\relax%dummy
5198 %\else\if\member f\relax%dummy
5199 %\else\if\member F\relax%dummy
5200 %\else
5201 % \expandafter\twoCH@@R\member//%
5202 % \set@fusion@heptameth% for all bonds
5203 %\fi\fi\fi\fi\fi\fi\fi\fi
5204 \fi\fi\fi\fi}%
5205 \@wrongbdWatrue
5206 \@wrongbdWdtrue
5207 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
5208 {\reset@double%
5209 \@tfor\member:=#1\do{%
5210 \if\member c\relax
5211 \@adoublebondtrue
5212 \else\if\member d\relax
5213 \@bdoublebondtrue
5214 \else\if\member C\relax
5215 \@Adoublebondtrue
5216 \else\if\member D\relax
5217 \@Bdoublebondtrue
5218 \fi\fi\fi\fi}%
5219 \@wrongbdWatrue
5220 \@wrongbdWdtrue
5221 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
5222 {\reset@double%
5223 \@tfor\member:=#1\do{%
5224 \if\member e\relax
5225 \@adoublebondtrue
5226 \else\if\member E\relax
5227 \@Adoublebondtrue
5228 \else\if\member f\relax
5229 \@bdoublebondtrue
5230 \else\if\member F\relax
5231 \@Bdoublebondtrue
5232 \fi\fi\fi\fi}%
5233 \if@normorinvsw% inverse
5234 \@wrongbdWafalse
5235 \@wrongbdWdtrue
5236 \else%normal
5237 \@wrongbdWatrue
5238 \@wrongbdWdfalse
5239 \fi
5240 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
5241 %
5242 %originally for fused rings
5243 %shifted for coloring skeletal bond 2010/10/01
5244 %
5245 {\reset@double%
5246 \@tfor\member:=#1\do{%
5247 \if\member a\relax%dummy
5248 \else\if\member b\relax%dummy
5249 \else\if\member A\relax%dummy
5250 \else\if\member B\relax%dummy
5251 \else\if\member c\relax%dummy
5252 \else\if\member C\relax%dummy
5253 \else\if\member d\relax%dummy
5254 \else\if\member D\relax%dummy
5255 \else\if\member e\relax%dummy
5256 \else\if\member E\relax%dummy
5257 \else\if\member f\relax%dummy
5258 \else\if\member F\relax%dummy
5259 \else
5260 \expandafter\twoCH@@R\member//%
5261 \set@fusion@heptameth% for all bonds
5262 \fi\fi\fi\fi\fi\fi\fi\fi
5263 \fi\fi\fi\fi}}%
5264 \end{ShiftPicEnvB}%
5265 }% end of \@heptamethylene
5266 % \end{macrocode}
5267 % \end{macro}
5268 %
5269 % The inner command |\set@fusion@heptameth| is used for typesetting
5270 % a fused ring at each bond represented by |\@@tmpa|. Warnings
5271 % concerning mismatched ring-fusions are based on the command
5272 % |\FuseWarning|.
5273 %
5274 % \begin{macro}{\set@fusion@heptameth}
5275 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@heptameth}}
5276 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
5277 % \begin{macrocode}
5278 \def\set@fusion@heptameth{%
5279 % %%%%%%%%%%%%%%%%%%%%%
5280 % % inner bond fusion %
5281 % %%%%%%%%%%%%%%%%%%%%%
5282 \if@normorinvsw
5283 \if\@@tmpa e\relax%
5284 \putlratom{684}{103}{\@@tmpb}% % bond fused
5285 \FuseWarning{-171}{103}%
5286 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
5287 \else\if\@@tmpa E\relax%
5288 \putlratom{855}{0}{\@@tmpb}% % bond fused
5289 \FuseWarning{171}{-103}%
5290 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
5291 \else\if\@@tmpa f\relax%
5292 \putlratom{855}{0}{\@@tmpb}% % bond fused
5293 \FuseWarning{-171}{-103}%
5294 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
5295 \else\if\@@tmpa F\relax%
5296 \putlratom{1027}{103}{\@@tmpb}% % bond fused
5297 \FuseWarning{171}{103}%
5298 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
5299 \else
5300 \set@fusion@pentamethi
5301 \fi\fi\fi\fi
5302 \else
5303 \if\@@tmpa e\relax%
5304 \putlratom{684}{0}{\@@tmpb}% % bond fused
5305 \FuseWarning{-171}{-103}%
5306 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
5307 \else\if\@@tmpa E\relax%
5308 \putlratom{855}{103}{\@@tmpb}% % bond fused
5309 \FuseWarning{171}{103}%
5310 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
5311 \else\if\@@tmpa f\relax%
5312 \putlratom{855}{103}{\@@tmpb}% % bond fused
5313 \FuseWarning{-171}{103}%
5314 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
5315 \else\if\@@tmpa F\relax%
5316 \putlratom{1027}{0}{\@@tmpb}% % bond fused
5317 \FuseWarning{171}{-103}%
5318 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
5319 \else
5320 \set@fusion@pentameth
5321 \fi\fi\fi\fi
5322 \fi
5323 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
5324 }% end of the macro \set@fusion@heptameth
5325 % \end{macrocode}
5326 % \end{macro}
5327 %
5328 % \section{Octamethylenes of normal and inverse directions}
5329 %
5330 % Octamethylene and hetera derivatives are typeset with the commands
5331 % |\octamethylene| and |\octamethylenei|. The former macro
5332 % is to draw octamethylenes of normal direction, while the latter
5333 % is to draw ones of inverse directions.
5334 %
5335 % \begin{verbatim}
5336 % Normal direction:
5337 %
5338 % (bbb) ((bbb)) (((bbb)))
5339 % bbb ddd fff hhh
5340 % 2 4 6 8
5341 % a / ` b / c` d / e ` f /g
5342 % / ` / ` / ` /
5343 % 1 3 5 7
5344 % aaa ccc eee gggg
5345 % (aaa) (ccc) ((ccc))
5346 % ((aaa)) (((aaa)))
5347 %
5348 % Inverse direction:
5349 % (((aaa)))
5350 % (aaa) ((aaa)) ((ccc))
5351 % aaa ccc eee (ccc) ggg
5352 % 1 3 5 7
5353 % a ` b / ` c / d ` e /f ` g
5354 % ` / ` / ` / `
5355 % 2 4 6 8
5356 % bbb ddd fff hhh
5357 % (bbb) ((bbb)) (((bbb)))
5358 % \end{verbatim}
5359 %
5360 % The macros has two arguments |ATOMLIST| and |SUBSLIST|
5361 % as well as an optional argument |BONDLIST|.
5362 % \begin{verbatim}
5363 % \octamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
5364 % \octamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
5365 % \end{verbatim}
5366 %
5367 % The |BONDLIST| argument contains one character selected from
5368 % a to g (or A to G),
5369 % each of which indicates the presence of an inner (endcyclic) double
5370 % bond on the corresponding position. A lowercase letter is used
5371 % to typeset a double bond at the upper-side of an outer skeletal bond,
5372 % while an uppercase letter typesets a double bond at the lower-side of
5373 % an outer skeletal bond.
5374 % (Note that the option `A' represents an aromatic circle in
5375 % commands |\sixheterov| etc.)
5376 %
5377 % \begin{verbatim}
5378 % BONDLIST =
5379 %
5380 % [] or none : no double bond
5381 % a : 1,2-double bond
5382 % A : 1,2-double bond in an opposite side
5383 % b : 2,3-double bond
5384 % B : 2,3-double bond in an opposite side
5385 % c : 3,4-double bond
5386 % C : 3,4-double bond in an opposite side
5387 % d : 4,5-double bond
5388 % D : 4,5-double bond in an opposite side
5389 % e : 5,6-double bond
5390 % E : 5,6-double bond in an opposite side
5391 % f : 6,7-double bond
5392 % F : 6,7-double bond in an opposite side
5393 % g : 7,8-double bond
5394 % G : 7,8-double bond in an opposite side
5395 % \end{verbatim}
5396 %
5397 % The |ATOMLIST| argument contains one or more heteroatom descriptors
5398 % which are separated from each other by a semicolon. Each heteroatom
5399 % descriptor consists of a locant number and a heteroatom,
5400 % where these are separated with a double equality symbol.
5401 %
5402 % \begin{verbatim}
5403 %
5404 % ATOMLIST: list of heteroatoms (max 8 atoms)
5405 %
5406 % for n = 1 to 8
5407 %
5408 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
5409 % e.g. 1==N for N at 1-position
5410 % \end{verbatim}
5411 %
5412 % The |SUBSLIST| argument contains one or more substitution descriptors
5413 % which are separated from each other by a semicolon. Each substitution
5414 % descriptor has a locant number with a bond modifier and a substituent,
5415 % where these are separated with a double equality symbol.
5416 % \begin{verbatim}
5417 %
5418 % SUBSLIST: list of substituents
5419 %
5420 % for n = 1 to 8
5421 %
5422 % nD : exocyclic double bond at n-atom
5423 % n or nS : exocyclic single bond at n-atom
5424 % nA : alpha single bond at n-atom
5425 % nB : beta single bond at n-atom
5426 % nSA : alpha single bond at n-atom (boldface)
5427 % nSB : beta single bond at n-atom (dotted line)
5428 % nSa : alpha (not specified) single bond at n-atom
5429 % nSb : beta (not specified) single bond at n-atom
5430 % nW : terminal single bond (n=1 or 8)
5431 %
5432 % \end{verbatim}
5433 %
5434 % Several examples are shown as follows.
5435 % \begin{verbatim}
5436 % e.g.
5437 %
5438 % \octamethylene{1==N}{1==Cl;2==F}
5439 % \octamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
5440 % \end{verbatim}
5441 %
5442 % The macros |\octamethylene| and |\octamethylenei| are
5443 % based on a common inner macro |\@octamethylene|,
5444 % the definition of which uses a picture environment.
5445 %
5446 % \begin{macro}{\octamethylene}
5447 % \begin{macrocode}
5448 \def\octamethylene{%
5449 \@ifnextchar[{\set@normaldirection\@octamethylene[@}{%
5450 \set@normaldirection\@octamethylene[]}}
5451 % \end{macrocode}
5452 % \end{macro}
5453 %
5454 % \begin{macro}{\octamethylenei}
5455 % \begin{macrocode}
5456 \def\octamethylenei{%
5457 \@ifnextchar[{\set@inversedirection\@octamethylene[@}{%
5458 \set@inversedirection\@octamethylene[]}}
5459 % \end{macrocode}
5460 % \end{macro}
5461 %
5462 % Inner temporary commands such as |\@@trinormorinv| and
5463 % |\@@dinormorinv| in the common |\@octamethylene| macro
5464 % are replaced by active commands such as |\@@trimethylene| and
5465 % |\@@dimethylene|. They carry out the following unit processes.
5466 % \begin{enumerate}
5467 % \item Adjusting substitution site:
5468 % |\yltrimethyleneposition|
5469 % or |\yldimethyleneposition| for normal direction;
5470 % |\yltrimethyleneiposition|
5471 % or |\yldimethyleneiposition| for inverse direction.
5472 % \item Treating atom list,
5473 % placing outer skeletons, inner double bonds,
5474 % setting hetero atoms, and
5475 % placing substituents:
5476 % |\@@trimethylene|
5477 % or |\@@dimethylene| for normal direction;
5478 % |\@@trimethylenei|
5479 % or |\@@dimethylenei| for normal direction.
5480 % \end{enumerate}
5481 %
5482 % \begin{macro}{\@octamethylene}
5483 % \begin{macrocode}
5484 \def\@octamethylene[#1]#2#3{%
5485 \iniflag\iniatom%
5486 \@reset@ylsw%
5487 {\@linterchainswfalse%
5488 \@rinterchainswtrue%
5489 \@yltrinormorinv{#2}{#3}{0}{0}}%
5490 \if@ylsw \ifx\@@ylii\empty
5491 \def\@@ylii{0}\def\@@yli{0}\fi
5492 \else
5493 {\@rinterchainswtrue%
5494 \@linterchainswtrue%
5495 \@yltrinormorinv{#2}{#3}{1}{-2}}%
5496 \fi
5497 \if@ylsw \ifx\@@ylii\empty
5498 \def\@@ylii{-342}\def\@@yli{0}\fi
5499 \else
5500 {\@rinterchainswtrue%
5501 \@linterchainswtrue%
5502 \@yltrinormorinv{#2}{#3}{1}{-4}}%
5503 \fi
5504 \if@ylsw \ifx\@@ylii\empty
5505 \def\@@ylii{-684}\def\@@yli{0}\fi
5506 \else
5507 {\@rinterchainswfalse%
5508 \@linterchainswtrue%
5509 \@yldinormorinv{#2}{#3}{1}{-6}}%
5510 \fi
5511 \if@ylsw \ifx\@@ylii\empty
5512 \def\@@ylii{-1026}\def\@@yli{0}\fi\fi
5513 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
5514 (1620,480)(-200,-180){octamethylene}%2002/4/30 by S. Fujita
5515 (200,180)%
5516 {\reset@double%
5517 \@tfor\member:=#1\do{%
5518 \if\member a\relax
5519 \@adoublebondtrue
5520 \else\if\member b\relax
5521 \@bdoublebondtrue
5522 \else\if\member A\relax
5523 \@Adoublebondtrue
5524 \else\if\member B\relax
5525 \@Bdoublebondtrue
5526 %\else\if\member c\relax%dummy
5527 %\else\if\member C\relax%dummy
5528 %\else\if\member d\relax%dummy
5529 %\else\if\member D\relax%dummy
5530 %\else\if\member e\relax%dummy
5531 %\else\if\member E\relax%dummy
5532 %\else\if\member f\relax%dummy
5533 %\else\if\member F\relax%dummy
5534 %\else\if\member g\relax%dummy
5535 %\else\if\member G\relax%dummy
5536 %\else
5537 % \expandafter\twoCH@@R\member//%
5538 % \set@fusion@octameth% for all bonds
5539 %\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5540 \fi\fi\fi\fi}%
5541 \@wrongbdWatrue
5542 \@wrongbdWdtrue
5543 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
5544 {\reset@double%
5545 \@tfor\member:=#1\do{%
5546 \if\member c\relax
5547 \@adoublebondtrue
5548 \else\if\member d\relax
5549 \@bdoublebondtrue
5550 \else\if\member C\relax
5551 \@Adoublebondtrue
5552 \else\if\member D\relax
5553 \@Bdoublebondtrue
5554 \fi\fi\fi\fi}%
5555 \@wrongbdWatrue
5556 \@wrongbdWdtrue
5557 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
5558 {\reset@double%
5559 \@tfor\member:=#1\do{%
5560 \if\member e\relax
5561 \@adoublebondtrue
5562 \else\if\member E\relax
5563 \@Adoublebondtrue
5564 \else\if\member f\relax
5565 \@bdoublebondtrue
5566 \else\if\member F\relax
5567 \@Bdoublebondtrue
5568 \fi\fi\fi\fi}%
5569 \@wrongbdWatrue
5570 \@wrongbdWdtrue
5571 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
5572 {\reset@double%
5573 \@tfor\member:=#1\do{%
5574 \if\member g\relax
5575 \@adoublebondtrue
5576 \else\if\member G\relax
5577 \@Adoublebondtrue
5578 \fi\fi}%
5579 \if@normorinvsw% inverse
5580 \@wrongbdWatrue
5581 \@wrongbdWdfalse
5582 \else% normal
5583 \@wrongbdWafalse
5584 \@wrongbdWdtrue
5585 \fi
5586 \Put@Direct(1026,0){\@@dinormorinv{#2}{#3}{1}{-6}}}%
5587 %
5588 %originally for fused rings
5589 %shifted for coloring skeletal bond 2010/10/01
5590 %
5591 {\reset@double%
5592 \@tfor\member:=#1\do{%
5593 \if\member a\relax%dummy
5594 \else\if\member b\relax%dummy
5595 \else\if\member A\relax%dummy
5596 \else\if\member B\relax%dummy
5597 \else\if\member c\relax%dummy
5598 \else\if\member C\relax%dummy
5599 \else\if\member d\relax%dummy
5600 \else\if\member D\relax%dummy
5601 \else\if\member e\relax%dummy
5602 \else\if\member E\relax%dummy
5603 \else\if\member f\relax%dummy
5604 \else\if\member F\relax%dummy
5605 \else\if\member g\relax%dummy
5606 \else\if\member G\relax%dummy
5607 \else
5608 \expandafter\twoCH@@R\member//%
5609 \set@fusion@octameth% for all bonds
5610 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5611 \fi\fi\fi\fi}}%
5612 \end{ShiftPicEnvB}%
5613 }% end of \@octamethylene
5614 % \end{macrocode}
5615 % \end{macro}
5616 %
5617 % The inner command |\set@fusion@octameth| is used for typesetting
5618 % a fused ring at each bond represented by |\@@tmpa|. Warnings
5619 % concerning mismatched ring-fusions are based on the command
5620 % |\FuseWarning|.
5621 %
5622 % \begin{macro}{\set@fusion@octameth}
5623 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@octameth}}
5624 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
5625 % \begin{macrocode}
5626 \def\set@fusion@octameth{%
5627 % %%%%%%%%%%%%%%%%%%%%%
5628 % % inner bond fusion %
5629 % %%%%%%%%%%%%%%%%%%%%%
5630 \if@normorinvsw
5631 \if\@@tmpa e\relax%
5632 \putlratom{684}{103}{\@@tmpb}% % bond fused
5633 \FuseWarning{-171}{103}%
5634 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
5635 \else\if\@@tmpa E\relax%
5636 \putlratom{855}{0}{\@@tmpb}% % bond fused
5637 \FuseWarning{171}{-103}%
5638 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
5639 \else\if\@@tmpa f\relax%
5640 \putlratom{855}{0}{\@@tmpb}% % bond fused
5641 \FuseWarning{-171}{-103}%
5642 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
5643 \else\if\@@tmpa F\relax%
5644 \putlratom{1027}{103}{\@@tmpb}% % bond fused
5645 \FuseWarning{171}{103}%
5646 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
5647 \else\if\@@tmpa g\relax%
5648 \putlratom{1027}{103}{\@@tmpb}% % bond fused
5649 \FuseWarning{-171}{103}%
5650 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
5651 \else\if\@@tmpa G\relax%
5652 \putlratom{1198}{0}{\@@tmpb}% % bond fused
5653 \FuseWarning{171}{-103}%
5654 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
5655 \else
5656 \set@fusion@pentamethi
5657 \fi\fi\fi\fi\fi\fi
5658 \else
5659 \if\@@tmpa e\relax%
5660 \putlratom{684}{0}{\@@tmpb}% % bond fused
5661 \FuseWarning{-171}{-103}%
5662 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
5663 \else\if\@@tmpa E\relax%
5664 \putlratom{855}{103}{\@@tmpb}% % bond fused
5665 \FuseWarning{171}{103}%
5666 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
5667 \else\if\@@tmpa f\relax%
5668 \putlratom{855}{103}{\@@tmpb}% % bond fused
5669 \FuseWarning{-171}{103}%
5670 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
5671 \else\if\@@tmpa F\relax%
5672 \putlratom{1027}{0}{\@@tmpb}% % bond fused
5673 \FuseWarning{171}{-103}%
5674 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
5675 \else\if\@@tmpa g\relax%
5676 \putlratom{1027}{0}{\@@tmpb}% % bond fused
5677 \FuseWarning{-171}{-103}%
5678 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
5679 \else\if\@@tmpa G\relax%
5680 \putlratom{1198}{103}{\@@tmpb}% % bond fused
5681 \FuseWarning{171}{103}%
5682 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
5683 \else
5684 \set@fusion@pentameth
5685 \fi\fi\fi\fi\fi\fi
5686 \fi
5687 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
5688 }% end of the macro \set@fusion@octameth
5689 % \end{macrocode}
5690 % \end{macro}
5691 %
5692 % \section{Nonamethylenes of normal and inverse direction}
5693 %
5694 % Nonamethylene and hetera derivatives are typeset with the commands
5695 % |\nonamethylene| and |\nonamethylenei|. The former macro
5696 % is to draw nonamethylenes of normal direction, while the latter
5697 % is to draw ones of inverse directions.
5698 %
5699 % \begin{verbatim}
5700 % Normal direction:
5701 %
5702 % (bbb) ((bbb)) (((bbb)))
5703 % bbb ddd fff hhh
5704 % 2 4 6 8
5705 % a / ` b / c` d / e ` f /g` h
5706 % / ` / ` / ` / `
5707 % 1 3 5 7 9
5708 % aaa ccc eee gggg (((ccc)))
5709 % (aaa) (ccc) ((ccc))
5710 % ((aaa)) (((aaa)))
5711 %
5712 % Inverse direction:
5713 % (((aaa)))
5714 % (aaa) ((aaa)) ((ccc))
5715 % aaa ccc eee (ccc) ggg (((ccc)))
5716 % 1 3 5 7 9
5717 % a ` b / ` c / d ` e /f ` g / h
5718 % ` / ` / ` / ` /
5719 % 2 4 6 8
5720 % bbb ddd fff hhh
5721 % (bbb) ((bbb)) (((bbb)))
5722 % (aaa) ((aaa)) ((ccc))
5723 % \end{verbatim}
5724 %
5725 % The macros have two arguments |ATOMLIST| and |SUBSLIST|
5726 % as well as an optional argument |BONDLIST|.
5727 %
5728 % \begin{verbatim}
5729 % \nonamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
5730 % \nonamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
5731 % \end{verbatim}
5732 %
5733 % The |BONDLIST| argument contains one character selected from
5734 % a to h (or A to H),
5735 % each of which indicates the presence of an inner (endcyclic) double
5736 % bond on the corresponding position. A lowercase letter is used
5737 % to typeset a double bond at the upper-side of an outer skeletal bond,
5738 % while an uppercase letter typesets a double bond at the lower-side of
5739 % an outer skeletal bond.
5740 % (Note that the option `A' represents an aromatic circle in
5741 % commands |\sixheterov| etc.)
5742 %
5743 % \begin{verbatim}
5744 % BONDLIST =
5745 %
5746 % [] or none : no double bond
5747 % a : 1,2-double bond
5748 % A : 1,2-double bond in an opposite side
5749 % b : 2,3-double bond
5750 % B : 2,3-double bond in an opposite side
5751 % c : 3,4-double bond
5752 % C : 3,4-double bond in an opposite side
5753 % d : 4,5-double bond
5754 % D : 4,5-double bond in an opposite side
5755 % e : 5,6-double bond
5756 % E : 5,6-double bond in an opposite side
5757 % f : 6,7-double bond
5758 % F : 6,7-double bond in an opposite side
5759 % g : 7,8-double bond
5760 % G : 7,8-double bond in an opposite side
5761 % h : 8,9-double bond
5762 % H : 8,9-double bond in an opposite side
5763 % \end{verbatim}
5764 %
5765 % The |ATOMLIST| argument contains one or more heteroatom descriptors
5766 % which are separated from each other by a semicolon. Each heteroatom
5767 % descriptor consists of a locant number and a heteroatom,
5768 % where these are separated with a double equality symbol.
5769 %
5770 % \begin{verbatim}
5771 %
5772 % ATOMLIST: list of heteroatoms (max 9 atoms)
5773 %
5774 % for n = 1 to 9
5775 %
5776 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
5777 % e.g. 1==N for N at 1-position
5778 % \end{verbatim}
5779 %
5780 % The |SUBSLIST| argument contains one or more substitution descriptors
5781 % which are separated from each other by a semicolon. Each substitution
5782 % descriptor has a locant number with a bond modifier and a substituent,
5783 % where these are separated with a double equality symbol.
5784 % \begin{verbatim}
5785 %
5786 % SUBSLIST: list of substituents
5787 %
5788 % for n = 1 to 9
5789 %
5790 % nD : exocyclic double bond at n-atom
5791 % n or nS : exocyclic single bond at n-atom
5792 % nA : alpha single bond at n-atom
5793 % nB : beta single bond at n-atom
5794 % nSA : alpha single bond at n-atom (boldface)
5795 % nSB : beta single bond at n-atom (dotted line)
5796 % nSa : alpha (not specified) single bond at n-atom
5797 % nSb : beta (not specified) single bond at n-atom
5798 % nW : terminal single bond (n=1 or 9)
5799 %
5800 % \end{verbatim}
5801 %
5802 % Several examples are shown as follows.
5803 % \begin{verbatim}
5804 % e.g.
5805 %
5806 % \nonamethylene{1==N}{1==Cl;2==F}
5807 % \nonamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
5808 % \end{verbatim}
5809 %
5810 % The macros |\nonamethylene| and |\nonamethylenei| are
5811 % based on a common inner macro |\@nonamethylene|,
5812 % the definition of which uses a picture environment.
5813 %
5814 % \begin{macro}{\nonamethylene}
5815 % \begin{macrocode}
5816 \def\nonamethylene{%
5817 \@ifnextchar[{\set@normaldirection\@nonamethylene[@}{%
5818 \set@normaldirection\@nonamethylene[]}}
5819 % \end{macrocode}
5820 % \end{macro}
5821
5822 % \begin{macro}{\nonamethylenei}
5823 % \begin{macrocode}
5824 \def\nonamethylenei{%
5825 \@ifnextchar[{\set@inversedirection\@nonamethylene[@}{%
5826 \set@inversedirection\@nonamethylene[]}}
5827 % \end{macrocode}
5828 % \end{macro}
5829 %
5830 % Inner temporary commands such as |\@@trinormorinv| and
5831 % |\@@dinormorinv| in the common |\@nonamethylene| macro
5832 % are replaced by active commands such as |\@@trimethylene| and
5833 % |\@@dimethylene|. They carry out the following unit processes.
5834 % \begin{enumerate}
5835 % \item Adjusting substitution site:
5836 % |\yltrimethyleneposition|
5837 % or |\yldimethyleneposition| for normal direction;
5838 % |\yltrimethyleneiposition|
5839 % or |\yldimethyleneiposition| for inverse direction.
5840 % \item Treating atom list,
5841 % placing outer skeletons, inner double bonds,
5842 % setting hetero atoms, and
5843 % placing substituents:
5844 % |\@@trimethylene|
5845 % or |\@@dimethylene| for normal direction;
5846 % |\@@trimethylenei|
5847 % or |\@@dimethylenei| for normal direction.
5848 % \end{enumerate}
5849 %
5850 % \begin{macro}{\@nonamethylene}
5851 % \begin{macrocode}
5852 \def\@nonamethylene[#1]#2#3{%
5853 \iniflag\iniatom%
5854 \@reset@ylsw%
5855 {\@linterchainswfalse%
5856 \@rinterchainswtrue%
5857 \@yltrinormorinv{#2}{#3}{0}{0}}%
5858 \if@ylsw \ifx\@@ylii\empty
5859 \def\@@ylii{0}\def\@@yli{0}\fi
5860 \else
5861 {\@rinterchainswtrue%
5862 \@linterchainswtrue%
5863 \@yltrinormorinv{#2}{#3}{1}{-2}}%
5864 \fi
5865 \if@ylsw \ifx\@@ylii\empty
5866 \def\@@ylii{-342}\def\@@yli{0}\fi
5867 \else
5868 {\@rinterchainswtrue%
5869 \@linterchainswtrue%
5870 \@yltrinormorinv{#2}{#3}{1}{-4}}%
5871 \fi
5872 \if@ylsw \ifx\@@ylii\empty
5873 \def\@@ylii{-684}\def\@@yli{0}\fi
5874 \else
5875 {\@rinterchainswfalse%
5876 \@linterchainswtrue%
5877 \@yltrinormorinv{#2}{#3}{1}{-6}}%
5878 \fi
5879 \if@ylsw \ifx\@@ylii\empty
5880 \def\@@ylii{-1026}\def\@@yli{0}\fi\fi
5881 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
5882 (1790,480)(-200,-180){nonamethylene}%2002/4/30 by S. Fujita
5883 (200,180)%
5884 {\reset@double%
5885 \@tfor\member:=#1\do{%
5886 \if\member a\relax
5887 \@adoublebondtrue
5888 \else\if\member b\relax
5889 \@bdoublebondtrue
5890 \else\if\member A\relax
5891 \@Adoublebondtrue
5892 \else\if\member B\relax
5893 \@Bdoublebondtrue
5894 %\else\if\member c\relax%dummy
5895 %\else\if\member C\relax%dummy
5896 %\else\if\member d\relax%dummy
5897 %\else\if\member D\relax%dummy
5898 %\else\if\member e\relax%dummy
5899 %\else\if\member E\relax%dummy
5900 %\else\if\member f\relax%dummy
5901 %\else\if\member F\relax%dummy
5902 %\else\if\member g\relax%dummy
5903 %\else\if\member G\relax%dummy
5904 %\else\if\member h\relax%dummy
5905 %\else\if\member H\relax%dummy
5906 %\else
5907 % \expandafter\twoCH@@R\member//%
5908 % \set@fusion@nonameth% for all bonds
5909 %\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5910 \fi\fi\fi\fi}%
5911 \@wrongbdWatrue
5912 \@wrongbdWdtrue
5913 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
5914 {\reset@double%
5915 \@tfor\member:=#1\do{%
5916 \if\member c\relax
5917 \@adoublebondtrue
5918 \else\if\member d\relax
5919 \@bdoublebondtrue
5920 \else\if\member C\relax
5921 \@Adoublebondtrue
5922 \else\if\member D\relax
5923 \@Bdoublebondtrue
5924 \fi\fi\fi\fi}%
5925 \@wrongbdWatrue
5926 \@wrongbdWdtrue
5927 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
5928 {\reset@double%
5929 \@tfor\member:=#1\do{%
5930 \if\member e\relax
5931 \@adoublebondtrue
5932 \else\if\member E\relax
5933 \@Adoublebondtrue
5934 \else\if\member f\relax
5935 \@bdoublebondtrue
5936 \else\if\member F\relax
5937 \@Bdoublebondtrue
5938 \fi\fi\fi\fi}%
5939 \@wrongbdWatrue
5940 \@wrongbdWdtrue
5941 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
5942 {\reset@double%
5943 \@tfor\member:=#1\do{%
5944 \if\member g\relax
5945 \@adoublebondtrue
5946 \else\if\member G\relax
5947 \@Adoublebondtrue
5948 \else\if\member h\relax
5949 \@bdoublebondtrue
5950 \else\if\member H\relax
5951 \@Bdoublebondtrue
5952 \fi\fi\fi\fi}%
5953 \if@normorinvsw% inverse
5954 \@wrongbdWafalse
5955 \@wrongbdWdtrue
5956 \else% normal
5957 \@wrongbdWatrue
5958 \@wrongbdWdfalse
5959 \fi
5960 \Put@Direct(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
5961 %
5962 %originally for fused rings
5963 %shifted for coloring skeletal bond 2010/10/01
5964 %
5965 {\reset@double%
5966 \@tfor\member:=#1\do{%
5967 \if\member a\relax%dummy
5968 \else\if\member b\relax%dummy
5969 \else\if\member A\relax%dummy
5970 \else\if\member B\relax%dummy
5971 \else\if\member c\relax%dummy
5972 \else\if\member C\relax%dummy
5973 \else\if\member d\relax%dummy
5974 \else\if\member D\relax%dummy
5975 \else\if\member e\relax%dummy
5976 \else\if\member E\relax%dummy
5977 \else\if\member f\relax%dummy
5978 \else\if\member F\relax%dummy
5979 \else\if\member g\relax%dummy
5980 \else\if\member G\relax%dummy
5981 \else\if\member h\relax%dummy
5982 \else\if\member H\relax%dummy
5983 \else
5984 \expandafter\twoCH@@R\member//%
5985 \set@fusion@nonameth% for all bonds
5986 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5987 \fi\fi\fi\fi}}%
5988 \end{ShiftPicEnvB}%
5989 }% end of \@nonamethylene
5990 % \end{macrocode}
5991 % \end{macro}
5992 %
5993 % The inner command |\set@fusion@nonameth| is used for typesetting
5994 % a fused ring at each bond represented by |\@@tmpa|. Warnings
5995 % concerning mismatched ring-fusions are based on the command
5996 % |\FuseWarning|.
5997 %
5998 % \begin{macro}{\set@fusion@nonameth}
5999 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@nonameth}}
6000 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
6001 % \begin{macrocode}
6002 \def\set@fusion@nonameth{%
6003 % %%%%%%%%%%%%%%%%%%%%%
6004 % % inner bond fusion %
6005 % %%%%%%%%%%%%%%%%%%%%%
6006 \if@normorinvsw
6007 \if\@@tmpa h\relax%
6008 \putlratom{1198}{0}{\@@tmpb}% % bond fused
6009 \FuseWarning{-171}{-103}%
6010 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
6011 \else\if\@@tmpa H\relax%
6012 \putlratom{1369}{103}{\@@tmpb}% % bond fused
6013 \FuseWarning{171}{103}%
6014 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
6015 \else
6016 \set@fusion@octameth
6017 \fi\fi
6018 \else
6019 \if\@@tmpa h\relax%
6020 \putlratom{1198}{103}{\@@tmpb}% % bond fused
6021 \FuseWarning{-171}{103}%
6022 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
6023 \else\if\@@tmpa H\relax%
6024 \putlratom{1369}{0}{\@@tmpb}% % bond fused
6025 \FuseWarning{171}{-103}%
6026 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
6027 \else
6028 \set@fusion@octameth
6029 \fi\fi
6030 \fi
6031 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
6032 }% end of the macro \set@fusion@nonameth
6033 % \end{macrocode}
6034 % \end{macro}
6035 %
6036 % \section{Decamethylenes of normal and inverse directions}
6037 %
6038 % Decamethylene and hetera derivatives are typeset with the commands
6039 % |\decamethylene| and |\decamethylenei|. The former macro
6040 % is to draw decamethylenes of normal direction, while the latter
6041 % is to draw ones of inverse directions.
6042 %
6043 % \begin{verbatim}
6044 % Normal direction:
6045 %
6046 % (bbb) ((bbb)) (((bbb)))
6047 % bbb ddd fff hhh <bbb>
6048 % 2 4 6 8 10
6049 % a / ` b / c` d / e ` f /g ` h / i
6050 % / ` / ` / ` / ` /
6051 % 1 3 5 7 9
6052 % aaa ccc eee gggg (((ccc)))
6053 % (aaa) (ccc) ((ccc)) <aaa>
6054 % ((aaa)) (((aaa)))
6055 %
6056 % Inverse direction:
6057 % (((aaa)))
6058 % (aaa) ((aaa)) ((ccc)) <aaa>
6059 % aaa ccc eee (ccc) ggg (((ccc)))
6060 % 1 3 5 7 9
6061 % a ` b / ` c / d ` e /f ` g / h ` i
6062 % ` / ` / ` / ` / `
6063 % 2 4 6 8 10
6064 % bbb ddd fff hhh <bbb>
6065 % (bbb) ((bbb)) (((bbb)))
6066 % \end{verbatim}
6067 %
6068 % The macros have two arguments |ATOMLIST| and |SUBSLIST|
6069 % as well as an optional argument |BONDLIST|.
6070 % \begin{verbatim}
6071 % \decamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
6072 % \decamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
6073 % \end{verbatim}
6074 %
6075 % The |BONDLIST| argument contains one character selected from
6076 % a to i (or A to I),
6077 % each of which indicates the presence of an inner (endcyclic) double
6078 % bond on the corresponding position. A lowercase letter is used
6079 % to typeset a double bond at the upper-side of an outer skeletal bond,
6080 % while an uppercase letter typesets a double bond at the lower-side of
6081 % an outer skeletal bond.
6082 % (Note that the option `A' represents an aromatic circle in
6083 % commands |\sixheterov| etc.)
6084 %
6085 % \begin{verbatim}
6086 % BONDLIST =
6087 %
6088 % [] or none : no double bond
6089 % a : 1,2-double bond
6090 % A : 1,2-double bond in an opposite side
6091 % b : 2,3-double bond
6092 % B : 2,3-double bond in an opposite side
6093 % c : 3,4-double bond
6094 % C : 3,4-double bond in an opposite side
6095 % d : 4,5-double bond
6096 % D : 4,5-double bond in an opposite side
6097 % e : 5,6-double bond
6098 % E : 5,6-double bond in an opposite side
6099 % f : 6,7-double bond
6100 % F : 6,7-double bond in an opposite side
6101 % g : 7,8-double bond
6102 % G : 7,8-double bond in an opposite side
6103 % h : 8,9-double bond
6104 % H : 8,9-double bond in an opposite side
6105 % i : 9,10-double bond
6106 % I : 9,10-double bond in an opposite side
6107 % \end{verbatim}
6108 %
6109 % The |ATOMLIST| argument contains one or more heteroatom descriptors
6110 % which are separated from each other by a semicolon. Each heteroatom
6111 % descriptor consists of a locant number and a heteroatom,
6112 % where these are separated with a double equality symbol.
6113 %
6114 % \begin{verbatim}
6115 %
6116 % ATOMLIST: list of heteroatoms (max 10 atoms)
6117 %
6118 % for n = 1 to 10
6119 %
6120 % n==? : Hetero atom, e.g. N, O, etc. at n-position,
6121 % e.g. 1==N for N at 1-position
6122 % \end{verbatim}
6123 %
6124 % The |SUBSLIST| argument contains one or more substitution descriptors
6125 % which are separated from each other by a semicolon. Each substitution
6126 % descriptor has a locant number with a bond modifier and a substituent,
6127 % where these are separated with a double equality symbol.
6128 % \begin{verbatim}
6129 %
6130 % SUBSLIST: list of substituents
6131 %
6132 % for n = 1 to 10
6133 %
6134 % nD : exocyclic double bond at n-atom
6135 % n or nS : exocyclic single bond at n-atom
6136 % nA : alpha single bond at n-atom
6137 % nB : beta single bond at n-atom
6138 % nSA : alpha single bond at n-atom (boldface)
6139 % nSB : beta single bond at n-atom (dotted line)
6140 % nSa : alpha (not specified) single bond at n-atom
6141 % nSb : beta (not specified) single bond at n-atom
6142 % nW : terminal single bond (n=1 or 10)
6143 %
6144 % \end{verbatim}
6145 %
6146 % Several examples are shown as follows.
6147 % \begin{verbatim}
6148 % e.g.
6149 %
6150 % \decamethylene{1==N}{1==Cl;2==F}
6151 % \decamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
6152 % \end{verbatim}
6153 %
6154 % The macros |\decamethylene| and |\decamethylenei| are
6155 % based on a common inner macro |\@decamethylene|,
6156 % the definition of which uses a picture environment.
6157 % \begin{macro}{\decamethylene}
6158 % \begin{macrocode}
6159 \def\decamethylene{%
6160 \@ifnextchar[{\set@normaldirection\@decamethylene[@}{%
6161 \set@normaldirection\@decamethylene[]}}
6162 % \end{macrocode}
6163 % \end{macro}
6164 %
6165 % \begin{macro}{\decamethylenei}
6166 % \begin{macrocode}
6167 \def\decamethylenei{%
6168 \@ifnextchar[{\set@inversedirection\@decamethylene[@}{%
6169 \set@inversedirection\@decamethylene[]}}
6170 % \end{macrocode}
6171 % \end{macro}
6172 %
6173 % Inner temporary commands such as |\@@trinormorinv| and
6174 % |\@@dinormorinv| in the common |\@decamethylene| macro
6175 % are replaced by active commands such as |\@@trimethylene| and
6176 % |\@@dimethylene|. They carry out the following unit processes.
6177 % \begin{enumerate}
6178 % \item Adjusting substitution site:
6179 % |\yltrimethyleneposition|
6180 % or |\yldimethyleneposition| for normal direction;
6181 % |\yltrimethyleneiposition|
6182 % or |\yldimethyleneiposition| for inverse direction.
6183 % \item Treating atom list,
6184 % placing outer skeletons, inner double bonds,
6185 % setting hetero atoms, and
6186 % placing substituents:
6187 % |\@@trimethylene|
6188 % or |\@@dimethylene| for normal direction;
6189 % |\@@trimethylenei|
6190 % or |\@@dimethylenei| for normal direction.
6191 % \end{enumerate}
6192 %
6193 % \begin{macro}{\@decamethylene}
6194 % \begin{macrocode}
6195 \def\@decamethylene[#1]#2#3{%
6196 \iniflag\iniatom%
6197 \@reset@ylsw%
6198 {\@linterchainswfalse%
6199 \@rinterchainswtrue%
6200 \@yltrinormorinv{#2}{#3}{0}{0}}%
6201 \if@ylsw \ifx\@@ylii\empty
6202 \def\@@ylii{0}\def\@@yli{0}\fi
6203 \else
6204 {\@rinterchainswtrue%
6205 \@linterchainswtrue%
6206 \@yltrinormorinv{#2}{#3}{1}{-2}}%
6207 \fi
6208 \if@ylsw \ifx\@@ylii\empty
6209 \def\@@ylii{-342}\def\@@yli{0}\fi
6210 \else
6211 {\@rinterchainswtrue%
6212 \@linterchainswtrue%
6213 \@yltrinormorinv{#2}{#3}{1}{-4}}%
6214 \fi
6215 \if@ylsw \ifx\@@ylii\empty
6216 \def\@@ylii{-684}\def\@@yli{0}\fi
6217 \else
6218 {\@rinterchainswtrue%
6219 \@linterchainswtrue%
6220 \@yltrinormorinv{#2}{#3}{1}{-6}}%
6221 \fi
6222 \if@ylsw \ifx\@@ylii\empty
6223 \def\@@ylii{-1026}\def\@@yli{0}\fi
6224 \else
6225 {\@rinterchainswfalse%
6226 \@linterchainswtrue%
6227 \@yldinormorinv{#2}{#3}{1}{-8}}%
6228 \fi
6229 \if@ylsw \ifx\@@ylii\empty
6230 \def\@@ylii{-1368}\def\@@yli{0}\fi\fi
6231 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
6232 (1960,480)(-200,-180){decamethylene}%2002/4/30 by S. Fujita
6233 (200,180)%
6234 {\reset@double%
6235 \@tfor\member:=#1\do{%
6236 \if\member a\relax
6237 \@adoublebondtrue
6238 \else\if\member b\relax
6239 \@bdoublebondtrue
6240 \else\if\member A\relax
6241 \@Adoublebondtrue
6242 \else\if\member B\relax
6243 \@Bdoublebondtrue
6244 %\else\if\member c\relax%dummy
6245 %\else\if\member C\relax%dummy
6246 %\else\if\member d\relax%dummy
6247 %\else\if\member D\relax%dummy
6248 %\else\if\member e\relax%dummy
6249 %\else\if\member E\relax%dummy
6250 %\else\if\member f\relax%dummy
6251 %\else\if\member F\relax%dummy
6252 %\else\if\member g\relax%dummy
6253 %\else\if\member G\relax%dummy
6254 %\else\if\member h\relax%dummy
6255 %\else\if\member H\relax%dummy
6256 %\else\if\member i\relax%dummy
6257 %\else\if\member I\relax%dummy
6258 %\else
6259 % \expandafter\twoCH@@R\member//%
6260 % \set@fusion@decameth% for all bonds
6261 %\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
6262 \fi\fi\fi\fi}%
6263 \@wrongbdWatrue
6264 \@wrongbdWdtrue
6265 \Put@Direct(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
6266 {\reset@double%
6267 \@tfor\member:=#1\do{%
6268 \if\member c\relax
6269 \@adoublebondtrue
6270 \else\if\member d\relax
6271 \@bdoublebondtrue
6272 \else\if\member C\relax
6273 \@Adoublebondtrue
6274 \else\if\member D\relax
6275 \@Bdoublebondtrue
6276 \fi\fi\fi\fi}%
6277 \@wrongbdWatrue
6278 \@wrongbdWdtrue
6279 \Put@Direct(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
6280 {\reset@double%
6281 \@tfor\member:=#1\do{%
6282 \if\member e\relax
6283 \@adoublebondtrue
6284 \else\if\member E\relax
6285 \@Adoublebondtrue
6286 \else\if\member f\relax
6287 \@bdoublebondtrue
6288 \else\if\member F\relax
6289 \@Bdoublebondtrue
6290 \fi\fi\fi\fi}%
6291 \@wrongbdWatrue
6292 \@wrongbdWdtrue
6293 \Put@Direct(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
6294 {\reset@double%
6295 \@tfor\member:=#1\do{%
6296 \if\member g\relax
6297 \@adoublebondtrue
6298 \else\if\member G\relax
6299 \@Adoublebondtrue
6300 \else\if\member h\relax
6301 \@bdoublebondtrue
6302 \else\if\member H\relax
6303 \@Bdoublebondtrue
6304 \fi\fi\fi\fi}%
6305 \@wrongbdWatrue
6306 \@wrongbdWdtrue
6307 \Put@Direct(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
6308 {\reset@double%
6309 \@tfor\member:=#1\do{%
6310 \if\member i\relax
6311 \@adoublebondtrue
6312 \else\if\member I\relax
6313 \@Adoublebondtrue
6314 \fi\fi}%
6315 \if@normorinvsw% inverse
6316 \@wrongbdWatrue
6317 \@wrongbdWdfalse
6318 \else% normal
6319 \@wrongbdWafalse
6320 \@wrongbdWdtrue
6321 \fi
6322 \Put@Direct(1368,0){\@@dinormorinv{#2}{#3}{1}{-8}}}%
6323 %
6324 %originally for fused rings
6325 %shifted for coloring skeletal bond 2010/10/01
6326 %
6327 {\reset@double%
6328 \@tfor\member:=#1\do{%
6329 \if\member a\relax%dummy
6330 \else\if\member b\relax%dummy
6331 \else\if\member A\relax%dummy
6332 \else\if\member B\relax%dummy
6333 \else\if\member c\relax%dummy
6334 \else\if\member C\relax%dummy
6335 \else\if\member d\relax%dummy
6336 \else\if\member D\relax%dummy
6337 \else\if\member e\relax%dummy
6338 \else\if\member E\relax%dummy
6339 \else\if\member f\relax%dummy
6340 \else\if\member F\relax%dummy
6341 \else\if\member g\relax%dummy
6342 \else\if\member G\relax%dummy
6343 \else\if\member h\relax%dummy
6344 \else\if\member H\relax%dummy
6345 \else\if\member i\relax%dummy
6346 \else\if\member I\relax%dummy
6347 \else
6348 \expandafter\twoCH@@R\member//%
6349 \set@fusion@decameth% for all bonds
6350 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
6351 \fi\fi\fi\fi}}%
6352 \end{ShiftPicEnvB}%
6353 }% end \@decamethylene
6354 % \end{macrocode}
6355 % \end{macro}
6356 %
6357 % The inner command |\set@fusion@decameth| is used for typesetting
6358 % a fused ring at each bond represented by |\@@tmpa|. Warnings
6359 % concerning mismatched ring-fusions are based on the command
6360 % |\FuseWarning|.
6361 %
6362 % \begin{macro}{\set@fusion@decameth}
6363 % \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@decameth}}
6364 % \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
6365 % \begin{macrocode}
6366 \def\set@fusion@decameth{%
6367 % %%%%%%%%%%%%%%%%%%%%%
6368 % % inner bond fusion %
6369 % %%%%%%%%%%%%%%%%%%%%%
6370 \if@normorinvsw
6371 \if\@@tmpa h\relax%
6372 \putlratom{1198}{0}{\@@tmpb}% % bond fused
6373 \FuseWarning{-171}{-103}%
6374 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
6375 \else\if\@@tmpa H\relax%
6376 \putlratom{1369}{103}{\@@tmpb}% % bond fused
6377 \FuseWarning{171}{103}%
6378 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
6379 \else\if\@@tmpa i\relax%
6380 \putlratom{1369}{103}{\@@tmpb}% % bond fused
6381 \FuseWarning{-171}{103}%
6382 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
6383 \else\if\@@tmpa I\relax%
6384 \putlratom{1540}{0}{\@@tmpb}% % bond fused
6385 \FuseWarning{171}{-103}%
6386 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
6387 \else
6388 \set@fusion@octameth
6389 \fi\fi\fi\fi
6390 \else
6391 \if\@@tmpa h\relax%
6392 \putlratom{1198}{103}{\@@tmpb}% % bond fused
6393 \FuseWarning{-171}{103}%
6394 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
6395 \else\if\@@tmpa H\relax%
6396 \putlratom{1369}{0}{\@@tmpb}% % bond fused
6397 \FuseWarning{171}{-103}%
6398 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
6399 \else\if\@@tmpa i\relax%
6400 \putlratom{1369}{0}{\@@tmpb}% % bond fused
6401 \FuseWarning{-171}{-103}%
6402 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
6403 \else\if\@@tmpa I\relax%
6404 \putlratom{1540}{103}{\@@tmpb}% % bond fused
6405 \FuseWarning{171}{103}%
6406 {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
6407 \else
6408 \set@fusion@octameth
6409 \fi\fi\fi\fi
6410 \fi%
6411 \global\let\FuseWarning=\FuseW@rning%added 2010/10/01
6412 }% end of the macro \set@fusion@decameth
6413 %</methylen>
6414 % \end{macrocode}
6415 % \end{macro}
6416 %
6417 % \Finale
6418 %
6419 \endinput