Debian Codegraph @

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

raw
1 % \iffalse meta-comment
2 %% File: aliphat.dtx
3 %
4 % Copyright 1993,1996,1998,2001,2002,2004,2005,2009,2010,2013 by Shinsaku Fujita
5 %
6 % This file is part of XyMTeX system.
7 % -------------------------------------
8 %
9 % This file is a successor to:
10 %
11 % aliphat.sty
12 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 % \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
14 % \typeout{ -- Released December 1, 1993 by Shinsaku Fujita}
15 % Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
16 %
17 % This file is a part of the macro package ``XyMTeX'' which has been
18 % designed for typesetting chemical structural formulas.
19 %
20 % This file is to be contained in the ``xymtex'' directory which is
21 % an input directory for TeX. It is a LaTeX optional style file and
22 % should be used only within LaTeX, because several macros of the file
23 % are based on LaTeX commands.
24 %
25 % For the review of XyMTeX, see
26 % (1) Shinsaku Fujita, ``Typesetting structural formulas with the text
27 % formatter TeX/LaTeX'', Computers and Chemistry, in press.
28 % The following book deals with an application of TeX/LaTeX to
29 % preparation of manuscripts of chemical fields:
30 % (2) Shinsaku Fujita, ``LaTeX for Chemists and Biochemists''
31 % Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].
32 %
33 % This work may be distributed and/or modified under the
34 % conditions of the LaTeX Project Public License, either version 1.3
35 % of this license or (at your option) any later version.
36 % The latest version of this license is in
37 % http://www.latex-project.org/lppl.txt
38 % and version 1.3 or later is part of all distributions of LaTeX
39 % version 2005/12/01 or later.
40 %
41 % This work has the LPPL maintenance status `maintained'.
42 % The Current Maintainer of this work is Shinsaku Fujita.
43 %
44 % This work consists of the files aliphat.dtx and aliphat.ins
45 % and the derived file aliphat.sty.
46 %
47 % Please report any bugs, comments, suggestions, etc. to:
48 % (Old Address) Shinsaku Fujita,
49 % Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
50 % Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
51 % (Present Address) Shinsaku Fujita
52 % Shonan Institute of Chemoinformatics and
53 % Mathematical Chemistry
54 % [email protected]
55 %
56 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 % \def\j@urnalname{aliphat}
58 % \def\versi@ndate{December 01, 1993}
59 % \def\versi@nno{ver1.00}
60 % \def\copyrighth@lder{SF}% Shinsaku Fujita
61 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 % \def\j@urnalname{aliphat}
63 % \def\versi@ndate{August 16, 1996}
64 % \def\versi@nno{ver1.01}
65 % \def\copyrighth@lder{SF} % Shinsaku Fujita
66 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67 % \def\j@urnalname{aliphat}
68 % \def\versi@ndate{October 31, 1998}
69 % \def\versi@nno{ver1.02}
70 % \def\copyrighth@lder{SF} % Shinsaku Fujita
71 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72 % \def\j@urnalname{aliphat}
73 % \def\versi@ndate{December 25, 1998}
74 % \def\versi@nno{ver2.00}
75 % \def\copyrighth@lder{SF} % Shinsaku Fujita
76 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77 % \def\j@urnalname{aliphat}
78 % \def\versi@ndate{June 20, 2001}
79 % \def\versi@nno{ver2.01}
80 % \def\copyrighth@lder{SF} % Shinsaku Fujita
81 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 % \def\j@urnalname{aliphat}
83 % \def\versi@ndate{April 30, 2002}
84 % \def\versi@nno{ver3.00}
85 % \def\copyrighth@lder{SF} % Shinsaku Fujita
86 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 % \def\j@urnalname{aliphat}
88 % \def\versi@ndate{May 30, 2002}
89 % \def\versi@nno{ver4.00}
90 % \def\copyrighth@lder{SF} % Shinsaku Fujita
91 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92 % \def\j@urnalname{aliphat}
93 % \def\versi@ndate{August 30, 2004}
94 % \def\versi@nno{ver4.01}
95 % \def\copyrighth@lder{SF} % Shinsaku Fujita
96 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97 % \def\j@urnalname{aliphat}
98 % \def\versi@ndate{December 20, 2004}
99 % \def\versi@nno{ver4.02}
100 % \def\copyrighth@lder{SF} % Shinsaku Fujita
101 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
102 % \def\j@urnalname{aliphat}
103 % \def\versi@ndate{July 20, 2005}
104 % \def\versi@nno{ver4.03}
105 % \def\copyrighth@lder{SF} % Shinsaku Fujita
106 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 % \def\j@urnalname{aliphat}
108 % \def\versi@ndate{November 07, 2009}
109 % \def\versi@nno{ver4.05}
110 % \def\copyrighth@lder{SF} % Shinsaku Fujita
111 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 % \def\j@urnalname{aliphat}
113 % \def\versi@ndate{October 01, 2010}
114 % \def\versi@nno{ver5.00}
115 % \def\copyrighth@lder{SF} % Shinsaku Fujita
116 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
117 % \def\j@urnalname{aliphat}
118 % \def\versi@ndate{April 02, 2013}
119 % \def\versi@nno{ver5.01b}
120 % \def\copyrighth@lder{SF} % Shinsaku Fujita
121 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
122 %
123 % \fi
124 %
125 % \CheckSum{6477}
126 %% \CharacterTable
127 %% {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
128 %% 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
129 %% Digits \0\1\2\3\4\5\6\7\8\9
130 %% Exclamation \! Double quote \" Hash (number) \#
131 %% Dollar \$ Percent \% Ampersand \&
132 %% Acute accent \' Left paren \( Right paren \)
133 %% Asterisk \* Plus \+ Comma \,
134 %% Minus \- Point \. Solidus \/
135 %% Colon \: Semicolon \; Less than \<
136 %% Equals \= Greater than \> Question mark \?
137 %% Commercial at \@ Left bracket \[ Backslash \\
138 %% Right bracket \] Circumflex \^ Underscore \_
139 %% Grave accent \` Left brace \{ Vertical bar \|
140 %% Right brace \} Tilde \~}
141 %
142 % \setcounter{StandardModuleDepth}{1}
143 %
144 % \StopEventually{}
145 % \MakeShortVerb{\|}
146 %
147 % \iffalse
148 % \changes{v1.01}{1996/06/26}{first edition for LaTeX2e}
149 % \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e}
150 % \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
151 % \changes{v2.01}{2001/06/20}{Size reduction and clipping information}
152 % \changes{v2.01}{2001/06/21}{The command \cs{dotorline} is added.}
153 % \changes{v3.00}{2002/04/30}{sfpicture environment, etc.}
154 % \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv}
155 % \changes{v4.01}{2004/08/30}{Variable size of a central atom}
156 % \changes{v4.02}{2004/12/20}{Tetrhedral units with wedges bonds}
157 % \changes{v4.02a}{2004/12/27}{Bug fix: \cs{square} to \cs{squarecomplex}}
158 % \changes{v4.03}{2004/07/20}{Wave bonds}
159 % \changes{v4.05}{2009/11/07}{Bug fix: \cs{@tetrahedral} to \cs{@@tetrahedral}}
160 % \changes{v5.00}{2010/10/01}{Bond Coloring and the LaTeX Project Public License;
161 % \cs{square} renamed into \cs{squareplanar}}
162 % \changes{v5.01b}{2013/04/02}{Bug fix: \cs{Nothbond}, \cs{Southbond}, etc}
163 % \changes{v5.01}{2013/07/30}{Bug fix: \cs{yltetrahedralposition}, etc}
164 % \fi
165 %
166 % \iffalse
167 %<*driver>
168 \NeedsTeXFormat{pLaTeX2e}
169 % \fi
170 \ProvidesFile{aliphat.dtx}[2013/07/30 v5.01 XyMTeX{} package file]
171 % \iffalse
172 \documentclass{ltxdoc}
173 \GetFileInfo{aliphat.dtx}
174 %
175 % %%XyMTeX Logo: Definition 2%%%
176 \def\UPSILON{\char'7}
177 \def\XyM{X\kern-.30em\smash{%
178 \raise.50ex\hbox{\UPSILON}}\kern-.30em{M}}
179 \def\XyMTeX{\XyM\kern-.1em\TeX}
180 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 \title{Aliphatic compounds by {\sffamily aliphat.sty}
182 (\fileversion) of \XyMTeX{}}
183 \author{Shinsaku Fujita \\
184 Shonan Institute of Chemoinformatics and Mathematical Chemistry, \\
185 Kanagawa, 258-0019, Japan
186 % Department of Chemistry and Materials Technology, \\
187 % Kyoto Institute of Technology, \\
188 % Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
189 % % (old address)
190 % % Ashigara Research Laboratories,
191 % % Fuji Photo Film Co., Ltd., \\
192 % % Minami-Ashigara, Kanagawa, 250-01 Japan
193 }
194 \date{\filedate}
195 %
196 \begin{document}
197 \maketitle
198 \DocInput{aliphat.dtx}
199 \end{document}
200 %</driver>
201 % \fi
202 %
203 % \section{Introduction}\label{aliphat:intro}
204 %
205 % \subsection{Options for {\sffamily docstrip}}
206 %
207 % \DeleteShortVerb{\|}
208 % \begin{center}
209 % \begin{tabular}{|l|l|}
210 % \hline
211 % \emph{option} & \emph{function}\\ \hline
212 % aliphat & aliphat.sty \\
213 % driver & driver for this dtx file \\
214 % \hline
215 % \end{tabular}
216 % \end{center}
217 % \MakeShortVerb{\|}
218 %
219 % \subsection{Version Information}
220 %
221 % \begin{macrocode}
222 %<*aliphat>
223 \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.01}
224 \typeout{ -- Released July 20, 2013 by Shinsaku Fujita}
225 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
226 \def\j@urnalname{aliphat}
227 \def\versi@ndate{July 20, 2013}
228 \def\versi@nno{ver5.01}
229 \def\copyrighth@lder{SF} % Shinsaku Fujita
230 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
231 \typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
232 \space[\copyrighth@lder]}
233 % \end{macrocode}
234 %
235 % \section{List of commands for aliphat.sty}
236 %
237 % \begin{verbatim}
238 % *********************************
239 % * aliphat.sty: list of commands *
240 % *********************************
241 %
242 % <Conventions for bond-setting>
243 %
244 % \Northbond
245 % \Eastbond
246 % \Southbond
247 % \Westbond
248 % \NEBond
249 % \NEbond
250 % \SEBond
251 % \SEbond
252 % \NWBond
253 % \NWbond
254 % \SWBond
255 % \SWbond
256 %
257 % \NEBOND
258 % \NWBOND
259 % \SEBOND
260 % \SWBOND
261 %
262 % <Macros for position adjustment>
263 % \ylrtrigonalposition
264 % \ylRtrigonalposition
265 % \ylltrigonalposition
266 % \ylLtrigonalposition
267 % \ylutrigonalposition
268 % \ylUtrigonalposition
269 % \yldtrigonalposition
270 % \ylDtrigonalposition
271 %
272 % \yltethedralposition
273 % \ylsquareposition
274 %
275 % \ylethylenepositiona
276 % \ylethylenepositionb
277 % \ylethylenevpositiona
278 % \ylethylenevpositionb
279 %
280 % <Macros for tetravalent atoms>
281 %
282 % \tetrahedral \@tetrahedral
283 % \square ---> \squarplanar \@square ---> \@squareplanar
284 %
285 % <Macros for trivalent atoms>
286 %
287 % \rtrigonal \@rtrigonal
288 % \Rtrigonal \@Rtrigonal
289 % \ltrigonal \@ltrigonal
290 % \Ltrigonal \@Ltrigonal
291 % \utrigonal \@utrigonal
292 % \Utrigonal \@Utrigonal
293 % \dtrigonal \@dtrigonal
294 % \Dtrigonal \@Dtrigonal
295 %
296 % <Macros for two-carbon compounds>
297 %
298 % \ethylene \@ethylene
299 % \ethyleneh
300 % \Ethylene \@Ethylene
301 % \Ethyleneh
302 % \ethylenev \@ethylenev
303 % \Ethylenev \@Ethylenev
304 %
305 % <Macros for stereo-projection>
306 %
307 % \tetrastereo \@tetrastereo
308 % \dtetrastereo \@dtetrastereo
309 % \ethanestereo \@ethanestereo
310 %
311 % <Macros for tetrahedral units with wedged bonds>
312 %
313 % \rtetrahedralS \RtetrahedralS
314 % \ltetrahedralS \LtetrahedralS
315 % \utetrahedralS \UtetrahedralS
316 % \dtetrahedralS \DtetrahedralS
317 % \htetrahedralS
318 %
319 % <Macros for trigonal bipyramidal intermediates>
320 %
321 % \utrigpyramid \dtrigpyramid
322 % \end{verbatim}
323 %
324 % \section{Input of basic macros}
325 %
326 % To assure the compatibility to \LaTeX{}2.09 (the native mode),
327 % the commands added by \LaTeXe{} have not been used in the resulting sty
328 % files ({\sf aliphat.sty} for the present case). Hence, the combination
329 % of |\input| and |\@ifundefined| is used to crossload sty
330 % files ({\sf chemstr.sty} for the present case) in place of the
331 % |\RequirePackage| command of \LaTeXe{}.
332 %
333 % \changes{v4.01}{2004/8/30}{Adding \cs{ifno@centeratom}}
334 % \begin{macrocode}
335 % *************************
336 % * input of basic macros *
337 % *************************
338 \@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
339 \unitlength=0.1pt
340 \newif\ifno@centeratom \no@centeratomfalse
341 % \end{macrocode}
342 %
343 % \section{Macros for bond-setting}
344 %
345 % Single, double and triple bonds of aliphatic compounds are represented
346 % by horizontal, vertical or sloped lines,
347 % which can be drawn by such commands as |\Eastbond|,
348 % |\Northbond| and |\SEbond|.
349 % \changes{v1.02}{1998/10/20}{Adding \cs{NEBOND}, \cs{SEBOND}, \cs{NWBOND},
350 % and \cs{SWBOND}}
351 %
352 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
353 % \changes{v2.01}{2001/06/21}{The command \cs{dotorline} is added.}
354 % \changes{v4.00}{2002/06/13}{Bug fix: Northbond etc. A and B inversed}
355 % \changes{v4.01}{2004/8/30}{Variable bond length.}
356 % \changes{v5.01}{2013/04/02}{Bug fix}
357 %
358 % \begin{macro}{\Northbond}
359 % \begin{macrocode}
360 % ********************************
361 % * Conventions for bond-setting *
362 % ********************************
363 \def\Northbond{%
364 \@ifnextchar[{\N@rthbond}{\N@rthbond[]}}
365 \def\N@rthbond[#1]{%
366 \yl@xdiff=40
367 \yl@ydiff=-15
368 \def\@tempXX{#1}%
369 \ifx\@tempXX\empty
370 \@tempcnta=100\relax
371 \@tempcntb=100\relax
372 \else
373 \@tempcnta=#1\relax
374 \@tempcntb=#1\relax
375 \fi
376 \ifno@centeratom
377 \advance\@tempcnta by52\relax
378 \advance\@tempcntb by52\relax
379 \fi
380 \edef\@tempcntavaluea{\the\@tempcnta}%
381 \@tempcnta=\@tempcntb
382 \ifno@centeratom\else%%added2013/4/2
383 \advance\@tempcnta by52\relax
384 \fi
385 \edef\@tempcntavalueb{\the\@tempcnta}%
386 \@tempcnta=\@tempcntb
387 \ifno@centeratom
388 \advance\@tempcnta by15\relax%%67-52=15added2013/4/2
389 \else
390 \advance\@tempcnta by67\relax
391 \fi
392 \edef\@tempcntavaluec{\the\@tempcnta}%
393 %\begin{sfpicture}(100,200)(0,0)
394 \begin{sfpicture}(0,0)(0,0)
395 \ifno@centeratom%
396 \if\@tmpb D\relax%
397 % \Multiput@Direct(-13,0)(26,0){2}{\line(0,1){\@tempcntavaluea}}% double bond up
398 \Multiput@Direct(-13,0)(26,0){2}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
399 \else\if\@tmpb T\relax%
400 % \Multiput@Direct(-20,0)(20,0){3}{\line(0,1){\@tempcntavaluea}}% triple bond up
401 \Multiput@Direct(-20,0)(20,0){3}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
402 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
403 {\thicklines\Put@Line(-8,0)(0,1){\@tempcntavaluea}}% single bond (alpha)
404 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
405 \dotorline(0,0)(0,1){\@tempcntavaluea}/(0,0)(0,\@tempcntavalueb)%
406 \else\if\@tmpb S%
407 \Put@Line(0,0)(0,1){\@tempcntavaluea}%
408 \else\if\@tmpb U% undefined
409 {%
410 \WaveBonds%
411 \Put@Line(0,0)(0,1){\@tempcntavaluea}%
412 }%
413 \else \Put@Line(0,0)(0,1){\@tempcntavaluea}%
414 \fi\fi\fi\fi\fi\fi%
415 \else%
416 \if\@tmpb D\relax%
417 % \Multiput@Direct(-13,52)(26,0){2}{\line(0,1){\@tempcntavaluea}}% double bond up
418 \Multiput@Direct(-13,52)(26,0){2}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
419 \else\if\@tmpb T\relax%
420 % \Multiput@Direct(-20,52)(20,0){3}{\line(0,1){\@tempcntavaluea}}% triple bond up
421 \Multiput@Direct(-20,52)(20,0){3}{\Put@Line(0,0)(0,1){\@tempcntavaluea}}%2010/10/01
422 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
423 {\thicklines\Put@Line(-8,52)(0,1){\@tempcntavaluea}}% single bond (alpha)
424 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
425 \dotorline(0,52)(0,1){\@tempcntavaluea}/(0,52)(0,\@tempcntavalueb)%
426 \else\if\@tmpb S%
427 \Put@Line(0,52)(0,1){\@tempcntavaluea}%
428 \else\if\@tmpb U% undefined
429 {%
430 \WaveBonds%
431 \Put@Line(0,52)(0,1){\@tempcntavaluea}%
432 }%
433 \else \Put@Line(0,52)(0,1){\@tempcntavaluea}%
434 \fi\fi\fi\fi\fi\fi%
435 \fi%
436 \putlratom{-40}{\@tempcntavaluec}{\@memberb}%==1 upper substituent
437 \end{sfpicture}}%End of Northbond
438 % \end{macrocode}
439 % \end{macro}
440 %
441 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
442 % \changes{v4.01}{2004/8/30}{Variable bond length.}
443 % \changes{v5.01}{2013/04/02}{Bug fix}
444 %
445 % \begin{macro}{\Eastbond}
446 % \begin{macrocode}
447 \def\Eastbond{%
448 \@ifnextchar[{\E@stbond}{\E@stbond[]}}
449 \def\E@stbond[#1]{%
450 \yl@xdiff=-10
451 \yl@ydiff=33
452 \edef\@tempXX{#1}%
453 \ifx\@tempXX\empty
454 \@tempcnta=140\relax
455 \@tempcntb=140\relax
456 \else
457 \@tempcnta=#1\relax
458 \@tempcntb=#1\relax
459 \fi
460 \ifno@centeratom%
461 \advance\@tempcnta by50\relax
462 \advance\@tempcntb by50\relax
463 \fi
464 \edef\@tempcntavaluea{\the\@tempcnta}%
465 \@tempcnta=\@tempcntb
466 \ifno@centeratom\else%%added 2013/4/2
467 \advance\@tempcnta by63\relax
468 \fi
469 \edef\@tempcntavalueb{\the\@tempcnta}%
470 \@tempcnta=\@tempcntb
471 \ifno@centeratom
472 \advance\@tempcnta by13\relax%%63-50=13added 2013/4/2
473 \else
474 \advance\@tempcnta by50\relax
475 \fi
476 \edef\@tempcntavaluec{\the\@tempcnta}%
477 %\begin{sfpicture}(200,200)(0,0)
478 \begin{sfpicture}(0,0)(0,0)
479 \ifno@centeratom%
480 \if\@tmpb D\relax%
481 % \Multiput@Direct(0,-13)(0,26){2}{\line(1,0){\@tempcntavaluea}}% double bond right
482 \Multiput@Direct(0,-13)(0,26){2}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
483 \else\if\@tmpb T\relax%
484 % \Multiput@Direct(0,-20)(0,20){3}{\line(1,0){\@tempcntavaluea}}% double bond right
485 \Multiput@Direct(0,-20)(0,20){3}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
486 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
487 {\thicklines\Put@Line(0,0)(1,0){\@tempcntavaluea}}% single bond (alpha)
488 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
489 \dotorline(0,0)(1,0){\@tempcntavaluea}/(0,0)(\@tempcntavaluec,0)%
490 \else\if\@tmpb S%
491 \Put@Line(0,0)(1,0){\@tempcntavaluea}%
492 \else\if\@tmpb U% undefined
493 {%
494 \WaveBonds%
495 \Put@Line(0,0)(1,0){\@tempcntavaluea}%
496 }%
497 \else \Put@Line(0,0)(1,0){\@tempcntavaluea}%
498 \fi\fi\fi\fi\fi\fi%
499 \else%
500 \if\@tmpb D\relax%
501 % \Multiput@Direct(50,-13)(0,26){2}{\line(1,0){\@tempcntavaluea}}% double bond right
502 \Multiput@Direct(50,-13)(0,26){2}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
503 \else\if\@tmpb T\relax%
504 % \Multiput@Direct(50,-20)(0,20){3}{\line(1,0){\@tempcntavaluea}}% double bond right
505 \Multiput@Direct(50,-20)(0,20){3}{\Put@Line(0,0)(1,0){\@tempcntavaluea}}%2010/10/01
506 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
507 {\thicklines\Put@Line(50,0)(1,0){\@tempcntavaluea}}% single bond (alpha)
508 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
509 \dotorline(50,0)(1,0){\@tempcntavaluea}/(50,0)(\@tempcntavaluec,0)%
510 \else\if\@tmpb S%
511 \Put@Line(50,0)(1,0){\@tempcntavaluea}%
512 \else\if\@tmpb U% undefined
513 {%
514 \WaveBonds%
515 \Put@Line(50,0)(1,0){\@tempcntavaluea}%
516 }%
517 \else \Put@Line(50,0)(1,0){\@tempcntavaluea}%
518 \fi\fi\fi\fi\fi\fi%
519 \fi%
520 \putratom{\@tempcntavalueb}{-33}{\@memberb}%==2 right substituent
521 \end{sfpicture}}%End of Eastbond
522 % \end{macrocode}
523 % \end{macro}
524 %
525 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
526 % \changes{v4.01}{2004/8/30}{Variable bond length.}
527 % \changes{v5.01}{2013/04/02}{Bug fix}
528 %
529 % \begin{macro}{\Southbond}
530 % \begin{macrocode}
531 \def\Southbond{%
532 \@ifnextchar[{\S@uthbond}{\S@uthbond[]}}
533 \def\S@uthbond[#1]{%
534 \yl@xdiff=40
535 \yl@ydiff=95
536 \def\@tempXX{#1}%
537 \ifx\@tempXX\empty
538 \@tempcnta=100\relax
539 \@tempcntb=100\relax
540 \else
541 \@tempcnta=#1\relax
542 \@tempcntb=#1\relax
543 \fi
544 \ifno@centeratom
545 \advance\@tempcnta by48\relax
546 \advance\@tempcntb by48\relax
547 \fi
548 \edef\@tempcntavaluea{\the\@tempcnta}%
549 \@tempcnta=-\@tempcntb
550 \ifno@centeratom\else%%added2013/4/2
551 \advance\@tempcnta by-48\relax
552 \fi
553 \edef\@tempcntavalueb{\the\@tempcnta}%
554 \@tempcnta=-\@tempcntb
555 \ifno@centeratom
556 \advance\@tempcnta by-90\relax%%143-48=98 (-8) added2013/4/2
557 \else
558 \advance\@tempcnta by-143\relax
559 \fi
560 \edef\@tempcntavaluec{\the\@tempcnta}%
561 %\begin{sfpicture}(100,300)(0,0)
562 \begin{sfpicture}(0,0)(0,0)
563 \ifno@centeratom%
564 \if\@tmpb D\relax%
565 % \Multiput@Direct(-13,0)(26,0){2}{\line(0,-1){\@tempcntavaluea}}% double bond down
566 \Multiput@Direct(-13,0)(26,0){2}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
567 \else\if\@tmpb T\relax%
568 % \Multiput@Direct(-20,0)(20,0){3}{\line(0,-1){\@tempcntavaluea}}% double bond down
569 \Multiput@Direct(-20,0)(20,0){3}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
570 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
571 {\thicklines\Put@Line(-8,0)(0,-1){\@tempcntavaluea}}% single bond (alpha)
572 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
573 \dotorline(0,0)(0,-1){\@tempcntavaluea}/(0,0)(0,\@tempcntavalueb)%
574 \else\if\@tmpb S%
575 \Put@Line(0,-0)(0,-1){\@tempcntavaluea}%
576 \else\if\@tmpb U% undefined
577 {%
578 \WaveBonds%
579 \Put@Line(0,-0)(0,-1){\@tempcntavaluea}%
580 }%
581 \else \Put@Line(0,0)(0,-1){\@tempcntavaluea}%
582 \fi\fi\fi\fi\fi\fi%
583 \else%
584 \if\@tmpb D\relax%
585 % \Multiput@Direct(-13,-48)(26,0){2}{\line(0,-1){\@tempcntavaluea}}% double bond down
586 \Multiput@Direct(-13,-48)(26,0){2}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
587 \else\if\@tmpb T\relax%
588 % \Multiput@Direct(-20,-48)(20,0){3}{\line(0,-1){\@tempcntavaluea}}% double bond down
589 \Multiput@Direct(-20,-48)(20,0){3}{\Put@Line(0,0)(0,-1){\@tempcntavaluea}}%2010/10/01
590 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
591 {\thicklines\Put@Line(-8,-48)(0,-1){\@tempcntavaluea}}% single bond (alpha)
592 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
593 \dotorline(0,-48)(0,-1){\@tempcntavaluea}/(0,-48)(0,\@tempcntavalueb)%
594 \else\if\@tmpb S%
595 \Put@Line(0,-48)(0,-1){\@tempcntavaluea}%
596 \else\if\@tmpb U% undefined
597 {%
598 \WaveBonds%
599 \Put@Line(0,-48)(0,-1){\@tempcntavaluea}%
600 }%
601 \else \Put@Line(0,-48)(0,-1){\@tempcntavaluea}%
602 \fi\fi\fi\fi\fi\fi%
603 \fi%
604 \putlratom{-40}{\@tempcntavaluec}{\@memberb}%==3 down substituent
605 \end{sfpicture}}%End of Southbond
606 % \end{macrocode}
607 % \end{macro}
608 %
609 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
610 % \changes{v4.01}{2004/8/30}{Variable bond length.}
611 % \changes{v5.01}{2013/04/02}{Bug fix}
612 %
613
614 % \begin{macro}{\Westbond}
615 % \begin{macrocode}
616 \def\Westbond{%
617 \@ifnextchar[{\W@stbond}{\W@stbond[]}}
618 \def\W@stbond[#1]{%
619 \yl@xdiff=10
620 \yl@ydiff=33
621 \def\@tempXX{#1}%
622 \ifx\@tempXX\empty
623 \@tempcnta=140\relax
624 \@tempcntb=140\relax
625 \else
626 \@tempcnta=#1\relax
627 \@tempcntb=#1\relax
628 \fi
629 \ifno@centeratom
630 \advance\@tempcnta by50\relax
631 \advance\@tempcntb by50\relax
632 \fi
633 \edef\@tempcntavaluea{\the\@tempcnta}%
634 \@tempcnta=-\@tempcntb
635 \ifno@centeratom\else%%added 2013/4/2
636 \advance\@tempcnta by-63\relax
637 \fi
638 \edef\@tempcntavalueb{\the\@tempcnta}%
639 \@tempcnta=\@tempcntb
640 \ifno@centeratom
641 \advance\@tempcnta by-13\relax%%63-50=13 added 2013/4/2
642 \else%
643 \advance\@tempcnta by50\relax
644 \fi
645 \edef\@tempcntavaluec{\the\@tempcnta}%
646 %\begin{sfpicture}(100,300)(0,0)
647 \begin{sfpicture}(0,0)(0,0)
648 \ifno@centeratom%
649 \if\@tmpb D\relax%
650 % \Multiput@Direct(0,-13)(0,26){2}{\line(-1,0){\@tempcntavaluea}}% double bond left
651 \Multiput@Direct(0,-13)(0,26){2}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
652 \else\if\@tmpb T\relax%
653 % \Multiput@Direct(0,-20)(0,20){3}{\line(-1,0){\@tempcntavaluea}}% double bond left
654 \Multiput@Direct(0,-20)(0,20){3}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
655 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
656 {\thicklines\Put@Line(0,0)(-1,0){\@tempcntavaluea}}% single bond (alpha)
657 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
658 %% \dotorline(0,0)(-1,0){\@tempcntavaluea}/(\@tempcntavalueb,0)(-40,0)%
659 \dotorline(0,0)(-1,0){\@tempcntavaluea}/(0,0)(\@tempcntavalueb,0)%2013/04/02
660 \else\if\@tmpb S%
661 \Put@Line(0,0)(-1,0){\@tempcntavaluea}%
662 \else\if\@tmpb U% undefine
663 {%
664 \WaveBonds%
665 \Put@Line(0,0)(-1,0){\@tempcntavaluea}%
666 }%
667 \else \Put@Line(0,0)(-1,0){\@tempcntavaluea}%
668 \fi\fi\fi\fi\fi\fi%
669 \else%
670 \if\@tmpb D\relax%
671 % \Multiput@Direct(-50,-13)(0,26){2}{\line(-1,0){\@tempcntavaluea}}% double bond left
672 \Multiput@Direct(-50,-13)(0,26){2}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
673 \else\if\@tmpb T\relax%
674 % \Multiput@Direct(-50,-20)(0,20){3}{\line(-1,0){\@tempcntavaluea}}% double bond left
675 \Multiput@Direct(-50,-20)(0,20){3}{\Put@Line(0,0)(-1,0){\@tempcntavaluea}}%2010/10/01
676 \else\if\@tmpb B%(B) beta <-- alpha 2002/6/13
677 {\thicklines\Put@Line(-50,0)(-1,0){\@tempcntavaluea}}% single bond (alpha)
678 \else\if\@tmpb A%(A) alpha <-- beta 2002/6/13
679 %% \dotorline(-50,0)(-1,0){\@tempcntavaluea}/(\@tempcntavalueb,0)(-40,0)%
680 % \dotorline(-50,0)(-1,0){\@tempcntavaluea}/(0,0)(\@tempcntavalueb,0)%%2013/04/02
681 \dotorline(-50,0)(-1,0){\@tempcntavaluea}/(-40,0)(\@tempcntavalueb,0)%%2013/06/16
682 \else\if\@tmpb S%
683 \Put@Line(-50,0)(-1,0){\@tempcntavaluea}%
684 \else\if\@tmpb U% undefined
685 {%
686 \WaveBonds%
687 \Put@Line(-50,0)(-1,0){\@tempcntavaluea}%
688 }%
689 \else \Put@Line(-50,0)(-1,0){\@tempcntavaluea}%
690 \fi\fi\fi\fi\fi\fi%
691 \fi%
692 \putlatom{\@tempcntavalueb}{-33}{\@memberb}%==4 left substituent
693 \end{sfpicture}}%End of Westbond
694 % \end{macrocode}
695 % \end{macro}
696 %
697 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
698 %
699 % \begin{macro}{\NEBond}
700 % \begin{macrocode}
701 \def\NEBond{%degree 120
702 \yl@xdiff=-9
703 \yl@ydiff=13
704 \begin{sfpicture}(100,300)(0,0)
705 \if\@tmpb D\relax%
706 \Put@Line(33,48)(5,3){121}%
707 \Put@Line(47,26)(5,3){121}%northeast double bond
708 \else\if\@tmpb T\relax%
709 \Put@Line(31,52)(5,3){121}%
710 \Put@Line(40,37)(5,3){121}%
711 \Put@Line(49,22)(5,3){121}%northeast triple bond
712 % \else\if\@tmpb A%(A) alpha
713 \else\if\@tmpb B%(B) beta
714 {\thicklines\Put@Line(40,47)(5,3){121}}% single bond (alpha)
715 % \else\if\@tmpb B%(B) beta
716 \else\if\@tmpb A%(A) alpha
717 \dotorline(40,47)(5,3){121}/(40,47)(161,120)%
718 \else\if\@tmpb S%
719 \Put@Line(40,47)(5,3){121}%
720 \else\if\@tmpb U% undefined
721 {%
722 \WaveBonds%
723 \Put@Line(40,47)(5,3){121}%
724 }%
725 \else \Put@Line(40,47)(5,3){121}%
726 \fi\fi\fi\fi\fi\fi%
727 \putratom{170}{107}{\@memberb}%==2 (northeast substituent)
728 \end{sfpicture}}%
729 % \end{macrocode}
730 % \end{macro}
731 %
732 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
733 %
734 % \begin{macro}{\NEbond}
735 % \begin{macrocode}
736 \def\NEbond{%degree 90
737 \yl@xdiff=-5
738 \yl@ydiff=10
739 \begin{sfpicture}(100,300)(0,0)
740 \if\@tmpb D\relax%
741 \Put@Line(31,46)(1,1){100}%
742 \Put@Line(49,28)(1,1){100}%northeast double bond
743 \else\if\@tmpb T\relax%
744 \Put@Line(27,50)(1,1){100}%
745 \Put@Line(40,37)(1,1){100}%
746 \Put@Line(53,24)(1,1){100}%northeast triple bond
747 \else\if\@tmpb B%(B) beta
748 {\thicklines\Put@Line(40,47)(1,1){100}}% single bond (alpha)
749 \else\if\@tmpb A%(A) alpha
750 \dotorline(40,47)(1,1){100}/(40,47)(140,147)%
751 \else\if\@tmpb S%
752 \Put@Line(40,47)(1,1){100}%
753 \else\if\@tmpb U% undefined
754 {%
755 \WaveBonds%
756 \Put@Line(40,47)(1,1){100}%
757 }%
758 \else \Put@Line(40,47)(1,1){100}%
759 \fi\fi\fi\fi\fi\fi%
760 \putratom{145}{137}{\@memberb}%==2 (northeast substituent)
761 \end{sfpicture}}%
762 % \end{macrocode}
763 % \end{macro}
764 %
765 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
766 %
767 % \begin{macro}{\SEBond}
768 % \begin{macrocode}
769 \def\SEBond{%degree 120
770 \yl@xdiff=-9
771 \yl@ydiff=67
772 \begin{sfpicture}(100,300)(0,0)
773 \if\@tmpb D\relax%
774 \Put@Line(33,-48)(5,-3){121}%
775 \Put@Line(47,-26)(5,-3){121}%southeast double bond
776 \else\if\@tmpb T\relax%
777 \Put@Line(31,-52)(5,-3){121}%
778 \Put@Line(40,-37)(5,-3){121}%
779 \Put@Line(49,-22)(5,-3){121}%southeast triple bond
780 \else\if\@tmpb B%(B) beta
781 {\thicklines\Put@Line(40,-47)(5,-3){121}}% single bond (alpha)
782 \else\if\@tmpb A%(A) alpha
783 \dotorline(40,-47)(5,-3){121}/(40,-47)(161,-120)%
784 \else\if\@tmpb S%
785 \Put@Line(40,-47)(5,-3){121}%
786 \else\if\@tmpb U% undefined
787 {%
788 \WaveBonds%
789 \Put@Line(40,-47)(5,-3){121}%
790 }%
791 \else \Put@Line(40,-47)(5,-3){121}%
792 \fi\fi\fi\fi\fi\fi%
793 \putratom{170}{-187}{\@memberb}%==2 (southeast substituent)
794 \end{sfpicture}}%
795 % \end{macrocode}
796 % \end{macro}
797 %
798 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
799 %
800 % \begin{macro}{\SEbond}
801 % \begin{macrocode}
802 \def\SEbond{%degree 90
803 \yl@xdiff=-5
804 \yl@ydiff=56
805 \begin{sfpicture}(100,300)(0,0)
806 \if\@tmpb D\relax%
807 \Put@Line(31,-46)(1,-1){100}%
808 \Put@Line(49,-28)(1,-1){100}%southeast double bond
809 \else\if\@tmpb T\relax%
810 \Put@Line(27,-50)(1,-1){100}%
811 \Put@Line(40,-37)(1,-1){100}%
812 \Put@Line(53,-24)(1,-1){100}%southeast triple bond
813 \else\if\@tmpb B%(B) beta
814 {\thicklines\Put@Line(53,-47)(1,-1){100}}% single bond (alpha)
815 \else\if\@tmpb A%(A) alpha
816 \dotorline(40,-47)(1,-1){100}/(40,-47)(140,-147)%
817 \else\if\@tmpb S%
818 \Put@Line(40,-47)(1,-1){100}%
819 \else\if\@tmpb U% undefined
820 {%
821 \WaveBonds%
822 \Put@Line(40,-47)(1,-1){100}%
823 }%
824 \else \Put@Line(40,-47)(1,-1){100}%
825 \fi\fi\fi\fi\fi\fi%
826 \putratom{145}{-203}{\@memberb}%==3 (southeast substituent)
827 \end{sfpicture}}%
828 % \end{macrocode}
829 % \end{macro}
830 %
831 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
832 %
833 % \begin{macro}{\NWBbond}
834 % \begin{macrocode}
835 \def\NWBond{%
836 \begin{sfpicture}(100,300)(0,0)
837 \yl@xdiff=9
838 \yl@ydiff=13
839 \if\@tmpb D\relax%
840 \Put@Line(-59,48)(-5,3){121}%
841 \Put@Line(-73,26)(-5,3){121}%northwest double bond
842 \else\if\@tmpb T\relax%
843 \Put@Line(-57,52)(-5,3){121}%
844 \Put@Line(-66,37)(-5,3){121}%
845 \Put@Line(-75,22)(-5,3){121}%northwest triple bond
846 \else\if\@tmpb B%(B) beta
847 {\thicklines\Put@Line(-66,47)(-5,3){121}}% single bond (alpha)
848 \else\if\@tmpb A%(A) alpha
849 \dotorline(-66,47)(-5,3){121}/(-66,47)(-187,120)%
850 \else\if\@tmpb S%
851 \Put@Line(-66,47)(-5,3){121}%
852 \else\if\@tmpb U% undefined
853 {%
854 \WaveBonds%
855 \Put@Line(-66,47)(-5,3){121}%
856 }%
857 \else \Put@Line(-66,47)(-5,3){121}%
858 \fi\fi\fi\fi\fi\fi%
859 \putlatom{-196}{107}{\@memberb}%==2 (northwest substituent)
860 \end{sfpicture}}%
861 % \end{macrocode}
862 % \end{macro}
863 %
864 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
865 %
866 % \begin{macro}{\NWbond}
867 % \begin{macrocode}
868 \def\NWbond{%
869 \begin{sfpicture}(100,300)(0,0)
870 \yl@xdiff=13
871 \yl@ydiff=10
872 \if\@tmpb D\relax%
873 \Put@Line(-41,46)(-1,1){100}%
874 \Put@Line(-59,28)(-1,1){100}%northwest double bond
875 \else\if\@tmpb T\relax%
876 \Put@Line(-37,50)(-1,1){100}%
877 \Put@Line(-50,37)(-1,1){100}%
878 \Put@Line(-63,24)(-1,1){100}%northwest triple bond
879 \else\if\@tmpb B%(B) beta
880 {\thicklines\Put@Line(-50,47)(-1,1){100}}% single bond (alpha)
881 \else\if\@tmpb A%(A) alpha
882 \dotorline(-50,47)(-1,1){100}/(-50,47)(-137,147)%
883 \else\if\@tmpb S%
884 \Put@Line(-50,47)(-1,1){100}%
885 \else\if\@tmpb U% undefined
886 {%
887 \WaveBonds%
888 \Put@Line(-50,47)(-1,1){100}%
889 }%
890 \else \Put@Line(-50,47)(-1,1){100}%
891 \fi\fi\fi\fi\fi\fi%
892 \putlatom{-163}{137}{\@memberb}%==2 (northwest substituent)
893 \end{sfpicture}}%
894 % \end{macrocode}
895 % \end{macro}
896 %
897 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
898 %
899 % \begin{macro}{\SWBond}
900 % \begin{macrocode}
901 \def\SWBond{%
902 \yl@xdiff=9
903 \yl@ydiff=67
904 \begin{sfpicture}(100,300)(0,0)
905 \if\@tmpb D\relax%
906 \Put@Line(-59,-48)(-5,-3){121}%
907 \Put@Line(-73,-26)(-5,-3){121}%southwest double bond
908 \else\if\@tmpb T\relax%
909 \Put@Line(-57,-52)(-5,-3){121}%
910 \Put@Line(-66,-37)(-5,-3){121}%
911 \else\if\@tmpb B%(B) beta
912 \Put@Line(-75,-22)(-5,-3){121}%southwest triple bond
913 {\thicklines\Put@Line(-66,-47)(-5,-3){121}}% single bond (alpha)
914 \else\if\@tmpb A%(A) alpha
915 \dotorline(-66,-47)(-5,-3){121}/(-66,-47)(-187,-120)%
916 \else\if\@tmpb S%
917 \Put@Line(-66,-47)(-5,-3){121}%
918 \else\if\@tmpb U% undefined
919 {%
920 \WaveBonds%
921 \Put@Line(-66,-47)(-5,-3){121}%
922 }%
923 \else \Put@Line(-66,-47)(-5,-3){121}%
924 \fi\fi\fi\fi\fi\fi%
925 \putlatom{-196}{-187}{\@memberb}%==2 (southwest substituent)
926 \end{sfpicture}}%
927 % \end{macrocode}
928 % \end{macro}
929 %
930 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
931 %
932 % \begin{macro}{\SWbond}
933 % \begin{macrocode}
934 \def\SWbond{%
935 \yl@xdiff=13
936 \yl@ydiff=56
937 \begin{sfpicture}(100,300)(0,0)
938 \if\@tmpb D\relax%
939 \Put@Line(-41,-46)(-1,-1){100}%
940 \Put@Line(-59,-28)(-1,-1){100}%southwest double bond
941 \else\if\@tmpb T\relax%
942 \Put@Line(-37,-50)(-1,-1){100}%
943 \Put@Line(-50,-37)(-1,-1){100}%
944 \Put@Line(-63,-24)(-1,-1){100}%southwest triple bond
945 \else\if\@tmpb B%(B) beta
946 {\thicklines\Put@Line(-50,-47)(-1,-1){100}}% single bond (alpha)
947 \else\if\@tmpb A%(A) alpha
948 \dotorline(-50,-47)(-1,-1){100}/(-50,-47)(-137,-147)%
949 \else\if\@tmpb S%
950 \Put@Line(-50,-47)(-1,-1){100}%
951 \else\if\@tmpb U% undefined
952 {%
953 \WaveBonds%
954 \Put@Line(-50,-47)(-1,-1){100}%
955 }%
956 \else \Put@Line(-50,-47)(-1,-1){100}%
957 \fi\fi\fi\fi\fi\fi%
958 \putlatom{-163}{-203}{\@memberb}%==3 (southwest substituent)
959 \end{sfpicture}}%
960 % \end{macrocode}
961 % \end{macro}
962 %
963 % \changes{v1.02}{1998/10/20}{New command: \cs{NEBOND}}
964 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
965 %
966 % \begin{macro}{\NEBOND}
967 % \begin{macrocode}
968 \def\NEBOND{%degree 120
969 \yl@xdiff=-1
970 \yl@ydiff=-10
971 \begin{sfpicture}(100,300)(0,0)
972 \if\@tmpb D\relax%
973 \Put@Line(48,33)(3,5){72}%
974 \Put@Line(26,47)(3,5){72}%northeast double bond
975 \else\if\@tmpb T\relax%
976 \Put@Line(52,31)(3,5){72}%
977 \Put@Line(37,40)(3,5){72}%
978 \Put@Line(22,49)(3,5){72}%northeast triple bond
979 \else\if\@tmpb B%(B) beta
980 {\thicklines\Put@Line(40,47)(3,5){72}}% single bond (alpha)
981 \else\if\@tmpb A%(A) alpha
982 \dotorline(47,40)(3,5){72}/(47,40)(120,161)%
983 \else\if\@tmpb S%
984 \Put@Line(47,40)(3,5){72}%
985 \else\if\@tmpb U% undefined
986 {%
987 \WaveBonds%
988 \Put@Line(47,40)(3,5){72}%
989 }%
990 \else \Put@Line(47,40)(3,5){72}%
991 \fi\fi\fi\fi\fi\fi%
992 \putratom{120}{170}{\@memberb}%==2 (northeast substituent)
993 \end{sfpicture}}%
994 % \end{macrocode}
995 % \end{macro}
996 %
997 % \changes{v1.02}{1998/10/20}{New command: \cs{SEBOND}}
998 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
999 %
1000 % \begin{macro}{\SEBOND}
1001 % \begin{macrocode}
1002 \def\SEBOND{%degree 120
1003 \yl@xdiff=-1
1004 \yl@ydiff=70
1005 \begin{sfpicture}(100,300)(0,0)
1006 \if\@tmpb D\relax%
1007 \Put@Line(48,-33)(3,-5){72}%
1008 \Put@Line(26,-47)(3,-5){72}%southeast double bond
1009 \else\if\@tmpb T\relax%
1010 \Put@Line(52,-31)(3,-5){72}%
1011 \Put@Line(37,-40)(3,-5){72}%
1012 \Put@Line(22,-49)(3,-5){72}%southeast triple bond
1013 \else\if\@tmpb B%(B) beta
1014 {\thicklines\Put@Line(47,-40)(3,-5){72}}% single bond (alpha)
1015 \else\if\@tmpb A%(A) alpha
1016 \dotorline(47,-40)(3,-5){72}/(47,-40)(120,-161)%
1017 \else\if\@tmpb S%
1018 \Put@Line(47,-40)(3,-5){72}%
1019 \else\if\@tmpb U% undefined
1020 {%
1021 \WaveBonds%
1022 \Put@Line(47,-40)(3,-5){72}%
1023 }%
1024 \else \Put@Line(47,-40)(3,-5){72}%
1025 \fi\fi\fi\fi\fi\fi%
1026 \putratom{120}{-230}{\@memberb}%==2 (southeast substituent)
1027 \end{sfpicture}}%
1028 % \end{macrocode}
1029 % \end{macro}
1030 %
1031 % \changes{v1.02}{1998/10/20}{New command: \cs{NWBOND}}
1032 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
1033 %
1034 % \begin{macro}{\NWBOND}
1035 % \begin{macrocode}
1036 \def\NWBOND{%
1037 \yl@xdiff=1
1038 \yl@ydiff=-10
1039 \begin{sfpicture}(100,300)(0,0)
1040 \if\@tmpb D\relax%
1041 \Put@Line(-48,33)(-3,5){72}%
1042 \Put@Line(-26,47)(-3,5){72}%northwest double bond
1043 \else\if\@tmpb T\relax%
1044 \Put@Line(-52,31)(-3,5){72}%
1045 \Put@Line(-37,40)(-3,5){72}%
1046 \Put@Line(-22,49)(-3,5){72}%northwest triple bond
1047 \else\if\@tmpb B%(B) beta
1048 {\thicklines\Put@Line(-40,47)(-3,5){72}}% single bond (alpha)
1049 \else\if\@tmpb A%(A) alpha
1050 \dotorline(-47,40)(-3,5){72}/(-47,40)(-120,161)%
1051 \else\if\@tmpb S%
1052 \Put@Line(-47,40)(-3,5){72}%
1053 \else\if\@tmpb U% undefined
1054 {%
1055 \WaveBonds%
1056 \Put@Line(-47,40)(-3,5){72}%
1057 }%
1058 \else \Put@Line(-47,40)(-3,5){72}%
1059 \fi\fi\fi\fi\fi\fi%
1060 \putlatom{-120}{170}{\@memberb}%==2 (northwest substituent)
1061 \end{sfpicture}}%
1062 % \end{macrocode}
1063 % \end{macro}
1064 %
1065 % \changes{v1.02}{1998/10/20}{New command: \cs{SWBOND}}
1066 % \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
1067 %
1068 % \begin{macro}{\SWBOND}
1069 % \begin{macrocode}
1070 \def\SWBOND{%
1071 \yl@xdiff=1
1072 \yl@ydiff=70
1073 \begin{sfpicture}(100,300)(0,0)
1074 \if\@tmpb D\relax%
1075 \Put@Line(-48,-33)(-3,-5){72}%
1076 \Put@Line(-26,-47)(-3,-5){72}%southwest double bond
1077 \else\if\@tmpb T\relax%
1078 \Put@Line(-52,-31)(-3,-5){72}%
1079 \Put@Line(-37,-40)(-3,-5){72}%
1080 \Put@Line(-22,-49)(-3,-5){72}%southwest triple bond
1081 \else\if\@tmpb B%(B) beta
1082 {\thicklines\Put@Line(-47,-40)(-3,-5){72}}% single bond (alpha)
1083 \else\if\@tmpb A%(A) alpha
1084 \dotorline(-47,-40)(-3,-5){72}/(-47,-40)(-120,-161)%
1085 \else\if\@tmpb S%
1086 \Put@Line(-47,-40)(-3,-5){72}%
1087 \else\if\@tmpb U% undefined
1088 {%
1089 \WaveBonds%
1090 \Put@Line(-47,-40)(-3,-5){72}%
1091 }%
1092 \else \Put@Line(-47,-40)(-3,-5){72}%
1093 \fi\fi\fi\fi\fi\fi%
1094 \putlatom{-120}{-230}{\@memberb}%==2 (southwest substituent)
1095 \end{sfpicture}}%
1096 % \end{macrocode}
1097 % \end{macro}
1098 %
1099 % \section{Tetrahedral unit}
1100 %
1101 % The macro |\tetrahedral| typesets a compound of tetravalency.
1102 % The following numbering is adopted in this macro.
1103 %
1104 % \begin{verbatim}
1105 % ********************
1106 % * tetrahedral unit *
1107 % ********************
1108 %
1109 % 1
1110 %
1111 % |
1112 % 2 -- 0 -- 4 0 <== the original point
1113 % |
1114 %
1115 % 3
1116 % \end{verbatim}
1117 %
1118 % This macro has an argument |SUBSLIST| as well as an optional
1119 % argument |AUXLIST|.
1120 %
1121 % \begin{verbatim}
1122 % \tetrahedral[AUXLIST]{SUBSLIST}<L1,L2,L3,L4>
1123 % \end{verbatim}
1124 %
1125 % The arugument |AUXLIST| designates an character on the central
1126 % atom of the formula drawn by this macro. It can be used a plus
1127 % or minus charge on the center.
1128 %
1129 % \begin{verbatim}
1130 % AUXLIST =
1131 %
1132 % {0+} : + charge (or another one chararacter) on the center
1133 % \end{verbatim}
1134 %
1135 % The arugument |SUBLIST| designates a set of substitutients.
1136 %
1137 % \begin{verbatim}
1138 % SUBSLIST: list of substituents
1139 %
1140 % for n = 1 to 4
1141 %
1142 % nT : triple bond at n-atom
1143 % nD : double bond at n-atom
1144 % n or nS : single bond at n-atom
1145 % nA : alpha single bond at n-atom
1146 % nB : beta single bond at n-atom
1147 %
1148 % for 0 : cetral atom (e.g. 0==C)
1149 % \end{verbatim}
1150 %
1151 %
1152 % The arguments |Ln| (n = 1, 2, 3, 4) represents the bond length
1153 % of the bond 0--n (n = 1, 2, 3, 4). This is used to realize variable
1154 % bond lengths. The vacant for the |Ln| depicts a bond of the standard
1155 % bond length.
1156 % \changes{v4.01}{2004/8/30}{Variable bond length.}
1157 %
1158 %
1159 % \begin{verbatim}
1160 % e.g.
1161 %
1162 % \tetrahedral{1==Cl;2==F}
1163 % \tetrahedral{1==Cl;4==F;2==CH$_{3}$}
1164 % \end{verbatim}
1165 % \changes{v1.02}{1998/10/31}{Adding \cs{yltetrahedralposition},
1166 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
1167 % \cs{yl@xdiff} and \cs{yl@ydiff}}
1168 %
1169 % \changes{v4.01}{2004/8/30}{Variable sized central atoms}
1170 % \changes{v4.05}{2009/11/07}{bug fix: @tetrahedral to @@tetrahedral}
1171 % \changes{v5.00}{2010/10/01}{for bond coloring}
1172 %
1173 % \begin{macro}{\tetrahedral}
1174 % \begin{macro}{\@tetrahedral}
1175 % \begin{macrocode}
1176 \def\tetrahedral{\@ifnextchar[{\@tetrahedral[r}{\@tetrahedral[r]}}
1177 \def\@tetrahedral#1]#2{%
1178 \@ifnextchar<{\@@tetrahedral#1]{#2}}{\@@tetrahedral#1]{#2}<,,,>}}%bug @ added 2009/11/07
1179 \def\@@tetrahedral#1]#2<#3,#4,#5,#6>{%
1180 \@reset@ylsw%
1181 \West@bondfalse
1182 \East@bondfalse
1183 \centralatomcheck{#2}%
1184 \yltetrahedralposition{#2}%
1185 \if@ylsw \ifx\@@ylii\empty
1186 \def\@@ylii{0}\def\@@yli{0}\fi
1187 \fi
1188 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1189 (600,600)(-300,-300){tetrahedral}%2002/4/30 by S. Fujita
1190 (300,300)%
1191 \@tfor\member:=#1\do{%
1192 \expandafter\twoch@@r\member{}{}%
1193 \if\@@tmpa 0\relax {\putratom{47}{50}{\scriptsize\@@tmpb}}\fi}%
1194 %%%%%%%%%%%%%%%%%%%%%%
1195 %setting central atom%
1196 %%%%%%%%%%%%%%%%%%%%%%
1197 \@tempdima=0pt
1198 \@forsemicol\member:=#2\do{%
1199 \ifx\member\empty\else
1200 \expandafter\@m@mb@r\member;\relax%
1201 \expandafter\threech@r\@membera{}{}%
1202 \ifx\@memberb\@yl\else
1203 \ifcase\@tmpa%central atom
1204 \setbox9=\hbox{\@memberb}%
1205 \ifdim\wd9<0.72em
1206 \@tempdima=0.72em
1207 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%
1208 \else
1209 \ifWest@bond
1210 \@tempdima=\wd9
1211 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb}}}%central atom
1212 %%%\global\West@bondfalse
1213 \else
1214 \@tempdima=\wd9
1215 {\putlratom{-40}{-33}{\hbox to.72em{\@memberb\hss}}}%central atom
1216 \fi\fi
1217 \else%%no action
1218 \fi%end of ifcase%
1219 \fi\fi}%
1220 %%%%%%%%%%%%%%%%%%%%%%
1221 %%setting four bonds%%
1222 %%%%%%%%%%%%%%%%%%%%%%
1223 \@forsemicol\member:=#2\do{%
1224 \ifx\member\empty\else
1225 \expandafter\@m@mb@r\member;\relax%
1226 \expandafter\threech@r\@membera{}{}%
1227 \ifx\@memberb\@yl\else
1228 \ifcase\@tmpa
1229 \or
1230 \ifWest@bond
1231 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Northbond[#3]}}%
1232 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Northbond[#3]}%
1233 \else
1234 \setBScolor{\Put@Direct(0,0){\Northbond[#3]}}%
1235 %\Put@Direct(0,0){\Northbond[#3]}%
1236 \fi
1237 \or{%
1238 \ifWest@bond
1239 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Westbond[#4]}}%
1240 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Westbond[#4]}%
1241 \else
1242 \setBScolor{\Put@Direct(0,0){\Westbond[#4]}}%
1243 %\Put@Direct(0,0){\Westbond[#4]}%
1244 \fi
1245 }%
1246 \or
1247 \ifWest@bond
1248 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Southbond[#5]}}%
1249 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\Southbond[#5]}%
1250 \else
1251 \setBScolor{\Put@Direct(0,0){\Southbond[#5]}}%
1252 %\Put@Direct(0,0){\Southbond[#5]}%
1253 \fi
1254 \or{%
1255 \ifno@centeratom%
1256 \setBScolor{\Put@Direct(0,0){\Eastbond[#6]}}%
1257 %\Put@Direct(0,0){\Eastbond[#6]}%
1258 \else%
1259 %\advance\@tempdima by-0.72em
1260 %\Put@Direct(0,0){\kern\@tempdima\Eastbond[#6]}%
1261 \setBScolor{\Put@Direct(0,0){\kern\@tempdima\kern-0.72em\Eastbond[#6]}}%
1262 %\Put@Direct(0,0){\kern\@tempdima\kern-0.72em\Eastbond[#6]}%
1263 \fi}%
1264 \fi%end of ifcase
1265 \fi\fi}%
1266 \end{ShiftPicEnvB}%
1267 \West@bondfalse
1268 \East@bondfalse
1269 }%end of macro tetrahedral
1270 % \end{macrocode}
1271 % \end{macro}
1272 % \end{macro}
1273 %
1274 % \changes{v4.01}{2004/8/30}{Newly added macro:
1275 % \cs{centralatomcheck}}
1276 %
1277 % \begin{macro}{\centralatomcheck}
1278 % \begin{macrocode}
1279 \def\centralatomcheck#1{%
1280 \no@centeratomtrue%
1281 \@forsemicol\member:=#1\do{%
1282 \ifx\member\empty\else
1283 \expandafter\@m@mb@r\member;\relax
1284 \expandafter\threech@r\@membera{}{}\relax
1285 \ifcase\@tmpa\relax%
1286 \no@centeratomfalse%
1287 \else%no action
1288 \fi\fi%
1289 }}
1290 % \end{macrocode}
1291 % \end{macro}
1292 %
1293 % The command |\yltetrahedralposition| is used in
1294 % |\tetrahedral| to adjust a substitution position.
1295 % \changes{v1.02}{1998/10/20}{Newly added command:
1296 % \cs{yltetrahedralposition}}
1297 % \changes{v4.01}{2004/8/30}{Newly added switches:
1298 % \cs{ifEast@bond} and \cs{ifWest@bond}}
1299 % \changes{v5.01}{2013/7/30}{Bug fix}
1300 %
1301 % \begin{macro}{\yltetrahedralposition}
1302 % \begin{macrocode}
1303 \newif\ifEast@bond
1304 \newif\ifWest@bond
1305 \def\yltetrahedralposition#1{%
1306 \@@ylswfalse%%%\@reset@ylsw
1307 \reset@@yl%%2013/07/30bug fix
1308 \West@bondfalse
1309 \East@bondfalse
1310 \@forsemicol\member:=#1\do{%
1311 \if@@ylsw\else
1312 \ifx\member\empty\else
1313 \expandafter\@m@mb@r\member;\relax
1314 \expandafter\threech@r\@membera{}{}\relax
1315 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1316 \if@@ylsw%
1317 \ifcase\@tmpa%
1318 \or%
1319 \ifno@centeratom%
1320 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 1
1321 \else%
1322 \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
1323 \fi%
1324 \or%
1325 \ifno@centeratom%
1326 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
1327 \else%
1328 \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%
1329 \fi%
1330 \East@bondtrue%W subst. on 1
1331 \or%
1332 \ifno@centeratom%
1333 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%S subst. on 1
1334 \else%
1335 \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
1336 \fi%
1337 \or%
1338 \ifno@centeratom%
1339 % \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%??????
1340 \gdef\@ylii{-72}\gdef\@yli{0}\global\@ylswtrue%??????
1341 \else%
1342 \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%
1343 \fi%
1344 \West@bondtrue%E subst. on 1
1345 \fi%end of ifcase
1346 \fi\fi\fi}}%
1347 % \end{macrocode}
1348 % \end{macro}
1349 %
1350 % \section{Divalenth unit}
1351 %
1352 % The command |\divalenth| produces a length-variable divalent unit.
1353 % \changes{v2.00}{1998/12/14}{New command: \cs{divalenth}}
1354 % \changes{v5.00}{2010/10/01}{for bond coloring}
1355 %
1356 % \begin{verbatim}
1357 % ******************
1358 % * Divalenth unit *
1359 % ******************
1360 %
1361 %
1362 %
1363 % 1 -- (group) -- 2 0 <== the original point
1364 %
1365 % \end{verbatim}
1366 %
1367 % This macro has an argument |SUBSLIST| as well as an optional
1368 % argument |GROUP|.
1369 %
1370 % \begin{verbatim}
1371 % \divalenth{GROUP}{SUBSLIST}
1372 % \end{verbatim}
1373 %
1374 % The arugument |GROUP| designates a character strings representing
1375 % a divalent group. The locant number is fixed to be zero.
1376 %
1377 % The arugument |SUBLIST| designates a set of substitutients.
1378 %
1379 % \begin{verbatim}
1380 % SUBSLIST: list of substituents
1381 %
1382 % for n = 1 to 4
1383 %
1384 % nT : triple bond at n-atom
1385 % nD : double bond at n-atom
1386 % n or nS : single bond at n-atom
1387 % nA : alpha single bond at n-atom
1388 % nB : beta single bond at n-atom
1389 %
1390 % for 0 : cetral atom (e.g. 0==C)
1391 % \end{verbatim}
1392 %
1393 %
1394 % \begin{macro}{\divalenth}
1395 % \begin{macrocode}
1396 \def\divalenth#1#2{%
1397 \@reset@ylsw%
1398 \yldivalenthposition{#1}{#2}%
1399 \if@ylsw \ifx\@@ylii\empty
1400 \def\@@ylii{0}\def\@@yli{0}\fi
1401 \fi
1402 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1403 (600,400)(-300,-200){\divalenth}%2002/4/30 by S. Fujita
1404 (300,200)%
1405 {\expandafter\@m@mb@r#1;\relax
1406 \putratom{-30}{-33}{\@memberb}}%
1407 \@forsemicol\member:=#2\do{%
1408 \ifx\member\empty\else
1409 \expandafter\@m@mb@r\member;\relax%
1410 \expandafter\threech@r\@membera{}{}%
1411 \ifx\@memberb\@yl\else
1412 \ifcase\@tmpa
1413 \or\setBScolor{\Put@Direct(0,0){\Westbond}}%
1414 %\Put@Direct(0,0){\Westbond}%
1415 \or\setBScolor{\Put@Direct(\the\@tempcnta,0){\Eastbond}}%
1416 %\Put@Direct(\the\@tempcnta,0){\Eastbond}%
1417 \fi%end of ifcase
1418 \fi\fi}%
1419 \end{ShiftPicEnvB}%
1420 }%end of macro tetrahedral
1421 % \end{macrocode}
1422 % \end{macro}
1423 %
1424 % The command |\yldivalenthposition| is used in
1425 % |\tetrahedral| to adjust a substitution position.
1426 % \changes{v2.00}{1998/12/14}{Newly added command:
1427 % \cs{yldivalenthposition}}
1428 %
1429 % \begin{macro}{\yldivalenthposition}
1430 % \begin{macrocode}
1431 \def\yldivalenthposition#1#2{%
1432 {\expandafter\@m@mb@r#1;\relax
1433 \setbox0=\hbox{\@memberb}%
1434 \@tempcnta=\wd0
1435 \@tempcntb=\unitlength
1436 \divide\@tempcnta by\@tempcntb
1437 \global\advance\@tempcnta by-62%
1438 \@tempcntb=\@tempcnta \global\advance\@tempcntb by50\relax
1439 }%
1440 \@@ylswfalse%
1441 \@forsemicol\member:=#2\do{%
1442 \if@@ylsw\else
1443 \ifx\member\empty\else
1444 \expandafter\@m@mb@r\member;\relax
1445 \expandafter\threech@r\@membera{}{}\relax
1446 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1447 \if@@ylsw
1448 \ifcase\@tmpa
1449 \or \gdef\@ylii{50}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
1450 \or \edef\@ylii{-\the\@tempcntb}\gdef\@yli{0}\global\@ylswtrue%E subst. on 1
1451 \fi%end of ifcase
1452 \fi\fi\fi}}%
1453 % \end{macrocode}
1454 % \end{macro}
1455 %
1456 % \section{Trigonal unit}
1457 % \subsection{Right-hand trigonal unit (narrow type)}
1458 %
1459 % The macro |\rtrigonal| typesets a compound of trivalency.
1460 % The following numbering is adopted in this macro.
1461 % The two right-hand bonds form an angle of 90$^{\circ}$ (narrow type),
1462 % while the left-hand bond is typeset horizontally.
1463 %
1464 % \begin{verbatim}
1465 % *************************
1466 % * trigonal unit (right) *
1467 % *************************
1468 %
1469 % 3
1470 % /
1471 % /
1472 % 1 --- 0 90 0 <== the original point
1473 % `
1474 % `
1475 % 2
1476 % \end{verbatim}
1477 %
1478 % This macro has an argument |SUBSLIST| as well as an optional
1479 % argument |AUXLIST|.
1480 %
1481 % \begin{verbatim}
1482 % \rtrigonal[AUXLIST]{SUBSLIST}
1483 % \end{verbatim}
1484 %
1485 % The arugument |AUXLIST| designates an character on the central
1486 % atom of the formula drawn by this macro. It can be used a plus
1487 % or minus charge on the center.
1488 %
1489 % \begin{verbatim}
1490 % AUXLIST =
1491 %
1492 % {0+}: + charge (or another one chararacter) on the center
1493 % \end{verbatim}
1494 %
1495 % The arugument |SUBLIST| designates a set of substitutients.
1496 %
1497 % \begin{verbatim}
1498 % SUBSLIST: list of substituents
1499 %
1500 % for n = 1 to 3
1501 %
1502 % nT : triple bond at n-atom
1503 % nD : double bond at n-atom
1504 % n or nS : single bond at n-atom
1505 % nA : alpha single bond at n-atom
1506 % nB : beta single bond at n-atom
1507 %
1508 % for 0 : cetral atom (e.g. 0==C)
1509 % \end{verbatim}
1510 %
1511 % \begin{verbatim}
1512 % e.g.
1513 %
1514 % \rtrigonal{1==Cl;2==F}
1515 % \rtrigonal{1==Cl;4==F;2==CH$_{3}$}
1516 % \end{verbatim}
1517 %
1518 % \changes{v1.02}{1998/10/31}{Adding \cs{ylrtrigonalposition},
1519 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
1520 % \cs{yl@xdiff} and \cs{yl@ydiff}}
1521 % \changes{v5.00}{2010/10/01}{for bond coloring}
1522 %
1523 % \begin{macro}{\rtrigonal}
1524 % \begin{macro}{\@rtrigonal}
1525 % \begin{macrocode}
1526 \def\rtrigonal{\@ifnextchar[{\@rtrigonal[r}{\@rtrigonal[r]}}
1527 \def\@rtrigonal#1]#2{%
1528 \begingroup
1529 \@reset@ylsw%
1530 \West@bondfalse
1531 \East@bondfalse
1532 \ylrtrigonalposition{#2}%
1533 \if@ylsw \ifx\@@ylii\empty
1534 \def\@@ylii{0}\def\@@yli{0}\fi
1535 \fi
1536 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1537 (600,600)(-300,-300){rtrigonal}%2002/4/30 by S. Fujita
1538 (300,300)%
1539 \@tfor\member:=#1\do{%
1540 \expandafter\twoch@@r\member{}{}%
1541 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
1542 \@forsemicol\member:=#2\do{%
1543 \ifx\member\empty\else
1544 \expandafter\@m@mb@r\member;\relax%
1545 \expandafter\threech@r\@membera{}{}%
1546 \ifx\@memberb\@yl\else
1547 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
1548 \or\setBScolor{\Put@Direct(0,0){\Westbond}}%
1549 %\Put@Direct(0,0){\Westbond}%
1550 \or\setBScolor{\Put@Direct(0,0){\SEbond}}%
1551 %\Put@Direct(0,0){\SEbond}%
1552 \or\setBScolor{\Put@Direct(0,0){\NEbond}}%
1553 %\Put@Direct(0,0){\NEbond}%
1554 \fi%end of ifcase
1555 \fi\fi}%
1556 \end{ShiftPicEnvB}%
1557 \endgroup}%end of macro rtrigonal
1558 % \end{macrocode}
1559 % \end{macro}
1560 % \end{macro}
1561 %
1562 % The command |\ylrtrigonalposition| is used in
1563 % |\rtrigonal| to adjust a substitution position.
1564 % \changes{v1.02}{1998/10/20}{Newly added command:
1565 % \cs{ylrtrigonalposition}}
1566 %
1567 % \begin{macro}{\ylrtrigonalposition}
1568 % \begin{macrocode}
1569 \def\ylrtrigonalposition#1{%
1570 \@@ylswfalse%%%\@reset@ylsw
1571 \@forsemicol\member:=#1\do{%
1572 \if@@ylsw\else
1573 \ifx\member\empty\else
1574 \expandafter\@m@mb@r\member;\relax
1575 \expandafter\threech@r\@membera{}{}\relax
1576 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1577 \if@@ylsw
1578 \ifcase\@tmpa
1579 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
1580 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
1581 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
1582 \fi%end of ifcase
1583 \fi\fi\fi}}%
1584 % \end{macrocode}
1585 % \end{macro}
1586 %
1587 % \subsection{Right-hand trigonal unit (broad type)}
1588 %
1589 % The macro |\Rtrigonal| typesets a compound of trivalency.
1590 % The following numbering is adopted in this macro.
1591 % The two right-hand bonds form an angle of 120$^{\circ}$ (broad type),
1592 % while the left-hand bond is typeset horizontally.
1593 % \changes{v1.02}{1998/10/20}{New command: \cs{Rtrigonal}}
1594 % \changes{v5.00}{2010/10/01}{for bond coloring}
1595 %
1596 % \begin{verbatim}
1597 % *************************
1598 % * trigonal unit (right) *
1599 % *************************
1600 %
1601 % 3
1602 % /
1603 % /
1604 % 1 --- 0 120 0 <== the original point
1605 % `
1606 % `
1607 % 2
1608 % \end{verbatim}
1609 %
1610 % This macro has an argument |SUBSLIST| as well as an optional
1611 % argument |AUXLIST|.
1612 %
1613 % \begin{verbatim}
1614 % \rtrigonal[AUXLIST]{SUBSLIST}
1615 % \end{verbatim}
1616 %
1617 % The arugument |AUXLIST| designates an character on the central
1618 % atom of the formula drawn by this macro. It can be used a plus
1619 % or minus charge on the center.
1620 %
1621 % \begin{verbatim}
1622 % AUXLIST =
1623 %
1624 % {0+}: + charge (or another one chararacter) on the center
1625 % \end{verbatim}
1626 %
1627 % The arugument |SUBLIST| designates a set of substitutients.
1628 %
1629 % \begin{verbatim}
1630 % SUBSLIST: list of substituents
1631 %
1632 % for n = 1 to 3
1633 %
1634 % nT : triple bond at n-atom
1635 % nD : double bond at n-atom
1636 % n or nS : single bond at n-atom
1637 % nA : alpha single bond at n-atom
1638 % nB : beta single bond at n-atom
1639 %
1640 % for 0 : cetral atom (e.g. 0==C)
1641 % \end{verbatim}
1642 %
1643 % \begin{verbatim}
1644 % e.g.
1645 %
1646 % \rtrigonal{1==Cl;2==F}
1647 % \rtrigonal{1==Cl;4==F;2==CH$_{3}$}
1648 % \end{verbatim}
1649 %
1650 % \changes{v1.02}{1998/10/31}{Adding \cs{ylRtrigonalposition},
1651 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
1652 % \cs{yl@xdiff} and \cs{yl@ydiff}}
1653 %
1654 % \begin{macro}{\Rtrigonal}
1655 % \begin{macro}{\@Rtrigonal}
1656 % \begin{macrocode}
1657 \def\Rtrigonal{\@ifnextchar[{\@Rtrigonal[r}{\@Rtrigonal[r]}}
1658 \def\@Rtrigonal#1]#2{%
1659 \begingroup
1660 \@reset@ylsw%
1661 \West@bondfalse
1662 \East@bondfalse
1663 \ylRtrigonalposition{#2}%
1664 \if@ylsw \ifx\@@ylii\empty
1665 \def\@@ylii{0}\def\@@yli{0}\fi
1666 \fi
1667 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1668 (600,600)(-300,-300){Rtrigonal}%2002/4/30 by S. Fujita
1669 (300,300)%
1670 \@tfor\member:=#1\do{%
1671 \expandafter\twoch@@r\member{}{}%
1672 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
1673 \@forsemicol\member:=#2\do{%
1674 \ifx\member\empty\else
1675 \expandafter\@m@mb@r\member;\relax%
1676 \expandafter\threech@r\@membera{}{}%
1677 \ifx\@memberb\@yl\else
1678 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
1679 \or\setBScolor{\Put@Direct(0,0){\Westbond}}%
1680 %\Put@Direct(0,0){\Westbond}%
1681 \or\setBScolor{\Put@Direct(0,0){\SEBOND}}%
1682 %\Put@Direct(0,0){\SEBOND}%
1683 \or\setBScolor{\Put@Direct(0,0){\NEBOND}}%
1684 %\Put@Direct(0,0){\NEBOND}%
1685 \fi%end of ifcase
1686 \fi\fi}%
1687 \end{ShiftPicEnvB}%
1688 \endgroup}%end of macro Rtrigonal
1689 % \end{macrocode}
1690 % \end{macro}
1691 % \end{macro}
1692 %
1693 % The command |\ylRtrigonalposition| is used in
1694 % |\Rtrigonal| to adjust a substitution position.
1695 % \changes{v1.02}{1998/10/20}{Newly added command:
1696 % \cs{ylRtrigonalposition}}
1697 %
1698 % \begin{macro}{\ylRtrigonalposition}
1699 % \begin{macrocode}
1700 \def\ylRtrigonalposition#1{%
1701 \@@ylswfalse%%%\@reset@ylsw
1702 \@forsemicol\member:=#1\do{%
1703 \if@@ylsw\else
1704 \ifx\member\empty\else
1705 \expandafter\@m@mb@r\member;\relax
1706 \expandafter\threech@r\@membera{}{}\relax
1707 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1708 \if@@ylsw
1709 \ifcase\@tmpa
1710 \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1
1711 \or \gdef\@ylii{-47}\gdef\@yli{40}\global\@ylswtrue% SE subst. on 1
1712 \or \gdef\@ylii{-47}\gdef\@yli{-40}\global\@ylswtrue% NE subst. on 1
1713 \fi%end of ifcase
1714 \fi\fi\fi}}%
1715 % \end{macrocode}
1716 % \end{macro}
1717 %
1718 % \subsection{Left-hand trigonal unit (narrow type)}
1719 %
1720 % The macro |\ltrigonal| typesets a compound of trivalency.
1721 % The following numbering is adopted in this macro.
1722 % The two left-hand bonds form an angle of 90$^{\circ}$ (narrow type),
1723 % while the right-hand bond is typeset horizontally.
1724 % \changes{v5.00}{2010/10/01}{for bond coloring}
1725 %
1726 % \begin{verbatim}
1727 % ************************
1728 % * trigonal unit (left) *
1729 % ************************
1730 %
1731 % 2
1732 % `
1733 % `
1734 % 90 0 --- 1 0 <== the original point
1735 % /
1736 % /
1737 % 3
1738 % \end{verbatim}
1739 %
1740 % This macro has an argument |SUBSLIST| as well as an optional
1741 % argument |AUXLIST|.
1742 %
1743 % \begin{verbatim}
1744 % \ltrigonal[AUXLIST]{SUBSLIST}
1745 % \end{verbatim}
1746 %
1747 % The arugument |AUXLIST| designates an character on the central
1748 % atom of the formula drawn by this macro. It can be used a plus
1749 % or minus charge on the center.
1750 %
1751 % \begin{verbatim}
1752 % AUXLIST =
1753 %
1754 % {0+} : + charge (or another one chararacter) on the center
1755 % \end{verbatim}
1756 %
1757 % The arugument |SUBLIST| designates a set of substitutients.
1758 %
1759 % \begin{verbatim}
1760 % SUBSLIST: list of substituents
1761 %
1762 % for n = 1 to 3
1763 %
1764 % nT : triple bond at n-atom
1765 % nD : double bond at n-atom
1766 % n or nS : single bond at n-atom
1767 % nA : alpha single bond at n-atom
1768 % nB : beta single bond at n-atom
1769 %
1770 % for 0 : cetral atom (e.g. 0==C)
1771 % \end{verbatim}
1772 %
1773 % \begin{verbatim}
1774 % e.g.
1775 %
1776 % \ltrigonal{1==Cl;2==F}
1777 % \ltrigonal{0==C;1==Cl;2==F;3==CH$_{3}$}
1778 % \end{verbatim}
1779 % \changes{v1.02}{1998/10/31}{Adding \cs{ylltrigonalposition},
1780 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
1781 % \cs{yl@xdiff} and \cs{yl@ydiff}}
1782 % \changes{v4.01}{2004/8/30}{Variable sized central atoms}
1783 % \changes{v5.00}{2010/10/01}{for bond coloring}
1784 %
1785 % \begin{macro}{\ltrigonal}
1786 % \begin{macro}{\@ltrigonal}
1787 % \begin{macrocode}
1788 \def\ltrigonal{\@ifnextchar[{\@ltrigonal[r}{\@ltrigonal[r]}}
1789 \def\@ltrigonal#1]#2{%
1790 \begingroup
1791 \@reset@ylsw%
1792 \West@bondfalse
1793 \East@bondfalse
1794 \ylltrigonalposition{#2}%
1795 \if@ylsw \ifx\@@ylii\empty
1796 \def\@@ylii{0}\def\@@yli{0}\fi
1797 \fi
1798 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1799 (600,600)(-300,-300){ltrigonal}%2002/4/30 by S. Fujita
1800 (300,300)%
1801 \@tfor\member:=#1\do{%
1802 \expandafter\twoch@@r\member{}{}%
1803 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
1804 \@tempdima=0pt
1805 \@forsemicol\member:=#2\do{%
1806 \ifx\member\empty\else
1807 \expandafter\@m@mb@r\member;\relax%
1808 \expandafter\threech@r\@membera{}{}%
1809 \ifx\@memberb\@yl\else
1810 \ifcase\@tmpa
1811 \setbox9=\hbox{\@memberb}%
1812 \ifdim\wd9<0.72em
1813 \@tempdima=0.72em
1814 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%central atom
1815 \else
1816 \ifWest@bond
1817 \@tempdima=\wd9
1818 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb}}}%central atom
1819 \else
1820 \@tempdima=\wd9
1821 {\putlratom{-40}{-33}{\hbox to.72em{\@memberb\hss}}}%central atom
1822 \fi\fi
1823 \else%%no action
1824 \fi%end of ifcase
1825 \fi\fi}%
1826 %%%%%
1827 \@forsemicol\member:=#2\do{%
1828 \ifx\member\empty\else
1829 \expandafter\@m@mb@r\member;\relax%
1830 \expandafter\threech@r\@membera{}{}%
1831 \ifx\@memberb\@yl\else
1832 \ifcase\@tmpa
1833 \or{%
1834 \advance\@tempdima by-0.72em
1835 \setBScolor{\Put@Direct(0,0){\kern\@tempdima\Eastbond}}}%
1836 %\Put@Direct(0,0){\kern\@tempdima\Eastbond}}%
1837 \or{%
1838 \ifWest@bond
1839 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWbond}}%
1840 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWbond}%
1841 \else
1842 \setBScolor{\Put@Direct(0,0){\NWbond}}%
1843 %\Put@Direct(0,0){\NWbond}%
1844 \fi
1845 }%
1846 \or{%
1847 \ifWest@bond
1848 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWbond}}%
1849 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWbond}%
1850 \else
1851 \setBScolor{\Put@Direct(0,0){\SWbond}}%
1852 %\Put@Direct(0,0){\SWbond}%
1853 \fi
1854 }%
1855 \fi%end of ifcase
1856 \fi\fi}%
1857 \end{ShiftPicEnvB}%
1858 \West@bondfalse
1859 \East@bondfalse
1860 \endgroup}%end of macro ltrigonal
1861 % \end{macrocode}
1862 % \end{macro}
1863 % \end{macro}
1864 %
1865 % The command |\ylltrigonalposition| is used in
1866 % |\ltrigonal| to adjust a substitution position.
1867 % \changes{v1.02}{1998/10/20}{Newly added command:
1868 % \cs{ylltrigonalposition}}
1869 % \changes{v4.01}{2004/8/30}{Newly added switch:
1870 % \cs{ifWest@bond}}
1871 %
1872 % \begin{macro}{\ylltrigonalposition}
1873 % \begin{macrocode}
1874 \def\ylltrigonalposition#1{%
1875 \@@ylswfalse%%%\@reset@ylsw
1876 \@forsemicol\member:=#1\do{%
1877 \if@@ylsw\else
1878 \ifx\member\empty\else
1879 \expandafter\@m@mb@r\member;\relax
1880 \expandafter\threech@r\@membera{}{}\relax
1881 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
1882 \if@@ylsw
1883 \ifcase\@tmpa
1884 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% E subst. on 1
1885 \West@bondtrue%
1886 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
1887 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
1888 \fi%end of ifcase
1889 \fi\fi\fi}}%
1890 % \end{macrocode}
1891 % \end{macro}
1892 %
1893 % \subsection{Left-hand trigonal unit (broad type)}
1894 %
1895 % The macro |\Ltrigonal| typesets a compound of trivalency.
1896 % The following numbering is adopted in this macro.
1897 % The two left-hand bonds form an angle of 120$^{\circ}$ (broad type),
1898 % while the right-hand bond is typeset horizontally.
1899 % \changes{v1.02}{1998/10/20}{New command: \cs{Ltrigonal}}
1900 %
1901 % \begin{verbatim}
1902 % ************************
1903 % * trigonal unit (left) *
1904 % ************************
1905 %
1906 % 2
1907 % `
1908 % `
1909 % 120 0 --- 1 0 <== the original point
1910 % /
1911 % /
1912 % 3
1913 % \end{verbatim}
1914 %
1915 % This macro has an argument |SUBSLIST| as well as an optional
1916 % argument |AUXLIST|.
1917 %
1918 % \begin{verbatim}
1919 % \Ltrigonal[AUXLIST]{SUBSLIST}
1920 % \end{verbatim}
1921 %
1922 % The arugument |AUXLIST| designates an character on the central
1923 % atom of the formula drawn by this macro. It can be used a plus
1924 % or minus charge on the center.
1925 %
1926 % \begin{verbatim}
1927 % AUXLIST =
1928 %
1929 % {0+} : + charge (or another one chararacter) on the center
1930 % \end{verbatim}
1931 %
1932 % The arugument |SUBLIST| designates a set of substitutients.
1933 %
1934 % \begin{verbatim}
1935 % SUBSLIST: list of substituents
1936 %
1937 % for n = 1 to 3
1938 %
1939 % nT : triple bond at n-atom
1940 % nD : double bond at n-atom
1941 % n or nS : single bond at n-atom
1942 % nA : alpha single bond at n-atom
1943 % nB : beta single bond at n-atom
1944 %
1945 % for 0 : cetral atom (e.g. 0==C)
1946 % \end{verbatim}
1947 %
1948 % \begin{verbatim}
1949 % e.g.
1950 %
1951 % \Ltrigonal{1==Cl;2==F}
1952 % \Ltrigonal{1==Cl;4==F;2==CH$_{3}$}
1953 % \end{verbatim}
1954 % \changes{v1.02}{1998/10/31}{Adding \cs{ylLtrigonalposition},
1955 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
1956 % \cs{yl@xdiff} and \cs{yl@ydiff}}
1957 % \changes{v4.01}{2004/8/30}{Variable sized central atoms}
1958 % \changes{v4.01}{2004/8/30}{Newly added switch:
1959 % \cs{ifWest@bond}}
1960 % \changes{v5.00}{2010/10/01}{for bond coloring}
1961 %
1962 % \begin{macro}{\Ltrigonal}
1963 % \begin{macro}{\@Ltrigonal}
1964 % \begin{macrocode}
1965 \def\Ltrigonal{\@ifnextchar[{\@Ltrigonal[r}{\@Ltrigonal[r]}}
1966 \def\@Ltrigonal#1]#2{%
1967 \begingroup
1968 \@reset@ylsw%
1969 \West@bondfalse
1970 \East@bondfalse
1971 \ylLtrigonalposition{#2}%
1972 \if@ylsw \ifx\@@ylii\empty
1973 \def\@@ylii{0}\def\@@yli{0}\fi
1974 \fi
1975 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
1976 (600,600)(-300,-300){Ltrigonal}%2002/4/30 by S. Fujita
1977 (300,300)%
1978 \@tfor\member:=#1\do{%
1979 \expandafter\twoch@@r\member{}{}%
1980 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
1981 \@tempdima=0pt
1982 \@forsemicol\member:=#2\do{%
1983 \ifx\member\empty\else
1984 \expandafter\@m@mb@r\member;\relax%
1985 \expandafter\threech@r\@membera{}{}%
1986 \ifx\@memberb\@yl\else
1987 \ifcase\@tmpa
1988 \setbox9=\hbox{\@memberb}%
1989 \ifdim\wd9<0.72em
1990 \@tempdima=0.72em
1991 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%central atom
1992 \else
1993 \ifWest@bond
1994 \@tempdima=\wd9
1995 {\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb}}}%central atom
1996 %%%%\global\West@bondfalse
1997 \else
1998 \@tempdima=\wd9
1999 {\putlratom{-40}{-33}{\hbox to.72em{\@memberb\hss}}}%central atom
2000 \fi\fi
2001 \else%%no action
2002 \fi%end of ifcase
2003 \fi\fi}%
2004 %%%%%
2005 \@forsemicol\member:=#2\do{%
2006 \ifx\member\empty\else
2007 \expandafter\@m@mb@r\member;\relax%
2008 \expandafter\threech@r\@membera{}{}%
2009 \ifx\@memberb\@yl\else
2010 \ifcase\@tmpa
2011 \or{%
2012 \advance\@tempdima by-0.72em
2013 \setBScolor{\Put@Direct(0,0){\kern\@tempdima\Eastbond}}}%
2014 %\Put@Direct(0,0){\kern\@tempdima\Eastbond}}%
2015 \or{%
2016 \ifWest@bond
2017 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWBOND}}%
2018 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\NWBOND}%
2019 \else
2020 \setBScolor{\Put@Direct(0,0){\NWBOND}}%
2021 %\Put@Direct(0,0){\NWBOND}%
2022 \fi
2023 }%
2024 \or{%
2025 \ifWest@bond
2026 \setBScolor{\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWBOND}}%
2027 %\Put@Direct(0,0){\kern-\@tempdima\kern0.72em\SWBOND}%
2028 \else
2029 \setBScolor{\Put@Direct(0,0){\SWBOND}}%
2030 %\Put@Direct(0,0){\SWBOND}%
2031 \fi
2032 }%
2033 \fi%end of ifcase
2034 \fi\fi}%
2035 \end{ShiftPicEnvB}%
2036 \West@bondfalse
2037 \East@bondfalse
2038 \endgroup}%end of macro Ltrigonal
2039 % \end{macrocode}
2040 % \end{macro}
2041 % \end{macro}
2042 %
2043 % The command |\ylLtrigonalposition| is used in
2044 % |\Ltrigonal| to adjust a substitution position.
2045 % \changes{v1.02}{1998/10/20}{Newly added command:
2046 % \cs{ylLtrigonalposition}}
2047 %
2048 % \begin{macro}{\ylLtrigonalposition}
2049 % \begin{macrocode}
2050 \def\ylLtrigonalposition#1{%
2051 \@@ylswfalse%%%\@reset@ylsw
2052 \@forsemicol\member:=#1\do{%
2053 \if@@ylsw\else
2054 \ifx\member\empty\else
2055 \expandafter\@m@mb@r\member;\relax
2056 \expandafter\threech@r\@membera{}{}\relax
2057 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2058 \if@@ylsw
2059 \ifcase\@tmpa
2060 \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% E subst. on 1
2061 \West@bondtrue%
2062 \or \gdef\@ylii{47}\gdef\@yli{-40}\global\@ylswtrue% NWB subst. on 1
2063 \or \gdef\@ylii{47}\gdef\@yli{40}\global\@ylswtrue% SWB subst. on 1
2064 \fi%end of ifcase
2065 \fi\fi\fi}}%
2066 % \end{macrocode}
2067 % \end{macro}
2068 %
2069 % \subsection{Upward trigonal unit (narrow type)}
2070 %
2071 % The macro |\utrigonal| typesets a compound of trivalency.
2072 % The two upward bonds form an angle of 90$^{\circ}$ (narrow type),
2073 % while the downward bond is typeset vertically.
2074 % The following numbering is adopted in this macro.
2075 %
2076 % \begin{verbatim}
2077 % **********************
2078 % * trigonal unit (up) *
2079 % **********************
2080 %
2081 % The following numbering is adopted in this macro.
2082 %
2083 % 3 . 2
2084 % ` 90 /
2085 % ` /
2086 % 0 0 <== the original point
2087 % |
2088 % |
2089 % 1
2090 %
2091 % \end{verbatim}
2092 %
2093 % This macro has an argument |SUBSLIST| as well as an optional
2094 % argument |AUXLIST|.
2095 %
2096 % \begin{verbatim}
2097 % \utrigonal[AUXLIST]{SUBSLIST}
2098 % \end{verbatim}
2099 %
2100 % The arugument |AUXLIST| designates an character on the central
2101 % atom of the formula drawn by this macro. It can be used a plus
2102 % or minus charge on the center.
2103 %
2104 % \begin{verbatim}
2105 % AUXLIST =
2106 %
2107 % {0+}: + charge (or another one chararacter) on the center
2108 % \end{verbatim}
2109 %
2110 % The arugument |SUBLIST| designates a set of substitutients.
2111 %
2112 % \begin{verbatim}
2113 % SUBSLIST: list of substituents
2114 %
2115 % for n = 1 to 3
2116 %
2117 % nT : triple bond at n-atom
2118 % nD : double bond at n-atom
2119 % n or nS : single bond at n-atom
2120 % nA : alpha single bond at n-atom
2121 % nB : beta single bond at n-atom
2122 %
2123 % for 0 : cetral atom (e.g. 0==C)
2124 % \end{verbatim}
2125 %
2126 % \begin{verbatim}
2127 % e.g.
2128 %
2129 % \utrigonal{1==Cl;2==F}
2130 % \utrigonal{1==Cl;4==F;2==CH$_{3}$}
2131 % \end{verbatim}
2132 % \changes{v1.02}{1998/10/31}{Adding \cs{ylutrigonalposition},
2133 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2134 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2135 % \changes{v5.00}{2010/10/01}{for bond coloring}
2136 %
2137 % \begin{macro}{\utrigonal}
2138 % \begin{macro}{\@utrigonal}
2139 % \begin{macrocode}
2140 \def\utrigonal{\@ifnextchar[{\@utrigonal[r}{\@utrigonal[r]}}
2141 \def\@utrigonal#1]#2{%
2142 \begingroup
2143 \@reset@ylsw%
2144 \centralatomcheck{#2}%2013/04/01 added
2145 \ylutrigonalposition{#2}%
2146 \if@ylsw \ifx\@@ylii\empty
2147 \def\@@ylii{0}\def\@@yli{0}\fi
2148 \fi
2149 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2150 (600,600)(-300,-300){utrigonal}%2002/4/30 by S. Fujita
2151 (300,300)%
2152 \@tfor\member:=#1\do{%
2153 \expandafter\twoch@@r\member{}{}%
2154 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
2155 \@forsemicol\member:=#2\do{%
2156 \ifx\member\empty\else
2157 \expandafter\@m@mb@r\member;\relax%
2158 \expandafter\threech@r\@membera{}{}%
2159 \ifx\@memberb\@yl\else
2160 \ifcase\@tmpa
2161 {\putlratom{-40}{-33}{\@memberb}}%central atom
2162 \or\setBScolor{\Put@Direct(0,0){\Southbond}}%
2163 %\Put@Direct(0,0){\Southbond}%
2164 \or\setBScolor{\Put@Direct(0,0){\NEbond}}%
2165 %\Put@Direct(0,0){\NEbond}%
2166 \or\setBScolor{\Put@Direct(0,0){\NWbond}}%
2167 %\Put@Direct(0,0){\NWbond}%
2168 \fi%end of ifcase
2169 \fi\fi}%
2170 \end{ShiftPicEnvB}%
2171 \endgroup}%end of macro utrigonal
2172 % \end{macrocode}
2173 % \end{macro}
2174 % \end{macro}
2175 %
2176 % The command |\ylutrigonalposition| is used in
2177 % |\utrigonal| to adjust a substitution position.
2178 % \changes{v1.02}{1998/10/20}{Newly added command:
2179 % \cs{ylutrigonalposition}}
2180 %
2181 % \begin{macro}{\ylutrigonalposition}
2182 % \begin{macrocode}
2183 \def\ylutrigonalposition#1{%
2184 \@@ylswfalse%%%\@reset@ylsw
2185 \@forsemicol\member:=#1\do{%
2186 \if@@ylsw\else
2187 \ifx\member\empty\else
2188 \expandafter\@m@mb@r\member;\relax
2189 \expandafter\threech@r\@membera{}{}\relax
2190 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2191 \if@@ylsw
2192 \ifcase\@tmpa
2193 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
2194 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
2195 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
2196 \fi%end of ifcase
2197 \fi\fi\fi}}%
2198 % \end{macrocode}
2199 % \end{macro}
2200 %
2201 % \subsection{Upward trigonal unit (broad type)}
2202 %
2203 % The macro |\Utrigonal| typesets a compound of trivalency.
2204 % The two upward bonds form an angle of 120$^{\circ}$ (broad type),
2205 % while the downward bond is typeset vertically.
2206 % The following numbering is adopted in this macro.
2207 %
2208 % \begin{verbatim}
2209 % **********************
2210 % * trigonal unit (up) *
2211 % **********************
2212 %
2213 % 3 2
2214 % ` 120 /
2215 % ` /
2216 % 0 0 <== the original point
2217 % |
2218 % |
2219 % 1
2220 %
2221 % \end{verbatim}
2222 %
2223 % This macro has an argument |SUBSLIST| as well as an optional
2224 % argument |AUXLIST|.
2225 %
2226 % \begin{verbatim}
2227 % \Utrigonal[AUXLIST]{SUBSLIST}
2228 % \end{verbatim}
2229 %
2230 % The arugument |AUXLIST| designates an character on the central
2231 % atom of the formula drawn by this macro. It can be used a plus
2232 % or minus charge on the center.
2233 %
2234 % \begin{verbatim}
2235 % AUXLIST =
2236 %
2237 % {0+}: + charge (or another one chararacter) on the center
2238 % \end{verbatim}
2239 %
2240 % The arugument |SUBLIST| designates a set of substitutients.
2241 %
2242 % \begin{verbatim}
2243 % SUBSLIST: list of substituents
2244 %
2245 % for n = 1 to 3
2246 %
2247 % nT : triple bond at n-atom
2248 % nD : double bond at n-atom
2249 % n or nS : single bond at n-atom
2250 % nA : alpha single bond at n-atom
2251 % nB : beta single bond at n-atom
2252 %
2253 % for 0 : cetral atom (e.g. 0==C)
2254 % \end{verbatim}
2255 %
2256 % \begin{verbatim}
2257 % e.g.
2258 %
2259 % \Utrigonal{1==Cl;2==F}
2260 % \Utrigonal{1==Cl;4==F;2==CH$_{3}$}
2261 % \end{verbatim}
2262 % \changes{v1.02}{1998/10/31}{Adding \cs{ylutrigonalposition},
2263 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2264 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2265 % \changes{v5.00}{2010/10/01}{for bond coloring}
2266 %
2267 % \begin{macro}{\Utrigonal}
2268 % \begin{macro}{\@Utrigonal}
2269 % \begin{macrocode}
2270 \def\Utrigonal{\@ifnextchar[{\@Utrigonal[r}{\@Utrigonal[r]}}
2271 \def\@Utrigonal#1]#2{%
2272 \begingroup
2273 \@reset@ylsw%
2274 \ylUtrigonalposition{#2}%
2275 \if@ylsw \ifx\@@ylii\empty
2276 \def\@@ylii{0}\def\@@yli{0}\fi
2277 \fi
2278 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2279 (600,600)(-300,-300){Utrigonal}%2002/4/30 by S. Fujita
2280 (300,300)%
2281 \@tfor\member:=#1\do{%
2282 \expandafter\twoch@@r\member{}{}%
2283 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
2284 \@forsemicol\member:=#2\do{%
2285 \ifx\member\empty\else
2286 \expandafter\@m@mb@r\member;\relax%
2287 \expandafter\threech@r\@membera{}{}%
2288 \ifx\@memberb\@yl\else
2289 \ifcase\@tmpa
2290 {\putlratom{-40}{-33}{\@memberb}}%central atom
2291 \or\setBScolor{\Put@Direct(0,0){\Southbond}}%
2292 %\Put@Direct(0,0){\Southbond}%
2293 \or\setBScolor{\Put@Direct(0,0){\NEBond}}%
2294 %\Put@Direct(0,0){\NEBond}%
2295 \or\setBScolor{\Put@Direct(0,0){\NWBond}}%
2296 %\Put@Direct(0,0){\NWBond}%
2297 \fi%end of ifcase
2298 \fi\fi}%
2299 \end{ShiftPicEnvB}%
2300 \endgroup}%end of macro Utrigonal
2301 % \end{macrocode}
2302 % \end{macro}
2303 % \end{macro}
2304 %
2305 % The command |\ylUtrigonalposition| is used in
2306 % |\Utrigonal| to adjust a substitution position.
2307 % \changes{v1.02}{1998/10/20}{Newly added command:
2308 % \cs{ylUtrigonalposition}}
2309 %
2310 % \begin{macro}{\ylUtrigonalposition}
2311 % \begin{macrocode}
2312 \def\ylUtrigonalposition#1{%
2313 \@@ylswfalse%%%\@reset@ylsw
2314 \@forsemicol\member:=#1\do{%
2315 \if@@ylsw\else
2316 \ifx\member\empty\else
2317 \expandafter\@m@mb@r\member;\relax
2318 \expandafter\threech@r\@membera{}{}\relax
2319 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2320 \if@@ylsw
2321 \ifcase\@tmpa
2322 \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1
2323 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NEB subst. on 1
2324 \or \gdef\@ylii{66}\gdef\@yli{-47}\global\@ylswtrue% NWB subst. on 1
2325 \fi%end of ifcase
2326 \fi\fi\fi}}%
2327 % \end{macrocode}
2328 % \end{macro}
2329 %
2330 % \subsection{Downward trigonal unit (narrow type)}
2331 %
2332 % The macro |\dtrigonal| typesets a compound of trivalency.
2333 % The upward bond is typeset vertically.
2334 % The following numbering is adopted in this macro.
2335 %
2336 % \begin{verbatim}
2337 % ************************
2338 % * trigonal unit (down) *
2339 % ************************
2340 %
2341 % The following numbering is adopted in this macro.
2342 %
2343 % 1
2344 % |
2345 % |
2346 % 0 0 <== the original point
2347 % / `
2348 % / 90 `
2349 % 2 3
2350 %
2351 % \end{verbatim}
2352 %
2353 % This macro has an argument |SUBSLIST| as well as an optional
2354 % argument |AUXLIST|.
2355 %
2356 % \begin{verbatim}
2357 % \dtrigonal[AUXLIST]{SUBSLIST}
2358 % \end{verbatim}
2359 %
2360 % The arugument |AUXLIST| designates an character on the central
2361 % atom of the formula drawn by this macro. It can be used a plus
2362 % or minus charge on the center.
2363 %
2364 % \begin{verbatim}
2365 % AUXLIST =
2366 %
2367 % {0+} : + charge (or another one chararacter) on the center
2368 % \end{verbatim}
2369 %
2370 % The arugument |SUBLIST| designates a set of substitutients.
2371 %
2372 % \begin{verbatim}
2373 % SUBSLIST: list of substituents
2374 %
2375 % for n = 1 to 3
2376 %
2377 % nT : triple bond at n-atom
2378 % nD : double bond at n-atom
2379 % n or nS : single bond at n-atom
2380 % nA : alpha single bond at n-atom
2381 % nB : beta single bond at n-atom
2382 %
2383 % for 0 : cetral atom (e.g. 0==C)
2384 % \end{verbatim}
2385 %
2386 % \begin{verbatim}
2387 % e.g.
2388 %
2389 % \dtrigonal{1==Cl;2==F}
2390 % \dtrigonal{1==Cl;4==F;2==CH$_{3}$}
2391 % \end{verbatim}
2392 % \changes{v1.02}{1998/10/31}{Adding \cs{yldtrigonalposition},
2393 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2394 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2395 % \changes{v5.00}{2010/10/01}{for bond coloring}
2396 %
2397 % \begin{macro}{\dtrigonal}
2398 % \begin{macro}{\@dtrigonal}
2399 % \begin{macrocode}
2400 \def\dtrigonal{\@ifnextchar[{\@dtrigonal[r}{\@dtrigonal[r]}}
2401 \def\@dtrigonal#1]#2{%
2402 \begingroup
2403 \@reset@ylsw%
2404 \yldtrigonalposition{#2}%
2405 \if@ylsw \ifx\@@ylii\empty
2406 \def\@@ylii{0}\def\@@yli{0}\fi
2407 \fi
2408 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2409 (600,600)(-300,-300){dtrigonal}%2002/4/30 by S. Fujita
2410 (300,300)%
2411 \@tfor\member:=#1\do{%
2412 \expandafter\twoch@@r\member{}{}%
2413 \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}%
2414 \@forsemicol\member:=#2\do{%
2415 \ifx\member\empty\else
2416 \expandafter\@m@mb@r\member;\relax%
2417 \expandafter\threech@r\@membera{}{}%
2418 \ifx\@memberb\@yl\else
2419 \ifcase\@tmpa
2420 {\putlratom{-40}{-33}{\@memberb}}%central atom
2421 \or\setBScolor{\Put@Direct(0,0){\Northbond}}%
2422 %\Put@Direct(0,0){\Northbond}%
2423 \or\setBScolor{\Put@Direct(0,0){\SEbond}}%
2424 %\Put@Direct(0,0){\SEbond}%
2425 \or\setBScolor{\Put@Direct(0,0){\SWbond}}%
2426 %\Put@Direct(0,0){\SWbond}%
2427 \fi%end of ifcase
2428 \fi\fi}%
2429 \end{ShiftPicEnvB}%
2430 \endgroup}%end of macro dtrigonal
2431 % \end{macrocode}
2432 % \end{macro}
2433 % \end{macro}
2434 %
2435 % The command |\yldtrigonalposition| is used in
2436 % |\dtrigonal| to adjust a substitution position.
2437 % \changes{v1.02}{1998/10/20}{Newly added command:
2438 % \cs{yldtrigonalposition}}
2439 %
2440 % \begin{macro}{\yldtrigonalposition}
2441 % \begin{macrocode}
2442 \def\yldtrigonalposition#1{%
2443 \@@ylswfalse%%%\@reset@ylsw
2444 \@forsemicol\member:=#1\do{%
2445 \if@@ylsw\else
2446 \ifx\member\empty\else
2447 \expandafter\@m@mb@r\member;\relax
2448 \expandafter\threech@r\@membera{}{}\relax
2449 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2450 \if@@ylsw
2451 \ifcase\@tmpa
2452 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
2453 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
2454 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
2455 \fi%end of ifcase
2456 \fi\fi\fi}}%
2457 % \end{macrocode}
2458 % \end{macro}
2459 %
2460 % \subsection{Downward trigonal unit (broad type)}
2461 %
2462 % The macro |\Dtrigonal| typesets a compound of trivalency.
2463 % The upward bond is typeset vertically.
2464 % The following numbering is adopted in this macro.
2465 %
2466 % \begin{verbatim}
2467 % ************************
2468 % * trigonal unit (down) *
2469 % ************************
2470 %
2471 % The following numbering is adopted in this macro.
2472 %
2473 % 1
2474 % |
2475 % |
2476 % 0 0 <== the original point
2477 % / `
2478 % / 120 `
2479 % 2 3
2480 %
2481 % \end{verbatim}
2482 %
2483 % This macro has an argument |SUBSLIST| as well as an optional
2484 % argument |AUXLIST|.
2485 %
2486 % \begin{verbatim}
2487 % \Dtrigonal[AUXLIST]{SUBSLIST}
2488 % \end{verbatim}
2489 %
2490 % The arugument |AUXLIST| designates an character on the central
2491 % atom of the formula drawn by this macro. It can be used a plus
2492 % or minus charge on the center.
2493 %
2494 % \begin{verbatim}
2495 % AUXLIST =
2496 %
2497 % {0+}: + charge (or another one chararacter) on the center
2498 % \end{verbatim}
2499 %
2500 % The arugument |SUBLIST| designates a set of substitutients.
2501 %
2502 % \begin{verbatim}
2503 % SUBSLIST: list of substituents
2504 %
2505 % for n = 1 to 3
2506 %
2507 % nT : triple bond at n-atom
2508 % nD : double bond at n-atom
2509 % n or nS : single bond at n-atom
2510 % nA : alpha single bond at n-atom
2511 % nB : beta single bond at n-atom
2512 %
2513 % for 0 : cetral atom (e.g. 0==C)
2514 % \end{verbatim}
2515 %
2516 % \begin{verbatim}
2517 % e.g.
2518 %
2519 % \Dtrigonal{1==Cl;2==F}
2520 % \Dtrigonal{1==Cl;4==F;2==CH$_{3}$}
2521 % \end{verbatim}
2522 % \changes{v1.02}{1998/10/31}{Adding \cs{ylDtrigonalposition},
2523 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2524 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2525 % \changes{v5.00}{2010/10/01}{for bond coloring}
2526 %
2527 % \begin{macro}{\Dtrigonal}
2528 % \begin{macro}{\@Dtrigonal}
2529 % \begin{macrocode}
2530 \def\Dtrigonal{\@ifnextchar[{\@Dtrigonal[r}{\@Dtrigonal[r]}}
2531 \def\@Dtrigonal#1]#2{%
2532 \begingroup
2533 \@reset@ylsw%
2534 \ylDtrigonalposition{#2}%
2535 \if@ylsw \ifx\@@ylii\empty
2536 \def\@@ylii{0}\def\@@yli{0}\fi
2537 \fi
2538 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2539 (600,600)(-300,-300){Dtrigonal}%2002/4/30 by S. Fujita
2540 (300,300)%
2541 \@tfor\member:=#1\do{%
2542 \expandafter\twoch@@r\member{}{}%
2543 \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}%
2544 \@forsemicol\member:=#2\do{%
2545 \ifx\member\empty\else
2546 \expandafter\@m@mb@r\member;\relax%
2547 \expandafter\threech@r\@membera{}{}%
2548 \ifx\@memberb\@yl\else
2549 \ifcase\@tmpa
2550 {\putlratom{-40}{-33}{\@memberb}}%central atom
2551 \or\setBScolor{\Put@Direct(0,0){\Northbond}}%
2552 %\Put@Direct(0,0){\Northbond}%
2553 \or\setBScolor{\Put@Direct(0,0){\SEBond}}%
2554 %\Put@Direct(0,0){\SEBond}%
2555 \or\setBScolor{\Put@Direct(0,0){\SWBond}}%
2556 %\Put@Direct(0,0){\SWBond}%
2557 \fi%end of ifcase
2558 \fi\fi}%
2559 \end{ShiftPicEnvB}%
2560 \endgroup}%end of macro Dtrigonal
2561 % \end{macrocode}
2562 % \end{macro}
2563 % \end{macro}
2564 %
2565 % The command |\ylDtrigonalposition| is used in
2566 % |\Dtrigonal| to adjust a substitution position.
2567 % \changes{v1.02}{1998/10/20}{Newly added command:
2568 % \cs{ylDtrigonalposition}}
2569 %
2570 % \begin{macro}{\ylDtrigonalposition}
2571 % \begin{macrocode}
2572 \def\ylDtrigonalposition#1{%
2573 \@@ylswfalse%%%\@reset@ylsw
2574 \@forsemicol\member:=#1\do{%
2575 \if@@ylsw\else
2576 \ifx\member\empty\else
2577 \expandafter\@m@mb@r\member;\relax
2578 \expandafter\threech@r\@membera{}{}\relax
2579 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2580 \if@@ylsw
2581 \ifcase\@tmpa
2582 \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1
2583 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SEB subst. on 1
2584 \or \gdef\@ylii{66}\gdef\@yli{47}\global\@ylswtrue% SWB subst. on 1
2585 \fi%end of ifcase
2586 \fi\fi\fi}}%
2587 % \end{macrocode}
2588 % \end{macro}
2589 %
2590 % \section{Ethylene derivative}
2591 % \subsection{Horizontal ethylene unit (narrow type)}
2592 %
2593 % The macro |\ethylene| typesets ethylene derivatives.
2594 % The following numbering is adopted in this macro.
2595 %
2596 % \begin{verbatim}
2597 % *****************
2598 % * ethylene unit *
2599 % *****************
2600 %
2601 % 1 4
2602 % ` /
2603 % ` /
2604 % 90 (1)===(2) 90 (1) <== the original point
2605 % / `
2606 % / `
2607 % 2 3
2608 % \end{verbatim}
2609 %
2610 % \begin{verbatim}
2611 % \ethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
2612 % \end{verbatim}
2613 %
2614 % The arugument |BONDLIST| designates the bond between atom (1) and
2615 % atom (2) as well as charges on these centeral atoms.
2616 %
2617 % \begin{verbatim}
2618 % BONDLIST: list of inner bonds and charges
2619 %
2620 % {n+} : + charge (or another one chararacter) on n-atom
2621 % d : inner double bond (between (1) and (2))
2622 % t : inner triple bond (between (1) and (2))
2623 % \end{verbatim}
2624 %
2625 % The arugument |SUBLIST| designates a set of substitutients.
2626 %
2627 % \begin{verbatim}
2628 % SUBSLIST: list of substituents
2629 %
2630 % for n = 1 to 4
2631 %
2632 % nT : triple bond at n-atom
2633 % nD : double bond at n-atom
2634 % n or nS : single bond at n-atom
2635 % nA : alpha single bond at n-atom
2636 % nB : beta single bond at n-atom
2637 % \end{verbatim}
2638 %
2639 % The arugument |ATOMLIST| designates the list of central atoms.
2640 %
2641 % \begin{verbatim}
2642 % ATOMLIST: list of central atoms
2643 % n : atom for n-position (e.g. 1==C)
2644 % \end{verbatim}
2645 %
2646 % \begin{verbatim}
2647 % e.g.
2648 %
2649 % \ethylene{}{1==Cl;2==F}
2650 % \ethylene{}{1==Cl;4==F;2==CH$_{3}$}
2651 % \end{verbatim}
2652 % \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenepositiona},
2653 % \cs{ylethylenepositionb},
2654 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2655 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2656 % \changes{v5.00}{2010/10/01}{for bond coloring}
2657 %
2658 % \begin{macro}{\ethylene}
2659 % \begin{macro}{\@ethylene}
2660 % \begin{macrocode}
2661 \def\ethylene{\@ifnextchar[{\@ethylene}{\@ethylene[]}}
2662 \def\@ethylene[#1]#2#3{%
2663 \@reset@ylsw%
2664 \ylethylenepositiona{#3}%
2665 \if@ylsw \ifx\@@ylii\empty
2666 \def\@@ylii{0}\def\@@yli{0}\fi
2667 \else
2668 \ylethylenepositionb{#3}%
2669 \fi
2670 \if@ylsw \ifx\@@ylii\empty
2671 \def\@@ylii{-230}\def\@@yli{0}\fi
2672 \fi
2673 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2674 (800,600)(-300,-300){ethylene}%2002/4/30 by S. Fujita
2675 (300,300)%
2676 {\def\aaa{#1}\ifx\aaa\empty%
2677 % \Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond
2678 \Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}\fi%2010/10/01
2679 }%
2680 \@tfor\member:=#1\do{%
2681 \expandafter\twoch@@r\member{}{}%
2682 \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}%
2683 \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}%
2684 \else\if\@@tmpa d\relax%
2685 % {\Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}}% double bond
2686 {\Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
2687 \else\if\@@tmpa t\relax%
2688 % {\Multiput@Direct(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right
2689 {\Multiput@Direct(42,-20)(0,20){3}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
2690 \fi\fi\fi\fi}%
2691 {\def\aaa{#2}%
2692 \ifx\aaa\empty%
2693 \putratom{-40}{-33}{C}%central atom
2694 \putratom{190}{-33}{C}%central atom
2695 \else%
2696 \@forsemicol\member:=#2\do{%
2697 \ifx\member\empty\else
2698 \expandafter\@m@mb@r\member;\relax%
2699 \expandafter\threech@r\@membera{}{}%
2700 \ifcase\@tmpa%
2701 \or\putratom{-40}{-33}{\@memberb}%central atom
2702 \or\putratom{190}{-33}{\@memberb}%central atom
2703 \fi\fi}%end of ifcase
2704 \fi%
2705 }%
2706 \@forsemicol\member:=#3\do{%
2707 \ifx\member\empty\else
2708 \expandafter\@m@mb@r\member;\relax%
2709 \expandafter\threech@r\@membera{}{}%
2710 \ifx\@memberb\@yl\else
2711 \ifcase\@tmpa%
2712 \or\setBScolor{\Put@Direct(0,0){\NWbond}}%
2713 %\Put@Direct(0,0){\NWbond}%
2714 \or\setBScolor{\Put@Direct(0,0){\SWbond}}%
2715 %\Put@Direct(0,0){\SWbond}%
2716 \or\setBScolor{\Put@Direct(230,0){\SEbond}}%
2717 %\Put@Direct(230,0){\SEbond}%
2718 \or\setBScolor{\Put@Direct(230,0){\NEbond}}%
2719 %\Put@Direct(230,0){\NEbond}%
2720 \fi%end of ifcase
2721 \fi\fi}%
2722 \end{ShiftPicEnvB}%
2723 }%end of macro ethylene
2724 % \end{macrocode}
2725 % \end{macro}
2726 % \end{macro}
2727 %
2728 % \begin{macro}{\ethyleneh}
2729 % \begin{macrocode}
2730 \let\ethyleneh=\ethylene
2731 % \end{macrocode}
2732 % \end{macro}
2733 %
2734 % The commands |\ylethylenepositiona| and |\ylethylenepositiona|
2735 % are used in |\ethylene| to adjust a substitution position.
2736 % \changes{v1.02}{1998/10/20}{Newly added command:
2737 % \cs{ylethylenepositiona} and \cs{ylethylenepositionb}}
2738 %
2739 % \begin{macro}{\ylethylenepositiona}
2740 % \begin{macro}{\ylethylenepositionb}
2741 % \begin{macrocode}
2742 \def\ylethylenepositiona#1{%
2743 \@@ylswfalse%%%\@reset@ylsw
2744 \@forsemicol\member:=#1\do{%
2745 \if@@ylsw\else
2746 \ifx\member\empty\else
2747 \expandafter\@m@mb@r\member;\relax
2748 \expandafter\threech@r\@membera{}{}\relax
2749 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2750 \if@@ylsw
2751 \ifcase\@tmpa
2752 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
2753 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
2754 \fi%end of ifcase
2755 \fi\fi\fi}}%
2756 \def\ylethylenepositionb#1{%
2757 \@@ylswfalse%%%\@reset@ylsw
2758 \@forsemicol\member:=#1\do{%
2759 \if@@ylsw\else
2760 \ifx\member\empty\else
2761 \expandafter\@m@mb@r\member;\relax
2762 \expandafter\threech@r\@membera{}{}\relax
2763 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
2764 \if@@ylsw
2765 \ifcase\@tmpa
2766 \or%omit
2767 \or%omit
2768 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
2769 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
2770 \fi%end of ifcase
2771 \fi\fi\fi}}%
2772 % \end{macrocode}
2773 % \end{macro}
2774 % \end{macro}
2775 %
2776 % \subsection{Horizontal ethylene unit (broad type)}
2777 %
2778 % The macro |\Ethylene| typesets ethylene derivatives.
2779 % The following numbering is adopted in this macro.
2780 % \changes{v1.02}{1998/10/20}{New command: \cs{Ethylene}}
2781 %
2782 % \begin{verbatim}
2783 % *****************
2784 % * ethylene unit *
2785 % *****************
2786 %
2787 % 1 4
2788 % ` /
2789 % ` /
2790 % 120 (1)===(2) 120 (1) <== the original point
2791 % / `
2792 % / `
2793 % 2 3
2794 % \end{verbatim}
2795 %
2796 % \begin{verbatim}
2797 % \Ethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
2798 % \end{verbatim}
2799 %
2800 % The arugument |BONDLIST| designates the bond between atom (1) and
2801 % atom (2) as well as charges on these centeral atoms.
2802 %
2803 % \begin{verbatim}
2804 % BONDLIST: list of inner bonds and charges
2805 %
2806 % {n+} : + charge (or another one chararacter) on n-atom
2807 % d : inner double bond (between (1) and (2))
2808 % t : inner triple bond (between (1) and (2))
2809 % \end{verbatim}
2810 %
2811 % The arugument |SUBLIST| designates a set of substitutients.
2812 %
2813 % \begin{verbatim}
2814 % SUBSLIST: list of substituents
2815 %
2816 % for n = 1 to 4
2817 %
2818 % nT : triple bond at n-atom
2819 % nD : double bond at n-atom
2820 % n or nS : single bond at n-atom
2821 % nA : alpha single bond at n-atom
2822 % nB : beta single bond at n-atom
2823 % \end{verbatim}
2824 %
2825 % The arugument |ATOMLIST| designates the list of central atoms.
2826 %
2827 % \begin{verbatim}
2828 % ATOMLIST: list of central atoms
2829 % n : atom for n-position (e.g. 1==C)
2830 % \end{verbatim}
2831 %
2832 % \begin{verbatim}
2833 % e.g.
2834 %
2835 % \Ethylene{}{1==Cl;2==F}
2836 % \Ethylene{}{1==Cl;4==F;2==CH$_{3}$}
2837 % \end{verbatim}
2838 % \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenepositiona},
2839 % \cs{ylethylenepositionb},
2840 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2841 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2842 % \changes{v5.00}{2010/10/01}{for bond coloring}
2843 %
2844 % \begin{macro}{\Ethylene}
2845 % \begin{macro}{\@Ethylene}
2846 % \begin{macrocode}
2847 \def\Ethylene{\@ifnextchar[{\@Ethylene}{\@Ethylene[]}}%bug \@ethylene --> \@Ethylene
2848 \def\@Ethylene[#1]#2#3{%
2849 \@reset@ylsw%
2850 \ylethylenepositiona{#3}%
2851 \if@ylsw \ifx\@@ylii\empty
2852 \def\@@ylii{0}\def\@@yli{0}\fi
2853 \else
2854 \ylethylenepositionb{#3}%
2855 \fi
2856 \if@ylsw \ifx\@@ylii\empty
2857 \def\@@ylii{-230}\def\@@yli{0}\fi
2858 \fi
2859 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
2860 (800,600)(-300,-300){Ethylene}%2002/4/30 by S. Fujita
2861 (300,300)%
2862 {\def\aaa{#1}\ifx\aaa\empty%
2863 % \Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond
2864 \Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}\fi%2010/10/01
2865 }%
2866 \@tfor\member:=#1\do{%
2867 \expandafter\twoch@@r\member{}{}%
2868 \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}%
2869 \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}%
2870 \else\if\@@tmpa d\relax%
2871 % {\Multiput@Direct(42,-13)(0,25){2}{\line(1,0){140}}}% double bond
2872 {\Multiput@Direct(42,-13)(0,25){2}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
2873 \else\if\@@tmpa t\relax%
2874 % {\Multiput@Direct(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right
2875 {\Multiput@Direct(42,-20)(0,20){3}{\Put@Line(0,0)(1,0){140}}}%2010/10/01
2876 \fi\fi\fi\fi}%
2877 {\def\aaa{#2}%
2878 \ifx\aaa\empty%
2879 \putratom{-40}{-33}{C}%central atom
2880 \putratom{190}{-33}{C}%central atom
2881 \else%
2882 \@forsemicol\member:=#2\do{%
2883 \ifx\member\empty\else
2884 \expandafter\@m@mb@r\member;\relax%
2885 \expandafter\threech@r\@membera{}{}%
2886 \ifcase\@tmpa%
2887 \or\putratom{-40}{-33}{\@memberb}%central atom
2888 \or\putratom{190}{-33}{\@memberb}%central atom
2889 \fi\fi}%end of ifcase
2890 \fi%
2891 }%
2892 \@forsemicol\member:=#3\do{%
2893 \ifx\member\empty\else
2894 \expandafter\@m@mb@r\member;\relax%
2895 \expandafter\threech@r\@membera{}{}%
2896 \ifx\@memberb\@yl\else
2897 \ifcase\@tmpa%
2898 \or\setBScolor{\Put@Direct(0,0){\NWBOND}}%
2899 %\Put@Direct(0,0){\NWBOND}%
2900 \or\setBScolor{\Put@Direct(0,0){\SWBOND}}%
2901 %\Put@Direct(0,0){\SWBOND}%
2902 \or\setBScolor{\Put@Direct(230,0){\SEBOND}}%
2903 %\Put@Direct(230,0){\SEBOND}%
2904 \or\Put@Direct(230,0){\NEBOND}%
2905 \fi%end of ifcase
2906 \fi\fi}%
2907 \end{ShiftPicEnvB}%
2908 }%end of macro Ethylene
2909 % \end{macrocode}
2910 % \end{macro}
2911 % \end{macro}
2912 %
2913 % \begin{macro}{\Ethyleneh}
2914 % \begin{macrocode}
2915 \let\Ethyleneh=\Ethylene
2916 % \end{macrocode}
2917 % \end{macro}
2918 %
2919 % \subsection{Vertical ethylene unit (narrow type)}
2920 %
2921 % The macro |\ethylenev| typesets ethylene derivatives in a
2922 % vatical manner.
2923 % The following numbering is adopted in this macro.
2924 %
2925 % \begin{verbatim}
2926 % ****************************
2927 % * ethylene unit (vertical) *
2928 % ****************************
2929 %
2930 % The following numbering is adopted in this macro.
2931 %
2932 % 4 3
2933 % ` 90 /
2934 % ` /
2935 % (2)
2936 % ||
2937 % ||
2938 % (1) <== the original point
2939 % / `
2940 % / 90 `
2941 % 1 2
2942 %
2943 % \end{verbatim}
2944 %
2945 % \begin{verbatim}
2946 % \ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST}
2947 % \end{verbatim}
2948 %
2949 % \begin{verbatim}
2950 % BONDLIST: list of inner bonds and charges
2951 %
2952 % {n+} : + charge (or another one chararacter) on n-atom
2953 % d : inner double bond (between (1) and (2))
2954 % t : inner triple bond (between (1) and (2))
2955 % \end{verbatim}
2956 %
2957 % \begin{verbatim}
2958 % SUBSLIST: list of substituents
2959 %
2960 % for n = 1 to 4
2961 %
2962 % nT : triple bond at n-atom
2963 % nD : double bond at n-atom
2964 % n or nS : single bond at n-atom
2965 % nA : alpha single bond at n-atom
2966 % nB : beta single bond at n-atom
2967 % \end{verbatim}
2968 %
2969 % \begin{verbatim}
2970 % ATOMLIST: list of central atoms
2971 % n : atom for n-position (e.g. 1==C)
2972 % \end{verbatim}
2973 %
2974 % \begin{verbatim}
2975 % e.g.
2976 %
2977 % \ethylenev{1==Cl;2==F}
2978 % \ethylenev{1==Cl;4==F;2==CH$_{3}$}
2979 % \end{verbatim}
2980 % \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenevpositiona},
2981 % \cs{ylethylenevpositionb},
2982 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
2983 % \cs{yl@xdiff} and \cs{yl@ydiff}}
2984 % \changes{v5.00}{2010/10/01}{for bond coloring}
2985 %
2986 % \begin{macro}{\ethylenev}
2987 % \begin{macro}{\@ethylenev}
2988 % \begin{macrocode}
2989 \def\ethylenev{\@ifnextchar[{\@ethylenev}{\@ethylenev[]}}
2990 \def\@ethylenev[#1]#2#3{%
2991 \@reset@ylsw%
2992 \ylethylenevpositiona{#3}%
2993 \if@ylsw \ifx\@@ylii\empty
2994 \def\@@ylii{0}\def\@@yli{0}\fi
2995 \else
2996 \ylethylenevpositionb{#3}%
2997 \fi
2998 \if@ylsw \ifx\@@ylii\empty
2999 \def\@@ylii{0}\def\@@yli{-230}\fi
3000 \fi
3001 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3002 (600,800)(-300,-300){ethylenev}%2002/4/30 by S. Fujita
3003 (300,300)%
3004 \def\aaa{#1}\ifx\aaa\empty%
3005 \Put@Line(-20,47)(0,1){140}% vertical
3006 \Put@Line(6,47)(0,1){140}\fi% double bond
3007 \@tfor\member:=#1\do{%
3008 \expandafter\twoch@@r\member{}{}%
3009 \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb}
3010 \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb}
3011 \else\if\@@tmpa d\relax%
3012 \Put@Line(-13,47)(0,1){140}% vertical
3013 \Put@Line(13,47)(0,1){140}% double bond
3014 \else\if\@@tmpa t\relax%
3015 \Put@Line(-20,47)(0,1){140}% vertical
3016 \Put@Line(-0,47)(0,1){140}% triple bond
3017 \Put@Line(20,47)(0,1){140}%
3018 \fi\fi\fi\fi}%
3019 \def\aaa{#2}%
3020 \ifx\aaa\empty%
3021 \putratom{-40}{-33}{C}%central atom
3022 \putratom{-40}{197}{C}%central atom
3023 \else%
3024 \@forsemicol\member:=#2\do{%
3025 \ifx\member\empty\else
3026 \expandafter\@m@mb@r\member;\relax%
3027 \expandafter\threech@r\@membera{}{}%
3028 \ifcase\@tmpa%
3029 \or\putratom{-40}{-33}{\@memberb}%central atom
3030 \or\putratom{-40}{197}{\@memberb}%central atom
3031 \fi\fi}%end of ifcase
3032 \fi%
3033 \@forsemicol\member:=#3\do{%
3034 \ifx\member\empty\else
3035 \expandafter\@m@mb@r\member;\relax%
3036 \expandafter\threech@r\@membera{}{}%
3037 \ifx\@memberb\@yl\else
3038 \ifcase\@tmpa%
3039 \or\setBScolor{\Put@Direct(0,0){\SWbond}}%
3040 %\Put@Direct(0,0){\SWbond}%
3041 \or\setBScolor{\Put@Direct(0,0){\SEbond}}%
3042 %\Put@Direct(0,0){\SEbond}%
3043 \or\setBScolor{\Put@Direct(0,230){\NEbond}}%
3044 %\Put@Direct(0,230){\NEbond}%
3045 \or\setBScolor{\Put@Direct(0,230){\NWbond}}%
3046 %\Put@Direct(0,230){\NWbond}%
3047 \fi%end of ifcase
3048 \fi\fi}%
3049 \end{ShiftPicEnvB}%
3050 }%end of macro ethylenev
3051 % \end{macrocode}
3052 % \end{macro}
3053 % \end{macro}
3054 %
3055 % The commands |\ylethylenevpositiona| and |\ylethylenevpositiona|
3056 % are used in |\ethylenev| to adjust a substitution position.
3057 % \changes{v1.02}{1998/10/20}{Newly added command:
3058 % \cs{ylethylenevpositiona} and \cs{ylethylenevpositionb}}
3059 %
3060 % \begin{macro}{\ylethylenepositiona}
3061 % \begin{macro}{\ylethylenepositionb}
3062 % \begin{macrocode}
3063 \def\ylethylenevpositiona#1{%
3064 \@@ylswfalse%%%\@reset@ylsw
3065 \@forsemicol\member:=#1\do{%
3066 \if@@ylsw\else
3067 \ifx\member\empty\else
3068 \expandafter\@m@mb@r\member;\relax
3069 \expandafter\threech@r\@membera{}{}\relax
3070 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3071 \if@@ylsw
3072 \ifcase\@tmpa
3073 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
3074 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
3075 \fi%end of ifcase
3076 \fi\fi\fi}}%
3077 \def\ylethylenevpositionb#1{%
3078 \@@ylswfalse%%%\@reset@ylsw
3079 \@forsemicol\member:=#1\do{%
3080 \if@@ylsw\else
3081 \ifx\member\empty\else
3082 \expandafter\@m@mb@r\member;\relax
3083 \expandafter\threech@r\@membera{}{}\relax
3084 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3085 \if@@ylsw
3086 \ifcase\@tmpa
3087 \or%omit
3088 \or%omit
3089 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
3090 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
3091 \fi%end of ifcase
3092 \fi\fi\fi}}%
3093 % \end{macrocode}
3094 % \end{macro}
3095 % \end{macro}
3096 %
3097 % \subsection{Vertical ethylene unit (broad type)}
3098 %
3099 % The macro |\Ethylenev| typesets ethylene derivatives in a
3100 % vatical manner.
3101 % The following numbering is adopted in this macro.
3102 %
3103 % \begin{verbatim}
3104 % ****************************
3105 % * ethylene unit (vertical) *
3106 % ****************************
3107 %
3108 % 4 3
3109 % ` 120 /
3110 % ` /
3111 % (2)
3112 % ||
3113 % ||
3114 % (1) <== the original point
3115 % / `
3116 % / 120 `
3117 % 1 2
3118 % \end{verbatim}
3119 %
3120 % \begin{verbatim}
3121 % \Ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST}
3122 % \end{verbatim}
3123 %
3124 % \begin{verbatim}
3125 % BONDLIST: list of inner bonds and charges
3126 %
3127 % {n+} : + charge (or another one chararacter) on n-atom
3128 % d : inner double bond (between (1) and (2))
3129 % t : inner triple bond (between (1) and (2))
3130 % \end{verbatim}
3131 %
3132 % \begin{verbatim}
3133 % SUBSLIST: list of substituents
3134 %
3135 % for n = 1 to 4
3136 %
3137 % nT : triple bond at n-atom
3138 % nD : double bond at n-atom
3139 % n or nS : single bond at n-atom
3140 % nA : alpha single bond at n-atom
3141 % nB : beta single bond at n-atom
3142 % \end{verbatim}
3143 %
3144 % \begin{verbatim}
3145 % ATOMLIST: list of central atoms
3146 % n : atom for n-position (e.g. 1==C)
3147 % \end{verbatim}
3148 %
3149 % \begin{verbatim}
3150 % e.g.
3151 %
3152 % \Ethylenev{1==Cl;2==F}
3153 % \Ethylenev{1==Cl;4==F;2==CH$_{3}$}
3154 % \end{verbatim}
3155 % \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenevpositiona},
3156 % \cs{ylethylenevpositionb},
3157 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
3158 % \cs{yl@xdiff} and \cs{yl@ydiff}}
3159 % \changes{v5.00}{2010/10/01}{for bond coloring}
3160 %
3161 % \begin{macro}{\Ethylenev}
3162 % \begin{macro}{\@Ethylenev}
3163 % \begin{macrocode}
3164 \def\Ethylenev{\@ifnextchar[{\@Ethylenev}{\@Ethylenev[]}}
3165 \def\@Ethylenev[#1]#2#3{%
3166 \@reset@ylsw%
3167 \ylethylenevpositiona{#3}%
3168 \if@ylsw \ifx\@@ylii\empty
3169 \def\@@ylii{0}\def\@@yli{0}\fi
3170 \else
3171 \ylethylenevpositionb{#3}%
3172 \fi
3173 \if@ylsw \ifx\@@ylii\empty
3174 \def\@@ylii{0}\def\@@yli{-230}\fi
3175 \fi
3176 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3177 (600,800)(-300,-300){Ethylenev}%2002/4/30 by S. Fujita
3178 (300,300)%
3179 \def\aaa{#1}\ifx\aaa\empty%
3180 \Put@Line(-20,47)(0,1){140}% vertical
3181 \Put@Line(6,47)(0,1){140}\fi% double bond
3182 \@tfor\member:=#1\do{%
3183 \expandafter\twoch@@r\member{}{}%
3184 \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb}
3185 \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb}
3186 \else\if\@@tmpa d\relax%
3187 \Put@Line(-13,47)(0,1){140}% vertical
3188 \Put@Line(13,47)(0,1){140}% double bond
3189 \else\if\@@tmpa t\relax%
3190 \Put@Line(-20,47)(0,1){140}% vertical
3191 \Put@Line(-0,47)(0,1){140}% triple bond
3192 \Put@Line(20,47)(0,1){140}%
3193 \fi\fi\fi\fi}%
3194 \def\aaa{#2}%
3195 \ifx\aaa\empty%
3196 \putratom{-40}{-33}{C}%central atom
3197 \putratom{-40}{197}{C}%central atom
3198 \else%
3199 \@forsemicol\member:=#2\do{%
3200 \ifx\member\empty\else
3201 \expandafter\@m@mb@r\member;\relax%
3202 \expandafter\threech@r\@membera{}{}%
3203 \ifcase\@tmpa%
3204 \or\putratom{-40}{-33}{\@memberb}%central atom
3205 \or\putratom{-40}{197}{\@memberb}%central atom
3206 \fi\fi}%end of ifcase
3207 \fi%
3208 \@forsemicol\member:=#3\do{%
3209 \ifx\member\empty\else
3210 \expandafter\@m@mb@r\member;\relax%
3211 \expandafter\threech@r\@membera{}{}%
3212 \ifx\@memberb\@yl\else
3213 \ifcase\@tmpa%
3214 \or\setBScolor{\Put@Direct(0,0){\SWBond}}%
3215 %\Put@Direct(0,0){\SWBond}%
3216 \or\setBScolor{\Put@Direct(0,0){\SEBond}}%
3217 %\Put@Direct(0,0){\SEBond}%
3218 \or\setBScolor{\Put@Direct(0,230){\NEBond}}%
3219 %\Put@Direct(0,230){\NEBond}%
3220 \or\setBScolor{\Put@Direct(0,230){\NWBond}}%
3221 %\Put@Direct(0,230){\NWBond}%
3222 \fi%end of ifcase
3223 \fi\fi}%
3224 \end{ShiftPicEnvB}%
3225 }%end of macro Ethylenev
3226 % \end{macrocode}
3227 % \end{macro}
3228 % \end{macro}
3229 %
3230 % \section{Square unit}
3231 %
3232 % The macro |\square| typesets a compound of tetravalency.
3233 % The following numbering is adopted in this macro.
3234 %
3235 % Because |\square| is defined in the present LaTeX2e,
3236 % the command |\squarecomplex| is newly defined.
3237 %
3238 % \changes{v4.02a}{2004/12/27}{Bug fix: \cs{square} to \cs{squarecomplex}}
3239 %
3240 % The command |\square| is renamed to be |\squareplanar|. The code is entirely replaced.
3241 %
3242 % \changes{v4.05}{2009/11/08}{Bug fix: \cs{square} to \cs{squareplanar}}
3243 %
3244 % \begin{verbatim}
3245 % ***************
3246 % * square unit *
3247 % ***************
3248 %
3249 % The following numbering is adopted in this macro.
3250 %
3251 % 4 1
3252 % ` /
3253 % ` /
3254 % (0) <== the original point
3255 % / `
3256 % / `
3257 % 3 2
3258 %
3259 % \end{verbatim}
3260 %
3261 % This macro has an argument |SUBSLIST| as well as an optional
3262 % argument |AUXLIST|.
3263 %
3264 % \begin{verbatim}
3265 % \squareplanar[AUXLIST]{SUBSLIST}
3266 % \end{verbatim}
3267 %
3268 % The arugument |AUXLIST| designates an character on the central
3269 % atom of the formula drawn by this macro. It can be used a plus
3270 % or minus charge on the center.
3271 %
3272 % \begin{verbatim}
3273 % AUXLIST =
3274 %
3275 % {0+}: + charge (or another one chararacter) on the center
3276 % \end{verbatim}
3277 %
3278 % \begin{verbatim}
3279 % SUBSLIST: list of substituents
3280 %
3281 % for n = 1 to 4
3282 %
3283 % nT : triple bond at n-atom
3284 % nD : double bond at n-atom
3285 % n or nS : single bond at n-atom
3286 % nA : alpha single bond at n-atom
3287 % nB : beta single bond at n-atom
3288 %
3289 % for 0 : cetral atom (e.g. 0==C)
3290 % \end{verbatim}
3291 %
3292 % \begin{verbatim}
3293 % e.g.
3294 %
3295 % \squareplanar{0==C;1==Cl;2==F}
3296 % \squareplanar{0==C;1==Cl;4==F;2==CH$_{3}$}
3297 % \end{verbatim}
3298 % \changes{v1.02}{1998/10/31}{Adding \cs{ylsquareposition},
3299 % \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
3300 % \cs{yl@xdiff} and \cs{yl@ydiff}}
3301 % \changes{v5.00}{2010/10/01}{for bond coloring}
3302 %
3303 % \begin{macro}{\squareplanar}
3304 % \begin{macro}{\@squareplanar}
3305 % \begin{macrocode}
3306 \def\squareplanar{\@ifnextchar[{\@squareplanar[r}{\@squareplanar[r]}}
3307 \def\@squareplanar#1]#2{%
3308 \@reset@ylsw%
3309 \ylsquareposition{#2}%
3310 \if@ylsw \ifx\@@ylii\empty
3311 \def\@@ylii{0}\def\@@yli{0}\fi
3312 \fi
3313 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3314 (600,600)(-300,-300){square}%2002/4/30 by S. Fujita
3315 (300,300)%
3316 \@tfor\member:=#1\do{%
3317 \expandafter\twoch@@r\member{}{}%
3318 \if\@@tmpa 0\relax {\putratom{37}{0}{\scriptsize\@@tmpb}}\fi}%
3319 \@forsemicol\member:=#2\do{%
3320 \ifx\member\empty\else
3321 \expandafter\@m@mb@r\member;\relax%
3322 \expandafter\threech@r\@membera{}{}%
3323 \ifx\@memberb\@yl\else
3324 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
3325 \or\setBScolor{\Put@Direct(0,0){\NEbond}}%
3326 %\Put@Direct(0,0){\NEbond}%
3327 \or\setBScolor{\Put@Direct(0,0){\SEbond}}%
3328 %\Put@Direct(0,0){\SEbond}%
3329 \or\setBScolor{\Put@Direct(0,0){\SWbond}}%
3330 %\Put@Direct(0,0){\SWbond}%
3331 \or\setBScolor{\Put@Direct(0,0){\NWbond}}%
3332 %\Put@Direct(0,0){\NWbond}%
3333 \fi%end of ifcase
3334 \fi\fi}%
3335 \end{ShiftPicEnvB}%
3336 }%end of macro squareplanar
3337 \let\squarecomplex=\squareplanar
3338 \let\square=\squarplanar%combatible to the old version (<4.04)
3339 % \end{macrocode}
3340 % \end{macro}
3341 % \end{macro}
3342 %
3343 % The commands |\ylsquarepositiona| and |\ylsquarepositiona|
3344 % are used in |\square| to adjust a substitution position.
3345 % \changes{v1.02}{1998/10/20}{Newly added command: \cs{ylsquareposition}}
3346 % \changes{v5.01}{2013/07/30}{Bug fix}
3347 %
3348 % \begin{macro}{\ylsquareposition}
3349 % \begin{macrocode}
3350 \def\ylsquareposition#1{%
3351 \@@ylswfalse%%%\@reset@ylsw
3352 \reset@@yl%%2013/07/30bug fix
3353 \@forsemicol\member:=#1\do{%
3354 \if@@ylsw\else
3355 \ifx\member\empty\else
3356 \expandafter\@m@mb@r\member;\relax
3357 \expandafter\threech@r\@membera{}{}\relax
3358 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3359 \if@@ylsw
3360 \ifcase\@tmpa
3361 \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1
3362 \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1
3363 \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1
3364 \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1
3365 \fi%end of ifcase
3366 \fi\fi\fi}}%
3367 % \end{macrocode}
3368 % \end{macro}
3369 %
3370 % \section{Ball-stick models}
3371 % \subsection{Tetrahedral unit of stereo type}
3372 %
3373 % The macro |\tetrastereo| typesets a tetrahedral unit in a
3374 % ball-stick fashion.
3375 % The following numbering is adopted in this macro.
3376 %
3377 % \begin{verbatim}
3378 % *****************************
3379 % * tetrahedral unit (stereo) *
3380 % *****************************
3381 %
3382 % The following numbering is adopted in this macro.
3383 %
3384 % 1
3385 %
3386 % |
3387 % 2 -- 0 -- 4 0 <== the original point
3388 % |
3389 %
3390 % 3
3391 % \end{verbatim}
3392 %
3393 % This macro has an argument |SUBSLIST| as well as an optional
3394 % argument |AUXLIST|.
3395 %
3396 % \begin{verbatim}
3397 % \tetrastereo[AUXLIST]{SUBSLIST}
3398 % \end{verbatim}
3399 %
3400 % The arugument |AUXLIST| designates an character on the central
3401 % atom of the formula drawn by this macro. It can be used a plus
3402 % or minus charge on the center.
3403 %
3404 % \begin{verbatim}
3405 % AUXLIST =
3406 %
3407 % {0+} : + charge (or another one chararacter) on the center
3408 % \end{verbatim}
3409 %
3410 % \begin{verbatim}
3411 % SUBSLIST: list of substituents
3412 %
3413 % for n = 1 to 4
3414 %
3415 % n : single bond at n-atom
3416 %
3417 % for 0 : cetral atom (e.g. 0==C)
3418 % \end{verbatim}
3419 %
3420 % \begin{verbatim}
3421 % e.g.
3422 %
3423 % \tetrastereo{1==Cl;2==F}
3424 % \tetrastereo{1==Cl;4==F;2==CH$_{3}$}
3425 % \end{verbatim}
3426 % \changes{v5.00}{2010/10/01}{for bond coloring}
3427 %
3428 % \begin{macro}{\tetrastereo}
3429 % \begin{macro}{\@tetrastero}
3430 % \begin{macrocode}
3431 \def\tetrastereo{\@ifnextchar[{\@tetrastereo[r}{\@tetrastereo[r]}}
3432 \def\@tetrastereo#1]#2{%
3433 \begin{sfpicture}(600,600)(-300,-300)
3434 \OrigptOutput(300,300){tetrastereo}
3435 \Put@oCircle(0,0){200}%
3436 \@tfor\member:=#1\do{%
3437 \expandafter\twoch@@r\member{}{}%
3438 \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}%
3439 \@forsemicol\member:=#2\do{%
3440 \ifx\member\empty\else
3441 \expandafter\@m@mb@r\member;\relax%
3442 \expandafter\threech@r\@membera{}{}%
3443 \ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
3444 \or%
3445 \setBScolor{\Put@Line(0,100)(0,1){70}}% behind
3446 % \Put@Line(0,100)(0,1){70}% behind
3447 \putlratom{-30}{180}{\@memberb}% and up
3448 \or%
3449 {\thicklines%
3450 \setBScolor{\Put@Line(-60,10)(-5,2){140}}% in front
3451 % \Put@Line(-60,10)(-5,2){140}% in front
3452 \putlatom{-205}{30}{\@memberb}}% and left
3453 \or%
3454 \setBScolor{\Put@Line(0,-100)(0,-1){90}}% behind and
3455 % \Put@Line(0,-100)(0,-1){90}% behind and
3456 \putlratom{-30}{-260}{\@memberb}% down
3457 \or%
3458 {\thicklines%
3459 \setBScolor{\Put@Line(60,10)(5,2){140}}% in front
3460 % \Put@Line(60,10)(5,2){140}% in front
3461 \putratom{210}{30}{\@memberb}}% and right
3462 \fi\fi}%end of ifcase
3463 \end{sfpicture}}%end of macro tetrastereo
3464 % \end{macrocode}
3465 % \end{macro}
3466 % \end{macro}
3467 %
3468 % \subsection{Tetrahedral unit of inverse stereo type}
3469 %
3470 % The macro |\dtetrastereo| typesets another tetrahedral unit in a
3471 % ball-stick fashion.
3472 % The following numbering is adopted in this macro.
3473 %
3474 % \begin{verbatim}
3475 % *****************************
3476 % * tetrahedral unit (stereo) *
3477 % *****************************
3478 %
3479 % The following numbering is adopted in this macro.
3480 %
3481 % 1
3482 %
3483 % |
3484 % 2 -- 0 -- 4 0 <== the original point
3485 % |
3486 %
3487 % 3
3488 % \end{verbatim}
3489 %
3490 % This macro has an argument |SUBSLIST| as well as an optional
3491 % argument |AUXLIST|.
3492 %
3493 % \begin{verbatim}
3494 % \dtetrastereo[AUXLIST]{SUBSLIST}
3495 % \end{verbatim}
3496 %
3497 % The arugument |AUXLIST| designates an character on the central
3498 % atom of the formula drawn by this macro. It can be used a plus
3499 % or minus charge on the center.
3500 %
3501 % \begin{verbatim}
3502 % AUXLIST =
3503 %
3504 % {0+} : + charge (or another one chararacter) on the center
3505 % \end{verbatim}
3506 %
3507 % \begin{verbatim}
3508 % SUBSLIST: list of substituents
3509 %
3510 % for n = 1 to 4
3511 %
3512 % n : single bond at n-atom
3513 %
3514 % for 0 : cetral atom (e.g. 0==C)
3515 % \end{verbatim}
3516 %
3517 % \begin{verbatim}
3518 % e.g.
3519 %
3520 % \dtetrastereo{1==Cl;2==F}
3521 % \dtetrastereo{1==Cl;4==F;2==CH$_{3}$}
3522 % \end{verbatim}
3523 % \changes{v5.00}{2010/10/01}{for bond coloring}
3524 %
3525 % \begin{macro}{\dtetrastereo}
3526 % \begin{macro}{\@dtetrastereo}
3527 % \begin{macrocode}
3528 \def\dtetrastereo{\@ifnextchar[{\@dtetrastereo[r}{\@dtetrastereo[r]}}
3529 \def\@dtetrastereo#1]#2{%
3530 \begin{sfpicture}(600,600)(-300,-300)
3531 \OrigptOutput(300,300){dtetrastereo}
3532 \Put@oCircle(0,0){200}%
3533 \@tfor\member:=#1\do{%
3534 \expandafter\twoch@@r\member{}{}%
3535 \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}%
3536 \@forsemicol\member:=#2\do{%
3537 \ifx\member\empty\else
3538 \expandafter\@m@mb@r\member;\relax%
3539 \expandafter\threech@r\@membera{}{}%
3540 \ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
3541 \or%
3542 \setBScolor{\Put@Line(0,100)(0,1){70}}% behind
3543 % \Put@Line(0,100)(0,1){70}% behind
3544 \putlratom{-30}{180}{\@memberb}% and up
3545 \or%
3546 \setBScolor{\Put@Line(-94,-10)(-5,-2){108}}% in back
3547 % \Put@Line(-94,-10)(-5,-2){108}% in back
3548 \putlatom{-205}{-110}{\@memberb}% and left
3549 \or%
3550 {\thicklines%
3551 \setBScolor{\Put@Line(0,-50)(0,-1){150}}% behind and
3552 % \Put@Line(0,-50)(0,-1){150}% behind and
3553 \putlratom{-30}{-260}{\@memberb}}% down
3554 \or%
3555 \setBScolor{\Put@Line(94,-10)(5,-2){108}}% in back
3556 % \Put@Line(94,-10)(5,-2){108}% in back
3557 \putratom{210}{-110}{\@memberb}% and right
3558 \fi\fi}%end of ifcase
3559 \end{sfpicture}}%end of macro dtetrastereo
3560 % \end{macrocode}
3561 % \end{macro}
3562 % \end{macro}
3563 %
3564 % \subsection{Ethane unit of stereo type}
3565 %
3566 % The macro |\ethanestereo| typesets an ethane molecule in a
3567 % ball-stick fashion.
3568 % The following numbering is adopted in this macro.
3569 %
3570 % \begin{verbatim}
3571 % **************************
3572 % * ethane unit (vertical) *
3573 % **************************
3574 %
3575 % 5
3576 % |
3577 % 6 -- (2) -- 4
3578 % |
3579 % |
3580 % 1 -- (1) -- 3 <== the original point
3581 % |
3582 % 2
3583 % \end{verbatim}
3584 %
3585 % This macro has an argument |SUBSLIST| as well as an optional
3586 % argument |AUXLIST|.
3587 %
3588 % \begin{verbatim}
3589 % \ethanestereo[AUXLIST]{ATOMLIST}{SUBSLIST}
3590 % \end{verbatim}
3591 %
3592 % \begin{verbatim}
3593 % AUXLIST: list of charges
3594 %
3595 % {n+} : + charge (or another one chararacter) on n-atom
3596 % \end{verbatim}
3597 %
3598 % \begin{verbatim}
3599 % SUBSLIST: list of substituents
3600 %
3601 % for n = 1 to 6
3602 %
3603 % n : single bond at n-atom
3604 %
3605 % \end{verbatim}
3606 %
3607 % \begin{verbatim}
3608 % ATOMLIST: list of central atoms
3609 %
3610 % n : atom for n-position (e.g. 1==C)
3611 %
3612 % \end{verbatim}
3613 %
3614 % \begin{verbatim}
3615 % e.g.
3616 %
3617 % \ethanestereo{1==Cl;2==F}
3618 % \ethanestereo{1==C;2==C}{1==Cl;4==F;2==CH$_{3}$}
3619 % \end{verbatim}
3620 % \changes{v5.00}{2010/10/01}{for bond coloring}
3621 %
3622 % \begin{macro}{\ethanestereo}
3623 % \begin{macro}{\@ethanestereo}
3624 % \begin{macrocode}
3625 \def\ethanestereo{\@ifnextchar[{\@ethanestereo}{\@ethanestereo[]}}
3626 \def\@ethanestereo[#1]#2#3{%
3627 \begin{sfpicture}(600,800)(-300,-300)
3628 \OrigptOutput(300,300){ethanestereo}
3629 \Put@oCircle(0,0){200}%
3630 \Put@oCircle(0,270){200}%
3631 \Put@Line(0,100)(0,1){70}% central bond
3632 \@tfor\member:=#1\do{%
3633 \expandafter\twoch@@r\member{}{}%
3634 \if\@@tmpa 1\relax \putratom{87}{90}{\scriptsize\@@tmpb}
3635 \else\if\@@tmpa 2\relax \putratom{87}{360}{\scriptsize\@@tmpb}
3636 \fi\fi}%
3637 \def\aaa{#2}%
3638 \ifx\aaa\empty\else%
3639 \@forsemicol\member:=#2\do{%
3640 \ifx\member\empty\else
3641 \expandafter\@m@mb@r\member;\relax%
3642 \expandafter\threech@r\@membera{}{}%
3643 \ifcase\@tmpa%
3644 \or\putratom{-40}{-33}{\@memberb}%central atom
3645 \or\putratom{-40}{237}{\@memberb}%central atom
3646 \fi\fi}%end of ifcase
3647 \fi%
3648 \@forsemicol\member:=#3\do{%
3649 \ifx\member\empty\else
3650 \expandafter\@m@mb@r\member;\relax%
3651 \expandafter\threech@r\@membera{}{}%
3652 \ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom
3653 \or%
3654 \setBScolor{\Put@Line(-94,-10)(-5,-2){108}}% in back
3655 % \Put@Line(-94,-10)(-5,-2){108}% in back
3656 \putlatom{-205}{-110}{\@memberb}% and left
3657 \or%
3658 {\thicklines%
3659 \setBScolor{\Put@Line(0,-50)(0,-1){150}}% behind and
3660 % \Put@Line(0,-50)(0,-1){150}% behind and
3661 \putlratom{-30}{-260}{\@memberb}}% down
3662 \or%
3663 \setBScolor{\Put@Line(94,-10)(5,-2){108}}% in back
3664 % \Put@Line(94,-10)(5,-2){108}% in back
3665 \putratom{210}{-110}{\@memberb}% and right
3666 % %%%%%%%%
3667 \or%
3668 {\thicklines%
3669 \setBScolor{\Put@Line(60,280)(5,2){140}}% in front
3670 % \Put@Line(60,280)(5,2){140}% in front
3671 \putratom{210}{300}{\@memberb}}% and right
3672 \or%
3673 \setBScolor{\Put@Line(0,370)(0,1){70}}% behind
3674 % \Put@Line(0,370)(0,1){70}% behind
3675 \putlratom{-30}{450}{\@memberb}% and up
3676 \or%
3677 {\thicklines%
3678 \setBScolor{\Put@Line(-60,280)(-5,2){140}}% in front
3679 % \Put@Line(-60,280)(-5,2){140}% in front
3680 \putlatom{-205}{300}{\@memberb}}% and left
3681 \fi\fi}%end of ifcase
3682 \end{sfpicture}}%end of macro ethanestereo
3683 %</aliphat>
3684 % \end{macrocode}
3685 % \end{macro}
3686 % \end{macro}
3687 %
3688 %
3689 %<*aliphat>
3690 % \section{Wedged bonds for stereochemistry}
3691 % \subsection{Various tetrahedral units with wedged bonds}
3692 %
3693 % The macros |\rtetrahedralS| etc. typesets tetrahedral units weith bold wedged
3694 % bonds. The following modes of numbering are adopted in these macro.
3695 %
3696 % \begin{verbatim}
3697 % **************************************
3698 % * tetrahedral units with wedged bonds *
3699 % **************************************
3700 %
3701 %
3702 % 2
3703 %
3704 % /
3705 % 1 -- 0 0 <== the original point
3706 % | |
3707 % 3 4
3708 % 1,2,3,4 <== substituents
3709 % \end{verbatim}
3710 %
3711 % This macro has an argument |SUBSLIST| as well as an optional
3712 % argument |AUXLIST|.
3713 %
3714 % \begin{verbatim}
3715 % \rtetrahedralS[AUXLIST]{SUBSLIST}
3716 % \RtetrahedralS[AUXLIST]{SUBSLIST}
3717 % \ltetrahedralS[AUXLIST]{SUBSLIST}
3718 % \LtetrahedralS[AUXLIST]{SUBSLIST}
3719 % \utetrahedralS[AUXLIST]{SUBSLIST}
3720 % \UtetrahedralS[AUXLIST]{SUBSLIST}
3721 % \dtetrahedralS[AUXLIST]{SUBSLIST}
3722 % \DtetrahedralS[AUXLIST]{SUBSLIST}
3723 % \htetrahedralS[AUXLIST]{SUBSLIST}
3724 % \end{verbatim}
3725 %
3726 % The arugument |AUXLIST| designates an character on the central
3727 % atom of the formula drawn by this macro. It can be used a plus
3728 % or minus charge on the center.
3729 %
3730 % \begin{verbatim}
3731 % AUXLIST =
3732 %
3733 % {0+} : + charge (or another one chararacter) on the center
3734 % \end{verbatim}
3735 %
3736 % \begin{verbatim}
3737 % SUBSLIST: list of substituents
3738 %
3739 % for n = 1 to 4
3740 %
3741 % n : single bond at n-atom
3742 %
3743 % for 0 : cetral atom (e.g. 0==C)
3744 % \end{verbatim}
3745 % \changes{v5.00}{2010/10/01}{for bond coloring}
3746 %
3747 % \begin{macro}{\rtetrahedralS}
3748 % \begin{macro}{\@rtetrahedralS}
3749 % \begin{macrocode}
3750 \def\rtetrahedralS{\@ifnextchar[{\@rtetrahedralS[r}{\@rtetrahedralS[r]}}
3751 \def\@rtetrahedralS#1]#2{%
3752 \begingroup
3753 \@reset@ylsw%
3754 \centralatomcheck{#2}%
3755 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
3756 \ylrtetrahedralSposition{#2}%
3757 \if@ylsw \ifx\@@ylii\empty
3758 \def\@@ylii{0}\def\@@yli{0}\fi
3759 \fi
3760 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3761 (600,600)(-300,-300){rtetrahedralS}%2002/4/30 by S. Fujita
3762 (300,300)%
3763 \@tfor\member:=#1\do{%
3764 \expandafter\twoch@@r\member{}{}%
3765 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
3766 %set of bond and atoms
3767 \@forsemicol\member:=#2\do{%
3768 \ifx\member\empty\else
3769 \expandafter\@m@mb@r\member;\relax%
3770 \expandafter\threech@r\@membera{}{}%
3771 \ifx\@memberb\@yl\else
3772 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
3773 \or\setBScolor{\setatombondh}%1 (-1,0)
3774 %\setatombondh%1 (-1,0)
3775 \or\setBScolor{\setatombondF}%2 (3,5)
3776 %\setatombondF%2 (3,5)
3777 \or\setBScolor{\setatombonde}%3 (5,-3)
3778 %\setatombonde%3 (5,-3)
3779 \or\setBScolor{\setatombondE}%4 (3,-5)
3780 %\setatombondE%4 (3,-5)
3781 \fi%end of ifcase
3782 \fi\fi}%
3783 %\@clipfusefalse%
3784 \end{ShiftPicEnvB}%
3785 \endgroup}%end of macro rtetrahedralS
3786 % \end{macrocode}
3787 % \end{macro}
3788 % \end{macro}
3789 %
3790 %
3791 % The command |\ylrtetrahedralSposition| is used in
3792 % |\rtetrahedralS| to adjust a substitution position.
3793 % \changes{v4.02}{2004/12/20}{Newly added command:
3794 % \cs{ylrtetrahedralSposition}}
3795 %
3796 % \begin{macro}{\ylrtetrahedralSposition}
3797 % \begin{macrocode}
3798 \def\ylrtetrahedralSposition#1{%
3799 \@@ylswfalse%%%\@reset@ylsw
3800 \@forsemicol\member:=#1\do{%
3801 \if@@ylsw\else
3802 \ifx\member\empty\else
3803 \expandafter\@m@mb@r\member;\relax
3804 \expandafter\threech@r\@membera{}{}\relax
3805 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3806 \if@@ylsw
3807 \ifcase\@tmpa\relax
3808 \or
3809 \ifno@centeratom%
3810 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
3811 \else
3812 \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
3813 \fi
3814 \or
3815 \ifno@centeratom%
3816 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
3817 \else
3818 \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 2
3819 \fi
3820 \or
3821 \ifno@centeratom%
3822 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
3823 \else
3824 \gdef\@ylii{-40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
3825 \fi
3826 \or
3827 \ifno@centeratom%
3828 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
3829 \else
3830 \gdef\@ylii{-20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
3831 \fi%
3832 \fi%end of ifcase
3833 \fi\fi\fi}}%
3834 % \end{macrocode}
3835 % \end{macro}
3836 %
3837 % \changes{v5.00}{2010/10/01}{for bond coloring}
3838 % \begin{macro}{\ltetrahedralS}
3839 % \begin{macro}{\@ltetrahedralS}
3840 % \begin{macrocode}
3841 \def\ltetrahedralS{\@ifnextchar[{\@ltetrahedralS[r}{\@ltetrahedralS[r]}}
3842 \def\@ltetrahedralS#1]#2{%
3843 \begingroup
3844 \@reset@ylsw%
3845 \centralatomcheck{#2}%
3846 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
3847 \ylltetrahedralSposition{#2}%
3848 \if@ylsw \ifx\@@ylii\empty
3849 \def\@@ylii{0}\def\@@yli{0}\fi
3850 \fi
3851 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3852 (600,600)(-300,-300){ltetrahedralS}%2002/4/30 by S. Fujita
3853 (300,300)%
3854 \@tfor\member:=#1\do{%
3855 \expandafter\twoch@@r\member{}{}%
3856 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
3857 %set of bond and atoms
3858 \@forsemicol\member:=#2\do{%
3859 \ifx\member\empty\else
3860 \expandafter\@m@mb@r\member;\relax%
3861 \expandafter\threech@r\@membera{}{}%
3862 \ifx\@memberb\@yl\else
3863 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
3864 \or\setBScolor{\setatombondb}%1 (1,0)
3865 %\setatombondb%1 (1,0)
3866 \or\setBScolor{\setatombondD}%2 (-3,5)
3867 %\setatombondD%2 (-3,5)
3868 \or\setBScolor{\setatombondg}%3 (-5,-3)
3869 %\setatombondg%3 (-5,-3)
3870 \or\setBScolor{\setatombondG}%4 (-3,-5)
3871 %\setatombondG%4 (-3,-5)
3872 \fi%end of ifcase
3873 \fi\fi}%
3874 %\@clipfusefalse%
3875 \end{ShiftPicEnvB}%
3876 \endgroup}%end of macro ltetrahedralS
3877 % \end{macrocode}
3878 % \end{macro}
3879 % \end{macro}
3880 %
3881 %
3882 % The command |\ylltetrahedralSposition| is used in
3883 % |\ltetrahedralS| to adjust a substitution position.
3884 % \changes{v4.02}{2004/12/20}{Newly added command:
3885 % \cs{ylltetrahedralSposition}}
3886 %
3887 % \begin{macro}{\ylltetrahedralSposition}
3888 % \begin{macrocode}
3889 \def\ylltetrahedralSposition#1{%
3890 \@@ylswfalse%%%\@reset@ylsw
3891 \@forsemicol\member:=#1\do{%
3892 \if@@ylsw\else
3893 \ifx\member\empty\else
3894 \expandafter\@m@mb@r\member;\relax
3895 \expandafter\threech@r\@membera{}{}\relax
3896 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3897 \if@@ylsw
3898 \ifcase\@tmpa\relax
3899 \or
3900 \ifno@centeratom%
3901 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
3902 \else
3903 \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
3904 \fi
3905 \or
3906 \ifno@centeratom%
3907 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
3908 \else
3909 \gdef\@ylii{40}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 2
3910 \fi
3911 \or
3912 \ifno@centeratom%
3913 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
3914 \else
3915 \gdef\@ylii{40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
3916 \fi
3917 \or
3918 \ifno@centeratom%
3919 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
3920 \else
3921 \gdef\@ylii{20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
3922 \fi%
3923 \fi%end of ifcase
3924 \fi\fi\fi}}%
3925 % \end{macrocode}
3926 % \end{macro}
3927 %
3928 % \changes{v5.00}{2010/10/01}{for bond coloring}
3929 % \begin{macro}{\dtetrahedralS}
3930 % \begin{macro}{\@dtetrahedralS}
3931 % \begin{macrocode}
3932 \def\dtetrahedralS{\@ifnextchar[{\@dtetrahedralS[r}{\@dtetrahedralS[r]}}
3933 \def\@dtetrahedralS#1]#2{%
3934 \begingroup
3935 \@reset@ylsw%
3936 \centralatomcheck{#2}%
3937 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
3938 \yldtetrahedralSposition{#2}%
3939 \if@ylsw \ifx\@@ylii\empty
3940 \def\@@ylii{0}\def\@@yli{0}\fi
3941 \fi
3942 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
3943 (600,600)(-300,-300){dtetrahedralS}%2002/4/30 by S. Fujita
3944 (300,300)%
3945 \@tfor\member:=#1\do{%
3946 \expandafter\twoch@@r\member{}{}%
3947 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
3948 %set of bond and atoms
3949 \@forsemicol\member:=#2\do{%
3950 \ifx\member\empty\else
3951 \expandafter\@m@mb@r\member;\relax%
3952 \expandafter\threech@r\@membera{}{}%
3953 \ifx\@memberb\@yl\else
3954 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
3955 \or\setBScolor{\setatombonda}%1 (0,1)
3956 %\setatombonda%1 (0,1)
3957 \or\setBScolor{\setatombonde}%5 (5,-3)
3958 %\setatombonde%5 (5,-3)
3959 \or\setBScolor{\setatombondg}%3 (-5,-3)
3960 %\setatombondg%3 (-5,-3)
3961 \or\setBScolor{\setatombondG}%4 (-3,-5)
3962 %\setatombondG%4 (-3,-5)
3963 \fi%end of ifcase
3964 \fi\fi}%
3965 %\@clipfusefalse%
3966 \end{ShiftPicEnvB}%
3967 \endgroup}%end of macro dtetrahedralS
3968 % \end{macrocode}
3969 % \end{macro}
3970 % \end{macro}
3971 %
3972 % The command |\yldtetrahedralSposition| is used in
3973 % |\dtetrahedralS| to adjust a substitution position.
3974 % \changes{v4.02}{2004/12/20}{Newly added command:
3975 % \cs{yldtetrahedralSposition}}
3976 %
3977 % \begin{macro}{\yldtetrahedralSposition}
3978 % \begin{macrocode}
3979 \def\yldtetrahedralSposition#1{%
3980 \@@ylswfalse%%%\@reset@ylsw
3981 \@forsemicol\member:=#1\do{%
3982 \if@@ylsw\else
3983 \ifx\member\empty\else
3984 \expandafter\@m@mb@r\member;\relax
3985 \expandafter\threech@r\@membera{}{}\relax
3986 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
3987 \if@@ylsw
3988 \ifcase\@tmpa\relax
3989 \or
3990 \ifno@centeratom%
3991 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 1
3992 \else
3993 \gdef\@ylii{0}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 1
3994 \fi
3995 \or
3996 \ifno@centeratom%
3997 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 2
3998 \else
3999 % \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 2
4000 \gdef\@ylii{-42}\gdef\@yli{20}\global\@ylswtrue%W subst. on 2
4001 \fi
4002 \or
4003 \ifno@centeratom%
4004 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4005 \else
4006 \gdef\@ylii{40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
4007 \fi
4008 \or
4009 \ifno@centeratom%
4010 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4011 \else
4012 \gdef\@ylii{20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
4013 \fi%
4014 \fi%end of ifcase
4015 \fi\fi\fi}}%
4016 % \end{macrocode}
4017 % \end{macro}
4018 %
4019 % \changes{v5.00}{2010/10/01}{for bond coloring}
4020 % \begin{macro}{\DtetrahedralS}
4021 % \begin{macro}{\@DtetrahedralS}
4022 % \begin{macrocode}
4023 \def\DtetrahedralS{\@ifnextchar[{\@DtetrahedralS[r}{\@DtetrahedralS[r]}}
4024 \def\@DtetrahedralS#1]#2{%
4025 \begingroup
4026 \@reset@ylsw%
4027 \centralatomcheck{#2}%
4028 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4029 \ylDtetrahedralSposition{#2}%
4030 \if@ylsw \ifx\@@ylii\empty
4031 \def\@@ylii{0}\def\@@yli{0}\fi
4032 \fi
4033 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4034 (600,600)(-300,-300){DtetrahedralS}%2002/4/30 by S. Fujita
4035 (300,300)%
4036 \@tfor\member:=#1\do{%
4037 \expandafter\twoch@@r\member{}{}%
4038 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4039 %set of bond and atoms
4040 \@forsemicol\member:=#2\do{%
4041 \ifx\member\empty\else
4042 \expandafter\@m@mb@r\member;\relax%
4043 \expandafter\threech@r\@membera{}{}%
4044 \ifx\@memberb\@yl\else
4045 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4046 \or\setBScolor{\setatombonda}%1 (0,1)
4047 %\setatombonda%1 (0,1)
4048 \or\setBScolor{\setatombondg}%5 (-5,-3)
4049 %\setatombondg%5 (-5,-3)
4050 \or\setBScolor{\setatombonde}%3 (5,-3)
4051 %\setatombonde%3 (5,-3)
4052 \or\setBScolor{\setatombondE}%4 (3,-5)
4053 %\setatombondE%4 (3,-5)
4054 \fi%end of ifcase
4055 \fi\fi}%
4056 %\@clipfusefalse%
4057 \end{ShiftPicEnvB}%
4058 \endgroup}%end of macro DtetrahedralS
4059 % \end{macrocode}
4060 % \end{macro}
4061 % \end{macro}
4062 %
4063 % The command |\ylDtetrahedralSposition| is used in
4064 % |\DtetrahedralS| to adjust a substitution position.
4065 % \changes{v4.02}{2004/12/20}{Newly added command:
4066 % \cs{ylDtetrahedralSposition}}
4067 %
4068 % \begin{macro}{\ylDtetrahedralSposition}
4069 % \begin{macrocode}
4070 \def\ylDtetrahedralSposition#1{%
4071 \@@ylswfalse%%%\@reset@ylsw
4072 \@forsemicol\member:=#1\do{%
4073 \if@@ylsw\else
4074 \ifx\member\empty\else
4075 \expandafter\@m@mb@r\member;\relax
4076 \expandafter\threech@r\@membera{}{}\relax
4077 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4078 \if@@ylsw
4079 \ifcase\@tmpa\relax
4080 \or
4081 \ifno@centeratom%
4082 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4083 \else
4084 \gdef\@ylii{0}\gdef\@yli{-47}\global\@ylswtrue%W subst. on 1
4085 \fi
4086 \or
4087 \ifno@centeratom%
4088 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4089 \else
4090 \gdef\@ylii{40}\gdef\@yli{20}\global\@ylswtrue%N subst. on 2
4091 \fi
4092 \or
4093 \ifno@centeratom%
4094 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4095 \else
4096 \gdef\@ylii{-40}\gdef\@yli{20}\global\@ylswtrue%SE subst. on 3
4097 \fi
4098 \or
4099 \ifno@centeratom%
4100 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4101 \else
4102 \gdef\@ylii{-20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
4103 \fi%
4104 \fi%end of ifcase
4105 \fi\fi\fi}}%
4106 % \end{macrocode}
4107 % \end{macro}
4108 %
4109 % \changes{v5.00}{2010/10/01}{for bond coloring}
4110 % \begin{macro}{\utetrahedralS}
4111 % \begin{macro}{\@utetrahedralS}
4112 % \begin{macrocode}
4113 \def\utetrahedralS{\@ifnextchar[{\@utetrahedralS[r}{\@utetrahedralS[r]}}
4114 \def\@utetrahedralS#1]#2{%
4115 \begingroup
4116 \@reset@ylsw%
4117 \centralatomcheck{#2}%
4118 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4119 \ylutetrahedralSposition{#2}%
4120 \if@ylsw \ifx\@@ylii\empty
4121 \def\@@ylii{0}\def\@@yli{0}\fi
4122 \fi
4123 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4124 (600,600)(-300,-300){utetrahedralS}%2002/4/30 by S. Fujita
4125 (300,300)%
4126 \@tfor\member:=#1\do{%
4127 \expandafter\twoch@@r\member{}{}%
4128 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4129 %set of bond and atoms
4130 \@forsemicol\member:=#2\do{%
4131 \ifx\member\empty\else
4132 \expandafter\@m@mb@r\member;\relax%
4133 \expandafter\threech@r\@membera{}{}%
4134 \ifx\@memberb\@yl\else
4135 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4136 \or\setBScolor{\setatombondc}%8 (0,-1)
4137 %\setatombondc%8 (0,-1)
4138 \or\setBScolor{\setatombondf}%3 (5,3)
4139 %\setatombondf%3 (5,3)
4140 \or\setBScolor{\setatombondD}%1 (-3,5)
4141 %\setatombondD%1 (-3,5)
4142 \or\setBScolor{\setatombondd}%3 (-5,3)
4143 %\setatombondd%3 (-5,3)
4144 \fi%end of ifcase
4145 \fi\fi}%
4146 %\@clipfusefalse%
4147 \end{ShiftPicEnvB}%
4148 \endgroup}%end of macro utetrahedralS
4149 % \end{macrocode}
4150 % \end{macro}
4151 % \end{macro}
4152 %
4153 % The command |\ylutetrahedralSposition| is used in
4154 % |\utetrahedralS| to adjust a substitution position.
4155 % \changes{v4.02}{2004/12/20}{Newly added command:
4156 % \cs{ylutetrahedralSposition}}
4157 %
4158 % \begin{macro}{\ylutetrahedralSposition}
4159 % \begin{macrocode}
4160 \def\ylutetrahedralSposition#1{%
4161 \@@ylswfalse%%%\@reset@ylsw
4162 \@forsemicol\member:=#1\do{%
4163 \if@@ylsw\else
4164 \ifx\member\empty\else
4165 \expandafter\@m@mb@r\member;\relax
4166 \expandafter\threech@r\@membera{}{}\relax
4167 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4168 \if@@ylsw
4169 \ifcase\@tmpa\relax
4170 \or
4171 \ifno@centeratom%
4172 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 1
4173 \else
4174 \gdef\@ylii{0}\gdef\@yli{47}\global\@ylswtrue%N subst. on 1
4175 \fi
4176 \or
4177 \ifno@centeratom%
4178 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 2
4179 \else
4180 \gdef\@ylii{-42}\gdef\@yli{-20}\global\@ylswtrue%W subst. on 2
4181 \fi
4182 \or
4183 \ifno@centeratom%
4184 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4185 \else
4186 \gdef\@ylii{20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4187 \fi%
4188 \or
4189 \ifno@centeratom%
4190 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4191 \else
4192 \gdef\@ylii{40}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
4193 \fi
4194 \fi%end of ifcase
4195 \fi\fi\fi}}%
4196 % \end{macrocode}
4197 % \end{macro}
4198 %
4199 % \changes{v5.00}{2010/10/01}{for bond coloring}
4200 % \begin{macro}{\UtetrahedralS}
4201 % \begin{macro}{\@UtetrahedralS}
4202 % \begin{macrocode}
4203 \def\UtetrahedralS{\@ifnextchar[{\@UtetrahedralS[r}{\@UtetrahedralS[r]}}
4204 \def\@UtetrahedralS#1]#2{%
4205 \begingroup
4206 \@reset@ylsw%
4207 \centralatomcheck{#2}%
4208 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4209 \ylUtetrahedralSposition{#2}%
4210 \if@ylsw \ifx\@@ylii\empty
4211 \def\@@ylii{0}\def\@@yli{0}\fi
4212 \fi
4213 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4214 (600,600)(-300,-300){UtetrahedralS}%2002/4/30 by S. Fujita
4215 (300,300)%
4216 \@tfor\member:=#1\do{%
4217 \expandafter\twoch@@r\member{}{}%
4218 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4219 %set of bond and atoms
4220 \@forsemicol\member:=#2\do{%
4221 \ifx\member\empty\else
4222 \expandafter\@m@mb@r\member;\relax%
4223 \expandafter\threech@r\@membera{}{}%
4224 \ifx\@memberb\@yl\else
4225 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4226 \or\setBScolor{\setatombondc}%1 (0,-1)
4227 %\setatombondc%1 (0,-1)
4228 \or\setBScolor{\setatombondd}%2 (-5,3)
4229 %\setatombondd%2 (-5,3)
4230 \or\setBScolor{\setatombondF}%3 (3,5)
4231 %\setatombondF%3 (3,5)
4232 \or\setBScolor{\setatombondf}%4 (5,3)
4233 %\setatombondf%4 (5,3)
4234 \fi%end of ifcase
4235 \fi\fi}%
4236 %\@clipfusefalse%
4237 \end{ShiftPicEnvB}%
4238 \endgroup}%end of macro UtetrahedralS
4239 % \end{macrocode}
4240 % \end{macro}
4241 % \end{macro}
4242 %
4243 %
4244 % The command |\ylUtetrahedralSposition| is used in
4245 % |\UtetrahedralS| to adjust a substitution position.
4246 % \changes{v4.02}{2004/12/20}{Newly added command:
4247 % \cs{ylUtetrahedralSposition}}
4248 %
4249 % \begin{macro}{\ylUtetrahedralSposition}
4250 % \begin{macrocode}
4251 \def\ylUtetrahedralSposition#1{%
4252 \@@ylswfalse%%%\@reset@ylsw
4253 \@forsemicol\member:=#1\do{%
4254 \if@@ylsw\else
4255 \ifx\member\empty\else
4256 \expandafter\@m@mb@r\member;\relax
4257 \expandafter\threech@r\@membera{}{}\relax
4258 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4259 \if@@ylsw
4260 \ifcase\@tmpa\relax
4261 \or
4262 \ifno@centeratom%
4263 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4264 \else
4265 \gdef\@ylii{0}\gdef\@yli{47}\global\@ylswtrue%W subst. on 1
4266 \fi
4267 \or
4268 \ifno@centeratom%
4269 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4270 \else
4271 \gdef\@ylii{40}\gdef\@yli{-20}\global\@ylswtrue%N subst. on 2
4272 \fi
4273 \or
4274 \ifno@centeratom%
4275 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4276 \else
4277 \gdef\@ylii{-20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4278 \fi%
4279 \or
4280 \ifno@centeratom%
4281 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4282 \else
4283 \gdef\@ylii{-40}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
4284 \fi
4285 \fi%end of ifcase
4286 \fi\fi\fi}}%
4287 % \end{macrocode}
4288 % \end{macro}
4289 %
4290 % \changes{v5.00}{2010/10/01}{for bond coloring}
4291 % \begin{macro}{\htetrahedralS}
4292 % \begin{macro}{\@htetrahedralS}
4293 % \begin{macrocode}
4294 \def\htetrahedralS{\@ifnextchar[{\@htetrahedralS[r}{\@htetrahedralS[r]}}
4295 \def\@htetrahedralS#1]#2{%
4296 \begingroup
4297 \@reset@ylsw%
4298 \centralatomcheck{#2}%
4299 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4300 \ylhtetrahedralSposition{#2}%
4301 \if@ylsw \ifx\@@ylii\empty
4302 \def\@@ylii{0}\def\@@yli{0}\fi
4303 \fi
4304 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4305 (600,600)(-300,-300){htetrahedralS}%2002/4/30 by S. Fujita
4306 (300,300)%
4307 \@tfor\member:=#1\do{%
4308 \expandafter\twoch@@r\member{}{}%
4309 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4310 %set of bond and atoms
4311 \@forsemicol\member:=#2\do{%
4312 \ifx\member\empty\else
4313 \expandafter\@m@mb@r\member;\relax%
4314 \expandafter\threech@r\@membera{}{}%
4315 \ifx\@memberb\@yl\else
4316 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4317 \or\setBScolor{\setatombondg}%5 (-5,-3)
4318 %\setatombondg%5 (-5,-3)
4319 \or\setBScolor{\setatombonde}%5 (5,-3)
4320 %\setatombonde%5 (5,-3)
4321 \or\setBScolor{\setatombondF}%1 (3,5)
4322 %\setatombondF%1 (3,5)
4323 \or\setBScolor{\setatombondD}%1 (-3,5)
4324 %\setatombondD%1 (-3,5)
4325 \fi%end of ifcase
4326 \fi\fi}%
4327 %\@clipfusefalse%
4328 \end{ShiftPicEnvB}%
4329 \endgroup}%end of macro htetrahedralS
4330 % \end{macrocode}
4331 % \end{macro}
4332 % \end{macro}
4333 %
4334 %
4335 % The command |\ylhtetrahedralSposition| is used in
4336 % |\htetrahedralS| to adjust a substitution position.
4337 % \changes{v4.02}{2004/12/20}{Newly added command:
4338 % \cs{ylhtetrahedralSposition}}
4339 %
4340 % \begin{macro}{\ylhtetrahedralSposition}
4341 % \begin{macrocode}
4342 \def\ylhtetrahedralSposition#1{%
4343 \@@ylswfalse%%%\@reset@ylsw
4344 \@forsemicol\member:=#1\do{%
4345 \if@@ylsw\else
4346 \ifx\member\empty\else
4347 \expandafter\@m@mb@r\member;\relax
4348 \expandafter\threech@r\@membera{}{}\relax
4349 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4350 \if@@ylsw
4351 \ifcase\@tmpa\relax
4352 \or
4353 \ifno@centeratom%
4354 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4355 \else
4356 \gdef\@ylii{40}\gdef\@yli{30}\global\@ylswtrue%W subst. on 1
4357 \fi
4358 \or
4359 \ifno@centeratom%
4360 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4361 \else
4362 \gdef\@ylii{-40}\gdef\@yli{30}\global\@ylswtrue%N subst. on 2
4363 \fi
4364 \or
4365 \ifno@centeratom%
4366 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4367 \else
4368 \gdef\@ylii{-20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4369 \fi%
4370 \or
4371 \ifno@centeratom%
4372 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4373 \else
4374 \gdef\@ylii{40}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4375 \fi
4376 \fi%end of ifcase
4377 \fi\fi\fi}}%
4378 % \end{macrocode}
4379 % \end{macro}
4380 %
4381 % \changes{v5.00}{2010/10/01}{for bond coloring}
4382 % \begin{macro}{\RtetrahedralS}
4383 % \begin{macro}{\@RtetrahedralS}
4384 % \begin{macrocode}
4385 \def\RtetrahedralS{\@ifnextchar[{\@RtetrahedralS[r}{\@RtetrahedralS[r]}}
4386 \def\@RtetrahedralS#1]#2{%
4387 \begingroup
4388 \@reset@ylsw%
4389 \centralatomcheck{#2}%
4390 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4391 \ylRtetrahedralSposition{#2}%
4392 \if@ylsw \ifx\@@ylii\empty
4393 \def\@@ylii{0}\def\@@yli{0}\fi
4394 \fi
4395 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4396 (600,600)(-300,-300){RtetrahedralS}%2002/4/30 by S. Fujita
4397 (300,300)%
4398 \@tfor\member:=#1\do{%
4399 \expandafter\twoch@@r\member{}{}%
4400 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4401 %set of bond and atoms
4402 \@forsemicol\member:=#2\do{%
4403 \ifx\member\empty\else
4404 \expandafter\@m@mb@r\member;\relax%
4405 \expandafter\threech@r\@membera{}{}%
4406 \ifx\@memberb\@yl\else
4407 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4408 \or
4409 \setBScolor{\setatombondh}%1 (-1,0)
4410 %\setatombondh%1 (-1,0)
4411 \or\setBScolor{\setatombondE}%7 (3,-5)
4412 %\setatombondE%7 (3,-5)
4413 \or\setBScolor{\setatombondF}%2 (3,5)
4414 %\setatombondF%2 (3,5)
4415 \or\setBScolor{\setatombondf}%3 (5,3)
4416 %\setatombondf%3 (5,3)
4417 \fi%end of ifcase
4418 \fi\fi}%
4419 %\@clipfusefalse%
4420 \end{ShiftPicEnvB}%
4421 \endgroup}%end of macro RtetrahedralS
4422 % \end{macrocode}
4423 % \end{macro}
4424 % \end{macro}
4425 %
4426 %
4427 % The command |\ylRtetrahedralSposition| is used in
4428 % |\RtetrahedralS| to adjust a substitution position.
4429 % \changes{v4.02}{2004/12/20}{Newly added command:
4430 % \cs{ylRtetrahedralSposition}}
4431 %
4432 % \begin{macro}{\ylRtetrahedralSposition}
4433 % \begin{macrocode}
4434 \def\ylRtetrahedralSposition#1{%
4435 \@@ylswfalse%%%\@reset@ylsw
4436 \@forsemicol\member:=#1\do{%
4437 \if@@ylsw\else
4438 \ifx\member\empty\else
4439 \expandafter\@m@mb@r\member;\relax
4440 \expandafter\threech@r\@membera{}{}\relax
4441 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4442 \if@@ylsw
4443 \ifcase\@tmpa\relax
4444 \or
4445 \ifno@centeratom%
4446 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4447 \else
4448 \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4449 \fi
4450 \or
4451 \ifno@centeratom%
4452 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4453 \else
4454 \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue%N subst. on 2
4455 \fi
4456 \or
4457 \ifno@centeratom%
4458 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4459 \else
4460 \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4461 \fi
4462 \or
4463 \ifno@centeratom%
4464 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4465 \else
4466 \gdef\@ylii{-20}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
4467 \fi%
4468 \fi%end of ifcase
4469 \fi\fi\fi}}%
4470 % \end{macrocode}
4471 % \end{macro}
4472 %
4473 % \changes{v5.00}{2010/10/01}{for bond coloring}
4474 % \begin{macro}{\LtetrahedralS}
4475 % \begin{macro}{\@LtetrahedralS}
4476 % \begin{macrocode}
4477 \def\LtetrahedralS{\@ifnextchar[{\@LtetrahedralS[r}{\@LtetrahedralS[r]}}
4478 \def\@LtetrahedralS#1]#2{%
4479 \begingroup
4480 \@reset@ylsw%
4481 \centralatomcheck{#2}%
4482 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4483 \ylLtetrahedralSposition{#2}%
4484 \if@ylsw \ifx\@@ylii\empty
4485 \def\@@ylii{0}\def\@@yli{0}\fi
4486 \fi
4487 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4488 (600,600)(-300,-300){LtetrahedralS}%2002/4/30 by S. Fujita
4489 (300,300)%
4490 \@tfor\member:=#1\do{%
4491 \expandafter\twoch@@r\member{}{}%
4492 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4493 %set of bond and atoms
4494 \@forsemicol\member:=#2\do{%
4495 \ifx\member\empty\else
4496 \expandafter\@m@mb@r\member;\relax%
4497 \expandafter\threech@r\@membera{}{}%
4498 \ifx\@memberb\@yl\else
4499 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4500 \or
4501 \setBScolor{\setatombondb}%1 (1,0)
4502 %\setatombondb%1 (1,0)
4503 \or\setBScolor{\setatombondG}%2 (-3,-5)
4504 %\setatombondG%2 (-3,-5)
4505 \or\setBScolor{\setatombondD}%3 (-3,5)
4506 %\setatombondD%3 (-3,5)
4507 \or\setBScolor{\setatombondd}%4 (-5,3)
4508 %\setatombondd%4 (-5,3)
4509 \fi%end of ifcase
4510 \fi\fi}%
4511 %\@clipfusefalse%
4512 \end{ShiftPicEnvB}%
4513 \endgroup}%end of macro LtetrahedralS
4514 % \end{macrocode}
4515 % \end{macro}
4516 % \end{macro}
4517 %
4518 %
4519 % The command |\ylLtetrahedralSposition| is used in
4520 % |\LtetrahedralS| to adjust a substitution position.
4521 % \changes{v4.02}{2004/12/20}{Newly added command:
4522 % \cs{ylLtetrahedralSposition}}
4523 %
4524 % \begin{macro}{\ylLtetrahedralSposition}
4525 % \begin{macrocode}
4526 \def\ylLtetrahedralSposition#1{%
4527 \@@ylswfalse%%%\@reset@ylsw
4528 \@forsemicol\member:=#1\do{%
4529 \if@@ylsw\else
4530 \ifx\member\empty\else
4531 \expandafter\@m@mb@r\member;\relax
4532 \expandafter\threech@r\@membera{}{}\relax
4533 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4534 \if@@ylsw
4535 \ifcase\@tmpa\relax
4536 \or
4537 \ifno@centeratom%
4538 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4539 \else
4540 \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4541 \fi
4542 \or
4543 \ifno@centeratom%
4544 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4545 \else
4546 \gdef\@ylii{40}\gdef\@yli{47}\global\@ylswtrue%N subst. on 2
4547 \fi
4548 \or
4549 \ifno@centeratom%
4550 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4551 \else
4552 \gdef\@ylii{40}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4553 \fi
4554 \or
4555 \ifno@centeratom%
4556 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4557 \else
4558 \gdef\@ylii{20}\gdef\@yli{-20}\global\@ylswtrue%SE subst. on 3
4559 \fi%
4560 \fi%end of ifcase
4561 \fi\fi\fi}}%
4562 % \end{macrocode}
4563 % \end{macro}
4564 %
4565 % \subsection{Trigonal bipyramidal uits for transition states}
4566 %
4567 % \changes{v5.00}{2010/10/01}{for bond coloring}
4568 % \begin{macro}{\utrigpyramid}
4569 % \begin{macro}{\@utrigpyramid}
4570 % \begin{macrocode}
4571 \def\utrigpyramid{\@ifnextchar[{\@utrigpyramid[r}{\@utrigpyramid[r]}}
4572 \def\@utrigpyramid#1]#2{%
4573 \begingroup
4574 \@reset@ylsw%
4575 \centralatomcheck{#2}%
4576 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4577 \ylutrigpyramidposition{#2}%
4578 \if@ylsw \ifx\@@ylii\empty
4579 \def\@@ylii{0}\def\@@yli{0}\fi
4580 \fi
4581 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4582 (600,600)(-300,-300){utrigpyramid}%2002/4/30 by S. Fujita
4583 (300,300)%
4584 \@tfor\member:=#1\do{%
4585 \expandafter\twoch@@r\member{}{}%
4586 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4587 %set of bond and atoms
4588 \@forsemicol\member:=#2\do{%
4589 \ifx\member\empty\else
4590 \expandafter\@m@mb@r\member;\relax%
4591 \expandafter\threech@r\@membera{}{}%
4592 \ifx\@memberb\@yl\else
4593 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4594 \or\setBScolor{\setatombondc}%1 (0,-1)
4595 %\setatombondc%1 (0,-1)
4596 \or\setBScolor{\setatombondF}%2 (3,5)
4597 %\setatombondF%2 (3,5)
4598 \or\setBScolor{\setatombondD}%3 (-3,5)
4599 %\setatombondD%3 (-3,5)
4600 \or{\let\dotorline=\d@t@rline \setBScolor{\setatombondh}}%4 (-1,0)
4601 %{\let\dotorline=\d@t@rline \setatombondh}%4 (-1,0)
4602 \or{\let\dotorline=\d@t@rline \setBScolor{\setatombondb}}%5 (1,0)
4603 %{\let\dotorline=\d@t@rline \setatombondb}%5 (1,0)
4604 \fi%end of ifcase
4605 \fi\fi}%
4606 %\@clipfusefalse%
4607 \end{ShiftPicEnvB}%
4608 \endgroup}%end of macro utrigpyramid
4609 % \end{macrocode}
4610 % \end{macro}
4611 % \end{macro}
4612 %
4613 % The command |\ylutrigpyramidposition| is used in
4614 % |\utrigpyramid| to adjust a substitution position.
4615 % \changes{v4.02}{2004/12/20}{Newly added command:
4616 % \cs{ylutrigpyramidposition}}
4617 %
4618 % \begin{macro}{\ylutrigpyramidposition}
4619 % \begin{macrocode}
4620 \def\ylutrigpyramidposition#1{%
4621 \@@ylswfalse%%%\@reset@ylsw
4622 \@forsemicol\member:=#1\do{%
4623 \if@@ylsw\else
4624 \ifx\member\empty\else
4625 \expandafter\@m@mb@r\member;\relax
4626 \expandafter\threech@r\@membera{}{}\relax
4627 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4628 \if@@ylsw
4629 \ifcase\@tmpa\relax
4630 \or
4631 \ifno@centeratom%
4632 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4633 \else
4634 \gdef\@ylii{0}\gdef\@yli{47}\global\@ylswtrue%W subst. on 1
4635 \fi
4636 \or
4637 \ifno@centeratom%
4638 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4639 \else
4640 \gdef\@ylii{-20}\gdef\@yli{-47}\global\@ylswtrue%N subst. on 2
4641 \fi
4642 \or
4643 \ifno@centeratom%
4644 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4645 \else
4646 \gdef\@ylii{20}\gdef\@yli{-47}\global\@ylswtrue%SE subst. on 3
4647 \fi%
4648 \or
4649 \ifno@centeratom%
4650 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4651 \else
4652 \gdef\@ylii{40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4653 \fi
4654 \or
4655 \ifno@centeratom%
4656 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4657 \else
4658 \gdef\@ylii{-40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4659 \fi
4660 \fi%end of ifcase
4661 \fi\fi\fi}}%
4662 % \end{macrocode}
4663 % \end{macro}
4664 %
4665 % \changes{v5.00}{2010/10/01}{for bond coloring}
4666 % \begin{macro}{\dtrigpyramid}
4667 % \begin{macro}{\@dtrigpyramid}
4668 % \begin{macrocode}
4669 \def\dtrigpyramid{\@ifnextchar[{\@dtrigpyramid[r}{\@dtrigpyramid[r]}}
4670 \def\@dtrigpyramid#1]#2{%
4671 \begingroup
4672 \@reset@ylsw%
4673 \centralatomcheck{#2}%
4674 \ifno@centeratom\relax\@clipfusefalse\else\@clipfusetrue\fi%
4675 \yldtrigpyramidposition{#2}%
4676 \if@ylsw \ifx\@@ylii\empty
4677 \def\@@ylii{0}\def\@@yli{0}\fi
4678 \fi
4679 \begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
4680 (600,600)(-300,-300){dtrigpyramid}%2002/4/30 by S. Fujita
4681 (300,300)%
4682 \@tfor\member:=#1\do{%
4683 \expandafter\twoch@@r\member{}{}%
4684 \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}%
4685 %set of bond and atoms
4686 \@forsemicol\member:=#2\do{%
4687 \ifx\member\empty\else
4688 \expandafter\@m@mb@r\member;\relax%
4689 \expandafter\threech@r\@membera{}{}%
4690 \ifx\@memberb\@yl\else
4691 \ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom
4692 \or\setBScolor{\setatombonda}%1 (0,1)
4693 %\setatombonda%1 (0,1)
4694 \or\setBScolor{\setatombondE}%2 (3,-5)
4695 %\setatombondE%2 (3,-5)
4696 \or\setBScolor{\setatombondG}%3 (-3,-5)
4697 %\setatombondG%3 (-3,-5)
4698 \or{\let\dotorline=\d@t@rline \setBScolor{\setatombondh}}%4 (-1,0)
4699 %{\let\dotorline=\d@t@rline \setatombondh}%4 (-1,0)
4700 \or{\let\dotorline=\d@t@rline \setBScolor{\setatombondb}}%5 (1,0)
4701 %{\let\dotorline=\d@t@rline \setatombondb}%5 (1,0)
4702 \fi%end of ifcase
4703 \fi\fi}%
4704 %\@clipfusefalse%
4705 \end{ShiftPicEnvB}%
4706 \endgroup}%end of macro dtrigpyramid
4707 % \end{macrocode}
4708 % \end{macro}
4709 % \end{macro}
4710 %
4711 %
4712 % The command |\yldtrigpyramidposition| is used in
4713 % |\dtrigpyramid| to adjust a substitution position.
4714 % \changes{v4.02}{2004/12/20}{Newly added command:
4715 % \cs{yldtrigpyramidposition}}
4716 %
4717 % \begin{macro}{\yldtrigpyramidposition}
4718 % \begin{macrocode}
4719 \def\yldtrigpyramidposition#1{%
4720 \@@ylswfalse%%%\@reset@ylsw
4721 \@forsemicol\member:=#1\do{%
4722 \if@@ylsw\else
4723 \ifx\member\empty\else
4724 \expandafter\@m@mb@r\member;\relax
4725 \expandafter\threech@r\@membera{}{}\relax
4726 \ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
4727 \if@@ylsw
4728 \ifcase\@tmpa\relax
4729 \or
4730 \ifno@centeratom%
4731 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1
4732 \else
4733 \gdef\@ylii{0}\gdef\@yli{-47}\global\@ylswtrue%W subst. on 1
4734 \fi
4735 \or
4736 \ifno@centeratom%
4737 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%N subst. on 2
4738 \else
4739 \gdef\@ylii{-20}\gdef\@yli{47}\global\@ylswtrue%N subst. on 2
4740 \fi
4741 \or
4742 \ifno@centeratom%
4743 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4744 \else
4745 \gdef\@ylii{20}\gdef\@yli{47}\global\@ylswtrue%SE subst. on 3
4746 \fi%
4747 \or
4748 \ifno@centeratom%
4749 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4750 \else
4751 \gdef\@ylii{40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4752 \fi
4753 \or
4754 \ifno@centeratom%
4755 \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4756 \else
4757 \gdef\@ylii{-40}\gdef\@yli{0}\global\@ylswtrue%SE subst. on 3
4758 \fi
4759 \fi%end of ifcase
4760 \fi\fi\fi}}%
4761 %</aliphat>
4762 % \end{macrocode}
4763 % \end{macro}
4764 %
4765 % \Finale
4766 %
4767 \endinput