% \iffalse meta-comment
%% File: chemstr.dtx
%
%  Copyright 1993,1996,1998,2001,2002, 2004, 2005, 2006, 2009, 2010, 2011, 2013 by Shinsaku Fujita
%
%  This file is part of XyMTeX system.
%  -------------------------------------
%
% This file is a successor to:
%
% chemstr.sty
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
% \typeout{       -- Released December 1, 1993 by Shinsaku Fujita}
% Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
%
% This file is a part of the macro package ``XyMTeX'' which has been 
% designed for typesetting chemical structural formulas.
%
% This file is to be contained in the ``xymtex'' directory which is 
% an input directory for TeX. It is a LaTeX optional style file and 
% should be used only within LaTeX, because several macros of the file 
% are based on LaTeX commands. 
%
% For the review of XyMTeX, see
%  (1)  Shinsaku Fujita, ``Typesetting structural formulas with the text
%    formatter TeX/LaTeX'', Computers and Chemistry, in press.    
% The following book deals with an application of TeX/LaTeX to 
% preparation of manuscripts of chemical fields:
%  (2)  Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' 
%    Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].  
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'. 
% The Current Maintainer of this work is Shinsaku Fujita.
%
% This work consists of the files chemstr.dtx and chemstr.ins
% and the derived file chemstr.sty.
%
% Please report any bugs, comments, suggestions, etc. to:
%   Shinsaku Fujita, 
%   Shonan Institute of Chemoinformatics and Mathematical Chemistry
%   Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan
%  (old address)
%   Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., 
%   Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
%  (old address)
%   Department of Chemistry and Materials Technology, 
%   Kyoto Institute of Technology, \\
%   Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Bug Fix:
%   1993/11/14 S. Fujita 
%     A and B are interchanged.
%     a and b are interchanged.
%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{December 01, 1993}
% \def\versi@nno{ver1.00}
% \def\copyrighth@lder{SF}% % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{August 16, 1996}
% \def\versi@nno{ver1.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{October 31, 1998}
% \def\versi@nno{ver1.02}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{June 20, 2001}
% \def\versi@nno{ver2.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% (No Distribution)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{April 30, 2002}
% \def\versi@nno{ver3.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{May 30, 2002}
% \def\versi@nno{ver4.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{August 30, 2004}
% \def\versi@nno{ver4.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{November 11, 2004}
% \def\versi@nno{ver4.01a}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{December 20, 2004}
% \def\versi@nno{ver4.02}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{July 20, 2005}
% \def\versi@nno{ver4.03}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{September 5, 2006}
% \def\versi@nno{ver4.03b}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{July 7, 2009}
% \def\versi@nno{ver4.04a}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{October 25, 2009}
% \def\versi@nno{ver4.05}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{October 01, 2010}
% \def\versi@nno{ver5.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{chemstr}
% \def\versi@ndate{February 24, 2011}
% \def\versi@nno{ver5.01b}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \fi
%
% \CheckSum{14811}
%% \CharacterTable
%%  {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
%%   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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%
% \setcounter{StandardModuleDepth}{1}
%
% \StopEventually{}
% \MakeShortVerb{\|}
%
% \iffalse
% \changes{v1.01}{1996/06/26}{first edition for LaTeX2e}
% \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e}
% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
% \changes{v2.01}{2001/06/20}{Size reduction}
% \changes{v2.01}{2001/06/21}{The command \cs{dotorline} is added.}
% \changes{v3.00}{2002/04/30}{picture to sfpicture, etc.}
% \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv environment}
% \changes{v4.01}{2004/08/30}{Minor additions}
% \changes{v4.01a}{2004/11/11}{Bug fix}
% \changes{v4.02}{2004/12/20}{Adjustment for \cs{setbondatom..}}
% \changes{v4.02a}{2004/12/27}{Bug fix: change \cs{ggg} to \cs{gggA}}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry}
% \changes{v4.03b}{2006/9/5}{\cs{ggg} to \cs{gggA} in \cs{test@vertix}}
% \changes{v4.04}{2009/7/7}{Bug fix for the \cs{XyMTeX} logo}
% \changes{v4.05}{2009/10/25}{Bug fix for the \cs{XyMTeX} logo}
% \changes{v5.00}{2010/10/01}{bond coloring and the LaTeX Project Public License}
% \changes{v5.01b}{2011/02/24}{added commands for bond coloring of the PostScript Mode}
% \changes{v5.01}{2011/03/22}{\cs{SetTwoAtoms} added}
% \changes{v5.01}{2011/04/06}{bug fix}
% \changes{v5.01}{2011/06/19}{bug fix: \cs{ylposition}}
% \fi
%
% \iffalse
%<*driver>
\NeedsTeXFormat{pLaTeX2e}
% \fi
 \ProvidesFile{chemstr.dtx}[2013/03/22 v5.01 XyMTeX{} package file]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{chemstr.dtx}
%
% %%XyMTeX Logo: Definition 4%%%
\makeatletter
\def\select@@Upsionfont{%
\edef\test@rm{\rmdefault}%
\edef\test@sf{\sfdefault}%
\edef\test@tt{\ttdefault}%
\ifx\f@family \test@rm\relax
{\expandafter\csname OT1/cmr/\f@series/\f@shape/\f@size%
\endcsname\char'7}%
\else\ifx\f@family \test@sf\relax
{\expandafter\csname OT1/cmss/\f@series/\f@shape/\f@size%
\endcsname\char'7}%
\else\ifx\f@family \test@tt\relax
{\expandafter\csname OT1/cmtt/\f@series/\f@shape/\f@size%
\endcsname\char'7}%
\else{\expandafter\csname OT1/cmr/\f@series/\f@shape/\f@size%
\endcsname
\char'7}\fi\fi\fi%
}
\def\XyM{X\kern-.30em\smash{%
\raise.50ex\hbox to0.8em{\hss\select@@Upsionfont%
\hss}}\kern-.30em{M}}
\def\XyMTeX{\XyM\kern-.1em\TeX}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Basic Commands for Drawing  Chemical Structures 
by {\sffamily chemstr.sty} 
(\fileversion) of \XyMTeX{}}
\author{Shinsaku Fujita \\ 
Shonan Institute of Chemoinformatics and 
Mathematical Chemistry \\
Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa, \\
258-0019 Japan
% % (old address)
% %Department of Chemistry and Materials Technology, \\
% %Kyoto Institute of Technology, \\
% %Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
% % (old old address)
% % Ashigara Research Laboratories, 
% % Fuji Photo Film Co., Ltd., \\ 
% % Minami-Ashigara, Kanagawa, 250-01 Japan
}
\date{\filedate}
%
\begin{document}
   \maketitle
   \DocInput{chemstr.dtx}
\end{document}
%</driver>
% \fi
%
% \section{Introduction}\label{chemstr:intro}
%
% \subsection{Options for {\sffamily docstrip}}
%
% \DeleteShortVerb{\|}
% \begin{center}
% \begin{tabular}{|l|l|}
% \hline
% \emph{option} & \emph{function}\\ \hline
% chemstr & chemstr.sty \\
% driver & driver for this dtx file \\
% \hline
% \end{tabular}
% \end{center}
% \MakeShortVerb{\|}
%
% \subsection{Version Information}
%
%    \begin{macrocode}
%<*chemstr>
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.01}
\typeout{       -- Released June 19, 2013 by Shinsaku Fujita}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{chemstr}
\def\versi@ndate{June 19, 2013}
\def\versi@nno{ver5.01}
\def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
\space[\copyrighth@lder]}
%    \end{macrocode}
%
% \section{List of commands for chemstr.sty}
%
% \begin{verbatim}
% *********************************
% * chemstr.sty: list of commands *
% *********************************
%
%  <For separating an augument list to each argument>
%
%     \@forsemicol
%     \@forl@@p
%     \@iforl@@p
%     \@m@mb@r
%     \twoch@r
%     \twoCH@R (terminater //)
%     \twoch@@r
%     \twoCH@@R (terminater //)
%     \threech@r
%
%  <For designating coordinates for drawing round arrows>
%
%     \@forendparenthesis
% \end{verbatim}
%
% \begin{verbatim}
%  <Convention>
%
%     \rmoiety
%     \lmoiety
%     \putlatom
%     \putratom
%     \putlratom
%     \Putlratom
%
%     \dotorline
%  
% \end{verbatim}
%
% \begin{verbatim}
%  <Treatment of substitution positions>
%
%     \if@clip  \@clipfalse  \@cliptrue
%     \if@aclip \@aclipfalse \@acliptrue
%     \if@bclip \@bclipfalse \@bcliptrue
%     \if@cclip \@cclipfalse \@ccliptrue
%     \if@eclip \@eclipfalse \@ecliptrue
%     \if@fclip \@fclipfalse \@fcliptrue
%     \iforigpt \origptfalse \origpttrue
%     \@tmpaa (counter)
%
%     \clipinfo \storeclipinfo \developclipinfo
%
%  <Structures as substituents>
%     \@yl
%     \yl@xdiff \yl@ydiff
%     \yl@shiftii
%     \yl@shifti
%     \@ylii
%     \@yli
%     \@@ylii
%     \@@yli
%
%  <Fused positions check>
%     \fuseAx \fuseAy
%     \fuseBx \fuseBy
%
% \end{verbatim}
%
% \begin{verbatim}
%  <VERTICAL SETTING>
%   Substitution 
%
%     \@substa
%     \@substb
%     \@substc
%     \@substd
%     \@subste
%     \@substf
%
% \end{verbatim}
%
% \begin{verbatim}
%   Setting of atoms and bonds 
%
%     \setsixringv      (on a vertical six-membered ring)
%     \setdecaringv     (on a decaline (six-six) ring)
%     \setfusedbond     (at fused bond positions)
%     \if@clipfuse \@clipfusefalse \@clipfusetrue
%     \setatombond      (at an appropiate position)
%
%   Placing structures as substituents
%     \ylposition
%     \ylfusedpostion
%     \ylatombondposition
%
% \end{verbatim}
%
% \begin{verbatim}
%  <HORIZONTAL SETTING>
%   Substitution
%
%     \@hsubsta
%     \@hsubstb
%     \@hsubstc
%     \@hsubstd
%     \@hsubste
%     \@hsubstf
%
% \end{verbatim}
%
% \begin{verbatim}
%   Setting of atoms and bonds 
%
%     \setsixringh       (on a horizontal six-membered ring)
%
%   Placing structures as substituents
%
%     \ylpositionh
%
% \end{verbatim}
%
% \begin{verbatim}
%  <Linking units>
%
%     \ryl       (right linking unit) 
%     \lyl       (left linking unit)


% <Minor Linking Units>
%
%    \ayl
%
%    \upnobond
%    \downnobond 
%
%    \BiFunc
%
%  <Setting fused rings>
%
%     \set@fusionadd@sixv     \set@fusion@sixv
%     \set@fusionadd@sixvi    \set@fusion@sixvi
%     \set@fusionadd@sixh     \set@fusion@sixh
%     \set@fusionadd@sixhi    \set@fusion@sixhi
%
%     \set@fusion@decav
%     \set@fusion@decavb
%     \set@fusion@decavt
%     \set@fusion@decah
%
%     \set@fusion@hanthrav
%     \set@fusion@hphenanv
%
%     \set@fusionadd@fivev     \set@fusion@fivev
%     \set@fusionadd@fivevi    \set@fusion@fivevi
%     \set@fusionadd@fiveh     \set@fusion@fiveh
%     \set@fusionadd@fivehi    \set@fusion@fivehi
%
%     \set@fusion@nonav        \set@fusion@nonavi
%     \set@fusion@nonah        \set@fusion@nonahi
%     
% \end{verbatim}
%
% \begin{verbatim}
%  <For PostScript output>
%
%     \let\Put@Direct=\put
%     \let\Multiput@Direct=\multiput
%     \Put@@@Line
%     \Put@@@sCircle
%     \Put@@@oCircle
%
%  <ShiftPicEnv environments>
%
%     ShiftPicEnv
%     ShiftPicEnvB
%     \let\sfpicture=\picture
%     \let\endsfpicture=\endpicture
%
%  <Wave bonds for stereochemistry>
%     \ifwavebond, \WaveBonds
%
% <Bond coloring>
%     \addbscolor, 
%     \setbscolor, \setBScolor
%     \bscolorswON, \bscolorswOFF
%     \defineXyMcolor
%     \XyMcolor
%
% <Truncation for two or more atoms>
%    \SetTwoAtoms
%    \SetTwoAtomx
% \end{verbatim}
%
% \section{Initialization and conventions}
% \subsection{Logos}
%
% The logo of \XyMTeX{} is defined in two ways.  The first definition uses 
% the \verb/\fam/ command, which sometimes shows unusual behavior. The 
% second definition is adopted in the present version of \XyMTeX{}, since 
% this aims at the compatibility to \LaTeXe{}. 
%
% \begin{macro}{\XyMTeX}
%    \begin{macrocode}
% ***************
% * XyMTeX Logo *
% ***************
% %%XyMTeX Logo: Definition 1%%%
% \newcount\TestCount
% \def\XyM{\ifnum\fam=-1\relax\fam=0\relax\fi\TestCount=\fam%
% X\kern-.30em\smash{\raise.50ex\hbox{$\fam\TestCount\Upsilon$}}%
% \kern-.30em{M}}
% \def\XyMTeX{\XyM\kern-.1em\TeX}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    \end{macrocode}
%
%    \begin{macrocode}
% %%XyMTeX Logo: Definition 2%%%
% \def\UPSILON{\char'7}
% \def\XyM{X\kern-.30em\smash{\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}}
% \def\XyMTeX{\XyM\kern-.1em\TeX}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    \end{macrocode}
%
%    \begin{macrocode}
% %%XyMTeX Logo: Definition 3%%%2009/07/07
% \edef\test@it{\itdefault}
% \edef\test@sf{\sfdefault}
% \edef\test@tt{\ttdefault}
% \edef\test@sl{\sldefault}
% \edef\test@bx{\bfdefault}
% \def\XyM{X\kern-.30em\smash{%
% \raise.50ex\hbox to0.8em{\hss%
% \ifx\f@series \test@bx\relax
% $\mathbf{\Upsilon}$%
% \else\ifx\f@shape \test@it\relax
% $\mathit{\Upsilon}$%
% \else\ifx\f@family \test@sf\relax
% $\mathsf{\Upsilon}$%
% \else\ifx\f@family \test@tt\relax
% $\mathtt{\Upsilon}$%
% \else\ifx\f@shape \test@sl\relax
% $\mathit{\Upsilon}$%
% \else
% $\Upsilon$\fi\fi\fi\fi\fi%
% \hss}}\kern-.30em{M}}
% \def\XyMTeX{\XyM\kern-.1em\TeX}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %    \end{macrocode}
%
%    \begin{macrocode}
% %%XyMTeX Logo: Definition 4%%%2009/10/25
\def\select@@Upsionfont{%
\edef\test@rm{\rmdefault}%
\edef\test@sf{\sfdefault}%
\edef\test@tt{\ttdefault}%
\ifx\f@family \test@rm\relax
{\expandafter\csname OT1/cmr/\f@series/\f@shape/\f@size%
\endcsname\char'7}%
\else\ifx\f@family \test@sf\relax
{\expandafter\csname OT1/cmss/\f@series/\f@shape/\f@size%
\endcsname\char'7}%
\else\ifx\f@family \test@tt\relax
{\expandafter\csname OT1/cmtt/\f@series/\f@shape/\f@size%
\endcsname\char'7}%
\else{\expandafter\csname OT1/cmr/\f@series/\f@shape/\f@size%
\endcsname
\char'7}\fi\fi\fi%
}
\def\XyM{X\kern-.30em\smash{%
\raise.50ex\hbox to0.8em{\hss\select@@Upsionfont%
\hss}}\kern-.30em{M}}
\def\XyMTeX{\XyM\kern-.1em\TeX}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Switches for Three Modes}
% 
% Switches for determining three modes 
% are added in the \XyMTeX{} system (Version 5.00). 
% \changes{v5.00}{2010/10/01}{bond coloring and the LaTeX Project Public License}
%
% \begin{macro}{\ifPSmode etc.}
%    \begin{macrocode}
\newif\ifPSmode \PSmodefalse
\newif\ifPDFmode \PDFmodefalse
\newif\ifTeXLaTeXmode \TeXLaTeXmodetrue%default TeX/LaTeX mode. 
%    \end{macrocode}
% \end{macro}
%
% \subsection{Temporary Counters and Dimentions}
%
% The following counter registers are used to draw wavy bonds 
% by Bezier technique. 
%
% \begin{macro}{\@tempcntXa etc.}
%    \begin{macrocode}
\newcount\@tempcntXa \newcount\@tempcntYa \newcount\@tempcntz
\newcount\@tempcntXb \newcount\@tempcntYb \newcount\@tempcntzz
\newcount\@tempcntXc \newcount\@tempcntYc \newcount\@tempcntzzz
\newcount\@tempcntXd \newcount\@tempcntYd \newcount\@tempcntzzzz
%    \end{macrocode}
% \end{macro}
%
% The following dimension registers can be used temporarily 
% in addition to |\@tempdima| and |\@tempdimb| of LaTeX 
% utility. 
%
% \begin{macro}{\@dimtempa etc.}
%    \begin{macrocode}
\newdimen\@dimtempa
\newdimen\@tempdimd
\newdimen\@tempdime
%    \end{macrocode}
% \end{macro}
%
% \subsection{Wavy Bonds}
%
% Wavy bonds that represent unspecified stereochemistry are supported by using 
% PostScript technique. To assure compatibility, the non-PostScript mode 
% is revised to support wavy bonds. 
% \changes{v4.03}{2005/07/20}{Wavy Bonds} 
%
%
% \begin{macro}{\waveunitA}
%    \begin{macrocode}
\def\waveunitA(#1,#2)#3{%
\@tempcntz=#1\relax
\@tempcntzz=#2\relax
%%%%%%%%%%%%%%%%%%%%%%%%%
%middle point parameters%
%%%%%%%%%%%%%%%%%%%%%%%%%
\ifnum\@tempcntz=3\relax%
 \ifnum\@tempcntzz=5\relax%
  \@tempcntXa=-16 \@tempcntYa=10\relax%
  \@tempcntXd=16 \@tempcntYd=-10\relax
 \else\ifnum\@tempcntzz=-5\relax%
  \@tempcntXa=-16 \@tempcntYa=-10\relax
  \@tempcntXd=16 \@tempcntYd=10\relax
 \fi\fi 
\else\ifnum\@tempcntz=-3\relax%
 \ifnum\@tempcntzz=5\relax%
  \@tempcntXa=-16 \@tempcntYa=-10\relax%
  \@tempcntXd=16 \@tempcntYd=10\relax
 \else\ifnum\@tempcntzz=-5\relax%
  \@tempcntXa=-16 \@tempcntYa=10\relax
  \@tempcntXd=16 \@tempcntYd=-10\relax
 \fi\fi 
\else\ifnum\@tempcntz=5\relax
 \ifnum\@tempcntzz=3\relax
  \@tempcntXa=-10 \@tempcntYa=16\relax
  \@tempcntXd=10 \@tempcntYd=-16\relax
 \else\ifnum\@tempcntzz=-3\relax
  \@tempcntXa=-10 \@tempcntYa=-16\relax
  \@tempcntXd=10 \@tempcntYd=16\relax
 \fi\fi
\else\ifnum\@tempcntz=-5\relax
 \ifnum\@tempcntzz=3\relax
  \@tempcntXa=10 \@tempcntYa=16\relax
  \@tempcntXd=10 \@tempcntYd=-16\relax
 \else\ifnum\@tempcntzz=-3\relax
  \@tempcntXa=10 \@tempcntYa=-16\relax
  \@tempcntXd=-10 \@tempcntYd=16\relax
 \fi\fi
\else\ifnum\@tempcntz=1\relax
 \ifnum\@tempcntzz=0\relax
  \@tempcntXa=0 \@tempcntYa=20\relax
  \@tempcntXd=0 \@tempcntYd=-20\relax
 \fi
\else\ifnum\@tempcntz=-1\relax
 \ifnum\@tempcntzz=0\relax
  \@tempcntXa=0 \@tempcntYa=-20\relax
  \@tempcntXd=0 \@tempcntYd=20\relax
 \fi
\else\ifnum\@tempcntz=0\relax
 \ifnum\@tempcntzz=1\relax
  \@tempcntXa=-20 \@tempcntYa=0\relax
  \@tempcntXd=20 \@tempcntYd=0\relax
 \fi
\fi\fi\fi\fi\fi\fi\fi
%%%%%%%%%%%%%%%%%%%%
% start and ending %
%%%%%%%%%%%%%%%%%%%%
\ifnum\@tempcntzz=0\relax%(1,0) (-1,0)
 \ifnum\@tempcntz>0\relax
 \@tempcntXb=#3\relax
 \else
 \@tempcntXb=-#3\relax
 \fi
 \@tempcntYb=0
 \ifnum\@tempcntz>0\relax
 \@tempcntXa=#3\relax
 \else
 \@tempcntXa=-#3\relax
 \fi
 \divide\@tempcntXa by2\relax 
 \@tempcntXd=\@tempcntXa
\else\ifnum\@tempcntz=0\relax%(0,1) (0,-1)
 \@tempcntXb=0\relax
 \ifnum\@tempcntzz>0\relax
 \@tempcntYb=#3\relax
 \@tempcntYa=#3\relax
 \else
 \@tempcntYb=-#3\relax
 \@tempcntYa=-#3\relax
 \fi
 \divide\@tempcntYa by2\relax 
 \@tempcntYd=\@tempcntYa
\else
\ifnum\@tempcntz>0\relax
\@tempcntXb=#3\relax
\else
\@tempcntXb=-#3\relax
\fi
\ifnum\@tempcntzz>0\relax
\@tempcntYb=#3\relax
\else
\@tempcntYb=-#3\relax
\fi
\ifnum\@tempcntzz>0\relax
\@tempcntzzzz=#2\relax
\else
\@tempcntzzzz=-#2\relax
\fi
\multiply\@tempcntYb by10\relax
\multiply\@tempcntYb by\@tempcntzzzz\relax
\ifnum\@tempcntz>0\relax
\@tempcntzzzz=#1\relax
\else
\@tempcntzzzz=-#1\relax
\fi
\divide\@tempcntYb by\@tempcntzzzz\relax
\divide\@tempcntYb by10\relax
\@tempcntzzzz=\@tempcntXb
\divide\@tempcntzzzz by2\relax
\advance\@tempcntXa by\@tempcntzzzz
\advance\@tempcntXd by\@tempcntzzzz
\@tempcntzzzz=\@tempcntYb
\divide\@tempcntzzzz by2\relax
\advance\@tempcntYa by\@tempcntzzzz
\advance\@tempcntYd by\@tempcntzzzz
\fi\fi
%%%%%%%%%%%%%%%%%
% Bezier curves %
%%%%%%%%%%%%%%%%%
\@tempcntXc=\@tempcntXb
\multiply\@tempcntXc by2\relax
\@tempcntYc=\@tempcntYb
\multiply\@tempcntYc by2\relax
\begin{picture}(0,0)(0,0)%
\multiput(0,0)(\@tempcntXc,\@tempcntYc){3}{%
\qbezier(0,0)(\@tempcntXa,\@tempcntYa)(\@tempcntXb,\@tempcntYb)}%
\multiput(\@tempcntXb,\@tempcntYb)(\@tempcntXc,\@tempcntYc){2}{%
\qbezier(0,0)(\@tempcntXd,\@tempcntYd)(\@tempcntXb,\@tempcntYb)}%
\end{picture}%
}%end of \waveunitA
%    \end{macrocode}
% \end{macro}
%
% A new switch for wave bonds for stereochemistry is 
% added:  |\ifwavebond|.  
% \changes{v4.03}{2005/07/20}{New switch: \cs{ifwavebond}}
%
% \begin{macro}{\ifwavebond}
% \begin{macro}{\WaveBonds}
% \begin{macro}{\NormalBonds}
%    \begin{macrocode}
\newif\ifwavebond \wavebondfalse
\def\WaveBonds{\wavebondtrue} 
\def\NormalBonds{\wavebondfalse} 
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \changes{v4.03}{2005/07/20}{Renewed command: \cs{Put@@Line}} 
% \begin{macro}{\Put@@Line}
%    \begin{macrocode}
\def\Put@@Line(#1,#2)(#3,#4)#5{\Put@Direct(#1,#2){%
\ifwavebond \@tempcnta=#5\relax
\divide\@tempcnta by5\relax
\waveunitA(#3,#4){\@tempcnta}\else
\line(#3,#4){#5}\fi}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Conventions for PostScript}
%
% The picture environment is switched to be acceptable 
% to another system such as PostScript. 
%
% \changes{v4.00}{2002/5/30}{New commands: \cs{Put@@Line}, 
%   \cs{Put@@sCircle}, and \cs{Put@@oCircle}}
% \begin{macro}{\Put@@Line}
% \begin{macro}{\Put@@sCircle}
% \begin{macro}{\Put@@oCircle}
%    \begin{macrocode}
\global\let\@ldline=\line%store the oridinal line command of picture enviroment
\global\let\@ldthicklines=\thicklines
\global\let\@ldthinlines=\thinlines
%%\def\Put@@Line(#1,#2)(#3,#4)#5{\Put@Direct(#1,#2){\line(#3,#4){#5}}}
\def\Put@@sCircle(#1,#2)#3{\Put@Direct(#1,#2){\circle*{#3}}}
\def\Put@@oCircle(#1,#2)#3{\Put@Direct(#1,#2){\circle{#3}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% The initial setting is the original LaTeX picture environment. 
% To switch the size-reduction meachism and the pstricks mechanism, 
% we can use a switching command such as |\originalpicture|. 
% \changes{v3.00}{2002/4/30}{New environment: sfpicture}
% \changes{v3.00}{2002/5/30}{New command: \cs{originalpicture}}
%
% \begin{macro}{\originalpicture}
% \begin{macro}{\sfpicture}
% \begin{macro}{\Put@Direct}
%    \begin{macrocode}
\newif\ifxymtexpssw\xymtexpsswfalse
\def\originalpicture{%
\let\sfpicture=\picture
\let\endsfpicture=\endpicture
\let\Put@Direct=\put
\let\Multiput@Direct=\multiput
\let\line=\@ldline
\let\dotorline=\d@t@rline
\let\thicklines=\@ldthicklines
\let\thinlines=\@ldthinlines
\thinlines
\let\Put@Line=\Put@@Line
\let\Put@sCircle=\Put@@sCircle
\let\Put@oCircle=\Put@@oCircle
\xymtexpsswfalse
\@ifundefined{@changeunitlength}{}{%
\let\changeunitlength=\@changeunitlength}%
\unitlength=0.1pt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% To switch from XyMTeX to XyMTeX with pstricks, we use the following command:  
% \begin{macro}{\changexymtextops}
%    \begin{macrocode}
\def\changexymtextops{\xymtexpsswtrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SlopetoXY}
% \changes{v5.00}{2010/10/01}{New command: \cs{SlopetoXY}}
% This command is extracted from |\Put@@@Line}| of the \textsf{xymtx-ps} package 
% so as to be a common code for defining |\Put@@@Line}| (\textsf{xymtx-ps} package), 
% |\Color@@@Line| (\textsf{xymtx-ps} package), |\Color@@@@Line| (\textsf{xymtx-pdf} package), 
% and so on. This command changes a set of line specifiers (a starting point, a slope, and 
% a line length of the \LaTeX{} picture environment) into another set 
% (a starting point and a terminal point (|\@tempcntXa|,|\@tempcntYa|)). 
% 
%    \begin{macrocode}
\def\SlopetoXY(#1,#2)(#3,#4)#5{%
%%x-coordinate
\@tempcntXa=0\relax
\ifnum#3>0\relax \@tempcntXa=#5\relax
\else\ifnum#3<0\relax\@tempcntXa=-#5\relax\fi\fi
\advance\@tempcntXa by#1\relax
%%y-coordinate
\@tempcntYa=#5\relax
\ifnum#3=0\relax\else
\multiply\@tempcntYa by#4\relax\multiply\@tempcntYa by10\relax
\divide\@tempcntYa by#3\relax\divide\@tempcntYa by10\relax\fi
\ifnum\@tempcntYa<0\relax
\ifnum#4>0\relax\@tempcntYa=-\@tempcntYa\fi
\else
\ifnum\@tempcntYa>0\relax
\ifnum#4<0\relax\@tempcntYa=-\@tempcntYa\fi\fi
\fi
\advance\@tempcntYa by#2\relax}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Macros for treating argumets}
% 
% For separating each argument (BONDLIST, SUBSLIST or ATOMLIST) into 
% components (descriptors), we define several useful macros. 
%
% \begin{macro}{\@forsemicol}
% \begin{macro}{\@forl@@p}
% \begin{macro}{\@iforl@@p}
%
% The macro |\@forsemicol| resembles the |\@for| macro that is 
% the \LaTeX{} original macro; however a semicolon is used as 
% a separating key in place of a comma.  
%
% \changes{v1.01}{1996/07/06}{\cs{@forsemicol}: \cs{edef}
% to \cs{expandafter}}
% \changes{v1.01}{1996/07/06}{\cs{@iforl@@p} replaced by 
% a LaTeX2e-like definitiion}
%
%    \begin{macrocode}
% ****************************************************
% * For separating an augument list to each argument *
% ****************************************************
%
\def\@forsemicol#1:=#2\do#3{%
%  \edef\@fortmp{#2}%1996/07/06 by S. Fujita
   \expandafter\def\expandafter\@fortmp\expandafter{#2}%
    \ifx\@fortmp\@empty \else%
    \expandafter\@forl@@p#2;\@nil;\@nil\@@#1{#3}\fi}
\long\def\@forl@@p#1;#2;#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else%
       #5\def#4{#2}\ifx #4\@nnil \else#5\@iforl@@p #3\@@#4{#5}\fi\fi}
\long\def\@iforl@@p#1;#2\@@#3#4{\def#3{#1}\ifx #3\@nnil%
       \expandafter\@fornoop \else
      #4\relax\expandafter\@iforl@@p\fi#2\@@#3{#4}}
%\def\@iforl@@p#1;#2\@@#3#4{\def#3{#1}\ifx #3\@nnil%
%       \let\@nextwhile=\@fornoop \else%
%      #4\relax\let\@nextwhile=\@iforl@@p\fi\@nextwhile#2\@@#3{#4}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The macro |\@m@mb@r| separates a character string into to portions 
% by using a double equality symbol (|==|) and a semicolon as delimiters. 
% The first potion consists of a locant number and a bond modifier (stored 
% in |\@membera|), which are further separated by the macro |\twoch@r|, 
% |\twoch@@r| or |\threech@r|. 
% The second potion shows a substituent (stored in |\@memberb|), 
% which is printed by means of an appropiate command. 
%
% \begin{macro}{\@m@mb@r}
% \begin{macro}{\twoch@r}
% \begin{macro}{\twoch@@r}
% \begin{macro}{\threech@r}
%    \begin{macrocode}
%\def\@m@mb@r#1==#2;{\gdef\@membera{#1}\gdef\@memberb{#2}}
\def\@m@mb@r#1==#2;{\def\@membera{#1}\def\@memberb{#2}}
\def\twoch@r#1#2{\gdef\@tmpa{#1}\gdef\@tmpb{#2}}
\def\twoch@@r#1#2{\gdef\@@tmpa{#1}\gdef\@@tmpb{#2}}
%\def\threech@r#1#2#3{\gdef\@tmpa{#1}\gdef\@tmpb{#2}\gdef\@tmpc{#3}}%redefined
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The command |\threech@r| is redefined by using |\@get@first@char|
% in order to give a warning of a two-digit number.  
% \changes{v4.00}{2002/05/30}{\cs{@get@first@char} has been added.}
%
% \begin{macro}{\@get@first@char}
%    \begin{macrocode}
\newif\ifdrawsamesubst\drawsamesubstfalse
\def\@get@first@char#1{\if\noexpand#1\relax\else
\@cnttempa=`#1\relax
\ifnum\@cnttempa>47\relax
\ifnum\@cnttempa<58\relax
\XyMTeXWarning{The second number (\@tmpb) of a two-digit number (\@tmpa\@tmpb) 
is missed. ^^J\space This should be written in braces,   
^^J\space e.g. `{\@tmpa\@tmpb}D==substituent' and `{{\@tmpa\@tmpb}}==substituent'.}
\fi\fi\fi}
%    \end{macrocode}
% \end{macro}
%
% \changes{v4.00}{2002/05/30}{\cs{threech@r} has been redefined.}
%
% \begin{macro}{\threech@r}
%    \begin{macrocode}
\def\threech@r#1#2#3{\gdef\@tmpa{#1}\gdef\@tmpb{#2}\gdef\@tmpc{#3}%
\begingroup
\ifdrawsamesubst\ifx\@tmpa\empty\relax\else\ifx\@tmpb\empty\relax\else
\setbox0=\hbox{\@get@first@char#2\relax}\fi\fi\fi
\endgroup}
%    \end{macrocode}
% \end{macro}
%
% The following two commands are added to treat spiro fusion.
% \changes{v2.00}{1998/11/15}{Added for spiro fusion}
% To avoid the bugs in drawing multi-nested fused compounds, |\gdef| is 
% changed to |\def| in the definitions of |\twoCH@@R| and |\twoCH@R|. 
% \changes{v4.00}{2002/05/30}{Bug fix for \cs{twoCH@@R} and \cs{twoCH@R}}
%
% \begin{macro}{\twoCH@R}
% \begin{macro}{\twoCH@@R}
%    \begin{macrocode}
%\def\twoCH@@R#1#2//{\gdef\@@tmpa{#1}\gdef\@@tmpb{#2}}
\def\twoCH@@R#1#2//{\def\@@tmpa{#1}\def\@@tmpb{#2}}
%\def\twoCH@R#1#2//{\gdef\@tmpa{#1}\gdef\@tmpb{#2}}
\def\twoCH@R#1#2//{\def\@tmpa{#1}\def\@tmpb{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%

% \begin{macro}{\@forendparenthesis}
%
% The macro |\@forendparenthesis| resembles the |\@for| macro that is 
% the \LaTeX{} original macro; however a close parenthesis is used as 
% a separating key in place of a comma.  
%
% \changes{v5.00}{2010/10/01}{for drawing round arrows} 
%
%    \begin{macrocode}
% ************************************
% * For coordinates for round arrows *
% ************************************
%
\def\@forendparenthesis#1:=#2\do#3{%
   \expandafter\def\expandafter\@fortmp\expandafter{#2}%
    \ifx\@fortmp\@empty \else%
    \expandafter\@forL@@P#2)\@nil)\@nil\@@#1{#3}\fi}
\long\def\@forL@@P#1)#2)#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else%
       #5\def#4{#2}\ifx #4\@nnil \else#5\@iforL@@P #3\@@#4{#5}\fi\fi}
\long\def\@iforL@@P#1)#2\@@#3#4{\def#3{#1}\ifx #3\@nnil%
       \expandafter\@fornoop \else
      #4\relax\expandafter\@iforL@@P\fi#2\@@#3{#4}}
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Conventions}
%
% Switches for characterizing substitution sites as 
% left, right or left-right boxes become effective in 
% the commands |\putlatom|, |\putratom| and |\putlratom|. 
% They are used for warning wrong or unnecessary usages of 
% |\lmoiety| or |\rmoiety|. 
%
% \changes{v1.02}{1998/10/20}{Switches \cs{@leftput} added}
%
% \begin{macro}{\if@leftput}
% \begin{macro}{\if@rightput}
% \begin{macro}{\if@leftrightput}
% \begin{macro}{\resetlrput}
%    \begin{macrocode}
\newif\if@rightput \@rightputfalse
\newif\if@leftput \@leftputfalse
\newif\if@leftrightput \@leftrightputfalse
\def\resetlrput{\@rightputfalse\@leftputfalse
\@leftrightputfalse}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% We can use the macro |\rmoiety| for drawing a right-hand substituent 
% and the macro |\lmoiety| for drawing a left-hand substituent. 
%
% \changes{v1.02}{1998/10/20}{The definitions of \cs{rmoiety} and 
% \cs{lmoiety} are changed. Warning function is added.}
%
% When you use a |\rmoiety| command in a left box produced by 
% a |\putlatom| command, the warning ``Wrong |\rmoiety|'' is reported. 
% When you use a |\lmoiety| command in a right box produced by 
% a |\putratom| command, the warning ``Wrong |\lmoiety|'' is reported. 
% If the ``draft'' option is effective, these cases are designated by 
% solid squares at the corresponding positions on pages. 
%
% \begin{macro}{\rmoiety}
% \begin{macro}{\lmoiety}
%    \begin{macrocode}
% **************
% * Convention *
% **************
% %\def\rmoiety#1{#1 \hss}
% %\def\lmoiety#1{\hss #1}
\def\rmoiety#1{\if@leftput
\XyMTeXWarning{Wrong \string\rmoiety\space used in a left box}%
\hbox to0pt{%
\hbox to0pt{\hss\vrule width\overfullrule height\overfullrule}#1\hss}%
\else\if@rightput\XyMTeXWarning{Unnecessary \string\rmoiety\space 
used in a right box}\hbox to0pt{#1\hss}%
\else\if@leftrightput\hbox to0pt{#1\hss}%
\fi\fi\fi\resetlrput}
\def\lmoiety#1{\if@rightput
\XyMTeXWarning{Wrong \string\lmoiety\space used in a right box}%
\hbox to0pt{\hss#1\kern-.72em%
\hbox to0pt{\vrule width\overfullrule height\overfullrule\hss}}\else 
\if@leftput\XyMTeXWarning{Unnecessary \string\lmoiety\space 
used in a left box}\hbox to0pt{\hss#1}%
\else\if@leftrightput\hbox to0pt{\hss#1\kern-.72em}%
\else\hbox to0pt{\hss#1\kern-.72em}\fi\fi\fi\resetlrput}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% Warnings from \XyMTeX{} are concerned with commands 
% |\rmoiety| and |\lmoiety|. 
% \changes{v5.00}{2010/10/01}{\cs{if@dbondcolor} added for bondcolor package}
%
% \begin{macro}{\XyMTeXWarning}
%    \begin{macrocode}
\newif\if@dbondcolor \@dbondcolorfalse
\def\XyMTeXWarning#1{%
\begingroup
\if@dbondcolor\else
 \let\protect\string
 \immediate\write\@unused{^^IXyMTeX Warning: #1\space 
   on input line \the\inputlineno^^I}%
\fi
\endgroup%
\global\@dbondcolorfalse%2010/10/01 for bond coloring
}
%    \end{macrocode}
% \end{macro}
%
% Warnings concerned with ring fusion are based on 
% the command |\FuseWarning| of \XyMTeX{}.
% \changes{v2.00}{1998/11/15}{Warning function is added.}
% \changes{v5.00}{2010/10/01}{\cs{futileFuseWarning} added for bondcolor package}
%
% \begin{macro}{\@cnttempa}
% \begin{macro}{\@cnttempb}
% \begin{macro}{\FuseWarning}
%    \begin{macrocode}
\newcount\@cnttempa
\newcount\@cnttempb
\def\FuseW@rning#1#2#3#4#5#6#7{%
\@tempcnta=#1 \@tempcntb=#2
\@cnttempa=#3 \advance\@cnttempa-#5
\@cnttempb=#4 \advance\@cnttempb-#6
\ifnum\@tempcnta=\@cnttempa
 \ifnum\@tempcntb=\@cnttempb\else
  \XyMTeXWarning{Mismatched fusion at bond `#7'}%
 \fi
\else
  \XyMTeXWarning{Mismatched fusion at bond `#7'}%
\fi}
\def\futileFuseWarning#1#2#3#4#5#6#7{}
\let\FuseWarning=\FuseW@rning
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The font of a substituent and its size are designated explicitly.
% \changes{v4.00}{2002/5/30}{%
% The comands \cs{substfont} and \cs{substfontsize} are added to 
% \cs{putlatom}, etc.}
% 
% \begin{macro}{\substfont}
% \begin{macro}{\substfontsize}
%    \begin{macrocode}
\let\substfont=\normalfont
\let\substfontsize=\normalsize
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The original \LaTeX{} command |\put| is changed into macros suitable to 
% more specific uses as follows. 
% 
% \changes{v1.02}{1998/10/20}{The definition is changed. Warning function 
% for \cs{rmoiety} is added.}
%
% \begin{macro}{\putlatom}
%    \begin{macrocode}
\def\putlatom#1#2#3{\begingroup\resetlrput
\Put@Direct(#1,#2){\@leftputtrue\substfont\substfontsize
\hbox to0pt{\hss #3}\@leftputfalse}\endgroup}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{The definition is changed. Warning function 
% for \cs{lmoiety} is added.}
%
% \begin{macro}{\putratom}
%    \begin{macrocode}
%\def\putratom#1#2#3{\Put@Direct(#1,#2){\hbox to0pt{#3 \hss}}}
\def\putratom#1#2#3{\begingroup\resetlrput
\Put@Direct(#1,#2){\@rightputtrue\substfont\substfontsize
\hbox to0pt{#3 \hss}\@rightputfalse}\endgroup}
%    \end{macrocode}
% \end{macro}
%
% \changes{v4.00}{2002/5/30}{The mechanism of centering the 
% first letter of a substituent by \cs{@getcharwidthput} is added to 
% \cs{putlratom}.}
%
% \changes{v4.01a}{2004/11/11}{The mechanism of \cs{@getcharwidthput} 
% is altered (one argument to two arguments). Treatments of \$ and commands are added.}
%
% \begin{macro}{\@getcharwidthput}
%    \begin{macrocode}
\newif\ifspecial@ylcs \special@ylcsfalse
\def\@getcharwidthput#1#2\owari{%
\global\special@ylcsfalse
\if\noexpand#1\relax \global\special@ylcstrue \else%\if the category #1 is 'command'
\ifcat#1$\relax \global\special@ylcstrue\else%if the category of #1 is 'special letter' 
\ifcat#1a\relax%if the category of #1 is 'letter'
\setbox0=\hbox{#1}%
\global\@dimtempa=0.7em 
\global\advance\@dimtempa by-\wd0\relax
\global\divide\@dimtempa by2\relax
\else\global\@dimtempa=0em\relax\fi\fi\fi}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.02}{1998/10/20}{The definition is changed. Warning function 
% for \cs{lmoiety} and \cs{rmoiety|} is added.}
% \changes{v4.01a}{2004/11/11}{The mechanism of \cs{@getcharwidthput} 
% is altered (one argument to two arguments).}
%
% \begin{macro}{\putlratom}
%    \begin{macrocode}
\def\putlratom#1#2#3{\begingroup\resetlrput
\Put@Direct(#1,#2){\@leftrightputtrue\substfont\substfontsize
\setbox1=\hbox{%
\expandafter\@getcharwidthput#3\relax\owari}%the centering mechanism
\@tempdima=\@dimtempa%global to local
\ifspecial@ylcs\hbox to.72em{#3\hss}\else
\hbox to0.72em{\kern\@tempdima #3\hss}\kern-\@tempdima
\fi}%
\@leftrightputfalse\endgroup}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.01b}{1998/10/06}{\cs{putlratom}: delete \sc{setbox0}}
% \changes{v1.02}{1998/10/20}{The old definition is 
% totally replaced by the new definition}
%
% \begin{verbatim}
% % old definitions
% %    \begin{macrocode}
% % changed to avoid Overfull warnings 1993/11/11/S.Fujita
% % \newif\if@moiety \@moietyfalse
% % \def\putlratom#1#2#3{%
% % \def\lmoiety##1{\global\@moietytrue}%
% % \setbox0=\hbox{#3}%deleted by S. Fujita
% % \if@moiety\def\lmoiety##1{\hss ##1}%
% % \Put@Direct(#1,#2){\hbox to.72em{#3}}\global\@moietyfalse
% % \else\Put@Direct(#1,#2){\hbox to.6em{#3\hss}}\fi}%
% % \def\putlratom#1#2#3{\Put@Direct(#1,#2){\hbox to.6em{#3}}}
% %    \end{macrocode}
% \end{verbatim}
%
% \begin{macro}{\Putlratom}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%    \begin{macrocode}
\def\Putlratom#1#2#3{\Put@Direct(#1,#2){\substfont\substfontsize
\hbox to.8em{#3}}}
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.01}{2000/6/20}{New command: \cs{dotorline}}
% \begin{macro}{\dotorline}
%    \begin{macrocode}
\def\d@t@rline(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){%
  \@ifundefined{dottedline}{%
   \XyMTeXWarning{A dottedline is replaced by a solid line.}%
    \Put@Line(#1,#2)(#3,#4){#5}%
     }{{\thicklines%
        \ifdim\unitlength>0.08pt
          \dottedline{20}(#6,#7)(#8,#9)%
        \else
          \dottedline{30}(#6,#7)(#8,#9)\fi}}}
\let\dotorline=\d@t@rline
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Parameters}
%
% The original point for drawing a structural formula is shifted to an 
% appropriate position, which is designated by the following parmeters 
% (counters) for coordinates.
% 
%
% \begin{macro}{\noshift}
% \begin{macro}{\shifti}
% \begin{macro}{\shiftii}
% \begin{macro}{\shiftiii}
%    \begin{macrocode}
% *******************************
% * Parameters for Coordinates  *
% *******************************
\newcount\noshift \noshift=0\relax%
\newcount\shifti \shifti=240\relax%
\newcount\shiftii \shiftii=400\relax%
\newcount\shiftiii \shiftiii=800\relax%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The unit length for \XyMTeX{} is selected to be 0.1pt. This value 
% should not be maintained as possible as you can.  A smaller value 
% may disapper a sloped line of short length. 
%    \begin{macrocode}
\unitlength.1pt%
%    \end{macrocode}
%
% Parameters for ring fusion are used in fusering.sty. 
% \changes{v2.00}{1999/2/16}{This has been added to process the old XyMTeX 
% manual for Version 1.01} 
%
% \begin{macro}{\fuseAx}
% \begin{macro}{\fuseBx}
% \begin{macro}{\fuseAy}
% \begin{macro}{\fuseBy}
%    \begin{macrocode}
\def\fuseAx{0}
\def\fuseBx{0}
\def\fuseAy{0}
\def\fuseBy{0}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Various switchs}
%
% These macros are used for clipping spaces at substitution positions. 
% Note that |\if@clip| is used in place of |\if@dclip|. 
%
% \changes{v3.00}{2002/4/30}{New Command: \cs{originoutput}}
%
% \begin{macro}{\if@clip}
% \begin{macro}{\if@aclip}
% \begin{macro}{\if@bclip}
% \begin{macro}{\if@cclip}
% \begin{macro}{\if@eclip}
% \begin{macro}{\if@fclip}
% \begin{macro}{\iforigpt}
% \begin{macro}{\@tmpaa}
% \begin{macro}{\oriptoutput}
% \begin{macro}{\OriptOutput}
% \begin{macro}{\OriptOutputA}
%    \begin{macrocode}
% ***************************************
% * various flags (switches)            *
% * treatment of substitution positions *
% ***************************************
%
% for 6- or lower-membered cycles
%
\newif\if@clip \@clipfalse%   % switch for clipping at 4 
\newif\if@aclip \@aclipfalse% % switch for clipping at 1
\newif\if@bclip \@bclipfalse% % switch for clipping at 2
\newif\if@cclip \@cclipfalse% % switch for clipping at 3
\newif\if@eclip \@eclipfalse% % switch for clipping at 5
\newif\if@fclip \@fclipfalse% % switch for clipping at 6
\newif\iforigpt \origptfalse% % switch for showing the original point
\newcount\@tmpaa%to use as a local counter
\def\@rigpt@utput#1{\iforigpt
   \Put@sCircle(-\shiftii,-\shifti){50}%
   \Put@oCircle(-\noshift,-\noshift){50}%
   \typeout{command `#1' origin: %
   (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi}
\def\OrigptOutput(#1,#2)#3{\iforigpt
   \Put@sCircle(-#1,-#2){50}\Put@oCircle(0,0){50}%
   \typeout{command `#3' origin: (0,0) ---> (#1,#2)}\fi}
\def\OrigptOutputA(#1,#2)(#3,#4)#5{\iforigpt
   \Put@sCircle(-#1,-#2){50}\Put@oCircle(-#3,-#4){50}%
   \typeout{command `#5' origin: (#3,#4) ---> (#1,#2)}\fi}
\def\origptoutput{\@ifnextchar({\@origptoutput}{\@origptoutput(,)}}
\def\@origptoutput(#1){%
\@ifnextchar({\@@origptoutput(#1)}{\@@origptoutput(#1)(,)}}
\def\@@origptoutput(#1,#2)(#3,#4)#5{%
\def\TEMParga{#1}\def\TEMPargb{#3}%
\ifx\TEMParga\empty\relax
\@rigpt@utput{#5}\else\ifx\TEMPargb\empty\relax
\OrigptOutput(#1,#2){#5}\else
\OrigptOutputA(#1,#2)(#3,#4){#5}\fi\fi}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\if@gclip}
% \begin{macro}{\if@hclip}
% \begin{macro}{\if@iclip}
% \begin{macro}{\if@jclip}
% \begin{macro}{\if@xclip}
%    \begin{macrocode}
%
% for further-membered cycles
%
\newif\if@gclip \@gclipfalse%
\newif\if@hclip \@hclipfalse%
\newif\if@iclip \@iclipfalse%
\newif\if@jclip \@jclipfalse%
\newif\if@xclip \@xclipfalse%added for temp. 2013/03/24
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% The yl-function provides some difficulties in carrying 
% out an |\if@aclip| switch etc. if |\@acliptrue| etc. are 
% declared globally.  In Version 2.01, |\@acliptrue| etc. are 
% declared locally by the grouping mechanism of \TeX. In order to 
% communicate information on |\@acliptrue| etc. outside the grouping,  
% the command |\clipinfo| (globally declared) stores tentatively 
% information on |@acliptrue| etc. in the form of a,b,c,$\ldots$. 
% Out side the grouping, the command |\developclipinfo| is 
% declared to reset |\@acliptrue| etc.
%
% \changes{v2.01}{2001/06/20}{Newly defined to communicate clipping
% information.} 
% \changes{v5.01}{2013/3/24}{\cs{if@xclip} added}
% \begin{macro}{\clipinfo}
% \begin{macro}{\storeclipinfo}
%    \begin{macrocode}
\def\clipinfo{}
\def\storeclipinfo{%
\if@aclip \xdef\clipinfo{\clipinfo a,}\fi
\if@bclip \xdef\clipinfo{\clipinfo b,}\fi
\if@cclip \xdef\clipinfo{\clipinfo c,}\fi
\if@clip \xdef\clipinfo{\clipinfo d,}\fi
\if@eclip \xdef\clipinfo{\clipinfo e,}\fi
\if@fclip \xdef\clipinfo{\clipinfo f,}\fi
\if@gclip \xdef\clipinfo{\clipinfo g,}\fi
\if@hclip \xdef\clipinfo{\clipinfo h,}\fi
\if@iclip \xdef\clipinfo{\clipinfo i,}\fi
\if@jclip \xdef\clipinfo{\clipinfo j,}\fi
\if@xclip \xdef\clipinfo{\clipinfo x,}\fi
}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% locally declared
%
% \begin{macro}{\developclipinfo}
%    \begin{macrocode}
\def\developclipinfo{%
\expandafter\@tfor\expandafter\MEMBER\expandafter:%
\expandafter=\clipinfo\do{%
\if\MEMBER a\relax \@acliptrue\fi
\if\MEMBER b\relax \@bcliptrue\fi
\if\MEMBER c\relax \@ccliptrue\fi
\if\MEMBER d\relax \@cliptrue\fi
\if\MEMBER e\relax \@ecliptrue\fi
\if\MEMBER f\relax \@fcliptrue\fi
\if\MEMBER g\relax \@gcliptrue\fi
\if\MEMBER h\relax \@hcliptrue\fi
\if\MEMBER i\relax \@icliptrue\fi
\if\MEMBER j\relax \@jcliptrue\fi}%
\gdef\clipinfo{}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Various commands and switchs for using substituents}
%
% For drawing a structure as a substituent, the argument (yl) can
% be used.  The following commands and counters are used for shifting
% the substituent. 
% \changes{v1.02}{1998/10/31}{Commands for setting substituents}
% \changes{v2.00}{1998/12/25}{Added: \cs{reset@yl@xydiff}}
%
% \begin{macro}{\@yl}
% \begin{macro}{\yl@xdiff}
% \begin{macro}{\yl@ydiff}
% \begin{macro}{\yl@shiftii}
% \begin{macro}{\yl@shifti}
% \begin{macro}{\@ylii}
% \begin{macro}{\@yli}
% \begin{macro}{\@@ylii}
% \begin{macro}{\@@yli}
%    \begin{macrocode}
\def\@yl{(yl)}
\newcount\yl@xdiff
\newcount\yl@ydiff
\newcount\yl@shiftii
\newcount\yl@shifti
\def\@ylii{0}\def\@yli{0}
\def\@@ylii{}\def\@@yli{}
\def\reset@@yl{\gdef\@@ylii{}\gdef\@@yli{}}
\def\reset@yl@xydiff{\yl@xdiff=0 \yl@ydiff=0\relax}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The following switches are used for shifting the substituent. 
% The locant flags such as |\@ylatrue| have been stoped to use. 
% \changes{v1.02}{1998/10/11}{Delete \cs{@ylatrue} etc.}
% \changes{v1.02}{1998/10/31}{Commands for setting substituents}
%
% Old definition:
%    \begin{macrocode}
% %%%%% \newif\if@yla \@ylafalse
% %%%%% \newif\if@ylb \@ylbfalse
% %%%%% \newif\if@ylc \@ylcfalse
% %%%%% \newif\if@yld \@yldfalse
% %%%%% \newif\if@yle \@ylefalse
% %%%%% \newif\if@ylf \@ylffalse
%    \end{macrocode}
%
% \begin{macro}{\if@ylsw}
% \begin{macro}{\if@@ylsw}
%    \begin{macrocode}
\newif\if@ylsw \@ylswfalse
\newif\if@@ylsw \@@ylswfalse
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{verbatim}
% Old definition:
% %    \begin{macrocode}
% %%%%% \def\@reset@ylsw{\@ylafalse\@ylbfalse\@ylcfalse
% %%%%% \@yldfalse\@ylefalse\@ylffalse\@ylswfalse}
% %    \end{macrocode}
% \end{verbatim}
%
% \begin{macro}{\@reset@ylsw}
%    \begin{macrocode}
\def\@reset@ylsw{\@ylswfalse\@@ylswfalse}
%    \end{macrocode}
% \end{macro}
%
% \subsection{ShiftPicEnv and ShiftPicEnvB}
%
% For supporting the yl-function of the XyM notation system, 
% the mechanism for sifting the original point of each picture 
% enviroment is encapsulated so as to create the ShiftPicEnv and 
% the ShiftPicEnvB environments. 
%
% \changes{v3.01}{2002/4/30}{Commands for shift of picture environment}
% \changes{v4.00}{2002/5/30}{New environment: ShiftPicEnv}
%
% The original point and the size of a picture environment is shifted 
% due to whether a yl-function is declared or not. The first set of 
% coordinates is usually set as (0,0), which means that the subsituent 
% produced by a yl-funtions has no dimensions. 
%
% Old definition for fused rings: 
% \begin{verbatim}
% \if@sixfuseposv
%  \yl@shiftii=-\fuseAx
%  \yl@shifti=-\fuseAy
%  \advance\yl@shiftii\yl@xdiff
%  \advance\yl@shifti\yl@ydiff
%  \begin{sfpicture}(0,0)(-\yl@shiftii,-\yl@shifti)
%  \reset@yl@xydiff%1999/1/6 by S. Fujita
% \else
%  \begin{sfpicture}(800,880)(-\shiftii,-\shifti)%
%   \origptoutput{sixfusev}%
% \fi
% \end{verbatim}
%
% For monocyclic compounds:
% \begin{verbatim}
% \ShiftPicEnv[1]%%[0] not for a fusion unit, [1] for a fusion usit
%   (0,0)(xshift,yshift)/%%picture after the action of yl function
%                        %%no dimension
%   (x_size,y_size)(xshift,yshift)%%orginal picture
%   {name}%%name of control sequence
%   (xx_size,yy_size)(xxshift,yyshift)%%option to typeout abnormal shifts
% \end{verbatim}
%
% \begin{macro}{\ShiftPicEnv}
%    \begin{macrocode}
\newif\ifshiftpicsw\shiftpicswfalse
\newif\if@sixfuseposv\@sixfuseposvfalse
\def\ShiftPicEnv{%
\@ifnextchar[{\ShiftPicEnv@}{\ShiftPicEnv@[0]}}
\def\ShiftPicEnv@[#1](#2)(#3)/(#4)(#5)#6{%
\@ifnextchar({\@ShiftPicEnv[#1](#2)(#3)/(#4)(#5){#6}}%
{\@ShiftPicEnv[#1](#2)(#3)/(#4)(#5){#6}(,)}}
\def\@ShiftPicEnv[#1](#2)(#3)/(#4)(#5)#6(#7){%
\@ifnextchar({\@@ShiftPicEnv[#1](#2)(#3)/(#4)(#5){#6}(#7)}%
{\@@ShiftPicEnv[#1](#2)(#3)/(#4)(#5){#6}(#7)(,)}}
\def\@@ShiftPicEnv[#1](#2)(#3)/(#4)(#5)#6(#7)(#8){%
\shiftpicswfalse%initialize
\ifcase#1\relax%%%non-fused ring
\if@ylsw \shiftpicswtrue
\yl@shiftii=\@ylii
\yl@shifti=\@yli
\fi
\or%%%fused ring
\if@sixfuseposv \shiftpicswtrue
 \yl@shiftii=-\fuseAx
 \yl@shifti=-\fuseAy
\fi
\fi
\ifshiftpicsw
\advance\yl@shiftii\yl@xdiff
\advance\yl@shifti\yl@ydiff
\begin{sfpicture}(#2)(#3)%
 \reset@yl@xydiff%1999/1/6 by S. Fujita
\else
\begin{sfpicture}(#4)(#5)%
  \origptoutput(#7)(#8){#6}%
\fi}
\def\endShiftPicEnv{\end{sfpicture}}
%    \end{macrocode}
% \end{macro}
%
% Old definition for bicyclic rings: 
% \begin{verbatim}
% \if@ylsw
%  \yl@shiftii=\@ylii
%  \yl@shifti=\@yli
%  \advance\yl@shiftii\@@ylii
%  \advance\yl@shifti\@@yli
%  \advance\yl@shiftii\yl@xdiff
%  \advance\yl@shifti\yl@ydiff
%  \begin{sfpicture}(0,0)(-\yl@shiftii,-\yl@shifti)
%  \reset@yl@xydiff%1999/1/6 by S. Fujita
% \else
%  \begin{sfpicture}(1200,880)(-\shiftii,-\shifti)%
%   \origptoutput{nonaheterov}%
% \fi
% \end{verbatim}
%
% For bicyclic compounds or others:
% \begin{verbatim}
% \ShiftPicEnvB(0,0)(xshift,yshift)/%%picture after the action of yl function
%   (x_size,y_size)(xshift,yshift)%%orginal picture
%   {name}%%name of control sequence
%   (xx_size,yy_size)(xxshift,yyshift)%%option to typeout abnormal shifts
% \end{verbatim}
%
% \begin{macro}{\ShiftPicEnvB}
%    \begin{macrocode}
\def\ShiftPicEnvB(#1)(#2)/(#3)(#4)#5{%
\@ifnextchar({\@ShiftPicEnvB(#1)(#2)/(#3)(#4){#5}}%
{\@ShiftPicEnvB(#1)(#2)/(#3)(#4){#5}(,)}}
\def\@ShiftPicEnvB(#1)(#2)/(#3)(#4)#5(#6){%
\@ifnextchar({\@@ShiftPicEnvB(#1)(#2)/(#3)(#4){#5}(#6)}%
{\@@ShiftPicEnvB(#1)(#2)/(#3)(#4){#5}(#6)(,)}}
\def\@@ShiftPicEnvB(#1)(#2)/(#3)(#4)#5(#6)(#7){%
\if@ylsw
 \yl@shiftii=\@ylii
 \yl@shifti=\@yli
 \advance\yl@shiftii\@@ylii
 \advance\yl@shifti\@@yli
 \advance\yl@shiftii\yl@xdiff
 \advance\yl@shifti\yl@ydiff
 \begin{sfpicture}(#1)(#2)%
 \reset@yl@xydiff%1999/1/6 by S. Fujita
\else
 \begin{sfpicture}(#3)(#4)%
  \origptoutput(#6)(#7){#5}%
\fi}
\def\endShiftPicEnvB{\end{sfpicture}}
%    \end{macrocode}
% \end{macro}
%
% The further fusion of a three- or four-membered ring at a center bond 
% of a six-six or six-five ring is permitted, while that of a five- 
% or more-membered ring is not permitted.  The macro |\@smallringsw| 
% is used for such switching (fusering.sty). 
% 
% \begin{macro}{\if@smallringsw}
%    \begin{macrocode}
\newif\if@smallringsw \@smallringswfalse
%    \end{macrocode}
% \end{macro}
%
% \subsection{Initialization}
%
% The |\iniflag| command initializes all of the clipping flags. 
% The |\iniatom| command initializes all of the strings of temporary use 
% such as |\aaa| and |\bbb|, which are associated with respective 
% atom positions. 
% The |\resetbdsw| command resets all of the strings of temporary use 
% such as |\@aaa| and |\@bbb|, which are associated with respective 
% bond positions. 
%
% \begin{macro}{\iniflag}
% \begin{macro}{\iniatom}
% \begin{macro}{\resetbdsw}
% \changes{v1.02}{1998/10/25}{Delete \sc{global}}
% \changes{v4.02a}{2004/12/27}{Change \sc{ggg} to \sc{ggg}}
%
%    \begin{macrocode}
% %\def\iniflag{%
% %\global\@aclipfalse\global\@bclipfalse%
% %\global\@cclipfalse\global\@clipfalse\global\@eclipfalse%
% %\global\@fclipfalse\global\@gclipfalse\global\@hclipfalse%
% %\global\@iclipfalse\global\@jclipfalse%
% %\global\@clipfusefalse}%
% %\def\iniatom{%
% %\gdef\aaa{}\gdef\bbb{}\gdef\ccc{}\gdef\ddd{}%
% %\gdef\eee{}\gdef\fff{}%
% %\gdef\gggA{}\gdef\hhh{}\gdef\iii{}\gdef\jjj{}%
% %\gdef\@aaa{}\gdef\@bbb{}\gdef\@ccc{}\gdef\@ddd{}%
% %\gdef\@eee{}\gdef\@fff{}%
% %}%
% %\def\resetbdsw{\gdef\@aaa{a}\gdef\@bbb{b}\gdef\@ccc{c}%
% %\gdef\@ddd{d}\gdef\@eee{e}\gdef\@fff{f}}%
%    \end{macrocode}
%
%    \begin{macrocode}
\def\iniflag{%
\@aclipfalse\@bclipfalse\@cclipfalse\@clipfalse\@eclipfalse%
\@fclipfalse\@gclipfalse\@hclipfalse%
\@iclipfalse\@jclipfalse\@clipfusefalse%
\global\@smallringswfalse%
}%
\def\iniatom{%
\def\aaa{}\def\bbb{}\def\ccc{}\gdef\ddd{}%
\def\eee{}\def\fff{}%
\def\gggA{}\def\hhh{}\def\iii{}\gdef\jjj{}%
\def\@aaa{}\def\@bbb{}\def\@ccc{}\def\@ddd{}%
\def\@eee{}\def\@fff{}%
\def\@ggg{}\def\@hhh{}\def\@iii{}%
\def\@jjj{}\def\@kkk{}%
}%
\def\resetbdsw{\def\@aaa{a}\def\@bbb{b}\def\@ccc{c}%
\def\@ddd{d}\def\@eee{e}\def\@fff{f}%
\def\@ggg{g}\def\@hhh{h}\def\@iii{i}%
\def\@jjj{j}\def\@kkk{k}%
}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% At the beginning of \XyMTeX\ processing, we initialize atom 
% information by the command |\iniatom|.
% 
%    \begin{macrocode}
\iniatom
%    \end{macrocode}
%
%
% \section{Macros for Vertical Formulas}
% \subsection{Placing substituents for vertical formulas}
%
% Such a drawing command as |\setsixringv| uses several inner macros 
% for placing substituents with bonds. The first set of inner macros 
% are shown as follows. 
%
% The command |\ylposition| is to obtain the shift values 
% |\@ylii| and |\@yli| which are used for shifting the standard 
% point of a substituent. 
% The locant flags such as |\@ylatrue| have been stoped to use. 
% \changes{v1.02}{1998/10/11}{Delete \cs{@ylatrue} etc.}
% \changes{v1.02}{1998/10/31}{Commands for setting substituents}
% \changes{v5.01}{2013/06/19}{bug fix: initial setting of \cs{reset@@yl}}
%
% \begin{macro}{\ylposition}
%    \begin{macrocode}
\def\ylposition#1#2#3#4#5{%
\@@ylswfalse%%%\@reset@ylsw
\reset@@yl%%2013/06/19bug fix
\@forsemicol\member:=#1\do{%
\if@@ylsw\else%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}\relax%
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifnum#5<0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax\fi
\ifnum\@tmpaa>#3\relax%
\ifnum\@tmpaa<#4\relax%
\ifcase\@tmpaa%0 omit
%    \end{macrocode}
%
% The flags |\@lyatrue| etc are not used in a revised edition. 
%
%    \begin{macrocode}
 \or\ifx\aaa\empty
      \gdef\@ylii{0}\gdef\@yli{-406}\global\@ylswtrue%\@ylatrue% subst. on 1
    \else
      \gdef\@ylii{0}\gdef\@yli{-442}\global\@ylswtrue%\@ylatrue% subst. on 1
    \fi
 \or\ifx\bbb\empty
      \gdef\@ylii{-171}\gdef\@yli{-303}\global\@ylswtrue%\@ylbtrue% subst. on 2
    \else
      \gdef\@ylii{-213}\gdef\@yli{-327}\global\@ylswtrue%\@ylbtrue% subst. on 2
    \fi
 \or\ifx\ccc\empty
      \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue%\@ylctrue% subst. on 3
    \else
      \gdef\@ylii{-213}\gdef\@yli{-79}\global\@ylswtrue%\@ylctrue% subst. on 3
    \fi
 \or\ifx\ddd\empty
      \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
    \else
      \gdef\@ylii{0}\gdef\@yli{36}\global\@ylswtrue%\@yldtrue% subst. on 4
    \fi
 \or\ifx\eee\empty
      \gdef\@ylii{171}\gdef\@yli{-103}\global\@ylswtrue%\@yletrue% subst. on 5
    \else
      \gdef\@ylii{213}\gdef\@yli{-79}\global\@ylswtrue%\@yletrue% subst. on 5
    \fi
 \or\ifx\fff\empty
      \gdef\@ylii{171}\gdef\@yli{-303}\global\@ylswtrue%\@ylftrue% subst. on 6
    \else
      \gdef\@ylii{213}\gdef\@yli{-327}\global\@ylswtrue%\@ylftrue% subst. on 6
    \fi%
\fi%end of ifcase
\fi\fi\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% The |\@substa| command is used for placing a substituent (|\@memberb|) at 
% the 1-position (top) of a vertical six-membered ring.  The bond linking 
% between the substituent and the 1-position is drawn in the light of 
% the corresponding bond modifier (|\@tmpc| = Sa, Sb, SA, SB etc.). 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{New bond modifiers: FA, FB, GA, GB, Su, and Sd}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@substa}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 1 %
% %%%%%%%%%%%%%%%
\def\@substa{%
\if@aclip% %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \Put@Line(0,436)(0,1){110}%      % single bond at 1
   \else\if\@tmpc B%(B) beta
      \yl@xdiff=-36\relax
      \yl@ydiff=-27\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           {%
           \thicklines%
           \Put@Line(-18,436)(-3,5){60}%    % single bond at 1
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=-27\relax
           \putratom{41}{563}{\@memberb}%     % right type
       \dotorline(18,436)(3,5){60}/(18,436)(72,526)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=36\relax
      \yl@ydiff=-27\relax
           \putratom{41}{563}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(18,436)(3,5){60}%    % single bond at 1
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-37\relax
      \yl@ydiff=-27\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
       \dotorline(-18,436)(-3,5){60}/(-18,436)(-72,526)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-36\relax
      \yl@ydiff=-27\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           \Put@Line(-18,436)(-3,5){60}%    % single bond at 1
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=-27\relax
           \putratom{41}{563}{\@memberb}%     % right type
           \Put@Line(18,436)(3,5){60}%      % single bond at 1
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-36\relax
      \yl@ydiff=-27\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           {%
           \WaveBonds%
           \Put@Line(-18,436)(-3,5){60}%    % single bond at 1
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=37\relax
      \yl@ydiff=-27\relax
           \putratom{41}{563}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(18,436)(3,5){60}%      % single bond at 1
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \Put@Line(-12,436)(0,1){110}%    % double bond at 1
           \Put@Line(12,436)(0,1){110}%     % double bond at 1
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(0,436)(0,1){110}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \dotorline(0,436)(0,1){110}/(0,436)(0,546)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           {%
           \WaveBonds%
           \Put@Line(0,436)(0,1){110}%      % single wave bond at 1
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(0,406){\setatombondd}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(0,406){\setatombondf}%
     }%
   \else%
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \Put@Line(0,436)(0,1){110}%      % single bond at 1
   \fi\fi\fi\fi%
   \fi\fi\fi%
\else% % no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \Put@Line(0,406)(0,1){140}%      % single bond at 1
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-30\relax
      \yl@ydiff=-37\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           {%
           \thicklines%
           \Put@Line(0,406)(-3,5){72}%      % single bond at 1
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=31\relax
      \yl@ydiff=-37\relax
           \putratom{41}{563}{\@memberb}%     % right type
           \dotorline(0,406)(3,5){72}/(0,406)(72,526)%
    \else\if\@tmpc u%(u) upper --- (B) beta
      \yl@xdiff=30\relax
      \yl@ydiff=-37\relax
           \putratom{41}{563}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(0,406)(3,5){72}%      % single bond at 1
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-31\relax
      \yl@ydiff=-37\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           \dotorline(0,406)(-3,5){72}/(0,406)(-72,526)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-30\relax
      \yl@ydiff=-37\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           \Put@Line(0,406)(-3,5){72}%      % single bond at 1
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=31\relax
      \yl@ydiff=-37\relax
           \putratom{41}{563}{\@memberb}%     % right type
           \Put@Line(0,406)(3,5){72}%       % single bond at 1
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-30\relax
      \yl@ydiff=-37\relax
           \putlatom{-42}{563}{\@memberb}%    % left type
           {%
           \WaveBonds%
           \Put@Line(0,406)(-3,5){72}%      % single bond at 1
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=31\relax
      \yl@ydiff=-37\relax
           \putratom{41}{563}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(0,406)(3,5){72}%       % single bond at 1
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \Put@Line(-12,406)(0,1){140}%    % double bond at 1
           \Put@Line(12,406)(0,1){140}%     % double bond at 1
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(0,406)(0,1){140}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \dotorline(0,406)(0,1){140}/(0,406)(0,546)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           {%
           \WaveBonds%
           \Put@Line(0,406)(0,1){140}%      % single wave bond at 1
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(0,406){\setatombondd}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(0,406){\setatombondf}%
     }%
   \else%
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \putlratom{-31}{563}{\@memberb}%   % left or right type
           \Put@Line(0,406)(0,1){140}%      % single bond at 1
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@substa
%    \end{macrocode}
% \end{macro}
%
% The |\@substb| command is used for placing a substituent (|\@memberb|) at 
% the 2-position (upper-right) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{New bond modifiers: FA, FB, GA, GB, Su, and Sd}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@substb}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 2 %
% %%%%%%%%%%%%%%%
\def\@substb{%
 \if@bclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=-10\relax
      \yl@ydiff=24\relax
           \putratom{311}{363}{\@memberb}%    % right type
           \Put@Line(201,327)(5,3){100}%    % single bond at 2
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-7\relax
      \yl@ydiff=38\relax
           \putratom{268}{420}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(201,358)(3,5){60}%     % single bond at 2
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=-17\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           \dotorline(201,303)(1,0){100}/(201,303)(301,303)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=-17\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(201,303)(1,0){100}%    % single bond at 2
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-7\relax
      \yl@ydiff=38\relax
           \putratom{268}{420}{\@memberb}%    % right type
           \dotorline(201,358)(3,5){60}/(201,358)(261,458)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-7\relax
      \yl@ydiff=38\relax
           \putratom{268}{420}{\@memberb}%    % right type
           \Put@Line(201,358)(3,5){60}%     % single bond at 2
    \else\if\@tmpc a%(a) alpha%
      \yl@xdiff=-17\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           \Put@Line(201,303)(1,0){100}%    % single bond at 2
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-7\relax
      \yl@ydiff=38\relax
           \putratom{268}{420}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(201,358)(3,5){60}%     % single bond at 2
           }%
    \else\if\@tmpc U%(U) alphau undefined
      \yl@xdiff=-17\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(201,303)(1,0){100}%    % single bond at 2
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=-10\relax
      \yl@ydiff=18\relax
           \putratom{311}{363}{\@memberb}%    % right type
           \Put@Line(194,331)(5,3){100}%    % double bond at 2
           \Put@Line(200,305)(5,3){100}%    % double bond at 2
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=24\relax
           \putratom{311}{363}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(201,327)(5,3){100}%    % single bond at 2
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=24\relax
           \putratom{311}{363}{\@memberb}%    % right type
           \dotorline(201,327)(5,3){100}/(201,327)(301,387)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=24\relax
           \putratom{311}{363}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(210,327)(5,3){100}%      % single wave bond at 2
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(171,303){\setatombonda}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(171,303){\setatombonde}%
     }%
   \else%
      \yl@xdiff=-10\relax
      \yl@ydiff=24\relax
           \putratom{311}{363}{\@memberb}%    % right type
           \Put@Line(201,327)(5,3){100}%    % single bond at 2
   \fi\fi\fi\fi%
   \fi\fi\fi%
 \else% %no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putratom{301}{363}{\@memberb}%    % right type
           \Put@Line(171,303)(5,3){120}%    % single bond at 2
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-15\relax
      \yl@ydiff=13\relax
           \putratom{258}{410}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(171,303)(3,5){72}%     % single bond at 2
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=-7\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           \dotorline(171,303)(1,0){140}/(171,303)(311,303)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=-7\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(171,303)(1,0){140}%     % single bond at 2
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-15\relax
      \yl@ydiff=13\relax
           \putratom{258}{410}{\@memberb}%    % right type
           \dotorline(171,303)(3,5){72}/(171,303)(243,423)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-15\relax
      \yl@ydiff=13\relax
           \putratom{258}{410}{\@memberb}%    % right type
           \Put@Line(171,303)(3,5){72}%     % single bond at 2
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=-7\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           \Put@Line(171,303)(1,0){140}%    % single bond at 2
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-15\relax
      \yl@ydiff=13\relax
           \putratom{258}{410}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(171,303)(3,5){72}%     % single bond at 2
           }%
    \else\if\@tmpc U%(U) alpha undefined 
      \yl@xdiff=-7\relax
      \yl@ydiff=23\relax
           \putratom{318}{280}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(171,303)(1,0){140}%    % single bond at 2
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=-10\relax
      \yl@ydiff=6\relax
           \putratom{301}{363}{\@memberb}%    % right type
           \Put@Line(168,310)(5,3){120}%    % double bond at 2
           \Put@Line(174,284)(5,3){120}%    % double bond at 2
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putratom{301}{363}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(171,303)(5,3){120}%    % single bond at 2
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putratom{301}{363}{\@memberb}%    % right type
           \dotorline(171,303)(5,3){120}/(171,303)(291,375)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putratom{301}{363}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(171,303)(5,3){120}%      % single wave bond at 2
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(171,303){\setatombonda}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(171,303){\setatombonde}%
     }%
   \else%
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putratom{301}{363}{\@memberb}%    % right type
           \Put@Line(171,303)(5,3){120}%    % single bond at 2
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@substb
%    \end{macrocode}
% \end{macro}
%
% The |\@substc| command is used for placing a substituent (|\@memberb|) at 
% the 3-position (lower-right) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff|} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{New bond modifiers: FA, FB, GA, GB, Su, and Sd}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@substc}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 3 %
% %%%%%%%%%%%%%%%
\def\@substc{%
 \if@cclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=-10\relax
      \yl@ydiff=46\relax
           \putratom{311}{-27}{\@memberb}%    % right type
           \Put@Line(201,79)(5,-3){110}%    % single bond at 3
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-7\relax
      \yl@ydiff=28\relax
           \putratom{268}{-80}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(201,48)(3,-5){60}%     % single bond at 3
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=-17\relax
      \yl@ydiff=29\relax
           \putratom{318}{74}{\@memberb}%     % right type
           \dotorline(201,103)(1,0){100}/(201,103)(301,103)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=-17\relax
      \yl@ydiff=29\relax
           \putratom{318}{74}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(201,103)(1,0){100}%    % single bond at 3
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-7\relax
      \yl@ydiff=28\relax
           \putratom{268}{-80}{\@memberb}%    % right type
           \dotorline(201,48)(3,-5){60}/(201,48)(261,-52)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-7\relax
      \yl@ydiff=28\relax
           \putratom{268}{-80}{\@memberb}%    % right type
           \Put@Line(201,48)(3,-5){60}%     % single bond at 3
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=-17\relax
      \yl@ydiff=29\relax
           \putratom{318}{74}{\@memberb}%     % right type
           \Put@Line(201,103)(1,0){100}%    % single bond at 3
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-7\relax
      \yl@ydiff=28\relax
           \putratom{268}{-80}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(201,48)(3,-5){60}%     % single bond at 3
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=-17\relax
      \yl@ydiff=29\relax
           \putratom{318}{74}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(201,103)(1,0){100}%    % single bond at 3
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=-10\relax
      \yl@ydiff=52\relax
           \putratom{311}{-27}{\@memberb}%    % right type
           \Put@Line(194,76)(5,-3){100}%    % double bond at 3
           \Put@Line(200,101)(5,-3){100}%   % double bond at 3
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=46\relax
           \putratom{311}{-27}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(201,79)(5,-3){100}%    % single bond at 3
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=46\relax
           \putratom{311}{-27}{\@memberb}%    % right type
           \dotorline(201,79)(5,-3){100}/(201,79)(301,19)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=46\relax
           \putratom{311}{-27}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(210,79)(5,-3){100}%      % single wave bond at 3
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(171,103){\setatombondf}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(171,103){\setatombondc}%
     }%
   \else%
      \yl@xdiff=-10\relax
      \yl@ydiff=46\relax
           \putratom{311}{-27}{\@memberb}%    % right type
           \Put@Line(201,79)(5,-3){100}%    % single bond at 3
   \fi\fi\fi\fi%
   \fi\fi\fi%
 \else%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=-10\relax
      \yl@ydiff=58\relax
           \putratom{301}{-27}{\@memberb}%    % right type
           \Put@Line(171,103)(5,-3){120}%   % single bond at 3
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-10\relax
      \yl@ydiff=48\relax
           \putratom{258}{-70}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(171,103)(3,-5){72}%    % single bond at 3
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=-10\relax
      \yl@ydiff=30\relax
           \putratom{318}{74}{\@memberb}%     % right type
           \dotorline(171,103)(1,0){140}/(171,103)(311,103)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=-10\relax
      \yl@ydiff=30\relax
           \putratom{318}{74}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(171,103)(1,0){140}%    % single bond at 3
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-10\relax
      \yl@ydiff=48\relax
           \putratom{258}{-70}{\@memberb}%    % right type
           \dotorline(171,103)(3,-5){72}/(171,103)(243,-17)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-10\relax
      \yl@ydiff=48\relax
           \putratom{258}{-70}{\@memberb}%    % right type
           \Put@Line(171,103)(3,-5){72}%    % single bond at 3
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=-10\relax
      \yl@ydiff=30\relax
           \putratom{318}{74}{\@memberb}%     % right type
           \Put@Line(171,103)(1,0){140}%    % single bond at 3
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=48\relax
           \putratom{258}{-70}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(171,103)(3,-5){72}%    % single bond at 3
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=30\relax
           \putratom{318}{74}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(171,103)(1,0){140}%    % single bond at 3
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=-10\relax
      \yl@ydiff=65\relax
           \putratom{301}{-27}{\@memberb}%    % right type
           \Put@Line(168,96)(5,-3){120}%    % double bond at 3
           \Put@Line(174,121)(5,-3){120}%   % double bond at 3
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=58\relax
           \putratom{301}{-27}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(171,103)(5,-3){120}%   % single bond at 3
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=58\relax
           \putratom{301}{-27}{\@memberb}%    % right type
           \dotorline(171,103)(5,-3){120}/(171,103)(291,31)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=58\relax
           \putratom{301}{-27}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(171,103)(5,-3){120}%      % single wave bond at 3
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(171,103){\setatombondf}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(171,103){\setatombondc}%
     }%
   \else%
      \yl@xdiff=-10\relax
      \yl@ydiff=58\relax
           \putratom{301}{-27}{\@memberb}%    % right type
     \Put@Line(171,103)(5,-3){120}%   % single bond at 3
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi
}% end of \@substc
%    \end{macrocode}
% \end{macro}
%
% The |\@substd| command is used for placing a substituent (|\@memberb|) at 
% the 4-position (bottom) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{New bond modifiers: FA, FB, GA, GB, Su, and Sd}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@substd}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 4 %
% %%%%%%%%%%%%%%%
\def\@substd{%
\if@clip %clipping
    \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
            \Put@Line(0,-30)(0,-1){110}%    % single bond at 4
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-36\relax
      \yl@ydiff=100\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=100\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           \dotorline(18,-30)(3,-5){60}/(18,-30)(72,-120)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=37\relax
      \yl@ydiff=100\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(18,-30)(3,-5){60}%     % single bond at 4
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-36\relax
      \yl@ydiff=100\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           \dotorline(-18,-30)(-3,-5){60}/(-18,-30)(-78,-130)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-36\relax
      \yl@ydiff=100\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=100\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           \Put@Line(18,-30)(3,-5){60}%     % single bond at 4
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-36\relax
      \yl@ydiff=100\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-18,-30)(-3,-5){60}%   % single bond at 4
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=37\relax
      \yl@ydiff=100\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(18,-30)(3,-5){60}%     % single bond at 4
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           \Put@Line(-12,-30)(0,-1){110}%   % double bond at 4
           \Put@Line(12,-30)(0,-1){110}%    % double bond at 4
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           {%
           \thicklines%
           \Put@Line(0,-30)(0,-1){110}%    % single bond at 4
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           \dotorline(0,-30)(0,-1){110}/(0,-30)(0,-140)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(0,-30)(0,-1){110}%      % single wave bond at 4
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(0,0){\setatombonde}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(0,0){\setatombondg}%
     }%
   \else%
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           \Put@Line(0,-30)(0,-1){110}%     % single bond at 4
   \fi\fi\fi\fi%
   \fi\fi\fi%
 \else%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
            \Put@Line(0,0)(0,-1){140}%      % single bond at 4
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-30\relax
      \yl@ydiff=110\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(0,0)(-3,-5){72}%       % single bond at 4
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=31\relax
      \yl@ydiff=110\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           \dotorline(0,0)(3,-5){72}/(0,0)(72,-120)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=31\relax
      \yl@ydiff=110\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(0,0)(3,-5){72}%        % single bond at 4
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-30\relax
      \yl@ydiff=110\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           \dotorline(0,0)(-3,-5){72}/(0,0)(-72,-120)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-30\relax
      \yl@ydiff=110\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           \Put@Line(0,0)(-3,-5){72}%       % single bond at 4
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=31\relax
      \yl@ydiff=110\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           \Put@Line(0,0)(3,-5){72}%        % single bond at 4
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-30\relax
      \yl@ydiff=110\relax
           \putlatom{-42}{-230}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(0,0)(-3,-5){72}%       % single bond at 4
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=31\relax
      \yl@ydiff=110\relax
           \putratom{41}{-230}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(0,0)(3,-5){72}%        % single bond at 4
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           \Put@Line(-12,0)(0,-1){140}%     % double bond at 4
           \Put@Line(12,0)(0,-1){140}%      % double bond at 4
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           {%
           \thicklines%
           \Put@Line(0,0)(0,-1){140}%       % single bond at 4
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           \dotorline(0,0)(0,-1){140}/(0,0)(0,-140)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(0,0)(0,-1){140}%      % single wave bond at 4
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(0,0){\setatombonde}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(0,0){\setatombondg}%
     }%
   \else%
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \putlratom{-31}{-230}{\@memberb}%  % left or right type
           \Put@Line(0,0)(0,-1){140}%       % single bond at 4
   \fi\fi\fi\fi%
   \fi\fi\fi%
 \fi}%end of \@substd
%    \end{macrocode}
% \end{macro}
%
% The |\@subste| command is used for placing a substituent (|\@memberb|) at 
% the 5-position (lower-left) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{New bond modifiers: FA, FB, GA, GB, Su, and Sd}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@subste}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 5 %
% %%%%%%%%%%%%%%%
\def\@subste{%
 \if@eclip%clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=10\relax
      \yl@ydiff=46\relax
           \putlatom{-311}{-27}{\@memberb}%   % left type
           \Put@Line(-201,79)(-5,-3){110}%  % single bond at 5
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=7\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{-80}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-201,48)(-3,-5){60}%   % single bond at 5
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=17\relax
      \yl@ydiff=29\relax
           \putlatom{-318}{74}{\@memberb}%    % left type
           \dotorline(-201,103)(-1,0){100}/(-201,103)(-301,103)%
    \else\if\@tmpc u% (u) up --- (B) beta
      \yl@xdiff=17\relax
      \yl@ydiff=29\relax
           \putlatom{-318}{74}{\@memberb}%    % left type
           {%
           \thicklines%
           \Put@Line(-201,103)(-1,0){100}%  % single bond at 5
           }%
    \else\if\@tmpc d% (d) down --- (A) alpha
      \yl@xdiff=7\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{-80}{\@memberb}%   % left type
           \dotorline(-201,48)(-3,-5){60}/(-201,48)(-261,-52)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=7\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{-80}{\@memberb}%   % left type
           \Put@Line(-201,48)(-3,-5){60}%   % single bond at 5
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=17\relax
      \yl@ydiff=29\relax
           \putlatom{-318}{74}{\@memberb}%    % left type
           \Put@Line(-201,103)(-1,0){100}%  % single bond at 5
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=7\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{-80}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-201,48)(-3,-5){60}%   % single bond at 5
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=17\relax
      \yl@ydiff=29\relax
           \putlatom{-318}{74}{\@memberb}%    % left type
           {%
           \WaveBonds%
           \Put@Line(-201,103)(-1,0){100}%  % single bond at 5
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=10\relax
      \yl@ydiff=62\relax
           \putlatom{-311}{-27}{\@memberb}%   % left type
           \Put@Line(-194,76)(-5,-3){100}%  % double bond at 5
           \Put@Line(-200,101)(-5,-3){100}% % double bond at 5
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=46\relax
           \putlatom{-311}{-27}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-201,79)(-5,-3){100}%  % single bond at 5
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=10\relax
      \yl@ydiff=46\relax
           \putlatom{-311}{-27}{\@memberb}%   % left type
           \dotorline(-201,79)(-5,-3){100}/(-201,79)(-301,21)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=10\relax
      \yl@ydiff=46\relax
           \putlatom{-311}{-27}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(-220,79)(-5,-3){100}%      % single wave bond at 5
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(-171,103){\setatombondc}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(-171,103){\setatombondd}%
     }%
   \else%
      \yl@xdiff=10\relax
      \yl@ydiff=46\relax
           \putlatom{-311}{-27}{\@memberb}%   % left type
           \Put@Line(-201,79)(-5,-3){100}%  % single bond at 5
   \fi\fi\fi\fi%
   \fi\fi\fi%
\else%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=10\relax
      \yl@ydiff=56\relax
           \putlatom{-301}{-27}{\@memberb}%   % left type
           \Put@Line(-171,103)(-5,-3){120}% % single bond at 5
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=15\relax
      \yl@ydiff=63\relax
           \putlatom{-258}{-70}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-171,103)(-3,-5){72}%  % single bond at 5
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=15\relax
      \yl@ydiff=29\relax
           \putlatom{-326}{74}{\@memberb}%    % left type
           \dotorline(-171,103)(-1,0){140}/(-171,103)(-311,103)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=15\relax
      \yl@ydiff=29\relax
           \putlatom{-326}{74}{\@memberb}%    % left type
           {%
           \thicklines%
           \Put@Line(-171,103)(-1,0){140}%  % single bond at 5
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=15\relax
      \yl@ydiff=63\relax
           \putlatom{-258}{-70}{\@memberb}%   % left type
           \dotorline(-171,103)(-3,-5){72}/(-171,103)(-243,-17)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=15\relax
      \yl@ydiff=63\relax
           \putlatom{-258}{-70}{\@memberb}%   % left type
           \Put@Line(-171,103)(-3,-5){72}%  % single bond at 5
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=15\relax
      \yl@ydiff=29\relax
           \putlatom{-326}{74}{\@memberb}%    % left type
           \Put@Line(-171,103)(-1,0){140}%  % single bond at 5
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=15\relax
      \yl@ydiff=63\relax
           \putlatom{-258}{-70}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-171,103)(-3,-5){72}%  % single bond at 5
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=15\relax
      \yl@ydiff=29\relax
           \putlatom{-326}{74}{\@memberb}%    % left type
           {%
           \WaveBonds%
           \Put@Line(-171,103)(-1,0){140}%  % single bond at 5
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=10\relax
      \yl@ydiff=62\relax
           \putlatom{-301}{-27}{\@memberb}%   % left type
           \Put@Line(-168,96)(-5,-3){120}%  % double bond at 5
           \Put@Line(-174,121)(-5,-3){120}% % double bond at 5
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=56\relax
            \putlatom{-301}{-27}{\@memberb}%  % left type
           {%
           \thicklines%
           \Put@Line(-171,103)(-5,-3){120}% % single bond at 5
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=56\relax
           \putlatom{-301}{-27}{\@memberb}%  % left type
           \dotorline(-171,103)(-5,-3){120}/(-171,103)(-311,31)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=56\relax
           \putlatom{-301}{-27}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(-171,103)(-5,-3){120}%      % single wave bond at 5
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(-171,103){\setatombondc}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(-171,103){\setatombondd}%
     }%
   \else%
      \yl@xdiff=10\relax
      \yl@ydiff=56\relax
            \putlatom{-301}{-27}{\@memberb}%  % left type
            \Put@Line(-171,103)(-5,-3){120}%% single bond at 5
   \fi\fi\fi\fi%
   \fi\fi\fi%
 \fi}% end of \@subste
%    \end{macrocode}
% \end{macro}
%
% The |\@substf| command is used for placing a substituent (|\@memberb|) at 
% the 6-position (upper-left) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{New bond modifiers: FA, FB, GA, GB, Su, and Sd}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@substf}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 6 %
% %%%%%%%%%%%%%%%
\def\@substf{%
 \if@fclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=10\relax
      \yl@ydiff=24\relax
           \putlatom{-311}{363}{\@memberb}%   % left type
           \Put@Line(-201,327)(-5,3){100}%  % single bond at 6
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=8\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{420}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-201,358)(-3,5){60}%   % single bond at 6
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=17\relax
      \yl@ydiff=23\relax
           \putlatom{-318}{280}{\@memberb}%   % left type
           \dotorline(-201,303)(-1,0){100}/(-201,303)(-301,303)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=17\relax
      \yl@ydiff=23\relax
           \putlatom{-318}{280}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-201,303)(-1,0){100}%  % single bond at 6
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=8\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{420}{\@memberb}%   % left type
           \dotorline(-201,358)(-3,5){60}/(-201,358)(-261,458)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=8\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{420}{\@memberb}%   % left type
           \Put@Line(-201,358)(-3,5){60}%   % single bond at 6
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=17\relax
      \yl@ydiff=23\relax
           \putlatom{-318}{280}{\@memberb}%   % left type
           \Put@Line(-201,303)(-1,0){100}%  % single bond at 6
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=8\relax
      \yl@ydiff=38\relax
           \putlatom{-268}{420}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-201,358)(-3,5){60}%   % single bond at 6
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=17\relax
      \yl@ydiff=23\relax
           \putlatom{-318}{280}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-201,303)(-1,0){100}%  % single bond at 6
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=10\relax
      \yl@ydiff=6\relax
           \putlatom{-311}{363}{\@memberb}%   % left type
           \Put@Line(-194,331)(-5,3){100}%  % double bond at 6
           \Put@Line(-200,305)(-5,3){100}%  % double bond at 6
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=24\relax
           \putlatom{-311}{363}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-201,327)(-5,3){100}%  % single bond at 6
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=10\relax
      \yl@ydiff=24\relax
           \putlatom{-311}{363}{\@memberb}%   % left type
           \dotorline(-201,327)(-5,3){100}/(-201,327)(-301,387)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=10\relax
      \yl@ydiff=24\relax
           \putlatom{-311}{363}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(-211,327)(-5,3){100}%      % single wave bond at 6
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(-171,303){\setatombondg}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(-171,303){\setatombonda}%
     }%
   \else%
      \yl@xdiff=10\relax
      \yl@ydiff=24\relax
           \putlatom{-311}{363}{\@memberb}%   % left type
           \Put@Line(-201,327)(-5,3){100}%  % single bond at 6
   \fi\fi\fi\fi%
   \fi\fi\fi
\else%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=10\relax
      \yl@ydiff=12\relax
           \putlatom{-301}{363}{\@memberb}%   % left type
           \Put@Line(-171,303)(-5,3){120}%  % single bond at 6
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=15\relax
      \yl@ydiff=13\relax
           \putlatom{-258}{410}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-171,303)(-3,5){72}%   % single bond at 6
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=15\relax
      \yl@ydiff=23\relax
           \putlatom{-326}{280}{\@memberb}%   % left type
           \dotorline(-171,303)(-1,0){140}/(-171,303)(-311,303)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=15\relax
      \yl@ydiff=23\relax
           \putlatom{-326}{280}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-171,303)(-1,0){140}%  % single bond at 6
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=15\relax
      \yl@ydiff=13\relax
           \putlatom{-258}{410}{\@memberb}%   % left type
           \dotorline(-171,303)(-3,5){72}/(-171,303)(-243,423)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=15\relax
      \yl@ydiff=13\relax
           \putlatom{-258}{410}{\@memberb}%   % left type
           \Put@Line(-171,303)(-3,5){72}%   % single bond at 6
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=15\relax
      \yl@ydiff=23\relax
           \putlatom{-326}{280}{\@memberb}%   % left type
           \Put@Line(-171,303)(-1,0){140}%  % single bond at 6
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=15\relax
      \yl@ydiff=13\relax
           \putlatom{-258}{410}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-171,303)(-3,5){72}%   % single bond at 6
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=15\relax
      \yl@ydiff=23\relax
           \putlatom{-326}{280}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-171,303)(-1,0){140}%  % single bond at 6
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=10\relax
      \yl@ydiff=6\relax
           \putlatom{-301}{363}{\@memberb}%   % left type
           \Put@Line(-168,310)(-5,3){120}%  % double bond at 6
           \Put@Line(-174,284)(-5,3){120}%  % double bond at 6
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=12\relax
           \putlatom{-301}{363}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-171,303)(-5,3){120}%  % single bond at 6
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putlatom{-301}{363}{\@memberb}%   % left type
           \dotorline(-171,303)(-5,3){120}/(-171,303)(-311,375)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-10\relax
      \yl@ydiff=12\relax
           \putlatom{-301}{363}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(-171,303)(-5,3){120}%      % single wave bond at 6
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(-171,303){\setatombondg}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(-171,303){\setatombonda}%
     }%
   \else%
      \yl@xdiff=10\relax
      \yl@ydiff=12\relax
           \putlatom{-301}{363}{\@memberb}%   % left type
           \Put@Line(-171,303)(-5,3){120}%  % single bond at 6
   \fi\fi\fi\fi%
   \fi\fi\fi
\fi}% end of \@substf
%    \end{macrocode}
% \end{macro}
%
% \subsection{Coloring Atoms and Bonds}
%
% The \textsf{xcolor} package is loaded to color atoms and bonds. 
% \changes{v5.01}{2011/02/24}{Added}
%    \begin{macrocode}
\RequirePackage{xcolor}
%    \end{macrocode}
%
% The command |\addbscolor| is defined to color substitution bonds.
% \changes{v5.00}{2010/10/01}{Bond coloring}
% \changes{v5.01}{2011/02/24}{Bond coloring: \cs{addbscolor} changed and 
% \cs{Addbscolor} added. But deleted.}
%
% \begin{verbatim}
%  e.g., \addbscolor{\cyan}{CH$_{3}$}
%  e.g., \Addbscolor{cyan}{CH$_{3}$}
% \end{verbatim}
%
% \begin{macro}{\addbscolor}
% \begin{macro}{\Addbscolor}
% \begin{macro}{\setbscolor}
%    \begin{macrocode}
\def\bondsubstcolor{}
%\def\psbondsubstcolor{black}%added 2011/02/24
\def\addbscolor#1#2{#2\gdef\bondsubstcolor{#1}}
%\def\addbscolor#1#2{#2\gdef\bondsubstcolor{#1}%changed 2011/02/24
%\gdef\psbondsubstcolor{\expandafter\@gobble\string #1}}
%\def\Addbscolor#1#2{#2%added 2011/02/24
%\expandafter\gdef\expandafter\bondsubstcolor\expandafter{\csname #1\endcsname}%
%\gdef\psbondsubstcolor{#1}}
\newif\ifbscolor
\def\setbscolor{\addbscolor{}{}%
\edef\@tmptmpb{\@tmpb}\edef\@tmptmpc{\@tmpc}%store original values
\ifbscolor\setbox0=\hbox{\@memberb}\bondsubstcolor\setbox0=\hbox{}\fi
\edef\@tmpb{\@tmptmpb}\edef\@tmpc{\@tmptmpc}%recover the original values
}%
\def\setBScolor#1{\begingroup\setbscolor#1\addbscolor{}{}\endgroup}%
\def\bscolorswON{\bscolortrue}
\def\bscolorswOFF{\bscolorfalse}
\bscolorswON%default bond coloring
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% In addition to standard colors (e.g., \verb/\cyan/), 
% any colors can be created by using \verb/\defineXyMcolor/. 
% \changes{v5.01}{2011/02/24}{New color: \cs{defineXyMcolor}}
%
% \begin{verbatim}
%  \defineXyMcolor{My color name}{Color model}{Color value}
%  e.g., 
%  \defineXyMcolor{MyXyMcolor}{cmyk}{1,0,1,0}
% \end{verbatim}
% This defines a color named ``MyXyMcolor'' and the 
% corresponding control sequence \verb/MyXyMcolor/, 
% just as ``cyan'' corresponds to \verb/\cyan/. 
%
% \begin{macro}{\defineXyMcolor}
%    \begin{macrocode}
\def\defineXyMcolor#1#2#3{%
\definecolor{#1}{#2}{#3}%
\@ifundefined{psset}{%
\expandafter\def\csname#1\endcsname{\color{#1}}}%
{\expandafter\def\csname#1\endcsname{\color{#1}%
\psset{linecolor=#1}}}}
%    \end{macrocode}
% \end{macro}
%
% Pre-defined colors (e.g., olive) in the \textsf{xcolor} package 
% can be renamed to be applied to atom- and bond-coloring. 
% \changes{v5.01}{2011/02/24}{New color: \cs{XyMcolor}}
%
% \begin{verbatim}
%  \XyMcolor{new color_name}[color_model]{pre-defined color_name}
% \end{verbatime}
% e.g., 
% \begin{verbatim}
%  \XyMcolor{XyMolive}{olive}
% \end{verbatime}
%
% \begin{macro}{\XyMcolor}
%    \begin{macrocode}
\def\XyMcolor#1{%
\@ifnextchar[{\@XyMcolor{#1}}{\@XyMcolor{#1}[]}}
\def\@XyMcolor#1[#2]#3{%
\edef\tempColorModel{#2}%
\ifx\tempColorModel\@empty\colorlet{#1}{#3}\else
\colorlet{#1}[#2]{#3}\fi
\@ifundefined{psset}{%
\expandafter\def\csname#1\endcsname{\color{#1}}}%
{\expandafter\def\csname#1\endcsname{\color{#1}%
\psset{linecolor=#1}}}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting-up substituents and bonds on a six-membered ring}
%
% The |\setsixringv| takes 5 arguments. 
%
% \begin{verbatim}
% **************************************************************
% * setting of atoms and bonds on a vertical six-membered ring *
% **************************************************************
%
%    \setsixringv{SUBSLIST}{AD}{LOWER}{UPPER}{ORDER}
% \end{verbatim}
%
% The first argument |SUBSLIST| is a list of substituents, which is 
% represented in the standard format of \XyMTeX{}. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents (max 6 substitution positions)
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           nSd        :  alpha single bond at n-atom (dotted line) 
%                           with an alternative direction to nSA 
%           nSu        :  beta single bond at n-atom (boldface) 
%                           with an alternative direction to nSB 
%           nFA        :  alpha single bond at n-atom (dotted line) 
%                           for ring fusion 
%           nFB        :  beta single bond at n-atom (boldface) 
%                           for ring fusion 
%           nGA        :  alpha single bond at n-atom (dotted line) 
%                           for the other ring fusion 
%           nGB        :  beta single bond at n-atom (boldface) 
%                           for the other ring fusion 
% \end{verbatim}
%
% The second argument |AD| is an adjustment value, which adjusts the original 
% set of locant numbers into the standard one between 1 to 6 for drawing 
% a six-membered ring. 
% The effective range of the standared set of locant numbers is 
% restricted by the auguments |LOWER| and |UPPER|.  A minus value of 
% the last argument shows the anti-clockwise numbering, while zero or 
% a plus value represents the clockwise numbering. 
%
% \begin{verbatim}
%
%    AD       : adjustment      e.g. 0 for six-membered rings
%    LOWER    : lower limit     LOWER < effective range < UPPER
%    UPPER    : upper limit
%    ORDER     : >= 0 clockwise, <0 anti-clockwise
% \end{verbatim}
%
% \changes{v1.02}{1998/10/31}{Adding switches \cs{@yla} etc.}
%
% \begin{macro}{\setsixringv}
%    \begin{macrocode}
\def\setsixringv#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifnum#5 < 0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa%0 omit
%    \end{macrocode}
%
% The following commands are not used in a revised version
% because of the direct use of |\ifx\@memberb\@yl\else...\fi|.
%
%    \begin{macrocode}
% %\or \if@yla\else\@substa\fi% subst. on 1
% %\or \if@ylb\else\@substb\fi% subst. on 2
% %\or \if@ylc\else\@substc\fi% subst. on 3
% %\or \if@yld\else\@substd\fi% subst. on 4
% %\or \if@yle\else\@subste\fi% subst. on 5
% %\or \if@ylf\else\@substf\fi% subst. on 6
%    \end{macrocode}
%
%    \begin{macrocode}
 \or{\setbscolor\@substa\addbscolor{}{}}%% subst. on 1
 \or{\setbscolor\@substb\addbscolor{}{}}%% subst. on 2
 \or{\setbscolor\@substc\addbscolor{}{}}%% subst. on 3
 \or{\setbscolor\@substd\addbscolor{}{}}%% subst. on 4
 \or{\setbscolor\@subste\addbscolor{}{}}%% subst. on 5
 \or{\setbscolor\@substf\addbscolor{}{}}%% subst. on 6
\fi%end of ifcase
\fi%
\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting-up substituents and bonds on a decaline ring}
%
% The command |\setdecaringv| 
% has been stopped to use and replaced by |\setsixringv|
% (version 1.02). 
%
% Definition of |\setdecaringv| has been deleted (version 2.01). 
%
% \subsection{Setting-up substituents and bonds at fused positions}
%
% The command |\ylfusedposition| is to obtain the shift values 
% |\@ylii| and |\@yli| which are used for shifting the standard 
% point of a substituent. 
% The locant flags such as |\@ylatrue| have been stopped to use. 
% \changes{v1.02}{1998/10/11}{Delete \cs{@ylatrue} etc.}
% \changes{v1.02}{1998/10/13}{Adding \cs{@fused@link} condition}
% \changes{v1.02}{1998/10/31}{Commands for setting substituents}
%
% \begin{macro}{\ylfusedposition}
%    \begin{macrocode}
\def\ylfusedposition#1#2#3#4#5{%
\@@ylswfalse%\@reset@ylsw
\@forsemicol\member:=#1\do{%
\if@@ylsw\else%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifnum#5<0\relax%
\@tmpaa=-\@tmpa\relax\advance\@tmpaa by #2\relax%
\@fused@linktrue
\else\@tmpaa=\@tmpa\relax\advance\@tmpaa by #2\relax
\@fused@linkfalse\fi%
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa%
% %%%%%%%%%%%%%%%%%%
% 0 fused positions   % F == (171,303)  G == (171,103)
% %%%%%%%%%%%%%%%%%% 
 \if\@tmpb F%single bond at F (fused position)
    \def\@ylii{-171}\def\@yli{-303}\@ylswtrue%\@ylatrue% subst. on 0
 \else\if\@tmpb G%single bond at G (fused position)
    \def\@ylii{-171}\def\@yli{-103}\@ylswtrue%\@ylatrue% subst. on 0
 \fi\fi%
% %%%%%%%%%%%%%%%%
\or% subst. on 1  F == (0,406), G == (171,303) for \@fused@linkfalse
   % subst. on 1  G == (0,406), F == (171,303) for \@fused@linktrue
% %%%%%%%%%%%%%%%%
\if@fused@link
 \if\@tmpb G%single bond at F (5,-3) fusion
      \def\@ylii{0}\def\@yli{-406}\@ylswtrue%\@ylatrue% subst. on 1
 \else\if\@tmpb F%single bond at G
      \def\@ylii{-171}\def\@yli{-303}\@ylswtrue%\@ylatrue% subst. on 1
 \fi\fi%
\else
 \if\@tmpb F%single bond at F (5,-3) fusion
      \def\@ylii{0}\def\@yli{-406}\@ylswtrue%\@ylatrue% subst. on 1
 \else\if\@tmpb G%single bond at G
      \def\@ylii{-171}\def\@yli{-303}\@ylswtrue%\@ylatrue% subst. on 1
 \fi\fi%
\fi
% %%%%%%%%%%%%%%%%
\or% subst. on 2  F == (0,406), G == (-171,303) for \@fused@linkfalse
   % subst. on 2  G == (0,406), F == (-171,303) for \@fused@linktrue
% %%%%%%%%%%%%%%%%
\if@fused@link
 \if\@tmpb G%single bond at (-5,-3) fusion
      \def\@ylii{0}\def\@yli{-406}\@ylswtrue%\@ylatrue% subst. on 2
 \else\if\@tmpb F%single bond at G
      \def\@ylii{171}\def\@yli{-303}\@ylswtrue%\@ylatrue% subst. on 2
 \fi\fi%
\else
 \if\@tmpb F%single bond at (-5,-3) fusion
      \def\@ylii{0}\def\@yli{-406}\@ylswtrue%\@ylatrue% subst. on 2
 \else\if\@tmpb G%single bond at G
      \def\@ylii{171}\def\@yli{-303}\@ylswtrue%\@ylatrue% subst. on 2
 \fi\fi%
\fi
% %%%%%%%%%%%%%%%%%%
\or %3 fused positions   % G == (303,171)  F == (103,171)
% %%%%%%%%%%%%%%%%%% 
 \if\@tmpb G%single bond at G (fused position)
      \def\@ylii{-303}\def\@yli{-171}\@ylswtrue%\@ylatrue% subst. on 3
 \else\if\@tmpb F%single bond at F (fused position)
      \def\@ylii{-103}\def\@yli{-171}\@ylswtrue%\@ylatrue% subst. on 3
 \fi\fi%
\fi%end of ifcase
\fi\fi\fi\fi\fi}}% end of \ylfusedposition
%    \end{macrocode}
% \end{macro}
%
% The bond-setting commands |\GFbonda|, |\GFbondb|, |\GFbondc| and 
% |\GFbondd|, which are separated from the old |\setfusedbond| command, 
% are used to place a bond and a substituent at a fulsed position of 
% such a compound as a decaline.  
%
% \changes{v1.02}{1998/10/12}{Separate \cs{GFbonda} etc.}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{wave bonds for stereochemistry: FU, GU}
%
% \begin{macro}{\GFbonda}
% \begin{macro}{\GFbonda@a}
% \begin{macro}{\GFbonda@b}
%    \begin{macrocode}
\def\GFbonda{%
% %%%%%%%%%%%%%%%%%%
% 0 fused positions   % F == (171,303)  G == (171,103)
% %%%%%%%%%%%%%%%%%% 
 \if\@tmpb F%single bond at F (fused position)
   \GFbonda@a
 \else\if\@tmpb G%single bond at G (fused position)
   \GFbonda@b
 \fi\fi%
}%end of GFbonda
%    \end{macrocode}
%
%    \begin{macrocode}
\def\GFbonda@a{%
   \if\@tmpc B%beta single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=-17\relax%460-(303+140)
           \putlratom{140}{460}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(171,303)(0,1){140}%    % single bond at F
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=-17\relax%460-(303+140)
           \putlratom{140}{460}{\@memberb}%   % left or right type
           \dotorline(171,303)(0,1){140}/(171,303)(171,443)%
   \else\if\@tmpc U% unspecified single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=-17\relax%460-(303+140)
           \putlratom{140}{460}{\@memberb}%   % left or right type
%           \Put@Direct(168,303){$\wr$}% unspecified single bond at F
%           \Put@Direct(168,353){$\wr$}%
%           \Put@Direct(168,403){$\wr$}%
           {%
           \WaveBonds%
           \Put@Line(171,303)(0,1){140}%      % single wave bond at 1
           }%
   \else\if\@tmpc S%beta single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=-17\relax%460-(303+140)
           \putlratom{140}{460}{\@memberb}%   % left or right type
             \Put@Line(171,303)(0,1){140}%  % single bond at F
   \else\ifx\@tmpc\empty%beta single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=-17\relax%460-(303+140)
           \putlratom{140}{460}{\@memberb}%   % left or right type
             \Put@Line(171,303)(0,1){140}%  % single bond at F
   \fi\fi\fi\fi\fi%
}%
%    \end{macrocode}
%
%    \begin{macrocode}
\def\GFbonda@b{%
   \if\@tmpc B%beta single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=90\relax%127-(140-103)
           \putlratom{140}{-127}{\@memberb}%  % left or right type
           {%
           \thicklines%
           \Put@Line(171,103)(0,-1){140}%   % single bond at G
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=90\relax%127-(140-103)
           \putlratom{140}{-127}{\@memberb}%  % left or right type
           \dotorline(171,103)(0,-1){140}/(171,103)(171,-37)%
   \else\if\@tmpc U%beta single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=90\relax%127-(140-103)
           \putlratom{140}{-127}{\@memberb}%  % left or right type
%           \Put@Direct(168,43){$\wr$}% unspecified single bond at G
%           \Put@Direct(168,-8){$\wr$}% 
%           \Put@Direct(168,-57){$\wr$}% 
           {%
           \WaveBonds%
           \Put@Line(171,103)(0,-1){140}%      % single wave bond at 1
           }%
   \else\if\@tmpc S%alpha single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=90\relax%127-(140-103)
           \putlratom{140}{-127}{\@memberb}%  % left or right type
           \Put@Line(171,103)(0,-1){140}%   % single bond at G
   \else\ifx\@tmpc\empty%alpha single bond
      \yl@xdiff=31\relax%171-140
      \yl@ydiff=90\relax%127-(140-103)
           \putlratom{140}{-127}{\@memberb}%  % left or right type
           \Put@Line(171,103)(0,-1){140}%   % single bond at G
   \fi\fi\fi\fi\fi%
}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\GFbondb}
% \begin{macro}{\GFbondb@a}
% \begin{macro}{\GFbondb@b}
%    \begin{macrocode}
\def\GFbondb{%
% %%%%%%%%%%%%%%%%
% subst. on 1  F == (0,406), G == (171,303) for \@fused@linkfalse
% subst. on 1  G == (0,406), F == (171,303) for \@fused@linktrue
% %%%%%%%%%%%%%%%%
 \if@fused@link
 \if\@tmpb G%single bond at G (5,-3) fusion
    \GFbondb@a
 \else\if\@tmpb F%single bond at F
    \GFbondb@b
 \fi\fi%
 \else
 \if\@tmpb F%single bond at F (5,-3) fusion
    \GFbondb@a
 \else\if\@tmpb G%single bond at G
    \GFbondb@b
 \fi\fi%
 \fi
}% end of \GFbondb
%    \end{macrocode}
%
%    \begin{macrocode}
\def\GFbondb@a{%
   \if\@tmpc B%beta single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=22\relax%
           \putlatom{-130}{466}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(0,406)(-5,3){120}%     % single bond at F
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=22\relax%
           \putlatom{-130}{466}{\@memberb}%   % left type
           \dotorline(0,406)(-5,3){120}/(0,406)(-120,478)%
   \else\if\@tmpc U%unspecified single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=22\relax%
           \putlatom{-130}{466}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(0,406)(-5,3){120}%     % single bond at F
           }%
   \else\if\@tmpc S%beta single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=22\relax%
           \putlatom{-130}{466}{\@memberb}%   % left type
           \Put@Line(0,406)(-5,3){120}%     % single bond at F
   \else\ifx\@tmpc\empty%beta single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=22\relax%
           \putlatom{-130}{466}{\@memberb}%   % left type
           \Put@Line(0,406)(-5,3){120}%     % single bond at F
   \else\if\@tmpc D%beta single bond (downward)
      \yl@xdiff=31\relax%
      \yl@ydiff=90\relax%
           \putlratom{-31}{176}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(0,406)(0,-1){140}%     % single bond at F
           }%
   \else\if\@tmpc C%alpha single bond (downward)
      \yl@xdiff=31\relax%
      \yl@ydiff=90\relax%
           \putlratom{-31}{176}{\@memberb}%   % left or right type
           \dotorline(0,406)(0,-1){140}/(0,406)(0,266)%
   \fi\fi\fi\fi\fi\fi\fi%
}% end of \GFbondb@a
%    \end{macrocode}
%
%    \begin{macrocode}
\def\GFbondb@b{%
   \if\@tmpc B%beta single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=58\relax%
           \putratom{301}{173}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(171,303)(5,-3){120}%   % single bond at G
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=58\relax%
           \putratom{301}{173}{\@memberb}%    % right type
           \dotorline(171,303)(5,-3){120}/(171,303)(291,231)%
   \else\if\@tmpc U%unspecified single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=58\relax%
           \putratom{301}{173}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(171,303)(5,-3){120}%   % single bond at G
           }%
   \else\if\@tmpc S%alpha single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=58\relax%
           \putratom{301}{173}{\@memberb}%    % right type
           \Put@Line(171,303)(5,-3){120}%   % single bond at G
   \else\ifx\@tmpc\empty%alpha single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=58\relax%
           \putratom{301}{173}{\@memberb}%    % right type
           \Put@Line(171,303)(5,-3){120}%   % single bond at G
   \else\if\@tmpc D%beta single bond (upward)
      \yl@xdiff=31\relax%
      \yl@ydiff=-17\relax%
           \putlratom{140}{460}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(171,303)(0,1){140}%    % single bond at G
           }%
   \else\if\@tmpc C%alpha single bond (upward)
      \yl@xdiff=31\relax%
      \yl@ydiff=-17\relax%
           \putlratom{140}{460}{\@memberb}%   % left or right type
           \dotorline(171,303)(0,1){140}/(171,303)(171,443)%
   \fi\fi\fi\fi\fi\fi\fi%
}% end of \GFbondb@b
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\GFbondc}
% \begin{macro}{\GFbondc@a}
% \begin{macro}{\GFbondc@b}
%    \begin{macrocode}
\def\GFbondc{%
% %%%%%%%%%%%%%%%%
% subst. on 2  F == (0,406), G == (-171,303) for \@fused@linkfalse
% subst. on 2  G == (0,406), F == (-171,303) for \@fused@linktrue
% %%%%%%%%%%%%%%%%
\if@fused@link
 \if\@tmpb G%single bond at (-5,-3) fusion
      \GFbondc@a
 \else\if\@tmpb F%single bond at F
      \GFbondc@b
 \fi\fi%
\else
 \if\@tmpb F%single bond at (-5,-3) fusion
      \GFbondc@a
 \else\if\@tmpb G%single bond at G
      \GFbondc@b
 \fi\fi%
\fi
}% end of \GFbondc
%    \end{macrocode}
%
%    \begin{macrocode}
  \def\GFbondc@a{%
   \if\@tmpc B%beta single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=12\relax%
           \putratom{130}{466}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(0,406)(5,3){120}%      % single bond at F
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=12\relax%
           \putratom{130}{466}{\@memberb}%    % right type
           \dotorline(0,406)(5,3){120}/(0,406)(120,478)%
   \else\if\@tmpc U%unspecified single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=12\relax%
           \putratom{130}{466}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(0,406)(5,3){120}%      % single bond at F
           }%
   \else\if\@tmpc S%beta single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=12\relax%
           \putratom{130}{466}{\@memberb}%    % right type
           \Put@Line(0,406)(5,3){120}%      % single bond at F
   \else\ifx\@tmpc\empty%beta single bond
      \yl@xdiff=-10\relax%
      \yl@ydiff=12\relax%
           \putratom{130}{466}{\@memberb}%    % right type
           \Put@Line(0,406)(5,3){120}%      % single bond at F
   \else\if\@tmpc D%beta single bond (downward)
      \yl@xdiff=31\relax%
      \yl@ydiff=90\relax%
           \putlratom{-31}{176}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(0,406)(0,-1){140}%     % single bond at F
           }%
   \else\if\@tmpc C%alpha single bond (downward)
      \yl@xdiff=31\relax%
      \yl@ydiff=90\relax%
           \putlratom{-31}{176}{\@memberb}%   % left or right type
           \dotorline(0,406)(0,-1){140}/(0,406)(0,266)%
   \fi\fi\fi\fi\fi\fi\fi%
}% end of \GFbondc@a
%    \end{macrocode}
%
%    \begin{macrocode}
\def\GFbondc@b{%
   \if\@tmpc B%beta single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=59\relax%
            \putlatom{-301}{173}{\@memberb}%  % left type
           {%
           \thicklines%
           \Put@Line(-171,303)(-5,-3){120}% % single bond at G
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=59\relax%
           \putlatom{-301}{173}{\@memberb}%  % left type
           \dotorline(-171,303)(-5,-3){120}/(-171,303)(-291,231)%
   \else\if\@tmpc U%unspecified single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=59\relax%
            \putlatom{-301}{173}{\@memberb}%  % left type
           {%
           \WaveBonds%
            \Put@Line(-171,303)(-5,-3){120}%  single bond at G
           }%
   \else\if\@tmpc S%alpha single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=59\relax%
            \putlatom{-301}{173}{\@memberb}%  % left type
            \Put@Line(-171,303)(-5,-3){120}%  single bond at G
   \else\ifx\@tmpc\empty%alpha single bond
      \yl@xdiff=10\relax%
      \yl@ydiff=59\relax%
            \putlatom{-301}{173}{\@memberb}%  % left type
            \Put@Line(-171,303)(-5,-3){120}%  single bond at G
   \else\if\@tmpc D%beta single bond (upward)
      \yl@xdiff=-30\relax%
      \yl@ydiff=-17\relax%
           \putlratom{201}{460}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(-171,303)(0,1){140}%   % single bond at G
           }%
   \else\if\@tmpc C%alpha single bond (upward)
      \yl@xdiff=-30\relax%
      \yl@ydiff=-17\relax%
           \putlratom{201}{460}{\@memberb}%   % left or right type
           \dotorline(-171,303)(0,1){140}/(-171,303)(-171,443)%
   \fi\fi\fi\fi\fi\fi\fi%
}% end of \GFbondc@b
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\GFbondd}
%    \begin{macrocode}
\def\GFbondd{%
% %%%%%%%%%%%%%%%%%%
% 3 fused positions   % G == (303,171)  F == (103,171)
% %%%%%%%%%%%%%%%%%% 
 \if\@tmpb G%single bond at G (fused position)
   \if\@tmpc B%beta single bond
      \yl@xdiff=-17\relax%
      \yl@ydiff=31\relax%
           \putlratom{460}{140}{\@memberb}%   % left or right type
           {%
           \thicklines%
           \Put@Line(303,171)(1,0){140}%    % single bond at G
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=-17\relax%
      \yl@ydiff=31\relax%
           \putlratom{460}{140}{\@memberb}%   % left or right type
           \dotorline(303,171)(1,0){140}/(303,171)(443,171)%
   \else\if\@tmpc U% unspecified single bond
      \yl@xdiff=-17\relax%
      \yl@ydiff=31\relax%
           \putlratom{460}{140}{\@memberb}%   % left or right type
%           \Put@Direct(303,148){$\sim$}% unspecified single bond at G
%           \Put@Direct(353,148){$\sim$}%
%           \Put@Direct(403,148){$\sim$}%
           {%
           \WaveBonds%
            \Put@Line(303,171)(1,0){140}%  single bond at G
           }%
   \else\if\@tmpc S%beta single bond
      \yl@xdiff=-17\relax%
      \yl@ydiff=31\relax%
           \putlratom{460}{140}{\@memberb}%   % left or right type
           \Put@Line(303,171)(1,0){140}%    % single bond at G
   \else\ifx\@tmpc\empty%beta single bond
      \yl@xdiff=-17\relax%
      \yl@ydiff=31\relax%
           \putlratom{460}{140}{\@memberb}%   % left or right type
           \Put@Line(303,171)(1,0){140}%    % single bond at G
   \fi\fi\fi\fi\fi%
 \else\if\@tmpb F%single bond at F (fused position)
   \if\@tmpc B%beta single bond
      \yl@xdiff=20\relax%
      \yl@ydiff=31\relax%
%           \putlratom{-127}{140}{\@memberb}%  % left or right type
           \putlatom{-57}{140}{\@memberb}%  % left type
           {%
           \thicklines%
           \Put@Line(103,171)(-1,0){140}%   % single bond at F
           }%
   \else\if\@tmpc A%alpha single bond
      \yl@xdiff=20\relax%
      \yl@ydiff=31\relax%
           \putlatom{-57}{140}{\@memberb}%  % left type
           \dotorline(103,171)(-1,0){140}/(103,171)(-37,171)%
   \else\if\@tmpc U%beta single bond
      \yl@xdiff=20\relax%
      \yl@ydiff=31\relax%
           \putlatom{-57}{140}{\@memberb}%  % left type
%           \Put@Direct(40,148){$\sim$}% unspecified single bond at F
%           \Put@Direct(-13,148){$\sim$}% 
%           \Put@Direct(-62,148){$\sim$}% 
           {%
           \WaveBonds%
            \Put@Line(103,171)(-1,0){140}%  single bond at F
           }%
   \else\if\@tmpc S%alpha single bond
      \yl@xdiff=20\relax%
      \yl@ydiff=31\relax%
           \putlatom{-57}{140}{\@memberb}%  % left type
           \Put@Line(103,171)(-1,0){140}%   % single bond at F
   \else\ifx\@tmpc\empty%alpha single bond
      \yl@xdiff=20\relax%
      \yl@ydiff=31\relax%
           \putlatom{-57}{140}{\@memberb}%  % left type
           \Put@Line(103,171)(-1,0){140}%   % single bond at F
   \fi\fi\fi\fi\fi%
 \fi\fi%
}% end of \GFbondd
%    \end{macrocode}
% \end{macro}
%
% The |\setfusedbond| takes 5 arguments. 
%
% \begin{verbatim}
% ******************************************************
% * setting of atoms and bonds at fused bond positions *
% ******************************************************
%
%   \setfusedbond{SUBSLIST}{AD}{LOWER}{UPPER}{ORDER}
% \end{verbatim}
%
% The first argument |SUBSLIST| is a list of substituents, which is 
% represented in the standard format of \XyMTeX{}. 
% Substituents at the fused positions (vertical bonds) are designated by 
% the number 0 and the following bond modifiers.   
% They are placed by means of the |\GFbonda| command. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents (max 3 substitution positions)
%
%        for 0 (vertical (0,1) fused positions)
%                F == (171,303)  G == (171,103)
%
%           0FA        :  alpha single bond at F 
%           0FB        :  beta single bond at F
%           0FU        :  unspecified single bond at F
%           0GA        :  alpha single bond at G 
%           0GB        :  beta single bond at G
%           0GU        :  unspecified single bond at G
%
% \end{verbatim}
%
% Substituents at the fused positions (diagonal bonds) are designated by 
% the number 1 and the following bond modifiers.   
% They are placed by means of the |\GFbondb| command. 
% \begin{verbatim}
%        for 1 (diagonal (5,-3) fused positions)
%                F == (0,406), G == (171,303)
%
%           1FA        :  alpha single bond at F 
%           1FB        :  beta single bond at F
%           1FC        :  alpha single bond (downward) at F 
%           1FD        :  beta single bond (downward) at F
%           1FU        :  unspecified single bond at F
%           1GA        :  alpha single bond at G 
%           1GB        :  beta single bond at G
%           1GC        :  alpha single bond (upward) at G
%           1GD        :  beta single bond (upward) at G
%           1GU        :  unspecified single bond at G
%
% \end{verbatim}
%
% Substituents at the fused positions (other diagonal bonds) are designated by 
% the number 2 and the following bond modifiers.   
% They are placed by means of the |\GFbondc| command. 
% \begin{verbatim}
%        for 2 (diagonal (-5,-3) fused positions)
%                F == (0,406), G == (-171,303)
%
%           2FA        :  alpha single bond at F 
%           2FB        :  beta single bond at F
%           2FC        :  alpha single bond (upward) at F 
%           2FD        :  beta single bond (upward) at F
%           2FU        :  unspecified single bond at F
%           2GA        :  alpha single bond at G 
%           2GB        :  beta single bond at G
%           2GC        :  alpha single bond (downward) at G
%           2GD        :  beta single bond (downward) at G
%           2GU        :  unspecified single bond at G
%
% \end{verbatim}
%
% Substituents at the fused positions (horizontal bonds) are designated by 
% the number 3 and the following bond modifiers.   
% They are placed by means of the |\GFbondd| command. 
% \begin{verbatim}
%        for 3 (horizontal (1,0) fused positions)
%                G == (303,171)  F == (103,171)
% %%%%                F == (303,171)  G == (103,171)
%
%           3FA        :  alpha single bond at F 
%           3FB        :  beta single bond at F
%           3FU        :  unspecified single bond at F
%           3GA        :  alpha single bond at G 
%           3GB        :  beta single bond at G
%           3GU        :  unspecified single bond at G
% \end{verbatim}
%
% The second argument |AD| is an adjustment value, which adjusts the original 
% set of locant numbers into the standard one between 0 to 3 for drawing 
% substituents on fused positions. 
% The effective range of the standared set of locant numbers is 
% restricted by the auguments |LOWER| and |UPPER|.  A minus value of 
% the last argument shows the anti-clockwise numbering, while zero or 
% a plus value represents the clockwise numbering. 
%
% \begin{verbatim}
%
%    AD       : adjustment      e.g. 0 for six-membered rings
%    LOWER    : lower limit     LOWER < effective range < UPPER
%    UPPER    : upper limit
%    ORDER    : >= 0 clockwise, <0 anti-clockwise
%
% \end{verbatim}
%
% \changes{v1.02}{1998/10/31}{Adding the \cs{\@memberb=\@y} condition}
% \changes{v1.02}{1998/10/31}{Separate \cs{GFbonda} etc.}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
% \changes{v5.00}{2010/10/01}{Coloring Substitution Bond}
%
% \begin{macro}{\setfusedbond}
%    \begin{macrocode}
\newif\if@fused@link \@fused@linkfalse
\def\setfusedbond#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifnum#5<0\relax%
\@tmpaa=-\@tmpa\relax\advance\@tmpaa by #2\relax\@fused@linktrue
\else\@tmpaa=\@tmpa\relax\advance\@tmpaa by #2\relax
\@fused@linkfalse\fi%
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
%    \end{macrocode}
%
%    \begin{macrocode}
\ifcase\@tmpaa%
% %%%%%%%%%%%%%%%%%%
% 0 fused positions   % F == (171,303)  G == (171,103)
% %%%%%%%%%%%%%%%%%% 
{\setbscolor\GFbonda\addbscolor{}{}}%2010/10/01
% %%%%%%%%%%%%%%%%
\or% subst. on 1  F == (0,406), G == (171,303)
% %%%%%%%%%%%%%%%%
{\setbscolor\GFbondb\addbscolor{}{}}%2010/10/01
%\GFbondb
% %%%%%%%%%%%%%%%%
\or% subst. on 2  F == (0,406), G == (-171,303) for \@fused@linkfalse
   % subst. on 2  G == (0,406), F == (-171,303) for \@fused@linktrue
% %%%%%%%%%%%%%%%%
{\setbscolor\GFbondc\addbscolor{}{}}%2010/10/01
%\GFbondc
% %%%%%%%%%%%%%%%%%%
\or %3 fused positions   % G == (303,171)  F == (103,171)
% %%%%%%%%%%%%%%%%%% 
{\setbscolor\GFbondd\addbscolor{}{}}%2010/10/01
%\GFbondd
\fi%end of ifcase
\fi\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting-up substituents and bonds at a given position}
%
% The |\setatombond| takes 3 arguments. 
%
% \begin{verbatim}
% ********************************************************
% * setting of atoms and bonds at an appropiate position *
% ********************************************************
%
%   \setatombond{SUBSLIST}{AD}{SLOPE}
% \end{verbatim}
%
% The first argument |SUBSLIST| is a list of substituents, which is 
% represented in the standard format of \XyMTeX{}. 
% Substituents at the fused positions (vertical bonds) are designated by 
% the number 0 and the following bond modifiers.   
%
% \begin{verbatim}
%     SUBSLIST: list of substituents (max 3 substitution positions)
% \end{verbatim}
%    
% The second argument |AD| is an adjustment value, which adjusts the original 
% locant number into 1. 
%
% \begin{verbatim}
%     AD       : adjustment, 
%         Set AD as being 1  = position number - AD
% \end{verbatim}
%
% The argument |SLOPE| has the following meanings. 
% \begin{verbatim}
%     SLOPE    
%       
%       1      : (0,1)              7     : (0,-1)
%       2      : (3,5)              8     : (-3,-5)
%       3      : (5,3)              9     : (-5,-3)
%       4      : (1,0)             10     : (-1,0)
%       5      : (5,-3)            11     : (-5,3)
%       6      : (3,-5)            12     : (-3,5)
% \end{verbatim}
%
% \changes{v1.02}{1998/10/14}{The bond-setting commands such as 
%   \cs{setatombonda} ... \cs{setatombondh} are separated from 
%   the original \cs{setatombond}.}
%
% \begin{macro}{\setatombond}
%    \begin{macrocode}
\newif\if@clipfuse \@clipfusefalse
\def\setatombond#1#2#3{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\@tmpaa=\@tmpa\relax\advance\@tmpaa by #2\relax
\ifx\@memberb\@yl\else
\ifnum\@tmpaa >0\relax%
\ifnum\@tmpaa <2\relax%
\ifcase\@tmpaa%
% %%%%%%%%%%%%%%%%
\or% subst. on 1
% %%%%%%%%%%%%%%%%
%
% (0,1)
%
 \ifnum#3=1\relax%(upward)
{\setbscolor\setatombonda\addbscolor{}{}}%2010/10/01
%   \setatombonda
%
% (1,0)
%
 \else\ifnum#3=4\relax%(right)
{\setbscolor\setatombondb\addbscolor{}{}}%2010/10/01
%   \setatombondb
%
% (0,-1)
%
 \else\ifnum#3=7\relax%(downward)
{\setbscolor\setatombondc\addbscolor{}{}}%2010/10/01
%   \setatombondc
%
% (-5,3)
%
 \else\ifnum#3=11\relax%
{\setbscolor\setatombondd\addbscolor{}{}}%2010/10/01
%   \setatombondd
%
% (5,-3)
%
 \else\ifnum#3=5\relax%
{\setbscolor\setatombonde\addbscolor{}{}}%2010/10/01
%   \setatombonde
%
% (5,3)
%
 \else\ifnum#3=3\relax%
{\setbscolor\setatombondf\addbscolor{}{}}%2010/10/01
%   \setatombondf
%
% (-5,-3)
%
 \else\ifnum#3=9\relax%
{\setbscolor\setatombondg\addbscolor{}{}}%2010/10/01
%   \setatombondg
%
% (-1,0)
%
 \else\ifnum#3=10\relax%(left)
{\setbscolor\setatombondh\addbscolor{}{}}%2010/10/01
%   \setatombondh
\fi\fi\fi\fi\fi\fi\fi\fi%
\fi%end of ifcase
\fi\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
%
% The command |\setatombond| uses the following bond-setting 
% commands.
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%
% \begin{macro}{\setatombonda}
% \begin{macro}{\setatombondb}
% \begin{macro}{\setatombondc}
% \begin{macro}{\setatombondd}
% \begin{macro}{\setatombonde}
% \begin{macro}{\setatombondf}
% \begin{macro}{\setatombondg}
% \begin{macro}{\setatombondh}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%    \begin{macrocode}
\def\setatombonda{%upward (0,1)
  \if@clipfuse%
   \if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           {%
           \thicklines%
           \Put@Line(0,40)(0,1){100}%  % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \dotorline(0,40)(0,1){100}/(0,40)(0,140)%
   \else\if\@tmpb U% unspecified single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
%           \Put@Direct(-3,30){$\wr$}% unspecified single bond at 1
%           \Put@Direct(-3,80){$\wr$}%
           {%
           \WaveBonds%
            \Put@Line(0,40)(0,1){100}%  single bond at F
           }%
   \else\if\@tmpb S%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(0,40)(0,1){100}%  % single bond at 1
   \else\if\@tmpb D%double bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(-10,40)(0,1){100}%  % single bond at 1
           \Put@Line(10,40)(0,1){100}%  % single bond at 1
   \else\if\@tmpb T%double bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(-15,40)(0,1){100}%  % single bond at 1
           \Put@Line(0,40)(0,1){100}%  % single bond at 1
           \Put@Line(15,40)(0,1){100}%  % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(0,40)(0,1){100}%  % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlratom{-31}{157}{\@memberb}%   % left or right type
  \else%no clip
   \if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           {%
           \thicklines%
           \Put@Line(0,0)(0,1){140}%  % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \dotorline(0,0)(0,1){140}/(0,0)(0,140)%
   \else\if\@tmpb U% unspecified single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
%           \Put@Direct(-3,0){$\wr$}% unspecified single bond at 1
%           \Put@Direct(-3,50){$\wr$}%
%           \Put@Direct(-3,100){$\wr$}%
           {%
           \WaveBonds%
            \Put@Line(0,0)(0,1){140}%  single bond at F
           }%
   \else\if\@tmpb S%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(0,0)(0,1){140}%  % single bond at 1
   \else\if\@tmpb D%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(-10,0)(0,1){140}%  % single bond at 1
           \Put@Line(10,0)(0,1){140}%  % single bond at 1
   \else\if\@tmpb T%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(-15,0)(0,1){140}%  % single bond at 1
           \Put@Line(0,0)(0,1){140}%  % single bond at 1
           \Put@Line(15,0)(0,1){140}%  % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=-17\relax
           \Put@Line(0,0)(0,1){140}%  % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlratom{-31}{157}{\@memberb}%   % left or right type
  \fi%
}% end of \setatombonda
%    \end{macrocode}
%
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondb{%(right) (1,0)
  \if@clipfuse%
   \if\@tmpb B%beta single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           {%
           \thicklines%
           \Put@Line(30,0)(1,0){110}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \dotorline(30,0)(1,0){110}/(30,0)(140,0)%
   \else\if\@tmpb U%beta single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           {%
           \WaveBonds%
           \Put@Line(30,0)(1,0){110}%       % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(40,0)(1,0){100}%       % single bond at 1
   \else\if\@tmpb D%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(40,10)(1,0){100}%       % single bond at 1
           \Put@Line(40,-10)(1,0){100}%       % single bond at 1
   \else\if\@tmpb T%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(40,15)(1,0){100}%       % single bond at 1
           \Put@Line(40,0)(1,0){100}%       % single bond at 1
           \Put@Line(40,-15)(1,0){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(40,0)(1,0){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{157}{-31}{\@memberb}%   % right type only
  \else%
   \if\@tmpb B%beta single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           {%
           \thicklines%
           \Put@Line(0,0)(1,0){140}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \dotorline(0,0)(1,0){140}/(0,0)(140,0)%
   \else\if\@tmpb U%beta single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(1,0){140}%       % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(0,0)(1,0){140}%       % single bond at 1
   \else\if\@tmpb D%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(0,10)(1,0){140}%       % single bond at 1
           \Put@Line(0,-10)(1,0){140}%       % single bond at 1
   \else\if\@tmpb T%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(0,-15)(1,0){140}%       % single bond at 1
           \Put@Line(0,0)(1,0){140}%       % single bond at 1
           \Put@Line(0,15)(1,0){140}%       % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \Put@Line(0,0)(1,0){140}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{157}{-31}{\@memberb}%   % right type only
  \fi%
}% end of \setatombondb
%    \end{macrocode}
%
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondc{%(downward) (0,-1)
  \if@clipfuse%
   \if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           {%
           \thicklines%
           \Put@Line(0,-40)(0,-1){100}%    % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \dotorline(0,-40)(0,-1){100}/(0,-40)(0,-140)%
   \else\if\@tmpb U%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
%           \Put@Direct(-3,-90){$\wr$}% unspecified single bond at 1
%           \Put@Direct(-3,-140){$\wr$}% 
           {%
           \WaveBonds%
           \Put@Line(0,-40)(0,-1){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(0,-40)(0,-1){100}%    % single bond at 1
   \else\if\@tmpb D%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(10,-40)(0,-1){100}%    % single bond at 1
           \Put@Line(-10,-40)(0,-1){100}%    % single bond at 1
   \else\if\@tmpb T%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(15,-40)(0,-1){100}%    % single bond at 1
           \Put@Line(0,-40)(0,-1){100}%    % single bond at 1
           \Put@Line(-15,-40)(0,-1){100}%    % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(0,-40)(0,-1){100}%    % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
       \putlratom{-31}{-230}{\@memberb}% % left or right type
  \else%no clipping
   \if\@tmpb B%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           {%
           \thicklines%
           \Put@Line(0,0)(0,-1){140}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \dotorline(0,0)(0,-1){140}/(0,0)(0,-140)%
   \else\if\@tmpb U%beta single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
%           \Put@Direct(-3,-60){$\wr$}% unspecified single bond at 1
%           \Put@Direct(-3,-110){$\wr$}% 
%           \Put@Direct(-3,-160){$\wr$}% 
           {%
           \WaveBonds%
           \Put@Line(0,0)(0,-1){140}%       % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(0,0)(0,-1){140}%      % single bond at 1
   \else\if\@tmpb D%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(10,0)(0,-1){140}%      % single bond at 1
           \Put@Line(-10,0)(0,-1){140}%      % single bond at 1
   \else\if\@tmpb T%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(15,0)(0,-1){140}%      % single bond at 1
           \Put@Line(0,0)(0,-1){140}%      % single bond at 1
           \Put@Line(-15,0)(0,-1){140}%      % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
      \yl@xdiff=31\relax
      \yl@ydiff=90\relax
           \Put@Line(0,0)(0,-1){140}%      % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
       \putlratom{-31}{-230}{\@memberb}% % left or right type
  \fi%
}% end of \setatombondc
%    \end{macrocode}
%
%    \begin{macrocode}
\def\setatombondd{% (-5,3)
  \if@clipfuse%
      \yl@xdiff=20\relax
      \yl@ydiff=18\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(-30,18)(-5,3){100}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(-30,18)(-5,3){100}/(-30,18)(-130,78)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(-30,18)(-5,3){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(-30,18)(-5,3){100}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(-36,8)(-5,3){100}%       % single bond at 1
           \Put@Line(-24,24)(-5,3){100}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(-39,3)(-5,3){100}%       % single bond at 1
           \Put@Line(-30,18)(-5,3){100}%       % single bond at 1
           \Put@Line(-21,33)(-5,3){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(-30,18)(-5,3){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-150}{60}{\@memberb}%   % left type
  \else%no clipping
      \yl@xdiff=20\relax
      \yl@ydiff=18\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(-5,3){130}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(-5,3){130}/(0,0)(-130,78)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(-5,3){130}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(-5,3){130}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(6,10)(-5,3){130}%       % single bond at 1
           \Put@Line(-6,-10)(-5,3){130}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(9,15)(-5,3){130}%       % single bond at 1
           \Put@Line(0,0)(-5,3){130}%       % single bond at 1
           \Put@Line(-9,-15)(-5,3){130}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(-5,3){130}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-150}{60}{\@memberb}%   % left type
  \fi%
}% end of \setatombondd
%    \end{macrocode}
%
%    \begin{macrocode}
\def\setatombonde{%(5,-3)
  \if@clipfuse%
      \yl@xdiff=-10\relax
      \yl@ydiff=52\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(30,-18)(5,-3){100}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(30,-18)(5,-3){100}/(30,-18)(130,-78)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(30,-18)(5,-3){100}%      % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
           \Put@Line(30,-18)(5,-3){100}%      % single bond at 1
   \else\if\@tmpb D%alpha single bond
           \Put@Line(36,-12)(5,-3){100}%      % single bond at 1
           \Put@Line(24,-28)(5,-3){100}%      % single bond at 1
   \else\if\@tmpb T%alpha single bond
           \Put@Line(39,-3)(5,-3){100}%      % single bond at 1
           \Put@Line(30,-18)(5,-3){100}%      % single bond at 1
           \Put@Line(21,-33)(5,-3){100}%      % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
           \Put@Line(30,-18)(5,-3){100}%      % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{140}{-130}{\@memberb}%  % right type
  \else%no clipping
      \yl@xdiff=-10\relax
      \yl@ydiff=52\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(5,-3){130}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(5,-3){130}/(0,0)(130,-78)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(5,-3){130}%      % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
           \Put@Line(0,0)(5,-3){130}%      % single bond at 1
   \else\if\@tmpb D%alpha single bond
           \Put@Line(6,10)(5,-3){130}%      % single bond at 1
           \Put@Line(-6,-10)(5,-3){130}%      % single bond at 1
   \else\if\@tmpb T%alpha single bond
           \Put@Line(9,15)(5,-3){130}%      % single bond at 1
           \Put@Line(0,0)(5,-3){130}%      % single bond at 1
           \Put@Line(-9,-15)(5,-3){130}%      % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
           \Put@Line(0,0)(5,-3){130}%      % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{140}{-130}{\@memberb}%  % right type
  \fi%
}% end of \setatombonde
%    \end{macrocode}
%
%    \begin{macrocode}
\def\setatombondf{%% (5,3)
  \if@clipfuse%
      \yl@xdiff=-30\relax
      \yl@ydiff=18\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(30,18)(5,3){100}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(30,18)(5,3){100}/(30,18)(130,78)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(30,18)(5,3){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(30,18)(5,3){100}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(36,8)(5,3){100}%       % single bond at 1
           \Put@Line(24,24)(5,3){100}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(39,3)(5,3){100}%       % single bond at 1
           \Put@Line(30,18)(5,3){100}%       % single bond at 1
           \Put@Line(21,33)(5,3){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(30,18)(5,3){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{160}{60}{\@memberb}%    % right type
  \else%no clipping
      \yl@xdiff=-30\relax
      \yl@ydiff=18\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(5,3){130}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(5,3){120}/(0,0)(130,78)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(5,3){130}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(5,3){130}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(6,-10)(5,3){130}%       % single bond at 1
           \Put@Line(-6,10)(5,3){130}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(9,-15)(5,3){130}%       % single bond at 1
           \Put@Line(0,0)(5,3){130}%       % single bond at 1
           \Put@Line(-9,15)(5,3){130}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(5,3){130}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{160}{60}{\@memberb}%    % right type
  \fi%
}% end of \setatombondf
%    \end{macrocode}
%
%    \begin{macrocode}
\def\setatombondg{%% (-5,-3)
  \if@clipfuse%
      \yl@xdiff=0\relax
      \yl@ydiff=52\relax%1999/1/6 by Shinsaku Fujita
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(-30,-18)(-5,-3){100}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
%           \dotorline(-30,-18)(-5,-3){100}/(-20,-12)(-120,-72)%
           \dotorline(-35,-21)(-5,-3){100}/(-35,-21)(-120,-72)%
   \else\if\@tmpc U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(-35,-21)(-5,-3){100}%      % single bond at 1
           }%
   \else\if\@tmpc S%alpha single bond
%           \Put@Line(-30,-18)(-5,-3){100}%      % single bond at 1
           \Put@Line(-35,-21)(-5,-3){100}%      % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(-36,-12)(-5,-3){100}%      % single bond at 1
           \Put@Line(-24,-28)(-5,-3){100}%      % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(-39,-3)(-5,-3){100}%      % single bond at 1
           \Put@Line(-30,-18)(-5,-3){100}%      % single bond at 1
           \Put@Line(-21,-33)(-5,-3){100}%      % single bond at 1
  \else\ifx\@tmpc\empty%alpha single bond
%           \Put@Line(-30,-18)(-5,-3){100}%      % single bond at 1
           \Put@Line(-35,-21)(-5,-3){100}%      % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-130}{-130}{\@memberb}% % left type
  \else%
      \yl@xdiff=0\relax
%      \yl@ydiff=62\relax
      \yl@ydiff=52\relax%1999/1/6 by Shinsaku Fujita
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(-5,-3){130}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(-5,-3){130}/(0,0)(-130,-78)%
   \else\if\@tmpc U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(-5,-3){130}%      % single bond at 1
           }%
   \else\if\@tmpc S%alpha single bond
           \Put@Line(0,0)(-5,-3){130}%      % single bond at 1
   \else\if\@tmpb D%alpha single bond
           \Put@Line(-6,10)(-5,-3){130}%      % single bond at 1
           \Put@Line(6,-10)(-5,-3){130}%      % single bond at 1
   \else\if\@tmpb T%alpha single bond
           \Put@Line(-9,15)(-5,-3){130}%      % single bond at 1
           \Put@Line(0,0)(-5,-3){130}%      % single bond at 1
           \Put@Line(9,-15)(-5,-3){130}%      % single bond at 1
   \else\ifx\@tmpc\empty%alpha single bond
           \Put@Line(0,0)(-5,-3){130}%      % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-130}{-130}{\@memberb}% % left type
  \fi%
}% end of \setatombondg
%    \end{macrocode}
%
%    \begin{macrocode}
\def\setatombondh{% (-1,0)
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
  \if@clipfuse%
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(-30,0)(-1,0){110}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(-30,0)(-1,0){110}/(-30,0)(-140,0)%
   \else\if\@tmpb U%beta single bond
           {%
           \WaveBonds%
           \Put@Line(-30,0)(-1,0){110}%       % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
           \Put@Line(-40,0)(-1,0){100}%       % single bond at 1
   \else\if\@tmpb D%alpha single bond
           \Put@Line(-40,10)(-1,0){100}%       % single bond at 1
           \Put@Line(-40,-10)(-1,0){100}%       % single bond at 1
   \else\if\@tmpb T%alpha single bond
           \Put@Line(-40,15)(-1,0){100}%       % single bond at 1
           \Put@Line(-40,0)(-1,0){100}%       % single bond at 1
           \Put@Line(-40,-15)(-1,0){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
           \Put@Line(-40,0)(-1,0){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-157}{-31}{\@memberb}%   % left type only
  \else%
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(-1,0){140}/(0,0)(-140,0)%
   \else\if\@tmpb U%beta single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
           }%
   \else\if\@tmpb S%alpha single bond
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
   \else\if\@tmpb D%alpha single bond
           \Put@Line(0,10)(-1,0){140}%       % single bond at 1
           \Put@Line(0,-10)(-1,0){140}%       % single bond at 1
   \else\if\@tmpb T%alpha single bond
           \Put@Line(0,-15)(-1,0){140}%       % single bond at 1
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
           \Put@Line(0,15)(-1,0){140}%       % single bond at 1
   \else\ifx\@tmpb\empty%alpha single bond
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-157}{-31}{\@memberb}%   % left type only
  \fi%
}% end of \setatombondh
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The macro |\ylatombondposition| is used to calculate the shift values 
% (|\@ylii| and |\@yli|) for applying the |\setatombond| command. 
% \changes{v1.02}{1998/10/15}{New command: \cs{ylatombondposition} 
% for setting substituents}
%
% \begin{macro}{\ylatombondposition}
%    \begin{macrocode}
\def\ylatombondposition#1#2#3{%
\@@ylswfalse%%%\@reset@ylsw
\@forsemicol\member:=#1\do{%
\if@@ylsw\else%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\@tmpaa=\@tmpa\relax\advance\@tmpaa by #2\relax
\ifnum\@tmpaa >0\relax%
\ifnum\@tmpaa <2\relax%
\ifcase\@tmpaa%
% %%%%%%%%%%%%%%%%
\or% subst. on 1
% %%%%%%%%%%%%%%%%
%
% (0,1)
%
 \ifnum#3=1\relax%upward
  \if@clipfuse%
   \gdef\@ylii{0}\gdef\@yli{-48}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombonda
%
% (1,0)
%
 \else\ifnum#3=4\relax%(right)
  \if@clipfuse%
   \gdef\@ylii{-40}\gdef\@yli{0}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombondb
%
% (0,-1)
%
 \else\ifnum#3=7\relax%(downward)
  \if@clipfuse%
   \gdef\@ylii{0}\gdef\@yli{48}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombondc
%
% (-5,3)
%
 \else\ifnum#3=11\relax%
  \if@clipfuse%
   \gdef\@ylii{50}\gdef\@yli{-30}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombondd
%
% (5,-3)
%
 \else\ifnum#3=5\relax%
  \if@clipfuse%
   \gdef\@ylii{-50}\gdef\@yli{30}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombonde
%
% (5,3)
%
 \else\ifnum#3=3\relax%
  \if@clipfuse%
   \gdef\@ylii{-50}\gdef\@yli{-30}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombondf
%
% (-5,-3)
%
 \else\ifnum#3=9\relax%
  \if@clipfuse%
   \gdef\@ylii{50}\gdef\@yli{30}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombondg
%
% (-1,0)
%
 \else\ifnum#3=10\relax%(left)
  \if@clipfuse%
   \gdef\@ylii{40}\gdef\@yli{0}\global\@ylswtrue%
  \else
   \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%
  \fi
%   \setatombondh
\fi\fi\fi\fi\fi\fi\fi\fi%
\fi%end of ifcase
\fi\fi\fi\fi%
\fi}}% end of \ylatombondposition
%    \end{macrocode}
% \end{macro}
%
% \section{Macros for horizontal formulas}
% \subsection{Placing substituents for horizontal formulas}
%
% Such a drawing command as |\setsixringh| uses several inner macros 
% for placing substituents with bonds. The first set of inner macros 
% are shown as follows. 
%
% The command |\ylpositionh| is to obtain the shift values 
% |\@ylii| and |\@yli| which are used for shifting the standard point 
% of a substituent. 
% The locant flags such as |\@ylatrue| have been stopped to use. 
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}. 
% Commands for setting substituents}
% \changes{v5.01}{2013/06/19}{bug fix: initial setting of \cs{reset@@yl}}
%
% \begin{macro}{\ylpositionh}
%    \begin{macrocode}
\def\ylpositionh#1#2#3#4#5{%
\@@ylswfalse%%%\@reset@ylsw
\reset@@yl%%2013/06/19bug fix
\@forsemicol\member:=#1\do{%
\if@@ylsw\else%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}\relax%
\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
\if@@ylsw
\ifnum#5<0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax\fi
\ifnum\@tmpaa>#3\relax%
\ifnum\@tmpaa<#4\relax%
\ifcase\@tmpaa%0 omit
 \or\ifx\aaa\empty
      \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%\@ylatrue% subst. on 1
    \else
      \gdef\@ylii{30}\gdef\@yli{0}\global\@ylswtrue%\@ylatrue% subst. on 1
    \fi
 \or\ifx\bbb\empty
      \gdef\@ylii{-103}\gdef\@yli{-171}\global\@ylswtrue%\@ylbtrue% subst. on 2
     \else
      \gdef\@ylii{-73}\gdef\@yli{-223}\global\@ylswtrue%\@ylbtrue% subst. on 2
     \fi
 \or \ifx\ccc\empty
      \gdef\@ylii{-303}\gdef\@yli{-171}\global\@ylswtrue%\@ylctrue% subst. on 3
     \else
      \gdef\@ylii{-333}\gdef\@yli{-223}\global\@ylswtrue%\@ylctrue% subst. on 3
     \fi
 \or\ifx\ddd\empty
       \gdef\@ylii{-406}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
     \else
       \gdef\@ylii{-436}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
     \fi
 \or\ifx\eee\empty
       \gdef\@ylii{-303}\gdef\@yli{171}\global\@ylswtrue%\@yletrue% subst. on 5
      \else
       \gdef\@ylii{-333}\gdef\@yli{223}\global\@ylswtrue%\@yletrue% subst. on 5
      \fi
 \or \ifx\fff\empty
      \gdef\@ylii{-103}\gdef\@yli{171}\global\@ylswtrue%\@ylftrue% subst. on 6
     \else
      \gdef\@ylii{-73}\gdef\@yli{223}\global\@ylswtrue%\@ylftrue% subst. on 6
     \fi
\fi%end of ifcase
\fi\fi\fi\fi\fi}}%
%    \end{macrocode}
% \end{macro}
% The |\@hsubsta| command is used for placing a substituent (|\@memberb|) at 
% the 1-position (top) of a vertical six-membered ring.  The bond linking 
% between the substituent and the 1-position is drawn in the light of 
% the corresponding bond modifier (|\@tmpc| = Sa, Sb, SA, SB etc.). 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{Added bond modifiers: FA, FB, GA, GB, Su, Sd}
% \changes{v4.03}{2005/07/20}{Wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@hsubsta}
% *************************************************************
% * treatment of substitution positions for a horizontal type *
% *************************************************************
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 1 %
% %%%%%%%%%%%%%%%
\def\@hsubsta{%
\if@aclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           \Put@Line(-30,0)(-1,0){110}%      % single bond at 1
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=27\relax
      \yl@ydiff=36\relax
           \putlatom{-157}{42}{\@memberb}%     % left type
           {%
           \thicklines%
           \Put@Line(-30,18)(-5,3){100}%     % single bond at 1
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           \dotorline(-30,-18)(-5,-3){100}/(-30,-18)(-120,-72)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=37\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(-30,-18)(-5,-3){100}%    % single bond at 1
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=27\relax
      \yl@ydiff=36\relax
           \putlatom{-157}{42}{\@memberb}%     % left type
           \dotorline(-30,18)(-5,3){100}/(-30,18)(-130,78)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=27\relax
      \yl@ydiff=36\relax
           \putlatom{-157}{42}{\@memberb}%    % left type
           \Put@Line(-30,18)(-5,3){100}%     % single bond at 1
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=27\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           \Put@Line(-30,-18)(-5,-3){100}%   % single bond at 1
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=27\relax
      \yl@ydiff=36\relax
           \putlatom{-157}{42}{\@memberb}%    % left type
           {%
           \WaveBonds%
           \Put@Line(-30,18)(-5,3){100}%     % single bond at 1
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=27\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(-30,-18)(-5,-3){100}%   % single bond at 1
           }%
    \fi\fi\fi\fi\fi
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           \Put@Line(-30,-12)(-1,0){110}%    % double bond at 1
           \Put@Line(-30,12)(-1,0){110}%     % double bond at 1
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           {%
           \thicklines%
           \Put@Line(-30,0)(-1,0){110}%      % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           \dotorline(-30,0)(-1,0){110}/(-30,0)(-140,0)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           {%
           \WaveBonds%
           \Put@Line(-30,0)(-1,0){110}%      % single wave bond at 1
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(0,0){\setatombondG}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(0,0){\setatombondD}%
     }%
   \else%
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           \Put@Line(-40,0)(-1,0){100}%      % single bond at 1
   \fi\fi\fi\fi
   \fi\fi\fi%
\else%% no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           \Put@Line(0,0)(-1,0){140}%        % single bond at 1
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=37\relax
      \yl@ydiff=30\relax
           \putlatom{-157}{42}{\@memberb}%     % left type
           {%
           \thicklines%
           \Put@Line(0,0)(-5,3){120}%        % single bond at 1
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           \dotorline(0,0)(-5,-3){120}/(0,0)(-120,-72)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=37\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           {%
           \thicklines%
           \Put@Line(0,0)(-5,-3){120}%       % single bond at 1
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=30\relax
           \putlatom{-157}{42}{\@memberb}%     % left type
           \dotorline(0,0)(-5,3){120}/(0,0)(-120,72)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=37\relax
      \yl@ydiff=30\relax
           \putlatom{-157}{42}{\@memberb}%    % left type
           \Put@Line(0,0)(-5,3){120}%        % single bond at 1
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=37\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           \Put@Line(0,0)(-5,-3){120}%       % single bond at 1
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=37\relax
      \yl@ydiff=30\relax
           \putlatom{-157}{42}{\@memberb}%    % left type
           {%
           \WaveBonds%
           \Put@Line(0,0)(-5,3){120}%        % single bond at 1
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=37\relax
      \yl@ydiff=28\relax
           \putlatom{-157}{-100}{\@memberb}%   % left type
           {%
           \WaveBonds%
           \Put@Line(0,0)(-5,-3){120}%       % single bond at 1
           }%
    \fi\fi\fi\fi\fi
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%   % left type only
           \Put@Line(0,-12)(-1,0){140}%     % double bond at 1
           \Put@Line(0,12)(-1,0){140}%      % double bond at 1
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%   % left type only
           {%
           \thicklines%
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%   % left type only
           \dotorline(0,0)(-1,0){140}/(0,0)(-140,0)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%    % left type only
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,0){140}%      % single wave bond at 1
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(0,0){\setatombondG}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(0,0){\setatombondD}%
     }%
   \else%
      \yl@xdiff=17\relax
      \yl@ydiff=31\relax
           \putlatom{-157}{-31}{\@memberb}%   % left type only
           \Put@Line(0,0)(-1,0){140}%       % single bond at 1
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}%end of \@hsubsta
%    \end{macrocode}
% \end{macro}
%
% The |\@hsubstb| command is used for placing a substituent (|\@memberb|) at 
% the 2-position (upper-left) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{Added bond modifiers: FA, FB, GA, GB, Su, Sd}
% \changes{v4.03}{2005/07/20}{Wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@hsubstb}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 2 %
% %%%%%%%%%%%%%%%
\def\@hsubstb{%
 \if@bclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=53\relax
      \yl@ydiff=5\relax
           \putlratom{-37}{331}{\@memberb}%
           \Put@Line(79,221)(-3,5){63}% % single bond at 2 (62=>63)
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putlatom{-41}{240}{\@memberb}%     % left type
           {%
           \thicklines%
           \Put@Line(59,201)(-5,3){100}%     % single bond at 2
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=-10\relax
           \putratom{73}{331}{\@memberb}%      % right type
           \dotorline(103,221)(0,1){100}/(103,221)(103,321)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=30\relax
      \yl@ydiff=-10\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           {%
           \thicklines%
           \Put@Line(103,221)(0,1){100}%     % single bond at 2
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putlatom{-41}{240}{\@memberb}%     % left type
           \dotorline(59,201)(-5,3){100}/(59,201)(-41,261)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putlatom{-41}{240}{\@memberb}%     % left type
           \Put@Line(59,201)(-5,3){100}%     % single bond at 2
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=-10\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           \Put@Line(103,221)(0,1){100}%     % single bond at 2
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putlatom{-41}{240}{\@memberb}%     % left type
           {%
           \WaveBonds%
           \Put@Line(59,201)(-5,3){100}%     % single bond at 2
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=-10\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           {%
           \WaveBonds%
           \Put@Line(103,221)(0,1){100}%     % single bond at 2
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=59\relax
      \yl@ydiff=-13\relax
           \putlratom{-37}{331}{\@memberb}%
           \Put@Line(78,208)(-3,5){63}% % double bond at 2(62->63)
           \Put@Line(100,219)(-3,5){63}% % double bond at 2(62->63)
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=53\relax
      \yl@ydiff=5\relax
           \putlratom{-37}{331}{\@memberb}%
           {%
           \thicklines%
           \Put@Line(79,221)(-3,5){63}% % single bond at 2 (62->63)
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=53\relax
      \yl@ydiff=5\relax
           \putlratom{-37}{331}{\@memberb}%
           \dotorline(79,221)(-3,5){63}/(79,221)(16,326)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=53\relax
      \yl@ydiff=5\relax
           \putlratom{-37}{331}{\@memberb}%
           {%
           \WaveBonds%
           \Put@Line(79,221)(-3,5){63}%      % single wave bond at 1
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(103,171){\setatombondh}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(103,171){\setatombondF}%
     }%
   \else%
      \yl@xdiff=53\relax
      \yl@ydiff=5\relax
           \putlratom{-37}{331}{\@memberb}%
           \Put@Line(79,221)(-3,5){63}% % single bond at 2 (62->63)
   \fi\fi\fi\fi%
   \fi\fi\fi
 \else%%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=58\relax
      \yl@ydiff=-21\relax
           \putlratom{-27}{311}{\@memberb}%
           \Put@Line(103,171)(-3,5){72}%     % single bond at 2
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=14\relax
      \yl@ydiff=-3\relax
           \putlatom{-31}{240}{\@memberb}%     % left type
           {%
           \thicklines%
           \Put@Line(103,171)(-5,3){120}%    % single bond at 2
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           \dotorline(103,171)(0,1){140}/(103,171)(103,311)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           {%
           \thicklines%
           \Put@Line(103,171)(0,1){140}%     % single bond at 2
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=14\relax
      \yl@ydiff=-3\relax
           \putlatom{-31}{240}{\@memberb}%     % left type
           \dotorline(103,171)(-5,3){120}/(103,171)(-7,243)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=14\relax
      \yl@ydiff=-3\relax
           \putlatom{-31}{240}{\@memberb}%     % left type
           \Put@Line(103,171)(-5,3){120}%    % single bond at 2
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           \Put@Line(103,171)(0,1){140}%     % single bond at 2
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=14\relax
      \yl@ydiff=-3\relax
           \putlatom{-31}{240}{\@memberb}%     % left type
           {%
           \WaveBonds%
           \Put@Line(103,171)(-5,3){120}%    % single bond at 2
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putlratom{73}{331}{\@memberb}%      % left-right type
           {%
           \WaveBonds%
           \Put@Line(103,171)(0,1){140}%     % single bond at 2
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=64\relax
      \yl@ydiff=-21\relax
           \putlratom{-27}{311}{\@memberb}%
           \Put@Line(96,168)(-3,5){72}%      % double bond at 2
           \Put@Line(121,174)(-3,5){72}%     % double bond at 2
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=58\relax
      \yl@ydiff=-21\relax
           \putlratom{-27}{311}{\@memberb}%
           {%
           \thicklines%
           \Put@Line(103,171)(-3,5){72}%     % single bond at 2
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=58\relax
      \yl@ydiff=-21\relax
           \putlratom{-27}{311}{\@memberb}%
           \dotorline(103,171)(-3,5){72}/(103,171)(31,291)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=58\relax
      \yl@ydiff=-21\relax
           \putlratom{-27}{311}{\@memberb}%
           {%
           \WaveBonds%
           \Put@Line(103,171)(-3,5){72}%      % single wave bond at 1
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(103,171){\setatombondh}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(103,171){\setatombondF}%
     }%
   \else%
      \yl@xdiff=58\relax
      \yl@ydiff=-21\relax
           \putlratom{-27}{311}{\@memberb}%
           \Put@Line(103,171)(-3,5){72}%     % single bond at 2
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@hsubstb
%    \end{macrocode}
% \end{macro}
%
% The |\@hsubstc| command is used for placing a substituent (|\@memberb|) at 
% the 3-position (upper-right) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{Added bond modifiers: FA, FB, GA, GB, Su, Sd}
% \changes{v4.03}{2005/07/20}{Wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@hsubstc}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 3 %
% %%%%%%%%%%%%%%%
\def\@hsubstc{%
 \if@cclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=33\relax
      \yl@ydiff=5\relax
         \putratom{373}{331}{\@memberb}%       
         \Put@Line(343,221)(3,5){63}% % single bond at 3 (62->63)
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putratom{443}{240}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(343,201)(5,3){100}%     % single bond at 3
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=0\relax
           \putlratom{273}{331}{\@memberb}%     % left-right type
           \dotorline(303,221)(0,1){110}/(303,221)(303,321)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=30\relax
      \yl@ydiff=0\relax
           \putlratom{273}{331}{\@memberb}%     % left-right type
           {%
           \thicklines%
           \Put@Line(303,221)(0,1){100}%     % single bond at 3
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putratom{443}{240}{\@memberb}%     % right type
           \dotorline(343,201)(5,3){100}/(343,201)(443,261)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putratom{443}{240}{\@memberb}%     % right type
           \Put@Line(343,201)(5,3){100}%     % single bond at 3
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=0\relax
           \putlratom{273}{331}{\@memberb}%     % left-right type
           \Put@Line(303,221)(0,1){100}%     % single bond at 3
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=0\relax
      \yl@ydiff=21\relax
           \putratom{443}{240}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(343,201)(5,3){100}%     % single bond at 3
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=0\relax
           \putlratom{273}{331}{\@memberb}%     % left-right type
           {%
           \WaveBonds%
           \Put@Line(303,221)(0,1){100}%     % single bond at 3
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=12\relax
      \yl@ydiff=-18\relax
           \putratom{373}{331}{\@memberb}%       
           \Put@Line(328,208)(3,5){63}%  % double bond at 3
           \Put@Line(303,214)(3,5){63}%  % double bond at 3
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=33\relax
      \yl@ydiff=5\relax
           \putratom{373}{331}{\@memberb}%       
           {%
           \thicklines%
           \Put@Line(343,221)(3,5){63}%  % single bond at 3
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=33\relax
      \yl@ydiff=5\relax
           \putratom{373}{331}{\@memberb}%       
           \dotorline(343,221)(3,5){63}/(343,221)(406,326)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=33\relax
      \yl@ydiff=5\relax
           \putratom{373}{331}{\@memberb}%       
           {%
           \WaveBonds%
           \Put@Line(343,221)(3,5){63}%      % single wave bond at 3
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(303,171){\setatombondD}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(303,171){\setatombondb}%
     }%
   \else%
      \yl@xdiff=33\relax
      \yl@ydiff=5\relax
           \putratom{373}{331}{\@memberb}%       
           \Put@Line(343,221)(3,5){63}%  % single bond at 3 (62->63)
   \fi\fi\fi\fi%
   \fi\fi\fi
 \else%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=12\relax
      \yl@ydiff=-20\relax
           \putratom{363}{311}{\@memberb}%
           \Put@Line(303,171)(3,5){72}%      % single bond at 3
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-20\relax
      \yl@ydiff=3\relax
           \putratom{443}{240}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(303,171)(5,3){120}%     % single bond at 3
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putratom{273}{331}{\@memberb}%     % right type
           \dotorline(303,171)(0,1){140}/(303,171)(303,311)%
    \else\if\@tmpc u%(u) up  --- (B) beta
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putratom{273}{331}{\@memberb}%     % right type
           {%
           \thicklines%
           \Put@Line(303,171)(0,1){140}%     % single bond at 3
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-20\relax
      \yl@ydiff=3\relax
           \putratom{443}{240}{\@memberb}%     % right type
           \dotorline(303,171)(5,3){120}/(303,171)(423,243)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-20\relax
      \yl@ydiff=3\relax
           \putratom{443}{240}{\@memberb}%     % right type
           \Put@Line(303,171)(5,3){120}%     % single bond at 3
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putratom{273}{331}{\@memberb}%     % right type
           \Put@Line(303,171)(0,1){140}%     % single bond at 3
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-20\relax
      \yl@ydiff=3\relax
           \putratom{443}{240}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(303,171)(5,3){120}%     % single bond at 3
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=-20\relax
           \putratom{273}{331}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(303,171)(0,1){140}%     % single bond at 3
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi%
   \else\if\@tmpb D%double bond
      \yl@xdiff=6\relax
      \yl@ydiff=-20\relax
           \putratom{363}{311}{\@memberb}%       
           \Put@Line(310,168)(3,5){72}%      % double bond at 3
           \Put@Line(284,174)(3,5){72}%      % double bond at 3
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=12\relax
      \yl@ydiff=-20\relax
           \putratom{363}{311}{\@memberb}%       
           {%
           \thicklines%
           \Put@Line(303,171)(3,5){72}%      % single bond at 3
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=12\relax
      \yl@ydiff=-20\relax
           \putratom{363}{311}{\@memberb}%       
           \dotorline(303,171)(3,5){72}/(303,171)(375,291)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=12\relax
      \yl@ydiff=-20\relax
           \putratom{363}{311}{\@memberb}%       
           {%
           \WaveBonds%
           \Put@Line(303,171)(3,5){72}%      % single wave bond at 3
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(303,171){\setatombondD}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(303,171){\setatombondb}%
     }%
   \else%
      \yl@xdiff=12\relax
      \yl@ydiff=-20\relax
           \putratom{363}{311}{\@memberb}%       
           \Put@Line(303,171)(3,5){72}%      % single bond at 3
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@hsubstc
%    \end{macrocode}
% \end{macro}
%
% The |\@hsubstd| command is used for placing a substituent (|\@memberb|) at 
% the 4-position (right-hand) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{Added bond modifiers: FA, FB, GA, GB, Su, Sd}
% \changes{v4.03}{2005/07/20}{Wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@substd}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 4 %
% %%%%%%%%%%%%%%%
\def\@hsubstd{%
\if@clip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
            \Put@Line(436,0)(1,0){110}%     % single bond at 4
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-27\relax
      \yl@ydiff=36\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           {%
           \thicklines%
           \Put@Line(436,18)(5,3){100}%     % single bond at 4
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=-27\relax
      \yl@ydiff=22\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           \dotorline(436,-18)(5,-3){100}/(436,-18)(526,-72)%
    \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=-27\relax
      \yl@ydiff=22\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           {%
           \thicklines%
           \Put@Line(436,-18)(5,-3){100}%   % single bond at 4
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-27\relax
      \yl@ydiff=36\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           \dotorline(436,18)(5,3){100}/(436,18)(536,78)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-27\relax
      \yl@ydiff=36\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           \Put@Line(436,18)(5,3){100}%     % single bond at 4
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=-27\relax
      \yl@ydiff=22\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           \Put@Line(436,-18)(5,-3){100}%   % single bond at 4
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-27\relax
      \yl@ydiff=36\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           {%
           \WaveBonds%
           \Put@Line(436,18)(5,3){100}%     % single bond at 4
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=-27\relax
      \yl@ydiff=22\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           {%
           \WaveBonds%
           \Put@Line(436,-18)(5,-3){100}%   % single bond at 4
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           \Put@Line(436,-12)(1,0){110}%    % double bond at 4
           \Put@Line(436,12)(1,0){110}%     % double bond at 4
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           {%
           \thicklines%
            \Put@Line(436,0)(1,0){110}%     % single bond at 4
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           \dotorline(436,0)(1,0){110}/(436,0)(546,0)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           {%
           \WaveBonds%
           \Put@Line(436,0)(1,0){110}%      % single wave bond at 3
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(406,0){\setatombondF}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(406,0){\setatombondE}%
     }%
   \else%
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
            \Put@Line(436,0)(1,0){110}%     % single bond at 4
   \fi\fi\fi\fi%
   \fi\fi\fi
\else%% no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
            \Put@Line(406,0)(1,0){140}%     % single bond at 4
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-37\relax
      \yl@ydiff=30\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           {%
           \thicklines%
           \Put@Line(406,0)(5,3){120}%      % single bond at 4
           }%
    \else\if\@tmpc A%(A) alpha
      \yl@xdiff=-37\relax
      \yl@ydiff=28\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           \dotorline(406,0)(5,-3){120}/(406,0)(526,-72)%
   \else\if\@tmpc u%(u) up --- (B) beta
      \yl@xdiff=-37\relax
      \yl@ydiff=28\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           {%
           \thicklines%
           \Put@Line(406,0)(5,-3){120}%     % single bond at 4
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-37\relax
      \yl@ydiff=30\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           \dotorline(406,0)(5,3){120}/(406,0)(526,72)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-37\relax
      \yl@ydiff=30\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           \Put@Line(406,0)(5,3){120}%      % single bond at 4
    \else\if\@tmpc a%(a) alpha
      \yl@xdiff=-37\relax
      \yl@ydiff=28\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           \Put@Line(406,0)(5,-3){120}%     % single bond at 4
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-37\relax
      \yl@ydiff=30\relax
           \putratom{563}{42}{\@memberb}%     % right type only
           {%
           \WaveBonds%
           \Put@Line(406,0)(5,3){120}%      % single bond at 4
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=-37\relax
      \yl@ydiff=28\relax
           \putratom{563}{-100}{\@memberb}%   % right type only
           {%
           \WaveBonds%
           \Put@Line(406,0)(5,-3){120}%     % single bond at 4
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           \Put@Line(406,-12)(1,0){140}%    % double bond at 4
           \Put@Line(406,12)(1,0){140}%     % double bond at 4
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           {%
           \thicklines%
            \Put@Line(406,0)(1,0){140}%     % single bond at 4
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           \dotorline(406,0)(1,0){140}/(406,0)(546,0)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
           {%
           \WaveBonds%
           \Put@Line(406,0)(1,0){140}%      % single wave bond at 4
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(406,0){\setatombondF}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(406,0){\setatombondE}%
     }%
   \else%
      \yl@xdiff=-17\relax
      \yl@ydiff=31\relax
           \putratom{563}{-31}{\@memberb}%    % right type only
            \Put@Line(406,0)(1,0){140}%     % single bond at 4
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@hsubstd
%    \end{macrocode}
% \end{macro}
%
% The |\@hsubste| command is used for placing a substituent (|\@memberb|) at 
% the 5-position (lower-right) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{Added bond modifiers: FA, FB, GA, GB, Su, Sd}
% \changes{v4.00}{2003/4/1}{Bug fix}
% \changes{v4.03}{2005/07/20}{Wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@hsubste}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 5 %
% %%%%%%%%%%%%%%%
\def\@hsubste{%
 \if@eclip %clipping
  \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
%      \yl@xdiff=43\relax
      \yl@xdiff=33\relax
      \yl@ydiff=76\relax
%           \putratom{363}{-402}{\@memberb}%
           \putratom{373}{-402}{\@memberb}%
           \Put@Line(343,-221)(3,-5){63}%% single bond at 5 (62=>63)
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=0\relax
      \yl@ydiff=41\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(343,-201)(5,-3){100}%   % single bond at 5
           }%
    \else\if\@tmpc A%(A) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=71\relax
%           \putratom{283}{-402}{\@memberb}%    % right type
           \putlratom{273}{-402}{\@memberb}%    % left-right type
%           \dotorline(303,-221)(0,-1){110}/(303,-221)(303,-321)%
           \dotorline(303,-221)(0,-1){110}/(303,-221)(303,-311)%
    \else\if\@tmpc u%(u) up --- (B) beta
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=71\relax
%           \putratom{283}{-402}{\@memberb}%    % right type
           \putlratom{273}{-402}{\@memberb}%    % left-right type
           {%
           \thicklines%
           \Put@Line(303,-221)(0,-1){100}%   % single bond at 5
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=0\relax
      \yl@ydiff=41\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           \dotorline(343,-201)(5,-3){100}/(343,-201)(443,-260)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=0\relax
      \yl@ydiff=41\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           \Put@Line(343,-201)(5,-3){100}%   % single bond at 5
    \else\if\@tmpc a%(a) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=71\relax
%           \putratom{283}{-402}{\@memberb}%    % right type
           \putratom{273}{-402}{\@memberb}%    % left-right type
           \Put@Line(303,-221)(0,-1){100}%   % single bond at 5
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=0\relax
      \yl@ydiff=41\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(343,-201)(5,-3){100}%   % single bond at 5
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=71\relax
           \putratom{273}{-402}{\@memberb}%    % left-right type
           {%
           \WaveBonds%
           \Put@Line(303,-221)(0,-1){100}%   % single bond at 5
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
%      \yl@xdiff=22\relax
      \yl@xdiff=12\relax
      \yl@ydiff=82\relax
%           \putratom{363}{-402}{\@memberb}%
           \putratom{373}{-402}{\@memberb}%
           \Put@Line(328,-208)(3,-5){63}% % double bond at 5 (62->63)
           \Put@Line(306,-224)(3,-5){63}% % double bond at 5 (62->63)
   \else\if\@tmpb B%beta single bond
%      \yl@xdiff=43\relax
      \yl@xdiff=33\relax
      \yl@ydiff=76\relax
%           \putratom{363}{-402}{\@memberb}%
           \putratom{373}{-402}{\@memberb}%
           {%
           \thicklines%
           \Put@Line(343,-221)(3,-5){63}%% single bond at 5(62->63)
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=33\relax
      \yl@ydiff=76\relax
           \putratom{373}{-402}{\@memberb}%
           \dotorline(343,-221)(3,-5){63}/(343,-221)(406,-326)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=33\relax
      \yl@ydiff=76\relax
           \putratom{373}{-402}{\@memberb}%
           {%
           \WaveBonds%
           \Put@Line(343,-221)(3,-5){63}%      % single wave bond at 5
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(303,-171){\setatombondb}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(303,-171){\setatombondG}%
     }%
   \else%
%      \yl@xdiff=43\relax
      \yl@xdiff=33\relax
      \yl@ydiff=76\relax
%         \putratom{363}{-402}{\@memberb}%
         \putratom{373}{-402}{\@memberb}%
         \Put@Line(343,-221)(3,-5){63}% % single bond at 5(62->63)
   \fi\fi\fi\fi%
   \fi\fi\fi
 \else%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
      \yl@xdiff=9\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
%           \putratom{363}{-402}{\@memberb}%
           \putratom{363}{-382}{\@memberb}%
           \Put@Line(303,-171)(3,-5){72}%    % single bond at 5
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-20\relax
      \yl@ydiff=58\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(303,-171)(5,-3){120}%   % single bond at 5
           }%
    \else\if\@tmpc A%(A) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
%           \putratom{283}{-402}{\@memberb}%    % right type
           \putratom{273}{-402}{\@memberb}%    % right type
%           \dotorline(303,-171)(0,-1){140}/(303,-171)(303,-321)%
           \dotorline(303,-171)(0,-1){140}/(303,-171)(303,-311)%2002/5/30
    \else\if\@tmpc u%(u) up --- (B) beta
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
%           \putratom{283}{-402}{\@memberb}%    % right type
           \putratom{273}{-402}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(303,-171)(0,-1){140}%   % single bond at 5
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-20\relax
      \yl@ydiff=58\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           \dotorline(303,-171)(5,-3){120}/(303,-171)(423,-243)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-20\relax
      \yl@ydiff=58\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           \Put@Line(303,-171)(5,-3){120}%   % single bond at 5
    \else\if\@tmpc a%(a) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
%           \putratom{283}{-402}{\@memberb}%    % right type
           \putratom{273}{-402}{\@memberb}%    % right type
           \Put@Line(303,-171)(0,-1){140}%   % single bond at 5
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-20\relax
      \yl@ydiff=58\relax
           \putratom{443}{-301}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(303,-171)(5,-3){120}%   % single bond at 5
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
           \putratom{273}{-402}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(303,-171)(0,-1){140}%   % single bond at 5
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=3\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
           \putratom{363}{-382}{\@memberb}%
%           \putratom{363}{-402}{\@memberb}%
            \Put@Line(310,-168)(3,-5){72}%   % double bond at 5
            \Put@Line(284,-174)(3,-5){72}%   % double bond at 5
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=9\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
           \putratom{363}{-382}{\@memberb}%
%           \putratom{363}{-402}{\@memberb}%
           {%
           \thicklines%
           \Put@Line(303,-171)(3,-5){72}%    % single bond at 5
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=9\relax
      \yl@ydiff=91\relax
           \putratom{363}{-382}{\@memberb}%
           \dotorline(303,-171)(3,-5){72}/(303,-171)(375,-291)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=9\relax
      \yl@ydiff=91\relax
           \putratom{363}{-382}{\@memberb}%
           {%
           \WaveBonds%
           \Put@Line(303,-171)(3,-5){72}%      % single wave bond at 5
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(303,-171){\setatombondb}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(303,-171){\setatombondG}%
     }%
   \else%
      \yl@xdiff=9\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
%           \putratom{363}{-402}{\@memberb}%
           \putratom{363}{-382}{\@memberb}%
           \Put@Line(303,-171)(3,-5){72}%    % single bond at 5
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@hsubste
%    \end{macrocode}
% \end{macro}
%
% The |\@hsubstf| command is used for placing a substituent (|\@memberb|) at 
% the 6-position (lower-left) of a vertical six-membered ring. 
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/15}{Added bond modifiers: FA, FB, GA, GB, Su, Sd}
% \changes{v4.03}{2005/07/20}{Wave bonds for stereochemistry: U, FU, GU, SU, SV}
% \begin{macro}{\@hsubstf}
%    \begin{macrocode}
% %%%%%%%%%%%%%%%
% % subst. on 6 %
% %%%%%%%%%%%%%%%
\def\@hsubstf{%
 \if@fclip %clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
%      \yl@xdiff=43\relax
      \yl@xdiff=53\relax
      \yl@ydiff=76\relax
%          \putlratom{-27}{-402}{\@memberb}%
          \putlratom{-37}{-402}{\@memberb}%
          \Put@Line(79,-221)(-3,-5){63}% % single bond at 6 (62=>63)
    \else\if\@tmpc B%(B) beta
      \yl@xdiff=-10\relax
      \yl@ydiff=40\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(59,-201)(-5,-3){100}%   % single bond at 6
           }%
    \else\if\@tmpc A%(A) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
%           \putratom{83}{-402}{\@memberb}%     % right type
           \putlratom{73}{-402}{\@memberb}%     % left-right type
           \dotorline(103,-221)(0,-1){100}/(103,-221)(103,-321)%
    \else\if\@tmpc u%(u) up --- (B) beta
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
%           \putratom{83}{-402}{\@memberb}%     % right type
           \putlratom{73}{-402}{\@memberb}%     % left-right type
           {%
           \thicklines%
           \Put@Line(103,-221)(0,-1){100}%   % single bond at 6
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=-10\relax
      \yl@ydiff=40\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           \dotorline(59,-201)(-5,-3){100}/(59,-201)(-41,-261)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=-10\relax
      \yl@ydiff=40\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           \Put@Line(59,-201)(-5,-3){100}%   % single bond at 6
    \else\if\@tmpc a%(a) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
%           \putratom{83}{-402}{\@memberb}%     % right type
           \putratom{73}{-402}{\@memberb}%     % right type
           \Put@Line(103,-221)(0,-1){100}%   % single bond at 6
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=-10\relax
      \yl@ydiff=40\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(59,-201)(-5,-3){100}%   % single bond at 6
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=81\relax
           \putratom{73}{-402}{\@memberb}%     % right type
           {%
           \WaveBonds%
           \Put@Line(103,-221)(0,-1){100}%   % single bond at 6
           }%
    \fi\fi\fi\fi\fi
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
%      \yl@xdiff=49\relax
      \yl@xdiff=59\relax
      \yl@ydiff=82\relax
%            \putlratom{-27}{-402}{\@memberb}%
            \putlratom{-37}{-402}{\@memberb}%
           \Put@Line(78,-208)(-3,-5){63}% % double bond at 6 (62->63)
           \Put@Line(106,-219)(-3,-5){63}% % double bond at 6 (62->63)
   \else\if\@tmpb B%beta single bond
%      \yl@xdiff=43\relax
      \yl@xdiff=53\relax
      \yl@ydiff=76\relax
%            \putlratom{-27}{-402}{\@memberb}%
            \putlratom{-37}{-402}{\@memberb}%
           {%
           \thicklines%
           \Put@Line(79,-221)(-3,-5){63}% % single bond at 6 (62=>63)
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=53\relax
      \yl@ydiff=76\relax
           \putlratom{-37}{-402}{\@memberb}%
           \dotorline(79,-221)(-3,-5){63}/(79,-221)(16,-326)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=53\relax
      \yl@ydiff=76\relax
           \putlratom{-37}{-402}{\@memberb}%
           {%
           \WaveBonds%
           \Put@Line(79,-221)(-3,-5){63}%      % single wave bond at 6
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(103,-171){\setatombondE}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusetrue
      \Put@Direct(103,-171){\setatombondh}%
     }%
   \else%
%      \yl@xdiff=43\relax
      \yl@xdiff=53\relax
      \yl@ydiff=76\relax
%           \putlratom{-27}{-402}{\@memberb}%
           \putlratom{-37}{-402}{\@memberb}%
           \Put@Line(79,-221)(-3,-5){63}% % single bond at 6(62->63)
   \fi\fi\fi\fi%
   \fi\fi\fi
 \else%%no clipping
   \if\@tmpb S%single bond
    \ifx\@tmpc\empty%
%      \yl@xdiff=59\relax
      \yl@xdiff=63\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
%            \putlratom{-27}{-402}{\@memberb}%
            \putlratom{-27}{-382}{\@memberb}%
            \Put@Line(108,-171)(-3,-5){72}%  % single bond at 6
%   \else\if\@tmpb B%beta single bond
   \else\if\@tmpc B%beta single bond%1998/10/11 by S. Fujita
      \yl@xdiff=8\relax
      \yl@ydiff=58\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           {%
           \thicklines%
           \Put@Line(103,-171)(-5,-3){120}%  % single bond at 6
           }%
    \else\if\@tmpc A%(A) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=91\relax
%           \putratom{83}{-402}{\@memberb}%     % right type
           \putlratom{73}{-402}{\@memberb}%     % left-right type
           \dotorline(103,-171)(0,-1){140}/(103,-171)(103,-311)%
   \else\if\@tmpc u%(u) up --- (B) beta
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=91\relax
%           \putratom{83}{-402}{\@memberb}%     % right type
           \putlratom{73}{-402}{\@memberb}%     % left-right type
           {%
           \thicklines%
           \Put@Line(103,-171)(0,-1){140}%   % single bond at 6
           }%
    \else\if\@tmpc d%(d) down --- (A) alpha
      \yl@xdiff=8\relax
      \yl@ydiff=58\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           \dotorline(103,-171)(-5,-3){120}/(103,-171)(-17,-243)%
    \else\if\@tmpc b%(b) beta
      \yl@xdiff=8\relax
      \yl@ydiff=58\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           \Put@Line(103,-171)(-5,-3){120}%  % single bond at 6
    \else\if\@tmpc a%(a) alpha
%      \yl@xdiff=20\relax
      \yl@xdiff=30\relax
      \yl@ydiff=91\relax
%           \putratom{83}{-402}{\@memberb}%     % right type
           \putlratom{73}{-402}{\@memberb}%     % right-left type
           \Put@Line(103,-171)(0,-1){140}%   % single bond at 6
    \else\if\@tmpc V%(V) beta undefined
      \yl@xdiff=8\relax
      \yl@ydiff=58\relax
           \putlatom{-31}{-301}{\@memberb}%    % right type
           {%
           \WaveBonds%
           \Put@Line(103,-171)(-5,-3){120}%  % single bond at 6
           }%
    \else\if\@tmpc U%(U) alpha undefined
      \yl@xdiff=30\relax
      \yl@ydiff=91\relax
           \putlratom{73}{-402}{\@memberb}%     % right-left type
           {%
           \WaveBonds%
           \Put@Line(103,-171)(0,-1){140}%   % single bond at 6
           }%
    \fi\fi\fi\fi\fi%
    \fi\fi\fi\fi
   \else\if\@tmpb D%double bond
      \yl@xdiff=65\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
%            \putlratom{-27}{-402}{\@memberb}%
            \putlratom{-27}{-382}{\@memberb}%
            \Put@Line(96,-168)(-3,-5){72}%   % double bond at 6
            \Put@Line(121,-174)(-3,-5){72}%  % double bond at 6
   \else\if\@tmpb B%beta single bond
      \yl@xdiff=59\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
%            \putlratom{-27}{-402}{\@memberb}%
            \putlratom{-27}{-382}{\@memberb}%
            \Put@Line(108,-171)(-3,-5){72}%  % single bond at 6
           {%
           \thicklines%
            \Put@Line(108,-171)(-3,-5){72}%  % single bond at 6
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=59\relax
      \yl@ydiff=91\relax
           \putlratom{-27}{-382}{\@memberb}%
           \dotorline(108,-171)(-3,-5){72}/(103,-171)(31,-291)%
   \else\if\@tmpb U%undefined single bond
      \yl@xdiff=59\relax
      \yl@ydiff=91\relax
           \putlratom{-27}{-382}{\@memberb}%
           {%
           \WaveBonds%
           \Put@Line(108,-171)(-3,-5){72}%      % single wave bond at 6
           }%
   \else\if\@tmpb F%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(103,-171){\setatombondE}%
     }%
   \else\if\@tmpb G%fused bond
     {\let\@tmpb=\@tmpc\@clipfusefalse
      \Put@Direct(103,-171){\setatombondh}%
     }%
   \else%
      \yl@xdiff=59\relax
%      \yl@ydiff=111\relax
      \yl@ydiff=91\relax
%            \putlratom{-27}{-402}{\@memberb}%
            \putlratom{-27}{-382}{\@memberb}%
            \Put@Line(108,-171)(-3,-5){72}%  % single bond at 6
   \fi\fi\fi\fi%
   \fi\fi\fi
 \fi}% end of \@hsubstf
%    \end{macrocode}
% \end{macro}
%
% \subsection{Setting-up substituents and bonds on a six-membered ring}
%
% The |\setsixringh| macro takes 5 arguments, which have the same meanings 
% as described in the definition of the |\setsixringv| macro. 
%
% \begin{verbatim}
% ****************************************************************
% * setting of atoms and bonds on a horizontal six-membered ring *
% ****************************************************************
%
%    \setsixringh{SUBSLIST}{AD}{LOWER}{UPPER}{ORDER}
%
% \end{verbatim}
%
% The first argument |SUBSLIST| is a list of substituents, which is 
% represented in the standard format of \XyMTeX{}. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents (max 6 substitution positions)
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           nSd        :  alpha single bond at n-atom (dotted line) 
%                           with an alternative direction to nSA 
%           nSu        :  beta single bond at n-atom (boldface) 
%                           with an alternative direction to nSB 
%           nFA        :  alpha single bond at n-atom (dotted line) 
%                           for ring fusion 
%           nFB        :  beta single bond at n-atom (boldface) 
%                           for ring fusion 
%           nGA        :  alpha single bond at n-atom (dotted line) 
%                           for the other ring fusion 
%           nGB        :  beta single bond at n-atom (boldface) 
%                           for the other ring fusion 
%
% \end{verbatim}
%
% The second argument |AD| is an adjustment value, which adjusts the original 
% set of locant numbers into the standard one between 1 to 6 for drawing 
% a six-membered ring. 
% The effective range of the standared set of locant numbers is 
% restricted by the auguments |LOWER| and |UPPER|.  A minus value of 
% the last argument shows the anti-clockwise numbering, while zero or 
% a plus value represents the clockwise numbering. 
%
% \begin{verbatim}
%    AD       : adjustment      e.g. 0 for six-membered rings
%    LOWER    : lower limit     LOWER < effective range < UPPER
%    UPPER    : upper limit
%    ORDER     : >= 0 clockwise, <0 anti-clockwise
%
% \end{verbatim}
%
% \changes{v1.02}{1998/10/11}{Adding switches \cs{@yla} etc.}
% \changes{v1.02}{1998/10/31}{Deleting switches \cs{@yla} etc.}
%
% \begin{macro}{\setsixringh}
%    \begin{macrocode}
\def\setsixringh#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\ifx\@memberb\@yl\else
\ifnum#5 < 0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa%0 omit
%    \end{macrocode}
%
% The following commands are not used in a revised version
% because of the direct use of |\ifx\@memberb\@yl\else...\fi|.
%
%    \begin{macrocode}
% %\or \if@yla\else\@hsubsta\fi% subst. on 1
% %\or \if@ylb\else\@hsubstb\fi% subst. on 2
% %\or \if@ylc\else\@hsubstc\fi% subst. on 3
% %\or \if@yld\else\@hsubstd\fi% subst. on 4
% %\or \if@yle\else\@hsubste\fi% subst. on 5
% %\or \if@ylf\else\@hsubstf\fi% subst. on 6
%    \end{macrocode}
%
%    \begin{macrocode}
\or{\setbscolor\@hsubsta\addbscolor{}{}}% subst. on 1%2010/10/01
\or{\setbscolor\@hsubstb\addbscolor{}{}}% subst. on 2%2010/10/01
\or{\setbscolor\@hsubstc\addbscolor{}{}}% subst. on 3%2010/10/01
\or{\setbscolor\@hsubstd\addbscolor{}{}}% subst. on 4%2010/10/01
\or{\setbscolor\@hsubste\addbscolor{}{}}% subst. on 5%2010/10/01
\or{\setbscolor\@hsubstf\addbscolor{}{}}% subst. on 6%2010/10/01
\fi%end of ifcase
\fi\fi\fi\fi}}% %end of setsixringh
%    \end{macrocode}
% \end{macro}
%
% \section{Mocros linking Substituents}
% \subsection{Right-handed linking unit}
%
% A structure-drawing command can be used to typeset a substituent 
% by using a (yl)-argument. Moreover, the macro |\ryl| permits us 
% to draw an intermediate linking unit. 
% \changes{v1.02}{1998/10/25}{New command: \cs{ryl} etc.}
%
% \begin{macro}{\ryl}
% \begin{macro}{\@ryl}
%    \begin{macrocode}
\newcount\x@ryl
\newcount\y@ryl
\def\ryl{\@ifnextchar({\@ryl}{\@ryl()}}
\def\@ryl(#1)#2{%
\iniatom\iniflag%initialize
\@reset@ylsw%
\def\centeraaa{}%
\x@ryl=0\y@ryl=0
\@forsemicol\member:=#1\do{%
\if@ylsw%
\XyMTeXWarning{Duplicated items in the first augument of \string\ryl}%
\else%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoch@r\@membera{}%
\settowidth{\dimen0}{\@memberb}%
\x@ryl=\dimen0%%%dimension => counter
\divide\x@ryl\unitlength
\advance\x@ryl by-70
\y@ryl=0
\ifcase\@tmpa%
\def\centeraaa{\@memberb}\@ylswtrue
\advance\y@ryl by50
\or%1
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by30
\advance\y@ryl by50
\or%2
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by40
\advance\y@ryl by40
\or%3
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by30
\or%4
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by0
\or%5
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by-30
\or%6
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by-50
\or%7
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by30
\advance\y@ryl by-50
\or%8
\def\centeraaa{\@memberb}\@ylswtrue
\advance\y@ryl by-50
\fi
\fi\fi}%
 \yl@shiftii=\x@ryl
 \yl@shifti=-\y@ryl
 \advance\yl@shiftii\yl@xdiff
 \advance\yl@shifti\yl@ydiff
 \begin{sfpicture}(0,0)(-\yl@shiftii,-\yl@shifti)%
% %%%%%%%%%%%%%%%%%%%%%%%%
% % setting hetero atoms %
% %%%%%%%%%%%%%%%%%%%%%%%%
\ifx\centeraaa\empty\else%
   \@clipfusetrue
   \putlatom{40}{-30}{\centeraaa}%  % left type
\fi%
% %%%%%%%%%%%%%%%%%%%%%%%%
% % setting substituents %
% %%%%%%%%%%%%%%%%%%%%%%%%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\let\local@tmpa=\@tmpa%global to local 2002/5/30 by SF
\ifcase\local@tmpa%
{\setbscolor\setatombonda\addbscolor{}{}}%2010/10/01%\setatombonda% 0 (upward) (0,1)
\or{\setbscolor\setatombondF\addbscolor{}{}}%2010/10/01%\or\setatombondF%1 (3,5)
\or{\setbscolor\setatombondA\addbscolor{}{}}%2010/10/01%\or\setatombondA%2 (1,1)
\or{\setbscolor\setatombondf\addbscolor{}{}}%2010/10/01%\or\setatombondf%3 (5,3)
\or{\setbscolor\setatombondb\addbscolor{}{}}%2010/10/01%\or\setatombondb%4 (1,0)
\or{\setbscolor\setatombonde\addbscolor{}{}}%2010/10/01%\or\setatombonde%5 (5,-3)
\or{\setbscolor\setatombondB\addbscolor{}{}}%2010/10/01%\or\setatombondB%6 (1,-1)
\or{\setbscolor\setatombondE\addbscolor{}{}}%2010/10/01%\or\setatombondE%7 (3,-5)
\or{\setbscolor\setatombondc\addbscolor{}{}}%2010/10/01%\or\setatombondc%8 (0,-1)
\fi%end of ifcase
\fi
}\end{sfpicture}}%               %end of \ryl macro
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The substituent-setting commands |\setatombondF| etc. are used 
% in the macro |\ryl|. 
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%
% \begin{macro}{\setatombondF}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondF}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
%    \begin{macrocode}
\def\setatombondF{%% (3,5)
  \if@clipfuse%
   \if\@tmpb B%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \thicklines%
           \Put@Line(30,50)(3,5){60}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \dotorline(30,50)(3,5){60}/(30,50)(90,150)%
   \else\if\@tmpb U%unspecified single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \WaveBonds%
           \Put@Line(30,50)(3,5){60}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(30,50)(3,5){60}%       % single bond at 1
   \else\if\@tmpb D%double bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(40,44)(3,5){60}%       % single bond at 1
           \Put@Line(20,56)(3,5){60}%       % single bond at 1
   \else\if\@tmpb T%triple bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(45,41)(3,5){60}%       % single bond at 1
           \Put@Line(30,50)(3,5){60}%       % single bond at 1
           \Put@Line(15,59)(3,5){60}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(30,50)(3,5){60}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{80}{160}{\@memberb}%    % right type
  \else%no clipping
   \if\@tmpb B%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \thicklines%
           \Put@Line(0,0)(3,5){90}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \dotorline(0,0)(3,5){90}/(0,0)(90,150)%
   \else\if\@tmpb U%unspecified single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(3,5){90}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(0,0)(3,5){90}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(10,-6)(3,5){90}%       % single bond at 1
           \Put@Line(-10,6)(3,5){90}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(15,-9)(3,5){90}%       % single bond at 1
           \Put@Line(0,0)(3,5){90}%       % single bond at 1
           \Put@Line(-15,9)(3,5){90}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(0,0)(3,5){90}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{80}{160}{\@memberb}%    % right type
  \fi%
}% end of \setatombondF
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setatombondE}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondE}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondE{%% (3,-5)
  \if@clipfuse%
      \yl@xdiff=10\relax
%      \yl@ydiff=70\relax
      \yl@ydiff=90\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(30,-50)(3,-5){60}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(30,-50)(3,-5){60}/(30,-50)(90,-150)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(30,-50)(3,-5){60}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(30,-50)(3,-5){60}%       % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(40,-44)(3,-5){60}%       % single bond at 1
           \Put@Line(20,-56)(3,-5){60}%       % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(45,-41)(3,-5){60}%       % single bond at 1
           \Put@Line(30,-50)(3,-5){60}%       % single bond at 1
           \Put@Line(15,-59)(3,-5){60}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(30,-50)(3,-5){60}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
%           \putratom{80}{-220}{\@memberb}%    % right type
           \putratom{80}{-240}{\@memberb}%    % right type
  \else%no clipping
      \yl@xdiff=10\relax
%      \yl@ydiff=70\relax
      \yl@ydiff=90\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(3,-5){90}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(3,-5){90}/(0,0)(90,-150)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(3,-5){90}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(3,-5){90}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(10,6)(3,-5){90}%       % single bond at 1
           \Put@Line(-10,-6)(3,-5){90}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(15,9)(3,-5){90}%       % single bond at 1
           \Put@Line(0,0)(3,-5){90}%       % single bond at 1
           \Put@Line(-15,-9)(3,-5){90}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(3,-5){90}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
%           \putratom{80}{-220}{\@memberb}%    % right type
           \putratom{80}{-240}{\@memberb}%    % right type
  \fi%
}% end of \setatombondE
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setatombondA}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondA}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondA{%% (1,1)
      \yl@xdiff=0\relax
      \yl@ydiff=0\relax
  \if@clipfuse%
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(40,40)(1,1){100}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(40,40)(1,1){100}/(40,40)(140,140)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(40,40)(1,1){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(40,40)(1,1){100}%       % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(46,36)(1,1){100}%       % single bond at 1
           \Put@Line(36,46)(1,1){100}%       % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(50,30)(1,1){100}%       % single bond at 1
           \Put@Line(40,40)(1,1){100}%       % single bond at 1
           \Put@Line(30,50)(1,1){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(40,40)(1,1){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{140}{140}{\@memberb}%    % right type
  \else%no clipping
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(1,1){120}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(1,1){120}/(0,0)(120,120)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(1,1){120}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(1,1){120}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(6,-6)(1,1){120}%       % single bond at 1
           \Put@Line(-6,6)(1,1){120}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(10,-10)(1,1){120}%       % single bond at 1
           \Put@Line(0,0)(1,1){120}%       % single bond at 1
           \Put@Line(-10,10)(1,1){120}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(1,1){120}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{120}{120}{\@memberb}%    % right type
  \fi%
}% end of \setatombondA
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setatombondB}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondB}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondB{%% (1,-1)
  \if@clipfuse%
      \yl@xdiff=0\relax
      \yl@ydiff=60\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(40,-40)(1,-1){100}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(40,-40)(1,-1){100}/(40,-40)(140,-140)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(40,-40)(1,-1){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(40,-40)(1,-1){100}%       % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(46,-36)(1,-1){100}%       % single bond at 1
           \Put@Line(36,-46)(1,-1){100}%       % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(50,-30)(1,-1){100}%       % single bond at 1
           \Put@Line(40,-40)(1,-1){100}%       % single bond at 1
           \Put@Line(30,-50)(1,-1){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(40,-40)(1,-1){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{140}{-200}{\@memberb}%    % right type
  \else%no clipping
      \yl@xdiff=0\relax
      \yl@ydiff=60\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(1,-1){120}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(1,-1){120}/(0,0)(120,-120)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(1,-1){120}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(1,-1){120}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(6,6)(1,-1){120}%       % single bond at 1
           \Put@Line(-6,-6)(1,-1){120}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(10,10)(1,-1){120}%       % single bond at 1
           \Put@Line(0,0)(1,-1){120}%       % single bond at 1
           \Put@Line(-10,-10)(1,-1){120}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(1,-1){120}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putratom{120}{-180}{\@memberb}%    % right type
  \fi%
}% end of \setatombondB
%    \end{macrocode}
% \end{macro}
%
% \subsection{Left-handed linking unit}
%
% A structure-drawing command can be used to typeset a substituent 
% by using a (yl)-argument. Moreover, the macro |\lyl| permits us 
% to draw an intermediate linking unit. 
% \changes{v1.02}{1998/10/25}{New command: \cs{lyl} etc.}
% \begin{macro}{\lyl}
%    \begin{macrocode}
\def\lyl{\@ifnextchar({\@lyl}{\@lyl()}}
\def\@lyl(#1)#2{%
\iniatom\iniflag%initialize
\@reset@ylsw%
\def\centeraaa{}%
\x@ryl=0\y@ryl=0
\@forsemicol\member:=#1\do{%
\if@ylsw%
\XyMTeXWarning{Duplicated items in the first augument of \string\ryl}%
\else%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoch@r\@membera{}%
\settowidth{\dimen0}{\@memberb}%
\x@ryl=\dimen0%%%dimension => counter
\divide\x@ryl\unitlength
\advance\x@ryl by-80
\y@ryl=0
\ifcase\@tmpa%
\def\centeraaa{\@memberb}\@ylswtrue
%\advance\x@ryl by0
\advance\y@ryl by50
\or%1
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by30
\advance\y@ryl by50
\or%2
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by40
\advance\y@ryl by40
\or%3
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by30
\or%4
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by0
\or%5
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by-30
\or%6
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by50
\advance\y@ryl by-50
\or%7
\def\centeraaa{\@memberb}\@ylswtrue
\advance\x@ryl by30
\advance\y@ryl by-50
\or%8
\def\centeraaa{\@memberb}\@ylswtrue
%\advance\x@ryl by0
\advance\y@ryl by-50
\fi
\fi\fi}%
 \yl@shiftii=-\x@ryl
 \yl@shifti=-\y@ryl
 \advance\yl@shiftii\yl@xdiff
 \advance\yl@shifti\yl@ydiff
 \begin{sfpicture}(0,0)(-\yl@shiftii,-\yl@shifti)%
% %%%%%%%%%%%%%%%%%%%%%%%%
% % setting hetero atoms %
% %%%%%%%%%%%%%%%%%%%%%%%%
\ifx\centeraaa\empty\else%
   \@clipfusetrue
   \putratom{-40}{-30}{\centeraaa}%  % right type
\fi%
% %%%%%%%%%%%%%%%%%%%%%%%%
% % setting substituents %
% %%%%%%%%%%%%%%%%%%%%%%%%
\@forsemicol\member:=#2\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\let\local@tmpa=\@tmpa%global to local 2002/5/30 by SF
\ifcase\local@tmpa%
{\setbscolor\setatombonda\addbscolor{}{}}%2010/10/01%\setatombonda% 0 (upward) (0,1)
\or{\setbscolor\setatombondD\addbscolor{}{}}%2010/10/01%\or\setatombondD%1 (-3,5)
\or{\setbscolor\setatombondH\addbscolor{}{}}%2010/10/01%\or\setatombondH%2 (-1,1)
\or{\setbscolor\setatombondd\addbscolor{}{}}%2010/10/01%\or\setatombondd%3 (-5,3)
\or{\setbscolor\setatombondh\addbscolor{}{}}%2010/10/01%\or\setatombondh%4 (-1,0)
\or{\setbscolor\setatombondg\addbscolor{}{}}%2010/10/01%\or\setatombondg%5 (-5,-3)
\or{\setbscolor\setatombondC\addbscolor{}{}}%2010/10/01%\or\setatombondC%6 (-1,-1)
\or{\setbscolor\setatombondG\addbscolor{}{}}%2010/10/01%\or\setatombondG%7 (-3,-5)
\or{\setbscolor\setatombondc\addbscolor{}{}}%2010/10/01%\or\setatombondc%8 (0,-1)
\fi%end of ifcase
\fi
}\end{sfpicture}}%               %end of \lyl macro
%    \end{macrocode}
% \end{macro}
%
% The substituent-setting commands |\setatombondD| etc. are used 
% in the macro |\ryl|. 
%
% \begin{macro}{\setatombondD}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondD}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondD{%% (-3,5)
  \if@clipfuse%
   \if\@tmpb B%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \thicklines%
           \Put@Line(-30,50)(-3,5){60}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \dotorline(-30,50)(-3,5){60}/(-30,50)(-90,150)%
   \else\if\@tmpb U%unspecified single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \WaveBonds%
           \Put@Line(-30,50)(-3,5){60}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(-30,50)(-3,5){60}%       % single bond at 1
   \else\if\@tmpb D%double bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(-40,44)(-3,5){60}%       % single bond at 1
           \Put@Line(-20,56)(-3,5){60}%       % single bond at 1
   \else\if\@tmpb T%triple bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(-45,41)(-3,5){60}%       % single bond at 1
           \Put@Line(-30,50)(-3,5){60}%       % single bond at 1
           \Put@Line(-15,59)(-3,5){60}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(-30,50)(-3,5){60}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
%           \putlatom{-80}{160}{\@memberb}%    % left type
           \putlatom{-100}{160}{\@memberb}%    % left type
  \else%no clipping
   \if\@tmpb B%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \thicklines%
           \Put@Line(0,0)(-3,5){90}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \dotorline(0,0)(-3,5){90}/(0,0)(-90,150)%
   \else\if\@tmpb U%unspecified single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           {%
           \WaveBonds%
           \Put@Line(0,0)(-3,5){90}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(0,0)(-3,5){90}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(-10,-6)(-3,5){90}%       % single bond at 1
           \Put@Line(10,6)(-3,5){90}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(-15,-9)(-3,5){90}%       % single bond at 1
           \Put@Line(0,0)(-3,5){90}%       % single bond at 1
           \Put@Line(15,9)(-3,5){90}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
%      \yl@xdiff=-10\relax
      \yl@xdiff=10\relax
      \yl@ydiff=-10\relax
           \Put@Line(0,0)(-3,5){90}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
%           \putlatom{-80}{160}{\@memberb}%    % left type
           \putlatom{-100}{160}{\@memberb}%    % left type
  \fi%
}% end of \setatombondD
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setatombondG}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondG}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondG{%% (-3,-5)
  \if@clipfuse%
      \yl@xdiff=-10\relax
%      \yl@ydiff=70\relax
      \yl@ydiff=90\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(-30,-50)(-3,-5){60}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(-30,-50)(-3,-5){60}/(-30,-50)(-90,-150)%
%           \dotorline(-33,-55)(-3,-5){60}/(-30,-50)(-90,-150)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(-30,-50)(-3,-5){60}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(-30,-50)(-3,-5){60}%       % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(-40,-44)(-3,-5){60}%       % single bond at 1
           \Put@Line(-20,-56)(-3,-5){60}%       % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(-45,-41)(-3,-5){60}%       % single bond at 1
           \Put@Line(-30,-50)(-3,-5){60}%       % single bond at 1
           \Put@Line(-15,-59)(-3,-5){60}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(-30,-50)(-3,-5){60}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
%           \putlatom{-80}{-220}{\@memberb}%    % left type
           \putlatom{-80}{-240}{\@memberb}%    % left type
  \else%no clipping
      \yl@xdiff=-10\relax
%      \yl@ydiff=70\relax
      \yl@ydiff=90\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(-3,-5){90}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(-3,-5){90}/(0,0)(-90,-150)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(-3,-5){90}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(-3,-5){90}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(-10,6)(-3,-5){90}%       % single bond at 1
           \Put@Line(10,-6)(-3,-5){90}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(-15,9)(-3,-5){90}%       % single bond at 1
           \Put@Line(0,0)(-3,-5){90}%       % single bond at 1
           \Put@Line(15,-9)(-3,-5){90}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(-3,-5){90}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
%           \putlatom{-80}{-220}{\@memberb}%    % left type
           \putlatom{-80}{-240}{\@memberb}%    % left type
  \fi%
}% end of \setatombondG
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setatombondH}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondH}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondH{%% (-1,1)
      \yl@xdiff=0\relax
      \yl@ydiff=0\relax
  \if@clipfuse%
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(-40,40)(-1,1){100}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(-40,40)(-1,1){100}/(-40,40)(-140,140)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(-40,40)(-1,1){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(-40,40)(-1,1){100}%       % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(-46,36)(-1,1){100}%       % single bond at 1
           \Put@Line(-36,46)(-1,1){100}%       % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(-50,30)(-1,1){100}%       % single bond at 1
           \Put@Line(-40,40)(-1,1){100}%       % single bond at 1
           \Put@Line(-30,50)(-1,1){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(-40,40)(-1,1){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-140}{140}{\@memberb}%    % left type
  \else%no clipping
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(-1,1){120}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(-1,1){120}/(0,0)(-120,120)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,1){120}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(-1,1){120}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(-6,-6)(-1,1){120}%       % single bond at 1
           \Put@Line(6,6)(-1,1){120}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(-10,-10)(-1,1){120}%       % single bond at 1
           \Put@Line(0,0)(-1,1){120}%       % single bond at 1
           \Put@Line(10,10)(-1,1){120}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(-1,1){120}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-120}{120}{\@memberb}%    % left type
  \fi%
}% end of \setatombondH
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setatombondC}
% \changes{v1.02}{1998/10/25}{New command: \cs{setatombondC}}
% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v4.03}{2005/07/20}{Concrete wave bonds for stereochemistry: FU, GU}
%    \begin{macrocode}
\def\setatombondC{%% (-1,-1)
  \if@clipfuse%
      \yl@xdiff=0\relax
      \yl@ydiff=60\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(-40,-40)(-1,-1){100}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(-40,-40)(-1,-1){100}/(-40,-40)(-140,-140)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(-40,-40)(-1,-1){100}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(-40,-40)(-1,-1){100}%       % single bond at 1
   \else\if\@tmpb D%double bond
           \Put@Line(-46,-36)(-1,-1){100}%       % single bond at 1
           \Put@Line(-36,-46)(-1,-1){100}%       % single bond at 1
   \else\if\@tmpb T%triple bond
           \Put@Line(-50,-30)(-1,-1){100}%       % single bond at 1
           \Put@Line(-40,-40)(-1,-1){100}%       % single bond at 1
           \Put@Line(-30,-50)(-1,-1){100}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(-40,-40)(-1,-1){100}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-140}{-200}{\@memberb}%    % left type
  \else%no clipping
      \yl@xdiff=0\relax
      \yl@ydiff=60\relax
   \if\@tmpb B%beta single bond
           {%
           \thicklines%
           \Put@Line(0,0)(-1,-1){120}%       % single bond at 1
           }%
   \else\if\@tmpb A%alpha single bond
           \dotorline(0,0)(-1,-1){120}/(0,0)(-120,-120)%
   \else\if\@tmpb U%unspecified single bond
           {%
           \WaveBonds%
           \Put@Line(0,0)(-1,-1){120}%       % single bond at 1
           }%
   \else\if\@tmpb S%beta single bond
           \Put@Line(0,0)(-1,-1){120}%       % single bond at 1
   \else\if\@tmpb D%beta single bond
           \Put@Line(-6,6)(-1,-1){120}%       % single bond at 1
           \Put@Line(6,-6)(-1,-1){120}%       % single bond at 1
   \else\if\@tmpb T%beta single bond
           \Put@Line(-10,10)(-1,-1){120}%       % single bond at 1
           \Put@Line(0,0)(-1,-1){120}%       % single bond at 1
           \Put@Line(10,-10)(-1,-1){120}%       % single bond at 1
   \else\ifx\@tmpb\empty%beta single bond
           \Put@Line(0,0)(-1,-1){120}%       % single bond at 1
   \fi\fi\fi\fi\fi\fi\fi%
           \putlatom{-120}{-180}{\@memberb}%    % left type
  \fi%
}% end of \setatombondC
%    \end{macrocode}
% \end{macro}
%
% \section{Minor Linking Units}
%
% \begin{macro}{\ayl}
%    \begin{macrocode}
\def\ayl{\@ifnextchar({\@ayl@}{\@ayl@(10,40)}}
\def\@ayl@(#1,#2)#3{\begingroup\yl@xdiff=0 \yl@ydiff=0%
\kern#1\unitlength\raise#2\unitlength\hbox to0pt{#3\hss}%
\endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\upnobond}
% \begin{macro}{\downnobond}
%    \begin{macrocode}
\def\upnobond#1#2{%
\hbox{\hbox to0.72em{\hss#1\hss}\kern-0.72em\raise2.2ex\hbox{#2}}}
\def\downnobond#1#2{%
\hbox{\hbox to0.72em{\hss#1\hss}\kern-0.72em\lower2.2ex\hbox{#2}}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\BiFunc}
% \changes{v5.01}{2013/03/14}{\cs{BiFunc} added to biphenyl-type derivative}
% The format (slope){length}{moietyA}{moietyB} supports the function for 
% linking moiety A and moiety B through a bond with a given slope. 
%    \begin{macrocode}
\def\BiFunc(#1,#2)#3#4#5{%
\SlopetoXY(0,0)(#1,#2){#3}%
\begin{picture}(\@tempcntXa,\@tempcntYa)(0,0)%
\Put@Line(0,0)(#1,#2){#3}%
\put(0,0){#4}%
\put(\@tempcntXa,\@tempcntYa){#5}%
\end{picture}}
%    \end{macrocode}
% \end{macro}
%
% \section{Spriro-Ring Commands}
% \subsection{Basic Commands for Six-Membered Rings}
%
% For treating spiro-ring fusion, the following basic commands 
% (|\test@vertix| and |\test@vertix@sixv|) are added at the 
% time of releasing Version 2.00.  These commands are generally 
% used for detecting hetero atoms at respective vertices of a 
% heterocyclic ring. 
%
% The command |\test@vertix| is used in |\test@vertix@sixv|. 
% which is designed to test the existence of a hetero atom 
% (or an equivalent) at each vertix of a six-membered ring. 
%
% \begin{macro}{\test@vertix}
% \begin{macro}{\test@vertix@sixv}
% \changes{v2.00}{1998/11/15}{New command: \cs{test@vertix} and 
% \cs{test@vertix@sixv}}
% \changes{v4.03b}{2006/9/6}{\cs{ggg} is changed into \cs{gggA} for \cs{test@vertix} and 
% \cs{test@vertix@sixv}}
%    \begin{macrocode}
\def\test@vertix#1{%
 \def\tempG{#1}\relax%%%added 2006/9/6
 \if\tempG g\relax
   \expandafter\def\csname #1#1#1A\endcsname{@}%
   \if\@tmpb h\relax
    \expandafter\def\csname #1#1#1A\endcsname{@}%
   \else\if\@tmpb s\relax
   \expandafter\def\csname #1#1#1A\endcsname{}%
   \fi\fi
 \else
   \expandafter\def\csname #1#1#1\endcsname{@}%
   \if\@tmpb h\relax
    \expandafter\def\csname #1#1#1\endcsname{@}%
   \else\if\@tmpb s\relax
   \expandafter\def\csname #1#1#1\endcsname{}%
   \fi\fi
 \fi
}
%    \end{macrocode}
%
% The command |\test@vertix@sixv| is designed to test 
% the existence of a hetero atom (or an equivalent) 
% at each vertix of a six-membered ring.
%
%    \begin{macrocode}
\def\test@vertix@sixv#1#2#3#4#5#6#7{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty \relax\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoCH@R\@membera//%
\ifcase\@tmpa%
% \changes{v2.00}{1996/11/14}{@ in place of a net value}
 \or \test@vertix{#2}%
 \or \test@vertix{#3}%
 \or \test@vertix{#4}%
 \or 
   \if\@tmpb a\relax%
     \def\iii{@}%
   \else
     \test@vertix{#5}%
   \fi
 \or \test@vertix{#6}%
 \or \test@vertix{#7}%
\fi\fi}}% end of \test@vertix@sixv
%\def\test@vertix@sixv#1#2#3#4#5#6#7{%
%\@forsemicol\member:=#1\do{%
%\expandafter\@m@mb@r\member;\relax%
%\expandafter\twoch@r\@membera{}%
%\ifcase\@tmpa%
%% \changes{v2.00}{1996/11/14}{@ in place of a net value}
% \or \test@vertix{#2}%
% \or \test@vertix{#3}%
% \or \test@vertix{#4}%
% \or \test@vertix{#5}%
% \or \test@vertix{#6}%
% \or \test@vertix{#7}%
%\fi}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% The command |\set@hetatom@sixv| is to set a spiro group 
% (stored as |\@memberb|) 
% at a vertix designated by |\@tmpaa| (or originally by |\@tmpa|). 
% The atom modifier `s' designates that the spiro group contains 
% a carbon atom (a vertix) at a spiro position, while `h' 
% represents the presence of a hetero atom at a spiro position. 
% The absence of such atom modifiers shows the substitution 
% of a usual hetero atom.  The command |\set@hetatom@sixv| is 
% used in such commands as |\sixheterov| and |\sixheterovi| 
% for treating thier ATOMLISTs, 
% e.g. |1==N;1s==\sixheterov{}{1==(yl)}|.  
%
% \begin{macro}{\set@hetatom@sixv}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@hetatom@sixv}}
%    \begin{macrocode}
\def\set@hetatom@sixv#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty \relax\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoch@r\@membera{}\relax%
\ifnum#5 < 0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa \relax%
\or%position 1
  \if\@tmpb h\relax
     \@acliptrue%
     \putratom{0}{356}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@aclipfalse%
     \putratom{0}{406}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else\relax
     \@acliptrue%
     \putratom{-31}{356}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 2
  \if\@tmpb h\relax
     \@bcliptrue%
     \putratom{135}{280}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@bclipfalse%
     \putratom{175}{303}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else\relax
     \@bcliptrue%
     \putratom{135}{280}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 3
  \if\@tmpb h\relax
     \@ccliptrue%
     \putratom{135}{95}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@cclipfalse%
     \putratom{175}{103}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else\relax
     \@ccliptrue%
     \putratom{135}{65}{\@memberb}%   % right type
   \fi\fi\fi
\or%position 4
  \if\@tmpb h\relax
     \@cliptrue%
     \putratom{0}{50}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@clipfalse%
     \putratom{0}{0}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else\relax
     \@cliptrue%
     \putratom{-31}{-10}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 5
  \if\@tmpb h\relax
     \@ecliptrue%
     \putlatom{-135}{95}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@eclipfalse%
     \putlatom{-175}{103}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else\relax
     \@ecliptrue%
     \putlatom{-135}{65}{\@memberb}%  % left type
   \fi\fi\fi
\or%position 6
  \if\@tmpb h\relax
     \@fcliptrue%
     \putlatom{-135}{280}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@fclipfalse%
     \putlatom{-175}{303}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else\relax
     \@fcliptrue%
     \putlatom{-135}{280}{\@memberb}% % left type
   \fi\fi\fi
\fi% end of ifcase
\fi\fi\fi}}% end of the macro \set@hetatom@sixv
%    \end{macrocode}
% \end{macro}
%
% The command |\set@hetatom@sixh| is to set a spiro group 
% (stored as |\@memberb|) 
% at a vertix designated by |\@tmpaa| (or originally by |\@tmpa|). 
% The atom modifier `s' designates that the spiro group contains 
% a carbon atom (a vertix) at a spiro position, while `h' 
% represents the presence of a hetero atom at a spiro position. 
% The absence of such atom modifiers shows the substitution 
% of a usual hetero atom.  The command |\set@hetatom@sixh| is 
% used in such commands as |\sixheteroh| and |\sixheterohi| 
% for treating thier ATOMLISTs, 
% e.g. |1==N;1s==\sixheteroh{}{1==(yl)}|.  
%
% \begin{macro}{\set@hetatom@sixh}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@hetatom@sixh}}
%    \begin{macrocode}
\def\set@hetatom@sixh#1#2#3#4#5{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
%\expandafter\twoch@r\@membera{}%
\expandafter\twoCH@R\@membera//%
\ifnum#5 < 0\relax%
\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
\ifnum\@tmpaa >#3\relax%
\ifnum\@tmpaa <#4\relax%
\ifcase\@tmpaa%
\or%position 1
  \if\@tmpb h\relax
     \@acliptrue%
     \putlatom{60}{0}{\@memberb}%  % left type
   \else\if\@tmpb s\relax
     \@aclipfalse%
     \putlatom{0}{0}{\@memberb}%              % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@acliptrue%
     \putlatom{60}{-36}{\@memberb}%              % left type
   \fi\fi\fi
\or%position 2
  \if\@tmpb h\relax
     \@bcliptrue%
     \putlatom{135}{141}{\@memberb}%   % left type
   \else\if\@tmpb s\relax
     \@bclipfalse%
     \putlatom{103}{171}{\@memberb}%   % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@bcliptrue%
     \putlatom{135}{141}{\@memberb}%   % left type
   \fi\fi\fi
\or%position 3
  \if\@tmpb h\relax
     \@ccliptrue%
     \putratom{273}{141}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@cclipfalse%
     \putratom{303}{171}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@ccliptrue%
     \putratom{273}{141}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 4
  \if\@tmpb h\relax
     \@cliptrue%
   \putratom{346}{0}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@clipfalse%
   \putratom{406}{0}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@cliptrue%
   \putratom{346}{-36}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 5
  \if\@tmpb h\relax
     \@ecliptrue%
     \putratom{283}{-131}{\@memberb}%  % right type
   \else\if\@tmpb s\relax
     \@eclipfalse%
     \putratom{303}{-171}{\@memberb}%  % right type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@ecliptrue%
     \putratom{273}{-211}{\@memberb}%  % right type
   \fi\fi\fi
\or%position 6
  \if\@tmpb h\relax
     \@fcliptrue%
     \putlatom{125}{-131}{\@memberb}%  % left type
   \else\if\@tmpb s\relax
     \@fclipfalse%
     \putlatom{103}{-171}{\@memberb}%  % left type
   \else\if\@tmpb a\relax%omit fused position
   \else
     \@fcliptrue%
     \putlatom{135}{-211}{\@memberb}%  % left type
   \fi\fi\fi
\fi% end of ifcase
\fi\fi\fi}}% end of the macro \set@hetatom@sixh
%    \end{macrocode}
% \end{macro}
%
% \subsection{Basic Commands for Six-Six Rings}
%
% The command |\test@vertix@decav| is designed to test 
% the existence of a hetero atom (or an equivalent) 
% at each vertix of a six-six fused ring.
%
% \begin{macro}{\test@vertix@decav}
%    \begin{macrocode}
\def\test@vertix@decav#1#2#3#4#5#6#7{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\relax\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoch@r\@membera{}%
\ifcase\@tmpa \relax%
 \or\or\or\or\or\or
 \or \test@vertix{#2}%
 \or
   \if\@tmpb a\relax%
     \def\jjj{@}%
   \else
     \test@vertix{#3}%
   \fi
 \or \test@vertix{#4}%
 \or \test@vertix{#5}%
% \or \test@vertix{#6}%
% \or \test@vertix{#7}%
\fi\fi}}
%    \end{macrocode}
% \end{macro}
%
% The command |\set@vrtx@fuse| is to set an atom (stored as 
% |\@memberb|) at one (stored as |\@tmpa|) of the fused vertices 
% of a six-six ring.  
% These vertices are incapable of accomodating a spiro group. 
% On the other hand, the other positions can take spiro groups 
% (stored as |\@memberb|), which are treated by means of 
% the command |\set@hetatom@sixv|. 
% The command |\set@vrtx@fuse| is used in such commands 
% as |\decaheterov| for treating thier ATOMLISTs, 
%
% \begin{macro}{\set@vrtx@fuse}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@vrtx@fuse}}
% \changes{v2.01}{1998/11/15}{The prefix \cs{\global} are omitted.}
%    \begin{macrocode}
\def\set@vrtx@fuse#1{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoch@r\@membera{}%
\ifcase\@tmpa%
 \or
 \or
 \or
 \or%%%%4
   \if\@tmpb a\relax%
%     \global\@icliptrue%
     \@icliptrue%2001/06/20 by S. Fujita
     \putlatom{207}{65}{\@memberb}%  % left type
   \else\relax
   \fi
 \or%5
 \or%6
 \or%7
 \or%
   \if\@tmpb a\relax%
%     \global\@jcliptrue%
     \@jcliptrue%2001/06/20 by S. Fujita
     \putlatom{207}{280}{\@memberb}% % left type
   \else\relax
   \fi
\or%9 (= 4a)
%     \global\@icliptrue%
     \@icliptrue%2001/06/20 by S. Fujita
     \putlatom{207}{65}{\@memberb}%  % left type
\or%10 (= 8a)
%     \global\@jcliptrue%
     \@jcliptrue%2001/06/20 by S. Fujita
     \putlatom{207}{280}{\@memberb}% % left type
\fi\fi}%
}% end of the macro \set@vrtx@fuse
%    \end{macrocode}
% \end{macro}
%
% The command |\set@vrtx@fuseh| is to set an atom (stored as 
% |\@memberb|) at one (stored as |\@tmpa|) of the fused vertices 
% of a six-six ring.  
% These vertices are incapable of accomodating a spiro group. 
% On the other hand, the other positions can take spiro groups 
% (stored as |\@memberb|), which are treated by means of 
% the command |\set@hetatom@sixh|. 
% The command |\set@vrtx@fuseh| is used in such commands 
% as |\decaheteroh| for treating thier ATOMLISTs, 
%
% \begin{macro}{\set@vrtx@fuseh}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@vrtx@fuseh}}
% \changes{v2.01}{1998/11/15}{The prefix \cs{\global} are omitted.}
%    \begin{macrocode}
\def\set@vrtx@fuseh#1{%
\@forsemicol\member:=#1\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\twoCH@R\@membera//%
\ifcase\@tmpa%
 \or
 \or
 \or
 \or%%%%4
   \if\@tmpb a\relax%
%     \global\@icliptrue%
     \@icliptrue%%2001/06/20 by S. Fujita
     \putratom{273}{-211}{\@memberb}%            % right type
   \else\relax
   \fi
 \or%5
 \or%6
 \or%7
 \or%
   \if\@tmpb a\relax%
%     \global\@jcliptrue%
     \@jcliptrue%2001/06/20 by S. Fujita%
     \putlatom{135}{-211}{\@memberb}%            % left type
   \else\relax
   \fi
\or%9 (= 4a)
   \ifx\@tmpb\empty\relax
%     \global\@icliptrue%
     \@icliptrue%%2001/06/20 by S. Fujita
     \putratom{273}{-211}{\@memberb}%            % right type
   \else
     \XyMTeXWarning{Forbidden spiro ring for the 4a position}%
   \fi
\or%10 (= 8a)
   \ifx\@tmpb\empty\relax
%     \global\@jcliptrue%
     \@jcliptrue%%2001/06/20 by S. Fujita
     \putlatom{135}{-211}{\@memberb}%            % left type
   \else
     \XyMTeXWarning{Forbidden spiro ring for the 8a position}%
   \fi
\fi\fi}%
}% end of the macro \set@vrtx@fuseh
%    \end{macrocode}
% \end{macro}
%
% \section{Ring-fusion Commands for Six-Membered Rings}
% \subsection{Normal Vertical Type}
%
% The macro |\set@fusionadd@sixv| is an inner command contained 
% in the definition of |\sixheterov| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@sixv|. 
%
% \begin{macro}{\set@fusionadd@sixv}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusionadd@sixv}}
%    \begin{macrocode}
\def\set@fusionadd@sixv{%
      \if\@@tmpa 1\relax%
        \putratom{-38}{282}{\@@tmpb}%      % right type
      \else\if\@@tmpa 2\relax%
        \putratom{60}{253}{\@@tmpb}%       % right type
      \else\if\@@tmpa 3\relax%
        \putratom{60}{120}{\@@tmpb}%       % right type
      \else\if\@@tmpa 4\relax%
        \putratom{-38}{88}{\@@tmpb}%       % right type
      \else\if\@@tmpa 6\relax%
        \putratom{-90}{253}{\@@tmpb}%      % right type
      \else\if\@@tmpa 5\relax%
        \putratom{-90}{120}{\@@tmpb}%      % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@sixv
      \fi\fi\fi\fi\fi\fi%
}% 
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@sixv| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@sixv}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusion@sixv}}
%    \begin{macrocode}
\def\set@fusion@sixv{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
\if\@@tmpa d\relax%
        \putlratom{0}{0}{\@@tmpb}%         % bond fused
        \FuseWarning{171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d, h, or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{-171}{103}{\@@tmpb}%     % bond fused
        \FuseWarning{-171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D, H, or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{-171}{103}{\@@tmpb}%     % bond fused
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e, k, or other}%
      \else\if\@@tmpa E\relax%
        \putlratom{-171}{303}{\@@tmpb}%     % bond fused
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E, K, or other}%
      \else\if\@@tmpa f\relax%
        \putlratom{-171}{303}{\@@tmpb}%     % bond fused
        \FuseWarning{-171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f, j, or other}%
      \else\if\@@tmpa F\relax%
        \putlratom{0}{406}{\@@tmpb}%       % bond fused
        \FuseWarning{171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F, J, or other}%
      \else\if\@@tmpa a\relax%
        \putlratom{0}{406}{\@@tmpb}%       % bond fused
        \FuseWarning{-171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a, i, or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{171}{303}{\@@tmpb}%    % bond fused
        \FuseWarning{171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A, I, or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{171}{303}{\@@tmpb}%    % bond fused
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b, k, or other}%
      \else\if\@@tmpa B\relax%
        \putlratom{171}{103}{\@@tmpb}%    % bond fused
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B, K, or other}%
      \else\if\@@tmpa c\relax%
        \putlratom{171}{103}{\@@tmpb}%    % bond fused
        \FuseWarning{171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c, e, or other}%
      \else\if\@@tmpa C\relax%
        \putlratom{0}{0}{\@@tmpb}%      % bond fused
        \FuseWarning{-171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C, E, or other}%
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@sixv
%    \end{macrocode}
% \end{macro}
%
% \subsection{Inverse Vertical Type}
%
% The macro |\set@fusionadd@sixvi| is an inner command contained 
% in the definition of |\sixheterovi| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@sixvi|. 
%
% \begin{macro}{\set@fusionadd@sixvi}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusionadd@sixvi}}
%    \begin{macrocode}
\def\set@fusionadd@sixvi{%
      \if\@@tmpa 4\relax%
        \putratom{-38}{282}{\@@tmpb}%      % right type
      \else\if\@@tmpa 3\relax%
        \putratom{60}{253}{\@@tmpb}%       % right type
      \else\if\@@tmpa 2\relax%
        \putratom{60}{120}{\@@tmpb}%       % right type
      \else\if\@@tmpa 1\relax%
        \putratom{-38}{88}{\@@tmpb}%       % right type
      \else\if\@@tmpa 5\relax%
        \putratom{-90}{253}{\@@tmpb}%      % right type
      \else\if\@@tmpa 6\relax%
        \putratom{-90}{120}{\@@tmpb}%      % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@sixvi
      \fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusionadd@sixvi
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@sixvi| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@sixvi}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusion@sixvi}}
%    \begin{macrocode}
\def\set@fusion@sixvi{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
 \if\@@tmpa a\relax%
        \putlratom{0}{0}{\@@tmpb}%      % right type
        \FuseWarning{-171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{171}{103}{\@@tmpb}%      % right type
        \FuseWarning{171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{171}{103}{\@@tmpb}%      % right type
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b or other}%
      \else\if\@@tmpa B\relax%
        \putlratom{171}{303}{\@@tmpb}%      % right type
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B or other}%
      \else\if\@@tmpa c\relax%
        \putlratom{171}{303}{\@@tmpb}%      % right type
        \FuseWarning{171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c or other}%
      \else\if\@@tmpa C\relax%
        \putlratom{0}{406}{\@@tmpb}%      % right type
        \FuseWarning{-171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C or other}%
      \else\if\@@tmpa d\relax%
        \putlratom{0}{406}{\@@tmpb}%      % right type
        \FuseWarning{171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{-171}{303}{\@@tmpb}%      % right type
        \FuseWarning{-171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{-171}{303}{\@@tmpb}%      % right type
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e or other}%
      \else\if\@@tmpa E\relax%
        \putlratom{-171}{103}{\@@tmpb}%      % right type
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E or other}%
      \else\if\@@tmpa f\relax%
        \putlratom{-171}{103}{\@@tmpb}%      % right type
        \FuseWarning{171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f or other}%
      \else\if\@@tmpa F\relax%
        \putlratom{0}{0}{\@@tmpb}%      % right type
        \FuseWarning{-171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F or other}%
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the marcro \set@fusion@sixvi
%    \end{macrocode}
% \end{macro}
%
% \subsection{Normal Horizontal Type}
%
% The macro |\set@fusionadd@sixh| is an inner command contained 
% in the definition of |\sixheteroh| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@sixh|. 
%
% \begin{macro}{\set@fusionadd@sixh}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusionadd@sixh}}
%    \begin{macrocode}
\def\set@fusionadd@sixh{%
      \if\@@tmpa 4\relax%
        \putratom{272}{-18}{\@@tmpb}%      % right type
      \else\if\@@tmpa 1\relax%
        \putratom{68}{-18}{\@@tmpb}%       % right type
      \else\if\@@tmpa 3\relax%
        \putratom{233}{60}{\@@tmpb}%       % right type
      \else\if\@@tmpa 2\relax%
        \putratom{120}{60}{\@@tmpb}%       % right type
      \else\if\@@tmpa 5\relax%
        \putratom{233}{-110}{\@@tmpb}%     % right type
      \else\if\@@tmpa 6\relax%
        \putratom{120}{-110}{\@@tmpb}%     % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@sixh
      \fi\fi\fi\fi\fi\fi%
}% 
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@sixh| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@sixh}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@sixh}}
%    \begin{macrocode}
\def\set@fusion@sixh{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
\if\@@tmpa d\relax%
        \putlratom{406}{0}{\@@tmpb}%         % bond fused
        \FuseWarning{103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d, h, or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D, H, or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e, k, or other}%
      \else\if\@@tmpa E\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E, K, or other}%
      \else\if\@@tmpa f\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f, j, or other}%
      \else\if\@@tmpa F\relax%
        \putlratom{0}{0}{\@@tmpb}%       % bond fused
        \FuseWarning{-103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F, J, or other}%
      \else\if\@@tmpa a\relax%
        \putlratom{0}{0}{\@@tmpb}%       % bond fused
        \FuseWarning{-103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a, i, or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A, I, or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b, k, or other}%
      \else\if\@@tmpa B\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B, K, or other}%
      \else\if\@@tmpa c\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c, e, or other}%
      \else\if\@@tmpa C\relax%
        \putlratom{406}{0}{\@@tmpb}%      % bond fused
%        \FuseWarning{103}{171}%
        \FuseWarning{103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C, E, or other}%
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@sixh
%    \end{macrocode}
% \end{macro}
%
% \subsection{Inverse Horizontal Type}
%
% The macro |\set@fusionadd@sixhi| is an inner command contained 
% in the definition of |\sixheterohi| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@sixhi|. 
%
% \begin{macro}{\set@fusionadd@sixhi}
% \changes{v2.00}{1998/11/29}{New command: \cs{set@fusionadd@sixhi}}
%    \begin{macrocode}
\def\set@fusionadd@sixhi{%
      \if\@@tmpa 1\relax%
        \putratom{272}{-18}{\@@tmpb}%      % right type
      \else\if\@@tmpa 4\relax%
        \putratom{68}{-18}{\@@tmpb}%       % right type
      \else\if\@@tmpa 2\relax%
        \putratom{233}{60}{\@@tmpb}%       % right type
      \else\if\@@tmpa 3\relax%
        \putratom{120}{60}{\@@tmpb}%       % right type
      \else\if\@@tmpa 6\relax%
        \putratom{233}{-110}{\@@tmpb}%      % right type
      \else\if\@@tmpa 5\relax%
        \putratom{120}{-110}{\@@tmpb}%      % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@sixhi
      \fi\fi\fi\fi\fi\fi%
}% 
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@sixhi| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@sixhi}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@sixhi}}
%    \begin{macrocode}
\def\set@fusion@sixhi{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
\if\@@tmpa F\relax%
        \putlratom{406}{0}{\@@tmpb}%         % bond fused
        \FuseWarning{103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F, J, or other}%
      \else\if\@@tmpa f\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f, j, or other}%
      \else\if\@@tmpa E\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E, K, or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e, k, or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D, H, or other}%
      \else\if\@@tmpa d\relax%
        \putlratom{0}{0}{\@@tmpb}%       % bond fused
        \FuseWarning{-103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d, h, or other}%
      \else\if\@@tmpa C\relax%
        \putlratom{0}{0}{\@@tmpb}%       % bond fused
        \FuseWarning{-103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C, E, or other}%
      \else\if\@@tmpa c\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c, e, or other}%
      \else\if\@@tmpa B\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B, K, or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b, k, or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A, I, or other}%
      \else\if\@@tmpa a\relax%
        \putlratom{406}{0}{\@@tmpb}%      % bond fused
        \FuseWarning{103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a, i, or other}%
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@sixhi
%    \end{macrocode}
% \end{macro}
%
% \section{Ring-fusion Commands for Six-Six Fused Rings}
% \subsection{Conventions for Warning}
%
% \begin{macro}{\UnfavorableFusion}
% \changes{v2.00}{1998/12/23}{New command: \cs{UnfavorableFusion}}
%    \begin{macrocode}
\def\UnfavorableFusion#1{\if@smallringsw\else
\XyMTeXWarning{Unfavorable Fusion for bond `#1'}\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ForbiddenFusion}
% \changes{v2.00}{1998/12/23}{New command: \cs{ForbiddenFusion}}
%    \begin{macrocode}
\def\ForbiddenFusion#1{\if@smallringsw\else
\XyMTeXWarning{Forbidden Fusion for bond `#1'}\fi}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Normal Vertical Type}
%
% The macro |\set@fusion@decav| is an inner command contained 
% in the definition of |\decalinev| and |\decaheterov|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixv|. 
%
% \begin{macro}{\set@fusion@decav}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusion@decav}}
%    \begin{macrocode}
\def\set@fusion@decav{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa c%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa C%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa d%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{e}%
  \else\if\@tmpa E%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{E}%
  \else\if\@tmpa f%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa F%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa g%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa G%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa h%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa H%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa i%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{f}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{F}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{J}%
  \else\if\@tmpa k%
      \edef\@@tmpa{e}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{k}%
  \else\if\@tmpa K%
      \edef\@@tmpa{E}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{K}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@decav
%    \end{macrocode}
% \end{macro}
%
% \subsection{Vertical-Bottom  Type}
%
% The macro |\set@fusion@decavb| is an inner command contained 
% in the definition of |\decalinevb| and |\decaheterovb| etc., 
% where  the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixv|. 
%
% \begin{macro}{\set@fusion@decavb}
% \changes{v2.00}{1998/12/25}{New command: \cs{set@fusion@decavb}}
%    \begin{macrocode}
\def\set@fusion@decavb{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \edef\@@tmpa{b}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \edef\@@tmpa{B}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa c%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa C%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa d%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{d}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{e}%
  \else\if\@tmpa E%
      \edef\@@tmpa{D}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{E}%
  \else\if\@tmpa f%
      \edef\@@tmpa{e}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa F%
      \edef\@@tmpa{E}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa g%
      \edef\@@tmpa{f}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa G%
      \edef\@@tmpa{F}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa h%
      \edef\@@tmpa{a}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa H%
      \edef\@@tmpa{A}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa i%
      \edef\@@tmpa{b}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{B}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{J}%
  \else\if\@tmpa k%
      \edef\@@tmpa{c}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
      \ForbiddenFusion{k}%
  \else\if\@tmpa K%
      \edef\@@tmpa{C}%
      \Put@Direct(-171,303){\set@fusionadd@sixv}%
      \ForbiddenFusion{K}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@decavb
%    \end{macrocode}
% \end{macro}
%
% \subsection{Vertical-Top  Type}
%
% The macro |\set@fusion@decavt| is an inner command contained 
% in the definition of |\decalinevt| and |\decaheterovt| etc., 
% where  the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixv|. 
%
% \begin{macro}{\set@fusion@decavt}
% \changes{v2.00}{1998/12/25}{New command: \cs{set@fusion@decavt}}
%    \begin{macrocode}
\def\set@fusion@decavt{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \edef\@@tmpa{f}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \edef\@@tmpa{F}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \edef\@@tmpa{a}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \edef\@@tmpa{A}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa c%
      \edef\@@tmpa{b}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa C%
      \edef\@@tmpa{B}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
  \else\if\@tmpa d%
      \edef\@@tmpa{c}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{C}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{b}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{e}%
  \else\if\@tmpa E%
      \edef\@@tmpa{B}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{E}%
  \else\if\@tmpa f%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa F%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa g%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa G%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa h%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa H%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa i%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{e}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{E}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{J}%
  \else\if\@tmpa k%
      \edef\@@tmpa{d}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
      \ForbiddenFusion{k}%
  \else\if\@tmpa K%
      \edef\@@tmpa{D}%
      \Put@Direct(171,303){\set@fusionadd@sixv}%
      \ForbiddenFusion{K}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of \set@fusion@decavt
%    \end{macrocode}
% \end{macro}
%
% \subsection{Normal Horizontal Type}
%
% The macro |\set@fusion@decah| is an inner command contained 
% in the definition of |\decalineh| and |\decaheteroh|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixh|. 
%
% \begin{macro}{\set@fusion@decah}
% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusion@decah}}
%    \begin{macrocode}
\def\set@fusion@decah{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa c%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa C%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa d%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{c}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{e}%
  \else\if\@tmpa E%
      \edef\@@tmpa{C}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{E}%
  \else\if\@tmpa f%
      \edef\@@tmpa{d}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa F%
      \edef\@@tmpa{D}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa g%
      \edef\@@tmpa{e}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa G%
      \edef\@@tmpa{E}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa h%
      \edef\@@tmpa{f}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa H%
      \edef\@@tmpa{F}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa i%
      \edef\@@tmpa{a}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{A}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \UnfavorableFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \UnfavorableFusion{J}%
  \else\if\@tmpa k%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \ForbiddenFusion{k}%
  \else\if\@tmpa K%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \ForbiddenFusion{K}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@decah
%    \end{macrocode}
% \end{macro}
%
% \section{Ring-fusion Commands for Six-Six-Six Fused Rings}
% \subsection{Normal Vertical Type of Anthracenes}
%
% The macro |\set@fusion@hanthrav| is an inner command contained 
% in the definition of |\hanthracenev|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixv|. 
%
% \begin{macro}{\set@fusion@hanthrav}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@hanthrav}}
%    \begin{macrocode}
\def\set@fusion@hanthrav{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
  \else\if\@tmpa c%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
  \else\if\@tmpa C%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
  \else\if\@tmpa d%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \let\@@tmpa=\@tmpa
      \Put@Direct(684,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{c}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{e}%
  \else\if\@tmpa E%
      \edef\@@tmpa{C}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{E}%
  \else\if\@tmpa f%
      \edef\@@tmpa{d}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{f}%
  \else\if\@tmpa F%
      \edef\@@tmpa{D}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{F}%
  \else\if\@tmpa g%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{g}%
  \else\if\@tmpa G%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{G}%
  \else\if\@tmpa h%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa H%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa i%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa I%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa j%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa J%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa k%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{k}%
  \else\if\@tmpa K%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{K}%
  \else\if\@tmpa l%
      \edef\@@tmpa{f}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{l}%
  \else\if\@tmpa L%
      \edef\@@tmpa{F}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{L}%
  \else\if\@tmpa m%
      \edef\@@tmpa{a}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{m}%
  \else\if\@tmpa M%
      \edef\@@tmpa{A}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{M}%
  \else\if\@tmpa n%
      \edef\@@tmpa{f}%
      \Put@Direct(684,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{n}%
  \else\if\@tmpa N%
      \edef\@@tmpa{F}%
      \Put@Direct(684,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{N}%
  \else\if\@tmpa o%
      \edef\@@tmpa{e}%
      \Put@Direct(684,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{o}%
  \else\if\@tmpa O%
      \edef\@@tmpa{E}%
      \Put@Direct(684,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{O}%
  \else\if\@tmpa p%
      \edef\@@tmpa{e}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{p}%
  \else\if\@tmpa P%
      \edef\@@tmpa{E}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{P}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@hanthrav
%    \end{macrocode}
% \end{macro}
%
% \subsection{Normal Vertical Type of Phenanthrenes}
%
% The macro |\set@fusion@hphenanv| is an inner command contained 
% in the definition of |\hphenanthrenev|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixv|. 
%
% \begin{macro}{\set@fusion@hphenanv}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@phenanv}}
%    \begin{macrocode}
\def\set@fusion@hphenanv{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \edef\@@tmpa{b}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \edef\@@tmpa{B}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \edef\@@tmpa{a}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \edef\@@tmpa{A}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa c%
      \edef\@@tmpa{f}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa C%
      \edef\@@tmpa{F}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa d%
      \edef\@@tmpa{e}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{E}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{f}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{e}%
  \else\if\@tmpa E%
      \edef\@@tmpa{F}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{E}%
  \else\if\@tmpa f%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{f}%
  \else\if\@tmpa F%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{F}%
  \else\if\@tmpa g%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa G%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa h%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa H%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa i%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa I%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa j%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{J}%
  \else\if\@tmpa k%
      \edef\@@tmpa{d}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{k}%
  \else\if\@tmpa K%
      \edef\@@tmpa{D}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{K}%
  \else\if\@tmpa l%
      \edef\@@tmpa{c}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa L%
      \edef\@@tmpa{C}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa m%
      \edef\@@tmpa{b}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{m}%
  \else\if\@tmpa M%
      \edef\@@tmpa{B}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{M}%
  \else\if\@tmpa n%
      \edef\@@tmpa{c}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{n}%
  \else\if\@tmpa N%
      \edef\@@tmpa{C}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \UnfavorableFusion{N}%
  \else\if\@tmpa o%
      \edef\@@tmpa{d}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \ForbiddenFusion{o}%
  \else\if\@tmpa O%
      \edef\@@tmpa{D}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \ForbiddenFusion{O}%
  \else\if\@tmpa p%
      \edef\@@tmpa{e}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{p}%
  \else\if\@tmpa P%
      \edef\@@tmpa{E}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{P}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@hphananv
%    \end{macrocode}
% \end{macro}
%
% \section{Ring-fusion Commands for Five-Membered Rings}
% \subsection{Normal vertical type}
%
% The macro |\set@fusionadd@fivev| is an inner command contained 
% in the definition of |\fiveheterov| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@fivev|. 
%
% \begin{macro}{\set@fusionadd@fivev}
% \changes{v2.00}{1998/12/4}{New command: \cs{set@fusionadd@fivev}}
%    \begin{macrocode}
\def\set@fusionadd@fivev{%
      \if\@@tmpa 1\relax%
        \putratom{-38}{88}{\@@tmpb}%        % right type
      \else\if\@@tmpa 2\relax%
        \putratom{60}{120}{\@@tmpb}%        % right type
      \else\if\@@tmpa 3\relax%
        \putratom{60}{233}{\@@tmpb}%        % right type
      \else\if\@@tmpa 4\relax%
        \putratom{-60}{233}{\@@tmpb}%       % right type
      \else\if\@@tmpa 5\relax%
        \putratom{-60}{120}{\@@tmpb}%       % right type
      \else\if\@@tmpa 0\relax%
        \putratom{-38}{150}{\@@tmpb}%       % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@fivev
      \fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusionadd@fivev
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@fivev| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@fivev}
% \changes{v2.00}{1998/12/4}{New command: \cs{set@fusion@fivev}}
% \changes{v5.00}{2010/10/01}{For bond coloring}
%    \begin{macrocode}
\newif\iffusesw \fuseswfalse 
\def\set@fusion@fivev{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
 \if\@@tmpa a\relax%
        \putlratom{0}{0}{\@@tmpb}%      % right type
        \FuseWarning{-171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
      \else\if\@@tmpa A\relax%
        \putlratom{171}{103}{\@@tmpb}%      % right type
        \FuseWarning{171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
      \else\if\@@tmpa b\relax%
        \putlratom{171}{103}{\@@tmpb}%      % right type
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
      \else\if\@@tmpa B\relax%
        \putlratom{171}{303}{\@@tmpb}%      % right type
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
      \else\if\@@tmpa c\relax
        \iffusesw
        \putlratom{171}{103}{\@@tmpb}%      % right type
        \else 
        \XyMTeXWarning{Not-used fusion at bond `c'}%
        \fi
      \else\if\@@tmpa C\relax%
        \iffusesw
        \putlratom{-171}{103}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `C'}%
        \fi
      \else\if\@@tmpa d\relax%
        \putlratom{-171}{303}{\@@tmpb}%      % right type
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
      \else\if\@@tmpa D\relax%
        \putlratom{-171}{103}{\@@tmpb}%      % right type
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
      \else\if\@@tmpa e\relax%
        \putlratom{-171}{103}{\@@tmpb}%      % right type
        \FuseWarning{171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
      \else\if\@@tmpa E\relax%
        \putlratom{0}{0}{\@@tmpb}%      % right type
        \FuseWarning{-171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the marcro \set@fusion@fivev
%    \end{macrocode}
% \end{macro}
%
% \subsection{Inverse vertical type}
%
% The macro |\set@fusionadd@fivevi| is an inner command contained 
% in the definition of |\fiveheterov| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@fivevi|. 
%
% \begin{macro}{\set@fusionadd@fivevi}
% \changes{v2.00}{1998/12/4}{New command: \cs{set@fusionadd@fivevi}}
%    \begin{macrocode}
\def\set@fusionadd@fivevi{%
      \if\@@tmpa 1\relax%
        \putratom{-38}{282}{\@@tmpb}%      % right type
      \else\if\@@tmpa 2\relax%
        \putratom{60}{233}{\@@tmpb}%        % right type
      \else\if\@@tmpa 3\relax%
        \putratom{60}{120}{\@@tmpb}%        % right type
      \else\if\@@tmpa 4\relax%
        \putratom{-60}{120}{\@@tmpb}%       % right type
      \else\if\@@tmpa 5\relax%
        \putratom{-60}{233}{\@@tmpb}%       % right type
      \else\if\@@tmpa 0\relax%
        \putratom{-38}{213}{\@@tmpb}%       % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@fivevi
      \fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusionadd@fivevi
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@fivevi| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@fivevi}
% \changes{v2.00}{1998/12/4}{New command: \cs{set@fusion@fivevi}}
% \changes{v5.00}{2010/10/01}{For bond coloring}
%    \begin{macrocode}
\def\set@fusion@fivevi{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
\if\@@tmpa d\relax%
        \putlratom{-171}{103}{\@@tmpb}%     % bond fused
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d, k, or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{-171}{303}{\@@tmpb}%     % bond fused
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D, K, or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{-171}{303}{\@@tmpb}%     % bond fused
        \FuseWarning{-171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e, j, or other}%
      \else\if\@@tmpa E\relax%
        \putlratom{0}{406}{\@@tmpb}%       % bond fused
        \FuseWarning{171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E, J, or other}%
      \else\if\@@tmpa a\relax%
        \putlratom{0}{406}{\@@tmpb}%       % bond fused
        \FuseWarning{-171}{103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a, i, or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{171}{303}{\@@tmpb}%    % bond fused
        \FuseWarning{171}{-103}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A, I, or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{171}{303}{\@@tmpb}%    % bond fused
        \FuseWarning{0}{200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b, k, or other}%
      \else\if\@@tmpa B\relax%
        \putlratom{171}{103}{\@@tmpb}%    % bond fused
        \FuseWarning{0}{-200}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B, K, or other}%
      \else\if\@@tmpa c\relax
        \iffusesw
        \putlratom{171}{103}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `c'}%
        \fi
      \else\if\@@tmpa C\relax%
        \iffusesw
        \putlratom{-171}{103}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `C'}%
        \fi
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@fivevi
%    \end{macrocode}
% \end{macro}
%
% \subsection{Normal horizontal type}
%
% The macro |\set@fusionadd@fiveh| is an inner command contained 
% in the definition of |\fiveheteroh| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@fiveh|. 
%
% \begin{macro}{\set@fusionadd@fiveh}
% \changes{v2.00}{1998/11/29}{New command: \cs{set@fusionadd@fiveh}}
%    \begin{macrocode}
\def\set@fusionadd@fiveh{%
      \if\@@tmpa 1\relax%
        \putratom{272}{-18}{\@@tmpb}%      % right type
      \else\if\@@tmpa 2\relax%
        \putratom{233}{60}{\@@tmpb}%       % right type
      \else\if\@@tmpa 3\relax%
        \putratom{120}{60}{\@@tmpb}%       % right type
      \else\if\@@tmpa 5\relax%
        \putratom{233}{-110}{\@@tmpb}%     % right type
      \else\if\@@tmpa 4\relax%
        \putratom{120}{-110}{\@@tmpb}%     % right type
      \else\if\@@tmpa 0\relax%
        \putratom{196}{-30}{\@@tmpb}%      % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@fiveh
      \fi\fi\fi\fi\fi\fi%
}% 
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@fiveh| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@fiveh}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@fiveh}}
% \changes{v5.00}{2010/10/01}{For bond coloring}
%    \begin{macrocode}
\def\set@fusion@fiveh{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
\if\@@tmpa E\relax%
        \putlratom{406}{0}{\@@tmpb}%         % bond fused
        \FuseWarning{103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E, J, or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e, j, or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D, K, or other}%
      \else\if\@@tmpa d\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d, k, or other}%
      \else\if\@@tmpa c\relax
        \iffusesw 
        \putlratom{303}{171}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `c'}%
        \fi
      \else\if\@@tmpa C\relax%
        \iffusesw 
        \putlratom{303}{-171}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `C'}%
        \fi
      \else\if\@@tmpa B\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B, K, or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b, k, or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A, I, or other}%
      \else\if\@@tmpa a\relax%
        \putlratom{406}{0}{\@@tmpb}%      % bond fused
        \FuseWarning{103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a, i, or other}%
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@fiveh
%    \end{macrocode}
% \end{macro}
%
% \subsection{Inverse horizontal type}
%
% The macro |\set@fusionadd@fivehi| is an inner command contained 
% in the definition of |\fiveheterohi| etc., where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusion@fivehi|. 
%
% \begin{macro}{\set@fusionadd@fivehi}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusionadd@fivehi}}
%    \begin{macrocode}
\def\set@fusionadd@fivehi{%
      \if\@@tmpa 1\relax%
        \putratom{-38}{282}{\@@tmpb}%      % right type
      \else\if\@@tmpa 2\relax%
        \putratom{60}{233}{\@@tmpb}%       % right type
      \else\if\@@tmpa 3\relax%
        \putratom{60}{120}{\@@tmpb}%       % right type
      \else\if\@@tmpa 4\relax%
        \putratom{-60}{120}{\@@tmpb}%      % right type
      \else\if\@@tmpa 5\relax%
        \putratom{-60}{233}{\@@tmpb}%      % right type
      \else\if\@@tmpa 0\relax%
        \putratom{140}{-30}{\@@tmpb}%      % right type
      \else
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
        \set@fusion@fivehi
      \fi\fi\fi\fi\fi\fi%
}% 
%    \end{macrocode}
% \end{macro}
%
% The inner command |\set@fusion@fivehi| is used for typesetting 
% a fused ring at each bond represented by |\@@tmpa|.  Warnings 
% concerning mismatched ring-fusions are based on the command 
% |\FuseWarning|. 
%
% \begin{macro}{\set@fusion@fivehi}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@fivehi}}
% \changes{v5.00}{2010/10/01}{For bond coloring}
%    \begin{macrocode}
\def\set@fusion@fivehi{%
% %%%%%%%%%%%%%%%%%%%%%
% % inner bond fusion %
% %%%%%%%%%%%%%%%%%%%%%
\if\@@tmpa d\relax%
        \putlratom{303}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d, k, or other}%
      \else\if\@@tmpa D\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D, K, or other}%
      \else\if\@@tmpa e\relax%
        \putlratom{103}{-171}{\@@tmpb}%     % bond fused
        \FuseWarning{103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e, j, or other}%
      \else\if\@@tmpa E\relax%
        \putlratom{0}{0}{\@@tmpb}%       % bond fused
        \FuseWarning{-103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E, J, or other}%
      \else\if\@@tmpa a\relax%
        \putlratom{0}{0}{\@@tmpb}%       % bond fused
        \FuseWarning{-103}{-171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a, i, or other}%
      \else\if\@@tmpa A\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{103}{171}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A, I, or other}%
      \else\if\@@tmpa b\relax%
        \putlratom{103}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{-200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b, k, or other}%
      \else\if\@@tmpa B\relax%
        \putlratom{303}{171}{\@@tmpb}%    % bond fused
        \FuseWarning{200}{0}%
          {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B, K, or other}%
      \else\if\@@tmpa c\relax
        \iffusesw 
        \putlratom{303}{171}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `c'}%
        \fi
      \else\if\@@tmpa C\relax%
        \iffusesw 
        \putlratom{303}{-171}{\@@tmpb}%      % right type
        \else
        \XyMTeXWarning{Not-used fusion at bond `C'}%
        \fi
      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@sixhi
%    \end{macrocode}
% \end{macro}
%
% \section{Ring-fusion Commands for Six-Five-fused Rings}
% \subsection{Normal vertical type}
%
% The macro |\set@fusion@nonav| is an inner command contained 
% in the definition of |\indanev| and |\nonaheterov|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixvi|. 
%
% \begin{macro}{\set@fusion@nonav}
%    \begin{macrocode}
\def\set@fusion@nonav{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa c\relax
        \XyMTeXWarning{Not-used fusion at bond `c'}%
  \else\if\@tmpa C\relax%
        \XyMTeXWarning{Not-used fusion at bond `C'}%
  \else\if\@tmpa d%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa E%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa f%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa F%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa g%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa G%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
  \else\if\@tmpa h%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
      \UnfavorableFusion{h}%
  \else\if\@tmpa H%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixvi}%
      \UnfavorableFusion{H}%
  \else\if\@tmpa i%
      \edef\@@tmpa{f}%
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{F}%
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{e}%
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
      \ForbiddenFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{E}%
      \Put@Direct(342,0){\set@fusionadd@sixvi}%
      \ForbiddenFusion{J}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@nonav
%    \end{macrocode}
% \end{macro}
%
% \subsection{Inverse vertical type}
%
% The macro |\set@fusion@nonavi| is an inner command contained 
% in the definition of |\indanevi| and |\nonaheterovi|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixv|. 
%
% \begin{macro}{\set@fusion@nonavi}
% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@nonavi}}
%    \begin{macrocode}
\def\set@fusion@nonavi{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(342,0){\set@fusionadd@sixv}%
  \else\if\@tmpa c\relax
        \XyMTeXWarning{Not-used fusion at bond `c'}%
  \else\if\@tmpa C\relax%
        \XyMTeXWarning{Not-used fusion at bond `C'}%
  \else\if\@tmpa d%
      \edef\@@tmpa{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{d}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa E%
      \edef\@@tmpa{D}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa f%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa F%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa g%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa G%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa h%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{h}%
  \else\if\@tmpa H%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{H}%
  \else\if\@tmpa i%
      \edef\@@tmpa{f}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{F}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{e}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{E}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \ForbiddenFusion{J}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@nonavi
%    \end{macrocode}
% \end{macro}
%
% \subsection{Normal horizontal type}
%
% The macro |\set@fusion@nonah| is an inner command contained 
% in the definition of |\nonaheteroh|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixhi|. 
%
% \begin{macro}{\set@fusion@nonah}
% \changes{v2.00}{1998/12/6}{New command: \cs{set@fusion@nonah}}
%    \begin{macrocode}
\def\set@fusion@nonah{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
  \else\if\@tmpa c\relax
        \XyMTeXWarning{Not-used fusion at bond `c'}%
  \else\if\@tmpa C\relax%
        \XyMTeXWarning{Not-used fusion at bond `C'}%
  \else\if\@tmpa d%
      \edef\@@tmpa{c}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{C}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{d}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
  \else\if\@tmpa E%
      \edef\@@tmpa{D}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
  \else\if\@tmpa f%
      \edef\@@tmpa{e}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
  \else\if\@tmpa F%
      \edef\@@tmpa{E}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
  \else\if\@tmpa g%
      \edef\@@tmpa{f}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
  \else\if\@tmpa G%
      \edef\@@tmpa{F}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
  \else\if\@tmpa h%
      \edef\@@tmpa{a}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
      \UnfavorableFusion{h}%
  \else\if\@tmpa H%
      \edef\@@tmpa{A}%
      \Put@Direct(0,-342){\set@fusionadd@sixhi}%
      \UnfavorableFusion{H}%
  \else\if\@tmpa i%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
      \ForbiddenFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixhi}%
      \ForbiddenFusion{J}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@nonah
%    \end{macrocode}
% \end{macro}
%
% \subsection{Inverse horizontal type}
%
% The macro |\set@fusion@nonahi| is an inner command contained 
% in the definition of |\indanehi| and |\nonaheterohi|, where   
% the macro is used for setting an additive 
% or a fused ring at each bond (designated by |\@@tmpa|).  The 
% fused ring is typeset by the inner command |\set@fusionadd@sixh|. 
%
% \begin{macro}{\set@fusion@nonahi}
% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@nonahi}}
%    \begin{macrocode}
\def\set@fusion@nonahi{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa A%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa b%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa B%
      \let\@@tmpa=\@tmpa
      \Put@Direct(0,0){\set@fusionadd@sixh}%
  \else\if\@tmpa c\relax
        \XyMTeXWarning{Not-used fusion at bond `c'}%
  \else\if\@tmpa C\relax%
        \XyMTeXWarning{Not-used fusion at bond `C'}%
  \else\if\@tmpa d%
      \edef\@@tmpa{c}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{d}%
  \else\if\@tmpa D%
      \edef\@@tmpa{C}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{D}%
  \else\if\@tmpa e%
      \edef\@@tmpa{d}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa E%
      \edef\@@tmpa{D}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa f%
      \edef\@@tmpa{e}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa F%
      \edef\@@tmpa{E}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa g%
      \edef\@@tmpa{f}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa G%
      \edef\@@tmpa{F}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
  \else\if\@tmpa h%
      \edef\@@tmpa{a}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{h}%
  \else\if\@tmpa H%
      \edef\@@tmpa{A}%
      \Put@Direct(0,-342){\set@fusionadd@sixh}%
      \UnfavorableFusion{H}%
  \else\if\@tmpa i%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \UnfavorableFusion{i}%
  \else\if\@tmpa I%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \UnfavorableFusion{I}%
  \else\if\@tmpa j%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \ForbiddenFusion{j}%
  \else\if\@tmpa J%
      \edef\@@tmpa{E}%
      \Put@Direct(0,0){\set@fusionadd@sixh}%
      \ForbiddenFusion{J}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@nonahi
%    \end{macrocode}
% \end{macro}
%
% \subsection{Truncation for two or more atoms}
%
% The macros |SetTwoAtoms| and |SetTwoAtomx| are user commands for 
% truncating a vertex to accommodate two or more atoms.
%
% \begin{macro}{SetTwoAtoms}
% \changes{v5.01}{2013/03/22}{New command: \cs{SetTwoAtoms}}
%    \begin{macrocode}
\def\SetTwoAtoms#1{\setbox0=\hbox{#1}%
{\white \rule{\wd0}{\ht0}}\kern-\wd0{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{SetTwoAtomx}
% \changes{v5.01}{2013/04/06}{New command: \cs{SetTwoAtomx}}
%    \begin{macrocode}
\def\SetTwoAtomx#1{{\setbox0=\hbox{#1}%
\@tempdimd=\wd0 \advance\@tempdimd by8\unitlength%
\@tempdime=\ht0 \advance\@tempdime by8\unitlength%
\kern-4\unitlength{\white \rule[-4\unitlength]{\@tempdimd}{\@tempdime}}%
\kern-\@tempdimd{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Original Setting}
%
% \begin{macro}{originalsetting}
%    \begin{macrocode}
\originalpicture%initial setting
%</chemstr>
%    \end{macrocode}
% \end{macro}
%
% \Finale
%
\endinput
