% \iffalse meta-comment
%% File: carom.dtx
%
%  Copyright 1993,1996,1998,2000,2001,2002, 2004 by Shinsaku Fujita
%
%  This file is part of XyMTeX system.
%  -------------------------------------
%
% This file is a successor to:
%
% carom.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 xymtx-pdf.dtx and xymtx-pdf.ins
% and the derived file xymtx-pdf.sty.
%
% Please report any bugs, comments, suggestions, etc. to:
%   Shinsaku Fujita, 
%   Department of Chemistry and Materials Technology,
%   Kyoto Institute of Technology,
%   Matsugasaki, Sakyoku, Kyoto, 606, Japan
%
% New address:
%   Shinsaku Fujita, 
%   Department of Chemistry and Materials Technology, 
%   Kyoto Institute of Technology, \\
%   Matsugasaki, Sakyoku, Kyoto, 606 Japan
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{August 16, 1996}
% \def\versi@nno{ver1.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{December 01, 1993}
% \def\versi@nno{ver1.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{August 16, 1996}
% \def\versi@nno{ver1.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{October 31, 1998}
% \def\versi@nno{ver1.02}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{December 25, 1998}
% \def\versi@nno{ver2.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{June 14, 2000}
% \def\versi@nno{ver2.00a}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{June 20, 2001}
% \def\versi@nno{ver2.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{April 30, 2002}
% \def\versi@nno{ver3.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{May 30, 2002}
% \def\versi@nno{ver4.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{carom}
% \def\versi@ndate{August 30, 2004}
% \def\versi@nno{ver4.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \fi
%
% \CheckSum{2982}
%% \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/08/16}{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.00a}{2000/06/14}{bug fix}
% \changes{v2.01}{2001/06/30}{Size reduction}
% \changes{v3.00}{2002/04/30}{sfpicture enviromnent etc.}
% \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv}
% \changes{v4.01}{2002/08/30}{Minor additions}
% \changes{v5.00}{2010/10/01}{the LaTeX Project Public License}
% \fi
%
% \iffalse
%<*driver>
\NeedsTeXFormat{pLaTeX2e}
% \fi
\ProvidesFile{carom.dtx}[2010/10/01 v5.00 XyMTeX{} package file]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{carom.dtx}
%
% %%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}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Drawing carbocyclic compounds by {\sffamily carom.sty} 
(\fileversion) of \XyMTeX{}}
\author{Shinsaku Fujita \\ 
Shonan Institute of Chemoinformatics Mathematical Chemistry, \\
Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, 
Kanagawa-Ken, 258-0019 Japan 
% % (old address)
% %Department of Chemistry and Materials Technology, \\
% %Kyoto Institute of Technology, \\
% %Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
% % (old address)
% % Ashigara Research Laboratories, 
% % Fuji Photo Film Co., Ltd., \\ 
% % Minami-Ashigara, Kanagawa, 250-01 Japan
}
\date{\filedate}
%
\begin{document}
   \maketitle
   \DocInput{carom.dtx}
\end{document}
%</driver>
% \fi
%
% \section{Introduction}\label{carom:intro}
%
% \subsection{Options for {\sffamily docstrip}}
%
% \DeleteShortVerb{\|}
% \begin{center}
% \begin{tabular}{|l|l|}
% \hline
% \emph{option} & \emph{function}\\ \hline
% carom & carom.sty \\
% driver & driver for this dtx file \\
% \hline
% \end{tabular}
% \end{center}
% \MakeShortVerb{\|}
%
% \subsection{Version Information}
%
%    \begin{macrocode}
%<*carom>
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.00}
\typeout{       -- Released October 01, 2010 by Shinsaku Fujita}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{carom}
\def\versi@ndate{October 01, 2010}
\def\versi@nno{ver5.00}
\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 carom.sty}
%
% \begin{verbatim}
% *******************************
% * carom.sty: list of commands *
% *******************************
%
%   <VERTICAL TYPE>
%
%     \cyclohexanev               \@cyclohexanev
%     \bzdrv                      \@bzdrv
%     \decalinev                  \@decalinev
%     \decalinevb                 \@decalinevb
%     \decalinevt                 \@decalinevt
%     \naphdrv                    \@naphdrv
%     \naphdrvb                   \@naphdrvb
%     \naphdrvt                   \@naphdrvt
%     \tetralinev                 \@tetralinev
%     \tetralinevb                \@tetralinevb
%     \tetralinevt                \@tetralinevt
%     \hanthracenev               \@hanthracenev
%     \anthracenev                \@anthracenev
%     \hphenanthrenev             \@hphenanthrenev
%     \phenanthrenev              \@phenanthrenev
%     \steroid                    \@steroid
%     \steroidchain               \@steroidchain
% \end{verbatim}
%
% \begin{verbatim}
%   <HORIZONTAL TYPE>
%
%     \cyclohexaneh               \@cyclohexaneh
%     \bzdrh                      \@bzdrh
%     \decalineh                  \@decalineh
%     \naphdrh                    \@naphdrh
%     \tetralineh                 \@tetralineh
%
% \end{verbatim}
%
% \section{Input of basic macros}
%
% To assure the compatibility to \LaTeX{}2.09 (the native mode), 
% the commands added by \LaTeXe{} have not been used in the resulting sty 
% files ({\sf carom.sty} for the present case).  Hence, the combination 
% of |\input| and |\@ifundefined| is used to crossload sty 
% files ({\sf chemstr.sty} for the present case) in place of the 
% |\RequirePackage| command of \LaTeXe{}. 
%    \begin{macrocode}
% *************************
% * input of basic macros *
% *************************
\@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
\@ifundefined{decaheterov}{\input hetarom.sty\relax}{}
\@ifundefined{decaheteroh}{\input hetaromh.sty\relax}{}
\unitlength=0.1pt
%    \end{macrocode}
%
% \section{Cyclohexane derivatives}
% \subsection{Vertical cyclohexanes}
%
% The macro |\cyclohexanev| is used for drawing cyclohexane derivatives 
% of vertical type.  The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\setsixringv|. 
% 
% \begin{verbatim}
% ***************************
% * cyclohexane derivatives *
% *  (vertical type)        *
% ***************************
% The following numbering is adopted in this macro. 
%
%          1
%          *  
%     6  *   *  2
%       |     |
%       |     |
%     5  *   *  3
%          *
%          4 <===== the original point
%
% \end{verbatim}
%
% The macro |\cyclohexanev| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.  
% \begin{verbatim}
%   \cyclohexanev[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to f as well as A, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. 
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none       :  cyclohexane
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  4,3-double bond
%           d          :  4,5-double bond
%           e          :  5,6-double bond
%           f          :  6,1-double bond
%           A          :  aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specifed) 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}
%
% \begin{verbatim}
%       e.g. 
%        
%        \cyclohexanev{1==Cl;2==F}
%        \cyclohexanev[c]{1==Cl;4==F;2==CH$_{3}$}
%        \cyclohexanev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
% \end{verbatim}
%
% \begin{macro}{\cyclohexanev}
%    \begin{macrocode}
\def\cyclohexanev{\@ifnextchar[{\@cyclohexanev[@}{\@cyclohexanev[@]}}
\def\@cyclohexanev[#1]#2{\sixheterov[#1]{}{#2}}
%    \end{macrocode}
% \end{macro}
%
% The following definition has been deleted. 
%
% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{@ylsw},
% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/11/23}{Adding \cs{set@fusionadd@sixv}}
% \changes{v3.00}{2002/04/30}{\cs{cyclohexanev}: Old definition deleted.}
%
% \subsection{Horizontal cyclohexanes}
%
% The macro |cyclohexaneh| is used for drawing cyclohexane derivatives 
% of vertical type.  The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\setsixringh|. 
% 
% \begin{verbatim}
% ***************************
% * cyclohexane derivatives *
% *  (horizontal type)      *
% ***************************
% The following numbering is adopted in this macro. 
%
%                                2      3
%                                 -----
%                               *       *
%   the original point ===> 1 *           * 4
%          (0,0)                *       *
%                                 -----
%                                6      5
% \end{verbatim}
%
% The macro |\cyclohexaneh| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.  
%
% \begin{verbatim}
%   \cyclohexaneh[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to f as well as A, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. 
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none       :  cyclohexane
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  4,3-double bond
%           d          :  4,5-double bond
%           e          :  5,6-double bond
%           f          :  6,1-double bond
%           A          :  aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specifed) 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}
%
% \begin{verbatim}
%       e.g. 
%        
%        \cyclohexaneh{1==Cl;2==F}
%        \cyclohexaneh[c]{1==Cl;4==F;2==CH$_{3}$}
%        \cyclohexaneh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
% \end{verbatim}
%
% \changes{v2.00a}{2000/06/14}{bug fix: changed letter [r] to [@] 
% in \cs{cycohexaneh} for horizontal cyclohexanes}
%
% \begin{macro}{\cyclohexaneh}
%    \begin{macrocode}
\def\cyclohexaneh{\@ifnextchar[{\@cyclohexaneh[@}{\@cyclohexaneh[@]}}
\def\@cyclohexaneh[#1]#2{\sixheteroh[#1]{}{#2}}
%    \end{macrocode}
% \end{macro}
%
% The following definition has been deleted. 
%
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw},
% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, 
% \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/11/29}{Adding \cs{set@fusionadd@sixv} for 
% fused rings}
% \changes{v3.00}{2002/04/30}{\cs{cyclohexaneh}: Old definition deleted.}
%
% \section{Benzene and benzoquinone derivatives}
% \subsection{Vertical type}
%
% The macro |\bzdrv| (|\benzenev|) is used for drawing benzene derivatives 
% of vertical type as well as benzoquinone derivatives of 
% vertical type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\cyclohexanev| defined above. 
% 
% The macro |\bzdrv| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \changes{v3.00}{2002/04/30}{\cs{benzenev} added}
%
% \begin{verbatim}
% ****************************************
% * benzene and benzoquinone derivatives *
% *  (vertical type)                     *
% ****************************************
%
%   \bzdrv[OPT]{SUBSLIST}
%   \benzenev[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one character (r, l or c) for designate
% aromatic bond patterns or two characters (p? or o?) for quinone 
% bond patterns. 
%
% \begin{verbatim}
%
%     OPT: (bond pattern)
%
%           none  or r :  right-handed set of double bonds 
%           l          :  left-handed set of double bonds 
%           c          :  aromatic circle
%
%           p or pa    :  p-quinone (A)
%           pb         :  p-quinone (B)
%           pc         :  p-quinone (C)
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        \bzdrv{1==Cl;2==F}
%        \bzdrv[c]{1==Cl;4==F;2==CH$_{3}$}
%        \bzdrv[pa]{1D==O;4D==O;2==CH$_{3}$}
% \end{verbatim}
%
% \begin{macro}{\bzdrv}
% \begin{macro}{\benzenev}
%    \begin{macrocode}
\def\bzdrv{\@ifnextchar[{\@bzdrv}{\@bzdrv[r]}}
\def\@bzdrv[#1]#2{%
\iforigpt \typeout{command `bzdrv' is based on `cyclohexanev'.}\fi%
%\expandafter\twoch@r#1{}%
\expandafter\twoCH@R#1//%
\if\@tmpa r% right-handed set of double bonds
 \ifx\@tmpb\empty
  \cyclohexanev[bdf]{#2}%
 \fi
\else\if\@tmpa l%left-handed set of double bonds
 \ifx\@tmpb\empty
  \cyclohexanev[ace]{#2}%
 \fi
\else\if\@tmpa c%aromatic circle
 \ifx\@tmpb\empty
  \cyclohexanev[A]{#2}%
 \fi
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \cyclohexanev[be]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \cyclohexanev[be]{#2}%
 \else\if\@tmpb b% (B)
  \cyclohexanev[cf]{#2}%
 \else\if\@tmpb c% (C)
  \cyclohexanev[ad]{#2}%
 \fi\fi\fi\fi%
\else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
   \cyclohexanev[ce]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \cyclohexanev[ce]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \cyclohexanev[df]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \cyclohexanev[ae]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \cyclohexanev[bf]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \cyclohexanev[ac]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \cyclohexanev[bd]{#2}%
  \fi\fi\fi\fi\fi\fi\fi%
\else% added 1998/11/15 by S. Fujita
   \cyclohexanev[@#1]{#2}%
\fi\fi\fi\fi\fi%
}%               %end of \bzdrv macro
\let\benzenev=\bzdrv
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Horizontal type}
%
% The macro |\bzdrh| (|\benzeneh|) is used for drawing benzene derivatives 
% of vertical type as well as benzoquinone derivatives of 
% vertical type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\cyclohexanev| defined above. 
% 
% The macro |\bzdrh| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \changes{v3.00}{2002/04/30}{\cs{benzeneh} added}
%
% \begin{verbatim}
% ****************************************
% * benzene and benzoquinone derivatives *
% *  (horizontal type)                   *
% ****************************************
%
%   \bzdrh[OPT]{SUBSLIST}
%   \benzeneh[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one character (r, l or c) for designate
% aromatic bond patterns or two characters (p? or o?) for quinone 
% bond patterns. 
%
% \begin{verbatim}
%
%     OPT: (bond pattern)
%
%           none  or r :  right-handed set of double bonds 
%           l          :  left-handed set of double bonds 
%           c          :  aromatic circle
%
%           p or pa    :  p-quinone (A)
%           pb         :  p-quinone (B)
%           pc         :  p-quinone (C)
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 6 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%
%       e.g. 
%        \bzdrh{1==Cl;2==F}
%        \bzdrh[c]{1==Cl;4==F;2==CH$_{3}$}
%        \bzdrh[pa]{1D==O;4D==O;2==CH$_{3}$}
%
% \end{verbatim}
%
% \begin{macro}{\bzdrh}
% \begin{macro}{\benzeneh}
%    \begin{macrocode}
\def\bzdrh{\@ifnextchar[{\@bzdrh}{\@bzdrh[r]}}
\def\@bzdrh[#1]#2{%
\iforigpt \typeout{command `bzdrh' is based on `cyclohexaneh'.}\fi%
%\expandafter\twoch@r#1{}%
\expandafter\twoCH@R#1//%
%\begin{sfpicture}(800,880)(-\noshift,-\noshift)
\if\@tmpa r% right-handed set of double bonds
  \cyclohexaneh[bdf]{#2}%
\else\if\@tmpa l%left-handed set of double bonds
  \cyclohexaneh[ace]{#2}%
\else\if\@tmpa c%aromatic circle
  \cyclohexaneh[A]{#2}%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \cyclohexaneh[be]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \cyclohexaneh[be]{#2}%
 \else\if\@tmpb b% (B)
  \cyclohexaneh[cf]{#2}%
 \else\if\@tmpb c% (C)
  \cyclohexaneh[ad]{#2}%
 \fi\fi\fi\fi%
\else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
   \cyclohexaneh[ce]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \cyclohexaneh[ce]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \cyclohexaneh[df]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \cyclohexaneh[ae]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \cyclohexaneh[bf]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \cyclohexaneh[ac]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \cyclohexaneh[bd]{#2}%
  \fi\fi\fi\fi\fi\fi\fi%
\else% added 1998/11/15 by S. Fujita
   \cyclohexaneh[@#1]{#2}%
\fi\fi\fi\fi\fi%
%\end{sfpicture}
}%               %end of \bzdrh macro
\let\benzeneh=\bzdrh
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \section{Decaline derivatives}
% \subsection{Vertical type}
%
% The macro |\decalinev| is used for drawing decaline derivatives 
% of vertical type.  The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\setdecaringv|. 
% 
% \begin{verbatim}
% ************************
% * decaline derivatives *
% *  (vertical type)     *
% ************************
% The following numbering is adopted in this macro. 
%
%          8 (0G)1
%          *  8a *
%     7  *   * *   *  2
%       |     |     |
%       |     |     |
%     6  *   * *   *  3
%          *  4a *
%          5 (0F)4
%          ^
%          |
%          the original point
% \end{verbatim}
%
% The macro |\decalinev| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.
%
% \begin{verbatim}
%   \decalinev[BONDLIST]{SUBSLIST}
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to k, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A or B indicates aromatic bond patterns (circles). 
% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none       :  decaline
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  5,4a-double bond
%           f          :  5,6-double bond
%           g          :  6,7-double bond
%           h          :  8,7-double bond
%           i          :  8,8a-double bond
%           j          :  1,8a-double bond
%           k          :  4a,8a-double bond
%           K          :  4a,8a-double bond in the other ring
%           A          :  left aromatic circle 
%           B          :  right aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%
%           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 
%
%        for 0 (fused positions)
%
%           0FA        :  alpha single bond at 8a 
%           0FB        :  beta single bond at 8a
%           0FU        :  unspecified single bond at 8a
%           0GA        :  alpha single bond at 4a 
%           0GB        :  beta single bond at 4a
%           0GU        :  unspecified single bond at 4a
% \end{verbatim}
%
% \begin{verbatim}
%
%       e.g. 
%        
%        \decalinev{1==Cl;2==F;0FA==;0GA==}
%        \decalinev[c]{1==Cl;4==F;2==CH$_{3}$}
%        \decalinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
% \end{verbatim}
%
% The macro |\decalinev| has been changed into a subsidiary macro 
% of |\decaheterov| (version 2.00). 
%
% \begin{macro}{\decalinev}
%    \begin{macrocode}
\def\decalinev{\@ifnextchar[{\@decalinev[@}{\@decalinev[@]}}
\def\@decalinev[#1]#2{%
\iforigpt \typeout{command `decalinev' is based on `decaheterov'.}\fi%
\decaheterov[#1]{}{#2}}
%    \end{macrocode}
% \end{macro}
% 
% The following definition has been stopped using. 
% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/5}{Add: fused rings}
% \changes{v3.00}{2002/04/30}{\cs{decalinev}: Old definition deleted.}
%
% \subsection{Vertical-bottom type}
%
% The macro |\decalinevb| is used for drawing decaline derivatives 
% of vertical-bottom type (numbering from the bottom to the left-upper part). 
% The word ``vertical'' means that each benzene ring is a vertical type.  
% The word ``bottom'' means that the benzene ring with young locant numbers 
% is located at the bottom. 
% The skeleton and endocyclic double bonds are drawn directly, 
% while substituents and exocyclic bonds are placed by useing 
% the inner macro |\setsixringv|. 
% \changes{v1.02}{1998/10/13}{Newly added command}
% 
% \begin{verbatim}
% ***************************
% * decaline derivatives    *
% *  (vertical bottom type) *
% ***************************
% The following numbering is adopted in this macro. 
%
%          7 
%          *  
%     6  *   * 8
%       |     |
%       |     | 0G (4a)
%     5  *   * *
%  0F(4a)  *     * 1
%          |     |
%          |     |
%        4  *   *  2
%             *
%             3
%             ^
%             |
%            the original point
% \end{verbatim}
%
% The macro |\decalinevb| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.
%
% \begin{verbatim}
%   \decalinevb[BONDLIST]{SUBSLIST}
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to k, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A or B indicates aromatic bond patterns (circles). 
% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none       :  decaline
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  5,4a-double bond
%           f          :  5,6-double bond
%           g          :  6,7-double bond
%           h          :  8,7-double bond
%           i          :  8,8a-double bond
%           j          :  1,8a-double bond
%           k          :  4a,8a-double bond
%           K          :  4a,8a-double bond in the other ring
%           A          :  left aromatic circle 
%           B          :  right aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for 0 (fused positions)
%
%           0FA        :  alpha single bond at 8a 
%           0FB        :  beta single bond at 8a
%           0FU        :  unspecified single bond at 8a
%           0GA        :  alpha single bond at 4a 
%           0GB        :  beta single bond at 4a
%           0GU        :  unspecified single bond at 4a
% \end{verbatim}
%
% \begin{verbatim}
%
%       e.g. 
%        
%        \decalinevb{1==Cl;2==F;0FA==;0GA==}
%        \decalinevb[c]{1==Cl;4==F;2==CH$_{3}$}
%        \decalinevb[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
% \end{verbatim}
%
% The macro |\decalinevb| has been changed into a subsidiary macro 
% of |\decaheterovb| (version 2.00). 
%
% \begin{macro}{\decalinevb}
%    \begin{macrocode}
\def\decalinevb{\@ifnextchar[{\@decalinevb[@}{\@decalinevb[@]}}
\def\@decalinevb[#1]#2{%
\iforigpt \typeout{command `decalinevb' is based on `decaheterovb'.}\fi%
\decaheterovb[#1]{}{#2}}
%    \end{macrocode}
% \end{macro}
%
% The following old definition has been stopped using. 
% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/25}{Add: Fused rings}
% \changes{v3.00}{2002/04/30}{\cs{decalinevb}: Old definition deleted.}
%
% \subsection{Vertical-top type}
%
% The macro |\decalinevt| is used for drawing decaline derivatives 
% of vertical-bottom type (numbering from the top to the left-down part). 
% The word ``vertical'' means that each benzene ring is a vertical type.  
% The word ``top'' means that the benzene ring with young locant numbers 
% is located at the top. 
% The skeleton and endocyclic double bonds are drawn directly, 
% while substituents and exocyclic bonds are placed by useing 
% the inner macro |\setsixringv|. 
% \changes{v1.02}{1998/10/13}{Newly added command}
% 
% \begin{verbatim}
% ************************
% * decaline derivatives *
% *  (vertical-top type) *
% ************************
% The following numbering is adopted in this macro. 
%
%                     2
%                     *  
%                1  *   * 3
%                  |     |
%                  |     | 
%         0G (8a)   *   * 4
%             8   *   * 0F(4a)
%                |     | 
%                |     |
%              7  *   *  5
%                   *
%                   6
%                   ^
%                   |
%                   the original point
% \end{verbatim}
%
% The macro |\decalinevt| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.
%
% \begin{verbatim}
%   \decalinevt[BONDLIST]{SUBSLIST}
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to k, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A or B indicates aromatic bond patterns (circles). 
% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none       :  decaline
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  5,4a-double bond
%           f          :  5,6-double bond
%           g          :  6,7-double bond
%           h          :  8,7-double bond
%           i          :  8,8a-double bond
%           j          :  1,8a-double bond
%           k          :  4a,8a-double bond
%           K          :  4a,8a-double bond in the other ring
%           A          :  left aromatic circle 
%           B          :  right aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for 0 (fused positions)
%
%           0FA        :  alpha single bond at 8a 
%           0FB        :  beta single bond at 8a
%           0FU        :  unspecified single bond at 8a
%           0GA        :  alpha single bond at 4a 
%           0GB        :  beta single bond at 4a
%           0GU        :  unspecified single bond at 4a
% \end{verbatim}
%
% \begin{verbatim}
%
%       e.g. 
%        
%        \decalinevt{1==Cl;2==F;0FA==;0GA==}
%        \decalinevt[c]{1==Cl;4==F;2==CH$_{3}$}
%        \decalinevt[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
%
% \end{verbatim}
%
% The macro |\decalinevt| has been changed into a subsidiary macro 
% of |\decaheterovt| (version 2.00). 
%
% \begin{macro}{\decalinevt}
%    \begin{macrocode}
\def\decalinevt{\@ifnextchar[{\@decalinevt[@}{\@decalinevt[@]}}
\def\@decalinevt[#1]#2{%
\iforigpt \typeout{command `decalinevt' is based on `decaheterovt'.}\fi%
\decaheterovt[#1]{}{#2}}
%    \end{macrocode}
% \end{macro}
%
% The following old definition has been stopped using. 
% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw},
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/5}{Add: fused rings}
% \changes{v3.00}{2002/04/30}{\cs{decalinevt}: Old definition deleted.}
%
% \subsection{Horizontal type}
%
% The macro |\decalineh| is used for drawing decaline derivatives 
% of vertical type.  The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macros |\setsixringh| and |\setfusedbond|. 
% 
% \begin{verbatim}
% ************************
% * decaline derivatives *
% *  (horizontal type)   *
% ************************
% The following numbering is adopted in this macro. 
%
%                                2      3
%                                 -----
%                               *       *
%                           1  *          * 4
%                               *       *
%                        8a (0G)  -----  4a (0F)
%                               *       *
%   the original point ===> 8 *           * 5
%          (0,0)                *       *
%                                 -----
%                                7      6
% \end{verbatim}
%
% The macro |\decalineh| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.
%
% \begin{verbatim}
%   \decalineh[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to k, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A or B indicates aromatic bond patterns (circles). 
% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
%
% \begin{verbatim}
%
%     BONDLIST = 
%
%           none       :  decaline
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  5,4a-double bond
%           f          :  5,6-double bond
%           g          :  6,7-double bond
%           h          :  8,7-double bond
%           i          :  8,8a-double bond
%           j          :  1,8a-double bond
%           k          :  4a,8a-double bond
%           K          :  4a,8a-double bond in the other ring
%           A          :  left aromatic circle 
%           B          :  right aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for 0 (fused positions)
%
%           0FA        :  alpha single bond at 8a 
%           0FB        :  beta single bond at 8a
%           0FU        :  unspecified single bond at 8a
%           0GA        :  alpha single bond at 4a 
%           0GB        :  beta single bond at 4a
%           0GU        :  unspecified single bond at 4a
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \decalineh{1==Cl;2==F;0FA==;0GA==}
%        \decalineh[c]{1==Cl;4==F;2==CH$_{3}$}
%        \decalineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% The macro |\decalineh| has been changed into a subsidiary macro 
% of |\decaheteroh| (version 2.00). 
%
% \begin{macro}{\decalineh}
%    \begin{macrocode}
\def\decalineh{\@ifnextchar[{\@decalineh[@}{\@decalineh[@]}}
\def\@decalineh[#1]#2{%
\iforigpt \typeout{command `decalineh' is based on `decaheteroh'.}\fi%
\decaheteroh[#1]{}{#2}}
%    \end{macrocode}
% \end{macro}
%
% The following old definition has been stopped using. 
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/11/30}{Add: fused rings}
% \changes{v3.00}{2002/04/30}{\cs{decalineh}: Old definition deleted.}
%
% \section{Naphthalene and naphtoquinone derivatives}
% \subsection{Vertical type}
%
% The macro |\naphdrv| (|\naphthalenev|) is used for drawing 
% naphthalene derivatives 
% of vertical type as well as naphthoquinone derivatives of 
% vertical type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalinev|. 
% 
% The macro |\naphdrv| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \changes{v3.00}{2002/04/30}{\cs{naphthalenev} added}
%
% \begin{verbatim}
% **********************************************
% * naphthalene and naphthoquinone derivatives *
% *  (vertical type)                           *
% **********************************************
%
%   \naphdrv[OPT]{SUBSLIST}
%   \naphthalenev[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one or two characters.  
%
% The character `A' is used for designating an aromatic bond pattern, in 
% which each of the six-membered rings has a central circle. 
%
% \begin{verbatim}
%     OPT (bond pattern)
%
%           none       :  naphthalene
%           A          :  aromatic circle
% \end{verbatim}
%
% One character `p' or two characters (p?) in the |OPT| argument 
% designate a p-quinone nucleus, which is present in the 
% right-hand ring for the case of `p' or `pa' and in the 
% left-hand ring for the case of `pb'.  
%
% \begin{verbatim}
%           p or pa    :  1,4-quinone (A) left aromatic, right quinone
%           pb         :  1,4-quinone (B) right aromatic, left quinone
% \end{verbatim}
%
% One character `o' or two characters (o?) in the |OPT| argument 
% designate an o-quinone nucleus in either side of the fused ring. 
% The second character of each argument indicates one of the possible 
% type of bond patterns. 
%
% \begin{verbatim}
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
% \end{verbatim}
%
% One character `q' or two characters (q?) in the |OPT| argument 
% designate an 2,6-, 1,5- or 1,7-quinone nucleus. 
% The second character of each argument indicates one of the possible 
% type of bond patterns. 
%
% \begin{verbatim}
%
%           q or qa    :  2,6-quinone (A)
%           qb         :  2,6-quinone (B)  3,7
%           qc         :  1,5-quinone (C)
%           qd         :  1,5-quinone (D)  4,8
%           qe         :  1,7-quinone (E)
%           qf         :  1,7-quinone (F)  2,8
%           qg         :  1,7-quinone (G)  4,6
%           qh         :  1,7-quinone (H)  3,5
% \end{verbatim}
%
% One character `P' or two characters (P?) in the |OPT| argument 
% designate a 1,4,5,8- or 1,2,5,8-quinone nucleus. 
%
% \begin{verbatim}
%
%           P or Pa    :  1,4,5,8-quinone (A)
%           Pb         :  1,2,5,8-quinone (B)
% \end{verbatim}
%
% One character `Q' or `O' or two characters (O?) in the |OPT| argument 
% designate quinone nuclei of remaining types. 
%
% \begin{verbatim}
%           Q          :  1,2,3,4-quinone
%
%           O or Oa    :  1,2,5,6-quinone (A)
%           Ob         :  1,2,7,8-quinone (B)
%           Oc         :  1,2,3,5-quinone (C)
%           Od         :  1,2,3,7-quinone (D)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        \naphdrv{1==Cl;2==F}
%        \naphdrv[A]{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
%
% \begin{macro}{\naphdrv}
% \begin{macro}{\naphthalenev}
%    \begin{macrocode}
\def\naphdrv{\@ifnextchar[{\@naphdrv}{\@naphdrv[r]}}
\def\@naphdrv[#1]#2{%
\iforigpt \typeout{command `naphdrv' is based on `decalinev'.}\fi%
 \expandafter\threech@r#1{}{}%
\if\@tmpa r% right-handed set of double bonds
  \decalinev[acfhk]{#2}%
\else\if\@tmpa A%aromatic circle
  \decalinev[AB]{#2}%
%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \decalinev[bfhk]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \decalinev[bfhk]{#2}%
 \else\if\@tmpb b% (B)
  \decalinev[acgk]{#2}%
 \fi\fi\fi%
\else%
 \if\@tmpa o%o-quinone
  \if\@tmpb a% (A)
   \decalinev[cfhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \decalinev[cfhk]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \decalinev[dfhj]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \decalinev[afhk]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \decalinev[achk]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \decalinev[acei]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \decalinev[acfk]{#2}%
  \fi\fi\fi\fi\fi\fi%
  \fi%
%%%
\else\if\@tmpa q%various quinone
  \if\@tmpb a% (A)2,6-type
   \decalinev[cehj]{#2}%
  \else\ifx\@tmpb\empty% (A)2,6-type
   \decalinev[cehj]{#2}%
  \else\if\@tmpb b%2,6-quinone (B)
   \decalinev[adfi]{#2}%
  \else\if\@tmpb c%1,5-quinone (C)
   \decalinev[bdgi]{#2}%
  \else\if\@tmpb d%1,5-quinone (D)
   \decalinev[begj]{#2}%
  \else\if\@tmpb e%1,7-quinone (E)
   \decalinev[bdfi]{#2}%
  \else\if\@tmpb f%1,7-quinone (F)
   \decalinev[cegj]{#2}%
  \else\if\@tmpb g%1,7-quinone (G)
   \decalinev[behj]{#2}%
  \else\if\@tmpb h%1,7-quinone (H)
   \decalinev[adgi]{#2}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if\@tmpa P%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,4,5,8-type
   \decalinev[bgk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,4,5,8-type
   \decalinev[bgk]{#2}%
  \else\if\@tmpb b% (B)1,2,5,8-type
   \decalinev[cgk]{#2}%
  \fi\fi\fi%
\else\if\@tmpa Q%1,2,3,4
   \decalinev[fhk]{#2}%
\else\if\@tmpa O%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,2,5,6-type
   \decalinev[chk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,2,5,6-type
   \decalinev[chk]{#2}%
  \else\if\@tmpb b% (B)1,2,7,8-type
   \decalinev[cfk]{#2}%
  \else\if\@tmpb c% (C)1,2,3,5-type
   \decalinev[dgi]{#2}%
  \else\if\@tmpb d% (D)1,2,3,7-type
   \decalinev[dfi]{#2}%
  \fi\fi\fi\fi\fi%
\else% added 1998/11/23 by S. Fujita
   \decalinev[@#1]{#2}%
\fi\fi\fi\fi\fi\fi\fi\fi%
}%               %end of \naphdrv macro
\let\naphthalenev=\naphdrv
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Vertical-bottom type}
%
% The macro |\naphdrvb| (|\naphthalenevb|) is used for drawing 
% naphthalene derivatives 
% of vertical-bottom type as well as naphthoquinone derivatives of 
% vertical-bottom type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalinevb|. 
% \changes{v1.02}{1998/10/14}{Newly added command}
% 
% The macro |\naphdrvb| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \changes{v3.00}{2002/04/30}{\cs{naphthalenevb} added}
%
% \begin{verbatim}
% **********************************************
% * naphthalene and naphthoquinone derivatives *
% *  (vertical-bottom type)                    *
% **********************************************
%
%   \naphdrvb[OPT]{SUBSLIST}
%   \naphthalenevb[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one or two characters.  
%
% The character `A' is used for designating an aromatic bond pattern, in 
% which each of the six-membered rings has a central circle. 
%
% \begin{verbatim}
%     OPT (bond pattern)
%
%           none       :  naphthalene
%           A          :  aromatic circle
% \end{verbatim}
%
% One character `p' or two characters (p?) in the |OPT| argument 
% designate a p-quinone nucleus, which is present in the 
% right-hand ring for the case of `p' or `pa' and in the 
% left-hand ring for the case of `pb'.  
%
% \begin{verbatim}
%           p or pa    :  1,4-quinone (A) left aromatic, right quinone
%           pb         :  1,4-quinone (B) right aromatic, left quinone
% \end{verbatim}
%
% One character `o' or two characters (o?) in the |OPT| argument 
% designate an o-quinone nucleus in either side of the fused ring. 
% The second character of each argument indicates one of the possible 
% type of bond patterns. 
%
% \begin{verbatim}
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
% \end{verbatim}
%
% One character `q' or two characters (q?) in the |OPT| argument 
% designate an 2,6-, 1,5- or 1,7-quinone nucleus. 
% The second character of each argument indicates one of the possible 
% type of bond patterns. 
%
% \begin{verbatim}
%
%           q or qa    :  2,6-quinone (A)
%           qb         :  2,6-quinone (B)  3,7
%           qc         :  1,5-quinone (C)
%           qd         :  1,5-quinone (D)  4,8
%           qe         :  1,7-quinone (E)
%           qf         :  1,7-quinone (F)  2,8
%           qg         :  1,7-quinone (G)  4,6
%           qh         :  1,7-quinone (H)  3,5
% \end{verbatim}
%
% One character `P' or two characters (P?) in the |OPT| argument 
% designate a 1,4,5,8- or 1,2,5,8-quinone nucleus. 
%
% \begin{verbatim}
%
%           P or Pa    :  1,4,5,8-quinone (A)
%           Pb         :  1,2,5,8-quinone (B)
% \end{verbatim}
%
% One character `Q' or `O' or two characters (O?) in the |OPT| argument 
% designate quinone nuclei of remaining types. 
%
% \begin{verbatim}
%           Q          :  1,2,3,4-quinone
%
%           O or Oa    :  1,2,5,6-quinone (A)
%           Ob         :  1,2,7,8-quinone (B)
%           Oc         :  1,2,3,5-quinone (C)
%           Od         :  1,2,3,7-quinone (D)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        \naphdrvb{1==Cl;2==F}
%        \naphdrvb[A]{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
%
% \begin{macro}{\naphdrvb}
% \begin{macro}{\napphathaleneb}
%    \begin{macrocode}
\def\naphdrvb{\@ifnextchar[{\@naphdrvb}{\@naphdrvb[r]}}
\def\@naphdrvb[#1]#2{%
\iforigpt \typeout{command `naphdrvb' is based on `decalinevb'.}\fi%
 \expandafter\threech@r#1{}{}%
\if\@tmpa r% right-handed set of double bonds
  \decalinevb[acfhk]{#2}%
\else\if\@tmpa A%aromatic circle
  \decalinevb[AB]{#2}%
%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \decalinevb[bfhk]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \decalinevb[bfhk]{#2}%
 \else\if\@tmpb b% (B)
  \decalinevb[acgk]{#2}%
 \fi\fi\fi%
\else%
 \if\@tmpa o%o-quinone
  \if\@tmpb a% (A)
   \decalinevb[cfhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \decalinevb[cfhk]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \decalinevb[dfhj]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \decalinevb[afhk]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \decalinevb[achk]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \decalinevb[acei]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \decalinevb[acfk]{#2}%
  \fi\fi\fi\fi\fi\fi%
  \fi%
%%%
\else\if\@tmpa q%various quinone
  \if\@tmpb a% (A)2,6-type
   \decalinevb[cehj]{#2}%
  \else\ifx\@tmpb\empty% (A)2,6-type
   \decalinevb[cehj]{#2}%
  \else\if\@tmpb b%2,6-quinone (B)
   \decalinevb[adfi]{#2}%
  \else\if\@tmpb c%1,5-quinone (C)
   \decalinevb[bdgi]{#2}%
  \else\if\@tmpb d%1,5-quinone (D)
   \decalinevb[begj]{#2}%
  \else\if\@tmpb e%1,7-quinone (E)
   \decalinevb[bdfi]{#2}%
  \else\if\@tmpb f%1,7-quinone (F)
   \decalinevb[cegj]{#2}%
  \else\if\@tmpb g%1,7-quinone (G)
   \decalinevb[behj]{#2}%
  \else\if\@tmpb h%1,7-quinone (H)
   \decalinevb[adgi]{#2}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if\@tmpa P%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,4,5,8-type
   \decalinevb[bgk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,4,5,8-type
   \decalinevb[bgk]{#2}%
  \else\if\@tmpb b% (B)1,2,5,8-type
   \decalinevb[cgk]{#2}%
  \fi\fi\fi%
\else\if\@tmpa Q%1,2,3,4
   \decalinevb[fhk]{#2}%
\else\if\@tmpa O%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,2,5,6-type
   \decalinevb[chk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,2,5,6-type
   \decalinevb[chk]{#2}%
  \else\if\@tmpb b% (B)1,2,7,8-type
   \decalinevb[cfk]{#2}%
  \else\if\@tmpb c% (C)1,2,3,5-type
   \decalinevb[dgi]{#2}%
  \else\if\@tmpb d% (D)1,2,3,7-type
   \decalinevb[dfi]{#2}%
  \fi\fi\fi\fi\fi%
\else% added 1998/11/23 by S. Fujita
   \decalinevb[@#1]{#2}%
\fi\fi\fi\fi\fi\fi\fi\fi%
}%               %end of \naphdrvb macro
\let\naphthalenevb=\naphdrvb
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Vertical-top type}
%
% The macro |\naphdrvt| (|\naphthalenevt|) is used for drawing 
% naphthalene derivatives 
% of vertical-top type as well as naphthoquinone derivatives of 
% vertical-top type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalinevt|. 
% \changes{v1.02}{1998/10/14}{Newly added command}
% 
% The macro |\naphdrvt| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \changes{v3.00}{2002/04/30}{\cs{naphthalenevt} added}
%
% \begin{verbatim}
% **********************************************
% * naphthalene and naphthoquinone derivatives *
% *  (vertical-top type)                       *
% **********************************************
%
%   \naphdrvt[OPT]{SUBSLIST}
%   \naphthalenevt[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one or two characters.  
%
% The character `A' is used for designating an aromatic bond pattern, in 
% which each of the six-membered rings has a central circle. 
%
% \begin{verbatim}
%     OPT (bond pattern)
%
%           none       :  naphthalene
%           A          :  aromatic circle
% \end{verbatim}
%
% One character `p' or two characters (p?) in the |OPT| argument 
% designate a p-quinone nucleus, which is present in the 
% right-hand ring for the case of `p' or `pa' and in the 
% left-hand ring for the case of `pb'.  
%
% \begin{verbatim}
%           p or pa    :  1,4-quinone (A) left aromatic, right quinone
%           pb         :  1,4-quinone (B) right aromatic, left quinone
% \end{verbatim}
%
% One character `o' or two characters (o?) in the |OPT| argument 
% designate an o-quinone nucleus in either side of the fused ring. 
% The second character of each argument indicates one of the possible 
% type of bond patterns. 
%
% \begin{verbatim}
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
% \end{verbatim}
%
% One character `q' or two characters (q?) in the |OPT| argument 
% designate an 2,6-, 1,5- or 1,7-quinone nucleus. 
% The second character of each argument indicates one of the possible 
% type of bond patterns. 
%
% \begin{verbatim}
%
%           q or qa    :  2,6-quinone (A)
%           qb         :  2,6-quinone (B)  3,7
%           qc         :  1,5-quinone (C)
%           qd         :  1,5-quinone (D)  4,8
%           qe         :  1,7-quinone (E)
%           qf         :  1,7-quinone (F)  2,8
%           qg         :  1,7-quinone (G)  4,6
%           qh         :  1,7-quinone (H)  3,5
% \end{verbatim}
%
% One character `P' or two characters (P?) in the |OPT| argument 
% designate a 1,4,5,8- or 1,2,5,8-quinone nucleus. 
%
% \begin{verbatim}
%
%           P or Pa    :  1,4,5,8-quinone (A)
%           Pb         :  1,2,5,8-quinone (B)
% \end{verbatim}
%
% One character `Q' or `O' or two characters (O?) in the |OPT| argument 
% designate quinone nuclei of remaining types. 
%
% \begin{verbatim}
%           Q          :  1,2,3,4-quinone
%
%           O or Oa    :  1,2,5,6-quinone (A)
%           Ob         :  1,2,7,8-quinone (B)
%           Oc         :  1,2,3,5-quinone (C)
%           Od         :  1,2,3,7-quinone (D)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        \naphdrvt{1==Cl;2==F}
%        \naphdrvt[A]{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
%
% \begin{macro}{\naphdrvt}
% \begin{macro}{\naphthalenevt}
%    \begin{macrocode}
\def\naphdrvt{\@ifnextchar[{\@naphdrvt}{\@naphdrvt[r]}}
\def\@naphdrvt[#1]#2{%
\iforigpt \typeout{command `naphdrvt' is based on `decalinevt'.}\fi%
 \expandafter\threech@r#1{}{}%
\if\@tmpa r% right-handed set of double bonds
  \decalinevt[acfhk]{#2}%
\else\if\@tmpa A%aromatic circle
  \decalinevt[AB]{#2}%
%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \decalinevt[bfhk]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \decalinevt[bfhk]{#2}%
 \else\if\@tmpb b% (B)
  \decalinevt[acgk]{#2}%
 \fi\fi\fi%
\else%
 \if\@tmpa o%o-quinone
  \if\@tmpb a% (A)
   \decalinevt[cfhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \decalinevt[cfhk]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \decalinevt[dfhj]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \decalinevt[afhk]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \decalinevt[achk]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \decalinevt[acei]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \decalinevt[acfk]{#2}%
  \fi\fi\fi\fi\fi\fi%
  \fi%
%%%
\else\if\@tmpa q%various quinone
  \if\@tmpb a% (A)2,6-type
   \decalinevt[cehj]{#2}%
  \else\ifx\@tmpb\empty% (A)2,6-type
   \decalinevt[cehj]{#2}%
  \else\if\@tmpb b%2,6-quinone (B)
   \decalinevt[adfi]{#2}%
  \else\if\@tmpb c%1,5-quinone (C)
   \decalinevt[bdgi]{#2}%
  \else\if\@tmpb d%1,5-quinone (D)
   \decalinevt[begj]{#2}%
  \else\if\@tmpb e%1,7-quinone (E)
   \decalinevt[bdfi]{#2}%
  \else\if\@tmpb f%1,7-quinone (F)
   \decalinevt[cegj]{#2}%
  \else\if\@tmpb g%1,7-quinone (G)
   \decalinevt[behj]{#2}%
  \else\if\@tmpb h%1,7-quinone (H)
   \decalinevt[adgi]{#2}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if\@tmpa P%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,4,5,8-type
   \decalinevt[bgk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,4,5,8-type
   \decalinevt[bgk]{#2}%
  \else\if\@tmpb b% (B)1,2,5,8-type
   \decalinevt[cgk]{#2}%
  \fi\fi\fi%
\else\if\@tmpa Q%1,2,3,4
   \decalinevt[fhk]{#2}%
\else\if\@tmpa O%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,2,5,6-type
   \decalinevt[chk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,2,5,6-type
   \decalinevt[chk]{#2}%
  \else\if\@tmpb b% (B)1,2,7,8-type
   \decalinevt[cfk]{#2}%
  \else\if\@tmpb c% (C)1,2,3,5-type
   \decalinevt[dgi]{#2}%
  \else\if\@tmpb d% (D)1,2,3,7-type
   \decalinevt[dfi]{#2}%
  \fi\fi\fi\fi\fi%
\else% added 1998/11/23 by S. Fujita
   \decalinevt[@#1]{#2}%
\fi\fi\fi\fi\fi\fi\fi\fi%
}%               %end of \naphdrvt macro
\let\naphthalenevt=\naphdrvt
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Horizontal type}
%
% The macro |\naphdrh| is used for drawing naphthalene derivatives 
% of horizontal type as well as naphtoquinone derivatives of 
% horizontal type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalineh|. 
% 
% The macro |\naphdrh| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \changes{v3.00}{2002/04/30}{\cs{naphthaleneh} added}
%
% \begin{verbatim}
% **********************************************
% * naphthalene and naphthoquinone derivatives *
% *  (horizontal type)                         *
% **********************************************
%
%   \naphdrh[OPT]{SUBSLIST}
%   \naphthaleneh[OPT]{SUBSLIST}
%
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
% The meaning of these characters is the same as described in 
% the definition of the macro |\naphdrv|. 
%
% \begin{verbatim}
%     OPT (bond pattern)
%
%           none       :  naphthalene
%           A          :  aromatic circle
%
%           p or pa    :  1,4-quinone (A) left aromatic, right quinone
%           pb         :  1,4-quinone (B) right aromatic, left quinone
%
%           o or oa    :  o-quinone (A)
%           ob         :  o-quinone (B)
%           oc         :  o-quinone (C)
%           od         :  o-quinone (D)
%           oe         :  o-quinone (E)
%           of         :  o-quinone (F)
%
%           q or qa    :  2,6-quinone (A)
%           qb         :  2,6-quinone (B)  3,7
%           qc         :  1,5-quinone (C)
%           qd         :  1,5-quinone (D)  4,8
%           qe         :  1,7-quinone (E)
%           qf         :  1,7-quinone (F)  2,8
%           qg         :  1,7-quinone (G)  4,6
%           qh         :  1,7-quinone (H)  3,5
%
%           P or Pa    :  1,4,5,8-quinone (A)
%           Pb         :  1,2,5,8-quinone (B)
%
%           Q          :  1,2,3,4-quinone
%
%           O or Oa    :  1,2,5,6-quinone (A)
%           Ob         :  1,2,7,8-quinone (B)
%           Oc         :  1,2,3,5-quinone (C)
%           Od         :  1,2,3,7-quinone (D)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 8 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        \naphdrh{1==Cl;2==F}
%        \naphdrh[A]{1==Cl;4==F;2==CH$_{3}$}
% \end{verbatim}
%
% \begin{macro}{\naphdrh}
% \begin{macro}{\naphthaleneh}
%    \begin{macrocode}
\def\naphdrh{\@ifnextchar[{\@naphdrh}{\@naphdrh[r]}}
\def\@naphdrh[#1]#2{%
\iforigpt \typeout{command `nathdrh' is based on `decalineh'.}\fi%
 \expandafter\threech@r#1{}{}%
\if\@tmpa r% right-handed set of double bonds
  \decalineh[acfhk]{#2}%
\else\if\@tmpa A%aromatic circle
  \decalineh[AB]{#2}%
%
\else\if\@tmpa p%p-quinone
 \if\@tmpb a% (A)
  \decalineh[bfhk]{#2}%
 \else\ifx\@tmpb\empty% (A)
  \decalineh[bfhk]{#2}%
 \else\if\@tmpb b% (B)
  \decalineh[acgk]{#2}%
 \fi\fi\fi%
\else%
 \if\@tmpa o%o-quinone
  \if\@tmpb a% (A)
   \decalineh[cfhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
   \decalineh[cfhk]{#2}%
  \else\if\@tmpb b%o-quinone (B)
   \decalineh[dfhj]{#2}%
  \else\if\@tmpb c%o-quinone (C)
   \decalineh[afhk]{#2}%
  \else\if\@tmpb d%o-quinone (D)
   \decalineh[achk]{#2}%
  \else\if\@tmpb e%o-quinone (E)
   \decalineh[acei]{#2}%
  \else\if\@tmpb f%o-quinone (F)
   \decalineh[acfk]{#2}%
  \fi\fi\fi\fi\fi\fi%
  \fi%
% %%
\else\if\@tmpa q%various quinone
  \if\@tmpb a% (A)2,6-type
   \decalineh[cehj]{#2}%
  \else\ifx\@tmpb\empty% (A)2,6-type
   \decalineh[cehj]{#2}%
  \else\if\@tmpb b%2,6-quinone (B)
   \decalineh[adfi]{#2}%
  \else\if\@tmpb c%1,5-quinone (C)
   \decalineh[bdgi]{#2}%
  \else\if\@tmpb d%1,5-quinone (D)
   \decalineh[begj]{#2}%
  \else\if\@tmpb e%1,7-quinone (E)
   \decalineh[bdfi]{#2}%
  \else\if\@tmpb f%1,7-quinone (F)
   \decalineh[cegj]{#2}%
  \else\if\@tmpb g%1,7-quinone (G)
   \decalineh[behj]{#2}%
  \else\if\@tmpb h%1,7-quinone (H)
   \decalineh[adgi]{#2}%
  \fi\fi\fi\fi\fi\fi\fi\fi\fi%
\else\if\@tmpa P%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,4,5,8-type
   \decalineh[bgk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,4,5,8-type
   \decalineh[bgk]{#2}%
  \else\if\@tmpb b% (B)1,2,5,8-type
   \decalineh[cgk]{#2}%
  \fi\fi\fi%
\else\if\@tmpa Q%1,2,3,4
   \decalineh[fhk]{#2}%
\else\if\@tmpa O%quinone having 4 carbonyl groups
  \if\@tmpb a% (A)1,2,5,6-type
   \decalineh[chk]{#2}%
  \else\ifx\@tmpb\empty% (A)1,2,5,6-type
   \decalineh[chk]{#2}%
  \else\if\@tmpb b% (B)1,2,7,8-type
   \decalineh[cfk]{#2}%
  \else\if\@tmpb c% (C)1,2,3,5-type
   \decalineh[dgi]{#2}%
  \else\if\@tmpb d% (D)1,2,3,7-type
   \decalineh[dfi]{#2}%
  \fi\fi\fi\fi\fi%
\else% added 1998/11/23 by S. Fujita
   \decalineh[@#1]{#2}%
\fi\fi\fi\fi\fi\fi\fi\fi%
}%               %end of \naphdrh macro
\let\naphthaleneh=\naphdrh
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \section{Tetraline derivatives}
% \subsection{Vertical type}
%
% The macro |\tetralinev| is used for drawing naphthalene derivatives 
% of vertical type as well as naphthoquinone derivatives of 
% vertical type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalinev|. 
% 
% The macro |\tetralinev| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \begin{verbatim}
% *************************
% * tetraline derivatives *
% *  (vertical type)      *
% *************************
%
%   \tetralinev[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
%
% \begin{verbatim}
%
%     OPT = none       :  tetraline
%           A          :  aromatic circle
%
%           e or ea    :  1,2-double bond
%           eb         :  2,3-double bond
%           ec         :  3,4-double bond
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for n=5 or 8 
%
%           nSa        :  bias bond
%                        This option can be used to avoid over-crowding 
%                        betweem 1 and 8 or between 4 and 5. 
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \tetralinev{1==Cl;2==F}
%        \tetralinev[A]{1==Cl;4==F;2==CH$_{3}$}
%        \tetralinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \begin{macro}{\tetralinev}
%    \begin{macrocode}
\def\tetralinev{\@ifnextchar[{\@tetralinev}{\@tetralinev[r]}}
\def\@tetralinev[#1]#2{%
 \iforigpt \typeout{command `tetralinev' is based on `decalinev'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \decalinev[fhk]{#2}%
 \else\if\@tmpa A%aromatic circle
    \decalinev[A]{#2}%
 \else\if\@tmpa e%inner double bond
  \if\@tmpb a% (A)%
    \decalinev[afhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
    \decalinev[afhk]{#2}%
  \else\if\@tmpb b% (B)
    \decalinev[bfhk]{#2}%
  \else\if\@tmpb c% (C)
    \decalinev[cfhk]{#2}%
  \fi\fi\fi\fi%
 \else%1998/11/23 by Shinsaku Fujita
    \decalinev[@#1]{#2}%
 \fi\fi\fi%
}%               %end of \tetralinev macro
%    \end{macrocode}
% \end{macro}
%
% \subsection{Vertical-bottom type}
%
% The macro |\tetralinevb| is used for drawing naphthalene derivatives 
% of vertical-bottom type as well as naphthoquinone derivatives of 
% vertical type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalinevb|. 
% \changes{v1.02}{1998/10/14}{Newly added command}
% 
% The macro |\tetralinevb| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \begin{verbatim}
% ********************************
% * tetraline derivatives        *
% *  (vertical-bottom type)      *
% ********************************
%
%   \tetralinevb[OPT]{SUBSLIST}          
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
%
% \begin{verbatim}
%
%     OPT = none       :  tetraline
%           A          :  aromatic circle
%
%           e or ea    :  1,2-double bond
%           eb         :  2,3-double bond
%           ec         :  3,4-double bond
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for n=5 or 8 
%
%           nSa        :  bias bond
%                        This option can be used to avoid over-crowding 
%                        betweem 1 and 8 or between 4 and 5. 
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \tetralinevb{1==Cl;2==F}
%        \tetralinevb[A]{1==Cl;4==F;2==CH$_{3}$}
%        \tetralinevb[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \begin{macro}{\tetralinevb}
%    \begin{macrocode}
\def\tetralinevb{\@ifnextchar[{\@tetralinevb}{\@tetralinevb[r]}}
\def\@tetralinevb[#1]#2{%
 \iforigpt \typeout{command `tetralinevb' is based on `decalinevb'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \decalinevb[fhK]{#2}%  %[fhK] in place of [fhk]
 \else\if\@tmpa A%aromatic circle
    \decalinevb[A]{#2}%
 \else\if\@tmpa e%inner double bond
  \if\@tmpb a% (A)%
    \decalinevb[afhK]{#2}%
  \else\ifx\@tmpb\empty% (A)
    \decalinevb[afhK]{#2}%
  \else\if\@tmpb b% (B)
    \decalinevb[bfhK]{#2}%
  \else\if\@tmpb c% (C)
    \decalinevb[cfhK]{#2}%
  \fi\fi\fi\fi%
 \else%1998/11/23 by Shinsaku Fujita
    \decalinevb[@#1]{#2}%
 \fi\fi\fi%
}%               %end of \tetralinevb macro
%    \end{macrocode}
% \end{macro}
%
% \subsection{Vertical-top type}
%
% The macro |\tetralinevt| is used for drawing naphthalene derivatives 
% of vertical-top type as well as naphthoquinone derivatives of 
% vertical type. The skeleton and endocyclic double bonds are
% drawn directly, while substituents and exocyclic bonds are placed by 
% useing the inner macro |\decalinevt|. 
% \changes{v1.02}{1998/10/14}{Newly added command}
% 
% The macro |\tetralinevt| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \begin{verbatim}
% ********************************
% * tetraline derivatives        *
% *  (vertical-bottom type)      *
% ********************************
%
%   \tetralinevt[OPT]{SUBSLIST}          
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
%
% \begin{verbatim}
%
%     OPT = none       :  tetraline
%           A          :  aromatic circle
%
%           e or ea    :  1,2-double bond
%           eb         :  2,3-double bond
%           ec         :  3,4-double bond
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for n=5 or 8 
%
%           nSa        :  bias bond
%                        This option can be used to avoid over-crowding 
%                        betweem 1 and 8 or between 4 and 5. 
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \tetralinevt{1==Cl;2==F}
%        \tetralinevt[A]{1==Cl;4==F;2==CH$_{3}$}
%        \tetralinevt[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \begin{macro}{\tetralinevt}
%    \begin{macrocode}
\def\tetralinevt{\@ifnextchar[{\@tetralinevt}{\@tetralinevt[r]}}
\def\@tetralinevt[#1]#2{%
 \iforigpt \typeout{command `tetralinevt' is based on `decalinevt'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \decalinevt[fhk]{#2}%
 \else\if\@tmpa A%aromatic circle
    \decalinevt[A]{#2}%
 \else\if\@tmpa e%inner double bond
  \if\@tmpb a% (A)%
    \decalinevt[afhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
    \decalinevt[afhk]{#2}%
  \else\if\@tmpb b% (B)
    \decalinevt[bfhk]{#2}%
  \else\if\@tmpb c% (C)
    \decalinevt[cfhk]{#2}%
  \fi\fi\fi\fi%
 \else%1998/11/23 by Shinsaku Fujita
    \decalinevt[@#1]{#2}%
 \fi\fi\fi%
}%               %end of \tetralinevt macro
%    \end{macrocode}
% \end{macro}
%
% \subsection{Horizontal type}
%
% The macro |\tetralineh| is used for drawing tetraline derivatives 
% of horizontal type. 
% 
% The macro |\tetralineh| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \begin{verbatim}
% *************************
% * tetraline derivatives *
% *  (horizontal type)    *
% *************************
%
%   \tetralineh[OPT]{SUBSLIST}          
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
%
% \begin{verbatim}
%     OPT = none       :  tetraline
%           A          :  aromatic circle
%
%           e or ea    :  1,2-double bond
%           eb         :  2,3-double bond
%           ec         :  3,4-double bond
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 4 
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for n=5 or 8 
%
%           nSa        :  bias bond
%                        This option can be used to avoid over-crowding 
%                        betweem 1 and 8 or between 4 and 5. 
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \tetralineh{1==Cl;2==F}
%        \tetralineh[A]{1==Cl;4==F;2==CH$_{3}$}
%        \tetralineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \begin{macro}{\tetralineh}
%    \begin{macrocode}
\def\tetralineh{\@ifnextchar[{\@tetralineh}{\@tetralineh[r]}}
\def\@tetralineh[#1]#2{%
 \iforigpt \typeout{command `tetralineh' is based on `decalineh'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \decalineh[fhk]{#2}%
 \else\if\@tmpa A%aromatic circle
    \decalineh[A]{#2}%
 \else\if\@tmpa e%inner double bond
  \if\@tmpb a% (A)%
    \decalineh[afhk]{#2}%
  \else\ifx\@tmpb\empty% (A)
    \decalineh[afhk]{#2}%
  \else\if\@tmpb b% (B)
    \decalineh[bfhk]{#2}%
  \else\if\@tmpb c% (C)
    \decalineh[cfhk]{#2}%
  \fi\fi\fi\fi%
\else% added 1998/11/23 by S. Fujita
   \decalineh[@#1]{#2}%
 \fi\fi\fi%
}%               %end of \tetralineh macro
%    \end{macrocode}
% \end{macro}
%
% \section{Anthracene derivatives}
% \subsection{Perhydro-anthracene derivatives of Vertical type}
%
% The macro |\hanthracenev| is used for drawing perhydroanthracene 
% derivatives of vertical type. 
% 
% The macro |\hanthracenev| has an argument |SUBSLIST| as well as an optional 
% argument |BONDLIST|.  
%
% \begin{verbatim}
% ***********************************
% * perhydro anthracene derivatives *
% *  (vertical type)                *
% ***********************************
%
%   \hanthracenev[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to p, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A, B, or C indicates an aromatic bond 
% pattern (circle). 
% \changes{v1.02}{1998/10/14}{BONDLIST: o, O, p and P at the fused bond}
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none       :  hanthracene
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  10,4a-double bond
%           f          :  10,10a-double bond
%           g          :  5,10a-double bond
%           h          :  5,6-double bond
%           i          :  6,7-double bond
%           j          :  8,7-double bond
%           k          :  8,8a-double bond
%           l          :  9,8a-double bond
%           m          :  9,9a-double bond
%           n          :  1,9a-double bond
%           o          :  4a,9a-double bond
%           O          :  4a,9a-double bond in the other ring
%           p          :  10a,8a-double bond
%           P          :  10a,8a-double bond in the other ring
%           A          :  right aromatic circle 
%           B          :  central aromatic circle 
%           C          :  left aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%
%        for 11 (fused positions, 9a and 4a) 
%
%           11FA       :  alpha single bond at 9a 
%           11FB       :  beta single bond at 9a
%           11FU       :  unspecified single bond at 9a
%           11GA       :  alpha single bond at 4a 
%           11GB       :  beta single bond at 4a
%           11GU       :  unspecified single bond at 4a
% \end{verbatim}
%
% \begin{verbatim}
%
%        for 12 (fused positions, 8a and 10a) 
%
%           12FA       :  alpha single bond at 8a 
%           12FB       :  beta single bond at 8a
%           12FU       :  unspecified single bond at 8a
%           12GA       :  alpha single bond at 10a 
%           12GB       :  beta single bond at 10a
%           12GU       :  unspecified single bond at 10a
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \hanthracenev{1==Cl;2==F;{{10}}==OH}
%        \hanthracenev[c]{1==Cl;4==F;2==CH$_{3}$;
%            {{11}FA}==OH;{{11}FB}==OH}
%        \hanthracenev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \changes{v1.02}{1998/10/31}{The command \cs{setdecaringv} has 
% been stopped to use.}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/12/25}{Added: fused rings}
%
% \begin{macro}{\hanthracenev}
%    \begin{macrocode}
\def\hanthracenev{\@ifnextchar[{\@hanthracenev[@}{\@hanthracenev[r]}}
\def\@hanthracenev[#1]#2{%
% bonds for outer skeleton
\@reset@ylsw\reset@@yl
\ylposition{#2}{-7}{0}{2}{0}%  %for 8 positions
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else\ylposition{#2}{-1}{3}{7}{0}% for 5 to 7 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi\else
\ylposition{#2}{0}{0}{5}{0}% for 1 to 4 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-684}\def\@@yli{0}\fi\else
\ylposition{#2}{-8}{0}{2}{0}%for 9-position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{0}\fi\else
\ylposition{#2}{-6}{3}{5}{0}%for 10-position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{0}\fi\else
\ylfusedposition{#2}{-11}{-1}{1}{0}% for 9a and 4a
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{0}\fi\else
\ylfusedposition{#2}{-12}{-1}{1}{0}% for 8a and 10a
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi\fi
\if@ylsw
 \yl@shiftii=\@ylii 
 \ifx\@@ylii\empty\else
 \advance\yl@shiftii\@@ylii\fi
 \yl@shifti=\@yli 
 \ifx\@@yli\empty\else
 \advance\yl@shifti\@@yli\fi
 \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{hanthracenev}%
\fi
  \Put@Line(0,406)(-5,-3){171}%       %bond 8-7
  \Put@Line(0,406)(5,-3){171}%        %bond 8-8a
  \Put@Line(0,0)(-5,3){171}%          %bond 5-6
  \Put@Line(0,0)(5,3){171}%           %bond 5-10a
  \Put@Line(171,103)(0,1){200}%       %bond 10a-8a
  \Put@Line(-171,103)(0,1){200}%      %bond 6-7
  \Put@Line(342,406)(-5,-3){171}%     %bond 9-8a
  \Put@Line(342,406)(5,-3){171}%      %bond 9-9a
  \Put@Line(342,0)(-5,3){171}%        %bond 10-10a
  \Put@Line(342,0)(5,3){171}%         %bond 10-4a
  \Put@Line(513,103)(0,1){200}%       %bond 4a-9a
  %%%%
  \Put@Line(684,406)(-5,-3){171}%     %bond 1-9a    1-6
  \Put@Line(684,406)(5,-3){171}%      %bond 1-2     1-2
  \Put@Line(855,103)(0,1){200}%       %bond 3-2     3-2
  \Put@Line(684,0)(5,3){171}%         %bond 4-3     4-3
  \Put@Line(684,0)(-5,3){171}%        %bond 4-4a    4-5
% inner double bonds
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \Put@Line(690,364)(5,-3){126}%      %double bond 1-2
\else\if\member b%
  \Put@Line(822,129)(0,1){148}%       %double bond 3-2
\else\if\member c%
  \Put@Line(690,42)(5,3){126}%        %double bond 4-3
\else\if\member d%
  \Put@Line(690,42)(-5,3){126}%       %double bond 4-4a
\else\if\member e%
  \Put@Line(348,42)(5,3){126}%        %double bond 10-4a
\else\if\member f%
  \Put@Line(348,42)(-5,3){126}%       %double bond 10-10a
\else\if\member g%
  \Put@Line(6,42)(5,3){126}%          %double bond 5-10a
\else\if\member h%
  \Put@Line(-6,42)(-5,3){126}%        %double bond 5-6
\else\if\member i%
  \Put@Line(-138,129)(0,1){148}%      %double bond 6-7
\else\if\member j%
  \Put@Line(-6,364)(-5,-3){126}%      %double bond 8-7
\else\if\member k%
  \Put@Line(6,364)(5,-3){126}%        %double bond 8-8a   
\else\if\member l%
  \Put@Line(348,364)(-5,-3){126}%     %double bond 9-8a
\else\if\member m%
  \Put@Line(348,364)(5,-3){126}%      %double bond 9-9a
\else\if\member n%
  \Put@Line(690,364)(-5,-3){126}%     %double bond 1-9a
\else\if\member o%
  \Put@Line(544,129)(0,1){148}%       %double bond 4a-9a
\else\if\member O%
  \Put@Line(482,129)(0,1){148}%       %double bond 4a-9a at the other ring
\else\if\member p%
  \Put@Line(138,129)(0,1){148}%       %double bond 10a-8a
\else\if\member P%
  \Put@Line(204,129)(0,1){148}%       %double bond 10a-8a at the other ring
\else\if\member C%left aromatic circle 
  \Put@oCircle(0,203){240}%            %circle
\else\if\member B%right aromatic circle 
  \Put@oCircle(342,203){240}%          %circle
\else\if\member A%right aromatic circle 
  \Put@oCircle(684,203){240}%          %circle
\else
%setting fused rings
  \expandafter\twoCH@R\member//%
  \set@fusion@hanthrav
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
%exocyclic bonds and substituents
\global\drawsamesubsttrue%2002/05/30 warning on
\Put@Direct(0,0){\setsixringv{#2}{-7}{0}{2}{0}}%  %for 8 positions
\global\drawsamesubstfalse%2002/05/30 warning off
\Put@Direct(0,0){\setsixringv{#2}{-1}{3}{7}{0}}%  %for 5 to 7 positions
\Put@Direct(684,0){\setsixringv{#2}{0}{0}{5}{0}}% %for 1 to 4 positions
\Put@Direct(342,0){\setsixringv{#2}{-8}{0}{2}{0}}%for 9-position
\Put@Direct(342,0){\setsixringv{#2}{-6}{3}{5}{0}}%for 10-position
%bonds and substituents for fused positions
\Put@Direct(0,0){\setfusedbond{#2}{-12}{-1}{1}{0}}% for 8a and 10a
\Put@Direct(342,0){\setfusedbond{#2}{-11}{-1}{1}{0}}% for 9a and 4a
\end{sfpicture}}%               %end of \hanthracenev macro%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Anthracene and anthraquinone derivatives}
%
% The macro |\anthracenev| is used for drawing anthracene derivatives 
% of vertical type. 
% 
% The macro |\anthracenev| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \begin{verbatim}
% ********************************************
% * anthracene and anthraquinone derivatives *
% *  (vertical type)                         *
% ********************************************
%
%   \anthracenev[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
%
% \begin{verbatim}
%     OPT (bond pattern) 
%
%           none or r  :  right-handed double bonds
%           l          :  left-handed double bonds
%           A          :  aromatic circle
%
%           p or pa    :  9,10-anthraquinone (A) 
%           pA         :  9,10-anthraquinone (circle type)
%
%           o          :  1,2-anthraquinone (A)
%           oa         :  1,2-anthraquinone (A')
%           oA         :  1,2-anthraquinone (circle type)
%           ob         :  2,3-antharquinone (B)
%           oc         :  1,2-anthraquinone (C)
%
%           q          :  1,4-anthraquinone (A)
%           qa         :  1,4-anthraquinone (A')
%           qA         :  1,4-anthraquinone (circle type)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        
%        \anthracenev{1==Cl;2==F;0FA==;0GA==}
%        \anthracenev[A]{1==Cl;4==F;2==CH$_{3}$}
%        \anthracenev[eb]{1D==O;4SA==MeO;4SB==OMe;%
%             5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \begin{macro}{\anthracenev}
%    \begin{macrocode}
\def\anthracenev{\@ifnextchar[{\@anthracenev}{\@anthracenev[r]}}
\def\@anthracenev[#1]#2{%
 \iforigpt \typeout{command `anthracenev' is %
                    based on `hanthracenev'.}\fi%
%% \expandafter\threech@r#1{}{}%error1998/11/23 by Shinsaku Fujita
 \expandafter\twoCH@R#1//%
 \if\@tmpa r% right-handed set of double bonds
    \hanthracenev[acflhjo]{#2}%
 \else\if\@tmpa l% left-handed set of double bonds
    \hanthracenev[acehjmp]{#2}%
 \else\if\@tmpa A%aromatic circle
    \hanthracenev[ABC]{#2}%
 \else\if\@tmpa p%9,10-quinone
  \if\@tmpb a% (A)%
    \hanthracenev[achjop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hanthracenev[achjop]{#2}%
   \else\if\@tmpb A% circle type
    \hanthracenev[AC]{#2}%
   \else 
    \hanthracenev[achjop]{#2}%
  \fi\fi\fi%
 \else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
    \hanthracenev[cfjhlo]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hanthracenev[cehjmp]{#2}%
   \else\if\@tmpb b% (B)
    \hanthracenev[dfhjln]{#2}%
   \else\if\@tmpb c% (C)
    \hanthracenev[aehjmp]{#2}%
   \else\if\@tmpb A% cicle type
    \hanthracenev[cBC]{#2}%
  \fi\fi\fi\fi\fi%
 \else\if\@tmpa q%1,4-quinone
  \if\@tmpb a% (A)%
    \hanthracenev[bfhjlo]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hanthracenev[behjmp]{#2}%
   \else\if\@tmpb A% circle type
    \hanthracenev[bBC]{#2}%
   \else% 
    \hanthracenev[behjmp]{#2}%
  \fi\fi\fi%
 \else
    \hanthracenev[@#1]{#2}%
 \fi\fi\fi\fi\fi\fi%
}%               %end of \anthracenev macro%
%    \end{macrocode}
% \end{macro}
%
% \section{Phenanthrene derivatives}
% \subsection{Perhydro-phenanthrene derivatives of Vertical type}
%
% The macro |\hphenanthrenev| is used for drawing perhydrophenanthrene 
% derivatives of vertical type. 
% 
% The macro |\hphenanthrenev| has an argument |SUBSLIST| as well as an 
% optional argument |BONDLIST|.  
%
% \begin{verbatim}
% *************************************
% * perhydro phenanthrene derivatives *
% *  (vertical type)                  *
% *************************************
%
%   \hphenanthrenev[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to p, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A, B, or C indicates an aromatic bond 
% pattern (circle). 
% \changes{v1.02}{1998/10/14}{BONDLIST: o, O, p and P at the fused bond}
%
% \begin{verbatim}
%
%     BONDLIST = 
%
%           none       :  hphenanthrene
%           a          :  1,2-double bond
%           b          :  2,3-double bond
%           c          :  3,4-double bond
%           d          :  4,4a-double bond
%           e          :  4a,4b-double bond
%           f          :  4b,5-double bond
%           g          :  5,6-double bond
%           h          :  6,7-double bond
%           i          :  7,8-double bond
%           j          :  8,8a-double bond
%           k          :  8a,9-double bond
%           l          :  9,10-double bond
%           m          :  10,10a-double bond
%           n          :  1,10a-double bond
%           o          :  4a,10a-double bond
%           O          :  4a,10a-double bond in the other ring
%           p          :  4b,8a-double bond
%           P          :  4b,8a-double bond in the other ring
%           A          :  right aromatic circle 
%           B          :  central aromatic circle 
%           C          :  left aromatic circle 
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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 
%
%        for 11 (fused positions, 4a and 10a) 
%
%           11FA       :  alpha single bond at 4a 
%           11FB       :  beta single bond at 4a
%           11FC       :  alpha single bond (downward) at 4a 
%           11FD       :  beta single bond (downward) at 4a
%           11FU       :  unspecified single bond at 4a
%           11GA       :  alpha single bond at 10a 
%           11GB       :  beta single bond at 10a
%           11FC       :  alpha single bond (upward) at 10a
%           11FD       :  beta single bond (upward) at 10a
%           11GU       :  unspecified single bond at 10a
%
%        for 12 (fused positions, 4b and 8a) 
%
%           12FA       :  alpha single bond at 4b 
%           12FB       :  beta single bond at 4b
%           12FU       :  unspecified single bond at 4b
%           12GA       :  alpha single bond at 8a 
%           12GB       :  beta single bond at 8a
%           12GU       :  unspecified single bond at 8a
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \hphenanthrenev{1==Cl;2==F;{{10}}==OH}
%        \hphenanthrenev[c]{1==Cl;4==F;2==CH$_{3}$;
%            {{11}FA}==OH;{{11}FB}==OH}
%        \hphenanthrenev[eb]{1D==O;4SA==MeO;4SB==OMe;
%                   5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
% \changes{v1.02}{1998/10/15}{The command \cs{setdecaringv} has 
% been stopped to use.}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v2.00}{1998/11/23}{Added: Fused rings}
%
% \begin{macro}{\hphenanthrenev}
%    \begin{macrocode}
\def\hphenanthrenev{%
 \@ifnextchar[{\@hphenanthrenev[@}{\@hphenanthrenev[r]}}
\def\@hphenanthrenev[#1]#2{%
% bonds for outer skeleton
\@reset@ylsw\reset@@yl
\ylposition{#2}{-4}{0}{2}{0}%   %for 5 position
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else
\ylposition{#2}{12}{3}{7}{-1}%   %for 6 to 8 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi\else
\ylposition{#2}{13}{2}{5}{-1}%   %for 9 to 10 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{0}\fi\else
\ylposition{#2}{4}{0}{4}{-1}% %for 1 to 3 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-513}\def\@@yli{-303}\fi\else
\ylposition{#2}{2}{5}{7}{0}%  %for 4-position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-513}\def\@@yli{-303}\fi\else
\ylfusedposition{#2}{-12}{-1}{1}{0}%  % for 4b and 8a
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi\else
\ylfusedposition{#2}{-10}{0}{2}{0}% % for 4a and 10a
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{0}\fi\fi
\if@ylsw
 \yl@shiftii=\@ylii 
 \ifx\@@ylii\empty\else
 \advance\yl@shiftii\@@ylii\fi
 \yl@shifti=\@yli 
 \ifx\@@yli\empty\else
 \advance\yl@shifti\@@yli\fi
 \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,1200)(-\shiftii,-\shifti)
  \origptoutput{hphenanthrenev}%
\fi
  \Put@Line(0,406)(-5,-3){171}%       %bond 6-5
  \Put@Line(0,406)(5,-3){171}%        %bond 5-4a
  \Put@Line(0,0)(-5,3){171}%          %bond 8-7
  \Put@Line(0,0)(5,3){171}%            %bond 8-8a
  \Put@Line(171,103)(0,1){200}%       %bond 8a-4b
  \Put@Line(-171,103)(0,1){200}%      %bond 7-6
  \Put@Line(342,406)(-5,-3){171}%     %bond 4a-4b
  \Put@Line(342,406)(5,-3){171}%      %bond 4a-10a
  \Put@Line(342,0)(-5,3){171}%        %bond 9-8a
  \Put@Line(342,0)(5,3){171}%         %bond 9-10
  \Put@Line(513,103)(0,1){200}%       %bond 10-10a
  %%%%
  \Put@Line(342,406)(0,1){200}%       %bond 4a-4
  \Put@Line(513,709)(-5,-3){171}%     %bond 3-4
  \Put@Line(513,709)(5,-3){171}%      %bond 3-2
  \Put@Line(684,406)(0,1){200}%       %bond 1-2
  \Put@Line(513,303)(5,3){171}%       %bond 10a-1
% inner double bonds
\@tfor\member:=#1\do{%
\if\member r%no endcyclic double bonds
\else\if\member a%
  \Put@Line(651,432)(0,1){148}%       %double bond 1-2
\else\if\member b%
  \Put@Line(519,667)(5,-3){126}%      %double bond 3-2
\else\if\member c%
  \Put@Line(519,667)(-5,-3){126}%     %double bond 3-4
\else\if\member d%
  \Put@Line(375,432)(0,1){148}%       %double bond 4a-4
\else\if\member e%
  \Put@Line(348,364)(-5,-3){126}%     %double bond 4a-4b
\else\if\member f%
  \Put@Line(6,364)(5,-3){126}%        %double bond 5-4b
\else\if\member g%
  \Put@Line(-6,364)(-5,-3){126}%      %double bond 5-6
\else\if\member h%
  \Put@Line(-138,129)(0,1){148}%      %double bond 6-7
\else\if\member i%
  \Put@Line(-6,42)(-5,3){126}%        %double bond 8-7
\else\if\member j%
  \Put@Line(6,42)(5,3){126}%          %double bond 8-8a
\else\if\member k%
  \Put@Line(348,42)(-5,3){126}%       %double bond 9-8a
\else\if\member l%
  \Put@Line(348,42)(5,3){126}%        %double bond 9-10
\else\if\member m%
  \Put@Line(482,129)(0,1){148}%       %double bond 10-10a
\else\if\member n%
  \Put@Line(519,345)(5,3){126}%       %double bond 10a-1
\else\if\member o%
  \Put@Line(507,345)(-5,3){126}%      %double bond 10a-4a
\else\if\member O%
  \Put@Line(348,364)(5,-3){126}%     %double bond 4a-10a
\else\if\member p%
  \Put@Line(138,129)(0,1){148}%       %double bond 8a-4b
\else\if\member P%
  \Put@Line(204,129)(0,1){148}%       %double bond 8a-4b
\else\if\member C%left aromatic circle 
  \Put@oCircle(0,203){240}%            %circle
\else\if\member B%right aromatic circle 
  \Put@oCircle(342,203){240}%          %circle
\else\if\member A%right aromatic circle 
  \Put@oCircle(513,506){240}%          %circle
\else
% setting fused rings
  \expandafter\twoCH@R\member//%
  \set@fusion@hphenanv
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
%exocyclic bonds and substituents
\global\drawsamesubsttrue%2002/05/30 warning on
\Put@Direct(0,0){\setsixringv{#2}{-4}{0}{2}{0}}%   %for 5 position
\global\drawsamesubstfalse%2002/05/30 warning off
\Put@Direct(0,0){\setsixringv{#2}{12}{3}{7}{-1}}%   %for 6 to 8 positions
\Put@Direct(342,0){\setsixringv{#2}{13}{2}{5}{-1}}%   %for 9 to 10 positions
\Put@Direct(513,303){\setsixringv{#2}{4}{0}{4}{-1}}% %for 1 to 3 positions
\Put@Direct(513,303){\setsixringv{#2}{2}{5}{7}{0}}%  %for 4-position
%bonds and substituents for fused positions
\Put@Direct(0,0){\setfusedbond{#2}{-12}{-1}{1}{0}}%  % for 4b and 8a
\Put@Direct(342,0){\setfusedbond{#2}{-10}{0}{2}{0}}% % for 4a and 10a
\end{sfpicture}}%               %end of \hphenanthrenev macro%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Phenanthrene and phenanthroquinone derivatives}
%
% The macro |\phenanthrenev| is used for drawing phenanthrene derivatives 
% of vertical type. 
% 
% The macro |\anthracenev| has an argument |SUBSLIST| as well as an optional 
% argument |OPT|.  The latter designates a bond pattern in place of  
% individual exocyclic bonds. 
%
% \begin{verbatim}
% *********************************
% * phenanthrene and  derivatives *
% *  (vertical type)              *
% *********************************
%
%   \phenanthrenev[OPT]{SUBSLIST}
% \end{verbatim}
%
% The |OPT| argument contains one or two characters for designate
% aromatic bond patterns or for naphthoquinone bond patterns. 
%
% \begin{verbatim}
%     OPT (bond pattern) 
%
%           none or r  :  right-handed double bonds
%           A          :  aromatic circle
%
%           p or pa    :  1,4-quinone (A) 
%           pA         :  1,4-quinone (circle type)
%
%           o or oa    :  1,2-quinone (A)
%           oA         :  1,2-quinone (circle type)
%           ob         :  2,3-quinone (B)
%           oc         :  3,4-anthraquinone (C)
%
%           q or qa    :  9,10-quinone
%           qA         :  9,10-quinone (circle type)
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 10
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom
%           nB         :  beta single bond at n-atom
%           nSA        :  alpha single bond at n-atom (boldface)
%           nSB        :  beta single bond at n-atom (dotted line)
%           nSa        :  alpha (not specified) single bond at n-atom
%           nSb        :  beta (not specified) single bond at n-atom
%
%           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}
%
% \begin{verbatim}
%       e.g. 
%        
%        \phenanthrenev{1==Cl;2==F}
%        \phenanthrenev[A]{1==Cl;4==F;2==CH$_{3}$}
%        \phenanthrenev[eb]{1D==O;4SA==MeO;4SB==OMe;%
%               5W==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
%
% \begin{macro}{\phenanthrenev}
%    \begin{macrocode}
\def\phenanthrenev{\@ifnextchar[{\@phenanthrenev}{\@phenanthrenev[r]}}
\def\@phenanthrenev[#1]#2{%
 \iforigpt \typeout{command `phenanthrenev' is %
    based on `hphenantherenv'.}\fi%
 \expandafter\threech@r#1{}{}%
 \if\@tmpa r% right-handed set of double bonds
    \hphenanthrenev[acgilop]{#2}%
 \else\if\@tmpa A%aromatic circle
    \hphenanthrenev[ABC]{#2}%
 \else\if\@tmpa p%1,4-quinone
  \if\@tmpb a% (A)%
    \hphenanthrenev[bgilop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hphenanthrenev[bgilop]{#2}%
   \else\if\@tmpb A% circle type
    \hphenanthrenev[BCb]{#2}%
   \else 
    \hphenanthrenev[bgilop]{#2}%
  \fi\fi\fi%
 \else\if\@tmpa o%o-quinone
  \if\@tmpb a% (A)%
    \hphenanthrenev[cgilop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hphenanthrenev[cgilop]{#2}%
   \else\if\@tmpb b% (B)
    \hphenanthrenev[dgilnp]{#2}%
   \else\if\@tmpb c% (C)
    \hphenanthrenev[agilop]{#2}%
   \else\if\@tmpb A% cicle type
    \hphenanthrenev[cBC]{#2}%
  \fi\fi\fi\fi\fi%
 \else\if\@tmpa q%9,10-quinone
  \if\@tmpb a% (A)%
    \hphenanthrenev[acgiop]{#2}%
   \else\ifx\@tmpb\empty% (A)
    \hphenanthrenev[acgiop]{#2}%
   \else\if\@tmpb A% circle type
    \hphenanthrenev[AC]{#2}%
   \else 
    \hphenanthrenev[acgiop]{#2}%
  \fi\fi\fi%
 \else 
    \hphenanthrenev[@#1]{#2}%
 \fi\fi\fi\fi\fi%
}%               %end of \phenanthrenev macro%
%    \end{macrocode}
% \end{macro}
%
% \section{Steroids}
% \subsection{Steroids without a chain}
%
% The macro |\steroid| is used for drawing steroids.  
% 
% The macro |\steroid| has an argument |SUBSLIST| as well as an 
% optional argument |BONDLIST|.  
%
% \begin{verbatim}
% ***********************
% * steroid derivatives *
% ***********************
%  
%   \steroid[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to t, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A, B, or C indicates an aromatic bond 
% pattern (circle). 
% \changes{v1.02}{1998/10/15}{BONDLIST: k, K, h, H, o and O 
% at the fused bond}
%
% \begin{verbatim}
%     BONDLIST = 
%
%           none:  steroid skeleton
%           a   :  1,2-double bond        b   :  2,3-double bond
%           c   :  3,4-double bond        d   :  4,5-double bond
%           e   :  6,5-double bond        f   :  6,7-double bond
%           g   :  7,8-double bond        
%           h   :  9,8-double bond
%           h   :  9,8-double bond in the other bond
%           i   :  9,10-double bond       j   :  1,10-double bond
%           k   :  5,10-double bond
%           K   :  5,10-double bond in the other bond
%           l   :  9,11-double bond
%           m   :  12,11-double bond      n   :  12,13-double bond
%           o   :  14,13-double bond
%           O   :  14,13-double bond in the other bond
%           p   :  8,14-double bond
%           q   :  14,15-double bond      r   :  15,16-double bond
%           s   :  17,16-double bond      t   :  17,13-double bond
%           A   :  aromatic A ring        B   :  aromatic B ring
%           C   :  aromatic C ring
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%
%     SUBSLIST: list of substituents
%
%       for n = 1 to 17 (execpt fused positions)
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           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}
%
% For numbers larger than 9 (two digits), you should designate
% the SUBSLIST as 
%
% \begin{verbatim}
%             {{11}A}==Cl;{{12}SA}==H;{{12}SB}==Cl;
% \end{verbatim}
%
% \begin{verbatim}
%       for n = 5,8,9,10,13 and 14 (fused positions)
%
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           nU         :  unspecified single bond at n-atom
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \steroid{1==Cl;2==F;{{10}}==OH}
%        \steroid[c]{1==Cl;4==F;2==CH$_{3}$;
%            {{11}SA}==OH;{{11}SB}==OH}
%        \steroid[eb]{1D==O;4SA==MeO;4SB==OMe;
%                   5==Cl;6==Cl;7==Cl;8==Cl}
% \end{verbatim}
% \changes{v1.02}{1998/10/15}{The command \cs{setdecaringv} has 
% been stopped to use.}
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v1.02}{1998/10/31}{Inner commands \cs{yl@steroidposition} 
% and \cs{@steroidskeleton} are separated from the \cs{@steroid} command.}
% \changes{v2.00}{1998/12/5}{Add: fused rings}
%
% \begin{macro}{\steroid}
% \begin{macro}{\yl@steroidposition}
% \begin{macro}{\@steroidskeleton}
%    \begin{macrocode}
\def\steroid{\@ifnextchar[{\@steroid[@}{\@steroid[Z]}}
\def\@steroid[#1]#2{%
%initialize bug fix 2010/10/01
\iniatom\iniflag%initialize
% bonds for outer skeleton
\@reset@ylsw\reset@@yl
\yl@steroidposition{#2}%
\if@ylsw
 \yl@shiftii=\@ylii 
 \ifx\@@ylii\empty\else
 \advance\yl@shiftii\@@ylii\fi
 \yl@shifti=\@yli 
 \ifx\@@yli\empty\else
 \advance\yl@shifti\@@yli\fi
 \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}(1600,1300)(-\shiftii,-\shifti)
  \origptoutput{steroid}%
\fi
  \Put@Direct(0,0){\@steroidskeleton{#1}{#2}}%
\end{sfpicture}}%               %end of \steroid macro%
%    \end{macrocode}
%
% The |\yl@steroidposition| is derived from |\ylposition| and 
% |\ylatombondposition| to use in the |\steroid| command as well as 
% in the |\steroidchain| command.
% \changes{v1.02}{1998/10/31}{Inner commands \cs{yl@steroidposition} 
% and \cs{@steroidskeleton} are separated from the \cs{@steroid} command.}
% 
%    \begin{macrocode}
\def\yl@steroidposition#1{%
\ylposition{#1}{0}{0}{2}{0}%  %for 1
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi
\else
\ylposition{#1}{8}{3}{7}{-1}%  %for 2 to 4 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{0}\def\@@yli{0}\fi\else
\ylposition{#1}{10}{2}{5}{-1}% %for 6 to 7 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{0}\fi\else
\ylposition{#1}{-11}{0}{2}{0}%for 12 position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-513}\def\@@yli{-303}\fi\else
\ylposition{#1}{-5}{5}{7}{0}% %for 11 position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-513}\def\@@yli{-303}\fi\else
\ylposition{#1}{18}{0}{4}{-1}%for 15 to 17 positions
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-855}\def\@@yli{-303}\fi\else
\ylatombondposition{#1}{-4}{7}%     % for 5
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-171}\def\@@yli{-103}\fi\else
\ylatombondposition{#1}{-9}{1}%     % for 10
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-171}\def\@@yli{-303}\fi\else
\ylatombondposition{#1}{-7}{1}%     % for 8
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-513}\def\@@yli{-303}\fi\else
\ylatombondposition{#1}{-8}{7}%     % for 9
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-342}\def\@@yli{-406}\fi\else
\ylatombondposition{#1}{-13}{7}%    % for 14
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-684}\def\@@yli{-406}\fi\else
\ylatombondposition{#1}{-12}{1}%    % for 13
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-684}\def\@@yli{-606}\fi\fi%
}% end of \yl@steroidposition
%    \end{macrocode}
%
% The |\@steroidskeleton| is separated from the definition of |\steroid| 
% so as to be used also in the definition of |\steroidchain|. 
% \changes{v1.02}{1998/10/31}{Inner commands \cs{yl@steroidposition} 
% and \cs{@steroidskeleton} are separated from the \cs{@steroid} command.}
% \changes{v2.00}{1998/11/23}{Added: fused rings}
%
%    \begin{macrocode}
\def\@steroidskeleton#1#2{%
  \Put@Line(0,406)(-5,-3){171}%       %bond 1-2
  \Put@Line(0,406)(5,-3){171}%        %bond 1-10
  \Put@Line(0,0)(-5,3){171}%          %bond 4-3
  \Put@Line(0,0)(5,3){171}%           %bond 4-5
  \Put@Line(171,103)(0,1){200}%       %bond 5-10
  \Put@Line(-171,103)(0,1){200}%      %bond 3-2
  \Put@Line(342,406)(-5,-3){171}%     %bond 9-10
  \Put@Line(342,406)(5,-3){171}%      %bond 9-8
  \Put@Line(342,0)(-5,3){171}%        %bond 6-5
  \Put@Line(342,0)(5,3){171}%         %bond 6-7
  \Put@Line(513,103)(0,1){200}%       %bond 7-8
  %%%%
  \Put@Line(342,406)(0,1){200}%       %bond 9-11
  \Put@Line(513,709)(-5,-3){171}%     %bond 12-11
  \Put@Line(513,709)(5,-3){171}%      %bond 12-13
  \Put@Line(684,406)(0,1){200}%       %bond 14-13
  \Put@Line(513,303)(5,3){171}%       %bond 8-14
  %%%%
  \Put@Line(855,709)(-5,-3){171}%     %bond 17-13
  \Put@Line(855,709)(5,-3){171}%      %bond 17-16
  \Put@Line(1026,406)(0,1){200}%      %bond 15-16
  \Put@Line(684,406)(1,0){342}%       %bond 14-15
% inner double bonds
\@tfor\member:=#1\do{%
\if\member Z%no endcyclic double bonds
\else\if\member a%
  \Put@Line(-6,364)(-5,-3){126}%      %double bond 1-2 5-6
\else\if\member b%
  \Put@Line(-138,129)(0,1){148}%      %double bond 3-2 6-7
\else\if\member c%
  \Put@Line(-6,42)(-5,3){126}%        %double bond 4-3 8-7
\else\if\member d%
  \Put@Line(6,42)(5,3){126}%          %double bond 4-5 8-8a
\else\if\member e%
  \Put@Line(348,42)(-5,3){126}%       %double bond 6-5 9-8a
\else\if\member f%
  \Put@Line(348,42)(5,3){126}%        %double bond 6-7 9-10
\else\if\member g%
  \Put@Line(482,129)(0,1){148}%       %double bond 7-8 10-10a
\else\if\member h%
  \Put@Line(507,345)(-5,3){126}%      %double bond 8-9  10a-4a
\else\if\member H%
  \Put@Line(348,364)(5,-3){126}%     %double bond 9-8  4a-10a
\else\if\member i%
  \Put@Line(348,364)(-5,-3){126}%     %double bond 9-10  4a-4b
\else\if\member j%
  \Put@Line(6,364)(5,-3){126}%        %double bond 1-10 5-4b
\else\if\member k%
  \Put@Line(138,129)(0,1){148}%       %double bond 5-10 8a-4b
\else\if\member K%
  \Put@Line(204,129)(0,1){148}%       %double bond 5-10 8a-4b
\else\if\member l%
  \Put@Line(375,432)(0,1){148}%       %double bond 9-11    4-5
\else\if\member m%
  \Put@Line(519,667)(-5,-3){126}%     %double bond 12-11   3-4
\else\if\member n%
  \Put@Line(519,667)(5,-3){126}%      %double bond 12-13   3-2
\else\if\member o%
  \Put@Line(651,432)(0,1){148}%       %double bond 13-14  1-2
\else\if\member O%
  \Put@Line(717,432)(0,1){148}%       %double bond 13-14  1-2
\else\if\member p%
  \Put@Line(519,345)(5,3){126}%       %double bond 8-14 10a-1
\else\if\member q%
  \Put@Line(720,439)(1,0){260}%       %double bond 14-15
\else\if\member r%
  \Put@Line(993,432)(0,1){148}%       %double bond 15-16  1-2
\else\if\member s%
  \Put@Line(861,667)(5,-3){126}%      %double bond 17-16   3-2
\else\if\member t%
  \Put@Line(861,667)(-5,-3){126}%     %double bond 17-13   3-4
\else\if\member A%left aromatic circle 
  \Put@oCircle(0,203){240}%            %circle
\else\if\member B%right aromatic circle 
  \Put@oCircle(342,203){240}%          %circle
\else\if\member C%right aromatic circle 
  \Put@oCircle(513,506){240}%          %circle
\else
% setting fused rings
  \expandafter\twoCH@R\member//%
  \set@fusion@steroid
\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}%
%exocyclic bonds and substituents
\iniflag
\global\drawsamesubsttrue%2002/05/30 warning on
\Put@Direct(0,0){\setsixringv{#2}{0}{0}{2}{0}}%  %for 1
\global\drawsamesubstfalse%2002/05/30 warning off
\Put@Direct(0,0){\setsixringv{#2}{8}{3}{7}{-1}}%  %for 2 to 4 positions
\Put@Direct(342,0){\setsixringv{#2}{10}{2}{5}{-1}}% %for 6 to 7 positions
\Put@Direct(513,303){\setsixringv{#2}{-11}{0}{2}{0}}%for 12 position
\Put@Direct(513,303){\setsixringv{#2}{-5}{5}{7}{0}}% %for 11 position
\Put@Direct(855,303){\setsixringv{#2}{18}{0}{4}{-1}}%for 15 to 17 positions
%bonds and substituents for fused positions
\Put@Direct(171,103){\setatombond{#2}{-4}{7}}%     % for 5
\Put@Direct(171,303){\setatombond{#2}{-9}{1}}%     % for 10
\Put@Direct(513,303){\setatombond{#2}{-7}{1}}%     % for 8
\Put@Direct(342,406){\setatombond{#2}{-8}{7}}%     % for 9
\Put@Direct(684,406){\setatombond{#2}{-13}{7}}%    % for 14
\Put@Direct(684,606){\setatombond{#2}{-12}{1}}%    % for 13
}% end of \@steroidskeleton
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The macro |\set@fusion@steroid| is an inner command contained 
% in the definition of |\steroidskeleton|, 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@steroid}
% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@steroid}}
%    \begin{macrocode}
\def\set@fusion@steroid{%
  \let\@@tmpa=\@tmpa
  \let\@@tmpb=\@tmpb
  \if\@tmpa a%
      \edef\@@tmpa{f}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa A%
      \edef\@@tmpa{F}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa b%
      \edef\@@tmpa{e}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
  \else\if\@tmpa B%
      \edef\@@tmpa{E}%
      \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{c}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `d'}%
      \fi
  \else\if\@tmpa D%
      \edef\@@tmpa{C}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `D'}%
      \fi
  \else\if\@tmpa e%
      \edef\@@tmpa{d}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `e'}%
      \fi
  \else\if\@tmpa E%
      \edef\@@tmpa{D}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `E'}%
      \fi
  \else\if\@tmpa f%
      \edef\@@tmpa{c}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `f'}%
      \fi
  \else\if\@tmpa F%
      \edef\@@tmpa{C}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `f'}%
      \fi
  \else\if\@tmpa g%
      \edef\@@tmpa{b}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `g'}%
      \fi
  \else\if\@tmpa G%
      \edef\@@tmpa{B}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `g'}%
      \fi
  \else\if\@tmpa h%
      \edef\@@tmpa{a}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Forbidden Fusion for bond `h'}%
      \fi
  \else\if\@tmpa H%
      \edef\@@tmpa{A}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Forbidden Fusion for bond `H'}%
      \fi
  \else\if\@tmpa i%
      \edef\@@tmpa{f}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `i'}%
      \fi
  \else\if\@tmpa I%
      \edef\@@tmpa{F}%
      \Put@Direct(342,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `I'}%
      \fi
  \else\if\@tmpa j%
      \edef\@@tmpa{a}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `j'}%
      \fi
  \else\if\@tmpa J%
      \edef\@@tmpa{A}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `J'}%
      \fi
  \else\if\@tmpa k%
      \edef\@@tmpa{b}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Forbidden Fusion for bond `k'}%
      \fi
  \else\if\@tmpa K%
      \edef\@@tmpa{B}%
      \Put@Direct(0,0){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Forbidden Fusion for bond `K'}%
      \fi
  \else\if\@tmpa l%
      \edef\@@tmpa{e}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `l'}%
      \fi
  \else\if\@tmpa L%
      \edef\@@tmpa{E}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `L'}%
      \fi
  \else\if\@tmpa m%
      \edef\@@tmpa{f}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa M%
      \edef\@@tmpa{F}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
  \else\if\@tmpa n%
      \edef\@@tmpa{a}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `n'}%
      \fi
  \else\if\@tmpa N%
      \edef\@@tmpa{A}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `N'}%
      \fi
  \else\if\@tmpa o%
      \edef\@@tmpa{b}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Forbidden Fusion for bond `o'}%
      \fi
  \else\if\@tmpa O%
      \edef\@@tmpa{B}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Forbidden Fusion for bond `O'}%
      \fi
  \else\if\@tmpa p%
      \edef\@@tmpa{c}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `N'}%
      \fi
  \else\if\@tmpa P%
      \edef\@@tmpa{C}%
      \Put@Direct(513,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `N'}%
      \fi
  \else\if\@tmpa q%
       \XyMTeXWarning{Mismatched dimension for bond `q'}%
  \else\if\@tmpa Q%
       \XyMTeXWarning{Mismatched dimension for bond `Q'}%
  \else\if\@tmpa r%
      \edef\@@tmpa{b}%
      \Put@Direct(855,303){\set@fusionadd@sixv}%
  \else\if\@tmpa R%
      \edef\@@tmpa{B}%
      \Put@Direct(855,303){\set@fusionadd@sixv}%
  \else\if\@tmpa s%
      \edef\@@tmpa{a}%
      \Put@Direct(855,303){\set@fusionadd@sixv}%
  \else\if\@tmpa S%
      \edef\@@tmpa{A}%
      \Put@Direct(855,303){\set@fusionadd@sixv}%
  \else\if\@tmpa t%
      \edef\@@tmpa{f}%
      \Put@Direct(855,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `t'}%
      \fi
  \else\if\@tmpa T%
      \edef\@@tmpa{F}%
      \Put@Direct(855,303){\set@fusionadd@sixv}%
      \if@smallringsw\else
       \XyMTeXWarning{Unfavorable Fusion for bond `T'}%
      \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\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}% end of the macro \set@fusion@steroid
%    \end{macrocode}
% \end{macro}
%
% \subsection{Steroids with a chain}
%
% The macro |\steroidchain| is used for drawing steroids.  
% 
% The macro |\steroidchain| has an argument |SUBSLIST| as well as an 
% optional argument |BONDLIST|.  
%
% \begin{verbatim}
% **************************************
% * steroid derivatives having a chain *
% **************************************
%  
%   \steroidchain[BONDLIST]{SUBSLIST}          
% \end{verbatim}
%
% The |BONDLIST| argument contains one or more 
% characters selected form a to t, each of which indicates 
% the presence of an inner (endcyclic) double bond on the corresponding 
% position. The character A, B, or C indicates an aromatic bond 
% pattern (circle).  A two-character string `Z?' indicates 
% a double bond in the side-chain. 
%
% \begin{verbatim}
%     BONDLIST = 
%
%       (double bonds for the steroid skeleton)
%           none:  no action on the steroid skeleton
%           a   :  1,2-double bond        b   :  2,3-double bond
%           c   :  3,4-double bond        d   :  4,5-double bond
%           e   :  6,5-double bond        f   :  6,7-double bond
%           g   :  7,8-double bond        h   :  9,8-double bond
%           i   :  9,10-double bond       j   :  1,10-double bond
%           k   :  5,10-double bond       l   :  9,11-double bond
%           m   :  12,11-double bond      n   :  12,13-double bond
%           o   :  14,13-double bond      p   :  8,14-double bond
%           q   :  14,15-double bond      r   :  15,16-double bond
%           s   :  17,16-double bond      t   :  17,13-double bond
%           A   :  aromatic A ring        B   :  aromatic B ring
%           C   :  aromatic C ring
% \end{verbatim}
%
% \begin{verbatim}
%       (double bonds for the side chain)
%           Z   :  no action
%          Za   :  17,20-double bond     Zb   :  20,22-double bond
%          Zc   :  22,23-double bond     Zd   :  23,24-double bond
%          Ze   :  24,25-double bond     Zf   :  25,26-double bond
%          Zg   :  25,27-double bond
% \end{verbatim}
%
%  For a two-character indicator, you should write the BONDLIST 
%  as, e.g.
%
% \begin{verbatim}
%              [b{Za}{Zc}...]
% \end{verbatim}
%
% The |SUBSLIST| argument contains one or more substitution descriptors 
% which are separated from each other by a semicolon.  Each substitution 
% descriptor has a locant number with a bond modifier and a substituent, 
% where these are separated with a double equality symbol. 
%
% \begin{verbatim}
%     SUBSLIST: list of substituents
%
%       for n = 1 to 24 (execpt fused positions)
%
%           nD         :  exocyclic double bond at n-atom
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           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}
%
% For numbers larger than 9 (two digits), you should designate
% the SUBSLIST as 
%
% \begin{verbatim}
%             {{11}A}==Cl;{{12}SA}==H;{{12}SB}==Cl; ...
% \end{verbatim}
%
% \begin{verbatim}
%       for n = 5,8,9,10,13,14,and 25 (fused positions etc.)
%
%           n or nS    :  exocyclic single bond at n-atom
%           nA         :  alpha single bond at n-atom (boldface)
%           nB         :  beta single bond at n-atom (dotted line)
%           nU         :  unspecified single bond at n-atom
% \end{verbatim}
%
% \begin{verbatim}
%       e.g. 
%        
%        \steroidchain{1==Cl;2==F;{{10}}==OH}
%        \steroidchain[c]{1==Cl;4==F;2==CH$_{3}$;%
%            {{11}SA}==OH;{{11}SB}==OH}
%        \steroidchain[b]{1D==O;4SA==MeO;4SB==OMe;%
%                   ;6==Cl;7==Cl;11==Cl}
% \end{verbatim}
%
% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
% \cs{ylfusedposition}, 
% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli}, 
% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
% \changes{v1.02}{1998/10/31}{The inner commands \cs{yl@steroidposition} 
% is used.  The old \cs{steroid} is replaced by \cs{@steroidskeleton}.}
% \changes{v2.00}{1998/11/31}{Add: fused rings}
%
% \begin{macro}{\steroidchain}
%    \begin{macrocode}
\def\steroidchain{\@ifnextchar[{\@steroidchain[@}{\@steroidchain[Z]}}
\def\@steroidchain[#1]#2{%
%shift due to the steroid skeleton
\@reset@ylsw\reset@@yl
\yl@steroidposition{#2}%
%shift due to the side chain
\ylposition{#2}{-21}{0}{3}{0}%for 22 and 23 positions
\if@ylsw \ifx\@@ylii\empty
\def\@@ylii{-1026}\def\@@yli{-606}\fi
\else
\ylposition{#2}{-14}{5}{7}{0}%for 20 position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-1026}\def\@@yli{-606}\fi\else
\ylposition{#2}{-20}{3}{5}{0}%for 24 position
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-1197}\def\@@yli{-709}\fi\else
\ylatombondposition{#2}{-24}{4}%      % for 5
\fi
\if@ylsw\ifx\@@ylii\empty
\def\@@ylii{-1397}\def\@@yli{-709}\fi\fi
\if@ylsw
 \yl@shiftii=\@ylii 
 \ifx\@@ylii\empty\else
 \advance\yl@shiftii\@@ylii\fi
 \yl@shifti=\@yli 
 \ifx\@@yli\empty\else
 \advance\yl@shifti\@@yli\fi
 \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}(2000,1500)(-\shiftii,-\shifti)%
  \iforigpt \typeout{command `steroidchain' is based on `steroid'.}\fi%
\fi
% steroid skeleton
  \Put@Direct(0,0){\@steroidskeleton{#1}{#2}}%
% bonds for the side chain (carbons 20 to 27 (except 21))
  \Put@Line(855,709)(0,1){200}%       %bond 17-20
  \Put@Line(1026,1012)(-5,-3){171}%   %bond 22-20
  \Put@Line(1026,1012)(5,-3){171}%    %bond 22-23
  \Put@Line(1197,709)(0,1){200}%      %bond 24-23
  \Put@Line(1197,709)(1,0){200}%      %bond 24-25
  \Put@Line(1397,709)(3,5){103}%      %bond 25-26
  \Put@Line(1397,709)(3,-5){103}%     %bond 25-27
% double bonds along the side chain
\@tfor\member:=#1\do{%
\expandafter\twoCH@R\member//\relax%
\if\@tmpa Z\relax%
 \ifx\@tmpb\empty%no action
 \else\if\@tmpb a%
  \Put@Line(888,735)(0,1){148}%       %double bond 17-20
 \else\if\@tmpb b%
  \Put@Line(1020,970)(-5,-3){126}%    %double bond 22-20
 \else\if\@tmpb c%
  \Put@Line(1032,970)(5,-3){126}%     %double bond 22-23
 \else\if\@tmpb d%
  \Put@Line(1164,735)(0,1){148}%      %double bond 24-23
 \else\if\@tmpb e%
  \Put@Line(1233,742)(1,0){140}%      %double bond 24-25
 \else\if\@tmpb f%
  \Put@Line(1433,715)(3,5){72}%       %double bond 25-26
 \else\if\@tmpb g%
  \Put@Line(1433,697)(3,-5){72}%      %double bond 25-27
 \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
% substitution on the side chain
%\global\drawsamesubsttrue%2002/05/30 warning on
\Put@Direct(1026,606){\setsixringv{#2}{-21}{0}{3}{0}}%for 22 and 23 positions
%\global\drawsamesubstfalse%2002/05/30 warning off
\Put@Direct(1026,606){\setsixringv{#2}{-14}{5}{7}{0}}%for 20 position
\Put@Direct(1197,709){\setsixringv{#2}{-20}{3}{5}{0}}%for 24 position
\Put@Direct(1397,709){\setatombond{#2}{-24}{4}}%      % for 5
\end{sfpicture}}%               %end of \steroidchain macro%
%</carom>
%    \end{macrocode}
% \end{macro}
%
% \Finale
%
\endinput
