summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xymtex/base/hetaromh.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/xymtex/base/hetaromh.dtx')
-rw-r--r--macros/latex/contrib/xymtex/base/hetaromh.dtx6287
1 files changed, 6287 insertions, 0 deletions
diff --git a/macros/latex/contrib/xymtex/base/hetaromh.dtx b/macros/latex/contrib/xymtex/base/hetaromh.dtx
new file mode 100644
index 0000000000..88374187ae
--- /dev/null
+++ b/macros/latex/contrib/xymtex/base/hetaromh.dtx
@@ -0,0 +1,6287 @@
+% \iffalse meta-comment
+%% File: hetaromh.dtx
+%
+% Copyright 1993,1996,1998,2000,2001,2002,2004,2006,2010,2013 by Shinsaku Fujita
+%
+% This file is part of XyMTeX system.
+% -------------------------------------
+%
+% This file is a successor to:
+%
+% hetaromh.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 hetaromh.dtx and hetaromh.ins
+% and the derived file hetaromh.sty.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Shonan Institute of Chemoinformatics and Mathematical Chemistry
+% Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan
+% (old address)
+% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
+% Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
+% (old address)
+% Department of Chemistry and Materials Technology,
+% Kyoto Institute of Technology, \\
+% Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{December 01, 1993}
+% \def\versi@nno{ver1.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{August 16, 1996}
+% \def\versi@nno{ver1.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{October 31, 1998}
+% \def\versi@nno{ver1.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{December 25, 1998}
+% \def\versi@nno{ver2.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{November 11, 2000}
+% \def\versi@nno{ver2.00a}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{June 20, 2001}
+% \def\versi@nno{ver2.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{April 30, 2002}
+% \def\versi@nno{ver3.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{May 30, 2002}
+% \def\versi@nno{ver4.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{August 30, 2004}
+% \def\versi@nno{ver4.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{December 20, 2004}
+% \def\versi@nno{ver4.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{September 5, 2006}
+% \def\versi@nno{ver4.03b}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetaromh}
+% \def\versi@ndate{October 01, 2010}
+% \def\versi@nno{ver5.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{5645}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+%
+% \StopEventually{}
+% \MakeShortVerb{\|}
+%
+% \iffalse
+% \changes{v1.01}{1996/06/26}{first edition for LaTeX2e}
+% \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e}
+% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
+% \changes{v2.00a}{2000/11/11}{bug fix}
+% \changes{v2.01}{2001/6/20}{Size reduction and clipping information}
+% \changes{v3.00}{2002/4/30}{sfpicture enviroment etc.}
+% \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv}
+% \changes{v4.01}{2004/08/30}{Minor additions}
+% \changes{v4.02}{2004/12/20}{Exception to wedged bonds}
+% \changes{v4.02a}{2004/12/27}{Bug fix: \cs{ggg} to \cs{gggA}}
+% \changes{v4.03b}{2006/9/5}{Bug fix: \cs{ggg} to \cs{gggA} revised}
+% \changes{v5.00}{2010/10/01}{the LaTeX Project Public License}
+% \changes{v5.01}{2013/03/19}{added \cs{pyrazinehi}, \cs{oxiraneh}, etc.}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+\ProvidesFile{hetaromh.dtx}[2013/03/19 v5.01 XyMTeX{} package file]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{hetaromh.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{Heterocycles of horizontal type by {\sffamily hetaromh.sty}
+(\fileversion) of \XyMTeX{}}
+\author{Shinsaku Fujita \\
+Shonan Institute of Chemoinformatics and Mathematical Chemistry, \\
+Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-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{hetaromh.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \section{Introduction}\label{hetaromh:intro}
+%
+% \subsection{Options for {\sffamily docstrip}}
+%
+% \DeleteShortVerb{\|}
+% \begin{center}
+% \begin{tabular}{|l|l|}
+% \hline
+% \emph{option} & \emph{function}\\ \hline
+% hetaromh & hetaromh.sty \\
+% driver & driver for this dtx file \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \MakeShortVerb{\|}
+%
+% \subsection{Version Information}
+%
+% \begin{macrocode}
+%<*hetaromh>
+\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.01}
+\typeout{ -- Released March 19, 2013 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{hetaromh}
+\def\versi@ndate{March 19, 2013}
+\def\versi@nno{ver5.01}
+\def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
+\space[\copyrighth@lder]}
+% \end{macrocode}
+%
+% \section{List of commands for hetaromh.sty}
+%
+% \begin{verbatim}
+%
+% **********************************
+% * hetaromh.sty: list of commands *
+% **********************************
+%
+% <Conventions for bond-setting>
+%
+% \hbonda
+% \hbondf
+% \hbondb
+% \hbondc
+% \hbondd
+% \hbonde
+% \hbondvert
+% \hbondverti
+%
+% \hskbonda
+% \hskbondf
+% \hskbondc
+% \hskbondd
+% \hskbondb
+% \hskbonde
+% \hskbondvert
+% \hskbondverti
+%
+% \dothskbonda
+% \dothskbondf
+% \dothskbondc
+% \dothskbondd
+% \dothskbondb
+% \dothskbonde
+% \dothskbondvert
+% \dothskbondverti
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Six-membered heterocycles (horizontal)>
+%
+% Basic Macros
+%
+% \sixheteroh \@sixheteroh
+% \sixheterohi \@sixheterohi
+%
+% Application Macros
+%
+% \pyridineh \@pyridineh
+% \pyridinehi \@pyridinehi
+% \pyrazineh \@pyrazineh
+% \pyrazinehi \@pyrazinehi
+% \pyrimidineh \@pyrimidineh
+% \pyrimidinehi \@pyrimidinehi
+% \pyridazineh \@pyridazineh
+% \pyridazinehi \@pyridazinehi
+% \triazineh \@triazineh
+% \triazinehi \@triazinehi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Five-membered heterocycles (horizontal)>
+%
+% Basic Macros
+%
+% \fiveheteroh \@fiveheteroh
+% \fiveheterohi \@fiveheterohi
+%
+% Application Macros
+%
+% \pyrroleh \@pyrroleh
+% \pyrazoleh \@pyrazoleh
+% \imidazoleh \@imidazoleh
+% \isoxazoleh \@isoxazoleh
+% \oxazoleh \@oxazoleh
+%
+% \furanh \@furanh
+% \thiopheneh \@thiopheneh
+%
+% \pyrrolehi \@pyrrolehi
+% \pyrazolehi \@pyrazolehi
+% \imidazolehi \@imidazolehi
+% \isoxazolehi \@isoxazolehi
+% \oxazolehi \@oxazolehi
+%
+% \furanhi \@furanhi
+% \thiophenehi \@thiophenehi
+%
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Six-Six fused heterocycles (horizontal)>
+%
+% Basic Macros
+%
+% \decaheteroh \@decaheteroh
+% \decaheterohi \@decaheterohi
+%
+% Application Macros
+%
+% \quinolineh \@quinolineh
+% \quinolinehi \@quinolinehi
+% \isoquinolineh \@isoquinolineh
+% \isoquinolinehi \@isoquinolinehi
+% \quinoxalineh \@quinoxalineh
+% \quinoxalinehi \@quinoxalinehi
+% \quinazolineh \@quinazolineh
+% \quinazolinehi \@quinazolinehi
+% \cinnolineh \@cinnolineh
+% \cinnolinehi \@cinnolinehi
+% \pteridineh \@pteridineh
+% \pteridinehi \@pteridinehi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Six-Five fused heterocycles (horizontal)>
+%
+% Basic Macros
+%
+% \nonaheteroh \@nonaheteroh
+% \nonaheterohi \@nonaheterohi
+%
+% Application Macros
+%
+% \purineh \@purineh
+% \purinehi \@purinehi
+% \indoleh \@indoleh
+% \indolehi \@indolehi
+% \indolizineh \@indolizineh
+% \indolizinehi \@indolizinehi
+% \isoindoleh \@isoindoleh
+% \isoindolehi \@isoindolehi
+% \benzofuraneh \@benzofuraneh
+% \benzofuranehi \@benzofuranehi
+% \isobenzofuraneh \@isobenzofuraneh
+% \isobenzofuranehi \@isobenzofuranehi
+% \benzoxazoleh \@benzoxazoleh
+% \benzoxazolehi \@benzoxazolehi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Building units>
+%
+% \sixunith \@sixunith
+% \fiveunith \@fiveunith
+% \fiveunithi \@fiveunithi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Three-membered rings>
+%
+% \threeheteroh \@threeheteroh
+% \threeheterohi \@threeheterohi
+%
+% Application Macros
+% \oxiraneh \oxiranehi
+% \aziridineh \aziridinehi
+% \thiiraneh \thiiranehi
+% \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 hetaromh.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{test@vertix@decavi}{\input hetarom.sty\relax}{}%
+\unitlength=0.1pt%
+% \end{macrocode}
+%
+% \section{Various switches}
+%
+% These control sequences have been commented out, since they are
+% defined elsewhere.
+%
+% \begin{macrocode}
+% % ****************************
+% % * various flags (switches) *
+% % ****************************
+% \newif\if@gclip \@gclipfalse%
+% \newif\if@hclip \@hclipfalse%
+% \newif\if@iclip \@iclipfalse%
+% \newif\if@jclip \@jclipfalse%
+% \def\iniflag{%
+% \@aclipfalse \@bclipfalse\@cclipfalse\@clipfalse\@eclipfalse%
+% \@fclipfalse\@gclipfalse\@hclipfalse\@iclipfalse\@jclipfalse%
+% \@clipfusefalse}%
+% \def\iniatom{%
+% \def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
+% \def\gggA{}\def\hhh{}\def\iii{}\def\jjj{}%
+% \def\@aaa{}\def\@bbb{}\def\@ccc{}\def\@ddd{}\def\@eee{}\def\@fff{}%
+% }%
+% \def\resetbdsw{\gdef\@aaa{a}\gdef\@bbb{b}\gdef\@ccc{c}%
+% \gdef\@ddd{d}\gdef\@eee{e}\gdef\@fff{f}}%
+%
+\iniatom%
+% \end{macrocode}
+%
+% \section{Macros for setting bonds}
+% \subsection{Inner double bonds}
+%
+% The macros |\sixheteroh| and |\fiveheteroh| use internal macros for setting
+% inner double bonds in accordance with the presence or the absence of
+% hetero atoms. During the processes of such setting,
+% the inner macros |\hbonda| to |\hbondf| are used to set a bond
+% on each edge of a six- or five-membered ring; and
+% the inner macros |\hbondvert| and |\hbondverti| draw vertical bonds
+% of a five-membered ring.
+%
+% Note that
+% comments (conerning locant numbers) on the end of each row have
+% lost the exact meaning,
+% since such a command moiety is used in many macros after copying.
+%
+% \begin{verbatim}
+% ******************************
+% * setting inner double bonds *
+% ******************************
+%
+% b
+% (bbb) 2 3 (ccc)
+% a ----- c
+% * *
+% the original point ===> 1 * (aaa) * 4 (ddd)
+% (0,0) * * c
+% f -----
+% (fff) 6 5 (eee)
+% e
+% \end{verbatim}
+%
+% \begin{macro}{\hbonda}
+% The macro |\hbonda| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\aaa| and |\bbb|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% bond between 1 and 2
+\def\hbonda{%
+ \ifx\aaa\empty%
+ \ifx\bbb\empty%
+ \Put@Line(42,6)(3,5){78}% %double bond 1-2
+ \else%
+ \Put@Line(42,6)(3,5){62}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \Put@Line(57,36)(3,5){62}% %double bond 1-2
+ \else%
+ \Put@Line(57,36)(3,5){62}% %double bond 1-2
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbondf}
+% The macro |\hbondf| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\aaa| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% bond between 1 and 6
+\def\hbondf{%
+ \ifx\aaa\empty%
+ \ifx\fff\empty%
+ \Put@Line(42,-6)(3,-5){78}% %double bond 1-6
+ \else%
+ \Put@Line(42,-6)(3,-5){62}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \Put@Line(57,-36)(3,-5){62}% %double bond 1-6
+ \else%
+ \Put@Line(57,-36)(3,-5){62}% %double bond 1-6
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbondb}
+% The macro |\hbondf| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\bbb| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% bond between 3 and 2
+ \def\hbondb{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \Put@Line(129,138)(1,0){148}% %double bond 2-3
+ \else%
+ \Put@Line(129,138)(1,0){134}% %double bond 3-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \Put@Line(143,138)(1,0){134}% %double bond 3-2
+ \else%
+ \Put@Line(143,138)(1,0){110}% %double bond 3-2
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbondc}
+% The macro |\hbondc| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ddd| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% bond between 4 and 3
+ \def\hbondc{%
+ \ifx\ddd\empty%
+ \ifx\ccc\empty%
+ \Put@Line(364,6)(-3,5){78}% %double bond 4-3
+ \else%
+ \Put@Line(364,6)(-3,5){62}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \Put@Line(349,36)(-3,5){62}% %double bond 4-3
+ \else%
+ \Put@Line(349,36)(-3,5){62}% %double bond 4-3
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbondd}
+% The macro |\hbondf| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ddd| and |\eee|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% bond between 4 and 5
+ \def\hbondd{%
+ \ifx\ddd\empty%
+ \ifx\eee\empty%
+ \Put@Line(364,-6)(-3,-5){78}% %double bond 4-5
+ \else%
+ \Put@Line(364,-6)(-3,-5){62}% %double bond 4-5
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \Put@Line(349,-36)(-3,-5){62}% %double bond 4-5
+ \else%
+ \Put@Line(349,-36)(-3,-5){62}% %double bond 4-5
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbonde}
+% The macro |\hbonde| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\fff| and |\eee|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% bond between 5 and 6
+\def\hbonde{%
+ \ifx\fff\empty%
+ \ifx\eee\empty%
+ \Put@Line(129,-138)(1,0){148}% %double bond 6-5
+ \else%
+ \Put@Line(129,-138)(1,0){134}% %double bond 5-6
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \Put@Line(143,-138)(1,0){134}% %double bond 5-6
+ \else%
+ \Put@Line(143,-138)(1,0){110}% %double bond 5-6
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbondvert}
+% The macro |\hbondvert| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\fff| and |\bbb|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% vertical inner bond for five-membered rings
+\def\hbondvert{%
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \Put@Line(136,-138)(0,1){277}% %double bond 4-3
+ \else%
+ \Put@Line(136,-138)(0,1){258}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \Put@Line(136,-120)(0,1){258}% %double bond 4-3
+ \else
+ \Put@Line(136,-120)(0,1){239}% %double bond 4-3
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hbondverti}
+% The macro |\hbondverti| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ccc| and |\eee|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+% horizontal inner bond for five-membered rings (inverse type)
+\def\hbondverti{%
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \Put@Line(270,-138)(0,0){277}% %double bond 4-3
+ \else%
+ \Put@Line(270,-138)(0,1){258}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \Put@Line(270,-120)(0,1){258}% %double bond 4-3
+ \else%
+ \Put@Line(270,-120)(0,1){239}% %double bond 4-3
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Skeletal bonds}
+%
+% The macros |\sixheteroh| and |\fiveheteroh| use inner macros for setting
+% skeletal bonds in accordance with the presence or the absence of
+% hetero atoms. During the processes of such setting,
+% the inner macros |\skbonda| to |\skbondf| are used to set a bond
+% on each edge of a six- or five-membered ring; and
+% the inner macros |\hskibondverti| to |\hskibondverti| draw vertical bonds
+% of a five-membered ring.
+%
+% \begin{verbatim}
+% ********************************************
+% * setting skeletal bonds (horizontal type) *
+% ********************************************
+% The following numbering is adopted in this macro.
+%
+% b
+% (bbb) 2 3 (ccc)
+% a ----- c
+% * *
+% the original point ===> 1 * (aaa) * 4 (ddd)
+% (0,0) * * d
+% f -----
+% (fff) 6 5 (eee)
+% e
+% \end{verbatim}
+%
+% \begin{macro}{\hskbonda}
+% The macro |\hskbonda| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\aaa| and |\bbb|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 1 and 2
+\def\hskbonda{%
+ \ifx\aaa\empty%
+ \ifx\bbb\empty%
+ \Put@Line(0,0)(3,5){103}% %bond 1-2
+ \else%
+ \Put@Line(0,0)(3,5){79}% %bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \Put@Line(24,40)(3,5){79}% %bond 1-2
+ \else%
+ \Put@Line(24,40)(3,5){62}% %bond 1-2
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbondf}
+% The macro |\hskbondf| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\aaa| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 1 and 6
+\def\hskbondf{%
+ \ifx\aaa\empty%
+ \ifx\fff\empty
+ \Put@Line(0,0)(3,-5){103}% %bond 1-6
+ \else%
+ \Put@Line(0,0)(3,-5){79}% %bond 1-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \Put@Line(24,-40)(3,-5){79}% %bond 1-6
+ \else%
+ \Put@Line(24,-40)(3,-5){62}% %bond 1-6
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbondc}
+% The macro |\hskbondc| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ddd| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 4 and 3
+\def\hskbondc{%
+ \ifx\ddd\empty%
+ \ifx\ccc\empty%
+ \Put@Line(406,0)(-3,5){103}% %bond 4-3
+ \else%
+ \Put@Line(406,0)(-3,5){79}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \Put@Line(382,40)(-3,5){79}% %bond 4-3
+ \else%
+ \Put@Line(382,40)(-3,5){62}% %bond 4-3
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbondd}
+% The macro |\hskbondd| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ddd| and |\eee|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 4 and 5
+\def\hskbondd{%
+ \ifx\ddd\empty%
+ \ifx\eee\empty%
+ \Put@Line(406,0)(-3,-5){103}% %bond 4-5
+ \else%
+ \Put@Line(406,0)(-3,-5){79}% %bond 4-5
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \Put@Line(382,-40)(-3,-5){79}% %bond 4-5
+ \else%
+ \Put@Line(382,-40)(-3,-5){62}% %bond 4-5
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbondb}
+% The macro |\hskbondb| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\bbb| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 3 and 2
+\def\hskbondb{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \Put@Line(103,171)(1,0){200}% %bond 2-3
+ \else%
+ \Put@Line(103,171)(1,0){160}% %bond 3-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \Put@Line(143,171)(1,0){160}% %bond 3-2
+ \else%
+ \Put@Line(143,171)(1,0){120}% %bond 3-2
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbonde}
+% The macro |\hskbonde| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\eee| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 5 and 6
+\def\hskbonde{%
+ \ifx\eee\empty%
+ \ifx\fff\empty%
+ \Put@Line(103,-171)(1,0){200}% %bond 6-5
+ \else%
+ \Put@Line(143,-171)(1,0){160}% %bond 5-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \Put@Line(103,-171)(1,0){160}% %bond 5-6
+ \else%
+ \Put@Line(143,-171)(1,0){120}% %bond 5-6
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbondvert}
+% The macro |\hskbondvert| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\bbb| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%vertical bond for five-membered rings
+\def\hskbondvert{%
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \Put@Line(103,-171)(0,1){342}% %bond 4-3
+ \else%
+ \Put@Line(103,-171)(0,1){300}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \Put@Line(103,171)(0,-1){300}% %bond 4-3
+ \else%
+ \Put@Line(103,-129)(0,1){258}% %bond 4-3
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hskbondverti}
+% The macro |\hskbondverti| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\eee| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%vertical bond for five-membered rings (inverse type)
+\def\hskbondverti{%
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \Put@Line(303,-171)(0,1){342}% %bond 4-3
+ \else%
+ \Put@Line(303,-171)(0,1){300}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \Put@Line(303,171)(0,-1){300}% %bond 4-3
+ \else%
+ \Put@Line(303,-129)(0,1){258}% %bond 4-3
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Dotted Skeletal Bonds}
+%
+% The macros |\sixfuseh| etc. use inner macros for setting
+% skeletal bonds in accordance with the presence or the absence of
+% hetero atoms. During the processes of such setting,
+% the inner macros |\dothskbonda| to |\dothskbondf| are used
+% to set a dotted bond on each edge of a six- or five-membered ring.
+%
+% \begin{macro}{\dothskbonda}
+% The macro |\dothskbonda| is the dotted counterpart of |\hskbonda|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\aaa| and |\bbb|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 1 and 2
+\def\dothskbonda{%
+ \ifx\aaa\empty%
+ \ifx\bbb\empty%
+ \dotorline(0,0)(3,5){103}/(0,0)(103,171)%
+ \else%
+ \dotorline(0,0)(3,5){79}/(0,0)(79,132)%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \dotorline(24,40)(3,5){79}/(24,40)(103,171)%
+ \else%
+ \dotorline(24,40)(3,5){62}/(24,40)(86,143)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbondb}
+% The macro |\dothskbondb| is the dotted counterpart of |\hskbondb|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\bbb| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 3 and 2
+\def\dothskbondb{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \dotorline(103,171)(1,0){200}/(103,171)(303,171)%
+ \else%
+ \dotorline(103,171)(1,0){160}/(103,171)(263,171)%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \dotorline(143,171)(1,0){160}/(143,171)(303,171)%
+ \else%
+ \dotorline(143,171)(1,0){120}/(143,171)(263,171)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbondc}
+% The macro |\dothskbondc| is the dotted counterpart of |\hskbondc|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ddd| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 4 and 3
+\def\dothskbondc{%
+ \ifx\ddd\empty%
+ \ifx\ccc\empty%
+ \dotorline(406,0)(-3,5){103}/(406,0)(303,171)%
+ \else%
+ \dotorline(406,0)(-3,5){79}/(406,0)(327,132)%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \dotorline(382,40)(-3,5){79}/(382,40)(303,171)%
+ \else%
+ \dotorline(382,40)(-3,5){62}/(382,40)(320,143)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbondd}
+% The macro |\dothskbondd| is the dotted counterpart of |\hskbondd|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ddd| and |\eee|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 4 and 5
+\def\dothskbondd{%
+ \ifx\ddd\empty%
+ \ifx\eee\empty%
+ \dotorline(406,0)(-3,-5){103}/(406,0)(303,-171)%
+ \else%
+ \dotorline(406,0)(-3,-5){79}/(406,0)(327,-132)%
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \dotorline(382,-40)(-3,-5){79}/(382,-40)(303,-171)%
+ \else%
+ \dotorline(382,-40)(-3,-5){62}/(382,-40)(320,-143)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbonde}
+% The macro |\dothskbonde| is the dotted counterpart of |\hskbonde|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\eee| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 5 and 6
+\def\dothskbonde{%
+ \ifx\eee\empty%
+ \ifx\fff\empty%
+ \dotorline(103,-171)(1,0){200}/(103,-171)(303,-171)%
+ \else%
+ \dotorline(143,-171)(1,0){160}/(143,-171)(303,-171)%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \dotorline(103,-171)(1,0){160}/(103,-171)(263,-171)%
+ \else%
+ \dotorline(143,-171)(1,0){120}/(143,-171)(263,-171)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbondf}
+% The macro |\dothskbondf| is the dotted counterpart of |\hskbondf|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\aaa| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 1 and 6
+\def\dothskbondf{%
+ \ifx\aaa\empty%
+ \ifx\fff\empty
+ \dotorline(0,0)(3,-5){103}/(0,0)(103,-171)%
+ \else%
+ \dotorline(0,0)(3,-5){79}/(0,0)(79,-131)%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \dotorline(24,-40)(3,-5){79}/(24,-40)(103,-171)%
+ \else%
+ \dotorline(24,-40)(3,-5){62}/(24,-40)(86,-143)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbondvert}
+% The macro |\dothskbondvert| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\bbb| and |\fff|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%vertical bond for five-membered rings
+\def\dothskbondvert{%
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \dotorline(103,-171)(0,1){342}/(103,-171)(103,171)%
+ \else%
+ \dotorline(103,-171)(0,1){300}/(103,-171)(103,129)%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \dotorline(103,171)(0,-1){300}/(103,171)(103,-129)%
+ \else%
+ \dotorline(103,-129)(0,1){258}/(103,-129)(103,129)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dothskbondverti}
+% The macro |\dothskbondverti| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\eee| and |\ccc|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%vertical bond for five-membered rings (inverse type)
+\def\dothskbondverti{%
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \dotorline(303,-171)(0,1){342}/(303,-171)(303,171)%
+ \else%
+ \dotorline(303,-171)(0,1){300}/(303,-171)(303,129)%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \dotorline(303,171)(0,-1){300}/(303,171)(303,-129)%
+ \else%
+ \dotorline(303,-129)(0,1){258}/(303,-129)(303,129)%
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@skel@bondh| is used in |\sixfuseh| etc.
+% for setting skeletal bonds (outer bonds), when |\@aaa| etc.
+% (produced by |\csname|...|\endcsname|) are equal to `a'
+% etc. (given as \#2). Thinline, thickline and dotted-line
+% skeletal bonds are available.
+%
+% \changes{v4.02}{2004/12/20}{The positions of \cs{@skbondlisttrue} are changed.}
+% \changes{v5.00}{2010/10/01}{For bond coloring}
+%
+% \begin{macro}{\set@skel@bondh}
+% \begin{macrocode}
+\def\set@skel@bondh#1#2#3{%
+ \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
+ % \if\@aaa #2\relax%OK
+ \def\skbondreplace{#3}%
+ \@skbondlistfalse
+ \@tfor\member:=#1\do{%
+ \expandafter\twoCH@@R\member//%
+ \if\@@tmpa #2\relax%
+ \if\@@tmpb A\relax%
+ \@skbondlisttrue
+ \expandafter\csname dothskbond#3\endcsname% \dothskbonda etc.
+% \@skbondlisttrue
+ \else\if\@@tmpb B\relax%
+ \@skbondlisttrue
+ {\thicklines
+ \expandafter\csname hskbond#3\endcsname% \hskbonda etc.
+ }%
+% \@skbondlisttrue
+ \else%%%added for color 2010/10/01
+ \@skbondlisttrue%
+ \put(0,0){\@@tmpb}%
+ \fi\fi
+ \fi%
+ }%
+ \if@skbondlist\else
+ {\thinlines
+ \expandafter\csname hskbond#3\endcsname% \hskbonda etc.
+ }%
+ \fi%
+ \else
+ \expandafter\ifx\csname @#2#2#2\endcsname \empty\relax%
+ % \ifx\@aaa\empty\relax
+ \@tfor\member:=#1\do{%
+ \expandafter\twoCH@@R\member//%
+ \if\@@tmpa #2\relax%
+ \XyMTeXWarning{Unavailable bond `#2' in SKBONDLIST}\fi
+ }%
+ \fi\fi
+}% end of \set@skel@bondh
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Six-membered heterocyles}
+% \subsection{Horizontal type}
+%
+% The standard skeleton of a six-membered heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% *************************
+% * sixhetero derivatives *
+% * (horizontal type) *
+% *************************
+% The following numbering is adopted in this macro.
+%
+% b
+% 2 3
+% a ----- c
+% * *
+% the original point ===> 1 * * 4
+% (0,0) * * d
+% f -----
+% 6 5
+% e
+%
+% \end{verbatim}
+%
+% The macro |\sixheterovh| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \sixheteroh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `f' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `A' represents an aromatic circle. The option
+% `$n+$' ($n=1$ to $6$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none or r : sixhetero (right-handed)
+% l : sixhetero (left-handed)
+% 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
+% {n+} : plus at the n-nitrogen atom (n = 1 to 6)
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 6 atoms)
+%
+% for n = 1 to 6
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position,
+% e.g. 1==N for N at 1-position
+% \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 (max 6 substitution positions)
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a, b, c, d, e, or f)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \sixheteroh{1==N}{1==Cl;2==F}
+% \sixheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \sixheteroh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\sixheteroh| uses a picture environment and
+% consists of the following unit processes:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by |\setsixringh|.
+% \end{enumerate}
+%
+% \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}{Add: Spiro and fused rings}
+%
+% \begin{macro}{\sixheteroh}
+% \begin{macro}{\@six@heteroh}
+% \begin{macro}{\@six@@heteroh}
+% \begin{macro}{\@sixheteroh}
+% \begin{macrocode}
+\def\sixheteroh{\@ifnextchar({\@six@heteroh(@}{\@six@heteroh(@)}}
+\def\@six@heteroh(#1){\@ifnextchar[{\@six@@heteroh(#1)[@}%
+{\@six@@heteroh(#1)[@]}}
+\def\@six@@heteroh(#1)[#2]#3#4{\@ifnextchar[%
+{\@sixheteroh(#1)[#2]{#3}{#4}[@}%
+{\@sixheteroh(#1)[#2]{#3}{#4}[@]}}
+\def\@sixheteroh(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \changes{v3.01}{2002/4/30}{Replaced by \cs{ShiftPicEnv}}
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vrtx@sixh{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment of attached positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylpositionh{#4}{0}{0}{7}{0}%
+\begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(880,800)(-240,-400){sixheteroh}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{%
+\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bondh{#1}{a}{a}% bond between 1 and 2 \@aaa -> \hskbonda etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@bondh{#1}{c}{c}% bond between 3 and 4 \@ccc -> \hskbondc etc
+\set@skel@bondh{#1}{d}{d}% bond between 4 and 5 \@ddd -> \hskbondd etc
+\set@skel@bondh{#1}{e}{e}% bond between 5 and 6 \@eee -> \hskbonde etc
+\set@skel@bondh{#1}{f}{f}% bond between 6 and 1 \@fff -> \hskbondf etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax \hbondd\hbondf\hbondb%
+\else \if\member l\relax \hbonda\hbondc\hbonde%
+\else \if\member a\relax \hbonda%
+\else \if\member b\relax \hbondb%
+\else \if\member c\relax \hbondc%
+\else \if\member d\relax \hbondd%
+\else \if\member e\relax \hbonde%
+\else \if\member f\relax \hbondf%
+\else \if\member A%left aromatic circle
+% \Put@oCircle(0,203){240}% %circle
+ \Put@oCircle(203,0){240}% %circle
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+\else \expandafter\twoCH@@R\member//%
+ \set@fusionadd@sixh
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixh{#3}{0}{0}{7}{0}% %atom 1--6%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringh{#4}{0}{0}{7}{0}% %subst 1--6
+\end{ShiftPicEnv}%
+\iniatom\iniflag}% %end of \sixheteroh macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\test@vrtx@sixh| is used to test the presence of
+% a hetero atom or a spiro substituent on a vertex of the
+% sixheteroh nucleus.
+%
+% \begin{macro}{\test@vrtx@sixh}
+% \begin{macrocode}
+\def\test@vrtx@sixh#1{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa%
+ \or% \xdef\aaa{\@memberb}%
+ \if\@tmpb s\relax\def\aaa{}\else\def\aaa{@}\fi
+ \or% \xdef\bbb{\@memberb}%
+ \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
+ \or% \xdef\ccc{\@memberb}%
+ \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
+ \or% \xdef\ddd{\@memberb}%
+ \if\@tmpb s\relax\def\ddd{}\else\def\ddd{@}\fi
+ \or% \xdef\eee{\@memberb}%
+ \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
+ \or% \xdef\fff{\@memberb}%
+ \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+\fi\fi}%
+}% end of \test@vrtx@sixh
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse horizontal type}
+%
+% The standard skeleton of a six-membered heterocycle of inverse type
+% is selected to have the following locant numbers.
+%
+% \begin{verbatim}
+% ************************************
+% * sixhetero derivatives *
+% * (horizontal type, inverse type) *
+% ************************************
+% The following numbering is adopted in this macro.
+%
+% b
+% 3 2
+% c ----- a
+% * *
+% the original point ===> 4 * * 1
+% (0,0) * * f
+% d -----
+% 5 6
+% e
+% \end{verbatim}
+%
+% The macro |\sixheterohi| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \sixheterohi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `f' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `A' represents an aromatic circle. The option
+% `$n+$' ($n=1$ to $6$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none or r : sixhetero (right-handed)
+% l : sixhetero (left-handed)
+% [] : fully saturated form
+% 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
+% {n+} : plus at the n-nitrogen atom (n = 1 to 4)
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 6 atoms)
+%
+% for n = 1 to 6
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position,
+% e.g. 1==N for N at 1-position
+% \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 (max 6 substitution positions)
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a, b, c, d, e, or f)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \sixheterohi{1==N}{1==Cl;2==F}
+% \sixheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \sixheterohi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\sixheterohi| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheterov|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by |\setsixringh|.
+% \end{enumerate}
+% \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}{Add: Spiro and fused rings}
+%
+% \begin{macro}{\sixheterohi}
+% \begin{macro}{\@six@heterohi}
+% \begin{macro}{\@six@@heterohi}
+% \begin{macro}{\@sixheterohi}
+% \begin{macrocode}
+\def\sixheterohi{\@ifnextchar({\@six@heterohi(@}{\@six@heterohi(@)}}
+\def\@six@heterohi(#1){\@ifnextchar[{\@six@@heterohi(#1)[@}%
+{\@six@@heterohi(#1)[@]}}
+\def\@six@@heterohi(#1)[#2]#3#4{\@ifnextchar[%
+{\@sixheterohi(#1)[#2]{#3}{#4}[@}%
+{\@sixheterohi(#1)[#2]{#3}{#4}[@]}}
+\def\@sixheterohi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \changes{v3.01}{2002/4/30}{Replaced by \cs{ShiftPicEnv}}
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vrtx@sixhi{#3}%
+\@reset@ylsw%
+\ylpositionh{#4}{5}{0}{5}{-1}% %subst 1--4
+\ylpositionh{#4}{11}{4}{7}{-1}% %subst 5 and 6
+\begin{ShiftPicEnv}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(880,800)(-240,-400){sixheterohi}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bondh{#1}{a}{c}% bond between 1 and 2 \@aaa -> \hskbondc etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@bondh{#1}{c}{a}% bond between 3 and 4 \@ccc -> \hskbonda etc
+\set@skel@bondh{#1}{d}{f}% bond between 4 and 5 \@ddd -> \hskbondf etc
+\set@skel@bondh{#1}{e}{e}% bond between 5 and 6 \@eee -> \hskbonde etc
+\set@skel@bondh{#1}{f}{d}% bond between 6 and 1 \@fff -> \hskbondd etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax \hbondd \hbondf \hbondb%
+\else \if\member l\relax \hbonda \hbondc \hbonde%
+\else \if\member a\relax \hbondc%
+\else \if\member b\relax \hbondb%
+\else \if\member c\relax \hbonda%
+\else \if\member d\relax \hbondf%
+\else \if\member e\relax \hbonde%
+\else \if\member f\relax \hbondd%
+\else \if\member A%left aromatic circle
+% \Put@oCircle(0,203){240}% %circle
+ \Put@oCircle(203,0){240}% %circle
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+\else \expandafter\twoCH@@R\member//%
+ \set@fusionadd@sixhi
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixh{#3}{5}{0}{5}{-1}% %subst 1--4
+\set@hetatom@sixh{#3}{11}{4}{7}{-1}% %subst 5 and 6
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringh{#4}{5}{0}{5}{-1}% %subst 1--4
+\setsixringh{#4}{11}{4}{7}{-1}% %subst 5 and 6
+\end{ShiftPicEnv}%
+\iniatom\iniflag}% %end of \sixheterohi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\test@vrtx@sixhi| is used to test the presence of
+% a hetero atom or a spiro substituent on a vertex of the
+% sixheteroh nucleus.
+%
+% \begin{macro}{\test@vrtx@sixhi}
+% \begin{macrocode}
+\def\test@vrtx@sixhi#1{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa%
+ \or \if\@tmpb s\relax\def\ddd{}\else\def\ddd{@}\fi
+ \or \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
+ \or \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
+ \or \if\@tmpb s\relax\def\aaa{}\else\def\aaa{@}\fi
+ \or \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+ \or \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
+\fi\fi}%
+}% end of \test@vrtx@sixhi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Pyridine derivatives of horizontal type}
+%
+% The macros |\sixheteroh| and |\sixheterohi| can be used in the
+% form of a fixed |ATOMLIST|. Hence, the resulting commands for
+% drawing a six-membered heterocyle with one or more nitrogen atoms
+% have an argument |SUBSLIST| as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% ************************
+% * pyridine derivatives *
+% * (horizontal type) *
+% ************************
+%
+% \pyridineh[BONDLIST]{SUBSLIST}
+% \pyridinehi[BONDLIST]{SUBSLIST}
+% \pyrazineh[BONDLIST]{SUBSLIST}
+% \pyrazinehi[BONDLIST]{SUBSLIST}
+% \pyrimidineh[BONDLIST]{SUBSLIST}
+% \pyrimidinehi[BONDLIST]{SUBSLIST}
+% \triazineh[BONDLIST]{SUBSLIST}
+% \triazinehi[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `A' represents an aromatic circle. The option
+% `$n+$' ($n=1$ to $6$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none or r : pyridine (right-handed)
+% l : pyridine (left-handed)
+% [] : fully saturated ring
+% 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
+% {n+} : plus at the nitrogen atom
+% \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}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \pyridineh{1==Cl;2==F}
+% \pyridineh[c]{1==Cl;4==F;2==CH$_{3}$}
+% \pyridineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+% \changes{v2.00}{1998/11/29}{Add: fused rings}
+%
+% \begin{macro}{\pyridineh}
+% \begin{macro}{\pyridinehi}
+% \begin{macrocode}
+\def\pyridineh{\@ifnextchar[{\@pyridineh[@}{\@pyridineh[r]}}%
+\def\@pyridineh[#1]#2{%
+\iforigpt \typeout{command `pyridineh' %
+ is based on `sixheteroh'.}\fi%
+\sixheteroh[#1]{1==N}{#2}}%end of \pyridineh macro
+\def\pyridinehi{\@ifnextchar[{\@pyridinehi}{\@pyridinehi[r]}}%
+\def\@pyridinehi[#1]#2{%
+\iforigpt \typeout{command `pyridinehi' %
+ is based on `sixheterohi'.}\fi%
+\sixheterohi[#1]{1==N}{#2}}% %end of \pyridinehi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pyrazineh}
+% \begin{macro}{\pyrazinehi}
+% \changes{v5.01}{2013/03/17}{Add: pyrazinehi}
+% \begin{macrocode}
+\def\pyrazineh{\@ifnextchar[{\@pyrazineh[@}{\@pyrazineh[r]}}%
+\def\@pyrazineh[#1]#2{%
+\iforigpt \typeout{command `pyrazineh' %
+ is based on `sixheteroh'.}\fi%
+\sixheteroh[#1]{1==N;4==N}{#2}}%end of \pyrazineh macro
+\def\pyrazinehi{\@ifnextchar[{\@pyrazinehi[@}{\@pyrazinehi[r]}}%
+\def\@pyrazinehi[#1]#2{%
+\iforigpt \typeout{command `pyrazinehi' %
+ is based on `sixheterohi'.}\fi%
+\sixheterohi[#1]{1==N;4==N}{#2}}%end of \pyrazinehi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pyrimidineh}
+% \begin{macro}{\pyrimidinehi}
+% \begin{macrocode}
+\def\pyrimidineh{%
+ \@ifnextchar[{\@pyrimidineh[@}{\@pyrimidineh[r]}}%
+\def\@pyrimidineh[#1]#2{%
+\iforigpt \typeout{command `pyrimidineh' %
+ is based on `sixheteroh'.}\fi%
+\sixheteroh[#1]{1==N;3==N}{#2}}%
+ %end of \pyrimidineh macro
+\def\pyrimidinehi{%
+ \@ifnextchar[{\@pyrimidinehi[@}{\@pyrimidinehi[r]}}%
+\def\@pyrimidinehi[#1]#2{%
+\iforigpt \typeout{command `pyrimidinehi' %
+ is based on `sixheterohi'.}\fi%
+\sixheterohi[#1]{1==N;3==N}{#2}}%end of \pyrimidinehi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pyridazineh}
+% \begin{macro}{\pyridazinehi}
+% \begin{macrocode}
+\def\pyridazineh{\@ifnextchar[{\@pyridazineh[@}{\@pyridazineh[r]}}%
+\def\@pyridazineh[#1]#2{%
+\iforigpt \typeout{command `pyridazineh' %
+ is based on `sixheteroh'.}\fi%
+\sixheteroh[#1]{1==N;2==N}{#2}}%
+ %end of \pyridazineh macro
+\def\pyridazinehi{%
+ \@ifnextchar[{\@pyridazinehi}{\@pyridazinehi[r]}}%
+\def\@pyridazinehi[#1]#2{%
+\iforigpt \typeout{command `pyridazinehi' %
+ is based on `sixheterohi'.}\fi%
+\sixheterohi[#1]{1==N;2==N}{#2}}%end of \pyridazinehi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\triazineh}
+% \begin{macro}{\triazinehi}
+% \begin{macrocode}
+\def\triazineh{\@ifnextchar[{\@triazineh[@}{\@triazineh[r]}}%
+\def\@triazineh[#1]#2{%
+\iforigpt \typeout{command `triazineh' %
+ is based on `sixheteroh'.}\fi%
+\sixheteroh[#1]{1==N;3==N;5==N}{#2}}%end of \triazineh macro
+\def\triazinehi{\@ifnextchar[{\@triazinehi[@}{\@triazinehi[r]}}%
+\def\@triazinehi[#1]#2{%
+\iforigpt \typeout{command `triazinehi' %
+ is based on `sixheterohi'.}\fi%
+\sixheterohi[#1]{1==N;3==N;5==N}{#2}}%end of \triazinehi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Five-membered heterocycles}
+% \subsection{Horizontal type}
+%
+% The standard skeleton of a five-membered heterocycle
+% is selected to have the following locant numbers.
+%
+% \begin{verbatim}
+% ****************************
+% * fivehetero derivatives *
+% * (horizontal type) *
+% ****************************
+% The following numbering is adopted in this macro.
+%
+% 3 _____ 2
+% | *
+% | * 1 <===== the original point
+% | *
+% 4 ----- 5
+% \end{verbatim}
+%
+% The macro |\fiveheteroh| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \fiveheteroh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `e' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `A' represents an aromatic circle. The option
+% `$n+$' ($n=1$ to $5$) represents a plus charge on a hetero atom
+% at the $n$-position. The option
+% `$0+$' represents a plus charge at the center of the ring.
+%
+% \begin{verbatim}
+% BONDLIST: list of inner double bonds
+%
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,1-double bond
+% A : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% {0+} : plus (or others) at the center
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 5 atoms)
+%
+% for n = 1 to 5
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% \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 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a, b, c, d, or e)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \fiveheteroh{1==N}{1==H;2==F}
+% \fiveheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \fiveheteroh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\fiveheteroh| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheterov|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by |\setsixringh| partially.
+% \end{enumerate}
+% \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/12/5}{Add: fused and spiro rings}
+%
+% \begin{macro}{\fiveheteroh}
+% \begin{macro}{\@five@heteroh}
+% \begin{macro}{\@five@@heteroh}
+% \begin{macro}{\@fiveheteroh}
+% \begin{macrocode}
+\def\fiveheteroh{\@ifnextchar({\@five@heteroh(@}{\@five@heteroh(@)}}
+\def\@five@heteroh(#1){\@ifnextchar[{\@five@@heteroh(#1)[@}%
+{\@five@@heteroh(#1)[@]}}
+\def\@five@@heteroh(#1)[#2]#3#4{\@ifnextchar[%
+{\@fiveheteroh(#1)[#2]{#3}{#4}[@}%
+{\@fiveheteroh(#1)[#2]{#3}{#4}[@]}}
+\def\@fiveheteroh(#1)[#2]#3#4[#5]{%
+\iniatom\iniflag%initialize
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\test@vrtx@fivehi{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylpositionh{#4}{5}{1}{5}{-1}% % for 1 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylpositionh{#4}{10}{4}{7}{-1}% % for 4 to 5
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(800,880)(-240,-400){fiveheteroh}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bondh{#1}{a}{c}% bond between 1 and 2 \@aaa -> \skbondc etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc
+\set@skel@longbond{#1}{c}{hskbondvert}%
+ % bond between 3 and 4 \@ccc -> \skbondhoriz etc
+\set@skel@bondh{#1}{d}{e}% bond between 4 and 5 \@ddd -> \skbonde etc
+\set@skel@bondh{#1}{e}{d}% bond between 5 and 1 \@eee -> \skbondd etc
+}%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r%
+\else \if\member a\relax \hbondc%
+\else \if\member b\relax \hbondb%
+\else \if\member c\relax \hbondvert%
+\else \if\member d\relax \hbonde%
+\else \if\member e\relax \hbondd%
+\else \if\member A%left aromatic circle
+ \Put@oCircle(233,0){180}% %circle
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@fiveh
+\fi\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\Put@Direct(0,0){\set@hetatom@sixh{#3}{5}{1}{5}{-1}%
+\storeclipinfo%added 2001/06/20 by S. Fujita
+}% % for 1 to 3
+\developclipinfo%added 2001/06/20 by S. Fujita
+\Put@Direct(0,0){\set@hetatom@sixh{#3}{10}{4}{7}{-1}%
+\storeclipinfo%added 2001/06/20 by S. Fujita
+}% % for 4 to 5
+\developclipinfo%added 2001/06/20 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\Put@Direct(0,0){\setsixringh{#4}{5}{1}{5}{-1}}% % for 1 to 3
+\Put@Direct(0,0){\setsixringh{#4}{10}{4}{7}{-1}}% % for 4 to 5
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \fiveheteroh macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\test@vrtx@fivehi| is used to test the presence of
+% a hetero atom or a spiro substituent on a vertex of the
+% fiveheteroh nucleus.
+%
+% \begin{macro}{\test@vrtx@fivehi}
+% \begin{macrocode}
+\def\test@vrtx@fivehi#1{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa%
+ \or \if\@tmpb s\relax\def\ddd{}\else\def\ddd{@}\fi
+ \or \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
+ \or \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
+ \or \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+ \or \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
+ \or \if\@tmpb s\relax\def\aaa{}\else\def\aaa{@}\fi% dummy
+\fi\fi}%
+}% end of \test@vrtx@sixhi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse horizontal type}
+%
+% The standard skeleton of a five-membered heterocycle of inverse type
+% is selected to have the following locant numbers.
+%
+% \begin{verbatim}
+% *******************************
+% * fivehetero derivatives *
+% * (horizontal type, inverse) *
+% *******************************
+% The following numbering is adopted in this macro.
+%
+% 2 ----- 3
+% * |
+% the original point 1 * |
+% * |
+% _____|
+% 5 4
+% \end{verbatim}
+%
+% The macro |\fiveheterohi| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \fiveheterohi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `e' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `A' represents an aromatic circle. The option
+% `$n+$' ($n=1$ to $5$) represents a plus charge on a hetero atom
+% at the $n$-position. The option
+% `$0+$' represents a plus charge at the center of the ring.
+%
+% \begin{verbatim}
+%
+% BONDLIST: list of inner double bonds
+%
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,1-double bond
+% A : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% {0+} : plus (or others) at the center
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 5 atoms)
+%
+% for n = 1 to 5
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% \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 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a, b, c, d, or e)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \fiveheterohi{1==N}{1==H;2==F}
+% \fiveheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \fiveheterohi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\fiveheterohi| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheteroh|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by |\setsixringh| partially.
+% \end{enumerate}
+% \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/12/5}{Add: fused and spiro rings}
+%
+% \begin{macro}{\fiveheterohi}
+% \begin{macro}{\@five@heterohi}
+% \begin{macro}{\@five@@heterohi}
+% \begin{macro}{\@fiveheterohi}
+% \begin{macrocode}
+\def\fiveheterohi{\@ifnextchar({\@five@heterohi(@}{\@five@heterohi(@)}}
+\def\@five@heterohi(#1){\@ifnextchar[{\@five@@heterohi(#1)[@}%
+{\@five@@heterohi(#1)[@]}}
+\def\@five@@heterohi(#1)[#2]#3#4{\@ifnextchar[%
+{\@fiveheterohi(#1)[#2]{#3}{#4}[@}%
+{\@fiveheterohi(#1)[#2]{#3}{#4}[@]}}
+\def\@fiveheterohi(#1)[#2]#3#4[#5]{%
+\iniatom\iniflag%initialize
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\test@vertix@sixv{#3}{a}{b}{c}{e}{f}{d}%d--dummy
+\@reset@ylsw%
+\ylpositionh{#4}{0}{0}{4}{0}% % for 1 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylpositionh{#4}{1}{4}{7}{0}% % for 4 to 5
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(800,880)(-240,-400){fiveheterohi}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bondh{#1}{a}{a}% bond between 1 and 2 \@aaa -> \hskbonda etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@longbond{#1}{c}{hskbondverti}%
+ % bond between 3 and 4 \@ccc -> \hskbondverti etc
+\set@skel@bondh{#1}{d}{e}% bond between 4 and 5 \@ddd -> \hskbonde etc
+\set@skel@bondh{#1}{e}{f}% bond between 5 and 6 \@eee -> \hskbondf etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r%
+\else \if\member a\relax \hbonda%
+\else \if\member b\relax \hbondb%
+\else \if\member c\relax \hbondverti%
+\else \if\member d\relax \hbonde%
+\else \if\member e\relax \hbondf%
+\else \if\member A%left aromatic circle
+ \Put@oCircle(173,0){180}% %circle
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@fivehi
+\fi\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixh{#3}{0}{0}{4}{0}% % for 1 to 3
+\set@hetatom@sixh{#3}{1}{4}{7}{0}% % for 4 to 5
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringh{#4}{0}{0}{4}{0}% % for 1 to 3
+\setsixringh{#4}{1}{4}{7}{0}% % for 4 to 5
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \fiveheterohi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Pyrrole derivatives of horizontal type}
+%
+% The macro |\fiveheteroh| can be used in the
+% form of a fixed |ATOMLIST|. Hence, the resulting commands for
+% drawing a five-membered heterocyle with one or more nitrogen atoms
+% have an argument |SUBSLIST| as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% ***********************************
+% * pyrrole derivatives and others *
+% * (horizontal type) *
+% ***********************************
+%
+% \pyrroleh[BONDLIST]{SUBSLIST}
+% \pyrazoleh[BONDLIST]{SUBSLIST}
+% \imidazoleh[BONDLIST]{SUBSLIST}
+% \isoxazoleh[BONDLIST]{SUBSLIST}
+% \oxazoleh[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option
+% `$n+$' ($n=1$ to $5$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of inner double bonds
+%
+% none : mother nucleus
+% [] : fully saturated form
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,1-double bond
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% \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 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% 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}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \pyrroleh{1==H;2==F}
+% \pyrroleh[]{1==H;2==F}
+% \imidazoleh[c]{1==Cl;4==F;2==CH$_{3}$}
+% \isoxazoleh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\pyrroleh}
+% \begin{macro}{\pyrazoleh}
+% \begin{macro}{\imidazoleh}
+% \begin{macro}{\isoxazoleh}
+% \begin{macro}{\oxazoleh}
+% \begin{macrocode}
+\def\pyrroleh{\@ifnextchar[{\@pyrroleh[@}{\@pyrroleh[bd]}}%
+\def\@pyrroleh[#1]#2{%
+\iforigpt \typeout{command `pyrroleh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==N}{#2}}%
+\def\pyrazoleh{\@ifnextchar[{\@pyrazoleh[@}{\@pyrazoleh[bd]}}%
+\def\@pyrazoleh[#1]#2{%
+\iforigpt \typeout{command `pyrazoleh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==N;2==N}{#2}}%
+\def\imidazoleh{\@ifnextchar[{\@imidazoleh[@}{\@imidazoleh[bd]}}%
+\def\@imidazoleh[#1]#2{%
+\iforigpt \typeout{command `imidazoleh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==N;3==N}{#2}}%
+\def\isoxazoleh{\@ifnextchar[{\@isoxazoleh[@}{\@isoxazoleh[bd]}}%
+\def\@isoxazoleh[#1]#2{%
+\iforigpt \typeout{command `isoxazoleh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==O;2==N}{#2}}%
+\def\oxazoleh{\@ifnextchar[{\@oxazoleh[@}{\@oxazoleh[bd]}}%
+\def\@oxazoleh[#1]#2{%
+\iforigpt \typeout{command `oxazoleh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==O;3==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\furanh}
+% \begin{macro}{\thiopheneh}
+% \begin{macrocode}
+\def\furanh{\@ifnextchar[{\@furanh[@}{\@furanh[bd]}}
+\def\@furanh[#1]#2{%
+\iforigpt \typeout{command `furanh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==O}{#2}}
+\def\thiopheneh{\@ifnextchar[{\@thiopheneh[@}{\@thiopheneh[bd]}}
+\def\@thiopheneh[#1]#2{%
+\iforigpt \typeout{command `thiopheneh' %
+ is based on `fiveheteroh'.}\fi%
+\fiveheteroh[#1]{1==S}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Pyrrole derivatives of inverse horizontal type}
+%
+% The macro |\fiveheterohi| can be used in the
+% form of a fixed |ATOMLIST|. Hence, the resulting commands for
+% drawing a five-membered heterocyle with one or more nitrogen atoms
+% have an argument |SUBSLIST| as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% *************************************
+% * pyrrole derivatives and others *
+% * (horizontal type, inverse) *
+% *************************************
+%
+% \pyrrolehi[BONDLIST]{SUBSLIST}
+% \pyrazolehi[BONDLIST]{SUBSLIST}
+% \imidazolehi[BONDLIST]{SUBSLIST}
+% \isoxazolehi[BONDLIST]{SUBSLIST}
+% \oxazolehi[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option
+% `$n+$' ($n=1$ to $5$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of inner double bonds
+%
+% none : mother nucleus
+% [] : fully saturated form
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,1-double bond
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% \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 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% 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}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \pyrrolehi{1==H;2==F}
+% \pyrrolehi[]{1==H;2==F}
+% \imidazolehi[c]{1==Cl;4==F;2==CH$_{3}$}
+% \isoxazolehi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\pyrrolehi}
+% \begin{macro}{\pyrazolehi}
+% \begin{macro}{\imidazolehi}
+% \begin{macro}{\isoxazolehi}
+% \begin{macro}{\oxazolehi}
+% \begin{macrocode}
+\def\pyrrolehi{\@ifnextchar[{\@pyrrolehi[@}{\@pyrrolehi[bd]}}%
+\def\@pyrrolehi[#1]#2{%
+\iforigpt \typeout{command `pyrrolehi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==N}{#2}}%
+\def\pyrazolehi{\@ifnextchar[{\@pyrazolehi[@}{\@pyrazolehi[bd]}}%
+\def\@pyrazolehi[#1]#2{%
+\iforigpt \typeout{command `pyrazolehi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==N;2==N}{#2}}%
+\def\imidazolehi{\@ifnextchar[{\@imidazolehi[@}{\@imidazolehi[bd]}}%
+\def\@imidazolehi[#1]#2{%
+\iforigpt \typeout{command `imidazolehi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==N;3==N}{#2}}%
+\def\isoxazolehi{\@ifnextchar[{\@isoxazolehi[@}{\@isoxazolehi[bd]}}%
+\def\@isoxazolehi[#1]#2{%
+\iforigpt \typeout{command `isoxazolehi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==O;2==N}{#2}}%
+\def\oxazolehi{\@ifnextchar[{\@oxazolehi[@}{\@oxazolehi[bd]}}%
+\def\@oxazolehi[#1]#2{%
+\iforigpt \typeout{command `oxazolehi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==O;3==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\furanhi}
+% \begin{macro}{\thiophenehi}
+% \begin{macrocode}
+\def\furanhi{\@ifnextchar[{\@furanhi[@}{\@furanhi[bd]}}
+\def\@furanhi[#1]#2{%
+\iforigpt \typeout{command `furanhi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==O}{#2}}
+\def\thiophenehi{\@ifnextchar[{\@thiophenehi[@}{\@thiophenehi[bd]}}
+\def\@thiophenehi[#1]#2{%
+\iforigpt \typeout{command `thiophenehi' %
+ is based on `fiveheterohi'.}\fi%
+\fiveheterohi[#1]{1==S}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Six-to-six fused heterocyles}
+% \subsection{Horizontal type}
+%
+% The standard skeleton of a six-to-six fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ****************************
+% * decahetero derivatives *
+% * (horizontal type) *
+% ****************************
+% The following numbering is adopted in this macro.
+%
+% 2 3
+%
+% *1 4 (*1 origin)
+%
+% (10)8a 4a(9)
+%
+% 8 5
+%
+% 7 6
+% ____ ____
+% |cf. |
+% | 8 (10)1 |
+% | * 8a * |
+% | 7 * * * * 2 |
+% | | | | |
+% | | | | |
+% | 6 * * * * 3 |
+% | * 4a * |
+% | 5 (9) 4 |
+% | ^ |
+% | | |
+% | the original point |
+% |____ ____|
+% \end{verbatim}
+%
+% The macro |\decaheteroh| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \decaheteroh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `k' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to k, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `A' and `B' represent aromatic circles. The option
+% `$n+$' ($n=1$ to $10$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of bonds
+%
+% none or r : decahetero (right-handed)
+% l : no action
+% [] : fully saturated form
+% a : 1,2-double bond b : 2,3-double bond
+% c : 4,3-double bond d : 4,4a-double bond
+% e : 4a,5-double bond f : 5,6-double bond
+% g : 6,7-double bond h : 7,8-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 : aromatic circle B : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 10)
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 10 atoms)
+%
+% for n = 1 to 8
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% na : Hetero atom at 4a or 8b (n=4 or 8)
+% e.g. 4a==N (or 9==N) for N at 4a-position
+% 8a==N (or {{10}}==N) for N at 8a-position
+% \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 9 (4a position) and 10 (8a position)
+%
+% 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
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a to k; see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \decaheteroh{1==N}{1==Cl;2==F}
+% \decaheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \decaheteroh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\decaheteroh| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheterov|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh| several times.
+% \end{enumerate}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \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/30}{Add: spiro and fused rings}
+% \changes{v2.01}{2001/6/20}{The
+% \cs{storeclipinfo} command is added.}
+% \changes{v4.03b}{2006/9/5}{bug fix \cs{ggg} etc. for \cs{test@vertix@sixv}
+% in chemstr.sty}
+%
+% \begin{macro}{\decaheteroh}
+% \begin{macro}{\@deca@heteroh}
+% \begin{macro}{\@deca@@heteroh}
+% \begin{macro}{\@decaheteroh}
+% \begin{macrocode}
+\def\decaheteroh{\@ifnextchar({\@deca@heteroh(@}{\@deca@heteroh(@)}}
+\def\@deca@heteroh(#1){\@ifnextchar[{\@deca@@heteroh(#1)[@}%
+{\@deca@@heteroh(#1)[@]}}
+\def\@deca@@heteroh(#1)[#2]#3#4{\@ifnextchar[%
+{\@decaheteroh(#1)[#2]{#3}{#4}[@}%
+{\@decaheteroh(#1)[#2]{#3}{#4}[@]}}
+\def\@decaheteroh(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\test@vertix@sixv{#3}{a}{b}{c}{d}{e}{f}%
+\test@vertix@decav{#3}{g}{h}{i}{j}{@}{@}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylhetpositionh{#4}{0}{0}{5}{0}% %substituents on 1 to 4
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\let\ddd=\eee\let\eee=\fff\let\fff=\gggA
+\ylhetpositionh{#4}{-1}{3}{7}{0}% %substituents on 5 to 7
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{\let\aaa=\hhh
+\ylhetpositionh{#4}{-7}{0}{2}{0}% %substituent on 8
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{4}% %9 for 4a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-303}\def\@@yli{171}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-9}{10}% %10 for 8a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-103}\def\@@yli{171}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(1200,1200)(-400,-800){decaheteroh}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\set@skel@bondh{#1}{a}{a}% bond between 1 and 2 \@aaa -> \hskbonda etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@bondh{#1}{c}{c}% bond between 3 and 4 \@ccc -> \hskbondc etc
+\set@skel@bondh{#1}{d}{d}% bond between 4 and 5 \@ddd -> \skbondd etc
+\set@skel@bondh{#1}{k}{e}% bond between 7 and 8 \@kkk -> \skbonde etc
+\set@skel@bondh{#1}{j}{f}% bond between 7 and 8 \@jjj -> \skbondf etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+\Put@Direct(0,-342){\set@skel@bondh{#1}{i}{a}}%
+ % bond between 8a and 8 \@iii -> \hskbonda etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{e}{c}}%
+ % bond between 4a and 5 \@eee -> \hskbondc etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{f}{d}}%
+ % bond between 5 and 6 \@fff -> \hskbondd etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{g}{e}}%
+ % bond between 6 and 7 \@ggg -> \hskbonde etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{h}{f}}%
+ % bond between 7 and 8 \@hhh -> \hskbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\fff=\jjj \let\eee=\iii%
+ \Put@Direct(0,0){\hbonda}% bond between 1 and 2%
+ \Put@Direct(0,0){\hbondc}% bond between 3 and 4%
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 8a and 4a
+ \Put@Direct(0,-342){\hbondf}% bond between 8 and 7
+ \Put@Direct(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \Put@Direct(0,0){\hbonda}% bond between 1 and 2
+\else \if\member b\relax%
+ \Put@Direct(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax%
+ \Put@Direct(0,0){\hbondc}% bond between 3 and 4
+% \Put@Direct(342,0){\hbondc}% bond between 3 and 4
+\else \if\member d\relax%
+{\let\eee=\iii%
+ \Put@Direct(0,0){\hbondd}% bond between 4 and 4a
+}%
+\else \if\member e\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \Put@Direct(0,-342){\hbondc}% bond between 5 and 4a
+}%
+\else \if\member f\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \Put@Direct(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member g\relax%
+{\let\eee=\fff \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbonde}% bond between 6 and 7
+}%
+\else \if\member h\relax%
+{\let\aaa=\hhh \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbondf}% bond between 8 and 7
+}%
+\else \if\member i\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbonda}% bond between 8 and 8a
+}%
+\else \if\member j\relax%
+{\let\fff=\jjj%
+ \Put@Direct(0,0){\hbondf}% bond between 1 and 8a
+}%
+\else \if\member k\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 8a and 4a
+}%
+\else \if\member K\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \Put@Direct(0,0){\hbonde}% bond between 8a and 4a in the other ring
+}%
+\else \if\member A%left aromatic circle
+ \Put@oCircle(203,0){240}% %circle
+\else \if\member B%left aromatic circle
+ \Put@oCircle(203,-342){240}% %circle
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{8a}\def\aay{4a}\def\aaz{10}%
+ \if\@@tmpa 4\relax%
+ \putratom{272}{-18}{\@@tmpb}% % right type
+ \else\if\@@tmpa 1\relax%
+ \putratom{68}{-18}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{233}{60}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{120}{60}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aaz\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{272}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{68}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{233}{-452}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putratom{120}{-452}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@decah
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \changes{v2.00a}{2000/11/11}{The
+% \cs{iniflag} command is added to 5- and 8-substitution.}
+% \changes{v4.03}{2006/9/5}{The \cs{storeclipinfo} command, bugfixed}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\Put@Direct(0,0){\set@hetatom@sixh{#3}{0}{0}{5}{0}%
+% \if@aclip \global\@acliptrue\fi
+% \if@bclip \global\@bcliptrue\fi
+% \if@cclip \global\@ccliptrue\fi
+% \if@clip \global\@cliptrue\fi
+\storeclipinfo
+}% %substituents on 1 to 4
+\developclipinfo
+\Put@Direct(0,-342){\iniflag%2000/11/11 by Shinsaku Fujita
+ \set@hetatom@sixh{#3}{-1}{3}{7}{0}%
+% \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+% \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+% \@eclipfalse \if@clip \global\@ecliptrue \fi
+ \@gclipfalse \if@fclip \@gcliptrue \fi%
+ \@fclipfalse \if@eclip \@fcliptrue \fi%
+ \@eclipfalse \if@clip \@ecliptrue \fi
+ \@clipfalse%2006/9/5added
+\storeclipinfo
+}%substituents on 5 to 7
+%\developclipinfo%%2006/9/5 deleted
+\Put@Direct(0,-342){\iniflag%2000/11/11 by Shinsaku Fujita
+ \set@hetatom@sixh{#3}{-7}{0}{2}{0}%
+% \@hclipfalse \if@aclip \global\@hcliptrue \fi
+ \@hclipfalse \if@aclip \@hcliptrue \fi
+ \@aclipfalse%2006/9/5added
+\storeclipinfo
+}%%substituent on 8
+%\developclipinfo%%2006/9/5 deleted
+\Put@Direct(0,0){\set@vrtx@fuseh{#3}%
+% \if@iclip \global\@icliptrue \fi
+% \if@jclip \global\@jcliptrue \fi
+\storeclipinfo
+}% fused positions
+\developclipinfo
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\global\drawsamesubsttrue%2002/05/30 warning on
+\Put@Direct(0,0){\setsixringh{#4}{0}{0}{5}{0}}% %substituents on 1 to 4
+\global\drawsamesubstfalse%2002/05/30 warning off
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 5 to 7
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\Put@Direct(0,-342){\setsixringh{#4}{-1}{3}{7}{0}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 8
+\Put@Direct(0,-342){\setsixringh{#4}{-7}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \Put@Direct(303,-171){\setatombond{#4}{-8}{4}}% %9 for 4a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \Put@Direct(103,-171){\setatombond{#4}{-9}{10}}% %10 for 8a position
+}%
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \decaheteroh macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylhetpositionh| is used in the |\decaheteroh| command,
+% giving the sift values for drawing a structure as a substituent.
+% \changes{v1.02}{1998/10/16}{Newly added command}
+%
+% \begin{macro}{\ylhetpositionh}
+% \begin{macrocode}
+\def\ylhetpositionh#1#2#3#4#5{%
+\@@ylswfalse%%%\@reset@ylsw
+\@forsemicol\member:=#1\do{%
+\if@@ylsw\else
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax
+\expandafter\threech@r\@membera{}{}\relax
+\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
+\if@@ylsw
+\ifnum#5<0\relax%
+\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
+\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax\fi
+\ifnum\@tmpaa>#3\relax%
+\ifnum\@tmpaa<#4\relax%
+\ifcase\@tmpaa%0 omit
+ \or
+ \ifx\aaa\empty
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \else
+ \gdef\@ylii{30}\gdef\@yli{0}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \or
+ \ifx\bbb\empty
+ \gdef\@ylii{-103}\gdef\@yli{-171}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \else
+ \gdef\@ylii{-73}\gdef\@yli{-223}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \fi
+ \or
+ \ifx\ccc\empty
+ \gdef\@ylii{-303}\gdef\@yli{-171}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \else
+ \gdef\@ylii{-333}\gdef\@yli{-223}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \fi
+ \or
+ \ifx\ddd\empty
+ \gdef\@ylii{-406}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \else
+ \gdef\@ylii{-436}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \fi
+ \or
+ \ifx\eee\empty
+ \gdef\@ylii{-303}\gdef\@yli{171}\global\@ylswtrue%\@yletrue% subst. on 5
+ \else
+ \gdef\@ylii{-333}\gdef\@yli{223}\global\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+ \or
+ \ifx\fff\empty
+ \gdef\@ylii{-103}\gdef\@yli{171}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \else
+ \gdef\@ylii{-73}\gdef\@yli{223}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \fi
+\fi%end of ifcase
+\fi\fi\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse horizontal type}
+%
+% The standard skeleton of a six-to-six fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ************************************
+% * decahetero derivatives *
+% * (horizonatl type, inverse type) *
+% ************************************
+% The following numbering is adopted in this macro.
+%
+% 3 2
+%
+% *4 1 (*4 origin)
+%
+% (8)4a 8a(10)
+%
+% 5 8
+%
+% 6 7
+% ____ ____
+% |cf. |
+% | 5 (9) 4 |
+% | * 4a * |
+% | 6 * * * * 3 |
+% | | | | |
+% | | | | |
+% | 7 * * * * 2 |
+% | * 8a * |
+% | 8 (9) 1 |
+% | ^ |
+% | | |
+% | the original point |
+% |____ ____|
+% \end{verbatim}
+%
+% The macro |\decaheterohi| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \decaheterohi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `k' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to k, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The options `A' and `B' represent aromatic circles in two rings.
+% The option `$n+$' ($n=1$ to $10$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of bonds
+%
+% none or r : decahetero (right-handed)
+% l : no action
+% [] : fully saturated form
+% a : 1,2-double bond b : 2,3-double bond
+% c : 4,3-double bond d : 4,4a-double bond
+% e : 4a,5-double bond f : 5,6-double bond
+% g : 6,7-double bond h : 7,8-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 : aromatic circle B : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 10)
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 10 atoms)
+%
+% for n = 1 to 8
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% na : Hetero atom at 4a or 8b (n=4 or 8)
+% e.g. 4a==N (or 9==N) for N at 4a-position
+% 8a==N (or {{10}}==N) for N at 8a-position
+% \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 9 (4a position) and 10 (8a position)
+%
+% 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
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a to k; see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \decaheterohi{1==N}{1==Cl;2==F}
+% \decaheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \decaheterohi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\decaheterohi| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheterov|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh| several times.
+% \end{enumerate}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/1}{Add: spiro and fused rings}
+% \changes{v2.01}{2001/6/20}{The
+% \cs{storeclipinfo} command is added.}
+%
+% \begin{macro}{\decaheterohi}
+% \begin{macro}{\@deca@heterohi}
+% \begin{macro}{\@deca@@heterohi}
+% \begin{macro}{\@decaheterohi}
+% \begin{macrocode}
+\def\decaheterohi{\@ifnextchar({\@deca@heterohi(@}{\@deca@heterohi(@)}}
+\def\@deca@heterohi(#1){\@ifnextchar[{\@deca@@heterohi(#1)[@}%
+{\@deca@@heterohi(#1)[@]}}
+\def\@deca@@heterohi(#1)[#2]#3#4{\@ifnextchar[%
+{\@decaheterohi(#1)[#2]{#3}{#4}[@}%
+{\@decaheterohi(#1)[#2]{#3}{#4}[@]}}
+\def\@decaheterohi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\test@vertix@decavi{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylhetpositionh{#4}{5}{0}{5}{-1}% %substituents on 1 to 4
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\let\ddd=\eee\let\eee=\fff\let\fff=\gggA
+\ylhetpositionh{#4}{12}{3}{7}{-1}% %substituents on 6 to 8
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{\let\aaa=\hhh
+\ylhetpositionh{#4}{-4}{0}{2}{0}% %substituent on 5
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-9}{4}% %10 for 8a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-303}\def\@@yli{171}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{10}% %9 for 4a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-103}\def\@@yli{171}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(1200,1200)(-400,-800){decaheterohi}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\set@skel@bondh{#1}{a}{c}% bond between 1 and 2 \@aaa -> \hskbondc etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@bondh{#1}{c}{a}% bond between 3 and 4 \@ccc -> \hskbonda etc
+\set@skel@bondh{#1}{d}{f}% bond between 4 and 4a \@ddd -> \hskbondf etc
+\set@skel@bondh{#1}{k}{e}% bond between 4a and 8a \@kkk -> \hskbonde etc
+\set@skel@bondh{#1}{j}{d}% bond between 8a and 1 \@jjj -> \hskbondd etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+\Put@Direct(0,-342){\set@skel@bondh{#1}{e}{a}}%
+ % bond between 4a and 5 \@eee -> \hskbonda etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{i}{c}}%
+ % bond between 8a and 8 \@iii -> \hskbondc etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{h}{d}}%
+ % bond between 7 and 8 \@hhh -> \hskbondd etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{g}{e}}%
+ % bond between 6 and 7 \@ggg -> \hskbonde etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{f}{f}}%
+ % bond between 5 and 6 \@fff -> \hskbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\fff=\jjj \let\eee=\iii%
+ \Put@Direct(0,0){\hbonda}% bond between 1 and 2
+ \Put@Direct(0,0){\hbondc}% bond between 3 and 4
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 8a and 4a
+ \Put@Direct(0,-342){\hbondf}% bond between 8 and 7
+ \Put@Direct(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \Put@Direct(0,0){\hbondc}% bond between 3 and 4
+\else \if\member b\relax
+ \Put@Direct(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax
+ \Put@Direct(0,0){\hbonda}% bond between 1 and 2
+\else \if\member d\relax%
+{\let\fff=\jjj%
+ \Put@Direct(0,0){\hbondf}% bond between 1 and 8a
+}%
+\else \if\member e\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbonda}% bond between 8 and 8a
+}%
+\else \if\member f\relax%
+{\let\aaa=\hhh \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbondf}% bond between 8 and 7
+}%
+\else \if\member g\relax%
+{\let\eee=\fff \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbonde}% bond between 6 and 7
+}%
+\else \if\member h\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \Put@Direct(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member i\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \Put@Direct(0,-342){\hbondc}% bond between 5 and 4a
+}%
+\else \if\member j\relax%
+{\let\eee=\iii%
+ \Put@Direct(0,0){\hbondd}% bond between 4 and 4a
+}%
+\else \if\member k\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 8a and 4a
+}%
+\else \if\member K\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \Put@Direct(0,0){\hbonde}% bond between 8a and 4a
+}%
+\else \if\member A%left aromatic circle
+ \Put@oCircle(203,0){240}% %circle
+\else \if\member B%left aromatic circle
+ \Put@oCircle(203,-342){240}% %circle
+\else \expandafter\twoCH@@R\member//%
+ \def\aax{8a}\def\aay{4a}\def\aaz{10}%
+ \if\@@tmpa 4\relax%
+ \putratom{68}{-18}{\@@tmpb}% % right type
+ \else\if\@@tmpa 1\relax%
+ \putratom{272}{-18}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{120}{60}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{233}{60}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aaz\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{68}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{272}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{120}{-452}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putratom{233}{-452}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@decahi
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \changes{v2.00a}{2000/11/11}{The
+% \cs{iniflag} command is added to 8-substitution.}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\@tmpclipfalse
+\Put@Direct(0,0){\set@hetatom@sixh{#3}{5}{0}{5}{-1}%
+% \if@aclip \global\@acliptrue\fi
+% \if@bclip \global\@bcliptrue\fi
+% \if@cclip \global\@ccliptrue\fi
+% \if@clip \global\@cliptrue\fi
+\storeclipinfo
+}% %substituents on 1 to 4
+\developclipinfo
+\Put@Direct(0,-342){\iniflag%2000/11/11 by Shinsaku Fujita
+ \set@hetatom@sixh{#3}{12}{3}{7}{-1}%
+% \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+% \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+% \@eclipfalse \if@clip \global\@ecliptrue \fi%
+ \@gclipfalse \if@fclip \@gcliptrue \fi%
+ \@fclipfalse \if@eclip \@fcliptrue \fi%
+ \@eclipfalse \if@clip \@ecliptrue \fi%
+\storeclipinfo
+}%substituents on 6 to 8
+\developclipinfo
+\Put@Direct(0,-342){\set@hetatom@sixh{#3}{-4}{0}{2}{0}%
+% \@aclipfalse \if@aclip \global\@hcliptrue \fi%
+ \@aclipfalse \if@aclip \@hcliptrue \fi%
+\storeclipinfo
+}%%substituent on 5
+\developclipinfo
+\Put@Direct(0,0){\set@vrtx@decafusehi{#3}%
+ \@tmpclipfalse
+% \if@iclip \global\@tmpcliptrue \fi
+% \if@jclip \global\@icliptrue \fi
+% \if@tmpclip \global\@jcliptrue \fi
+ \if@iclip \@tmpcliptrue \fi
+ \if@jclip \@icliptrue \fi
+ \if@tmpclip \@jcliptrue \fi
+\storeclipinfo
+}% fused positions
+\developclipinfo
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\global\drawsamesubsttrue%2002/05/30 warning on
+\Put@Direct(0,0){\setsixringh{#4}{5}{0}{5}{-1}}% %substituents on 1 to 4
+\global\drawsamesubstfalse%2002/05/30 warning off
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 6 to 8
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\Put@Direct(0,-342){\setsixringh{#4}{12}{3}{7}{-1}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 5
+\Put@Direct(0,-342){\setsixringh{#4}{-4}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \Put@Direct(303,-171){\setatombond{#4}{-9}{4}}% %10 for 8a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi
+ \Put@Direct(103,-171){\setatombond{#4}{-8}{10}}% %9 for 4a position
+}%
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \decaheterohi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@vrtx@decafusehi| is an inner command contained
+% in the definition of |\decaheterohi|, where the macro is used to set
+% a hetero atom or on a vertex of a bridgehead location.
+%
+% \begin{macro}{\set@vrtx@decafusehi}
+% \begin{macrocode}
+\def\set@vrtx@decafusehi#1{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa\or\or\or
+ \or%%%%4
+ \if\@tmpb a%
+ \global\@icliptrue%
+ \putlatom{135}{-211}{\@memberb}% % left type
+ \else\if\@tmpb h%
+ \XyMTeXWarning{Forbidden fused position `4a' or `9'}%
+ \else\if\@tmpb s%
+ \XyMTeXWarning{Forbidden fused position `4a' or `9'}%
+ \else\ifx\@tmpb\empty\relax
+ \else
+ \XyMTeXWarning{Forbidden fused position `4a' or `9'}%
+ \fi\fi\fi\fi
+ \or\or\or
+ \or%8
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putratom{273}{-211}{\@memberb}% % right type
+ \else\if\@tmpb h%
+ \XyMTeXWarning{Forbidden fused position `8a' or `10'}%
+ \else\if\@tmpb s%
+ \XyMTeXWarning{Forbidden fused position `8a' or `10'}%
+ \else\ifx\@tmpb\empty\relax
+ \else
+ \XyMTeXWarning{Forbidden fused position `8a' or `10'}%
+ \fi\fi\fi\fi
+\or%9 (= 4a)
+ \ifx\@tmpb\empty%
+ \global\@icliptrue%
+ \putlatom{135}{-211}{\@memberb}% % left type
+ \else
+ \XyMTeXWarning{Forbidden fused position `4a' or `9'}%
+ \fi
+\or%10 (= 8a)
+ \ifx\@tmpb\empty%
+ \global\@jcliptrue%
+ \putratom{273}{-211}{\@memberb}% % right type
+ \else
+ \XyMTeXWarning{Forbidden fused position `8a' or `10'}%
+ \fi
+\fi\fi}%
+}% end of the macro \set@vrtx@decafusehi
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@fusion@decahi| is an inner command contained
+% in the definition of |\decaheterohi|, where
+% the macro is used for setting an additive
+% or a fused ring at each bond (designated by |\@@tmpa|). The
+% fused ring is typeset by the inner command |\set@fusionadd@sixhi|.
+%
+% \begin{macro}{\set@fusion@decahi}
+% \changes{v2.00}{1998/11/15}{New command: \cs{set@fusion@decahi}}
+% \begin{macrocode}
+\def\set@fusion@decahi{%
+ \let\@@tmpa=\@tmpa
+ \let\@@tmpb=\@tmpb
+ \if\@tmpa a%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa A%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa b%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa B%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa c%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa C%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa d%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `d'}%
+ \fi
+ \else\if\@tmpa D%
+ \let\@@tmpa=\@tmpa
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `D'}%
+ \fi
+ \else\if\@tmpa e%
+ \edef\@@tmpa{c}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `e'}%
+ \fi
+ \else\if\@tmpa E%
+ \edef\@@tmpa{C}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `E'}%
+ \fi
+ \else\if\@tmpa f%
+ \edef\@@tmpa{d}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa F%
+ \edef\@@tmpa{D}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa g%
+ \edef\@@tmpa{e}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa G%
+ \edef\@@tmpa{E}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa h%
+ \edef\@@tmpa{f}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa H%
+ \edef\@@tmpa{F}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa i%
+ \edef\@@tmpa{a}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `i'}%
+ \fi
+ \else\if\@tmpa I%
+ \edef\@@tmpa{A}%
+ \Put@Direct(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `I'}%
+ \fi
+ \else\if\@tmpa j%
+ \edef\@@tmpa{f}%
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `j'}%
+ \fi
+ \else\if\@tmpa J%
+ \edef\@@tmpa{F}%
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `J'}%
+ \fi
+ \else\if\@tmpa k%
+ \edef\@@tmpa{e}%
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `k'}%
+ \fi
+ \else\if\@tmpa K%
+ \edef\@@tmpa{E}%
+ \Put@Direct(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `K'}%
+ \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@decahi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Short-cut commands for fused heterocycles}
+%
+% The macro |\decaheteroh| can be used in the
+% form of a fixed |ATOMLIST|. Hence, the resulting commands for
+% drawing a fused heterocyle with one or more nitrogen atoms
+% have an argument |SUBSLIST| as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% ****************************************************
+% * heterocycles having two fused six-membered rings *
+% * (horizontal type) *
+% ****************************************************
+%
+% \quinolineh[BONDLIST]{SUBSLIST}
+% \quinolinehi[BONDLIST]{SUBSLIST}
+% \isoquinolineh[BONDLIST]{SUBSLIST}
+% \isoquinolinehi[BONDLIST]{SUBSLIST}
+% \quinoxalineh[BONDLIST]{SUBSLIST}
+% \quinoxalinehi[BONDLIST]{SUBSLIST}
+% \quinazolineh[BONDLIST]{SUBSLIST}
+% \quinazolinehi[BONDLIST]{SUBSLIST}
+% \cinnolineh[BONDLIST]{SUBSLIST}
+% \cinnolinehi[BONDLIST]{SUBSLIST}
+% \pteridineh[BONDLIST]{SUBSLIST}
+% \pteridinehi[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to k, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The optiona `A' and `B' typeset aromatic circles.
+% The option
+% `$n+$' ($n=1$ to $10$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of bonds
+%
+% none or r : decahetero (right-handed)
+% l : decahetero (left-handed)
+% [] : fully saturated form
+% a : 1,2-double bond b : 2,3-double bond
+% c : 4,3-double bond d : 4,4a-double bond
+% e : 4a,5-double bond f : 5,6-double bond
+% g : 6,7-double bond h : 7,8-double bond
+% i : 8,8a-double bond j : 1,8a-double bond
+% k : 4a,8a-double bond
+% A : aromatic circle B : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 10)
+% \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 9 (4a position) and 10 (8a position)
+%
+% 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
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \quinolineh{2==Cl;3==F}
+% \end{verbatim}
+%
+% \begin{macro}{\quinolineh}
+% \begin{macro}{\quinolinehi}
+% \begin{macrocode}
+\def\quinolineh{%
+ \@ifnextchar[{\@quinolineh[@}{\@quinolineh[acfhk]}}%
+\def\@quinolineh[#1]#2{%
+\iforigpt \typeout{command `quinolineh' %
+ is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{1==N}{#2}}%
+\def\quinolinehi{%
+ \@ifnextchar[{\@quinolinehi[@}{\@quinolinehi[acfhk]}}%
+\def\@quinolinehi[#1]#2{%
+\iforigpt \typeout{command `quinolinehi' %
+ is based on `decaheterohi'.}\fi%
+\decaheterohi[#1]{1==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\isoquinolineh}
+% \begin{macro}{\isoquinolinehi}
+% \begin{macrocode}
+\def\isoquinolineh{%
+ \@ifnextchar[{\@isoquinolineh[@}{\@isoquinolineh[acfhk]}}%
+\def\@isoquinolineh[#1]#2{%
+\iforigpt \typeout{command `isoquinolineh' %
+ is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{2==N}{#2}}%
+\def\isoquinolinehi{%
+ \@ifnextchar[{\@isoquinolinehi[@}{\@isoquinolinehi[acfhk]}}%
+\def\@isoquinolinehi[#1]#2{%
+\iforigpt \typeout{command `isoquinolinehi' %
+ is based on `decaheterohi'.}\fi%
+\decaheterohi[#1]{2==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{quinoxalineh}
+% \begin{macro}{quinoxalinehi}
+% \begin{macrocode}
+\def\quinoxalineh{%
+ \@ifnextchar[{\@quinoxalineh[@}{\@quinoxalineh[acfhk]}}%
+\def\@quinoxalineh[#1]#2{%
+\iforigpt \typeout{command `quinoxalineh' %
+ is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{1==N;4==N}{#2}}%
+\def\quinoxalinehi{%
+ \@ifnextchar[{\@quinoxalinehi[@}{\@quinoxalinehi[acfhk]}}%
+\def\@quinoxalinehi[#1]#2{%
+\iforigpt \typeout{command `quinoxalinehi' %
+ is based on `decaheterohi'.}\fi%
+\decaheterohi[#1]{1==N;4==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\quinazolineh}
+% \begin{macro}{\quinazolinehi}
+% \begin{macrocode}
+\def\quinazolineh{%
+ \@ifnextchar[{\@quinazolineh[@}{\@quinazolineh[acfhk]}}%
+\def\@quinazolineh[#1]#2{%
+\iforigpt \typeout{command `quinazolineh' %
+ is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{1==N;3==N}{#2}}%
+\def\quinazolinehi{%
+ \@ifnextchar[{\@quinazolinehi[@}{\@quinazolinehi[acfhk]}}%
+\def\@quinazolinehi[#1]#2{%
+\iforigpt \typeout{command `quinazolinehi' %
+ is based on `decaheterohi'.}\fi%
+\decaheterohi[#1]{1==N;3==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cinnolineh}
+% \begin{macro}{\cinnolinehi}
+% \begin{macrocode}
+\def\cinnolineh{%
+ \@ifnextchar[{\@cinnolineh[@}{\@cinnolineh[acfhk]}}%
+\def\@cinnolineh[#1]#2{%
+\iforigpt \typeout{command `cinnolineh' %
+ is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{1==N;2==N}{#2}}%
+\def\cinnolinehi{%
+ \@ifnextchar[{\@cinnolinehi[@}{\@cinnolinehi[acfhk]}}%
+\def\@cinnolinehi[#1]#2{%
+\iforigpt \typeout{command `cinnolinehi' %
+ is based on `decaheterohi'.}\fi%
+\decaheterohi[#1]{1==N;2==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pteridineh}
+% \begin{macro}{\pteridinehi}
+% \begin{macrocode}
+\def\pteridineh{%
+ \@ifnextchar[{\@pteridineh[@}{\@pteridineh[acfhk]}}%
+\def\@pteridineh[#1]#2{%
+\iforigpt \typeout{command `pteridineh' %
+ is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{1==N;3==N;5==N;8==N}{#2}}%
+\def\pteridinehi{%
+ \@ifnextchar[{\@pteridinehi[@}{\@pteridinehi[acfhk]}}%
+\def\@pteridinehi[#1]#2{%
+\iforigpt \typeout{command `pteridinehi' %
+ is based on `decaheterohi'.}\fi%
+\decaheterohi[#1]{1==N;3==N;5==N;8==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Six-to-five fused heterocycles}
+% \subsection{Horizontal type}
+%
+% The standard skeleton of a six-to-five fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% **************************
+% * nonahetero derivatives *
+% * (horizontal type) *
+% **************************
+% The following numbering is adopted in this macro.
+%
+% 3 2
+%
+% 1 (*1 origin)
+%
+% (8)3a 7a(9)
+%
+% 4 7
+%
+% 5 6
+% ____ ____
+% |cf. |
+% | 4 (8) |
+% | * 3a |
+% | 5 * * ----- 3 |
+% | | | | |
+% | | | | |
+% | 6 * * * * 2 |
+% | * 7a * |
+% | 7 (9) 1 |
+% | ^ |
+% | | |
+% | the original point |
+% |____ ____|
+% \end{verbatim}
+%
+% The macro |\nonaheteroh| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \nonaheteroh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `j' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to j, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The options `A' and `B' represent aromatic circles in two rings.
+% The option `$n+$' ($n=1$ to $9$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of bonds
+%
+% none or r : aromatic six-membered ring
+% [] : fully saturated form
+% a : 1,2-double bond b : 2,3-double bond
+% c : 3,3a-double bond d : 4,3a-double bond
+% e : 4,5-double bond f : 5,6-double bond
+% g : 6,7-double bond h : 7,7a-double bond
+% i : 1,7a-double bond
+% j : 3a,4a-double bond
+% J : 3a,4a-double bond in the other ring
+% A : aromatic circle (six-membered)
+% B : aromatic circle (five-membered)
+% {n+} : plus at the n-nitrogen atom (n = 1 to 9)
+% {0+} : plus (or others) at the center
+% of the five-membered cycle
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 9 atoms)
+%
+% for n = 1 to 7
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% na : Hetero atom at 3a or 7b (n=3 or 7)
+% e.g. 3a==N (or 8==N) for N at 4a-position
+% 7a==N (or 9==N) for N at 8a-position
+% \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 8 (3a position) and 9 (7a position)
+%
+% 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
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a to j; see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \nonaheteroh{1==N}{1==Cl;2==F}
+% \nonaheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\nonaheteroh| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheteroh|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh| several times in
+% a restricted fashion.
+% \end{enumerate}
+% \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/12/05}{Add: fused and spiro rings}
+% \changes{v2.01}{2001/6/20}{The
+% \cs{storeclipinfo} command is added.}
+%
+% \begin{macro}{\nonaheteroh}
+% \begin{macro}{\@nona@heteroh}
+% \begin{macro}{\@nona@@heteroh}
+% \begin{macro}{\@nonaheteroh}
+% \begin{macrocode}
+\def\nonaheteroh{\@ifnextchar({\@nona@heteroh(@}{\@nona@heteroh(@)}}
+\def\@nona@heteroh(#1){\@ifnextchar[{\@nona@@heteroh(#1)[@}%
+{\@nona@@heteroh(#1)[@]}}
+\def\@nona@@heteroh(#1)[#2]#3#4{\@ifnextchar[%
+{\@nonaheteroh(#1)[#2]{#3}{#4}[@}%
+{\@nonaheteroh(#1)[#2]{#3}{#4}[@]}}
+\def\@nonaheteroh(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\test@vertix@nonav{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylpositionh{#4}{5}{1}{5}{-1}% %substituents on 1 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\let\ddd=\eee\let\eee=\fff\let\fff=\gggA
+\ylpositionh{#4}{11}{3}{7}{-1}% %substituents on 5 to 7
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{\let\aaa=\hhh
+\ylpositionh{#4}{-3}{0}{2}{0}%%substituent on 4
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{4}% %9 for 7a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-303}\def\@@yli{171}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-7}{10}% %8 for 3a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-103}\def\@@yli{171}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(1200,1200)(-400,-800){nonaheteroh}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\set@skel@bondh{#1}{a}{c}% bond between 1 and 2 \@aaa -> \hskbondc etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@longbond{#1}{c}{hskbondvert}%
+ % bond between 3 and 3a \@ccc -> \hskbondhoriz etc
+\set@skel@bondh{#1}{j}{e}% bond between 3a and 7a \@jjj -> \hskbonde etc
+\set@skel@bondh{#1}{i}{d}% bond between 7a and 1 \@iii -> \hskbondd etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA
+ \let\ccc=\iii\let\bbb=\jjj%
+\Put@Direct(0,-342){\set@skel@bondh{#1}{d}{a}}%
+ % bond between 3a and 4 \@ddd -> \hskbonda etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{h}{c}}%
+ % bond between 7a and 7 \@hhh -> \hskbondc etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{g}{d}}%
+ % bond between 6 and 7 \@ggg -> \hskbondd etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{f}{e}}%
+ % bond between 5 and 6 \@fff -> \hskbonde etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{e}{f}}%
+ % bond between 4 and 5 \@eee -> \hskbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 3a and 7a
+ \Put@Direct(0,-342){\hbondf}% bond between 4 and 5
+ \Put@Direct(0,-342){\hbondd}% bond between 6 and 7
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \Put@Direct(0,0){\hbondc}% bond between 3 and 4
+\else \if\member b\relax%
+ \Put@Direct(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax%
+ \Put@Direct(0,0){\hbondvert}% bond between 3 and 3a
+\else \if\member d\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbonda}% bond between 4 and 3a
+}%
+\else \if\member e\relax%
+{\let\aaa=\hhh \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbondf}% bond between 4 and 5
+}%
+\else \if\member f\relax%
+{\let\eee=\fff \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbonde}% bond between 5 and 6
+}%
+\else \if\member g\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \Put@Direct(0,-342){\hbondd}% bond between 6 and 7
+}%
+\else \if\member h\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \Put@Direct(0,-342){\hbondc}% bond between 7 and 7a
+}%
+\else \if\member i\relax%
+{\let\eee=\iii%
+ \Put@Direct(0,0){\hbondd}% bond between 1 and 7a
+}%
+\else \if\member j\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 7a and 3a
+}%
+\else \if\member J\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \Put@Direct(0,0){\hbonde}% bond between 7a and 3a
+}%
+\else \if\member B%left aromatic circle
+ \Put@oCircle(233,0){180}% %circle (five-membered)
+\else \if\member A%left aromatic circle
+ \Put@oCircle(203,-342){240}% %circle (six-membered)
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{3a}\def\aay{7a}%
+ \if\@@tmpa 1\relax%
+ \putratom{272}{-18}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{233}{60}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{120}{60}{\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{68}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{120}{-452}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{233}{-452}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putratom{272}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 0\relax%
+ \putratom{196}{-30}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@nonah
+\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\@tmpclipfalse
+%position 7 should be treated before
+%position 1 (using the same \if@clip)
+\Put@Direct(0,-342){%
+%%\@clipfalse%2003/5/1 bugfix by Shinsaku Fujita deleted/2006/9/5
+\set@hetatom@sixh{#3}{11}{3}{7}{-1}%
+% \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+% \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+% \@eclipfalse \if@clip \global\@ecliptrue \fi%
+ \@gclipfalse \if@fclip \@gcliptrue \fi%
+ \@fclipfalse \if@eclip \@fcliptrue \fi%
+ \@eclipfalse \if@clip \@ecliptrue \fi%
+ \@clipfalse%2006/9/5added
+\storeclipinfo
+}%substituents on 5 to 7
+%%\developclipinfo%%2006/9/5 deleted
+\Put@Direct(0,0){\set@hetatom@sixh{#3}{5}{1}{5}{-1}%
+% \if@aclip \global\@acliptrue\fi
+% \if@bclip \global\@bcliptrue\fi
+% \if@cclip \global\@ccliptrue\fi
+\storeclipinfo
+}% %substituents on 1 to 3
+%%\developclipinfo%%2006/9/5 deleted
+\Put@Direct(0,-342){\set@hetatom@sixh{#3}{-3}{0}{2}{0}%
+% \@aclipfalse \if@aclip \global\@hcliptrue \fi%
+% \@aclipfalse \if@aclip \@hcliptrue \fi
+ \@hclipfalse \if@aclip \@hcliptrue \fi%%2006/9/5 bugfix
+\storeclipinfo
+}%%substituent on 4
+%%\developclipinfo%%2006/9/5 deleted
+\Put@Direct(0,0){\set@vrtx@nonafuseh{#3}%
+ \@iclipfalse%2006/9/5 bugfix by Shinsaku Fujita
+ \@jclipfalse%2006/9/5 bugfix by Shinsaku Fujita
+ \@tmpclipfalse
+%% \if@iclip \global\@tmpcliptrue \fi
+%% \if@jclip \global\@icliptrue \fi
+%% \if@tmpclip \global\@jcliptrue \fi
+ \if@iclip \@tmpcliptrue \fi
+ \if@jclip \@icliptrue \else \@iclipfalse \fi
+ \if@tmpclip \@jcliptrue \else \@jclipfalse \fi
+\storeclipinfo
+%===\clipinfo===
+}% fused positions
+\developclipinfo
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\Put@Direct(0,0){\setsixringh{#4}{5}{1}{5}{-1}}% %substituents on 1 to 3
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 5 to 7
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\Put@Direct(0,-342){\setsixringh{#4}{11}{3}{7}{-1}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 4
+\Put@Direct(0,-342){\setsixringh{#4}{-3}{0}{2}{0}}%
+}%
+{%
+% \@clipfusefalse \if@iclip \@clipfusetrue \fi%change to the next line
+ \@clipfusefalse \if@jclip \@clipfusetrue \fi%2006/9/5
+ \Put@Direct(303,-171){\setatombond{#4}{-8}{4}}% %9 for 7a position
+}%
+{%
+% \@clipfusefalse \if@jclip \@clipfusetrue \fi%change to the next line
+ \@clipfusefalse \if@iclip \@clipfusetrue \fi%2006/9/5
+ \Put@Direct(103,-171){\setatombond{#4}{-7}{10}}% %8 for 3a position
+}%
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \nonaheteroh macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@vrtx@nonafuseh| is an inner command contained
+% in the definition of |\nonaheteroh|, where the macro is used to set
+% a hetero atom on a vertex of a bridgehead location.
+% \changes{v2.00}{1998/12/05}{New command: \cs{set@vrtx@nonafuseh}}
+%
+% \begin{macro}{\set@vrtx@nonafuseh}
+% \begin{macrocode}
+\def\set@vrtx@nonafuseh#1{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa\or\or
+ \or%%%%3
+ \if\@tmpb a%
+ \global\@icliptrue%
+ \putlatom{135}{-211}{\@memberb}% % left type
+ \else\if\@tmpb h%
+ \XyMTeXWarning{Forbidden fused position `3a' or `8'}%
+ \else\if\@tmpb s%
+ \XyMTeXWarning{Forbidden fused position `3a' or `8'}%
+ \else\ifx\@tmpb\empty\relax
+ \else
+ \XyMTeXWarning{Forbidden fused position `3a' or `8'}%
+ \fi\fi\fi\fi
+ \or\or\or
+ \or%7
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putratom{273}{-211}{\@memberb}% % right type
+ \else\if\@tmpb h%
+ \XyMTeXWarning{Forbidden fused position `7a' or `9'}%
+ \else\if\@tmpb s%
+ \XyMTeXWarning{Forbidden fused position `7a' or `9'}%
+ \else\ifx\@tmpb\empty\relax
+ \else
+ \XyMTeXWarning{Forbidden fused position `7a' or `9'}%
+ \fi\fi\fi\fi
+\or%8 (= 3a)
+ \ifx\@tmpb\empty%
+ \global\@icliptrue%
+ \putlatom{135}{-211}{\@memberb}% % left type
+ \else
+ \XyMTeXWarning{Forbidden fused position `3a' or `8'}%
+ \fi
+\or%9 (= 7a)
+ \ifx\@tmpb\empty%
+ \global\@jcliptrue%
+ \putratom{273}{-211}{\@memberb}% % right type
+ \else
+ \XyMTeXWarning{Forbidden fused position `7a' or `9'}%
+ \fi
+\fi\fi}%
+}% end of the macro \set@vrtx@nonafuseh
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse horizontal type}
+%
+% The standard skeleton of a six-to-five fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ************************************
+% * nonahetero derivatives *
+% * (horizontal type, inverse type) *
+% ************************************
+% The following numbering is adopted in this macro.
+%
+%
+% 2 3
+%
+% 1
+%
+% (9)7a 3a(8)
+%
+% 7 4
+%
+% 6 5
+% ____ ____
+% |cf. |
+% | 7 (9) 1 |
+% | * 7a * |
+% | 6 * * * * 2 |
+% | | | | |
+% | | | | |
+% | 5 * * ----- 3 |
+% | * 3a |
+% | 4 (8) |
+% | ^ |
+% | | |
+% | the original point |
+% |____ ____|
+% \end{verbatim}
+%
+% The macro |\nonaheterohi| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \nonaheterohi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `j' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to j, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The options `A' and `B' represent aromatic circles in two rings.
+% The option `$n+$' ($n=1$ to $9$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+%
+% BONDLIST: list of bonds
+%
+% none or r : aromatic six-membered ring
+% [] : fully saturated form
+% a : 1,2-double bond b : 2,3-double bond
+% c : 3,3a-double bond d : 4,3a-double bond
+% e : 4,5-double bond f : 5,6-double bond
+% g : 6,7-double bond h : 7,7a-double bond
+% i : 1,7a-double bond
+% j : 3a,4a-double bond
+% J : 3a,4a-double bond in the other ring
+% A : aromatic circle (six-membered)
+% B : aromatic circle (five-membered)
+% {n+} : plus at the n-nitrogen atom (n = 1 to 9)
+% {0+} : plus (or others) at the center
+% of the five-membered cycle
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 9 atoms)
+%
+% for n = 1 to 7
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% na : Hetero atom at 3a or 7b (n=3 or 7)
+% e.g. 3a==N (or 8==N) for N at 4a-position
+% 7a==N (or 9==N) for N at 8a-position
+% \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 8 (3a position) and 9 (7a position)
+%
+% 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
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a to j; see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \nonaheterohi{1==N}{1==Cl;2==F}
+% \nonaheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\nonaheterohi| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheteroh|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh| several times in
+% a restricted fashion.
+% \end{enumerate}
+% \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/12/05}{Add: fused and spiro rings}
+% \changes{v2.01}{2001/6/20}{The
+% \cs{storeclipinfo} command is added.}
+%
+% \begin{macro}{\nonaheterohi}
+% \begin{macro}{\@nona@heterohi}
+% \begin{macro}{\@nona@@heterohi}
+% \begin{macro}{\@nonaheterohi}
+% \begin{macrocode}
+\def\nonaheterohi{\@ifnextchar({\@nona@heterohi(@}{\@nona@heterohi(@)}}
+\def\@nona@heterohi(#1){\@ifnextchar[{\@nona@@heterohi(#1)[@}%
+{\@nona@@heterohi(#1)[@]}}
+\def\@nona@@heterohi(#1)[#2]#3#4{\@ifnextchar[%
+{\@nonaheterohi(#1)[#2]{#3}{#4}[@}%
+{\@nonaheterohi(#1)[#2]{#3}{#4}[@]}}
+\def\@nonaheterohi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%initialize
+\test@vertix@nonavi{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylpositionh{#4}{0}{0}{4}{0}% %substituents on 1 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\let\ddd=\eee\let\eee=\fff\let\fff=\gggA
+\ylpositionh{#4}{0}{3}{7}{0}%%substituents on 4 to 6
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{\let\aaa=\hhh
+\ylpositionh{#4}{-6}{0}{2}{0}%%substituent on 7
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{342}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-7}{4}% %8 for 3a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-303}\def\@@yli{171}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{10}%%9 for 7a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-103}\def\@@yli{171}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(1200,1200)(-400,-800){nonaheterohi}%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\set@skel@bondh{#1}{a}{a}% bond between 1 and 2 \@aaa -> \hskbonda etc
+\set@skel@bondh{#1}{b}{b}% bond between 2 and 3 \@bbb -> \hskbondb etc
+\set@skel@longbond{#1}{c}{hskbondverti}%
+ % bond between 3 and 3a \@ccc -> \hskbondverti etc
+\set@skel@bondh{#1}{j}{e}% bond between 3a and 7a \@jjj -> \hskbonde etc
+\set@skel@bondh{#1}{i}{f}% bond between 7a and 1 \@iii -> \hskbondf etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+\Put@Direct(0,-342){\set@skel@bondh{#1}{h}{a}}%
+ % bond between 7a and 7 \@hhh -> \hskbonda etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{d}{c}}%
+ % bond between 3a and 4 \@ddd -> \hskbondc etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{e}{d}}%
+ % bond between 4 and 5 \@eee -> \hskbondd etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{f}{e}}%
+ % bond between 5 and 6 \@fff -> \hskbonde etc
+\Put@Direct(0,-342){\set@skel@bondh{#1}{g}{f}}%
+ % bond between 6 and 7 \@ggg -> \hskbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\gggA%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 3a and 7a
+ \Put@Direct(0,-342){\hbondf}% bond between 6 and 7
+ \Put@Direct(0,-342){\hbondd}% bond between 4 and 5
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \Put@Direct(0,0){\hbonda}% bond between 1 and 2
+\else \if\member b\relax%
+ \Put@Direct(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax%
+ \Put@Direct(0,0){\hbondverti}% bond between 3 and 3a
+\else \if\member d\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \Put@Direct(0,-342){\hbondc}% bond between 4 and 3a
+}%
+\else \if\member e\relax%
+{\let\ddd=\eee\let\eee=\fff%
+ \Put@Direct(0,-342){\hbondd}% bond between 4 and 5
+}%
+\else \if\member f\relax%
+{\let\eee=\fff \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbonde}% bond between 5 and 6
+}%
+\else \if\member g\relax%
+{\let\aaa=\hhh \let\fff=\gggA%
+ \Put@Direct(0,-342){\hbondf}% bond between 7 and 6
+}%
+\else \if\member h\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbonda}% bond between 7 and 7a
+}%
+\else \if\member i\relax%
+{\let\fff=\jjj%
+ \Put@Direct(0,0){\hbondf}% bond between 1 and 7a
+}%
+\else \if\member j\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \Put@Direct(0,-342){\hbondb}% bond between 7a and 3a
+}%
+\else \if\member J\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \Put@Direct(0,0){\hbonde}% bond between 7a and 3a
+}%
+\else \if\member B%aromatic circle
+ \Put@oCircle(173,0){180}% %circle (five-membered)
+\else \if\member A%aromatic circle
+ \Put@oCircle(203,-342){240}% %circle (six-membered)
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{7a}\def\aay{3a}%
+ \if\@@tmpa 1\relax%
+ \putratom{68}{-18}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{233}{60}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{120}{60}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putratom{68}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{120}{-452}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{233}{-452}{\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{272}{-360}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{120}{-110}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{233}{-110}{\@@tmpb}% % right type
+ \else\if\@@tmpa 0\relax%
+ \putratom{140}{-30}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@nonahi
+\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\Put@Direct(0,0){\set@hetatom@sixh{#3}{0}{0}{4}{0}%
+% \if@aclip \global\@acliptrue\fi
+% \if@bclip \global\@bcliptrue\fi
+% \if@cclip \global\@ccliptrue\fi
+\storeclipinfo
+}% %substituents on 1 to 3
+\developclipinfo
+\Put@Direct(0,-342){\set@hetatom@sixh{#3}{0}{3}{7}{0}%
+% \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+% \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+% \@eclipfalse \if@clip \global\@ecliptrue \fi
+ \@gclipfalse \if@fclip \@gcliptrue \fi%
+ \@fclipfalse \if@eclip \@fcliptrue \fi%
+ \@eclipfalse \if@clip \@ecliptrue \fi
+\storeclipinfo
+}%substituents on 4 to 6
+\developclipinfo
+\Put@Direct(0,-342){%
+\@aclipfalse\@bclipfalse\@cclipfalse%2003/05/01 bugfix by Shinsaku Fujita
+\set@hetatom@sixh{#3}{-6}{0}{2}{0}%
+% \@hclipfalse \if@aclip \global\@hcliptrue \fi
+ \@hclipfalse \if@aclip \@hcliptrue \fi
+\storeclipinfo
+}%%substituent on 7
+\developclipinfo
+\Put@Direct(0,0){\set@vrtx@nonafusehi{#3}%
+% \if@iclip \global\@icliptrue \fi
+% \if@jclip \global\@jcliptrue \fi
+\storeclipinfo
+}% fused positions
+\developclipinfo
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\Put@Direct(0,0){\setsixringh{#4}{0}{0}{4}{0}}% %substituents on 1 to 3
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 4 to 6
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\Put@Direct(0,-342){\setsixringh{#4}{0}{3}{7}{0}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 7
+\Put@Direct(0,-342){\setsixringh{#4}{-6}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \Put@Direct(303,-171){\setatombond{#4}{-7}{4}}% %8 for 3a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \Put@Direct(103,-171){\setatombond{#4}{-8}{10}}%%9 for 7a position
+}%
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \nonaheterohi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The command |\set@vrtx@nonafusehi| is to set an atom (stored as
+% |\@memberb|) at one (stored as |\@tmpa|) of the fused vertices
+% of a six-five ring.
+% These vertices are incapable of accomodating a spiro group.
+% On the other hand, the other positions can take spiro groups
+% (stored as |\@memberb|), which are treated by means of
+% the command |\set@hetatom@sixh|.
+% The command |\set@vrtx@nonafusehi| is used in such commands
+% as |\nonaheterohi| for treating thier ATOMLISTs,
+%
+% \begin{macro}{\set@vrtx@nonafusehi}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@vrtx@nonafusehi}}
+% \begin{macrocode}
+\def\set@vrtx@nonafusehi#1{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoCH@R\@membera//%
+\ifcase\@tmpa%
+ \or
+ \or
+ \or%%%%3
+ \if\@tmpb a%
+ \global\@icliptrue%
+ \putratom{273}{-211}{\@memberb}% % right type
+ \else\relax
+ \fi
+ \or%4
+ \or%5
+ \or%6
+ \or%7
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putlatom{135}{-211}{\@memberb}% % left type
+ \else\relax
+ \fi
+\or%8 (= 3a)
+ \ifx\@tmpb\empty
+ \global\@icliptrue%
+ \putratom{273}{-211}{\@memberb}% % right type
+ \else
+ \XyMTeXWarning{Forbidden spiro ring for the 3a position}%
+ \fi
+\or%9 (= 7a)
+ \ifx\@tmpb\empty
+ \global\@jcliptrue%
+ \putlatom{135}{-211}{\@memberb}% % left type
+ \else
+ \XyMTeXWarning{Forbidden spiro ring for the 7a position}%
+ \fi
+\fi\fi}%
+}% end of the macro \set@vrtx@nonafusehi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Short-cut commands for fused heterocycles}
+%
+% The macros |\nonaheteroh| and |\nonaheterohi| can be used in the
+% form of a fixed |ATOMLIST|. Hence, the resulting commands for
+% drawing a fused heterocyle with one or more nitrogen atoms
+% have an argument |SUBSLIST| as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% **********************************************************
+% * heterocycles having fused six- and five-membered rings *
+% * (horizontal type) *
+% **********************************************************
+%
+% N-heterocycles:
+%
+% \indoleh[BONDLIST]{SUBSLIST}
+% \indolehi[BONDLIST]{SUBSLIST}
+%
+% \isoindoleh[BONDLIST]{SUBSLIST}
+% \isoindolehi[BONDLIST]{SUBSLIST}
+%
+% \indolizineh[BONDLIST]{SUBSLIST}
+% \indolizinehi[BONDLIST]{SUBSLIST}
+% (different from the IUPAC numbering)
+%
+% \purineh[BONDLIST]{SUBSLIST}
+% \purinehi[BONDLIST]{SUBSLIST}
+% (different from the IUPAC numbering)
+%
+% O-heterocycles:
+%
+% \benzofuraneh[BONDLIST]{SUBSLIST}
+% \benzofuranehi[BONDLIST]{SUBSLIST}
+%
+% \isobenzofuranehi[BONDLIST]{SUBSLIST}
+%
+% \benzoxazoleh[BONDLIST]{SUBSLIST}
+% \benzoxazolehi[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to j, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The optiona `A' typesets an aromatic circle.
+% The option
+% `$n+$' ($n=1$ to $9$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of bonds
+%
+% none or r : aromatic six-membered ring
+% [] : fully saturated form
+% a : 1,2-double bond b : 2,3-double bond
+% c : 3,3a-double bond d : 4,3a-double bond
+% e : 4,5-double bond f : 5,6-double bond
+% g : 6,7-double bond h : 7,7a-double bond
+% i : 1,7a-double bond
+% j : 3a,4a-double bond
+% J : 3a,4a-double bond in the other ring
+% A : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 9)
+% \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 8 (3a position) and 9 (7a position)
+%
+% 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
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \indoleh{1==N}{1==Cl;2==F}
+% \indoleh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\purineh}
+% \begin{macro}{\purinehi}
+% \begin{macrocode}
+\def\purineh{\@ifnextchar[{\@purineh[@}{\@purineh[ra]}}%
+\def\@purineh[#1]#2{%
+\iforigpt \typeout{command `purineh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{1==N;3==N;5==N;7==N}{#2}}%
+\def\purinehi{\@ifnextchar[{\@purinehi[@}{\@purinehi[ra]}}%
+\def\@purinehi[#1]#2{%
+\iforigpt \typeout{command `purinehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{1==N;3==N;5==N;7==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\indoleh}
+% \begin{macro}{\indolehi}
+% \begin{macrocode}
+\def\indoleh{\@ifnextchar[{\@indoleh[@}{\@indoleh[rb]}}%
+\def\@indoleh[#1]#2{%
+\iforigpt \typeout{command `indoleh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{1==N}{#2}}%
+\def\indolehi{\@ifnextchar[{\@indolehi[@}{\@indolehi[rb]}}%
+\def\@indolehi[#1]#2{%
+\iforigpt \typeout{command `indolehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{1==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\indolizineh}
+% \begin{macro}{\indolizinehi}
+% \begin{macrocode}
+\def\indolizineh{%
+ \@ifnextchar[{\@indolizineh[@}{\@indolizineh[aceg]}}%
+\def\@indolizineh[#1]#2{%
+\iforigpt \typeout{command `indolizineh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{7a==N}{#2}}%
+\def\indolizinehi{%
+ \@ifnextchar[{\@indolizinehi[@}{\@indolizinehi[aceg]}}%
+\def\@indolizinehi[#1]#2{%
+\iforigpt \typeout{command `indolizinehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{7a==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\isoindoleh}
+% \begin{macro}{\isoindolehi}
+% \begin{macrocode}
+\def\isoindoleh{%
+ \@ifnextchar[{\@isoindoleh[@}{\@isoindoleh[cegi]}}%
+\def\@isoindoleh[#1]#2{%
+\iforigpt \typeout{command `isoindoleh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{2==N}{#2}}%
+\def\isoindolehi{%
+ \@ifnextchar[{\@isoindolehi[@}{\@isoindolehi[cegi]}}%
+\def\@isoindolehi[#1]#2{%
+\iforigpt \typeout{command `isoindolehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{2==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\benzofuraneh}
+% \begin{macro}{\benzofuranehi}
+% \begin{macrocode}
+\def\benzofuraneh{%
+ \@ifnextchar[{\@benzofuraneh[@}{\@benzofuraneh[rb]}}%
+\def\@benzofuraneh[#1]#2{%
+\iforigpt \typeout{command `benzofuraneh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{1==O}{#2}}%
+\def\benzofuranehi{%
+ \@ifnextchar[{\@benzofuranehi[@}{\@benzofuranehi[rb]}}%
+\def\@benzofuranehi[#1]#2{%
+\iforigpt \typeout{command `benzofuranehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{1==O}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\isobenzofuraneh}
+% \begin{macro}{\isobenzofuranehi}
+% \begin{macrocode}
+\def\isobenzofuraneh{\@ifnextchar[{\@isobenzofuraneh[@}%
+ {\@isobenzofuraneh[cegi]}}%
+\def\@isobenzofuraneh[#1]#2{%
+\iforigpt \typeout{command `isobenzofuraneh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{2==O}{#2}}%
+\def\isobenzofuranehi{\@ifnextchar[{\@isobenzofuranehi[@}%
+ {\@isobenzofuranehi[cegi]}}%
+\def\@isobenzofuranehi[#1]#2{%
+\iforigpt \typeout{command `isobenzofuranehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{2==O}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\benzoxazoleh}
+% \begin{macro}{\benzoxazolehi}
+% \begin{macrocode}
+\def\benzoxazoleh{%
+ \@ifnextchar[{\@benzoxazoleh[@}{\@benzoxazoleh[rb]}}%
+\def\@benzoxazoleh[#1]#2{%
+\iforigpt \typeout{command `benzoxazoleh' %
+ is based on `nonaheteroh'.}\fi%
+\nonaheteroh[#1]{1==O;3==N}{#2}}%
+\def\benzoxazolehi{%
+ \@ifnextchar[{\@benzoxazolehi[@}{\@benzoxazolehi[rb]}}%
+\def\@benzoxazolehi[#1]#2{%
+\iforigpt \typeout{command `benzoxazolehi' %
+ is based on `nonaheterohi'.}\fi%
+\nonaheterohi[#1]{1==O;3==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Building blocks}
+% \subsection{Six-membered ring unit}
+%
+% The old function (v1.01) of |\sixunitv| as a fusing ring unit
+% is succeeded by |\sixfusev| and |\sixfusevi|.
+% The command |\sixunitv| has been changed into a subsidiary
+% command of |\sixheterov| (v2.00).
+%
+% The macro |\sixunith| is a six-membered fragment that can be
+% fused to another
+% ring structure to produce a new ring system. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% **********************
+% * six-membered unit *
+% * (horizontal type) *
+% **********************
+% b
+% 2 3
+% a ----- c
+% * *
+% the original point ===> 1 * * 4
+% (0,0) * * d
+% f -----
+% 6 5
+% e
+% \end{verbatim}
+%
+% The macro |\sixunith| has three arguments |ATOMLIST|, |SUBSLIST|
+% and |OMIT|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \sixunith[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `$n+$' ($n=1$ to $6$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : fully saturated
+% 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
+% {n+} : plus at the n-nitrogen atom (n = 1 to 6)
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 6 atoms)
+%
+% for n = 1 to 6
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position,
+% e.g. 1==N for N at 1-position
+% \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}
+%
+% The argument |OMIT| represents one bond to be omitted.
+% The omitted edge is regarded as a fused position.
+%
+% \begin{verbatim}
+% OMIT: one bond omitted (a, b, c, d, e, or f)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \sixhunitv{1==N}{1==Cl;2==F}{e}
+% \end{verbatim}
+%
+% The definition of |\sixunith| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheteroh|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh|.
+% \end{enumerate}
+%
+% \begin{macro}{\sixunith}
+% \begin{macro}{\@sixunith}
+% \begin{macrocode}
+\def\sixunith{\@ifnextchar[{\@sixunith[@}{\@sixunith[@]}}
+\def\@sixunith[#1]#2#3#4{\sixheteroh[#1]{#2}{#3}[#4]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v3.00}{2002/4/30}{\cs{sixunith}: Old definition deleted.}
+%
+% \subsection{Five-membered ring unit}
+% \subsubsection{Horizonatl type}
+%
+% The old function (v1.01) of |\fiveunith| as a fusing ring unit
+% is succeeded by |\fivefuseh|.
+% The command |\fiveunith| has been changed into a subsidiary
+% command of |\fiveheteroh| (v2.00).
+%
+% The macro |\fiveunith| is a five-membered fragment that can be
+% fused to another
+% ring structure to produce a new ring system. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% **********************
+% * five-membered unit *
+% * (horizontal type) *
+% **********************
+%
+% 3 _____ 2
+% | *
+% | * 1 <===== the original point
+% | *
+% 4 ----- 5
+% \end{verbatim}
+%
+% The macro |\fiveunith| has three arguments |ATOMLIST|, |SUBSLIST|
+% and |OMIT|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \fiveunith[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `$n+$' ($n=1$ to $5$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of inner double bonds
+%
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,1-double bond
+% A : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% {0+} : plus (or others) at the center
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 5 atoms)
+%
+% for n = 1 to 5
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% \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 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one bond to be omitted.
+% The omitted edge is regarded as a fused position.
+%
+% \begin{verbatim}
+% OMIT: one bond omitted (a, b, c, d, e, or f)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \fiveunith{1==N}{1==H;2==F}{a}
+% \end{verbatim}
+%
+% The definition of |\fiveunith| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheteroh|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh| partially.
+% \end{enumerate}
+%
+% \begin{macro}{\fiveunith}
+% \begin{macro}{\@fiveunith}
+% \begin{macrocode}
+\def\fiveunith{\@ifnextchar[{\@fiveunith[@}{\@fiveunith[r]}}
+\def\@fiveunith[#1]#2#3#4{\fiveheteroh[#1]{#2}{#3}[#4]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v3.00}{2002/4/30}{\cs{fiveunith}: Old definition deleted.}
+%
+% \subsubsection{Inverse horizontal type}
+%
+% The old function (v1.01) of |\fiveunithi| as a fusing ring unit
+% is succeeded by |\fivefusehi|.
+% The command |\fiveunithi| has been changed into a subsidiary
+% command of |\fiveheterohi| (v2.00).
+%
+% The macro |\fiveunithi| typesets a five-membered fragment that can be
+% fused to another
+% ring structure to produce a new ring system. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% ************************************
+% * five-membered unit *
+% * (horizontal type, inverse type) *
+% ************************************
+%
+% 2 ----- 3
+% * |
+% the original point 1 * |
+% * |
+% _____|
+% 5 4
+% \end{verbatim}
+%
+% The macro |\fiveunithi| has three arguments |ATOMLIST|, |SUBSLIST|
+% and |OMIT|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \fiveunithi[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one
+% character selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `$n+$' ($n=1$ to $5$) represents a plus charge on a hetero atom
+% at the $n$-position.
+%
+% \begin{verbatim}
+% BONDLIST: list of inner double bonds
+%
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,1-double bond
+% A : aromatic circle
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% {0+} : plus (or others) at the center
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 5 atoms)
+%
+% for n = 1 to 5
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position
+% e.g. 1==N for N at 1-position
+% \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 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one bond to be omitted.
+% The omitted edge is regarded as a fused position.
+%
+% \begin{verbatim}
+% OMIT: one bond omitted (a, b, c, d, e, or f)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \fiveunithi{1==N}{1==H;2==F}{a}
+% \end{verbatim}
+%
+% The definition of |\fiveunithi| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheteroh|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringh| partially.
+% \end{enumerate}
+%
+% \begin{macro}{\fiveunithi}
+% \begin{macro}{\@fiveunithi}
+% \begin{macrocode}
+\def\fiveunithi{\@ifnextchar[{\@fiveunithi[@}{\@fiveunithi[r]}}
+\def\@fiveunithi[#1]#2#3#4{\fiveheterohi[#1]{#2}{#3}[#4]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \changes{v3.00}{2002/4/30}{\cs{fiveunithi}: Old definition deleted.}
+%
+% \section{Three-membered heterocycles}
+% \subsection{Horizontal type}
+%
+% The macro |\threeheteroh| typesets a three-membered ring. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% ****************************
+% * thereehetero derivatives *
+% * (horizontal type) *
+% ****************************
+
+% aaa fff
+% 3
+% | ` c
+% b | 1 bbb ccc
+% | / a
+% 2/
+% ddd eee
+%
+% -- --
+% | cf. threeehetero |
+% | fff 3--------2bbb |
+% | ` / |
+% | ddd `1/ <===== the original point |
+% | |
+% -- --
+% \end{verbatim}
+%
+% The macro |\threeheteroh| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \threeheteroh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `c' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to c, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `$n+$' ($n=1$ to $3$) represents a plus charge on a hetero atom
+% at the $n$-position.
+% The option `$n+$' ($n=4$ to $6$) represents a plus charge outside the ring.
+% The option `$0+$' typesets a plus charge at the center of the ring.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : saturated
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,1-double bond
+% A : aromatic circle
+% {n+} : plus at the n-hetero atom (n = 1 to 3)
+% : n=4 -- outer plus at 1 position
+% : n=5 -- outer plus at 2 position
+% : n=6 -- outer plus at 3 position
+% {0+} : plus at the center of a cyclopropane ring
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 3 atoms)
+%
+% for n = 1 to 3
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position,
+% e.g. 1==N for N at 1-position
+% \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 3
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a to c; see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \threeheteroh{1==N}{1==Cl;2==F}
+% \threeheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \threeheteroh{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\threeheteroh| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheterov|:
+% \begin{enumerate}
+% \item treatment of atom list,
+% \item placing outer skeletons,
+% \item placing inner double bonds,
+% \item setting hetero atoms, and
+% \item placing substituents by using |\setsixringv| partially.
+% \end{enumerate}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/5}{Add: spiro and fused rings}
+% \changes{v2.01}{2001/6/20}{The
+% \cs{storeclipinfo} command is added.}
+%
+% \begin{macro}{\threeheteroh}
+% \begin{macro}{\@three@heteroh}
+% \begin{macro}{\@three@@heteroh}
+% \begin{macro}{\@threeheteroh}
+% \begin{macrocode}
+\def\threeheteroh{\@ifnextchar({\@three@heteroh(@}{\@three@heteroh(@)}}
+\def\@three@heteroh(#1){\@ifnextchar[{\@three@@heteroh(#1)[@}%
+{\@three@@heteroh(#1)[@]}}
+\def\@three@@heteroh(#1)[#2]#3#4{\@ifnextchar[%
+{\@threeheteroh(#1)[#2]{#3}{#4}[@}%
+{\@threeheteroh(#1)[#2]{#3}{#4}[@]}}
+\def\@threeheteroh(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% The procedure of adusting substitution positions is based on
+% a horizontal six-membered ring, in which the positions
+% 4 (ddd), 6 (fff), 2 (bbb) are used in place of the positions
+% 1, 2, and 3 of the three-membered ring.
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{d}{f}{b}{@}{@}{@}%tentative use for six-h
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylpositionh{#4}{3}{3}{5}{0}%subst 1
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{235}\def\@@yli{-103}\fi
+\else
+\ylpositionh{#4}{-1}{1}{3}{0}%subst 3
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{103}\def\@@yli{-29}\fi
+\else
+\ylpositionh{#4}{4}{5}{7}{0}%subst 2
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{103}\def\@@yli{-171}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(580,700)(-200,-240){threeheteroh}%
+(200,240)%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% The procedures of setting skeletal and inner bonds are based on
+% a vertical six-membered ring, where the bonds c, e, and a are
+% used in place of the bonds a, b, and c. Hence,
+% (1) the bond a of the latter should be related to |\bbb| and |\ccc| at
+% the one terminal and to |\eee| and |\ddd| at the other terminal;
+% (2) the bond b of the latter should be related to |\eee| and |\ddd| at
+% the one terminal and to |\aaa| and |\fff| at the other terminal; and
+% (3) the bond c of the latter should be related to |\bbb| and |\ccc| at
+% the one terminal and to |\aaa| and |\fff| at the other terminal.
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % retreatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{c}{e}{a}{@}{@}{@}%
+\test@vertix@sixv{#3}{b}{d}{f}{@}{@}{@}%
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\Put@Direct(0,0){\set@skel@bond{#1}{a}{c}}%
+ % bond between 1 and 2 \@aaa -> \skbondc etc
+\Put@Direct(171,-103){\set@skel@bond{#1}{b}{e}}%
+ % bond between 2 and 3 \@bbb -> \skbonde etc
+\Put@Direct(0,-200){\set@skel@bond{#1}{c}{a}}%
+ % bond between 3 and 1 \@ccc -> \skbonda etc
+}%
+%
+% \Put@Direct(0,0){\skbondc}% bond between 1 and 2
+% \Put@Direct(0,-200){\skbonda}% bond between 1 and 3
+% \Put@Direct(171,-103){\skbonde}%bond between 2 and 3
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+\else\if\member a\relax\Put@Direct(0,0){\bondc}%
+\else\if\member b\relax\Put@Direct(171,-103){\bonde}%
+\else\if\member c\relax\Put@Direct(0,-200){\bonda}%
+\else\if\member A\relax% aromatic circle
+ \Put@oCircle(70,103){100}% %circle
+\else
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@threeh
+\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% The proceduce of setting hetero atoms on the vertices of
+% a three-membered ring is based on the macro |\set@hetaromh@sixh|,
+% where the positions 4, 6, and 2 of a horizontal six-membered ring
+% are used in place of the positions 1, 2, and 3 of the three-membered ring.
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+%\Put@Direct(-235,103){\set@hetatom@sixh{#3}{3}{3}{5}{0}%
+\Put@Direct(-215,103){\set@hetatom@sixh{#3}{3}{3}{5}{0}%
+%\if@clip \global\@cliptrue\fi
+\storeclipinfo
+}%subst 1 <--six h 4
+\developclipinfo
+\Put@Direct(-103,29){\set@hetatom@sixh{#3}{-1}{1}{3}{0}%
+%\if@bclip \global\@bcliptrue\fi
+\storeclipinfo
+}%subst 3 <--six h 2
+\developclipinfo
+\Put@Direct(-103,171){\set@hetatom@sixh{#3}{4}{5}{7}{0}%
+%\if@fclip \global\@fcliptrue\fi
+\storeclipinfo
+}%subst 2 <--six h 6
+\developclipinfo
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\Put@Direct(-235,103){\setsixringh{#4}{3}{3}{5}{0}}%subst 1
+\Put@Direct(-103,29){\setsixringh{#4}{-1}{1}{3}{0}}%subst 3
+\Put@Direct(-103,171){\setsixringh{#4}{4}{5}{7}{0}}%subst 2
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \threeheteroh macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@fusionadd@threeh| is an inner command contained
+% in the definition of |\threeheteroh| etc., where
+% the macro is used for setting an additive
+% or a fused ring at each bond (designated by |\@@tmpa|). The
+% fused ring is typeset by the inner command |\set@fusion@threeh|.
+%
+% \begin{macro}{\set@fusionadd@threeh}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusionadd@threeh}}
+% \begin{macrocode}
+\def\set@fusionadd@threeh{%
+ \if\@@tmpa 0\relax%
+ \putratom{35}{85}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 1\relax%
+ \putratom{80}{85}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{15}{50}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{15}{120}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{180}{130}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{20}{-60}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{20}{230}{\scriptsize\@@tmpb}% % right type
+ \else
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+ \set@fusion@threeh
+ \fi\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@threeh| is used for typesetting
+% a fused ring at each bond represented by |\@@tmpa|. Warnings
+% concerning mismatched ring-fusions are based on the command
+% |\FuseWarning|.
+%
+% \begin{macro}{\set@fusion@threeh}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@threeh}}
+% \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
+% \begin{macrocode}
+\def\set@fusion@threeh{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa b\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{-200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{0}{200}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa a\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{0}{200}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+\fi\fi\fi\fi\fi\fi%
+\global\let\FuseWarning=\FuseW@rning%added 2010/10/01
+}% end of the macro \set@fusion@threeh
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v5.01}{2013/3/19}{added \cs{oxiraneh}, \cs{aziridineh}, and \cs{thiiraneh} }
+% \begin{macro}{\oxiraneh}
+% \begin{macro}{\aziridineh}
+% \begin{macro}{\thiiraneh}
+% \begin{macrocode}
+\def\oxiraneh{\@ifnextchar[{\@oxiraneh[@}{\@oxiraneh[]}}
+\def\@oxiraneh[#1]#2{%
+\iforigpt \typeout{command `oxiraneh' %
+ is based on `threeheteroh'.}\fi%
+\threeheteroh[#1]{1==O}{#2}}
+\def\aziridineh{\@ifnextchar[{\@aziridineh[@}{\@aziridineh[]}}
+\def\@aziridineh[#1]#2{%
+\iforigpt \typeout{command `aziridineh' %
+ is based on `threeheteroh'.}\fi%
+\threeheteroh[#1]{1==N}{#2}}
+\def\thiiraneh{\@ifnextchar[{\@thiiraneh[@}{\@thiiraneh[]}}
+\def\@thiiraneh[#1]#2{%
+\iforigpt \typeout{command `thiiraneh' %
+ is based on `threeheteroh'.}\fi%
+\threeheteroh[#1]{1==S}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Inverse horizontal type}
+%
+% The macro |\threeheterohi| typesets a three-membered ring. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% *******************************
+% * thereehetero derivatives *
+% * (vertical horizontal type) *
+% *******************************
+%
+% aaa bbb
+% c 3
+% / |
+% eee 1 | b
+% fff a` |
+% 2 <---original point
+% ccc ddd
+% \end{verbatim}
+%
+% The macro |\threeheterohi| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% Two optional arguments |SKBONDLIST| and |OMIT| are added to
+% treat stereochemical information or other bond situations.
+%
+% \begin{verbatim}
+% \threeheterohi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \end{verbatim}
+%
+% The |SKBONDLIST| argument contains pairs of two alphabets in
+% parentheses, e.g. (\{bA\}\{fB\}). Each pair contains a lowercase
+% character selected from bond specifiers `a' to `c' and a uppercase
+% character `A' or `B'.
+%
+% The |BONDLIST| argument contains one
+% character selected from a to c, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% The option `$n+$' ($n=1$ to $3$) represents a plus charge on a hetero atom
+% at the $n$-position.
+% The option `$n+$' ($n=4$ to $6$) represents a plus charge outside the ring.
+% The option `$0+$' typesets a plus charge at the center of the ring.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : saturated
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,1-double bond
+% A : aromatic circle
+% {n+} : plus at the n-hetero atom (n = 1 to 3)
+% : n=4 -- outer plus at 1 position
+% : n=5 -- outer plus at 2 position
+% : n=6 -- outer plus at 3 position
+% {0+} : plus at the center of a cyclopropane ring
+% \end{verbatim}
+%
+% The |ATOMLIST| argument contains one or more heteroatom descriptors
+% which are separated from each other by a semicolon. Each heteroatom
+% descriptor consists of a locant number and a heteroatom,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% ATOMLIST: list of heteroatoms (max 3 atoms)
+%
+% for n = 1 to 3
+%
+% n : Hetero atom, e.g. N, O, etc. at n-position,
+% e.g. 1==N for N at 1-position
+% \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 3
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% The argument |OMIT| represents one or more bonds to be omitted.
+% The omitted edges may be regarded as both fused and non-fused
+% positions.
+%
+% \begin{verbatim}
+% OMIT: one or more bonds omitted (a to c; see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \threeheterohi{1==N}{1==Cl;2==F}
+% \threeheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \threeheterohi{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/5}{Add: spiro and fused rings}
+% \changes{v2.01}{2001/6/20}{The
+% \cs{storeclipinfo} command is added.}
+%
+% \begin{macro}{\threeheterohi}
+% \begin{macro}{\@three@heterohi}
+% \begin{macro}{\@three@@heterohi}
+% \begin{macro}{\@threeheterohi}
+% \begin{macrocode}
+\def\threeheterohi{\@ifnextchar({\@three@heterohi(@}{\@three@heterohi(@)}}
+\def\@three@heterohi(#1){\@ifnextchar[{\@three@@heterohi(#1)[@}%
+{\@three@@heterohi(#1)[@]}}
+\def\@three@@heterohi(#1)[#2]#3#4{\@ifnextchar[%
+{\@threeheterohi(#1)[#2]{#3}{#4}[@}%
+{\@threeheterohi(#1)[#2]{#3}{#4}[@]}}
+\def\@threeheterohi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% The procedure of adusting substitution positions is based on
+% a horizontal six-membered ring, in which the positions
+% 1 (aaa), 5 (eee), 3 (ccc) are used in place of the positions
+% 1, 2, and 3 of the three-membered ring.
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{a}{e}{c}{@}{@}{@}%tentative use for six-h
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylpositionh{#4}{0}{0}{2}{0}%subst 1
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{171}\def\@@yli{-103}\fi
+\else
+\ylpositionh{#4}{0}{2}{4}{0}%subst 3
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{303}\def\@@yli{-29}\fi
+\else
+\ylpositionh{#4}{3}{4}{6}{0}%subst 2
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{303}\def\@@yli{-171}\fi
+\fi
+\begin{ShiftPicEnvB}(0,0)(-\yl@shiftii,-\yl@shifti)/%
+(580,700)(-400,-240){threeheterohi}%
+(400,240)%2002/4/30 by S. Fujita
+% \end{macrocode}
+%
+% The procedures of setting skeletal and inner bonds are based on
+% a vertical six-membered ring, where the bonds d, b, and f are
+% used in place of the bonds a, b, and c.
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % retreatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{e}{c}{a}{@}{@}{@}%
+\test@vertix@sixv{#3}{f}{d}{b}{@}{@}{@}%
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\Put@Direct(0,0){\set@skel@bond{#1}{a}{d}}%
+ % bond between 1 and 2 \@aaa -> \skbondd etc
+\Put@Direct(-171,-103){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\Put@Direct(0,-200){\set@skel@bond{#1}{c}{f}}%
+ % bond between 3 and 1 \@ccc -> \skbondf etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+\else\if\member a\relax\Put@Direct(0,0){\bondd}%
+\else\if\member b\relax\Put@Direct(-171,-103){\bondb}%
+\else\if\member c\relax\Put@Direct(0,-200){\bondf}%
+\else\if\member A\relax% aromatic circle
+ \Put@oCircle(70,103){100}% %circle
+\else
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@threehi
+\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% The proceduce of setting hetero atoms on the vertices of
+% a three-membered ring is based on the macro |\set@hetaromh@sixh|,
+% where the positions 1, 5, and 3 of a horizontal six-membered ring
+% are used in place of the positions 1, 2, and 3 of the three-membered ring.
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\Put@Direct(-171,103){\set@hetatom@sixh{#3}{0}{0}{2}{0}%
+%\if@aclip \global\@acliptrue\fi
+\storeclipinfo
+}%subst 1 <--six h 1
+\developclipinfo
+\Put@Direct(-303,29){\set@hetatom@sixh{#3}{0}{2}{4}{0}%
+%\if@cclip \global\@ccliptrue\fi
+\storeclipinfo
+\developclipinfo
+}%subst 3 <--six h 3
+\Put@Direct(-303,171){\set@hetatom@sixh{#3}{3}{4}{6}{0}%
+%\if@eclip \global\@ecliptrue\fi
+\storeclipinfo
+}%subst 2 <--six h 5
+\developclipinfo
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\Put@Direct(-171,103){\setsixringh{#4}{0}{0}{2}{0}}%subst 1
+\Put@Direct(-303,29){\setsixringh{#4}{0}{2}{4}{0}}%subst 3
+\Put@Direct(-303,171){\setsixringh{#4}{3}{4}{6}{0}}%subst 2
+\end{ShiftPicEnvB}%
+\iniatom\iniflag}% %end of \threeheterohi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@fusionadd@threehi| is an inner command contained
+% in the definition of |\threeheterohi| etc., where
+% the macro is used for setting an additive
+% or a fused ring at each bond (designated by |\@@tmpa|). The
+% fused ring is typeset by the inner command |\set@fusion@threehi|.
+%
+% \begin{macro}{\set@fusionadd@threeh}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusionadd@threehi}}
+% \begin{macrocode}
+\def\set@fusionadd@threehi{%
+ \if\@@tmpa 0\relax%
+ \putlatom{-35}{85}{\scriptsize\@@tmpb}% % left type
+ \else\if\@@tmpa 1\relax%
+ \putlatom{-80}{85}{\scriptsize\@@tmpb}% % left type
+ \else\if\@@tmpa 2\relax%
+ \putlatom{-15}{50}{\scriptsize\@@tmpb}% % left type
+ \else\if\@@tmpa 3\relax%
+ \putlatom{-15}{120}{\scriptsize\@@tmpb}% % left type
+ \else\if\@@tmpa 4\relax%
+ \putlatom{-180}{130}{\scriptsize\@@tmpb}% % left type
+ \else\if\@@tmpa 5\relax%
+ \putlatom{-20}{-60}{\scriptsize\@@tmpb}% % left type
+ \else\if\@@tmpa 6\relax%
+ \putlatom{-20}{230}{\scriptsize\@@tmpb}% % left type
+ \else
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+ \set@fusion@threehi
+ \fi\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@threehi| is used for typesetting
+% a fused ring at each bond represented by |\@@tmpa|. Warnings
+% concerning mismatched ring-fusions are based on the command
+% |\FuseWarning|.
+%
+% \begin{macro}{\set@fusion@threehi}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@threehi}}
+% \changes{v5.00}{2010/10/01}{\cs{FuseWarning} recovered for bond coloring}
+% \begin{macrocode}
+\def\set@fusion@threehi{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa b\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{-200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{0}{200}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa a\relax%
+ \putlratom{-171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{0}{200}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{-171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+\fi\fi\fi\fi\fi\fi%
+\global\let\FuseWarning=\FuseW@rning%added 2010/10/01
+}% end of the macro \set@fusion@threehi
+%</hetaromh>
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v5.01}{2013/3/19}{added \cs{oxiranehi}, \cs{aziridinehi}, and \cs{thiiranehi} }
+% \begin{macro}{\oxiranehi}
+% \begin{macro}{\aziridinehi}
+% \begin{macro}{\thiiranehi}
+% \begin{macrocode}
+\def\oxiranehi{\@ifnextchar[{\@oxiranehi[@}{\@oxiranehi[]}}
+\def\@oxiranehi[#1]#2{%
+\iforigpt \typeout{command `oxiranehi' %
+ is based on `threeheterohi'.}\fi%
+\threeheterohi[#1]{1==O}{#2}}
+\def\aziridinehi{\@ifnextchar[{\@aziridinehi[@}{\@aziridinehi[]}}
+\def\@aziridinehi[#1]#2{%
+\iforigpt \typeout{command `aziridinehi' %
+ is based on `threeheterohi'.}\fi%
+\threeheterohi[#1]{1==N}{#2}}
+\def\thiiranehi{\@ifnextchar[{\@thiiranehi[@}{\@thiiranehi[]}}
+\def\@thiiranehi[#1]#2{%
+\iforigpt \typeout{command `thiiranehi' %
+ is based on `threeheterohi'.}\fi%
+\threeheterohi[#1]{1==S}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \Finale
+%
+\endinput