diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:25:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:25:05 +0000 |
commit | 2828582f70c71954ec767bead50118e55e23ceae (patch) | |
tree | eb772e5af0b7292319e9fc3357bb16aea5c2c6da /Master/texmf-dist/source/latex/xymtex | |
parent | 03bbdca8223b2d2590f34f46e6ea18bc4cbbf0bc (diff) |
final missing files in source/
git-svn-id: svn://tug.org/texlive/trunk@603 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/xymtex')
36 files changed, 41166 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/xymtex/aliphat.drv b/Master/texmf-dist/source/latex/xymtex/aliphat.drv new file mode 100644 index 00000000000..bd9e118e02b --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/aliphat.drv @@ -0,0 +1,81 @@ +%% +%% This is file `aliphat.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% aliphat.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996, 1998 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1996 +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1996, 1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: aliphat.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{aliphat.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{aliphat.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Aliphatic compounds by {\sffamily aliphat.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{aliphat.dtx} +\end{document} +\endinput +%% +%% End of file `aliphat.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/aliphat.dtx b/Master/texmf-dist/source/latex/xymtex/aliphat.dtx new file mode 100644 index 00000000000..4f1367d15ce --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/aliphat.dtx @@ -0,0 +1,3193 @@ +% \iffalse meta-comment +%% File: aliphat.dtx +% +% Copyright 1993,1996,1998 by Shinsaku Fujita +% +% This file is part of XyMTeX system. +% ------------------------------------- +% +% This file is a successor to: +% +% aliphat.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]. +% +% Copying of this file is authorized only if either +% (1) you make absolutely no changes to your copy, including name and +% directory name; or +% (2) if you do make changes, +% (a) you name it something other than the names included in the +% ``xymtex'' directory and +% (b) you are requested to leave this notice intact. +% This restriction ensures that all standard styles are identical. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., +% Minami-Ashigara, Kanagawa-ken, 250-01, Japan. +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{aliphat} +% \def\versi@ndate{December 01, 1993} +% \def\versi@nno{ver1.00} +% \def\copyrighth@lder{SF}% Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{aliphat} +% \def\versi@ndate{August 16, 1996} +% \def\versi@nno{ver1.01} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{aliphat} +% \def\versi@ndate{October 31, 1998} +% \def\versi@nno{ver1.02} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \fi +% +% \CheckSum{3929} +%% \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} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{aliphat.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +% \iffalse +\documentclass{ltxdoc} +\GetFileInfo{aliphat.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{Aliphatic compounds by {\sffamily aliphat.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +% % (old address) +% % Ashigara Research Laboratories, +% % Fuji Photo Film Co., Ltd., \\ +% % Minami-Ashigara, Kanagawa, 250-01 Japan +} +\date{\filedate} +% +\begin{document} + \maketitle + \DocInput{aliphat.dtx} +\end{document} +%</driver> +% \fi +% +% \section{Introduction}\label{aliphat:intro} +% +% \subsection{Options for {\sffamily docstrip}} +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% \emph{option} & \emph{function}\\ \hline +% aliphat & aliphat.sty \\ +% driver & driver for this dtx file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsection{Version Information} +% +% \begin{macrocode} +%<*aliphat> +\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00} +\typeout{ -- Released December 25, 1998 by Shinsaku Fujita} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\j@urnalname{aliphat} +\def\versi@ndate{December 25, 1998} +\def\versi@nno{ver2.00} +\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +% \end{macrocode} +% +% \section{List of commands for aliphat.sty} +% +% \begin{verbatim} +% ********************************* +% * aliphat.sty: list of commands * +% ********************************* +% +% <Conventions for bond-setting> +% +% \Northbond +% \Eastbond +% \Southbond +% \Westbond +% \NEBond +% \NEbond +% \SEBond +% \SEbond +% \NWBond +% \NWbond +% \SWBond +% \SWbond +% +% \NEBOND +% \NWBOND +% \SEBOND +% \SWBOND +% +% <Macros for position adjustment> +% \ylrtrigonalposition +% \ylRtrigonalposition +% \ylltrigonalposition +% \ylLtrigonalposition +% \ylutrigonalposition +% \ylUtrigonalposition +% \yldtrigonalposition +% \ylDtrigonalposition +% +% \yltethedralposition +% \ylsquareposition +% +% \ylethylenepositiona +% \ylethylenepositionb +% \ylethylenevpositiona +% \ylethylenevpositionb +% +% <Macros for tetravalent atoms> +% +% \tetrahedral \@tetrahedral +% \square \@square +% +% <Macros for trivalent atoms> +% +% \rtrigonal \@rtrigonal +% \Rtrigonal \@Rtrigonal +% \ltrigonal \@ltrigonal +% \Ltrigonal \@Ltrigonal +% \utrigonal \@utrigonal +% \Utrigonal \@Utrigonal +% \dtrigonal \@dtrigonal +% \Dtrigonal \@Dtrigonal +% +% <Macros for two-carbon compounds> +% +% \ethylene \@ethylene +% \Ethylene \@Ethylene +% \ethylenev \@ethylenev +% \Ethylenev \@Ethylenev +% +% <Macros for stereo-projection> +% +% \tetrastereo \@tetrastereo +% \dtetrastereo \@dtetrastereo +% \ethanestereo \@ethanestereo +% \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 aliphat.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}{} +\unitlength=0.1pt +% \end{macrocode} +% +% \section{Macros for bond-setting} +% +% Single, double and triple bonds of aliphatic compounds are represented +% by horizontal, vertical or sloped lines, +% which can be drawn by such commands as |\Eastbond|, +% |\Northbond| and |\SEbond|. +% \changes{v1.02}{1998/10/20}{Adding \cs{NEBOND}, \cs{SEBOND}, \cs{NWBOND}, +% and \cs{SWBOND}} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Northbond} +% \begin{macrocode} +% ******************************** +% * Conventions for bond-setting * +% ******************************** +\def\Northbond{% +\yl@xdiff=40 +\yl@ydiff=-15 +\begin{picture}(100,200)(0,0) + \if\@tmpb D\relax% + \multiput(-13,52)(26,0){2}{\line(0,1){100}}% double bond up + \else\if\@tmpb T\relax% + \multiput(-20,52)(20,0){3}{\line(0,1){100}}% triple bond up + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-8,52){\line(0,1){100}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(0,52){\line(0,1){100}}}% + {{\thicklines \dottedline{20}(0,52)(0,152)}}% + \else\if\@tmpb S% + \put(0,52){\line(0,1){100}}% + \else \put(0,52){\line(0,1){100}}% + \fi\fi\fi\fi\fi% + \putlratom{-40}{167}{\@memberb}%==1 upper substituent +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Eastbond} +% \begin{macrocode} +\def\Eastbond{% +\yl@xdiff=-10 +\yl@ydiff=33 +\begin{picture}(200,200)(0,0) + \if\@tmpb D\relax% + \multiput(50,-13)(0,26){2}{\line(1,0){140}}% double bond right + \else\if\@tmpb T\relax% + \multiput(50,-20)(0,20){3}{\line(1,0){140}}% double bond right + \else\if\@tmpb A%(A) alpha + {\thicklines\put(50,0){\line(1,0){140}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(50,0){\line(1,0){140}}}% + {{\thicklines \dottedline{20}(50,0)(203,0)}}% + \else\if\@tmpb S% + \put(50,0){\line(1,0){140}}% + \else \put(50,0){\line(1,0){140}}% + \fi\fi\fi\fi\fi% + \putratom{200}{-33}{\@memberb}%==2 right substituent +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Southbond} +% \begin{macrocode} +\def\Southbond{% +\yl@xdiff=40 +\yl@ydiff=95 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \multiput(-13,-48)(26,0){2}{\line(0,-1){100}}% double bond down + \else\if\@tmpb T\relax% + \multiput(-20,-48)(20,0){3}{\line(0,-1){100}}% double bond down + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-8,-48){\line(0,-1){100}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(0,-48){\line(0,-1){100}}}% + {{\thicklines \dottedline{20}(0,-48)(0,-148)}}% + \else\if\@tmpb S% + \put(0,-48){\line(0,-1){100}}% + \else \put(0,-48){\line(0,-1){100}}% + \fi\fi\fi\fi\fi% + \putlratom{-40}{-243}{\@memberb}%==3 down substituent +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Westbond} +% \begin{macrocode} +\def\Westbond{% +\yl@xdiff=10 +\yl@ydiff=33 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \multiput(-190,-13)(0,26){2}{\line(1,0){140}}% double bond left + \else\if\@tmpb T\relax% + \multiput(-190,-20)(0,20){3}{\line(1,0){140}}% double bond left + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-190,0){\line(1,0){140}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-190,0){\line(1,0){140}}}% + {{\thicklines \dottedline{20}(-190,0)(-40,0)}}% + \else\if\@tmpb S% + \put(-190,0){\line(1,0){140}}% + \else \put(-190,0){\line(1,0){140}}% + \fi\fi\fi\fi\fi% + \putlatom{-200}{-33}{\@memberb}%==4 left substituent +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\NEBond} +% \begin{macrocode} +\def\NEBond{%degree 120 +\yl@xdiff=-9 +\yl@ydiff=13 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(33,48){\line(5,3){121}}% + \put(47,26){\line(5,3){121}}%northeast double bond + \else\if\@tmpb T\relax% + \put(31,52){\line(5,3){121}}% + \put(40,37){\line(5,3){121}}% + \put(49,22){\line(5,3){121}}%northeast triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(40,47){\line(5,3){121}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(40,47){\line(5,3){121}}}% + {{\thicklines \dottedline{20}(40,47)(161,120)}}% + \else\if\@tmpb S% + \put(40,47){\line(5,3){121}}% + \else \put(40,47){\line(5,3){121}}% + \fi\fi\fi\fi\fi% + \putratom{170}{107}{\@memberb}%==2 (northeast substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\NEbond} +% \begin{macrocode} +\def\NEbond{%degree 90 +\yl@xdiff=-5 +\yl@ydiff=10 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(31,46){\line(1,1){100}}% + \put(49,28){\line(1,1){100}}%northeast double bond + \else\if\@tmpb T\relax% + \put(27,50){\line(1,1){100}}% + \put(40,37){\line(1,1){100}}% + \put(53,24){\line(1,1){100}}%northeast triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(40,47){\line(1,1){100}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(40,47){\line(1,1){100}}}% + {{\thicklines \dottedline{20}(40,47)(140,147)}}% + \else\if\@tmpb S% + \put(40,47){\line(1,1){100}}% + \else \put(40,47){\line(1,1){100}}% + \fi\fi\fi\fi\fi% + \putratom{145}{137}{\@memberb}%==2 (northeast substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\SEBond} +% \begin{macrocode} +\def\SEBond{%degree 120 +\yl@xdiff=-9 +\yl@ydiff=67 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(33,-48){\line(5,-3){121}}% + \put(47,-26){\line(5,-3){121}}%southeast double bond + \else\if\@tmpb T\relax% + \put(31,-52){\line(5,-3){121}}% + \put(40,-37){\line(5,-3){121}}% + \put(49,-22){\line(5,-3){121}}%southeast triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(40,-47){\line(5,-3){121}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(40,-47){\line(5,-3){121}}}% + {{\thicklines \dottedline{20}(40,-47)(161,-120)}}% + \else\if\@tmpb S% + \put(40,-47){\line(5,-3){121}}% + \else \put(40,-47){\line(5,-3){121}}% + \fi\fi\fi\fi\fi% + \putratom{170}{-187}{\@memberb}%==2 (southeast substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\SEbond} +% \begin{macrocode} +\def\SEbond{%degree 90 +\yl@xdiff=-5 +\yl@ydiff=56 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(31,-46){\line(1,-1){100}}% + \put(49,-28){\line(1,-1){100}}%southeast double bond + \else\if\@tmpb T\relax% + \put(27,-50){\line(1,-1){100}}% + \put(40,-37){\line(1,-1){100}}% + \put(53,-24){\line(1,-1){100}}%southeast triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(53,-47){\line(1,-1){100}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(40,-47){\line(1,-1){100}}}% + {{\thicklines \dottedline{20}(40,-47)(140,-147)}}% + \else\if\@tmpb S% + \put(40,-47){\line(1,-1){100}}% + \else \put(40,-47){\line(1,-1){100}}% + \fi\fi\fi\fi\fi% + \putratom{145}{-203}{\@memberb}%==3 (southeast substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\NWBbond} +% \begin{macrocode} +\def\NWBond{% +\begin{picture}(100,300)(0,0) +\yl@xdiff=9 +\yl@ydiff=13 + \if\@tmpb D\relax% + \put(-59,48){\line(-5,3){121}}% + \put(-73,26){\line(-5,3){121}}%northwest double bond + \else\if\@tmpb T\relax% + \put(-57,52){\line(-5,3){121}}% + \put(-66,37){\line(-5,3){121}}% + \put(-75,22){\line(-5,3){121}}%northwest triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-66,47){\line(-5,3){121}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-66,47){\line(-5,3){121}}}% + {{\thicklines \dottedline{20}(-66,47)(-187,120)}}% + \else\if\@tmpb S% + \put(-66,47){\line(-5,3){121}}% + \else \put(-66,47){\line(-5,3){121}}% + \fi\fi\fi\fi\fi% + \putlatom{-196}{107}{\@memberb}%==2 (northwest substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\NWbond} +% \begin{macrocode} +\def\NWbond{% +\begin{picture}(100,300)(0,0) +\yl@xdiff=13 +\yl@ydiff=10 + \if\@tmpb D\relax% + \put(-41,46){\line(-1,1){100}}% + \put(-59,28){\line(-1,1){100}}%northwest double bond + \else\if\@tmpb T\relax% + \put(-37,50){\line(-1,1){100}}% + \put(-50,37){\line(-1,1){100}}% + \put(-63,24){\line(-1,1){100}}%northwest triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-50,47){\line(-1,1){100}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-50,47){\line(-1,1){100}}}% + {{\thicklines \dottedline{20}(-50,47)(-137,147)}}% + \else\if\@tmpb S% + \put(-50,47){\line(-1,1){100}}% + \else \put(-50,47){\line(-1,1){100}}% + \fi\fi\fi\fi\fi% + \putlatom{-163}{137}{\@memberb}%==2 (northwest substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\SWBond} +% \begin{macrocode} +\def\SWBond{% +\yl@xdiff=9 +\yl@ydiff=67 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(-59,-48){\line(-5,-3){121}}% + \put(-73,-26){\line(-5,-3){121}}%southwest double bond + \else\if\@tmpb T\relax% + \put(-57,-52){\line(-5,-3){121}}% + \put(-66,-37){\line(-5,-3){121}}% + \put(-75,-22){\line(-5,-3){121}}%southwest triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-66,-47){\line(-5,-3){121}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-66,-47){\line(-5,-3){121}}}% + {{\thicklines \dottedline{20}(-66,-47)(-187,-120)}}% + \else\if\@tmpb S% + \put(-66,-47){\line(-5,-3){121}}% + \else \put(-66,-47){\line(-5,-3){121}}% + \fi\fi\fi\fi\fi% + \putlatom{-196}{-187}{\@memberb}%==2 (southwest substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\SWbond} +% \begin{macrocode} +\def\SWbond{% +\yl@xdiff=13 +\yl@ydiff=56 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(-41,-46){\line(-1,-1){100}}% + \put(-59,-28){\line(-1,-1){100}}%southwest double bond + \else\if\@tmpb T\relax% + \put(-37,-50){\line(-1,-1){100}}% + \put(-50,-37){\line(-1,-1){100}}% + \put(-63,-24){\line(-1,-1){100}}%southwest triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-50,-47){\line(-1,-1){100}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-50,-47){\line(-1,-1){100}}}% + {{\thicklines \dottedline{20}(-50,-47)(-137,-147)}}% + \else\if\@tmpb S% + \put(-50,-47){\line(-1,-1){100}}% + \else \put(-50,-47){\line(-1,-1){100}}% + \fi\fi\fi\fi\fi% + \putlatom{-163}{-203}{\@memberb}%==3 (southwest substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{New command: \cs{NEBOND}} +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\NEBOND} +% \begin{macrocode} +\def\NEBOND{%degree 120 +\yl@xdiff=-1 +\yl@ydiff=-10 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(48,33){\line(3,5){72}}% + \put(26,47){\line(3,5){72}}%northeast double bond + \else\if\@tmpb T\relax% + \put(52,31){\line(3,5){72}}% + \put(37,40){\line(3,5){72}}% + \put(22,49){\line(3,5){72}}%northeast triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(40,47){\line(3,5){72}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(47,40){\line(3,5){72}}}% + {{\thicklines \dottedline{20}(47,40)(120,161)}}% + \else\if\@tmpb S% + \put(47,40){\line(3,5){72}}% + \else \put(47,40){\line(3,5){72}}% + \fi\fi\fi\fi\fi% + \putratom{120}{170}{\@memberb}%==2 (northeast substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{New command: \cs{SEBOND}} +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\SEBOND} +% \begin{macrocode} +\def\SEBOND{%degree 120 +\yl@xdiff=-1 +\yl@ydiff=70 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(48,-33){\line(3,-5){72}}% + \put(26,-47){\line(3,-5){72}}%southeast double bond + \else\if\@tmpb T\relax% + \put(52,-31){\line(3,-5){72}}% + \put(37,-40){\line(3,-5){72}}% + \put(22,-49){\line(3,-5){72}}%southeast triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(47,-40){\line(3,-5){72}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(47,-40){\line(3,-5){72}}}% + {{\thicklines \dottedline{20}(47,-40)(120,-161)}}% + \else\if\@tmpb S% + \put(47,-40){\line(3,-5){72}}% + \else \put(47,-40){\line(3,-5){72}}% + \fi\fi\fi\fi\fi% + \putratom{120}{-230}{\@memberb}%==2 (southeast substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{New command: \cs{NWBOND}} +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\NWBOND} +% \begin{macrocode} +\def\NWBOND{% +\yl@xdiff=1 +\yl@ydiff=-10 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(-48,33){\line(-3,5){72}}% + \put(-26,47){\line(-3,5){72}}%northwest double bond + \else\if\@tmpb T\relax% + \put(-52,31){\line(-3,5){72}}% + \put(-37,40){\line(-3,5){72}}% + \put(-22,49){\line(-3,5){72}}%northwest triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-40,47){\line(-3,5){72}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-47,40){\line(-3,5){72}}}% + {{\thicklines \dottedline{20}(-47,40)(-120,161)}}% + \else\if\@tmpb S% + \put(-47,40){\line(-3,5){72}}% + \else \put(-47,40){\line(-3,5){72}}% + \fi\fi\fi\fi\fi% + \putlatom{-120}{170}{\@memberb}%==2 (northwest substituent) +%\yl@xdiff=11 +%\yl@ydiff=-14 +% \if\@tmpb D\relax% +% \put(-48,59){\line(-3,5){72}}% +% \put(-26,73){\line(-3,5){72}}%northwest double bond +% \else\if\@tmpb T\relax% +% \put(-52,57){\line(-3,5){72}}% +% \put(-37,66){\line(-3,5){72}}% +% \put(-22,75){\line(-3,5){72}}%northwest triple bond +% \else\if\@tmpb A%(A) alpha +% {\thicklines\put(-47,66){\line(-3,5){72}}}% single bond (alpha) +% \else\if\@tmpb B%(B) beta +% \@ifundefined{dottedline}{\put(-47,66){\line(-3,5){72}}}% +% {{\thicklines \dottedline{20}(-47,66)(-120,187)}}% +% \else\if\@tmpb S% +% \put(-47,66){\line(-3,5){72}}% +% \else \put(-47,66){\line(-3,5){72}}% +% \fi\fi\fi\fi\fi% +% \putlatom{-130}{200}{\@memberb}%==2 (northwest substituent) +%% \putlatom{-120}{170}{\@memberb}%==2 (northwest substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{1998/10/20}{New command: \cs{SWBOND}} +% \changes{v1.02}{1998/10/20}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\SWBOND} +% \begin{macrocode} +\def\SWBOND{% +\yl@xdiff=1 +\yl@ydiff=70 +\begin{picture}(100,300)(0,0) + \if\@tmpb D\relax% + \put(-48,-33){\line(-3,-5){72}}% + \put(-26,-47){\line(-3,-5){72}}%southwest double bond + \else\if\@tmpb T\relax% + \put(-52,-31){\line(-3,-5){72}}% + \put(-37,-40){\line(-3,-5){72}}% + \put(-22,-49){\line(-3,-5){72}}%southwest triple bond + \else\if\@tmpb A%(A) alpha + {\thicklines\put(-47,-40){\line(-3,-5){72}}}% single bond (alpha) + \else\if\@tmpb B%(B) beta + \@ifundefined{dottedline}{\put(-47,-40){\line(-3,-5){72}}}% + {{\thicklines \dottedline{20}(-47,-40)(-120,-161)}}% + \else\if\@tmpb S% + \put(-47,-40){\line(-3,-5){72}}% + \else \put(-47,-40){\line(-3,-5){72}}% + \fi\fi\fi\fi\fi% + \putlatom{-120}{-230}{\@memberb}%==2 (southwest substituent) +\end{picture}}% +% \end{macrocode} +% \end{macro} +% +% \section{Tetrahedral unit} +% +% The macro |\tetrahedral| typesets a compound of tetravalency. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ******************** +% * tetrahedral unit * +% ******************** +% +% 1 +% +% | +% 2 -- 0 -- 4 0 <== the original point +% | +% +% 3 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \tetrahedral[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \tetrahedral{1==Cl;2==F} +% \tetrahedral{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{yltetrahedralposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\tetrahedral} +% \begin{macro}{\@tetrahedral} +% \begin{macrocode} +\def\tetrahedral{\@ifnextchar[{\@tetrahedral[r}{\@tetrahedral[r]}} +\def\@tetrahedral#1]#2{% +%\def\tetrahedral{\@ifnextchar[{\@tetrahedral}{\@tetrahedral[]}} +%\def\@tetrahedral[#1]#2{% +\@reset@ylsw% +\yltetrahedralposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `tetrahedral' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{47}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{ +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\hbox to.72em{\hss\@memberb\hss}}}%central atom +\or\put(0,0){\Northbond}% +\or\put(0,0){\Westbond}% +\or\put(0,0){\Southbond}% +\or\put(0,0){\Eastbond}\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro tetrahedral +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\yltetrahedralposition| is used in +% |\tetrahedral| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{yltetrahedralposition}} +% +% \begin{macro}{\yltetrahedralposition} +% \begin{macrocode} +\def\yltetrahedralposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1 + \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1 + \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1 + \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue%E subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} + +% \section{Divalenth unit} +% +% The command |\divalenth| produces a length-variable divalent unit. +% \changes{v2.00}{1998/12/14}{New command: \cs{divalenth}} +% +% \begin{verbatim} +% ****************** +% * Divalenth unit * +% ****************** +% +% +% +% 1 -- (group) -- 2 0 <== the original point +% +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |GROUP|. +% +% \begin{verbatim} +% \divalenth{GROUP}{SUBSLIST} +% \end{verbatim} +% +% The arugument |GROUP| designates a character strings representing +% a divalent group. The locant number is fixed to be zero. +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% +% \begin{macro}{\divalenth} +% \begin{macrocode} +\def\divalenth#1#2{% +\@reset@ylsw% +\yldivalenthposition{#1}{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,400)(-300,-200)% + \iforigpt \put(-300,-200){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `tetrahedral' origin: % + (\the\noshift,\the\noshift) ---> (300,200)}\fi% +\fi +{\expandafter\@m@mb@r#1;\relax + \putratom{-30}{-33}{\@memberb}}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +\or\put(0,0){\Westbond}% +\or\put(\the\@tempcnta,0){\Eastbond}\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro tetrahedral +% \end{macrocode} +% \end{macro} +% +% The command |\yldivalenthposition| is used in +% |\tetrahedral| to adjust a substitution position. +% \changes{v2.00}{1998/12/14}{Newly added command: +% \cs{yldivalenthposition}} +% +% \begin{macro}{\yldivalenthposition} +% \begin{macrocode} +\def\yldivalenthposition#1#2{% +{\expandafter\@m@mb@r#1;\relax + \setbox0=\hbox{\@memberb}% + \@tempcnta=\wd0 + \@tempcntb=\unitlength + \divide\@tempcnta by\@tempcntb + \global\advance\@tempcnta by-62% + \@tempcntb=\@tempcnta \global\advance\@tempcntb by50\relax + }% +\@@ylswfalse% +\@forsemicol\member:=#2\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 +\ifcase\@tmpa + \or \gdef\@ylii{50}\gdef\@yli{0}\global\@ylswtrue%W subst. on 1 + \or \edef\@ylii{-\the\@tempcntb}\gdef\@yli{0}\global\@ylswtrue%E subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \section{Trigonal unit} +% \subsection{Right-hand trigonal unit (narrow type)} +% +% The macro |\rtrigonal| typesets a compound of trivalency. +% The following numbering is adopted in this macro. +% The two right-hand bonds form an angle of 90$^{\circ}$ (narrow type), +% while the left-hand bond is typeset horizontally. +% +% \begin{verbatim} +% ************************* +% * trigonal unit (right) * +% ************************* +% +% 3 +% / +% / +% 1 --- 0 90 0 <== the original point +% ` +% ` +% 2 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \rtrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+}: + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \rtrigonal{1==Cl;2==F} +% \rtrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% +% \changes{v1.02}{1998/10/31}{Adding \cs{ylrtrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\rtrigonal} +% \begin{macro}{\@rtrigonal} +% \begin{macrocode} +\def\rtrigonal{\@ifnextchar[{\@rtrigonal[r}{\@rtrigonal[r]}} +\def\@rtrigonal#1]#2{% +\@reset@ylsw% +\ylrtrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `rtrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Westbond}% +\or\put(0,0){\SEbond}% +\or\put(0,0){\NEbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro rtrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylrtrigonalposition| is used in +% |\rtrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylrtrigonalposition}} +% +% \begin{macro}{\ylrtrigonalposition} +% \begin{macrocode} +\def\ylrtrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Right-hand trigonal unit (broad type)} +% +% The macro |\Rtrigonal| typesets a compound of trivalency. +% The following numbering is adopted in this macro. +% The two right-hand bonds form an angle of 120$^{\circ}$ (broad type), +% while the left-hand bond is typeset horizontally. +% \changes{v1.02}{1998/10/20}{New command: \cs{Rtrigonal}} +% +% \begin{verbatim} +% ************************* +% * trigonal unit (right) * +% ************************* +% +% 3 +% / +% / +% 1 --- 0 120 0 <== the original point +% ` +% ` +% 2 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \rtrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+}: + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \rtrigonal{1==Cl;2==F} +% \rtrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% +% \changes{v1.02}{1998/10/31}{Adding \cs{ylRtrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Rtrigonal} +% \begin{macro}{\@Rtrigonal} +% \begin{macrocode} +\def\Rtrigonal{\@ifnextchar[{\@Rtrigonal[r}{\@Rtrigonal[r]}} +\def\@Rtrigonal#1]#2{% +\@reset@ylsw% +\ylRtrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `Rtrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Westbond}% +\or\put(0,0){\SEBOND}% +\or\put(0,0){\NEBOND}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro Rtrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylRtrigonalposition| is used in +% |\Rtrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylRtrigonalposition}} +% +% \begin{macro}{\ylRtrigonalposition} +% \begin{macrocode} +\def\ylRtrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1 + \or \gdef\@ylii{-47}\gdef\@yli{40}\global\@ylswtrue% SE subst. on 1 + \or \gdef\@ylii{-47}\gdef\@yli{-40}\global\@ylswtrue% NE subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Left-hand trigonal unit (narrow type)} +% +% The macro |\ltrigonal| typesets a compound of trivalency. +% The following numbering is adopted in this macro. +% The two left-hand bonds form an angle of 90$^{\circ}$ (narrow type), +% while the right-hand bond is typeset horizontally. +% +% \begin{verbatim} +% ************************ +% * trigonal unit (left) * +% ************************ +% +% 2 +% ` +% ` +% 90 0 --- 1 0 <== the original point +% / +% / +% 3 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \ltrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \ltrigonal{1==Cl;2==F} +% \ltrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylltrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\ltrigonal} +% \begin{macro}{\@ltrigonal} +% \begin{macrocode} +\def\ltrigonal{\@ifnextchar[{\@ltrigonal[r}{\@ltrigonal[r]}} +\def\@ltrigonal#1]#2{% +\@reset@ylsw% +\ylltrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `ltrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Eastbond}% +\or\put(0,0){\NWbond}% +\or\put(0,0){\SWbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro ltrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylltrigonalposition| is used in +% |\ltrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylltrigonalposition}} +% +% \begin{macro}{\ylltrigonalposition} +% \begin{macrocode} +\def\ylltrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Left-hand trigonal unit (broad type)} +% +% The macro |\Ltrigonal| typesets a compound of trivalency. +% The following numbering is adopted in this macro. +% The two left-hand bonds form an angle of 120$^{\circ}$ (broad type), +% while the right-hand bond is typeset horizontally. +% \changes{v1.02}{1998/10/20}{New command: \cs{Ltrigonal}} +% +% \begin{verbatim} +% ************************ +% * trigonal unit (left) * +% ************************ +% +% 2 +% ` +% ` +% 120 0 --- 1 0 <== the original point +% / +% / +% 3 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \ltrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \Ltrigonal{1==Cl;2==F} +% \Ltrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylLtrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Ltrigonal} +% \begin{macro}{\@Ltrigonal} +% \begin{macrocode} +\def\Ltrigonal{\@ifnextchar[{\@Ltrigonal[r}{\@Ltrigonal[r]}} +\def\@Ltrigonal#1]#2{% +\@reset@ylsw% +\ylLtrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `Ltrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Eastbond}% +\or\put(0,0){\NWBOND}% +\or\put(0,0){\SWBOND}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro Ltrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylLtrigonalposition| is used in +% |\Ltrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylLtrigonalposition}} +% +% \begin{macro}{\ylLtrigonalposition} +% \begin{macrocode} +\def\ylLtrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{-52}\gdef\@yli{0}\global\@ylswtrue% W subst. on 1 + \or \gdef\@ylii{47}\gdef\@yli{-40}\global\@ylswtrue% NWB subst. on 1 +% \or \gdef\@ylii{47}\gdef\@yli{-66}\global\@ylswtrue% NWB subst. on 1 + \or \gdef\@ylii{47}\gdef\@yli{40}\global\@ylswtrue% SWB subst. on 1 +% \or \gdef\@ylii{47}\gdef\@yli{66}\global\@ylswtrue% SWB subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Upward trigonal unit (narrow type)} +% +% The macro |\utrigonal| typesets a compound of trivalency. +% The two upward bonds form an angle of 90$^{\circ}$ (narrow type), +% while the downward bond is typeset vertically. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ********************** +% * trigonal unit (up) * +% ********************** +% +% The following numbering is adopted in this macro. +% +% 3 . 2 +% ` 90 / +% ` / +% 0 0 <== the original point +% | +% | +% 1 +% +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \utrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+}: + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \utrigonal{1==Cl;2==F} +% \utrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylutrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\utrigonal} +% \begin{macro}{\@utrigonal} +% \begin{macrocode} +\def\utrigonal{\@ifnextchar[{\@utrigonal[r}{\@utrigonal[r]}} +\def\@utrigonal#1]#2{% +\@reset@ylsw% +\ylutrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `utrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Southbond}% +\or\put(0,0){\NEbond}% +\or\put(0,0){\NWbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro utrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylutrigonalposition| is used in +% |\utrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylutrigonalposition}} +% +% \begin{macro}{\ylutrigonalposition} +% \begin{macrocode} +\def\ylutrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Upward trigonal unit (broad type)} +% +% The macro |\Utrigonal| typesets a compound of trivalency. +% The two upward bonds form an angle of 120$^{\circ}$ (broad type), +% while the downward bond is typeset vertically. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ********************** +% * trigonal unit (up) * +% ********************** +% +% 3 2 +% ` 120 / +% ` / +% 0 0 <== the original point +% | +% | +% 1 +% +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \Utrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+}: + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \Utrigonal{1==Cl;2==F} +% \Utrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylutrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Utrigonal} +% \begin{macro}{\@Utrigonal} +% \begin{macrocode} +\def\Utrigonal{\@ifnextchar[{\@Utrigonal[r}{\@Utrigonal[r]}} +\def\@Utrigonal#1]#2{% +\@reset@ylsw% +\ylUtrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300)% + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `Utrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{-27}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Southbond}% +\or\put(0,0){\NEBond}% +\or\put(0,0){\NWBond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro Utrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylUtrigonalposition| is used in +% |\Utrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylUtrigonalposition}} +% +% \begin{macro}{\ylUtrigonalposition} +% \begin{macrocode} +\def\ylUtrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{0}\gdef\@yli{52}\global\@ylswtrue%S subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NEB subst. on 1 + \or \gdef\@ylii{66}\gdef\@yli{-47}\global\@ylswtrue% NWB subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Downward trigonal unit (narrow type)} +% +% The macro |\dtrigonal| typesets a compound of trivalency. +% The upward bond is typeset vertically. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ************************ +% * trigonal unit (down) * +% ************************ +% +% The following numbering is adopted in this macro. +% +% 1 +% | +% | +% 0 0 <== the original point +% / ` +% / 90 ` +% 2 3 +% +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \dtrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \dtrigonal{1==Cl;2==F} +% \dtrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{yldtrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\dtrigonal} +% \begin{macro}{\@dtrigonal} +% \begin{macrocode} +\def\dtrigonal{\@ifnextchar[{\@dtrigonal[r}{\@dtrigonal[r]}} +\def\@dtrigonal#1]#2{% +\@reset@ylsw% +\yldtrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `dtrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Northbond}% +\or\put(0,0){\SEbond}% +\or\put(0,0){\SWbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro dtrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\yldtrigonalposition| is used in +% |\dtrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{yldtrigonalposition}} +% +% \begin{macro}{\yldtrigonalposition} +% \begin{macrocode} +\def\yldtrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Downward trigonal unit (broad type)} +% +% The macro |\Dtrigonal| typesets a compound of trivalency. +% The upward bond is typeset vertically. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ************************ +% * trigonal unit (down) * +% ************************ +% +% The following numbering is adopted in this macro. +% +% 1 +% | +% | +% 0 0 <== the original point +% / ` +% / 120 ` +% 2 3 +% +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \Dtrigonal[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+}: + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 3 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \Dtrigonal{1==Cl;2==F} +% \Dtrigonal{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylDtrigonalposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Dtrigonal} +% \begin{macro}{\@Dtrigonal} +% \begin{macrocode} +\def\Dtrigonal{\@ifnextchar[{\@Dtrigonal[r}{\@Dtrigonal[r]}} +\def\@Dtrigonal#1]#2{% +\@reset@ylsw% +\ylDtrigonalposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `Dtrigonal' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{37}{50}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa +{\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\Northbond}% +\or\put(0,0){\SEBond}% +\or\put(0,0){\SWBond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro Dtrigonal +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\ylDtrigonalposition| is used in +% |\Dtrigonal| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylDtrigonalposition}} +% +% \begin{macro}{\ylDtrigonalposition} +% \begin{macrocode} +\def\ylDtrigonalposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{0}\gdef\@yli{-52}\global\@ylswtrue%N subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SEB subst. on 1 + \or \gdef\@ylii{66}\gdef\@yli{47}\global\@ylswtrue% SWB subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \section{Ethylene derivative} +% \subsection{Horizontal ethylene unit (narrow type)} +% +% The macro |\ethylene| typesets ethylene derivatives. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ***************** +% * ethylene unit * +% ***************** +% +% 1 4 +% ` / +% ` / +% 90 (1)===(2) 90 (1) <== the original point +% / ` +% / ` +% 2 3 +% \end{verbatim} +% +% \begin{verbatim} +% \ethylene[BONDLIST]{ATOMLIST}{SUBSLIST} +% \end{verbatim} +% +% The arugument |BONDLIST| designates the bond between atom (1) and +% atom (2) as well as charges on these centeral atoms. +% +% \begin{verbatim} +% BONDLIST: list of inner bonds and charges +% +% {n+} : + charge (or another one chararacter) on n-atom +% d : inner double bond (between (1) and (2)) +% t : inner triple bond (between (1) and (2)) +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% \end{verbatim} +% +% The arugument |ATOMLIST| designates the list of central atoms. +% +% \begin{verbatim} +% ATOMLIST: list of central atoms +% n : atom for n-position (e.g. 1==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \ethylene{}{1==Cl;2==F} +% \ethylene{}{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenepositiona}, +% \cs{ylethylenepositionb}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\ethylene} +% \begin{macro}{\@ethylene} +% \begin{macrocode} +\def\ethylene{\@ifnextchar[{\@ethylene}{\@ethylene[]}} +\def\@ethylene[#1]#2#3{% +\@reset@ylsw% +\ylethylenepositiona{#3}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\else +\ylethylenepositionb{#3}% +\fi +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{-230}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(800,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `ethylene' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +{\def\aaa{#1}\ifx\aaa\empty% + \multiput(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond +}% +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}% + \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}% + \else\if\@@tmpa d\relax% + {\multiput(42,-13)(0,25){2}{\line(1,0){140}}}% double bond + \else\if\@@tmpa t\relax% + {\multiput(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right + \fi\fi\fi\fi}% +{\def\aaa{#2}% +\ifx\aaa\empty% +\putratom{-40}{-33}{C}%central atom +\putratom{190}{-33}{C}%central atom +\else% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa% +\or\putratom{-40}{-33}{\@memberb}%central atom +\or\putratom{190}{-33}{\@memberb}%central atom +\fi\fi}%end of ifcase +\fi% +}% +\@forsemicol\member:=#3\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa% +\or\put(0,0){\NWbond}% +\or\put(0,0){\SWbond}% +\or\put(230,0){\SEbond}% +\or\put(230,0){\NEbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro ethylene +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ethyleneh} +% \begin{macrocode} +\let\ethyleneh=\ethylene +% \end{macrocode} +% \end{macro} +% +% The commands |\ylethylenepositiona| and |\ylethylenepositiona| +% are used in |\ethylene| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylethylenepositiona} and \cs{ylethylenepositionb}} +% +% \begin{macro}{\ylethylenepositiona} +% \begin{macro}{\ylethylenepositionb} +% \begin{macrocode} +\def\ylethylenepositiona#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +\def\ylethylenepositionb#1{% +\@@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 +\ifcase\@tmpa + \or%omit + \or%omit + \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Horizontal ethylene unit (broad type)} +% +% The macro |\Ethylene| typesets ethylene derivatives. +% The following numbering is adopted in this macro. +% \changes{v1.02}{1998/10/20}{New command: \cs{Ethylene}} +% +% \begin{verbatim} +% ***************** +% * ethylene unit * +% ***************** +% +% 1 4 +% ` / +% ` / +% 120 (1)===(2) 120 (1) <== the original point +% / ` +% / ` +% 2 3 +% \end{verbatim} +% +% \begin{verbatim} +% \Ethylene[BONDLIST]{ATOMLIST}{SUBSLIST} +% \end{verbatim} +% +% The arugument |BONDLIST| designates the bond between atom (1) and +% atom (2) as well as charges on these centeral atoms. +% +% \begin{verbatim} +% BONDLIST: list of inner bonds and charges +% +% {n+} : + charge (or another one chararacter) on n-atom +% d : inner double bond (between (1) and (2)) +% t : inner triple bond (between (1) and (2)) +% \end{verbatim} +% +% The arugument |SUBLIST| designates a set of substitutients. +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% \end{verbatim} +% +% The arugument |ATOMLIST| designates the list of central atoms. +% +% \begin{verbatim} +% ATOMLIST: list of central atoms +% n : atom for n-position (e.g. 1==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \Ethylene{}{1==Cl;2==F} +% \Ethylene{}{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenepositiona}, +% \cs{ylethylenepositionb}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Ethylene} +% \begin{macro}{\@Ethylene} +% \begin{macrocode} +\def\Ethylene{\@ifnextchar[{\@ethylene}{\@ethylene[]}} +\def\@ethylene[#1]#2#3{% +\@reset@ylsw% +\ylethylenepositiona{#3}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\else +\ylethylenepositionb{#3}% +\fi +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{-230}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(800,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `ethylene' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +{\def\aaa{#1}\ifx\aaa\empty% + \multiput(42,-13)(0,25){2}{\line(1,0){140}}\fi% double bond +}% +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 1\relax {\putratom{-27}{60}{\scriptsize\@@tmpb}}% + \else\if\@@tmpa 2\relax {\putratom{203}{60}{\scriptsize\@@tmpb}}% + \else\if\@@tmpa d\relax% + {\multiput(42,-13)(0,25){2}{\line(1,0){140}}}% double bond + \else\if\@@tmpa t\relax% + {\multiput(42,-20)(0,20){3}{\line(1,0){140}}}% triple bond right + \fi\fi\fi\fi}% +{\def\aaa{#2}% +\ifx\aaa\empty% +\putratom{-40}{-33}{C}%central atom +\putratom{190}{-33}{C}%central atom +\else% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa% +\or\putratom{-40}{-33}{\@memberb}%central atom +\or\putratom{190}{-33}{\@memberb}%central atom +\fi\fi}%end of ifcase +\fi% +}% +\@forsemicol\member:=#3\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa% +\or\put(0,0){\NWBOND}% +\or\put(0,0){\SWBOND}% +\or\put(230,0){\SEBOND}% +\or\put(230,0){\NEBOND}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro Ethylene +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Ethyleneh} +% \begin{macrocode} +\let\Ethyleneh=\Ethylene +% \end{macrocode} +% \end{macro} +% +% \subsection{Vertical ethylene unit (narrow type)} +% +% The macro |\ethylenev| typesets ethylene derivatives in a +% vatical manner. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% **************************** +% * ethylene unit (vertical) * +% **************************** +% +% The following numbering is adopted in this macro. +% +% 4 3 +% ` 90 / +% ` / +% (2) +% || +% || +% (1) <== the original point +% / ` +% / 90 ` +% 1 2 +% +% \end{verbatim} +% +% \begin{verbatim} +% \ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST} +% \end{verbatim} +% +% \begin{verbatim} +% BONDLIST: list of inner bonds and charges +% +% {n+} : + charge (or another one chararacter) on n-atom +% d : inner double bond (between (1) and (2)) +% t : inner triple bond (between (1) and (2)) +% \end{verbatim} +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% \end{verbatim} +% +% \begin{verbatim} +% ATOMLIST: list of central atoms +% n : atom for n-position (e.g. 1==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \ethylenev{1==Cl;2==F} +% \ethylenev{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenevpositiona}, +% \cs{ylethylenevpositionb}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\ethylenev} +% \begin{macro}{\@ethylenev} +% \begin{macrocode} +\def\ethylenev{\@ifnextchar[{\@ethylenev}{\@ethylenev[]}} +\def\@ethylenev[#1]#2#3{% +\@reset@ylsw% +\ylethylenevpositiona{#3}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\else +\ylethylenevpositionb{#3}% +\fi +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{-230}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(600,800)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `ethylenev' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\def\aaa{#1}\ifx\aaa\empty% + \put(-20,47){\line(0,1){140}}% vertical + \put(6,47){\line(0,1){140}}\fi% double bond +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb} + \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb} + \else\if\@@tmpa d\relax% + \put(-13,47){\line(0,1){140}}% vertical + \put(13,47){\line(0,1){140}}% double bond + \else\if\@@tmpa t\relax% + \put(-20,47){\line(0,1){140}}% vertical + \put(-0,47){\line(0,1){140}}% triple bond + \put(20,47){\line(0,1){140}}% + \fi\fi\fi\fi}% +\def\aaa{#2}% +\ifx\aaa\empty% +\putratom{-40}{-33}{C}%central atom +\putratom{-40}{197}{C}%central atom +\else% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa% +\or\putratom{-40}{-33}{\@memberb}%central atom +\or\putratom{-40}{197}{\@memberb}%central atom +\fi\fi}%end of ifcase +\fi% +\@forsemicol\member:=#3\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa% +\or\put(0,0){\SWbond}% +\or\put(0,0){\SEbond}% +\or\put(0,230){\NEbond}% +\or\put(0,230){\NWbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro ethylenev +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The commands |\ylethylenevpositiona| and |\ylethylenevpositiona| +% are used in |\ethylenev| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: +% \cs{ylethylenevpositiona} and \cs{ylethylenevpositionb}} +% +% \begin{macro}{\ylethylenepositiona} +% \begin{macro}{\ylethylenepositionb} +% \begin{macrocode} +\def\ylethylenevpositiona#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +\def\ylethylenevpositionb#1{% +\@@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 +\ifcase\@tmpa + \or%omit + \or%omit + \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Vertical ethylene unit (broad type)} +% +% The macro |\Ethylenev| typesets ethylene derivatives in a +% vatical manner. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% **************************** +% * ethylene unit (vertical) * +% **************************** +% +% 4 3 +% ` 120 / +% ` / +% (2) +% || +% || +% (1) <== the original point +% / ` +% / 120 ` +% 1 2 +% \end{verbatim} +% +% \begin{verbatim} +% \Ethylenev[BONDLIST]{ATOMLIST}{SUBSLIST} +% \end{verbatim} +% +% \begin{verbatim} +% BONDLIST: list of inner bonds and charges +% +% {n+} : + charge (or another one chararacter) on n-atom +% d : inner double bond (between (1) and (2)) +% t : inner triple bond (between (1) and (2)) +% \end{verbatim} +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% \end{verbatim} +% +% \begin{verbatim} +% ATOMLIST: list of central atoms +% n : atom for n-position (e.g. 1==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \Ethylenev{1==Cl;2==F} +% \Ethylenev{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylethylenevpositiona}, +% \cs{ylethylenevpositionb}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\Ethylenev} +% \begin{macro}{\@Ethylenev} +% \begin{macrocode} +\def\Ethylenev{\@ifnextchar[{\@Ethylenev}{\@Ethylenev[]}} +\def\@Ethylenev[#1]#2#3{% +\@reset@ylsw% +\ylethylenevpositiona{#3}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\else +\ylethylenevpositionb{#3}% +\fi +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{-230}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(600,800)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `Ethylenev' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\def\aaa{#1}\ifx\aaa\empty% + \put(-20,47){\line(0,1){140}}% vertical + \put(6,47){\line(0,1){140}}\fi% double bond +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 1\relax \putratom{37}{0}{\scriptsize\@@tmpb} + \else\if\@@tmpa 2\relax \putratom{37}{216}{\scriptsize\@@tmpb} + \else\if\@@tmpa d\relax% + \put(-13,47){\line(0,1){140}}% vertical + \put(13,47){\line(0,1){140}}% double bond + \else\if\@@tmpa t\relax% + \put(-20,47){\line(0,1){140}}% vertical + \put(-0,47){\line(0,1){140}}% triple bond + \put(20,47){\line(0,1){140}}% + \fi\fi\fi\fi}% +\def\aaa{#2}% +\ifx\aaa\empty% +\putratom{-40}{-33}{C}%central atom +\putratom{-40}{197}{C}%central atom +\else% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa% +\or\putratom{-40}{-33}{\@memberb}%central atom +\or\putratom{-40}{197}{\@memberb}%central atom +\fi\fi}%end of ifcase +\fi% +\@forsemicol\member:=#3\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa% +\or\put(0,0){\SWBond}% +\or\put(0,0){\SEBond}% +\or\put(0,230){\NEBond}% +\or\put(0,230){\NWBond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro Ethylenev +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \section{Square unit} +% +% The macro |\square| typesets a compound of tetravalency. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% *************** +% * square unit * +% *************** +% +% The following numbering is adopted in this macro. +% +% 4 1 +% ` / +% ` / +% (0) <== the original point +% / ` +% / ` +% 3 2 +% +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \square[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+}: + charge (or another one chararacter) on the center +% \end{verbatim} +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \square{0==C;1==Cl;2==F} +% \square{0==C;1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% \changes{v1.02}{1998/10/31}{Adding \cs{ylsquareposition}, +% \cs{if@ylsw}, \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii}, +% \cs{yl@xdiff} and \cs{yl@ydiff}} +% +% \begin{macro}{\square} +% \begin{macro}{\@square} +% \begin{macrocode} +\def\square{\@ifnextchar[{\@square[r}{\@square[r]}} +\def\@square#1]#2{% +\@reset@ylsw% +\ylsquareposition{#2}% +\if@ylsw \ifx\@@ylii\empty +\def\@@ylii{0}\def\@@yli{0}\fi +\fi +\if@ylsw + \yl@shiftii=\@ylii + \yl@shifti=\@yli + \advance\yl@shiftii\@@ylii + \advance\yl@shifti\@@yli + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(600,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `square' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\fi +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax {\putratom{37}{0}{\scriptsize\@@tmpb}}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifx\@memberb\@yl\else +\ifcase\@tmpa {\putlratom{-40}{-33}{\@memberb}}%central atom +\or\put(0,0){\NEbond}% +\or\put(0,0){\SEbond}% +\or\put(0,0){\SWbond}% +\or\put(0,0){\NWbond}% +\fi%end of ifcase +\fi\fi}% +\end{picture}}%end of macro square +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The commands |\ylsquarepositiona| and |\ylsquarepositiona| +% are used in |\square| to adjust a substitution position. +% \changes{v1.02}{1998/10/20}{Newly added command: \cs{ylsquareposition}} +% +% \begin{macro}{\ylsquareposition} +% \begin{macrocode} +\def\ylsquareposition#1{% +\@@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 +\ifcase\@tmpa + \or \gdef\@ylii{-40}\gdef\@yli{-47}\global\@ylswtrue% NE subst. on 1 + \or \gdef\@ylii{-40}\gdef\@yli{47}\global\@ylswtrue% SE subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{47}\global\@ylswtrue% SW subst. on 1 + \or \gdef\@ylii{50}\gdef\@yli{-47}\global\@ylswtrue% NW subst. on 1 +\fi%end of ifcase +\fi\fi\fi}}% +% \end{macrocode} +% \end{macro} +% +% \section{Ball-stick models} +% \subsection{Tetrahedral unit of stereo type} +% +% The macro |\tetrastereo| typesets a tetrahedral unit in a +% ball-stick fashion. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ***************************** +% * tetrahedral unit (stereo) * +% ***************************** +% +% The following numbering is adopted in this macro. +% +% 1 +% +% | +% 2 -- 0 -- 4 0 <== the original point +% | +% +% 3 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \tetrastereo[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% n : single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \tetrastereo{1==Cl;2==F} +% \tetrastereo{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% +% \begin{macro}{\tetrastereo} +% \begin{macro}{\@tetrastero} +% \begin{macrocode} +\def\tetrastereo{\@ifnextchar[{\@tetrastereo[r}{\@tetrastereo[r]}} +\def\@tetrastereo#1]#2{% +\begin{picture}(600,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `tetrastero' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\put(0,0){\circle{200}}% +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom +\or% + \put(0,100){\line(0,1){70}}% behind + \putlratom{-30}{180}{\@memberb}% and up +\or% + {\thicklines% + \put(-60,10){\line(-5,2){140}}% in front + \putlatom{-205}{30}{\@memberb}}% and left +\or% + \put(0,-100){\line(0,-1){90}}% behind and + \putlratom{-30}{-260}{\@memberb}% down +\or% + {\thicklines% + \put(60,10){\line(5,2){140}}% in front + \putratom{210}{30}{\@memberb}}% and right +\fi\fi}%end of ifcase +\end{picture}}%end of macro tetrastereo +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Tetrahedral unit of inverse stereo type} +% +% The macro |\dtetrastereo| typesets another tetrahedral unit in a +% ball-stick fashion. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ***************************** +% * tetrahedral unit (stereo) * +% ***************************** +% +% The following numbering is adopted in this macro. +% +% 1 +% +% | +% 2 -- 0 -- 4 0 <== the original point +% | +% +% 3 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \dtetrastereo[AUXLIST]{SUBSLIST} +% \end{verbatim} +% +% The arugument |AUXLIST| designates an character on the central +% atom of the formula drawn by this macro. It can be used a plus +% or minus charge on the center. +% +% \begin{verbatim} +% AUXLIST = +% +% {0+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% n : single bond at n-atom +% +% for 0 : cetral atom (e.g. 0==C) +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \dtetrastereo{1==Cl;2==F} +% \dtetrastereo{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% +% \begin{macro}{\dtetrastereo} +% \begin{macro}{\@dtetrastereo} +% \begin{macrocode} +\def\dtetrastereo{\@ifnextchar[{\@dtetrastereo[r}{\@dtetrastereo[r]}} +\def\@dtetrastereo#1]#2{% +\begin{picture}(600,600)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `dtetrastero' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\put(0,0){\circle{200}}% +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 0\relax \putratom{87}{90}{\scriptsize\@@tmpb}\fi}% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom +\or% + \put(0,100){\line(0,1){70}}% behind + \putlratom{-30}{180}{\@memberb}% and up +\or% + \put(-94,-10){\line(-5,-2){108}}% in back + \putlatom{-205}{-110}{\@memberb}% and left +\or% + {\thicklines% + \put(0,-50){\line(0,-1){150}}% behind and + \putlratom{-30}{-260}{\@memberb}}% down +\or% + \put(94,-10){\line(5,-2){108}}% in back + \putratom{210}{-110}{\@memberb}% and right +\fi\fi}%end of ifcase +\end{picture}}%end of macro dtetrastereo +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Ethane unit of stereo type} +% +% The macro |\ethanestereo| typesets an ethane molecule in a +% ball-stick fashion. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ************************** +% * ethane unit (vertical) * +% ************************** +% +% 5 +% | +% 6 -- (2) -- 4 +% | +% | +% 1 -- (1) -- 3 <== the original point +% | +% 2 +% \end{verbatim} +% +% This macro has an argument |SUBSLIST| as well as an optional +% argument |AUXLIST|. +% +% \begin{verbatim} +% \ethanestereo[AUXLIST]{ATOMLIST}{SUBSLIST} +% \end{verbatim} +% +% \begin{verbatim} +% AUXLIST: list of charges +% +% {n+} : + charge (or another one chararacter) on n-atom +% \end{verbatim} +% +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 6 +% +% n : single bond at n-atom +% +% \end{verbatim} +% +% \begin{verbatim} +% ATOMLIST: list of central atoms +% +% n : atom for n-position (e.g. 1==C) +% +% \end{verbatim} +% +% \begin{verbatim} +% e.g. +% +% \ethanestereo{1==Cl;2==F} +% \ethanestereo{1==C;2==C}{1==Cl;4==F;2==CH$_{3}$} +% \end{verbatim} +% +% \begin{macro}{\ethanestereo} +% \begin{macro}{\@ethanestereo} +% \begin{macrocode} +\def\ethanestereo{\@ifnextchar[{\@ethanestereo}{\@ethanestereo[]}} +\def\@ethanestereo[#1]#2#3{% +\begin{picture}(600,800)(-300,-300) + \iforigpt \put(-300,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `ethanestereo' origin: % + (\the\noshift,\the\noshift) ---> (300,300)}\fi% +\put(0,0){\circle{200}}% +\put(0,270){\circle{200}}% +\put(0,100){\line(0,1){70}}% central bond +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \if\@@tmpa 1\relax \putratom{87}{90}{\scriptsize\@@tmpb} + \else\if\@@tmpa 2\relax \putratom{87}{360}{\scriptsize\@@tmpb} + \fi\fi}% +\def\aaa{#2}% +\ifx\aaa\empty\else% +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa% +\or\putratom{-40}{-33}{\@memberb}%central atom +\or\putratom{-40}{237}{\@memberb}%central atom +\fi\fi}%end of ifcase +\fi% +\@forsemicol\member:=#3\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa \putlratom{-40}{-33}{\@memberb}%central atom +\or% + \put(-94,-10){\line(-5,-2){108}}% in back + \putlatom{-205}{-110}{\@memberb}% and left +\or% + {\thicklines% + \put(0,-50){\line(0,-1){150}}% behind and + \putlratom{-30}{-260}{\@memberb}}% down +\or% + \put(94,-10){\line(5,-2){108}}% in back + \putratom{210}{-110}{\@memberb}% and right +% %%%%%%%% +\or% + {\thicklines% + \put(60,280){\line(5,2){140}}% in front + \putratom{210}{300}{\@memberb}}% and right +\or% + \put(0,370){\line(0,1){70}}% behind + \putlratom{-30}{450}{\@memberb}% and up +\or% + {\thicklines% + \put(-60,280){\line(-5,2){140}}% in front + \putlatom{-205}{300}{\@memberb}}% and left +\fi\fi}%end of ifcase +\end{picture}}%end of macro ethanestereo +%</aliphat> +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \Finale +% +\endinput +
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/aliphat.ins b/Master/texmf-dist/source/latex/xymtex/aliphat.ins new file mode 100644 index 00000000000..3339089e203 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/aliphat.ins @@ -0,0 +1,50 @@ +\def\batchfile{aliphat.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996, 1998 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1996
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1996, 1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{aliphat.drv}{t}{%
+ \from{aliphat.dtx}{driver}}
+
+\generateFile{aliphat.sty}{t}{%
+ \from{aliphat.dtx}{aliphat}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/carom.drv b/Master/texmf-dist/source/latex/xymtex/carom.drv new file mode 100644 index 00000000000..447472204cd --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/carom.drv @@ -0,0 +1,82 @@ +%% +%% This is file `carom.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% carom.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996, 1988, 2000 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1998 +%% Version 2.00 Released on December 25, 1998 +%% Version 2.00a Released on June 14, 2000 +%% +%% Copyright (C) 1996,1998,2000 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: carom.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{carom.dtx}[2000/06/14 v2.00a XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{carom.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Drawing carbocyclic compounds by {\sffamily carom.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{carom.dtx} +\end{document} +\endinput +%% +%% End of file `carom.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/carom.dtx b/Master/texmf-dist/source/latex/xymtex/carom.dtx new file mode 100644 index 00000000000..096112e2511 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/carom.dtx @@ -0,0 +1,4615 @@ +% \iffalse meta-comment
+%% File: carom.dtx
+%
+% Copyright 1993,1996,1998,2000 by Shinsaku Fujita
+%
+% This file is part of XyMTeX system.
+% -------------------------------------
+%
+% This file is a successor to:
+%
+% carom.sty
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
+% \typeout{ -- Released December 1, 1993 by Shinsaku Fujita}
+% Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
+%
+% This file is a part of the macro package ``XyMTeX'' which has been
+% designed for typesetting chemical structural formulas.
+%
+% This file is to be contained in the ``xymtex'' directory which is
+% an input directory for TeX. It is a LaTeX optional style file and
+% should be used only within LaTeX, because several macros of the file
+% are based on LaTeX commands.
+%
+% For the review of XyMTeX, see
+% (1) Shinsaku Fujita, ``Typesetting structural formulas with the text
+% formatter TeX/LaTeX'', Computers and Chemistry, in press.
+% The following book deals with an application of TeX/LaTeX to
+% preparation of manuscripts of chemical fields:
+% (2) Shinsaku Fujita, ``LaTeX for Chemists and Biochemists''
+% Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].
+%
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name and
+% directory name; or
+% (2) if you do make changes,
+% (a) you name it something other than the names included in the
+% ``xymtex'' directory and
+% (b) you are requested to leave this notice intact.
+% This restriction ensures that all standard styles are identical.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Department of Chemistry and Materials Technology,
+% Kyoto Institute of Technology,
+% Matsugasaki, Sakyoku, Kyoto, 606, Japan
+%
+% New address:
+% Shinsaku Fujita,
+% Department of Chemistry and Materials Technology,
+% Kyoto Institute of Technology, \\
+% Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{carom}
+% \def\versi@ndate{August 16, 1996}
+% \def\versi@nno{ver1.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
+% Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{carom}
+% \def\versi@ndate{December 01, 1993}
+% \def\versi@nno{ver1.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{carom}
+% \def\versi@ndate{August 16, 1996}
+% \def\versi@nno{ver1.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{carom}
+% \def\versi@ndate{October 31, 1998}
+% \def\versi@nno{ver1.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{carom}
+% \def\versi@ndate{December 25, 1998}
+% \def\versi@nno{ver2.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{3134}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%
+% \setcounter{StandardModuleDepth}{1}
+%
+% \StopEventually{}
+% \MakeShortVerb{\|}
+%
+% \iffalse
+% \changes{v1.01}{1996/08/16}{first edition for LaTeX2e}
+% \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e}
+% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
+% \changes{v2.00a}{2000/06/14}{bug fix}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+% \ProvidesFile{carom.dtx}[1998/12/25 v2.00 XyMTeX{} package file]
+\ProvidesFile{carom.dtx}[2000/06/14 v2.00a XyMTeX{} package file]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{carom.dtx}
+%
+% %%XyMTeX Logo: Definition 2%%%
+\def\UPSILON{\char'7}
+\def\XyM{X\kern-.30em\smash{%
+\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}}
+\def\XyMTeX{\XyM\kern-.1em\TeX}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{Drawing carbocyclic compounds by {\sffamily carom.sty}
+(\fileversion) of \XyMTeX{}}
+\author{Shinsaku Fujita \\
+Department of Chemistry and Materials Technology, \\
+Kyoto Institute of Technology, \\
+Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan
+% % (old address)
+% % Ashigara Research Laboratories,
+% % Fuji Photo Film Co., Ltd., \\
+% % Minami-Ashigara, Kanagawa, 250-01 Japan
+}
+\date{\filedate}
+%
+\begin{document}
+ \maketitle
+ \DocInput{carom.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \section{Introduction}\label{carom:intro}
+%
+% \subsection{Options for {\sffamily docstrip}}
+%
+% \DeleteShortVerb{\|}
+% \begin{center}
+% \begin{tabular}{|l|l|}
+% \hline
+% \emph{option} & \emph{function}\\ \hline
+% carom & carom.sty \\
+% driver & driver for this dtx file \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \MakeShortVerb{\|}
+%
+% \subsection{Version Information}
+%
+% \begin{macrocode}
+%<*carom>
+\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
+\typeout{ -- Released December 25, 1998 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{carom}
+\def\versi@ndate{June 14, 2000}
+\def\versi@nno{ver2.00a}
+\def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
+\space[\copyrighth@lder]}
+% \end{macrocode}
+%
+% \section{List of commands for carom.sty}
+%
+% \begin{verbatim}
+% *******************************
+% * carom.sty: list of commands *
+% *******************************
+%
+% <VERTICAL TYPE>
+%
+% \cyclohexanev \@cyclohexanev
+% \bzdrv \@bzdrv
+% \decalinev \@decalinev
+% \decalinevb \@decalinevb
+% \decalinevt \@decalinevt
+% \naphdrv \@naphdrv
+% \naphdrvb \@naphdrvb
+% \naphdrvt \@naphdrvt
+% \tetralinev \@tetralinev
+% \tetralinevb \@tetralinevb
+% \tetralinevt \@tetralinevt
+% \hanthracenev \@hanthracenev
+% \anthracenev \@anthracenev
+% \hphenanthrenev \@hphenanthrenev
+% \phenanthrenev \@phenanthrenev
+% \steroid \@steroid
+% \steroidchain \@steroidchain
+% \end{verbatim}
+%
+% \begin{verbatim}
+% <HORIZONTAL TYPE>
+%
+% \cyclohexaneh \@cyclohexaneh
+% \bzdrh \@bzdrh
+% \decalineh \@decalineh
+% \naphdrh \@naphdrh
+% \tetralineh \@tetralineh
+%
+% \end{verbatim}
+%
+% \section{Input of basic macros}
+%
+% To assure the compatibility to \LaTeX{}2.09 (the native mode),
+% the commands added by \LaTeXe{} have not been used in the resulting sty
+% files ({\sf carom.sty} for the present case). Hence, the combination
+% of |\input| and |\@ifundefined| is used to crossload sty
+% files ({\sf chemstr.sty} for the present case) in place of the
+% |\RequirePackage| command of \LaTeXe{}.
+% \begin{macrocode}
+% *************************
+% * input of basic macros *
+% *************************
+\@ifundefined{setsixringv}{\input chemstr.sty\relax}{}
+\@ifundefined{decaheterov}{\input hetarom.sty\relax}{}
+\@ifundefined{decaheteroh}{\input hetaromh.sty\relax}{}
+\unitlength=0.1pt
+% \end{macrocode}
+%
+% \section{Cyclohexane derivatives}
+% \subsection{Vertical cyclohexanes}
+%
+% The macro |\cyclohexanev| is used for drawing cyclohexane derivatives
+% of vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\setsixringv|.
+%
+% \begin{verbatim}
+% ***************************
+% * cyclohexane derivatives *
+% * (vertical type) *
+% ***************************
+% The following numbering is adopted in this macro.
+%
+% 1
+% *
+% 6 * * 2
+% | |
+% | |
+% 5 * * 3
+% *
+% 4 <===== the original point
+%
+% \end{verbatim}
+%
+% The macro |\cyclohexanev| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+% \begin{verbatim}
+% \cyclohexanev[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to f as well as A, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : cyclohexane
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,6-double bond
+% f : 6,1-double bond
+% A : aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specifed) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \cyclohexanev{1==Cl;2==F}
+% \cyclohexanev[c]{1==Cl;4==F;2==CH$_{3}$}
+% \cyclohexanev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\cyclohexanev}
+% \begin{macrocode}
+\def\cyclohexanev{\@ifnextchar[{\@cyclohexanev[@}{\@cyclohexanev[@]}}
+\def\@cyclohexanev[#1]#2{\sixheterov[#1]{}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% The following definition has been deleted.
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/11/23}{Adding \cs{set@fusionadd@sixv}}
+%
+% \begin{verbatim}
+% (Old defition)
+% % \begin{macro}{\cyclohexanev}
+% % \begin{macrocode}
+% \def\cyclohexanev{\@ifnextchar[{\@cyclohexanev[@}{\@cyclohexanev[@]}}
+% \def\@cyclohexanev[#1]#2{%
+% \iniatom\iniflag%initialize
+% \@reset@ylsw%
+% \ylposition{#2}{0}{0}{7}{0}%
+% \if@ylsw
+% \yl@shiftii=\@ylii
+% \yl@shifti=\@yli
+% \advance\yl@shiftii\yl@xdiff
+% \advance\yl@shifti\yl@ydiff
+% \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+% \reset@yl@xydiff%1999/1/6 by S. Fujita
+% \else
+% \begin{picture}(800,880)(-\shiftii,-\shifti)
+% \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `cyclohexanev' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+% \fi
+% \put(0,406){\line(-5,-3){171}}% %bond 1-6 8-7
+% \put(0,406){\line(5,-3){171}}% %bond 1-2 8-8a
+% \put(0,0){\line(-5,3){171}}% %bond 4-5 5-6
+% \put(0,0){\line(5,3){171}}% %bond 4-3 5-4a
+% \put(171,103){\line(0,1){200}}% %bond 3-2 4a-8a
+% \put(-171,103){\line(0,1){200}}% %bond 5-6 6-7
+% \@tfor\member:=#1\do{%
+% \if\member r%no endocyclic double bonds
+% \else\if\member a%
+% \put(6,364){\line(5,-3){126}}% %double bond 1-2 8-8a
+% \else\if\member b%
+% \put(138,129){\line(0,1){148}}% %double bond 3-2 4a-8a
+% \else\if\member c%
+% \put(6,42){\line(5,3){126}}% %double bond 4-3 5-4a
+% \else\if\member d%
+% \put(-6,42){\line(-5,3){126}}% %double bond 4-5 5-6
+% \else\if\member e%
+% \put(-138,129){\line(0,1){148}}% %double bond 5-6 6-7
+% \else\if\member f%
+% \put(-6,364){\line(-5,-3){126}}% %double bond 1-6 8-7
+% \else\if\member A%left aromatic circle
+% \put(0,203){\circle{240}} %circle
+% \else \expandafter\twoCH@@R\member//%
+% \set@fusionadd@sixv
+% \fi\fi\fi\fi\fi\fi\fi\fi}%
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \setsixringv{#2}{0}{0}{7}{0}%
+% \end{picture}}%end of \cyclohexanev macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \subsection{Horizontal cyclohexanes}
+%
+% The macro |cyclohexaneh| is used for drawing cyclohexane derivatives
+% of vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\setsixringh|.
+%
+% \begin{verbatim}
+% ***************************
+% * cyclohexane derivatives *
+% * (horizontal type) *
+% ***************************
+% The following numbering is adopted in this macro.
+%
+% 2 3
+% -----
+% * *
+% the original point ===> 1 * * 4
+% (0,0) * *
+% -----
+% 6 5
+% \end{verbatim}
+%
+% The macro |\cyclohexaneh| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \cyclohexaneh[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to f as well as A, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : cyclohexane
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,6-double bond
+% f : 6,1-double bond
+% A : aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specifed) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \cyclohexaneh{1==Cl;2==F}
+% \cyclohexaneh[c]{1==Cl;4==F;2==CH$_{3}$}
+% \cyclohexaneh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% \changes{v2.00a}{2000/06/14}{bug fix: changed letter [r] to [@]
+% in \cs{cycohexaneh} for horizontal cyclohexanes}
+%
+% \begin{macro}{\cyclohexaneh}
+% \begin{macrocode}
+\def\cyclohexaneh{\@ifnextchar[{\@cyclohexaneh[@}{\@cyclohexaneh[@]}}
+\def\@cyclohexaneh[#1]#2{\sixheteroh[#1]{}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% The following definition has been deleted.
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/11/29}{Adding \cs{set@fusionadd@sixv} for
+% fused rings}
+%
+% \begin{verbatim}
+% (Old defition)
+% % \begin{macro}{\cyclohexaneh}
+% % \begin{macrocode}
+% \def\cyclohexaneh{\@ifnextchar[{\@cyclohexaneh[@}{\@cyclohexaneh[r]}}
+% \def\@cyclohexaneh[#1]#2{%
+% \iniatom\iniflag%initialize
+% \@reset@ylsw%
+% \ylpositionh{#2}{0}{0}{7}{0}%
+% \if@ylsw
+% \yl@shiftii=\@ylii
+% \yl@shifti=\@yli
+% \advance\yl@shiftii\yl@xdiff
+% \advance\yl@shifti\yl@ydiff
+% \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+% \reset@yl@xydiff%1999/1/6 by S. Fujita
+% \else
+% \begin{picture}(880,800)(-\shifti,-\shiftii)
+% \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `cyclohexaneh' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+% \fi
+% \put(0,0){\line(3,5){103}}% %bond 1-2
+% \put(0,0){\line(3,-5){103}}% %bond 1-6
+% \put(406,0){\line(-3,5){103}}% %bond 4-3
+% \put(406,0){\line(-3,-5){103}}% %bond 4-3
+% \put(103,171){\line(1,0){200}}% %bond 2-3
+% \put(103,-171){\line(1,0){200}}% %bond 6-5
+% \@tfor\member:=#1\do{%
+% \if\member r%no endcyclic double bonds
+% \else\if\member a%
+% \put(42,6){\line(3,5){78}}% %double bond 1-2
+% \else\if\member b%
+% \put(129,138){\line(1,0){148}}% %double bond 2-3
+% \else\if\member c%
+% \put(364,6){\line(-3,5){78}}% %double bond 4-3
+% \else\if\member d%
+% \put(364,-6){\line(-3,-5){78}}% %double bond 4-5
+% \else\if\member e%
+% \put(129,-138){\line(1,0){148}}% %double bond 6-5
+% \else\if\member f%
+% \put(42,-6){\line(3,-5){78}}% %double bond 1-6
+% \else\if\member A%left aromatic circle
+% \put(203,0){\circle{240}}% %circle
+% \else
+% \expandafter\twoCH@@R\member//%
+% \set@fusionadd@sixh
+% \fi\fi\fi\fi\fi\fi\fi\fi}%
+% %%
+% \setsixringh{#2}{0}{0}{7}{0}%
+% \end{picture}}% %end of \cyclohexaneh macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \section{Benzene and benzoquinone derivatives}
+% \subsection{Vertical type}
+%
+% The macro |\bzdrv| is used for drawing benzene derivatives
+% of vertical type as well as benzoquinone derivatives of
+% vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\cyclohexanev| defined above.
+%
+% The macro |\bzdrv| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% ****************************************
+% * benzene and benzoquinone derivatives *
+% * (vertical type) *
+% ****************************************
+%
+% \bzdrv[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one character (r, l or c) for designate
+% aromatic bond patterns or two characters (p? or o?) for quinone
+% bond patterns.
+%
+% \begin{verbatim}
+%
+% OPT: (bond pattern)
+%
+% none or r : right-handed set of double bonds
+% l : left-handed set of double bonds
+% c : aromatic circle
+%
+% p or pa : p-quinone (A)
+% pb : p-quinone (B)
+% pc : p-quinone (C)
+%
+% o or oa : o-quinone (A)
+% ob : o-quinone (B)
+% oc : o-quinone (C)
+% od : o-quinone (D)
+% oe : o-quinone (E)
+% of : o-quinone (F)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+% \bzdrv{1==Cl;2==F}
+% \bzdrv[c]{1==Cl;4==F;2==CH$_{3}$}
+% \bzdrv[pa]{1D==O;4D==O;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\bzdrv}
+% \begin{macrocode}
+\def\bzdrv{\@ifnextchar[{\@bzdrv}{\@bzdrv[r]}}
+\def\@bzdrv[#1]#2{%
+\iforigpt \typeout{command `bzdrv' is based on `cyclohexanev'.}\fi%
+%\expandafter\twoch@r#1{}%
+\expandafter\twoCH@R#1//%
+\if\@tmpa r% right-handed set of double bonds
+ \ifx\@tmpb\empty
+ \cyclohexanev[bdf]{#2}%
+ \fi
+\else\if\@tmpa l%left-handed set of double bonds
+ \ifx\@tmpb\empty
+ \cyclohexanev[ace]{#2}%
+ \fi
+\else\if\@tmpa c%aromatic circle
+ \ifx\@tmpb\empty
+ \cyclohexanev[A]{#2}%
+ \fi
+\else\if\@tmpa p%p-quinone
+ \if\@tmpb a% (A)
+ \cyclohexanev[be]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \cyclohexanev[be]{#2}%
+ \else\if\@tmpb b% (B)
+ \cyclohexanev[cf]{#2}%
+ \else\if\@tmpb c% (C)
+ \cyclohexanev[ad]{#2}%
+ \fi\fi\fi\fi%
+\else\if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)%
+ \cyclohexanev[ce]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \cyclohexanev[ce]{#2}%
+ \else\if\@tmpb b%o-quinone (B)
+ \cyclohexanev[df]{#2}%
+ \else\if\@tmpb c%o-quinone (C)
+ \cyclohexanev[ae]{#2}%
+ \else\if\@tmpb d%o-quinone (D)
+ \cyclohexanev[bf]{#2}%
+ \else\if\@tmpb e%o-quinone (E)
+ \cyclohexanev[ac]{#2}%
+ \else\if\@tmpb f%o-quinone (F)
+ \cyclohexanev[bd]{#2}%
+ \fi\fi\fi\fi\fi\fi\fi%
+\else% added 1998/11/15 by S. Fujita
+ \cyclohexanev[@#1]{#2}%
+\fi\fi\fi\fi\fi%
+}% %end of \bzdrv macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Horizontal type}
+%
+% The macro |\bzdrh| is used for drawing benzene derivatives
+% of vertical type as well as benzoquinone derivatives of
+% vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\cyclohexanev| defined above.
+%
+% The macro |\bzdrh| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% ****************************************
+% * benzene and benzoquinone derivatives *
+% * (horizontal type) *
+% ****************************************
+%
+% \bzdrh[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one character (r, l or c) for designate
+% aromatic bond patterns or two characters (p? or o?) for quinone
+% bond patterns.
+%
+% \begin{verbatim}
+%
+% OPT: (bond pattern)
+%
+% none or r : right-handed set of double bonds
+% l : left-handed set of double bonds
+% c : aromatic circle
+%
+% p or pa : p-quinone (A)
+% pb : p-quinone (B)
+% pc : p-quinone (C)
+%
+% o or oa : o-quinone (A)
+% ob : o-quinone (B)
+% oc : o-quinone (C)
+% od : o-quinone (D)
+% oe : o-quinone (E)
+% of : o-quinone (F)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% e.g.
+% \bzdrh{1==Cl;2==F}
+% \bzdrh[c]{1==Cl;4==F;2==CH$_{3}$}
+% \bzdrh[pa]{1D==O;4D==O;2==CH$_{3}$}
+%
+% \end{verbatim}
+%
+% \begin{macro}{\bzdrh}
+% \begin{macrocode}
+\def\bzdrh{\@ifnextchar[{\@bzdrh}{\@bzdrh[r]}}
+\def\@bzdrh[#1]#2{%
+\iforigpt \typeout{command `bzdrh' is based on `cyclohexaneh'.}\fi%
+%\expandafter\twoch@r#1{}%
+\expandafter\twoCH@R#1//%
+%\begin{picture}(800,880)(-\noshift,-\noshift)
+\if\@tmpa r% right-handed set of double bonds
+ \cyclohexaneh[bdf]{#2}%
+\else\if\@tmpa l%left-handed set of double bonds
+ \cyclohexaneh[ace]{#2}%
+\else\if\@tmpa c%aromatic circle
+ \cyclohexaneh[A]{#2}%
+\else\if\@tmpa p%p-quinone
+ \if\@tmpb a% (A)
+ \cyclohexaneh[be]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \cyclohexaneh[be]{#2}%
+ \else\if\@tmpb b% (B)
+ \cyclohexaneh[cf]{#2}%
+ \else\if\@tmpb c% (C)
+ \cyclohexaneh[ad]{#2}%
+ \fi\fi\fi\fi%
+\else\if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)%
+ \cyclohexaneh[ce]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \cyclohexaneh[ce]{#2}%
+ \else\if\@tmpb b%o-quinone (B)
+ \cyclohexaneh[df]{#2}%
+ \else\if\@tmpb c%o-quinone (C)
+ \cyclohexaneh[ae]{#2}%
+ \else\if\@tmpb d%o-quinone (D)
+ \cyclohexaneh[bf]{#2}%
+ \else\if\@tmpb e%o-quinone (E)
+ \cyclohexaneh[ac]{#2}%
+ \else\if\@tmpb f%o-quinone (F)
+ \cyclohexaneh[bd]{#2}%
+ \fi\fi\fi\fi\fi\fi\fi%
+\else% added 1998/11/15 by S. Fujita
+ \cyclohexaneh[@#1]{#2}%
+\fi\fi\fi\fi\fi%
+%\end{picture}
+}% %end of \bzdrh macro
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Decaline derivatives}
+% \subsection{Vertical type}
+%
+% The macro |\decalinev| is used for drawing decaline derivatives
+% of vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\setdecaringv|.
+%
+% \begin{verbatim}
+% ************************
+% * decaline derivatives *
+% * (vertical type) *
+% ************************
+% The following numbering is adopted in this macro.
+%
+% 8 (0G)1
+% * 8a *
+% 7 * * * * 2
+% | | |
+% | | |
+% 6 * * * * 3
+% * 4a *
+% 5 (0F)4
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decalinev| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \decalinev[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to k, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A or B indicates aromatic bond patterns (circles).
+% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : decaline
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,4a-double bond
+% e : 5,4a-double bond
+% f : 5,6-double bond
+% g : 6,7-double bond
+% h : 8,7-double bond
+% i : 8,8a-double bond
+% j : 1,8a-double bond
+% k : 4a,8a-double bond
+% K : 4a,8a-double bond in the other ring
+% A : left aromatic circle
+% B : right aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for 0 (fused positions)
+%
+% 0FA : alpha single bond at 8a
+% 0FB : beta single bond at 8a
+% 0FU : unspecified single bond at 8a
+% 0GA : alpha single bond at 4a
+% 0GB : beta single bond at 4a
+% 0GU : unspecified single bond at 4a
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% e.g.
+%
+% \decalinev{1==Cl;2==F;0FA==;0GA==}
+% \decalinev[c]{1==Cl;4==F;2==CH$_{3}$}
+% \decalinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+%
+% \end{verbatim}
+%
+% The macro |\decalinev| has been changed into a subsidiary macro
+% of |\decaheterov| (version 2.00).
+%
+% \begin{macro}{\decalinev}
+% \begin{macrocode}
+\def\decalinev{\@ifnextchar[{\@decalinev[@}{\@decalinev[@]}}
+\def\@decalinev[#1]#2{%
+\iforigpt \typeout{command `decalinev' is based on `decaheterov'.}\fi%
+\decaheterov[#1]{}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% The following definition has been stopped using.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/5}{Add: fused rings}
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\decalinev}
+% % \begin{macrocode}
+% \def\decalinev{\@ifnextchar[{\@decalinev[@}{\@decalinev[r]}}
+% \def\@decalinev[#1]#2{%
+% \iniflag\iniatom
+% \@reset@ylsw\reset@@yl
+% \ylposition{#2}{-7}{0}{2}{0}% for 8
+% \if@ylsw \ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi
+% \else\ylposition{#2}{-1}{3}{7}{0}% for 5 to 7
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\else
+% \ylposition{#2}{0}{0}{5}{0}% for 1 to 4
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{-342}\def\@@yli{0}\fi\else
+% \ylfusedposition{#2}{0}{-1}{1}{0}% for 4a and 8a
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\fi
+% \if@ylsw
+% \yl@shiftii=\@ylii
+% \ifx\@@ylii\empty\else
+% \advance\yl@shiftii\@@ylii\fi
+% \yl@shifti=\@yli
+% \ifx\@@yli\empty\else
+% \advance\yl@shifti\@@yli\fi
+% \advance\yl@shiftii\yl@xdiff
+% \advance\yl@shifti\yl@ydiff
+% \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+% \reset@yl@xydiff%1999/1/6 by S. Fujita
+% \else
+% \begin{picture}(1200,880)(-\shiftii,-\shifti)
+% \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `decalinev' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+% \fi
+% \put(0,406){\line(-5,-3){171}}% %bond 8-7 1-6
+% \put(0,406){\line(5,-3){171}}% %bond 8-8a 1-2
+% \put(0,0){\line(-5,3){171}}% %bond 5-6 4-5
+% \put(0,0){\line(5,3){171}}% %bond 5-4a 4-3
+% \put(171,103){\line(0,1){200}}% %bond 4a-8a 3-2
+% \put(-171,103){\line(0,1){200}}% %bond 5-7 5-6
+% \put(342,406){\line(-5,-3){171}}% %bond 1-8a 1-6
+% \put(342,406){\line(5,-3){171}}% %bond 1-2 1-2
+% \put(342,0){\line(-5,3){171}}% %bond 4-4a 4-5
+% \put(342,0){\line(5,3){171}}% %bond 4-3 4-3
+% \put(513,103){\line(0,1){200}}% %bond 3-2 3-2
+% \@tfor\member:=#1\do{%
+% \if\member r%no endcyclic double bonds
+% \else\if\member a%
+% \put(348,364){\line(5,-3){126}}% %double bond 1-2
+% \else\if\member b%
+% \put(482,129){\line(0,1){148}}% %double bond 3-2
+% \else\if\member c%
+% \put(348,42){\line(5,3){126}}% %double bond 4-3
+% \else\if\member d%
+% \put(348,42){\line(-5,3){126}}% %double bond 4-4a
+% \else\if\member e%
+% \put(6,42){\line(5,3){126}}% %double bond 5-4a
+% \else\if\member f%
+% \put(-6,42){\line(-5,3){126}}% %double bond 5-6
+% \else\if\member g%
+% \put(-138,129){\line(0,1){148}}% %double bond 6-7
+% \else\if\member h%
+% \put(-6,364){\line(-5,-3){126}}% %double bond 8-7
+% \else\if\member i%
+% \put(6,364){\line(5,-3){126}}% %double bond 8-8a
+% \else\if\member j%
+% \put(348,364){\line(-5,-3){126}}% %double bond 1-8a
+% \else\if\member k%
+% \put(138,129){\line(0,1){148}}% %double bond 4a-8a
+% \else\if\member K%
+% \put(204,129){\line(0,1){148}}% %double bond 4a-8a in the other ring
+% \else\if\member A%left aromatic circle
+% \put(0,203){\circle{240}}% %circle
+% \else\if\member B%right aromatic circle
+% \put(342,203){\circle{240}}% %circle
+% \else
+% % ***********************
+% % * setting fused rings *
+% % ***********************
+% \expandafter\twoCH@R\member//%
+% \set@fusion@decav
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% % \end{macrocode}
+% %
+% % The command |\setdecaringv{#2}{0}{-1}{9}{0}|
+% % has been stopped to use and replaced
+% % by the following set of commands.
+% %
+% % \begin{macrocode}
+% \put(0,0){\setsixringv{#2}{-7}{0}{2}{0}}% for 8
+% \put(0,0){\setsixringv{#2}{-1}{3}{7}{0}}% for 5 to 7
+% \put(0,0){\setsixringv{#2}{-1}{3}{7}{0}}% for 5 to 7
+% \put(342,0){\setsixringv{#2}{0}{0}{5}{0}}% for 1 to 4
+% \put(0,0){\setfusedbond{#2}{0}{-1}{1}{0}}% for 4a and 8a
+% \end{picture}}% %end of \decalinev macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \subsection{Vertical-bottom type}
+%
+% The macro |\decalinevb| is used for drawing decaline derivatives
+% of vertical-bottom type (numbering from the bottom to the left-upper part).
+% The word ``vertical'' means that each benzene ring is a vertical type.
+% The word ``bottom'' means that the benzene ring with young locant numbers
+% is located at the bottom.
+% The skeleton and endocyclic double bonds are drawn directly,
+% while substituents and exocyclic bonds are placed by useing
+% the inner macro |\setsixringv|.
+% \changes{v1.02}{1998/10/13}{Newly added command}
+%
+% \begin{verbatim}
+% ***************************
+% * decaline derivatives *
+% * (vertical bottom type) *
+% ***************************
+% The following numbering is adopted in this macro.
+%
+% 7
+% *
+% 6 * * 8
+% | |
+% | | 0G (4a)
+% 5 * * *
+% 0F(4a) * * 1
+% | |
+% | |
+% 4 * * 2
+% *
+% 3
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decalinevb| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \decalinevb[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to k, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A or B indicates aromatic bond patterns (circles).
+% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : decaline
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,4a-double bond
+% e : 5,4a-double bond
+% f : 5,6-double bond
+% g : 6,7-double bond
+% h : 8,7-double bond
+% i : 8,8a-double bond
+% j : 1,8a-double bond
+% k : 4a,8a-double bond
+% K : 4a,8a-double bond in the other ring
+% A : left aromatic circle
+% B : right aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for 0 (fused positions)
+%
+% 0FA : alpha single bond at 8a
+% 0FB : beta single bond at 8a
+% 0FU : unspecified single bond at 8a
+% 0GA : alpha single bond at 4a
+% 0GB : beta single bond at 4a
+% 0GU : unspecified single bond at 4a
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% e.g.
+%
+% \decalinevb{1==Cl;2==F;0FA==;0GA==}
+% \decalinevb[c]{1==Cl;4==F;2==CH$_{3}$}
+% \decalinevb[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+%
+% \end{verbatim}
+%
+% The macro |\decalinevb| has been changed into a subsidiary macro
+% of |\decaheterovb| (version 2.00).
+%
+% \begin{macro}{\decalinevb}
+% \begin{macrocode}
+\def\decalinevb{\@ifnextchar[{\@decalinevb[@}{\@decalinevb[@]}}
+\def\@decalinevb[#1]#2{%
+\iforigpt \typeout{command `decalinevb' is based on `decaheterovb'.}\fi%
+\decaheterovb[#1]{}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% The following old definition has been stopped using.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/25}{Add: Fused rings}
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\decalinevb}
+% % \begin{macrocode}
+% \def\decalinevb{\@ifnextchar[{\@decalinevb[@}{\@decalinevb[r]}}
+% \def\@decalinevb[#1]#2{%
+% \iniflag\iniatom
+% \@reset@ylsw\reset@@yl
+% \ylposition{#2}{1}{1}{6}{0}% for 1 to 4
+% \if@ylsw \ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi
+% \else\ylposition{#2}{0}{4}{7}{0}% for 5 to 6
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{171}\def\@@yli{-303}\fi\else
+% \ylposition{#2}{-6}{0}{3}{0}% for 7 to 8
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{171}\def\@@yli{-303}\fi\else
+% \ylfusedposition{#2}{2}{1}{3}{-1}% for 4a and 8a
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\fi
+% \if@ylsw
+% \yl@shiftii=\@ylii
+% \ifx\@@ylii\empty\else
+% \advance\yl@shiftii\@@ylii\fi
+% \yl@shifti=\@yli
+% \ifx\@@yli\empty\else
+% \advance\yl@shifti\@@yli\fi
+% \advance\yl@shiftii\yl@xdiff
+% \advance\yl@shifti\yl@ydiff
+% \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+% \reset@yl@xydiff%1999/1/6 by S. Fujita
+% \else
+% \begin{picture}(1000,1200)(-550,-240)
+% \iforigpt \put(-550,-240){\circle*{50}}%
+% \put(0,0){\circle{50}}%
+% \typeout{command `decalinevb' origin: %
+% (0,0) ---> (550,240)}\fi%
+% \fi
+% \put(0,0){\line(5,3){171}}% %bond 2-3
+% \put(0,0){\line(-5,3){171}}% %bond 4-3
+% \put(171,103){\line(0,1){200}}% %bond 2-1
+% \put(-171,103){\line(0,1){200}}% %bond 4-4a
+% \put(0,406){\line(-5,-3){171}}% %bond 8a-1
+% \put(0,406){\line(5,-3){171}}% %bond 8a-4a
+% \put(0,406){\line(0,1){200}}% %bond 8a-8
+% \put(-342,406){\line(0,1){200}}% %bond 5-6 3-2
+% \put(-171,303){\line(-5,3){171}}% %bond 4a-5
+% \put(-171,709){\line(-5,-3){171}}% %bond 7-6
+% \put(-171,709){\line(5,-3){171}}% %bond 7-8
+% \@tfor\member:=#1\do{%
+% \if\member r%no endcyclic double bonds
+% \else\if\member a%
+% \put(140,129){\line(0,1){148}}% %double bond 1-2
+% \else\if\member b%
+% \put(6,42){\line(5,3){126}}% %double bond 2-3
+% \else\if\member c%
+% \put(-6,42){\line(-5,3){126}}% %double bond 3-4
+% \else\if\member d%
+% \put(-140,129){\line(0,1){148}}% %double bond 4-4a
+% \else\if\member e%
+% \put(-177,345){\line(-5,3){126}}% %double bond 4a-5
+% \else\if\member f%
+% \put(-311,432){\line(0,1){148}}% %double bond 5-6
+% \else\if\member g%
+% \put(-177,667){\line(-5,-3){126}}% %double bond 7-6
+% \else\if\member h%
+% \put(-165,667){\line(5,-3){126}}% %double bond 7-8
+% \else\if\member i%
+% \put(-31,432){\line(0,1){148}}% %double bond 8a-8
+% \else\if\member j%
+% \put(6,364){\line(5,-3){126}}% %double bond 8a-1
+% \else\if\member k%
+% \put(-6,364){\line(-5,-3){126}}% %double bond 8a-4a
+% \else\if\member K%
+% \put(-165,345){\line(5,3){126}}% %double bond 8a-4a on the other ring
+% \else\if\member A%left aromatic circle
+% \put(-171,506){\circle{240}}% %circle
+% \else\if\member B%right aromatic circle
+% \put(0,203){\circle{240}}% %circle
+% \else
+% % ***********************
+% % * setting fused rings *
+% % ***********************
+% \expandafter\twoCH@R\member//%
+% \set@fusion@decavb
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% % ************************
+% % * setting substituents *
+% % ************************
+% \put(0,0){\setsixringv{#2}{1}{1}{6}{0}}% for 1 to 4
+% \put(-171,303){\setsixringv{#2}{0}{4}{7}{0}}% for 5 to 6
+% \put(-171,303){\setsixringv{#2}{-6}{0}{3}{0}}% for 7 to 8
+% \put(0,0){\setfusedbond{#2}{2}{1}{3}{-1}}% for 4a and 8a
+% \end{picture}}% %end of \decalinevb macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \subsection{Vertical-top type}
+%
+% The macro |\decalinevt| is used for drawing decaline derivatives
+% of vertical-bottom type (numbering from the top to the left-down part).
+% The word ``vertical'' means that each benzene ring is a vertical type.
+% The word ``top'' means that the benzene ring with young locant numbers
+% is located at the top.
+% The skeleton and endocyclic double bonds are drawn directly,
+% while substituents and exocyclic bonds are placed by useing
+% the inner macro |\setsixringv|.
+% \changes{v1.02}{1998/10/13}{Newly added command}
+%
+% \begin{verbatim}
+% ************************
+% * decaline derivatives *
+% * (vertical-top type) *
+% ************************
+% The following numbering is adopted in this macro.
+%
+% 2
+% *
+% 1 * * 3
+% | |
+% | |
+% 0G (8a) * * 4
+% 8 * * 0F(4a)
+% | |
+% | |
+% 7 * * 5
+% *
+% 6
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decalinevt| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \decalinevt[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to k, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A or B indicates aromatic bond patterns (circles).
+% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : decaline
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,4a-double bond
+% e : 5,4a-double bond
+% f : 5,6-double bond
+% g : 6,7-double bond
+% h : 8,7-double bond
+% i : 8,8a-double bond
+% j : 1,8a-double bond
+% k : 4a,8a-double bond
+% K : 4a,8a-double bond in the other ring
+% A : left aromatic circle
+% B : right aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for 0 (fused positions)
+%
+% 0FA : alpha single bond at 8a
+% 0FB : beta single bond at 8a
+% 0FU : unspecified single bond at 8a
+% 0GA : alpha single bond at 4a
+% 0GB : beta single bond at 4a
+% 0GU : unspecified single bond at 4a
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% e.g.
+%
+% \decalinevt{1==Cl;2==F;0FA==;0GA==}
+% \decalinevt[c]{1==Cl;4==F;2==CH$_{3}$}
+% \decalinevt[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+%
+% \end{verbatim}
+%
+% The macro |\decalinevt| has been changed into a subsidiary macro
+% of |\decaheterovt| (version 2.00).
+%
+% \begin{macro}{\decalinevt}
+% \begin{macrocode}
+\def\decalinevt{\@ifnextchar[{\@decalinevt[@}{\@decalinevt[@]}}
+\def\@decalinevt[#1]#2{%
+\iforigpt \typeout{command `decalinevt' is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% The following old definition has been stopped using.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylposition}, \cs{if@ylsw},
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/5}{Add: fused rings}
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\decalinevt}
+% % \begin{macrocode}
+% \def\decalinevt{\@ifnextchar[{\@decalinevt[@}{\@decalinevt[r]}}
+% \def\@decalinevt[#1]#2{%
+% \iniflag\iniatom
+% \@reset@ylsw\reset@@yl
+% \ylposition{#2}{5}{5}{7}{0}% for 1
+% \if@ylsw \ifx\@@ylii\empty
+% \def\@@ylii{-171}\def\@@yli{-303}\fi
+% \else\ylposition{#2}{-1}{0}{4}{0}% for 2 to 4
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{-171}\def\@@yli{-303}\fi\else
+% \ylposition{#2}{-2}{2}{7}{0}% for 5 to 8
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\else
+% \ylfusedposition{#2}{1}{0}{2}{-1}% for 4a and 8a
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\fi
+% \if@ylsw
+% \yl@shiftii=\@ylii
+% \ifx\@@ylii\empty\else
+% \advance\yl@shiftii\@@ylii\fi
+% \yl@shifti=\@yli
+% \ifx\@@yli\empty\else
+% \advance\yl@shifti\@@yli\fi
+% \advance\yl@shiftii\yl@xdiff
+% \advance\yl@shifti\yl@ydiff
+% \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+% \reset@yl@xydiff%1999/1/6 by S. Fujita
+% \else
+% \begin{picture}(1000,1200)(-400,-240)
+% \iforigpt \put(-400,-240){\circle*{50}}%
+% \put(0,0){\circle{50}}%
+% \typeout{command `decalinevb' origin: %
+% (0,0) ---> (400,240)}\fi%
+% \fi
+% \put(0,0){\line(5,3){171}}% %bond 6-5
+% \put(0,0){\line(-5,3){171}}% %bond 6-7
+% \put(171,103){\line(0,1){200}}% %bond 5-4a
+% \put(-171,103){\line(0,1){200}}% %bond 7-8
+% \put(0,406){\line(-5,-3){171}}% %bond 8a-8
+% \put(0,406){\line(5,-3){171}}% %bond 8a-4a
+% \put(0,406){\line(0,1){200}}% %bond 8a-1
+% \put(342,406){\line(0,1){200}}% %bond 4-3
+% \put(171,303){\line(5,3){171}}% %bond 4a-4
+% \put(171,709){\line(-5,-3){171}}% %bond 2-1
+% \put(171,709){\line(5,-3){171}}% %bond 2-3
+% \@tfor\member:=#1\do{%
+% \if\member r%no endcyclic double bonds
+% \else\if\member a%
+% \put(165,667){\line(-5,-3){126}}% %double bond 2-1
+% \else\if\member b%
+% \put(177,667){\line(5,-3){126}}% %double bond 2-3
+% \else\if\member c%
+% \put(311,432){\line(0,1){148}}% %double bond 4-3
+% \else\if\member d%
+% \put(177,345){\line(5,3){126}}% %double bond 4a-4
+% \else\if\member e%
+% \put(140,129){\line(0,1){148}}% %double bond 5-4a
+% \else\if\member f%
+% \put(6,42){\line(5,3){126}}% %double bond 6-5
+% \else\if\member g%
+% \put(-6,42){\line(-5,3){126}}% %double bond 6-7
+% \else\if\member h%
+% \put(-140,129){\line(0,1){148}}% %double bond 7-8
+% \else\if\member i%
+% \put(-6,364){\line(-5,-3){126}}% %double bond 8a-8
+% \else\if\member j%
+% \put(31,432){\line(0,1){148}}% %double bond 8a-1
+% \else\if\member k%
+% \put(6,364){\line(5,-3){126}}% %double bond 8a-4a
+% \else\if\member K%
+% \put(165,345){\line(-5,3){126}}% %double bond 8a-4a on the other ring
+% \else\if\member A%left aromatic circle
+% \put(171,506){\circle{240}}% %circle
+% \else\if\member B%right aromatic circle
+% \put(0,203){\circle{240}}% %circle
+% \else
+% % ***********************
+% % * setting fused rings *
+% % ***********************
+% \expandafter\twoCH@R\member//%
+% \set@fusion@decavt
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents and exocyclic bonds %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \put(171,303){\setsixringv{#2}{5}{5}{7}{0}}% for 1
+% \put(171,303){\setsixringv{#2}{-1}{0}{4}{0}}% for 2 to 4
+% \put(0,0){\setsixringv{#2}{-2}{2}{7}{0}}% for 5 to 8
+% \put(0,0){\setfusedbond{#2}{1}{0}{2}{-1}}% for 4a and 8a
+% \end{picture}}% %end of \decalinevt macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \subsection{Horizontal type}
+%
+% The macro |\decalineh| is used for drawing decaline derivatives
+% of vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macros |\setsixringh| and |\setfusedbond|.
+%
+% \begin{verbatim}
+% ************************
+% * decaline derivatives *
+% * (horizontal type) *
+% ************************
+% The following numbering is adopted in this macro.
+%
+% 2 3
+% -----
+% * *
+% 1 * * 4
+% * *
+% 8a (0G) ----- 4a (0F)
+% * *
+% the original point ===> 8 * * 5
+% (0,0) * *
+% -----
+% 7 6
+% \end{verbatim}
+%
+% The macro |\decalineh| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \decalineh[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to k, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A or B indicates aromatic bond patterns (circles).
+% \changes{v1.02}{1998/10/14}{BONDLIST: k and K at the fused bond}
+%
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : decaline
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,4a-double bond
+% e : 5,4a-double bond
+% f : 5,6-double bond
+% g : 6,7-double bond
+% h : 8,7-double bond
+% i : 8,8a-double bond
+% j : 1,8a-double bond
+% k : 4a,8a-double bond
+% K : 4a,8a-double bond in the other ring
+% A : left aromatic circle
+% B : right aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for 0 (fused positions)
+%
+% 0FA : alpha single bond at 8a
+% 0FB : beta single bond at 8a
+% 0FU : unspecified single bond at 8a
+% 0GA : alpha single bond at 4a
+% 0GB : beta single bond at 4a
+% 0GU : unspecified single bond at 4a
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \decalineh{1==Cl;2==F;0FA==;0GA==}
+% \decalineh[c]{1==Cl;4==F;2==CH$_{3}$}
+% \decalineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% The macro |\decalineh| has been changed into a subsidiary macro
+% of |\decaheteroh| (version 2.00).
+%
+% \begin{macro}{\decalineh}
+% \begin{macrocode}
+\def\decalineh{\@ifnextchar[{\@decalineh[@}{\@decalineh[@]}}
+\def\@decalineh[#1]#2{%
+\iforigpt \typeout{command `decalineh' is based on `decaheteroh'.}\fi%
+\decaheteroh[#1]{}{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% The following old definition has been stopped using.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/11/30}{Add: fused rings}
+%
+% \begin{verbatim}
+% (Old defintion)
+% % \begin{macro}{\decalineh}
+% % \begin{macrocode}
+% \def\decalineh{\@ifnextchar[{\@decalineh[@}{\@decalineh[r]}}
+% \def\@decalineh[#1]#2{%
+% \iniflag\iniatom
+% \@reset@ylsw\reset@@yl
+% \ylpositionh{#2}{-7}{0}{2}{0}% for 8
+% \if@ylsw \ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi
+% \else\ylpositionh{#2}{-1}{3}{7}{0}% for 5 to 7
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\else
+% \ylpositionh{#2}{0}{0}{5}{0}% for 1 to 4
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{-342}\fi\else
+% \ylfusedposition{#2}{3}{2}{4}{0}% for 4a and 8a
+% \fi
+% \if@ylsw\ifx\@@ylii\empty
+% \def\@@ylii{0}\def\@@yli{0}\fi\fi
+% \if@ylsw
+% \yl@shiftii=\@ylii
+% \ifx\@@ylii\empty\else
+% \advance\yl@shiftii\@@ylii\fi
+% \yl@shifti=\@yli
+% \ifx\@@yli\empty\else
+% \advance\yl@shifti\@@yli\fi
+% \advance\yl@shiftii\yl@xdiff
+% \advance\yl@shifti\yl@ydiff
+% \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+% \reset@yl@xydiff%1999/1/6 by S. Fujita
+% \else
+% \begin{picture}(880,1200)(-\shifti,-\shiftii)
+% \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+% \put(\noshift,\noshift){\circle{50}}%
+% \typeout{command `decalineh' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+% \fi
+% \put(0,0){\line(3,5){103}}% %bond 8-8a
+% \put(0,0){\line(3,-5){103}}% %bond 8-7
+% \put(406,0){\line(-3,5){103}}% %bond 4a-5
+% \put(406,0){\line(-3,-5){103}}% %bond 5-6
+% \put(103,171){\line(1,0){200}}% %bond 4a-8a
+% \put(103,-171){\line(1,0){200}}% %bond 7-8
+% \put(0,342){\line(3,5){103}}% %bond 1-2
+% \put(0,342){\line(3,-5){103}}% %bond 1-6
+% \put(406,342){\line(-3,5){103}}% %bond 4-3
+% \put(406,342){\line(-3,-5){103}}% %bond 4-4a
+% \put(103,513){\line(1,0){200}}% %bond 2-3
+% \@tfor\member:=#1\do{%
+% \if\member r%no endcyclic double bonds
+% \else\if\member a%
+% \put(42,348){\line(3,5){78}}% %double bond 1-2
+% \else\if\member b%
+% \put(129,480){\line(1,0){148}}% %double bond 2-3
+% \else\if\member c%
+% \put(364,348){\line(-3,5){78}}% %double bond 4-3
+% \else\if\member d%
+% \put(364,348){\line(-3,-5){78}}% %double bond 4-4a
+% \else\if\member e%
+% \put(364,6){\line(-3,5){78}}% %double bond 4a-5
+% \else\if\member f%
+% \put(364,-6){\line(-3,-5){78}}% %double bond 5-6
+% \else\if\member g%
+% \put(129,-138){\line(1,0){148}}% %double bond 6-7
+% \else\if\member h%
+% \put(42,-6){\line(3,-5){78}}% %double bond 7-8
+% \else\if\member i%
+% \put(42,6){\line(3,5){78}}% %double bond 8-9a
+% \else\if\member j%
+% \put(42,348){\line(3,-5){78}}% %double bond 1-8a
+% \else\if\member k%
+% \put(129,138){\line(1,0){148}}% %double bond 8a-4a
+% \else\if\member K%
+% \put(129,204){\line(1,0){148}}% %double bond 8a-4a
+% \else\if\member A%left aromatic circle
+% \put(203,0){\circle{240}}% %circle
+% \else\if\member B%right aromatic circle
+% \put(203,342){\circle{240}}% %circle
+% % ***********************
+% % * setting fused rings *
+% % ***********************
+% \else
+% \expandafter\twoCH@R\member//%
+% \put(0,342){\set@fusion@decah}%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% %%
+% \put(0,0){\setsixringh{#2}{-7}{0}{2}{0}}% for 8
+% \put(0,0){\setsixringh{#2}{-1}{3}{7}{0}}% for 5 to 7
+% \put(0,342){\setsixringh{#2}{0}{0}{5}{0}}% for 1 to 4
+% \put(0,0){\setfusedbond{#2}{3}{2}{4}{0}}% for 4a and 8a
+% \end{picture}}% %end of \decalineh macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \section{Naphthalene and naphtoquinone derivatives}
+% \subsection{Vertical type}
+%
+% The macro |\naphdrv| is used for drawing naphthalene derivatives
+% of vertical type as well as naphthoquinone derivatives of
+% vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalinev|.
+%
+% The macro |\naphdrv| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% **********************************************
+% * naphthalene and naphthoquinone derivatives *
+% * (vertical type) *
+% **********************************************
+%
+% \naphdrv[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters.
+%
+% The character `A' is used for designating an aromatic bond pattern, in
+% which each of the six-membered rings has a central circle.
+%
+% \begin{verbatim}
+% OPT (bond pattern)
+%
+% none : naphthalene
+% A : aromatic circle
+% \end{verbatim}
+%
+% One character `p' or two characters (p?) in the |OPT| argument
+% designate a p-quinone nucleus, which is present in the
+% right-hand ring for the case of `p' or `pa' and in the
+% left-hand ring for the case of `pb'.
+%
+% \begin{verbatim}
+% p or pa : 1,4-quinone (A) left aromatic, right quinone
+% pb : 1,4-quinone (B) right aromatic, left quinone
+% \end{verbatim}
+%
+% One character `o' or two characters (o?) in the |OPT| argument
+% designate an o-quinone nucleus in either side of the fused ring.
+% The second character of each argument indicates one of the possible
+% type of bond patterns.
+%
+% \begin{verbatim}
+% o or oa : o-quinone (A)
+% ob : o-quinone (B)
+% oc : o-quinone (C)
+% od : o-quinone (D)
+% oe : o-quinone (E)
+% of : o-quinone (F)
+% \end{verbatim}
+%
+% One character `q' or two characters (q?) in the |OPT| argument
+% designate an 2,6-, 1,5- or 1,7-quinone nucleus.
+% The second character of each argument indicates one of the possible
+% type of bond patterns.
+%
+% \begin{verbatim}
+%
+% q or qa : 2,6-quinone (A)
+% qb : 2,6-quinone (B) 3,7
+% qc : 1,5-quinone (C)
+% qd : 1,5-quinone (D) 4,8
+% qe : 1,7-quinone (E)
+% qf : 1,7-quinone (F) 2,8
+% qg : 1,7-quinone (G) 4,6
+% qh : 1,7-quinone (H) 3,5
+% \end{verbatim}
+%
+% One character `P' or two characters (P?) in the |OPT| argument
+% designate a 1,4,5,8- or 1,2,5,8-quinone nucleus.
+%
+% \begin{verbatim}
+%
+% P or Pa : 1,4,5,8-quinone (A)
+% Pb : 1,2,5,8-quinone (B)
+% \end{verbatim}
+%
+% One character `Q' or `O' or two characters (O?) in the |OPT| argument
+% designate quinone nuclei of remaining types.
+%
+% \begin{verbatim}
+% Q : 1,2,3,4-quinone
+%
+% O or Oa : 1,2,5,6-quinone (A)
+% Ob : 1,2,7,8-quinone (B)
+% Oc : 1,2,3,5-quinone (C)
+% Od : 1,2,3,7-quinone (D)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+% \naphdrv{1==Cl;2==F}
+% \naphdrv[A]{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\naphdrv}
+% \begin{macrocode}
+\def\naphdrv{\@ifnextchar[{\@naphdrv}{\@naphdrv[r]}}
+\def\@naphdrv[#1]#2{%
+\iforigpt \typeout{command `naphdrv' is based on `decalinev'.}\fi%
+ \expandafter\threech@r#1{}{}%
+\if\@tmpa r% right-handed set of double bonds
+ \decalinev[acfhk]{#2}%
+\else\if\@tmpa A%aromatic circle
+ \decalinev[AB]{#2}%
+%
+\else\if\@tmpa p%p-quinone
+ \if\@tmpb a% (A)
+ \decalinev[bfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinev[bfhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalinev[acgk]{#2}%
+ \fi\fi\fi%
+\else%
+ \if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)
+ \decalinev[cfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinev[cfhk]{#2}%
+ \else\if\@tmpb b%o-quinone (B)
+ \decalinev[dfhj]{#2}%
+ \else\if\@tmpb c%o-quinone (C)
+ \decalinev[afhk]{#2}%
+ \else\if\@tmpb d%o-quinone (D)
+ \decalinev[achk]{#2}%
+ \else\if\@tmpb e%o-quinone (E)
+ \decalinev[acei]{#2}%
+ \else\if\@tmpb f%o-quinone (F)
+ \decalinev[acfk]{#2}%
+ \fi\fi\fi\fi\fi\fi%
+ \fi%
+%%%
+\else\if\@tmpa q%various quinone
+ \if\@tmpb a% (A)2,6-type
+ \decalinev[cehj]{#2}%
+ \else\ifx\@tmpb\empty% (A)2,6-type
+ \decalinev[cehj]{#2}%
+ \else\if\@tmpb b%2,6-quinone (B)
+ \decalinev[adfi]{#2}%
+ \else\if\@tmpb c%1,5-quinone (C)
+ \decalinev[bdgi]{#2}%
+ \else\if\@tmpb d%1,5-quinone (D)
+ \decalinev[begj]{#2}%
+ \else\if\@tmpb e%1,7-quinone (E)
+ \decalinev[bdfi]{#2}%
+ \else\if\@tmpb f%1,7-quinone (F)
+ \decalinev[cegj]{#2}%
+ \else\if\@tmpb g%1,7-quinone (G)
+ \decalinev[behj]{#2}%
+ \else\if\@tmpb h%1,7-quinone (H)
+ \decalinev[adgi]{#2}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\else\if\@tmpa P%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,4,5,8-type
+ \decalinev[bgk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,4,5,8-type
+ \decalinev[bgk]{#2}%
+ \else\if\@tmpb b% (B)1,2,5,8-type
+ \decalinev[cgk]{#2}%
+ \fi\fi\fi%
+\else\if\@tmpa Q%1,2,3,4
+ \decalinev[fhk]{#2}%
+\else\if\@tmpa O%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,2,5,6-type
+ \decalinev[chk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,2,5,6-type
+ \decalinev[chk]{#2}%
+ \else\if\@tmpb b% (B)1,2,7,8-type
+ \decalinev[cfk]{#2}%
+ \else\if\@tmpb c% (C)1,2,3,5-type
+ \decalinev[dgi]{#2}%
+ \else\if\@tmpb d% (D)1,2,3,7-type
+ \decalinev[dfi]{#2}%
+ \fi\fi\fi\fi\fi%
+\else% added 1998/11/23 by S. Fujita
+ \decalinev[@#1]{#2}%
+\fi\fi\fi\fi\fi\fi\fi\fi%
+}% %end of \naphdrv macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Vertical-bottom type}
+%
+% The macro |\naphdrvb| is used for drawing naphthalene derivatives
+% of vertical-bottom type as well as naphthoquinone derivatives of
+% vertical-bottom type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalinevb|.
+% \changes{v1.02}{1998/10/14}{Newly added command}
+%
+% The macro |\naphdrvb| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% **********************************************
+% * naphthalene and naphthoquinone derivatives *
+% * (vertical-bottom type) *
+% **********************************************
+%
+% \naphdrvb[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters.
+%
+% The character `A' is used for designating an aromatic bond pattern, in
+% which each of the six-membered rings has a central circle.
+%
+% \begin{verbatim}
+% OPT (bond pattern)
+%
+% none : naphthalene
+% A : aromatic circle
+% \end{verbatim}
+%
+% One character `p' or two characters (p?) in the |OPT| argument
+% designate a p-quinone nucleus, which is present in the
+% right-hand ring for the case of `p' or `pa' and in the
+% left-hand ring for the case of `pb'.
+%
+% \begin{verbatim}
+% p or pa : 1,4-quinone (A) left aromatic, right quinone
+% pb : 1,4-quinone (B) right aromatic, left quinone
+% \end{verbatim}
+%
+% One character `o' or two characters (o?) in the |OPT| argument
+% designate an o-quinone nucleus in either side of the fused ring.
+% The second character of each argument indicates one of the possible
+% type of bond patterns.
+%
+% \begin{verbatim}
+% o or oa : o-quinone (A)
+% ob : o-quinone (B)
+% oc : o-quinone (C)
+% od : o-quinone (D)
+% oe : o-quinone (E)
+% of : o-quinone (F)
+% \end{verbatim}
+%
+% One character `q' or two characters (q?) in the |OPT| argument
+% designate an 2,6-, 1,5- or 1,7-quinone nucleus.
+% The second character of each argument indicates one of the possible
+% type of bond patterns.
+%
+% \begin{verbatim}
+%
+% q or qa : 2,6-quinone (A)
+% qb : 2,6-quinone (B) 3,7
+% qc : 1,5-quinone (C)
+% qd : 1,5-quinone (D) 4,8
+% qe : 1,7-quinone (E)
+% qf : 1,7-quinone (F) 2,8
+% qg : 1,7-quinone (G) 4,6
+% qh : 1,7-quinone (H) 3,5
+% \end{verbatim}
+%
+% One character `P' or two characters (P?) in the |OPT| argument
+% designate a 1,4,5,8- or 1,2,5,8-quinone nucleus.
+%
+% \begin{verbatim}
+%
+% P or Pa : 1,4,5,8-quinone (A)
+% Pb : 1,2,5,8-quinone (B)
+% \end{verbatim}
+%
+% One character `Q' or `O' or two characters (O?) in the |OPT| argument
+% designate quinone nuclei of remaining types.
+%
+% \begin{verbatim}
+% Q : 1,2,3,4-quinone
+%
+% O or Oa : 1,2,5,6-quinone (A)
+% Ob : 1,2,7,8-quinone (B)
+% Oc : 1,2,3,5-quinone (C)
+% Od : 1,2,3,7-quinone (D)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+% \naphdrvb{1==Cl;2==F}
+% \naphdrvb[A]{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\naphdrvb}
+% \begin{macrocode}
+\def\naphdrvb{\@ifnextchar[{\@naphdrvb}{\@naphdrvb[r]}}
+\def\@naphdrvb[#1]#2{%
+\iforigpt \typeout{command `naphdrvb' is based on `decalinevb'.}\fi%
+ \expandafter\threech@r#1{}{}%
+\if\@tmpa r% right-handed set of double bonds
+ \decalinevb[acfhk]{#2}%
+\else\if\@tmpa A%aromatic circle
+ \decalinevb[AB]{#2}%
+%
+\else\if\@tmpa p%p-quinone
+ \if\@tmpb a% (A)
+ \decalinevb[bfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinevb[bfhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalinevb[acgk]{#2}%
+ \fi\fi\fi%
+\else%
+ \if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)
+ \decalinevb[cfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinevb[cfhk]{#2}%
+ \else\if\@tmpb b%o-quinone (B)
+ \decalinevb[dfhj]{#2}%
+ \else\if\@tmpb c%o-quinone (C)
+ \decalinevb[afhk]{#2}%
+ \else\if\@tmpb d%o-quinone (D)
+ \decalinevb[achk]{#2}%
+ \else\if\@tmpb e%o-quinone (E)
+ \decalinevb[acei]{#2}%
+ \else\if\@tmpb f%o-quinone (F)
+ \decalinevb[acfk]{#2}%
+ \fi\fi\fi\fi\fi\fi%
+ \fi%
+%%%
+\else\if\@tmpa q%various quinone
+ \if\@tmpb a% (A)2,6-type
+ \decalinevb[cehj]{#2}%
+ \else\ifx\@tmpb\empty% (A)2,6-type
+ \decalinevb[cehj]{#2}%
+ \else\if\@tmpb b%2,6-quinone (B)
+ \decalinevb[adfi]{#2}%
+ \else\if\@tmpb c%1,5-quinone (C)
+ \decalinevb[bdgi]{#2}%
+ \else\if\@tmpb d%1,5-quinone (D)
+ \decalinevb[begj]{#2}%
+ \else\if\@tmpb e%1,7-quinone (E)
+ \decalinevb[bdfi]{#2}%
+ \else\if\@tmpb f%1,7-quinone (F)
+ \decalinevb[cegj]{#2}%
+ \else\if\@tmpb g%1,7-quinone (G)
+ \decalinevb[behj]{#2}%
+ \else\if\@tmpb h%1,7-quinone (H)
+ \decalinevb[adgi]{#2}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\else\if\@tmpa P%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,4,5,8-type
+ \decalinevb[bgk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,4,5,8-type
+ \decalinevb[bgk]{#2}%
+ \else\if\@tmpb b% (B)1,2,5,8-type
+ \decalinevb[cgk]{#2}%
+ \fi\fi\fi%
+\else\if\@tmpa Q%1,2,3,4
+ \decalinevb[fhk]{#2}%
+\else\if\@tmpa O%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,2,5,6-type
+ \decalinevb[chk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,2,5,6-type
+ \decalinevb[chk]{#2}%
+ \else\if\@tmpb b% (B)1,2,7,8-type
+ \decalinevb[cfk]{#2}%
+ \else\if\@tmpb c% (C)1,2,3,5-type
+ \decalinevb[dgi]{#2}%
+ \else\if\@tmpb d% (D)1,2,3,7-type
+ \decalinevb[dfi]{#2}%
+ \fi\fi\fi\fi\fi%
+\else% added 1998/11/23 by S. Fujita
+ \decalinevb[@#1]{#2}%
+\fi\fi\fi\fi\fi\fi\fi\fi%
+}% %end of \naphdrvb macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Vertical-top type}
+%
+% The macro |\naphdrvt| is used for drawing naphthalene derivatives
+% of vertical-top type as well as naphthoquinone derivatives of
+% vertical-top type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalinevt|.
+% \changes{v1.02}{1998/10/14}{Newly added command}
+%
+% The macro |\naphdrvt| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% **********************************************
+% * naphthalene and naphthoquinone derivatives *
+% * (vertical-top type) *
+% **********************************************
+%
+% \naphdrvt[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters.
+%
+% The character `A' is used for designating an aromatic bond pattern, in
+% which each of the six-membered rings has a central circle.
+%
+% \begin{verbatim}
+% OPT (bond pattern)
+%
+% none : naphthalene
+% A : aromatic circle
+% \end{verbatim}
+%
+% One character `p' or two characters (p?) in the |OPT| argument
+% designate a p-quinone nucleus, which is present in the
+% right-hand ring for the case of `p' or `pa' and in the
+% left-hand ring for the case of `pb'.
+%
+% \begin{verbatim}
+% p or pa : 1,4-quinone (A) left aromatic, right quinone
+% pb : 1,4-quinone (B) right aromatic, left quinone
+% \end{verbatim}
+%
+% One character `o' or two characters (o?) in the |OPT| argument
+% designate an o-quinone nucleus in either side of the fused ring.
+% The second character of each argument indicates one of the possible
+% type of bond patterns.
+%
+% \begin{verbatim}
+% o or oa : o-quinone (A)
+% ob : o-quinone (B)
+% oc : o-quinone (C)
+% od : o-quinone (D)
+% oe : o-quinone (E)
+% of : o-quinone (F)
+% \end{verbatim}
+%
+% One character `q' or two characters (q?) in the |OPT| argument
+% designate an 2,6-, 1,5- or 1,7-quinone nucleus.
+% The second character of each argument indicates one of the possible
+% type of bond patterns.
+%
+% \begin{verbatim}
+%
+% q or qa : 2,6-quinone (A)
+% qb : 2,6-quinone (B) 3,7
+% qc : 1,5-quinone (C)
+% qd : 1,5-quinone (D) 4,8
+% qe : 1,7-quinone (E)
+% qf : 1,7-quinone (F) 2,8
+% qg : 1,7-quinone (G) 4,6
+% qh : 1,7-quinone (H) 3,5
+% \end{verbatim}
+%
+% One character `P' or two characters (P?) in the |OPT| argument
+% designate a 1,4,5,8- or 1,2,5,8-quinone nucleus.
+%
+% \begin{verbatim}
+%
+% P or Pa : 1,4,5,8-quinone (A)
+% Pb : 1,2,5,8-quinone (B)
+% \end{verbatim}
+%
+% One character `Q' or `O' or two characters (O?) in the |OPT| argument
+% designate quinone nuclei of remaining types.
+%
+% \begin{verbatim}
+% Q : 1,2,3,4-quinone
+%
+% O or Oa : 1,2,5,6-quinone (A)
+% Ob : 1,2,7,8-quinone (B)
+% Oc : 1,2,3,5-quinone (C)
+% Od : 1,2,3,7-quinone (D)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+% \naphdrvt{1==Cl;2==F}
+% \naphdrvt[A]{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\naphdrvt}
+% \begin{macrocode}
+\def\naphdrvt{\@ifnextchar[{\@naphdrvt}{\@naphdrvt[r]}}
+\def\@naphdrvt[#1]#2{%
+\iforigpt \typeout{command `naphdrvt' is based on `decalinevt'.}\fi%
+ \expandafter\threech@r#1{}{}%
+\if\@tmpa r% right-handed set of double bonds
+ \decalinevt[acfhk]{#2}%
+\else\if\@tmpa A%aromatic circle
+ \decalinevt[AB]{#2}%
+%
+\else\if\@tmpa p%p-quinone
+ \if\@tmpb a% (A)
+ \decalinevt[bfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinevt[bfhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalinevt[acgk]{#2}%
+ \fi\fi\fi%
+\else%
+ \if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)
+ \decalinevt[cfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinevt[cfhk]{#2}%
+ \else\if\@tmpb b%o-quinone (B)
+ \decalinevt[dfhj]{#2}%
+ \else\if\@tmpb c%o-quinone (C)
+ \decalinevt[afhk]{#2}%
+ \else\if\@tmpb d%o-quinone (D)
+ \decalinevt[achk]{#2}%
+ \else\if\@tmpb e%o-quinone (E)
+ \decalinevt[acei]{#2}%
+ \else\if\@tmpb f%o-quinone (F)
+ \decalinevt[acfk]{#2}%
+ \fi\fi\fi\fi\fi\fi%
+ \fi%
+%%%
+\else\if\@tmpa q%various quinone
+ \if\@tmpb a% (A)2,6-type
+ \decalinevt[cehj]{#2}%
+ \else\ifx\@tmpb\empty% (A)2,6-type
+ \decalinevt[cehj]{#2}%
+ \else\if\@tmpb b%2,6-quinone (B)
+ \decalinevt[adfi]{#2}%
+ \else\if\@tmpb c%1,5-quinone (C)
+ \decalinevt[bdgi]{#2}%
+ \else\if\@tmpb d%1,5-quinone (D)
+ \decalinevt[begj]{#2}%
+ \else\if\@tmpb e%1,7-quinone (E)
+ \decalinevt[bdfi]{#2}%
+ \else\if\@tmpb f%1,7-quinone (F)
+ \decalinevt[cegj]{#2}%
+ \else\if\@tmpb g%1,7-quinone (G)
+ \decalinevt[behj]{#2}%
+ \else\if\@tmpb h%1,7-quinone (H)
+ \decalinevt[adgi]{#2}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\else\if\@tmpa P%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,4,5,8-type
+ \decalinevt[bgk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,4,5,8-type
+ \decalinevt[bgk]{#2}%
+ \else\if\@tmpb b% (B)1,2,5,8-type
+ \decalinevt[cgk]{#2}%
+ \fi\fi\fi%
+\else\if\@tmpa Q%1,2,3,4
+ \decalinevt[fhk]{#2}%
+\else\if\@tmpa O%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,2,5,6-type
+ \decalinevt[chk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,2,5,6-type
+ \decalinevt[chk]{#2}%
+ \else\if\@tmpb b% (B)1,2,7,8-type
+ \decalinevt[cfk]{#2}%
+ \else\if\@tmpb c% (C)1,2,3,5-type
+ \decalinevt[dgi]{#2}%
+ \else\if\@tmpb d% (D)1,2,3,7-type
+ \decalinevt[dfi]{#2}%
+ \fi\fi\fi\fi\fi%
+\else% added 1998/11/23 by S. Fujita
+ \decalinevt[@#1]{#2}%
+\fi\fi\fi\fi\fi\fi\fi\fi%
+}% %end of \naphdrvt macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Horizontal type}
+%
+% The macro |\naphdrh| is used for drawing naphthalene derivatives
+% of horizontal type as well as naphtoquinone derivatives of
+% horizontal type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalineh|.
+%
+% The macro |\naphdrh| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% **********************************************
+% * naphthalene and naphthoquinone derivatives *
+% * (horizontal type) *
+% **********************************************
+%
+% \naphdrh[OPT]{SUBSLIST}
+%
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+% The meaning of these characters is the same as described in
+% the definition of the macro |\naphdrv|.
+%
+% \begin{verbatim}
+% OPT (bond pattern)
+%
+% none : naphthalene
+% A : aromatic circle
+%
+% p or pa : 1,4-quinone (A) left aromatic, right quinone
+% pb : 1,4-quinone (B) right aromatic, left quinone
+%
+% o or oa : o-quinone (A)
+% ob : o-quinone (B)
+% oc : o-quinone (C)
+% od : o-quinone (D)
+% oe : o-quinone (E)
+% of : o-quinone (F)
+%
+% q or qa : 2,6-quinone (A)
+% qb : 2,6-quinone (B) 3,7
+% qc : 1,5-quinone (C)
+% qd : 1,5-quinone (D) 4,8
+% qe : 1,7-quinone (E)
+% qf : 1,7-quinone (F) 2,8
+% qg : 1,7-quinone (G) 4,6
+% qh : 1,7-quinone (H) 3,5
+%
+% P or Pa : 1,4,5,8-quinone (A)
+% Pb : 1,2,5,8-quinone (B)
+%
+% Q : 1,2,3,4-quinone
+%
+% O or Oa : 1,2,5,6-quinone (A)
+% Ob : 1,2,7,8-quinone (B)
+% Oc : 1,2,3,5-quinone (C)
+% Od : 1,2,3,7-quinone (D)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 8
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+% \naphdrh{1==Cl;2==F}
+% \naphdrh[A]{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\naphdrh}
+% \begin{macrocode}
+\def\naphdrh{\@ifnextchar[{\@naphdrh}{\@naphdrh[r]}}
+\def\@naphdrh[#1]#2{%
+\iforigpt \typeout{command `nathdrh' is based on `decalineh'.}\fi%
+ \expandafter\threech@r#1{}{}%
+\if\@tmpa r% right-handed set of double bonds
+ \decalineh[acfhk]{#2}%
+\else\if\@tmpa A%aromatic circle
+ \decalineh[AB]{#2}%
+%
+\else\if\@tmpa p%p-quinone
+ \if\@tmpb a% (A)
+ \decalineh[bfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalineh[bfhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalineh[acgk]{#2}%
+ \fi\fi\fi%
+\else%
+ \if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)
+ \decalineh[cfhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalineh[cfhk]{#2}%
+ \else\if\@tmpb b%o-quinone (B)
+ \decalineh[dfhj]{#2}%
+ \else\if\@tmpb c%o-quinone (C)
+ \decalineh[afhk]{#2}%
+ \else\if\@tmpb d%o-quinone (D)
+ \decalineh[achk]{#2}%
+ \else\if\@tmpb e%o-quinone (E)
+ \decalineh[acei]{#2}%
+ \else\if\@tmpb f%o-quinone (F)
+ \decalineh[acfk]{#2}%
+ \fi\fi\fi\fi\fi\fi%
+ \fi%
+% %%
+\else\if\@tmpa q%various quinone
+ \if\@tmpb a% (A)2,6-type
+ \decalineh[cehj]{#2}%
+ \else\ifx\@tmpb\empty% (A)2,6-type
+ \decalineh[cehj]{#2}%
+ \else\if\@tmpb b%2,6-quinone (B)
+ \decalineh[adfi]{#2}%
+ \else\if\@tmpb c%1,5-quinone (C)
+ \decalineh[bdgi]{#2}%
+ \else\if\@tmpb d%1,5-quinone (D)
+ \decalineh[begj]{#2}%
+ \else\if\@tmpb e%1,7-quinone (E)
+ \decalineh[bdfi]{#2}%
+ \else\if\@tmpb f%1,7-quinone (F)
+ \decalineh[cegj]{#2}%
+ \else\if\@tmpb g%1,7-quinone (G)
+ \decalineh[behj]{#2}%
+ \else\if\@tmpb h%1,7-quinone (H)
+ \decalineh[adgi]{#2}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\else\if\@tmpa P%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,4,5,8-type
+ \decalineh[bgk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,4,5,8-type
+ \decalineh[bgk]{#2}%
+ \else\if\@tmpb b% (B)1,2,5,8-type
+ \decalineh[cgk]{#2}%
+ \fi\fi\fi%
+\else\if\@tmpa Q%1,2,3,4
+ \decalineh[fhk]{#2}%
+\else\if\@tmpa O%quinone having 4 carbonyl groups
+ \if\@tmpb a% (A)1,2,5,6-type
+ \decalineh[chk]{#2}%
+ \else\ifx\@tmpb\empty% (A)1,2,5,6-type
+ \decalineh[chk]{#2}%
+ \else\if\@tmpb b% (B)1,2,7,8-type
+ \decalineh[cfk]{#2}%
+ \else\if\@tmpb c% (C)1,2,3,5-type
+ \decalineh[dgi]{#2}%
+ \else\if\@tmpb d% (D)1,2,3,7-type
+ \decalineh[dfi]{#2}%
+ \fi\fi\fi\fi\fi%
+\else% added 1998/11/23 by S. Fujita
+ \decalineh[@#1]{#2}%
+\fi\fi\fi\fi\fi\fi\fi\fi%
+}% %end of \naphdrh macro
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Tetraline derivatives}
+% \subsection{Vertical type}
+%
+% The macro |\tetralinev| is used for drawing naphthalene derivatives
+% of vertical type as well as naphthoquinone derivatives of
+% vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalinev|.
+%
+% The macro |\tetralinev| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% *************************
+% * tetraline derivatives *
+% * (vertical type) *
+% *************************
+%
+% \tetralinev[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+%
+% \begin{verbatim}
+%
+% OPT = none : tetraline
+% A : aromatic circle
+%
+% e or ea : 1,2-double bond
+% eb : 2,3-double bond
+% ec : 3,4-double bond
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for n=5 or 8
+%
+% nSa : bias bond
+% This option can be used to avoid over-crowding
+% betweem 1 and 8 or between 4 and 5.
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \tetralinev{1==Cl;2==F}
+% \tetralinev[A]{1==Cl;4==F;2==CH$_{3}$}
+% \tetralinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\tetralinev}
+% \begin{macrocode}
+\def\tetralinev{\@ifnextchar[{\@tetralinev}{\@tetralinev[r]}}
+\def\@tetralinev[#1]#2{%
+ \iforigpt \typeout{command `tetralinev' is based on `decalinev'.}\fi%
+ \expandafter\threech@r#1{}{}%
+ \if\@tmpa r% right-handed set of double bonds
+ \decalinev[fhk]{#2}%
+ \else\if\@tmpa A%aromatic circle
+ \decalinev[A]{#2}%
+ \else\if\@tmpa e%inner double bond
+ \if\@tmpb a% (A)%
+ \decalinev[afhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinev[afhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalinev[bfhk]{#2}%
+ \else\if\@tmpb c% (C)
+ \decalinev[cfhk]{#2}%
+ \fi\fi\fi\fi%
+ \else%1998/11/23 by Shinsaku Fujita
+ \decalinev[@#1]{#2}%
+ \fi\fi\fi%
+}% %end of \tetralinev macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Vertical-bottom type}
+%
+% The macro |\tetralinevb| is used for drawing naphthalene derivatives
+% of vertical-bottom type as well as naphthoquinone derivatives of
+% vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalinevb|.
+% \changes{v1.02}{1998/10/14}{Newly added command}
+%
+% The macro |\tetralinevb| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% ********************************
+% * tetraline derivatives *
+% * (vertical-bottom type) *
+% ********************************
+%
+% \tetralinevb[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+%
+% \begin{verbatim}
+%
+% OPT = none : tetraline
+% A : aromatic circle
+%
+% e or ea : 1,2-double bond
+% eb : 2,3-double bond
+% ec : 3,4-double bond
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for n=5 or 8
+%
+% nSa : bias bond
+% This option can be used to avoid over-crowding
+% betweem 1 and 8 or between 4 and 5.
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \tetralinevb{1==Cl;2==F}
+% \tetralinevb[A]{1==Cl;4==F;2==CH$_{3}$}
+% \tetralinevb[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\tetralinevb}
+% \begin{macrocode}
+\def\tetralinevb{\@ifnextchar[{\@tetralinevb}{\@tetralinevb[r]}}
+\def\@tetralinevb[#1]#2{%
+ \iforigpt \typeout{command `tetralinevb' is based on `decalinevb'.}\fi%
+ \expandafter\threech@r#1{}{}%
+ \if\@tmpa r% right-handed set of double bonds
+ \decalinevb[fhK]{#2}% %[fhK] in place of [fhk]
+ \else\if\@tmpa A%aromatic circle
+ \decalinevb[A]{#2}%
+ \else\if\@tmpa e%inner double bond
+ \if\@tmpb a% (A)%
+ \decalinevb[afhK]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinevb[afhK]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalinevb[bfhK]{#2}%
+ \else\if\@tmpb c% (C)
+ \decalinevb[cfhK]{#2}%
+ \fi\fi\fi\fi%
+ \else%1998/11/23 by Shinsaku Fujita
+ \decalinevb[@#1]{#2}%
+ \fi\fi\fi%
+}% %end of \tetralinevb macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Vertical-top type}
+%
+% The macro |\tetralinevt| is used for drawing naphthalene derivatives
+% of vertical-top type as well as naphthoquinone derivatives of
+% vertical type. The skeleton and endocyclic double bonds are
+% drawn directly, while substituents and exocyclic bonds are placed by
+% useing the inner macro |\decalinevt|.
+% \changes{v1.02}{1998/10/14}{Newly added command}
+%
+% The macro |\tetralinevt| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% ********************************
+% * tetraline derivatives *
+% * (vertical-bottom type) *
+% ********************************
+%
+% \tetralinevt[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+%
+% \begin{verbatim}
+%
+% OPT = none : tetraline
+% A : aromatic circle
+%
+% e or ea : 1,2-double bond
+% eb : 2,3-double bond
+% ec : 3,4-double bond
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for n=5 or 8
+%
+% nSa : bias bond
+% This option can be used to avoid over-crowding
+% betweem 1 and 8 or between 4 and 5.
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \tetralinevt{1==Cl;2==F}
+% \tetralinevt[A]{1==Cl;4==F;2==CH$_{3}$}
+% \tetralinevt[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\tetralinevt}
+% \begin{macrocode}
+\def\tetralinevt{\@ifnextchar[{\@tetralinevt}{\@tetralinevt[r]}}
+\def\@tetralinevt[#1]#2{%
+ \iforigpt \typeout{command `tetralinevt' is based on `decalinevt'.}\fi%
+ \expandafter\threech@r#1{}{}%
+ \if\@tmpa r% right-handed set of double bonds
+ \decalinevt[fhk]{#2}%
+ \else\if\@tmpa A%aromatic circle
+ \decalinevt[A]{#2}%
+ \else\if\@tmpa e%inner double bond
+ \if\@tmpb a% (A)%
+ \decalinevt[afhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalinevt[afhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalinevt[bfhk]{#2}%
+ \else\if\@tmpb c% (C)
+ \decalinevt[cfhk]{#2}%
+ \fi\fi\fi\fi%
+ \else%1998/11/23 by Shinsaku Fujita
+ \decalinevt[@#1]{#2}%
+ \fi\fi\fi%
+}% %end of \tetralinevt macro
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Horizontal type}
+%
+% The macro |\tetralineh| is used for drawing tetraline derivatives
+% of horizontal type.
+%
+% The macro |\tetralineh| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% *************************
+% * tetraline derivatives *
+% * (horizontal type) *
+% *************************
+%
+% \tetralineh[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+%
+% \begin{verbatim}
+% OPT = none : tetraline
+% A : aromatic circle
+%
+% e or ea : 1,2-double bond
+% eb : 2,3-double bond
+% ec : 3,4-double bond
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for n=5 or 8
+%
+% nSa : bias bond
+% This option can be used to avoid over-crowding
+% betweem 1 and 8 or between 4 and 5.
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \tetralineh{1==Cl;2==F}
+% \tetralineh[A]{1==Cl;4==F;2==CH$_{3}$}
+% \tetralineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\tetralineh}
+% \begin{macrocode}
+\def\tetralineh{\@ifnextchar[{\@tetralineh}{\@tetralineh[r]}}
+\def\@tetralineh[#1]#2{%
+ \iforigpt \typeout{command `tetralineh' is based on `decalineh'.}\fi%
+ \expandafter\threech@r#1{}{}%
+ \if\@tmpa r% right-handed set of double bonds
+ \decalineh[fhk]{#2}%
+ \else\if\@tmpa A%aromatic circle
+ \decalineh[A]{#2}%
+ \else\if\@tmpa e%inner double bond
+ \if\@tmpb a% (A)%
+ \decalineh[afhk]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \decalineh[afhk]{#2}%
+ \else\if\@tmpb b% (B)
+ \decalineh[bfhk]{#2}%
+ \else\if\@tmpb c% (C)
+ \decalineh[cfhk]{#2}%
+ \fi\fi\fi\fi%
+\else% added 1998/11/23 by S. Fujita
+ \decalineh[@#1]{#2}%
+ \fi\fi\fi%
+}% %end of \tetralineh macro
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Anthracene derivatives}
+% \subsection{Perhydro-anthracene derivatives of Vertical type}
+%
+% The macro |\hanthracenev| is used for drawing perhydroanthracene
+% derivatives of vertical type.
+%
+% The macro |\hanthracenev| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% ***********************************
+% * perhydro anthracene derivatives *
+% * (vertical type) *
+% ***********************************
+%
+% \hanthracenev[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to p, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A, B, or C indicates an aromatic bond
+% pattern (circle).
+% \changes{v1.02}{1998/10/14}{BONDLIST: o, O, p and P at the fused bond}
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : hanthracene
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,4a-double bond
+% e : 10,4a-double bond
+% f : 10,10a-double bond
+% g : 5,10a-double bond
+% h : 5,6-double bond
+% i : 6,7-double bond
+% j : 8,7-double bond
+% k : 8,8a-double bond
+% l : 9,8a-double bond
+% m : 9,9a-double bond
+% n : 1,9a-double bond
+% o : 4a,9a-double bond
+% O : 4a,9a-double bond in the other ring
+% p : 10a,8a-double bond
+% P : 10a,8a-double bond in the other ring
+% A : right aromatic circle
+% B : central aromatic circle
+% C : left aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 10
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% for 11 (fused positions, 9a and 4a)
+%
+% 11FA : alpha single bond at 9a
+% 11FB : beta single bond at 9a
+% 11FU : unspecified single bond at 9a
+% 11GA : alpha single bond at 4a
+% 11GB : beta single bond at 4a
+% 11GU : unspecified single bond at 4a
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% for 12 (fused positions, 8a and 10a)
+%
+% 12FA : alpha single bond at 8a
+% 12FB : beta single bond at 8a
+% 12FU : unspecified single bond at 8a
+% 12GA : alpha single bond at 10a
+% 12GB : beta single bond at 10a
+% 12GU : unspecified single bond at 10a
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \hanthracenev{1==Cl;2==F;{{10}}==OH}
+% \hanthracenev[c]{1==Cl;4==F;2==CH$_{3}$;
+% {{11}FA}==OH;{{11}FB}==OH}
+% \hanthracenev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \changes{v1.02}{1998/10/31}{The command \cs{setdecaringv} has
+% been stopped to use.}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/12/25}{Added: fused rings}
+%
+% \begin{macro}{\hanthracenev}
+% \begin{macrocode}
+\def\hanthracenev{\@ifnextchar[{\@hanthracenev[@}{\@hanthracenev[r]}}
+\def\@hanthracenev[#1]#2{%
+% bonds for outer skeleton
+\@reset@ylsw\reset@@yl
+\ylposition{#2}{-7}{0}{2}{0}% %for 8 positions
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else\ylposition{#2}{-1}{3}{7}{0}% for 5 to 7 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi\else
+\ylposition{#2}{0}{0}{5}{0}% for 1 to 4 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{0}\fi\else
+\ylposition{#2}{-8}{0}{2}{0}%for 9-position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\else
+\ylposition{#2}{-6}{3}{5}{0}%for 10-position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\else
+\ylfusedposition{#2}{-11}{-1}{1}{0}% for 9a and 4a
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\else
+\ylfusedposition{#2}{-12}{-1}{1}{0}% for 8a and 10a
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \ifx\@@ylii\empty\else
+ \advance\yl@shiftii\@@ylii\fi
+ \yl@shifti=\@yli
+ \ifx\@@yli\empty\else
+ \advance\yl@shifti\@@yli\fi
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,880)(-\shiftii,-\shifti)
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `hanthracenev' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+ \put(0,406){\line(-5,-3){171}}% %bond 8-7
+ \put(0,406){\line(5,-3){171}}% %bond 8-8a
+ \put(0,0){\line(-5,3){171}}% %bond 5-6
+ \put(0,0){\line(5,3){171}}% %bond 5-10a
+ \put(171,103){\line(0,1){200}}% %bond 10a-8a
+ \put(-171,103){\line(0,1){200}}% %bond 6-7
+ \put(342,406){\line(-5,-3){171}}% %bond 9-8a
+ \put(342,406){\line(5,-3){171}}% %bond 9-9a
+ \put(342,0){\line(-5,3){171}}% %bond 10-10a
+ \put(342,0){\line(5,3){171}}% %bond 10-4a
+ \put(513,103){\line(0,1){200}}% %bond 4a-9a
+ %%%%
+ \put(684,406){\line(-5,-3){171}}% %bond 1-9a 1-6
+ \put(684,406){\line(5,-3){171}}% %bond 1-2 1-2
+ \put(855,103){\line(0,1){200}}% %bond 3-2 3-2
+ \put(684,0){\line(5,3){171}}% %bond 4-3 4-3
+ \put(684,0){\line(-5,3){171}}% %bond 4-4a 4-5
+% inner double bonds
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic double bonds
+\else\if\member a%
+ \put(690,364){\line(5,-3){126}}% %double bond 1-2
+\else\if\member b%
+ \put(822,129){\line(0,1){148}}% %double bond 3-2
+\else\if\member c%
+ \put(690,42){\line(5,3){126}}% %double bond 4-3
+\else\if\member d%
+ \put(690,42){\line(-5,3){126}}% %double bond 4-4a
+\else\if\member e%
+ \put(348,42){\line(5,3){126}}% %double bond 10-4a
+\else\if\member f%
+ \put(348,42){\line(-5,3){126}}% %double bond 10-10a
+\else\if\member g%
+ \put(6,42){\line(5,3){126}}% %double bond 5-10a
+\else\if\member h%
+ \put(-6,42){\line(-5,3){126}}% %double bond 5-6
+\else\if\member i%
+ \put(-138,129){\line(0,1){148}}% %double bond 6-7
+\else\if\member j%
+ \put(-6,364){\line(-5,-3){126}}% %double bond 8-7
+\else\if\member k%
+ \put(6,364){\line(5,-3){126}}% %double bond 8-8a
+\else\if\member l%
+ \put(348,364){\line(-5,-3){126}}% %double bond 9-8a
+\else\if\member m%
+ \put(348,364){\line(5,-3){126}}% %double bond 9-9a
+\else\if\member n%
+ \put(690,364){\line(-5,-3){126}}% %double bond 1-9a
+\else\if\member o%
+ \put(544,129){\line(0,1){148}}% %double bond 4a-9a
+\else\if\member O%
+ \put(482,129){\line(0,1){148}}% %double bond 4a-9a at the other ring
+\else\if\member p%
+ \put(138,129){\line(0,1){148}}% %double bond 10a-8a
+\else\if\member P%
+ \put(204,129){\line(0,1){148}}% %double bond 10a-8a at the other ring
+\else\if\member C%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else\if\member B%right aromatic circle
+ \put(342,203){\circle{240}}% %circle
+\else\if\member A%right aromatic circle
+ \put(684,203){\circle{240}}% %circle
+\else
+%setting fused rings
+ \expandafter\twoCH@R\member//%
+ \set@fusion@hanthrav
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+%exocyclic bonds and substituents
+\put(0,0){\setsixringv{#2}{-7}{0}{2}{0}}% %for 8 positions
+\put(0,0){\setsixringv{#2}{-1}{3}{7}{0}}% %for 5 to 7 positions
+\put(684,0){\setsixringv{#2}{0}{0}{5}{0}}% %for 1 to 4 positions
+\put(342,0){\setsixringv{#2}{-8}{0}{2}{0}}%for 9-position
+\put(342,0){\setsixringv{#2}{-6}{3}{5}{0}}%for 10-position
+%bonds and substituents for fused positions
+\put(0,0){\setfusedbond{#2}{-12}{-1}{1}{0}}% for 8a and 10a
+\put(342,0){\setfusedbond{#2}{-11}{-1}{1}{0}}% for 9a and 4a
+\end{picture}}% %end of \hanthracenev macro%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Anthracene and anthraquinone derivatives}
+%
+% The macro |\anthracenev| is used for drawing anthracene derivatives
+% of vertical type.
+%
+% The macro |\anthracenev| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% ********************************************
+% * anthracene and anthraquinone derivatives *
+% * (vertical type) *
+% ********************************************
+%
+% \anthracenev[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+%
+% \begin{verbatim}
+% OPT (bond pattern)
+%
+% none or r : right-handed double bonds
+% l : left-handed double bonds
+% A : aromatic circle
+%
+% p or pa : 9,10-anthraquinone (A)
+% pA : 9,10-anthraquinone (circle type)
+%
+% o : 1,2-anthraquinone (A)
+% oa : 1,2-anthraquinone (A')
+% oA : 1,2-anthraquinone (circle type)
+% ob : 2,3-antharquinone (B)
+% oc : 1,2-anthraquinone (C)
+%
+% q : 1,4-anthraquinone (A)
+% qa : 1,4-anthraquinone (A')
+% qA : 1,4-anthraquinone (circle type)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 10
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \anthracenev{1==Cl;2==F;0FA==;0GA==}
+% \anthracenev[A]{1==Cl;4==F;2==CH$_{3}$}
+% \anthracenev[eb]{1D==O;4SA==MeO;4SB==OMe;%
+% 5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\anthracenev}
+% \begin{macrocode}
+\def\anthracenev{\@ifnextchar[{\@anthracenev}{\@anthracenev[r]}}
+\def\@anthracenev[#1]#2{%
+ \iforigpt \typeout{command `anthracenev' is %
+ based on `hanthracenev'.}\fi%
+%% \expandafter\threech@r#1{}{}%error1998/11/23 by Shinsaku Fujita
+ \expandafter\twoCH@R#1//%
+ \if\@tmpa r% right-handed set of double bonds
+ \hanthracenev[acflhjo]{#2}%
+ \else\if\@tmpa l% left-handed set of double bonds
+ \hanthracenev[acehjmp]{#2}%
+ \else\if\@tmpa A%aromatic circle
+ \hanthracenev[ABC]{#2}%
+ \else\if\@tmpa p%9,10-quinone
+ \if\@tmpb a% (A)%
+ \hanthracenev[achjop]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \hanthracenev[achjop]{#2}%
+ \else\if\@tmpb A% circle type
+ \hanthracenev[AC]{#2}%
+ \else
+ \hanthracenev[achjop]{#2}%
+ \fi\fi\fi%
+ \else\if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)%
+ \hanthracenev[cfjhlo]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \hanthracenev[cehjmp]{#2}%
+ \else\if\@tmpb b% (B)
+ \hanthracenev[dfhjln]{#2}%
+ \else\if\@tmpb c% (C)
+ \hanthracenev[aehjmp]{#2}%
+ \else\if\@tmpb A% cicle type
+ \hanthracenev[cBC]{#2}%
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpa q%1,4-quinone
+ \if\@tmpb a% (A)%
+ \hanthracenev[bfhjlo]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \hanthracenev[behjmp]{#2}%
+ \else\if\@tmpb A% circle type
+ \hanthracenev[AB]{#2}%
+ \else%
+ \hanthracenev[behjmp]{#2}%
+ \fi\fi\fi%
+ \else
+ \hanthracenev[@#1]{#2}%
+ \fi\fi\fi\fi\fi\fi%
+}% %end of \anthracenev macro%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Phenanthrene derivatives}
+% \subsection{Perhydro-phenanthrene derivatives of Vertical type}
+%
+% The macro |\hphenanthrenev| is used for drawing perhydrophenanthrene
+% derivatives of vertical type.
+%
+% The macro |\hphenanthrenev| has an argument |SUBSLIST| as well as an
+% optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% *************************************
+% * perhydro phenanthrene derivatives *
+% * (vertical type) *
+% *************************************
+%
+% \hphenanthrenev[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to p, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A, B, or C indicates an aromatic bond
+% pattern (circle).
+% \changes{v1.02}{1998/10/14}{BONDLIST: o, O, p and P at the fused bond}
+%
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : hphenanthrene
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,4a-double bond
+% e : 4a,4b-double bond
+% f : 4b,5-double bond
+% g : 5,6-double bond
+% h : 6,7-double bond
+% i : 7,8-double bond
+% j : 8,8a-double bond
+% k : 8a,9-double bond
+% l : 9,10-double bond
+% m : 10,10a-double bond
+% n : 1,10a-double bond
+% o : 4a,10a-double bond
+% O : 4a,10a-double bond in the other ring
+% p : 4b,8a-double bond
+% P : 4b,8a-double bond in the other ring
+% A : right aromatic circle
+% B : central aromatic circle
+% C : left aromatic circle
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 10
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+%
+% for 11 (fused positions, 4a and 10a)
+%
+% 11FA : alpha single bond at 4a
+% 11FB : beta single bond at 4a
+% 11FC : alpha single bond (downward) at 4a
+% 11FD : beta single bond (downward) at 4a
+% 11FU : unspecified single bond at 4a
+% 11GA : alpha single bond at 10a
+% 11GB : beta single bond at 10a
+% 11FC : alpha single bond (upward) at 10a
+% 11FD : beta single bond (upward) at 10a
+% 11GU : unspecified single bond at 10a
+%
+% for 12 (fused positions, 4b and 8a)
+%
+% 12FA : alpha single bond at 4b
+% 12FB : beta single bond at 4b
+% 12FU : unspecified single bond at 4b
+% 12GA : alpha single bond at 8a
+% 12GB : beta single bond at 8a
+% 12GU : unspecified single bond at 8a
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \hphenanthrenev{1==Cl;2==F;{{10}}==OH}
+% \hphenanthrenev[c]{1==Cl;4==F;2==CH$_{3}$;
+% {{11}FA}==OH;{{11}FB}==OH}
+% \hphenanthrenev[eb]{1D==O;4SA==MeO;4SB==OMe;
+% 5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+% \changes{v1.02}{1998/10/15}{The command \cs{setdecaringv} has
+% been stopped to use.}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v2.00}{1998/11/23}{Added: Fused rings}
+%
+% \begin{macro}{\hphenanthrenev}
+% \begin{macrocode}
+\def\hphenanthrenev{%
+ \@ifnextchar[{\@hphenanthrenev[@}{\@hphenanthrenev[r]}}
+\def\@hphenanthrenev[#1]#2{%
+% bonds for outer skeleton
+\@reset@ylsw\reset@@yl
+\ylposition{#2}{-4}{0}{2}{0}% %for 5 position
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylposition{#2}{12}{3}{7}{-1}% %for 6 to 8 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi\else
+\ylposition{#2}{13}{2}{5}{-1}% %for 9 to 10 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\else
+\ylposition{#2}{4}{0}{4}{-1}% %for 1 to 3 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-513}\def\@@yli{-303}\fi\else
+\ylposition{#2}{2}{5}{7}{0}% %for 4-position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-513}\def\@@yli{-303}\fi\else
+\ylfusedposition{#2}{-12}{-1}{1}{0}% % for 4b and 8a
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi\else
+\ylfusedposition{#2}{-10}{0}{2}{0}% % for 4a and 10a
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \ifx\@@ylii\empty\else
+ \advance\yl@shiftii\@@ylii\fi
+ \yl@shifti=\@yli
+ \ifx\@@yli\empty\else
+ \advance\yl@shifti\@@yli\fi
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,1200)(-\shiftii,-\shifti)
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `hphenanthrenev' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+ \put(0,406){\line(-5,-3){171}}% %bond 6-5
+ \put(0,406){\line(5,-3){171}}% %bond 5-4a
+ \put(0,0){\line(-5,3){171}}% %bond 8-7
+ \put(0,0){\line(5,3){171}}% %bond 8-8a
+ \put(171,103){\line(0,1){200}}% %bond 8a-4b
+ \put(-171,103){\line(0,1){200}}% %bond 7-6
+ \put(342,406){\line(-5,-3){171}}% %bond 4a-4b
+ \put(342,406){\line(5,-3){171}}% %bond 4a-10a
+ \put(342,0){\line(-5,3){171}}% %bond 9-8a
+ \put(342,0){\line(5,3){171}}% %bond 9-10
+ \put(513,103){\line(0,1){200}}% %bond 10-10a
+ %%%%
+ \put(342,406){\line(0,1){200}}% %bond 4a-4
+ \put(513,709){\line(-5,-3){171}}% %bond 3-4
+ \put(513,709){\line(5,-3){171}}% %bond 3-2
+ \put(684,406){\line(0,1){200}}% %bond 1-2
+ \put(513,303){\line(5,3){171}}% %bond 10a-1
+% inner double bonds
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic double bonds
+\else\if\member a%
+ \put(651,432){\line(0,1){148}}% %double bond 1-2
+\else\if\member b%
+ \put(519,667){\line(5,-3){126}}% %double bond 3-2
+\else\if\member c%
+ \put(519,667){\line(-5,-3){126}}% %double bond 3-4
+\else\if\member d%
+ \put(375,432){\line(0,1){148}}% %double bond 4a-4
+\else\if\member e%
+ \put(348,364){\line(-5,-3){126}}% %double bond 4a-4b
+\else\if\member f%
+ \put(6,364){\line(5,-3){126}}% %double bond 5-4b
+\else\if\member g%
+ \put(-6,364){\line(-5,-3){126}}% %double bond 5-6
+\else\if\member h%
+ \put(-138,129){\line(0,1){148}}% %double bond 6-7
+\else\if\member i%
+ \put(-6,42){\line(-5,3){126}}% %double bond 8-7
+\else\if\member j%
+ \put(6,42){\line(5,3){126}}% %double bond 8-8a
+\else\if\member k%
+ \put(348,42){\line(-5,3){126}}% %double bond 9-8a
+\else\if\member l%
+ \put(348,42){\line(5,3){126}}% %double bond 9-10
+\else\if\member m%
+ \put(482,129){\line(0,1){148}}% %double bond 10-10a
+\else\if\member n%
+ \put(519,345){\line(5,3){126}}% %double bond 10a-1
+\else\if\member o%
+ \put(507,345){\line(-5,3){126}}% %double bond 10a-4a
+\else\if\member O%
+ \put(348,364){\line(5,-3){126}}% %double bond 4a-10a
+\else\if\member p%
+ \put(138,129){\line(0,1){148}}% %double bond 8a-4b
+\else\if\member P%
+ \put(204,129){\line(0,1){148}}% %double bond 8a-4b
+\else\if\member C%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else\if\member B%right aromatic circle
+ \put(342,203){\circle{240}}% %circle
+\else\if\member A%right aromatic circle
+ \put(513,506){\circle{240}}% %circle
+\else
+% setting fused rings
+ \expandafter\twoCH@R\member//%
+ \set@fusion@hphenanv
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+%exocyclic bonds and substituents
+\put(0,0){\setsixringv{#2}{-4}{0}{2}{0}}% %for 5 position
+\put(0,0){\setsixringv{#2}{12}{3}{7}{-1}}% %for 6 to 8 positions
+\put(342,0){\setsixringv{#2}{13}{2}{5}{-1}}% %for 9 to 10 positions
+\put(513,303){\setsixringv{#2}{4}{0}{4}{-1}}% %for 1 to 3 positions
+\put(513,303){\setsixringv{#2}{2}{5}{7}{0}}% %for 4-position
+%bonds and substituents for fused positions
+\put(0,0){\setfusedbond{#2}{-12}{-1}{1}{0}}% % for 4b and 8a
+\put(342,0){\setfusedbond{#2}{-10}{0}{2}{0}}% % for 4a and 10a
+\end{picture}}% %end of \hphenanthrenev macro%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Phenanthrene and phenanthroquinone derivatives}
+%
+% The macro |\phenanthrenev| is used for drawing phenanthrene derivatives
+% of vertical type.
+%
+% The macro |\anthracenev| has an argument |SUBSLIST| as well as an optional
+% argument |OPT|. The latter designates a bond pattern in place of
+% individual exocyclic bonds.
+%
+% \begin{verbatim}
+% *********************************
+% * phenanthrene and derivatives *
+% * (vertical type) *
+% *********************************
+%
+% \phenanthrenev[OPT]{SUBSLIST}
+% \end{verbatim}
+%
+% The |OPT| argument contains one or two characters for designate
+% aromatic bond patterns or for naphthoquinone bond patterns.
+%
+% \begin{verbatim}
+% OPT (bond pattern)
+%
+% none or r : right-handed double bonds
+% A : aromatic circle
+%
+% p or pa : 1,4-quinone (A)
+% pA : 1,4-quinone (circle type)
+%
+% o or oa : 1,2-quinone (A)
+% oA : 1,2-quinone (circle type)
+% ob : 2,3-quinone (B)
+% oc : 3,4-anthraquinone (C)
+%
+% q or qa : 9,10-quinone
+% qA : 9,10-quinone (circle type)
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 10
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \phenanthrenev{1==Cl;2==F}
+% \phenanthrenev[A]{1==Cl;4==F;2==CH$_{3}$}
+% \phenanthrenev[eb]{1D==O;4SA==MeO;4SB==OMe;%
+% 5W==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\phenanthrenev}
+% \begin{macrocode}
+\def\phenanthrenev{\@ifnextchar[{\@phenanthrenev}{\@phenanthrenev[r]}}
+\def\@phenanthrenev[#1]#2{%
+ \iforigpt \typeout{command `phenanthrenev' is %
+ based on `hphenantherenv'.}\fi%
+ \expandafter\threech@r#1{}{}%
+ \if\@tmpa r% right-handed set of double bonds
+ \hphenanthrenev[acgilop]{#2}%
+ \else\if\@tmpa A%aromatic circle
+ \hphenanthrenev[ABC]{#2}%
+ \else\if\@tmpa p%1,4-quinone
+ \if\@tmpb a% (A)%
+ \hphenanthrenev[bgilop]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \hphenanthrenev[bgilop]{#2}%
+ \else\if\@tmpb A% circle type
+ \hphenanthrenev[BCb]{#2}%
+ \else
+ \hphenanthrenev[bgilop]{#2}%
+ \fi\fi\fi%
+ \else\if\@tmpa o%o-quinone
+ \if\@tmpb a% (A)%
+ \hphenanthrenev[cgilop]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \hphenanthrenev[cgilop]{#2}%
+ \else\if\@tmpb b% (B)
+ \hphenanthrenev[dgilnp]{#2}%
+ \else\if\@tmpb c% (C)
+ \hphenanthrenev[agilop]{#2}%
+ \else\if\@tmpb A% cicle type
+ \hphenanthrenev[cBC]{#2}%
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpa q%9,10-quinone
+ \if\@tmpb a% (A)%
+ \hphenanthrenev[acgiop]{#2}%
+ \else\ifx\@tmpb\empty% (A)
+ \hphenanthrenev[acgiop]{#2}%
+ \else\if\@tmpb A% circle type
+ \hphenanthrenev[AC]{#2}%
+ \else
+ \hphenanthrenev[acgiop]{#2}%
+ \fi\fi\fi%
+ \else
+ \hphenanthrenev[@#1]{#2}%
+ \fi\fi\fi\fi\fi%
+}% %end of \phenanthrenev macro%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Steroids}
+% \subsection{Steroids without a chain}
+%
+% The macro |\steroid| is used for drawing steroids.
+%
+% The macro |\steroid| has an argument |SUBSLIST| as well as an
+% optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% ***********************
+% * steroid derivatives *
+% ***********************
+%
+% \steroid[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to t, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A, B, or C indicates an aromatic bond
+% pattern (circle).
+% \changes{v1.02}{1998/10/15}{BONDLIST: k, K, h, H, o and O
+% at the fused bond}
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% none: steroid skeleton
+% a : 1,2-double bond b : 2,3-double bond
+% c : 3,4-double bond d : 4,5-double bond
+% e : 6,5-double bond f : 6,7-double bond
+% g : 7,8-double bond
+% h : 9,8-double bond
+% h : 9,8-double bond in the other bond
+% i : 9,10-double bond j : 1,10-double bond
+% k : 5,10-double bond
+% K : 5,10-double bond in the other bond
+% l : 9,11-double bond
+% m : 12,11-double bond n : 12,13-double bond
+% o : 14,13-double bond
+% O : 14,13-double bond in the other bond
+% p : 8,14-double bond
+% q : 14,15-double bond r : 15,16-double bond
+% s : 17,16-double bond t : 17,13-double bond
+% A : aromatic A ring B : aromatic B ring
+% C : aromatic C ring
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 17 (execpt fused positions)
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom (boldface)
+% nB : beta single bond at n-atom (dotted line)
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% For numbers larger than 9 (two digits), you should designate
+% the SUBSLIST as
+%
+% \begin{verbatim}
+% {{11}A}==Cl;{{12}SA}==H;{{12}SB}==Cl;
+% \end{verbatim}
+%
+% \begin{verbatim}
+% for n = 5,8,9,10,13 and 14 (fused positions)
+%
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom (boldface)
+% nB : beta single bond at n-atom (dotted line)
+% nU : unspecified single bond at n-atom
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \steroid{1==Cl;2==F;{{10}}==OH}
+% \steroid[c]{1==Cl;4==F;2==CH$_{3}$;
+% {{11}SA}==OH;{{11}SB}==OH}
+% \steroid[eb]{1D==O;4SA==MeO;4SB==OMe;
+% 5==Cl;6==Cl;7==Cl;8==Cl}
+% \end{verbatim}
+% \changes{v1.02}{1998/10/15}{The command \cs{setdecaringv} has
+% been stopped to use.}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v1.02}{1998/10/31}{Inner commands \cs{yl@steroidposition}
+% and \cs{@steroidskeleton} are separated from the \cs{@steroid} command.}
+% \changes{v2.00}{1998/12/5}{Add: fused rings}
+%
+% \begin{macro}{\steroid}
+% \begin{macro}{\yl@steroidposition}
+% \begin{macro}{\@steroidskeleton}
+% \begin{macrocode}
+\def\steroid{\@ifnextchar[{\@steroid[@}{\@steroid[Z]}}
+\def\@steroid[#1]#2{%
+% bonds for outer skeleton
+\@reset@ylsw\reset@@yl
+\yl@steroidposition{#2}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \ifx\@@ylii\empty\else
+ \advance\yl@shiftii\@@ylii\fi
+ \yl@shifti=\@yli
+ \ifx\@@yli\empty\else
+ \advance\yl@shifti\@@yli\fi
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1600,1300)(-\shiftii,-\shifti)
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `steroid' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+ \put(0,0){\@steroidskeleton{#1}{#2}}%
+\end{picture}}% %end of \steroid macro%
+% \end{macrocode}
+%
+% The |\yl@steroidposition| is derived from |\ylposition| and
+% |\ylatombondposition| to use in the |\steroid| command as well as
+% in the |\steroidchain| command.
+% \changes{v1.02}{1998/10/31}{Inner commands \cs{yl@steroidposition}
+% and \cs{@steroidskeleton} are separated from the \cs{@steroid} command.}
+%
+% \begin{macrocode}
+\def\yl@steroidposition#1{%
+\ylposition{#1}{0}{0}{2}{0}% %for 1
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylposition{#1}{8}{3}{7}{-1}% %for 2 to 4 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi\else
+\ylposition{#1}{10}{2}{5}{-1}% %for 6 to 7 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\else
+\ylposition{#1}{-11}{0}{2}{0}%for 12 position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-513}\def\@@yli{-303}\fi\else
+\ylposition{#1}{-5}{5}{7}{0}% %for 11 position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-513}\def\@@yli{-303}\fi\else
+\ylposition{#1}{18}{0}{4}{-1}%for 15 to 17 positions
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-855}\def\@@yli{-303}\fi\else
+\ylatombondposition{#1}{-4}{7}% % for 5
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-103}\fi\else
+\ylatombondposition{#1}{-9}{1}% % for 10
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi\else
+\ylatombondposition{#1}{-7}{1}% % for 8
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-513}\def\@@yli{-303}\fi\else
+\ylatombondposition{#1}{-8}{7}% % for 9
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{-406}\fi\else
+\ylatombondposition{#1}{-13}{7}% % for 14
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{-406}\fi\else
+\ylatombondposition{#1}{-12}{1}% % for 13
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{-606}\fi\fi%
+}% end of \yl@steroidposition
+% \end{macrocode}
+%
+% The |\@steroidskeleton| is separated from the definition of |\steroid|
+% so as to be used also in the definition of |\steroidchain|.
+% \changes{v1.02}{1998/10/31}{Inner commands \cs{yl@steroidposition}
+% and \cs{@steroidskeleton} are separated from the \cs{@steroid} command.}
+% \changes{v2.00}{1998/11/23}{Added: fused rings}
+%
+% \begin{macrocode}
+\def\@steroidskeleton#1#2{%
+ \put(0,406){\line(-5,-3){171}}% %bond 1-2
+ \put(0,406){\line(5,-3){171}}% %bond 1-10
+ \put(0,0){\line(-5,3){171}}% %bond 4-3
+ \put(0,0){\line(5,3){171}}% %bond 4-5
+ \put(171,103){\line(0,1){200}}% %bond 5-10
+ \put(-171,103){\line(0,1){200}}% %bond 3-2
+ \put(342,406){\line(-5,-3){171}}% %bond 9-10
+ \put(342,406){\line(5,-3){171}}% %bond 9-8
+ \put(342,0){\line(-5,3){171}}% %bond 6-5
+ \put(342,0){\line(5,3){171}}% %bond 6-7
+ \put(513,103){\line(0,1){200}}% %bond 7-8
+ %%%%
+ \put(342,406){\line(0,1){200}}% %bond 9-11
+ \put(513,709){\line(-5,-3){171}}% %bond 12-11
+ \put(513,709){\line(5,-3){171}}% %bond 12-13
+ \put(684,406){\line(0,1){200}}% %bond 14-13
+ \put(513,303){\line(5,3){171}}% %bond 8-14
+ %%%%
+ \put(855,709){\line(-5,-3){171}}% %bond 17-13
+ \put(855,709){\line(5,-3){171}}% %bond 17-16
+ \put(1026,406){\line(0,1){200}}% %bond 15-16
+ \put(684,406){\line(1,0){342}}% %bond 14-15
+% inner double bonds
+\@tfor\member:=#1\do{%
+\if\member Z%no endcyclic double bonds
+\else\if\member a%
+ \put(-6,364){\line(-5,-3){126}}% %double bond 1-2 5-6
+\else\if\member b%
+ \put(-138,129){\line(0,1){148}}% %double bond 3-2 6-7
+\else\if\member c%
+ \put(-6,42){\line(-5,3){126}}% %double bond 4-3 8-7
+\else\if\member d%
+ \put(6,42){\line(5,3){126}}% %double bond 4-5 8-8a
+\else\if\member e%
+ \put(348,42){\line(-5,3){126}}% %double bond 6-5 9-8a
+\else\if\member f%
+ \put(348,42){\line(5,3){126}}% %double bond 6-7 9-10
+\else\if\member g%
+ \put(482,129){\line(0,1){148}}% %double bond 7-8 10-10a
+\else\if\member h%
+ \put(507,345){\line(-5,3){126}}% %double bond 8-9 10a-4a
+\else\if\member H%
+ \put(348,364){\line(5,-3){126}}% %double bond 9-8 4a-10a
+\else\if\member i%
+ \put(348,364){\line(-5,-3){126}}% %double bond 9-10 4a-4b
+\else\if\member j%
+ \put(6,364){\line(5,-3){126}}% %double bond 1-10 5-4b
+\else\if\member k%
+ \put(138,129){\line(0,1){148}}% %double bond 5-10 8a-4b
+\else\if\member K%
+ \put(204,129){\line(0,1){148}}% %double bond 5-10 8a-4b
+\else\if\member l%
+ \put(375,432){\line(0,1){148}}% %double bond 9-11 4-5
+\else\if\member m%
+ \put(519,667){\line(-5,-3){126}}% %double bond 12-11 3-4
+\else\if\member n%
+ \put(519,667){\line(5,-3){126}}% %double bond 12-13 3-2
+\else\if\member o%
+ \put(651,432){\line(0,1){148}}% %double bond 13-14 1-2
+\else\if\member O%
+ \put(717,432){\line(0,1){148}}% %double bond 13-14 1-2
+\else\if\member p%
+ \put(519,345){\line(5,3){126}}% %double bond 8-14 10a-1
+\else\if\member q%
+ \put(720,439){\line(1,0){260}}% %double bond 14-15
+\else\if\member r%
+ \put(993,432){\line(0,1){148}}% %double bond 15-16 1-2
+\else\if\member s%
+ \put(861,667){\line(5,-3){126}}% %double bond 17-16 3-2
+\else\if\member t%
+ \put(861,667){\line(-5,-3){126}}% %double bond 17-13 3-4
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}}% %circle
+\else\if\member B%right aromatic circle
+ \put(342,203){\circle{240}}% %circle
+\else\if\member C%right aromatic circle
+ \put(513,506){\circle{240}}% %circle
+\else
+% setting fused rings
+ \expandafter\twoCH@R\member//%
+ \set@fusion@steroid
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+%exocyclic bonds and substituents
+\iniflag
+\put(0,0){\setsixringv{#2}{0}{0}{2}{0}}% %for 1
+\put(0,0){\setsixringv{#2}{8}{3}{7}{-1}}% %for 2 to 4 positions
+\put(342,0){\setsixringv{#2}{10}{2}{5}{-1}}% %for 6 to 7 positions
+\put(513,303){\setsixringv{#2}{-11}{0}{2}{0}}%for 12 position
+\put(513,303){\setsixringv{#2}{-5}{5}{7}{0}}% %for 11 position
+\put(855,303){\setsixringv{#2}{18}{0}{4}{-1}}%for 15 to 17 positions
+%bonds and substituents for fused positions
+\put(171,103){\setatombond{#2}{-4}{7}}% % for 5
+\put(171,303){\setatombond{#2}{-9}{1}}% % for 10
+\put(513,303){\setatombond{#2}{-7}{1}}% % for 8
+\put(342,406){\setatombond{#2}{-8}{7}}% % for 9
+\put(684,406){\setatombond{#2}{-13}{7}}% % for 14
+\put(684,606){\setatombond{#2}{-12}{1}}% % for 13
+}% end of \@steroidskeleton
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@fusion@steroid| is an inner command contained
+% in the definition of |\steroidskeleton|, where
+% the macro is used for setting an additive
+% or a fused ring at each bond (designated by |\@@tmpa|). The
+% fused ring is typeset by the inner command |\set@fusionadd@sixv|.
+%
+% \begin{macro}{\set@fusion@steroid}
+% \changes{v2.00}{1998/11/23}{New command: \cs{set@fusion@steroid}} +% \begin{macrocode}
+\def\set@fusion@steroid{%
+ \let\@@tmpa=\@tmpa
+ \let\@@tmpb=\@tmpb
+ \if\@tmpa a%
+ \edef\@@tmpa{f}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \else\if\@tmpa A%
+ \edef\@@tmpa{F}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \else\if\@tmpa b%
+ \edef\@@tmpa{e}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \else\if\@tmpa B%
+ \edef\@@tmpa{E}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \else\if\@tmpa c%
+ \edef\@@tmpa{d}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \else\if\@tmpa C%
+ \edef\@@tmpa{D}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \else\if\@tmpa d%
+ \edef\@@tmpa{c}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `d'}%
+ \fi
+ \else\if\@tmpa D%
+ \edef\@@tmpa{C}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `D'}%
+ \fi
+ \else\if\@tmpa e%
+ \edef\@@tmpa{d}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `e'}%
+ \fi
+ \else\if\@tmpa E%
+ \edef\@@tmpa{D}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `E'}%
+ \fi
+ \else\if\@tmpa f%
+ \edef\@@tmpa{c}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `f'}%
+ \fi
+ \else\if\@tmpa F%
+ \edef\@@tmpa{C}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `f'}%
+ \fi
+ \else\if\@tmpa g%
+ \edef\@@tmpa{b}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `g'}%
+ \fi
+ \else\if\@tmpa G%
+ \edef\@@tmpa{B}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `g'}%
+ \fi
+ \else\if\@tmpa h%
+ \edef\@@tmpa{a}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `h'}%
+ \fi
+ \else\if\@tmpa H%
+ \edef\@@tmpa{A}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `H'}%
+ \fi
+ \else\if\@tmpa i%
+ \edef\@@tmpa{f}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `i'}%
+ \fi
+ \else\if\@tmpa I%
+ \edef\@@tmpa{F}%
+ \put(342,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `I'}%
+ \fi
+ \else\if\@tmpa j%
+ \edef\@@tmpa{a}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `j'}%
+ \fi
+ \else\if\@tmpa J%
+ \edef\@@tmpa{A}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `J'}%
+ \fi
+ \else\if\@tmpa k%
+ \edef\@@tmpa{b}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `k'}%
+ \fi
+ \else\if\@tmpa K%
+ \edef\@@tmpa{B}%
+ \put(0,0){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `K'}%
+ \fi
+ \else\if\@tmpa l%
+ \edef\@@tmpa{e}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `l'}%
+ \fi
+ \else\if\@tmpa L%
+ \edef\@@tmpa{E}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `L'}%
+ \fi
+ \else\if\@tmpa m%
+ \edef\@@tmpa{f}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \else\if\@tmpa M%
+ \edef\@@tmpa{F}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \else\if\@tmpa n%
+ \edef\@@tmpa{a}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `n'}%
+ \fi
+ \else\if\@tmpa N%
+ \edef\@@tmpa{A}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `N'}%
+ \fi
+ \else\if\@tmpa o%
+ \edef\@@tmpa{b}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `o'}%
+ \fi
+ \else\if\@tmpa O%
+ \edef\@@tmpa{B}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `O'}%
+ \fi
+ \else\if\@tmpa p%
+ \edef\@@tmpa{c}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `N'}%
+ \fi
+ \else\if\@tmpa P%
+ \edef\@@tmpa{C}%
+ \put(513,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `N'}%
+ \fi
+ \else\if\@tmpa q%
+ \XyMTeXWarning{Mismatched dimension for bond `q'}%
+ \else\if\@tmpa Q%
+ \XyMTeXWarning{Mismatched dimension for bond `Q'}%
+ \else\if\@tmpa r%
+ \edef\@@tmpa{b}%
+ \put(855,303){\set@fusionadd@sixv}%
+ \else\if\@tmpa R%
+ \edef\@@tmpa{B}%
+ \put(855,303){\set@fusionadd@sixv}%
+ \else\if\@tmpa s%
+ \edef\@@tmpa{a}%
+ \put(855,303){\set@fusionadd@sixv}%
+ \else\if\@tmpa S%
+ \edef\@@tmpa{A}%
+ \put(855,303){\set@fusionadd@sixv}%
+ \else\if\@tmpa t%
+ \edef\@@tmpa{f}%
+ \put(855,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `t'}%
+ \fi
+ \else\if\@tmpa T%
+ \edef\@@tmpa{F}%
+ \put(855,303){\set@fusionadd@sixv}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `T'}%
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+}% end of the macro \set@fusion@steroid
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Steroids with a chain}
+%
+% The macro |\steroidchain| is used for drawing steroids.
+%
+% The macro |\steroidchain| has an argument |SUBSLIST| as well as an
+% optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% **************************************
+% * steroid derivatives having a chain *
+% **************************************
+%
+% \steroidchain[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected form a to t, each of which indicates
+% the presence of an inner (endcyclic) double bond on the corresponding
+% position. The character A, B, or C indicates an aromatic bond
+% pattern (circle). A two-character string `Z?' indicates
+% a double bond in the side-chain.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% (double bonds for the steroid skeleton)
+% none: no action on the steroid skeleton
+% a : 1,2-double bond b : 2,3-double bond
+% c : 3,4-double bond d : 4,5-double bond
+% e : 6,5-double bond f : 6,7-double bond
+% g : 7,8-double bond h : 9,8-double bond
+% i : 9,10-double bond j : 1,10-double bond
+% k : 5,10-double bond l : 9,11-double bond
+% m : 12,11-double bond n : 12,13-double bond
+% o : 14,13-double bond p : 8,14-double bond
+% q : 14,15-double bond r : 15,16-double bond
+% s : 17,16-double bond t : 17,13-double bond
+% A : aromatic A ring B : aromatic B ring
+% C : aromatic C ring
+% \end{verbatim}
+%
+% \begin{verbatim}
+% (double bonds for the side chain)
+% Z : no action
+% Za : 17,20-double bond Zb : 20,22-double bond
+% Zc : 22,23-double bond Zd : 23,24-double bond
+% Ze : 24,25-double bond Zf : 25,26-double bond
+% Zg : 25,27-double bond
+% \end{verbatim}
+%
+% For a two-character indicator, you should write the BONDLIST
+% as, e.g.
+%
+% \begin{verbatim}
+% [b{Za}{Zc}...]
+% \end{verbatim}
+%
+% The |SUBSLIST| argument contains one or more substitution descriptors
+% which are separated from each other by a semicolon. Each substitution
+% descriptor has a locant number with a bond modifier and a substituent,
+% where these are separated with a double equality symbol.
+%
+% \begin{verbatim}
+% SUBSLIST: list of substituents
+%
+% for n = 1 to 24 (execpt fused positions)
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom (boldface)
+% nB : beta single bond at n-atom (dotted line)
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \end{verbatim}
+%
+% For numbers larger than 9 (two digits), you should designate
+% the SUBSLIST as
+%
+% \begin{verbatim}
+% {{11}A}==Cl;{{12}SA}==H;{{12}SB}==Cl; ...
+% \end{verbatim}
+%
+% \begin{verbatim}
+% for n = 5,8,9,10,13,14,and 25 (fused positions etc.)
+%
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom (boldface)
+% nB : beta single bond at n-atom (dotted line)
+% nU : unspecified single bond at n-atom
+% \end{verbatim}
+%
+% \begin{verbatim}
+% e.g.
+%
+% \steroidchain{1==Cl;2==F;{{10}}==OH}
+% \steroidchain[c]{1==Cl;4==F;2==CH$_{3}$;%
+% {{11}SA}==OH;{{11}SB}==OH}
+% \steroidchain[b]{1D==O;4SA==MeO;4SB==OMe;%
+% ;6==Cl;7==Cl;11==Cl}
+% \end{verbatim}
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpositionh}, \cs{if@ylsw}
+% \cs{ylfusedposition},
+% \cs{yl@shiftii}, \cs{@ylii}, \cs{@@ylii}, \cs{yl@shifti}, \cs{@yli},
+% \cs{@yli}, \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \changes{v1.02}{1998/10/31}{The inner commands \cs{yl@steroidposition}
+% is used. The old \cs{steroid} is replaced by \cs{@steroidskeleton}.}
+% \changes{v2.00}{1998/11/31}{Add: fused rings}
+%
+% \begin{macro}{\steroidchain}
+% \begin{macrocode}
+\def\steroidchain{\@ifnextchar[{\@steroidchain[@}{\@steroidchain[Z]}}
+\def\@steroidchain[#1]#2{%
+%shift due to the steroid skeleton
+\@reset@ylsw\reset@@yl
+\yl@steroidposition{#2}%
+%shift due to the side chain
+\ylposition{#2}{-21}{0}{3}{0}%for 22 and 23 positions
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-1026}\def\@@yli{-606}\fi
+\else
+\ylposition{#2}{-14}{5}{7}{0}%for 20 position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-1026}\def\@@yli{-606}\fi\else
+\ylposition{#2}{-20}{3}{5}{0}%for 24 position
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-1197}\def\@@yli{-709}\fi\else
+\ylatombondposition{#2}{-24}{4}% % for 5
+\fi
+\if@ylsw\ifx\@@ylii\empty
+\def\@@ylii{-1397}\def\@@yli{-709}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \ifx\@@ylii\empty\else
+ \advance\yl@shiftii\@@ylii\fi
+ \yl@shifti=\@yli
+ \ifx\@@yli\empty\else
+ \advance\yl@shifti\@@yli\fi
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(2000,1500)(-\shiftii,-\shifti)
+ \iforigpt \typeout{command `steroidchain' is based on `steroid'.}\fi%
+\fi
+% steroid skeleton
+ \put(0,0){\@steroidskeleton{#1}{#2}}%
+% bonds for the side chain (carbons 20 to 27 (except 21))
+ \put(855,709){\line(0,1){200}}% %bond 17-20
+ \put(1026,1012){\line(-5,-3){171}}% %bond 22-20
+ \put(1026,1012){\line(5,-3){171}}% %bond 22-23
+ \put(1197,709){\line(0,1){200}}% %bond 24-23
+ \put(1197,709){\line(1,0){200}}% %bond 24-25
+ \put(1397,709){\line(3,5){103}}% %bond 25-26
+ \put(1397,709){\line(3,-5){103}}% %bond 25-27
+% double bonds along the side chain
+\@tfor\member:=#1\do{%
+\expandafter\twoCH@R\member//\relax%
+\if\@tmpa Z\relax%
+ \ifx\@tmpb\empty%no action
+ \else\if\@tmpb a%
+ \put(888,735){\line(0,1){148}}% %double bond 17-20
+ \else\if\@tmpb b%
+ \put(1020,970){\line(-5,-3){126}}% %double bond 22-20
+ \else\if\@tmpb c%
+ \put(1032,970){\line(5,-3){126}}% %double bond 22-23
+ \else\if\@tmpb d%
+ \put(1164,735){\line(0,1){148}}% %double bond 24-23
+ \else\if\@tmpb e%
+ \put(1233,742){\line(1,0){140}}% %double bond 24-25
+ \else\if\@tmpb f%
+ \put(1433,715){\line(3,5){72}}% %double bond 25-26
+ \else\if\@tmpb g%
+ \put(1433,697){\line(3,-5){72}}% %double bond 25-27
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi}
+% substitution on the side chain
+\put(1026,606){\setsixringv{#2}{-21}{0}{3}{0}}%for 22 and 23 positions
+\put(1026,606){\setsixringv{#2}{-14}{5}{7}{0}}%for 20 position
+\put(1197,709){\setsixringv{#2}{-20}{3}{5}{0}}%for 24 position
+\put(1397,709){\setatombond{#2}{-24}{4}}% % for 5
+\end{picture}}% %end of \steroidchain macro%
+%</carom>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/carom.ins b/Master/texmf-dist/source/latex/xymtex/carom.ins new file mode 100644 index 00000000000..922c74a0936 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/carom.ins @@ -0,0 +1,51 @@ +\def\batchfile{carom.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996, 1988, 2000 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1998
+Version 2.00 Released on December 25, 1998
+Version 2.00a Released on June 14, 2000
+
+Copyright (C) 1996,1998,2000 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{carom.drv}{t}{%
+ \from{carom.dtx}{driver}}
+
+\generateFile{carom.sty}{t}{%
+ \from{carom.dtx}{carom}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/ccycle.drv b/Master/texmf-dist/source/latex/xymtex/ccycle.drv new file mode 100644 index 00000000000..783f24c071e --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/ccycle.drv @@ -0,0 +1,81 @@ +%% +%% This is file `ccycle.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ccycle.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996,1998 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1996 +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1996,1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: ccycle.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{ccycle.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{ccycle.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Further Cyclic Compounds by {\sffamily ccycle.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{ccycle.dtx} +\end{document} +\endinput +%% +%% End of file `ccycle.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/ccycle.dtx b/Master/texmf-dist/source/latex/xymtex/ccycle.dtx new file mode 100644 index 00000000000..7cc870485b6 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/ccycle.dtx @@ -0,0 +1,3144 @@ +% \iffalse meta-comment
+%% File: ccycle.dtx
+%
+% Copyright 1993,1996,1998 by Shinsaku Fujita
+%
+% This file is part of XyMTeX system.
+% -------------------------------------
+%
+% This file is a successor to:
+%
+% ccycle.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].
+%
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name and
+% directory name; or
+% (2) if you do make changes,
+% (a) you name it something other than the names included in the
+% ``xymtex'' directory and
+% (b) you are requested to leave this notice intact.
+% This restriction ensures that all standard styles are identical.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
+% Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{ccycle}
+% \def\versi@ndate{December 01, 1993}
+% \def\versi@nno{ver1.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{ccycle}
+% \def\versi@ndate{March 05, 1994}
+% \def\versi@nno{ver1.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{ccycle}
+% \def\versi@ndate{August 16, 1996}
+% \def\versi@nno{ver1.01a}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{ccycle}
+% \def\versi@ndate{October 31, 1998}
+% \def\versi@nno{ver1.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{3793}
+%% \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.01a}{1996/06/17}{first edition for LaTeX2e}
+% \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e}
+% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+\ProvidesFile{ccycle.dtx}[1998/12/25 v2.00 XyMTeX{} package file]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{ccycle.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{Further Cyclic Compounds by {\sffamily ccycle.sty}
+(\fileversion) of \XyMTeX{}}
+\author{Shinsaku Fujita \\
+Department of Chemistry and Materials Technology, \\
+Kyoto Institute of Technology, \\
+Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% % (old address)
+% % Ashigara Research Laboratories,
+% % Fuji Photo Film Co., Ltd., \\
+% % Minami-Ashigara, Kanagawa, 250-01 Japan
+}
+\date{\filedate}
+%
+\begin{document}
+ \maketitle
+ \DocInput{ccycle.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \section{Introduction}\label{ccycle:intro}
+%
+% \subsection{Options for {\sffamily docstrip}}
+%
+% \DeleteShortVerb{\|}
+% \begin{center}
+% \begin{tabular}{|l|l|}
+% \hline
+% \emph{option} & \emph{function}\\ \hline
+% ccycle & ccycle.sty \\
+% driver & driver for this dtx file \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \MakeShortVerb{\|}
+%
+% \subsection{Version Information}
+%
+% \begin{macrocode}
+%<*ccycle>
+\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
+\typeout{ -- Released December 25, 1998 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{ccycle}
+\def\versi@ndate{December 25, 1998}
+\def\versi@nno{ver2.00}
+\def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
+\space[\copyrighth@lder]}
+% \end{macrocode}
+%
+% \section{List of commands for ccycle.sty}
+%
+% \begin{verbatim}
+% ********************************
+% * ccycle.sty: list of commands *
+% ********************************
+%
+% Setting of Bonds
+%
+% \@chaira (for cyclohexane chair)
+% \@chairb
+% \@chairc
+% \@chaird
+% \@chaire
+% \@chairf
+%
+% \@borna (for bornanes)
+% \@bornb
+% \@bornc
+% \@bornd
+% \@borne
+% \@bornf
+% \@borng
+%
+% Basic Macros
+%
+% \chair \@chair
+% \bicychepv \@bicychepv
+% \bicycheph \@bicycheph
+% \bornane \@bornane
+% \adamantane \@damantane
+%
+% (Added March 05, 1994 by Shinsaku Fujita)
+% Setting of Bonds
+%
+% \@chairia (for cyclohexane chair inversed)
+% \@chairib \@chairic \@chairid
+% \@chairie \@chairif
+%
+% Basic Macros
+%
+% \chairi \@chairi
+%
+% (Added June 16, 1996 by Shinsaku Fujita)
+% Setting of Bonds
+%
+% \@chairiI (for horizontal-type adamantane)
+% \@chairiII \@chairiIII \@chairiIV
+% \@chairiV \@chairiVI \@chairiVII
+% \@chairiVIII \@chairiIX \@chairiX
+%
+% Basic Macros
+%
+% \hadamantane \@hadamantane
+%
+% Macros for adjusting substitution sites (for Version 1.02)
+%
+% \ylchairposition
+% \ylchairiposition
+% \ylbornaneposition
+% \yladamanposition
+% \ylhadamanposition
+%
+% \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 ccycle.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}{}
+\unitlength=0.1pt
+% \end{macrocode}
+%
+% \section{Chair-form cyclohexanes}
+% \subsection{Macros for setting substituents}
+%
+% Macros |\@chaira| to |\@chairf| are used to set substituents
+% on each position of cyclohexane. 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{macro}{\@chaira}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% **********************************************
+% * treatment of the chair form of cyclohexane *
+% **********************************************
+% %%%%%%%%%%%%%%%
+% % subst. on 1 %
+% %%%%%%%%%%%%%%%
+\def\@chaira{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=10
+ \put(0,0){\line(-1,1){120}}% single bond at 1
+ \putlatom{-130}{110}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=-12
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{180}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=16
+ \yl@ydiff=44
+ \put(0,0){\line(-5,-3){144}}% single bond at 1 equatorial
+ \putlatom{-160}{-130}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=10
+ \put(-10,-10){\line(-1,1){120}}% double bond at 1
+ \put(10,10){\line(-1,1){120}}% double bond at 1
+ \putlatom{-130}{110}{\@memberb}% left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=10
+ \put(0,0){\line(-1,1){120}}% single bond at 1
+ \putlatom{-130}{110}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairb}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 2 %
+% %%%%%%%%%%%%%%%
+\def\@chairb{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=70
+ \put(170,-226){\line(-1,-1){120}}% single bond at 2
+ \putlatom{40}{-416}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=32
+ \yl@ydiff=92
+ \put(170,-226){\line(0,-1){168}}% single bond at 2 axial
+ \putlratom{138}{-486}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=16
+ \yl@ydiff=34
+ \put(170,-226){\line(-5,3){144}}% single bond at 2 equatorial
+ \putlatom{10}{-174}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=70
+ \put(160,-216){\line(-1,-1){120}}% double bond at 2
+ \put(180,-236){\line(-1,-1){120}}% double bond at 2
+ \putlatom{40}{-416}{\@memberb}% left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=70
+ \put(170,-226){\line(-1,-1){120}}% single bond at 2
+ \putlatom{40}{-416}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairc}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 3 %
+% %%%%%%%%%%%%%%%
+\def\@chairc{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=24
+ \put(573,-91){\line(5,4){170}}% single bond at 3
+ \putratom{753}{21}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=40
+ \yl@ydiff=-24
+ \put(573,-91){\line(0,1){168}}% single bond at 3 axial
+ \putlratom{533}{101}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-36
+ \yl@ydiff=83
+ \put(573,-91){\line(5,-3){144}}% single bond at 3 equatorial
+ \putlatom{753}{-260}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=0
+ \put(563,-83){\line(5,4){170}}% double bond at 3
+ \put(583,-99){\line(5,4){170}}% double bond at 3
+ \putratom{733}{41}{\@memberb}% right type
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=24
+ \put(573,-91){\line(5,4){170}}% single bond at 3
+ \putratom{753}{21}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chaird}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 4 %
+% %%%%%%%%%%%%%%%
+\def\@chaird{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=70
+ \put(843,-181){\line(1,-1){120}}% single bond at 4
+ \putratom{953}{-371}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=91
+ \put(843,-181){\line(0,-1){168}}% single bond at 4 axial
+ \putlratom{801}{-440}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-16
+ \yl@ydiff=16
+ \put(843,-181){\line(5,3){144}}% single bond at 4 equatorial
+ \putratom{1003}{-111}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=70
+ \put(833,-191){\line(1,-1){120}}% double bond at 4
+ \put(853,-171){\line(1,-1){120}}% double bond at 4
+ \putratom{953}{-371}{\@memberb}% right type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=70
+ \put(843,-181){\line(1,-1){120}}% single bond at 4
+ \putratom{953}{-371}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chaire}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 5 %
+% %%%%%%%%%%%%%%%
+\def\@chaire{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=10
+ \put(673,46){\line(1,1){120}}% single bond at 5
+ \putratom{803}{158}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=40
+ \yl@ydiff=-24
+ \put(673,46){\line(0,1){168}}% single bond at 5 axial
+ \putlratom{633}{238}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-6
+ \yl@ydiff=63
+ \put(673,46){\line(5,-3){144}}% single bond at 5 equatorial
+ \putratom{823}{-103}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-10
+ \yl@ydiff=10
+ \put(663,53){\line(1,1){120}}% double bond at 5
+ \put(683,38){\line(1,1){120}}% double bond at 5
+ \putratom{803}{158}{\@memberb}% right type
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=24
+ \put(673,46){\line(5,4){170}}% single bond at 5
+ \putratom{853}{158}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairf}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 6 %
+% %%%%%%%%%%%%%%%
+\def\@chairf{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=0
+ \yl@ydiff=54
+ \put(270,-90){\line(-5,-4){170}}% single bond at 2
+ \putlatom{100}{-280}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=32
+ \yl@ydiff=92
+ \put(270,-90){\line(0,-1){168}}% single bond at 2 axial
+ \putlratom{238}{-350}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=26
+ \yl@ydiff=-14
+ \put(270,-90){\line(-5,3){144}}% single bond at 2 equatorial
+ \putratom{100}{18}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=54
+ \put(260,-80){\line(-5,-4){170}}% double bond at 2
+ \put(280,-100){\line(-5,-4){170}}% double bond at 2
+ \putlatom{100}{-280}{\@memberb}% left or right type
+ \else%
+ \yl@xdiff=0
+ \yl@ydiff=54
+ \put(270,-90){\line(-5,-4){170}}% single bond at 2
+ \putlatom{100}{-280}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Drawing of Chair-form cyclohexanes}
+%
+% The standard skeleton of a chair form of cyclohexane is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ***************************
+% * cyclohexane derivatives *
+% * (chair type) *
+% ***************************
+% The following numbering is adopted in this macro.
+%
+% 5
+% / 3 *
+% 1 * 6 / * 4
+% * 2
+%
+% \end{verbatim}
+%
+% The macro |\chair| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \chair[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : cyclohexane
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,6-double bond
+% f : 6,1-double bond
+% \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 12 substitution positions)
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% nSa : axial single bond at n-atom
+% nSe : equatorial single bond at n-atom
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+%
+% \begin{verbatim}
+% \chair{1==Cl;2==F}
+% \chair[a]{1==Cl;4==F;2==CH$_{3}$}
+% \chair[eb]{1D==O;4Se==MeO;4Sa==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\@chair| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macros |\@chaira| to |\@chairf| described above.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylchairposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\@chair}
+% \begin{macro}{\chair}
+% \begin{macrocode}
+\def\chair{\@ifnextchar[{\@chair}{\@chair[r]}}
+\def\@chair[#1]#2{%
+\@reset@ylsw%
+\ylchairposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+ \begin{picture}(1600,800)(-400,-500)
+ \iforigpt \put(-400,-500){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `chair' origin: (0,0) ---> (400,500)}
+ \fi%
+\fi
+%skeletal bonds
+ \thicklines%
+ \put(0,0){\line(3,-4){170}}% % bond 1 to 2
+ \put(170,-226){\line(3,1){403}}% % 2 to 3
+ \put(573,-91){\line(3,-1){270}}% % 3 to 4
+ \thinlines%
+ \put(843,-181){\line(-3,4){170}}% % 4 to 5
+ \put(673,46){\line(-3,-1){403}}% % 5 to 6
+ \put(0,0){\line(3,-1){270}}% % 1 to 6
+% inner double bonds
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic bonds
+\else \if\member a%
+ \put(76,-42){\line(3,-4){110}}% % double bond 1 to 2
+\else \if\member b%
+ \put(200,-186){\line(3,1){343}}% % 2 to 3
+\else \if\member c%
+ \put(603,-70){\line(3,-1){190}}% % 3 to 4
+\else \if\member d%
+ \put(780,-141){\line(-3,4){110}}% % 4 to 5
+\else \if\member e%
+ \put(661,6){\line(-3,-1){343}}% % 5 to 6
+\else \if\member f%
+ \put(75,-50){\line(3,-1){170}}% % 1 to 6
+\fi\fi\fi\fi\fi\fi\fi}%
+% setting substituents
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa%0 omit
+ \or\@chaira% subst. on 1
+ \or\@chairb% subst. on 2
+ \or\@chairc% subst. on 3
+ \or\@chaird% subst. on 4
+ \or\@chaire% subst. on 5
+ \or\@chairf% subst. on 6
+\fi%end of ifcase
+\fi\fi%
+}\end{picture}}% %end of \chair macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylchairposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/23}{New ommands for setting substituents} +%
+% \begin{macro}{\ylchairposition}
+% \begin{macrocode}
+\def\ylchairposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{-170}\gdef\@yli{226}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-573}\gdef\@yli{91}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{-843}\gdef\@yli{181}\global\@ylswtrue% subst. on 4
+ \or\gdef\@ylii{-673}\gdef\@yli{-46}\global\@ylswtrue% subst. on 5
+ \or\gdef\@ylii{-270}\gdef\@yli{90}\global\@ylswtrue% subst. on 6
+\fi%end of ifcase
+\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Inverse chair-form cyclohexanes}
+% \subsection{Macros for setting substituents}
+%
+% Macros |\@chairia| to |\@chairif| are used to set substituents
+% on each position of cyclohexane. Note that they corresopond to
+% the counterparts of chair-form cyclohexanes described above.
+%
+% \begin{macro}{\@chairia}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% ********************************************************
+% * treatment of the chair form (inverse) of cyclohexane *
+% * added March 05, 1994 by Shinsaku Fujita *
+% ********************************************************
+% %%%%%%%%%%%%%%%
+% % subst. on 1 %
+% %%%%%%%%%%%%%%%
+\def\@chairia{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=90
+ \put(0,0){\line(-1,-1){120}}% single bond at 1
+ \putlatom{-130}{-210}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=92
+ \put(0,0){\line(0,-1){168}}% single bond at 1 axial
+ \putlratom{-42}{-260}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=90
+ \put(-10,10){\line(-1,-1){120}}% double bond at 1
+ \put(10,-10){\line(-1,-1){120}}% double bond at 1
+ \putlatom{-130}{-210}{\@memberb}% left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=90
+ \put(0,0){\line(-1,-1){120}}% single bond at 1
+ \putlatom{-130}{-210}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairif}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 6 %
+% %%%%%%%%%%%%%%%
+\def\@chairif{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(170,226){\line(-1,1){120}}% single bond at 6
+ \putratom{40}{316}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=32
+ \yl@ydiff=-12
+ \put(170,226){\line(0,1){168}}% single bond at 6 axial
+ \putlratom{138}{406}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=16
+ \yl@ydiff=46
+ \put(170,226){\line(-5,-3){144}}% single bond at 6 equatorial
+ \putlatom{10}{94}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(160,216){\line(-1,1){120}}% double bond at 6
+ \put(180,236){\line(-1,1){120}}% double bond at 6
+ \putlatom{40}{316}{\@memberb}% left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(170,226){\line(-1,1){120}}% single bond at 6
+ \putlatom{40}{316}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairie}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 5 %
+% %%%%%%%%%%%%%%%
+\def\@chairie{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=76
+ \put(573,91){\line(5,-4){170}}% single bond at 5
+ \putratom{753}{-101}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=40
+ \yl@ydiff=104
+ \put(573,91){\line(0,-1){168}}% single bond at 5 axial
+ \putlratom{533}{-181}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-36
+ \yl@ydiff=3
+ \put(573,91){\line(5,3){144}}% single bond at 5 equatorial
+ \putlatom{753}{180}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-10
+ \yl@ydiff=96
+ \put(563,83){\line(5,-4){170}}% double bond at 5
+ \put(583,99){\line(5,-4){170}}% double bond at 5
+ \putratom{733}{-141}{\@memberb}% right type
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=76
+ \put(573,91){\line(5,-4){170}}% single bond at 5
+ \putratom{753}{-121}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairid}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 4 %
+% %%%%%%%%%%%%%%%
+\def\@chairid{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(843,181){\line(1,1){120}}% single bond at 4
+ \putratom{953}{271}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=-11
+ \put(843,181){\line(0,1){168}}% single bond at 4 axial
+ \putlratom{801}{360}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-16
+ \yl@ydiff=64
+ \put(843,181){\line(5,-3){144}}% single bond at 4 equatorial
+ \putratom{1003}{31}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(833,191){\line(1,1){120}}% double bond at 4
+ \put(853,171){\line(1,1){120}}% double bond at 4
+ \putratom{953}{271}{\@memberb}% right type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(843,181){\line(1,1){120}}% single bond at 4
+ \putratom{953}{271}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairic}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 3 %
+% %%%%%%%%%%%%%%%
+\def\@chairic{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=92
+ \put(673,-46){\line(1,-1){120}}% single bond at 3
+ \putratom{803}{-258}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=40
+ \yl@ydiff=110
+ \put(673,-46){\line(0,-1){168}}% single bond at 3 axial
+ \putlratom{633}{-318}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-6
+ \yl@ydiff=17
+ \put(673,-46){\line(5,3){144}}% single bond at 3 equatorial
+ \putratom{823}{23}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-5
+ \yl@ydiff=96
+ \put(663,-53){\line(1,-1){120}}% double bond at 3
+ \put(683,-38){\line(1,-1){120}}% double bond at 3
+ \putratom{803}{-258}{\@memberb}% right type
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=76
+ \put(673,-46){\line(5,-4){170}}% single bond at 3
+ \putratom{853}{-258}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairib}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 2 %
+% %%%%%%%%%%%%%%%
+\def\@chairib{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=0
+ \yl@ydiff=46
+ \put(270,90){\line(-5,4){170}}% single bond at 2
+ \putlatom{100}{180}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=32
+ \yl@ydiff=-12
+ \put(270,90){\line(0,1){168}}% single bond at 2 axial
+ \putlratom{238}{270}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=26
+ \yl@ydiff=94
+ \put(270,90){\line(-5,-3){144}}% single bond at 2 equatorial
+ \putratom{100}{-98}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=26
+ \put(260,80){\line(-5,4){170}}% double bond at 2
+ \put(280,100){\line(-5,4){170}}% double bond at 2
+ \putlatom{100}{200}{\@memberb}% left or right type
+ \else%
+ \yl@xdiff=0
+ \yl@ydiff=26
+ \put(270,90){\line(-5,4){170}}% single bond at 2
+ \putlatom{100}{200}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Drawing of inverse chair-form cyclohexanes}
+%
+% The standard skeleton of an inverse chair form of cyclohexane is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ***************************
+% * cyclohexane derivatives *
+% * (inverse chair type) *
+% ***************************
+% The following numbering is adopted in this macro.
+%
+% 6 4
+% * ` 5 *
+% 1 * 2 *
+% ` 3
+%
+% \end{verbatim}
+%
+% The macro |\chairi| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \chairi[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : cyclohexane
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 4,3-double bond
+% d : 4,5-double bond
+% e : 5,6-double bond
+% f : 6,1-double bond
+% \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 8 substitution positions)
+%
+% for n = 1 to 6
+%
+% nD : exocyclic double bond at n-atom
+% nSa : axial single bond at n-atom
+% nSe : equatorial single bond at n-atom
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+%
+% \begin{verbatim}
+% e.g.
+%
+% \chairi[eb]{1D==O;4Se==MeO;4Sa==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\@chairi| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macros |\@chairia| to |\@chairif| described above.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylchairiposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\@chairi}
+% \begin{macro}{\chairi}
+% \begin{macrocode}
+\def\chairi{\@ifnextchar[{\@chairi}{\@chairi[r]}}
+\def\@chairi[#1]#2{%
+\@reset@ylsw%
+\ylchairiposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+ \begin{picture}(1600,800)(-400,-319)
+ \iforigpt \put(-400,-319){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `chairi' origin: (0,0) ---> (400,319)}
+ \fi%
+\fi
+% skeletal bonds
+ \thinlines%
+ \put(0,0){\line(3,4){170}}% % bond 1 to 6
+ \put(170,226){\line(3,-1){403}}% % 6 to 5
+ \put(573,91){\line(3,1){270}}% % 5 to 4
+ \thicklines%
+ \put(843,181){\line(-3,-4){170}}% % 4 to 3
+ \put(673,-46){\line(-3,1){403}}% % 3 to 2
+ \put(0,0){\line(3,1){270}}% % 1 to 2
+ \thinlines%
+% inner double bonds
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic bonds
+\else \if\member c%%%a%
+ \put(767,139){\line(-3,-4){110}}% % double bond 3 to 4
+\else \if\member b%%%d%%%b%
+ \put(640,-5){\line(-3,1){343}}% % 4 to 5
+\else \if\member a%%%e%%%%c%
+ \put(240,111){\line(-3,-1){190}}% % 5 to 6
+\else \if\member f%%%d%
+ \put(63,40){\line(3,4){110}}% % 6 to 7
+\else \if\member e%%%l%
+ \put(182,187){\line(3,-1){343}}% % 7 to 10
+\else \if\member d%%%k%%%f%
+ \put(768,131){\line(-3,-1){170}}% % 10 to 3
+\fi\fi\fi\fi\fi\fi\fi}%
+% %
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa%0 omit
+ \or \@chairia% subst. on 1
+ \or \@chairib% subst. on 2
+ \or \@chairic% subst. on 3
+ \or \@chairid% subst. on 4
+ \or \@chairie% subst. on 5
+ \or \@chairif% subst. on 6
+\fi %end of ifcase
+\fi\fi%
+}\end{picture}}% %end of \chairi macro
+% End of addition 1994/03/05 SF
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylchairiposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/23}{New ommands for setting substituents} +%
+% \begin{macro}{\ylchairiposition}
+% \begin{macrocode}
+\def\ylchairiposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{-270}\gdef\@yli{-90}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-673}\gdef\@yli{46}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{-843}\gdef\@yli{-181}\global\@ylswtrue% subst. on 4
+ \or\gdef\@ylii{-573}\gdef\@yli{-91}\global\@ylswtrue% subst. on 5
+ \or\gdef\@ylii{-170}\gdef\@yli{-226}\global\@ylswtrue% subst. on 6
+\fi%end of ifcase
+\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Bicycloheptanes}
+% \subsection{Drawing of a flat and vertical type}
+%
+% The flat-and-vertical-type skeleton of bicycloheptanes is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% *************************************
+% * bicyclo[2.2.1]heptane derivatives *
+% * (flat, vertical type) *
+% *************************************
+% The following numbering is adopted in this macro.
+%
+% 1
+% *
+% 6 * * 2
+% | 7 |
+% | |
+% 5 * * 3
+% *
+% 4 <===== the original point
+% \end{verbatim}
+%
+% The macro |\bicyclohepv| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \bicychepv[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% In order to put dimethyl subsitutents on the top position (7),
+% the character `7' is used in the |BONDLIST|. The delocalization
+% of $\pi$-electron can be described with the character `A' written in
+% the |BONDLIST|.
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : bicyclo[2.2.1]heptane
+% 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
+% 7 : 7,7-dimethyl
+% \end{verbatim}
+%
+% The |SUBSLIST| argument takes the standard format of \XyMTeX{}, in which
+% more substitution descriptors are separated from each other
+% by a semicolon.
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents (max 12 substitution positions)
+%
+% for n = 1 to 7
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specifed) single bond at n-atom
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+%
+% \begin{verbatim}
+% e.g.
+%
+% \bicychepv{1==Cl;2==F}
+% \bicychepv[c]{1==Cl;4==F;2==CH$_{3}$}
+% \bicychepv[eb]{1D==O;4==Me;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\@bicyclohepv| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macro |\setsixringv| defined in chemstr.sty of \XyMTeX{} system.
+% \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}}
+%
+% \begin{macro}{\@bicyclohepv}
+% \begin{macro}{\bicyclohepv}
+% \begin{macrocode}
+\def\bicychepv{\@ifnextchar[{\@bicychepv}{\@bicychepv[r]}}
+\def\@bicychepv[#1]#2{%
+\@reset@ylsw%
+\ylposition{#2}{0}{0}{7}{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+ \begin{picture}(800,880)(-400,-240)
+ \iforigpt \put(-400,-240){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `bicychepv' origin: (0,0) ---> (400,240)}
+\fi
+ \fi%
+ \put(0,406){\line(-5,-3){171}}% %bond 1-6
+ \put(0,406){\line(5,-3){171}}% %bond 1-2
+ \put(0,0){\line(-5,3){171}}% %bond 4-5
+ \put(0,0){\line(5,3){171}}% %bond 4-3
+ \put(171,103){\line(0,1){200}}% %bond 3-2
+ \put(-171,103){\line(0,1){200}}% %bond 5-6
+{\thicklines%
+ \put(0,0){\line(1,4){51}}% %bond 4-7
+ \put(0,406){\line(1,-4){51}}}% %bond 1-7
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic double bonds
+\else \if\member a%
+ \put(6,364){\line(5,-3){126}}% %double bond 1-2
+\else \if\member b%
+ \put(138,129){\line(0,1){148}}% %double bond 3-2
+\else \if\member c%
+ \put(6,42){\line(5,3){126}}% %double bond 4-3
+\else \if\member d%
+ \put(-6,42){\line(-5,3){126}}% %double bond 4-5
+\else \if\member e%
+ \put(-138,129){\line(0,1){148}}% %double bond 5-6
+\else \if\member f%
+ \put(-6,364){\line(-5,-3){126}}% %double bond 1-6
+\else \if\member 7%
+ {\thicklines%
+ \put(51,204){\line(-1,0){70}}% %7,7-dimethyl
+ \put(51,204){\line(1,0){70}}}%
+\else \if\member A%aromatic circle
+ \put(0,203){\circle{240}}% %circle
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% %
+\setsixringv{#2}{0}{0}{7}{0}
+\end{picture}} %end of \bicychepv macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Drawing of a flat and horizontal type}
+%
+% The flat-and-horizontal-type skeleton of bicycloheptanes is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% *************************************
+% * bicyclo[2.2.1]heptane derivatives *
+% * (flat, horizontal type) *
+% *************************************
+% The following numbering is adopted in this macro.
+%
+% 2 3
+% -----
+% * *
+% the original point ===> 1 * 7 * 4
+% (0,0) * *
+% -----
+% 6 5
+% \end{verbatim}
+%
+% The macro |\bicycloheph| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \bicycheph[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% In order to put dimethyl subsitutents on the top position (7),
+% the character `7' is used in the |BONDLIST|. The delocalization
+% of $\pi$-electron can be described with the character `A' written in
+% the |BONDLIST|.
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : bicyclo[2.2.1]heptane
+% 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
+% 7 : 7,7-dimethyl
+% \end{verbatim}
+%
+% The |SUBSLIST| argument takes the standard format of \XyMTeX{}, in which
+% more substitution descriptors are separated from each other
+% by a semicolon.
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents (max 8 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 specifed) single bond at n-atom
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+%
+% \begin{verbatim}
+% e.g.
+%
+% \bicycheph{1==Cl;2==F}
+% \bicycheph[c]{1==Cl;4==F;2==CH$_{3}$}
+% \bicycheph[eb]{1D==O;4==Me;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\@bicycloheph| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macro |\setsixringh| defined in chemstr.sty of \XyMTeX{} system.
+% \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}}
+%
+% \begin{macro}{\@bicycloheph}
+% \begin{macro}{\bicycloheph}
+% \begin{macrocode}
+\def\bicycheph{\@ifnextchar[{\@bicycheph}{\@bicycheph[r]}}
+\def\@bicycheph[#1]#2{%
+\@reset@ylsw%
+\ylpositionh{#2}{0}{0}{7}{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+ \begin{picture}(880,800)(-240,-400)
+ \iforigpt \put(-240,-400){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `bicycheph' origin: (0,0) ---> (240,400)}
+ \fi%
+\fi
+ \put(0,0){\line(3,5){103}} %bond 1-2
+ \put(0,0){\line(3,-5){103}} %bond 1-6
+ \put(406,0){\line(-3,5){103}} %bond 4-3
+ \put(406,0){\line(-3,-5){103}} %bond 4-3
+ \put(103,171){\line(1,0){200}} %bond 2-3
+ \put(103,-171){\line(1,0){200}} %bond 6-5
+{\thicklines%
+ \put(0,0){\line(4,1){203}}% %bond 4-7
+ \put(406,0){\line(-4,1){203}}}% %bond 1-7
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic double bonds
+\else \if\member a%
+ \put(42,6){\line(3,5){78}} %double bond 1-2
+\else \if\member b%
+ \put(129,138){\line(1,0){148}} %double bond 2-3
+\else \if\member c%
+ \put(364,6){\line(-3,5){78}} %double bond 4-3
+\else \if\member d%
+ \put(364,-6){\line(-3,-5){78}} %double bond 4-5
+\else \if\member e%
+ \put(129,-138){\line(1,0){148}} %double bond 6-5
+\else \if\member f%
+ \put(42,-6){\line(3,-5){78}} %double bond 1-6
+\else \if\member 7%
+ {\thicklines%
+ \put(204,51){\line(0,-1){70}}% %7,7-dimethyl
+ \put(204,51){\line(0,1){70}}}%
+\else \if\member A%aromatic circle
+ \put(203,0){\circle{240}} %circle
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+% %
+\setsixringh{#2}{0}{0}{7}{0}
+\end{picture}} %end of \bicycheph macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Drawing of a stereo type}
+%
+% \subsubsection{Macros for setting substituents}
+%
+% Macros |\@borna| to |\@borng| are used to set substituents
+% on each position of bornane.
+%
+% \begin{macro}{\@borna}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% ***********************************************
+% * setting bonds and substituents for bornanes *
+% * (bicycloe[2.2.1]heptane derivatives) *
+% ***********************************************
+% %%%%%%%%%%%%%%%
+% % subst. on 1 %
+% %%%%%%%%%%%%%%%
+\def\@borna{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=8
+ \yl@ydiff=3
+ \put(318,247){\line(2,5){40}}% % single bond 1
+ \putratom{350}{350}{\@memberb}% % right type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=8
+ \yl@ydiff=3
+ \put(318,247){\line(2,5){40}}% % single bond 1
+ \putratom{350}{350}{\@memberb}% % right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=8
+ \yl@ydiff=3
+ \put(318,247){\line(2,5){40}}% % single bond 1
+ \putratom{350}{350}{\@memberb}% % right type
+ \fi\fi\fi%
+ \else%
+ \yl@xdiff=8
+ \yl@ydiff=3
+ \put(318,247){\line(2,5){40}}% % single bond 1
+ \putratom{350}{350}{\@memberb} % right type
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@bornb}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 2 %
+% %%%%%%%%%%%%%%%
+\def\@bornb{%
+ \begin{picture}(200,200)(0,0)
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=20
+ \put(0,0){\line(5,2){160}}%
+ \putratom{170}{44}{\@memberb}% % left type
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=0
+ \yl@ydiff=-5
+ \putratom{140}{115}{\@memberb}% % right type
+ {%
+ \thicklines%
+ \put(0,0){\line(4,3){140}}% % endo (a)
+ }%
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putratom{150}{-86}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(5,-2){140}}% % exo (b)
+ }{{\thicklines%
+ \dottedline{20}(0,0)(140,-56)}}%
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(5,-2){140}}% % endo (a)
+ \putratom{150}{-86}{\@memberb}% % right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=0
+ \yl@ydiff=-10
+ \put(0,0){\line(4,3){140}}% % exo (b)
+ \putratom{140}{115}{\@memberb}% % right type
+ \fi\fi\fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-10
+ \yl@ydiff=20
+ \put(-10,-15){\line(5,2){160}}%
+ \put(-5,15){\line(5,2){160}}%
+ \putratom{170}{44}{\@memberb}% % right type
+ \else \if\@tmpb A%alpha single bond
+ \yl@xdiff=-10
+ \yl@ydiff=20
+ \putratom{170}{44}{\@memberb}% % right type
+ {%
+ \thicklines%
+ \put(0,0){\line(5,2){160}}%
+ }%
+ \else \if\@tmpb B%beta single bond
+ \yl@xdiff=-10
+ \yl@ydiff=20
+ \putratom{170}{44}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(5,2){160}}%
+ }{{\thicklines%
+ \dottedline{20}(0,0)(160,64)}}%
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=20
+ \put(0,0){\line(5,2){160}}%
+ \putratom{170}{44}{\@memberb}% % right type
+ \fi\fi\fi\fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@bornc}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 3 %
+% %%%%%%%%%%%%%%%
+\def\@bornc{%
+ \begin{picture}(200,200)(0,0)
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \put(0,0){\line(5,-2){140}}%
+ \putratom{150}{-86}{\@memberb}% % right type
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \putratom{150}{26}{\@memberb}% % right type
+ {%
+ \thicklines%
+ \put(0,0){\line(5,2){140}}% % endo (a)
+ }%
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=0
+ \yl@ydiff=40
+ \putratom{140}{-145}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(4,-3){140}}% % exo (b)
+ }{{\thicklines%
+ \dottedline{20}(0,0)(140,-105)}}%
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=0
+ \yl@ydiff=40
+ \put(0,0){\line(4,-3){140}}% % endo (a)
+ \putratom{140}{-145}{\@memberb}% % right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \put(0,0){\line(5,2){140}}% % exo (b)
+ \putratom{150}{26}{\@memberb}% % right type
+ \fi\fi\fi\fi\fi
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=50
+ \put(10,15){\line(5,-2){160}}%
+ \put(5,-15){\line(5,-2){160}}%
+ \putratom{170}{-124}{\@memberb}% % right type
+ \else \if\@tmpb A%alpha single bond
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \putratom{150}{-86}{\@memberb}% % right type
+ {%
+ \thicklines%
+ \put(0,0){\line(5,-2){140}}% % endo (a)
+ }%
+ \else \if\@tmpb B%beta single bond
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \putratom{150}{-86}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(5,-2){140}}% % exo (b)
+ }{{\thicklines%
+ \dottedline{20}(0,0)(140,-56)}}%
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=20
+ \put(0,0){\line(5,2){160}}%
+ \putratom{170}{44}{\@memberb}% % right type
+ \fi\fi\fi\fi%
+\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@bornd}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 4 %
+% %%%%%%%%%%%%%%%
+\def\@bornd{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=30
+ \yl@ydiff=87
+ \put(237,47){\line(-2,-5){40}}% % single bond 4
+ \putlratom{167}{-140}{\@memberb}% % left & right type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=30
+ \yl@ydiff=87
+ \put(237,47){\line(-2,-5){40}}% % single bond 4
+ \putlratom{167}{-140}{\@memberb}% % left & right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=30
+ \yl@ydiff=87
+ \put(237,47){\line(-2,-5){40}}% % single bond 4
+ \putlratom{167}{-140}{\@memberb}% % left & right type
+ \fi\fi\fi%
+ \else%
+ \yl@xdiff=30
+ \yl@ydiff=87
+ \put(237,47){\line(-2,-5){40}}% % single bond 4
+ \putlratom{167}{-140}{\@memberb}% % left & right type
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@borne}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 5 %
+% %%%%%%%%%%%%%%%
+\def\@borne{%
+ \begin{picture}(200,200)(0,0)
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(-5,-2){140}}%
+ \putlatom{-150}{-86}{\@memberb}% % left type
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{-150}{26}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,0){\line(-5,2){140}}% % endo (a)
+ }%
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=0
+ \yl@ydiff=40
+ \putlatom{-140}{-145}{\@memberb}% % left type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-4,-3){140}}% % exo (b)
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-140,-105)}}%
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=0
+ \yl@ydiff=30
+ \put(0,0){\line(-4,-3){140}}% % endo (a)
+ \putlatom{-140}{-145}{\@memberb}% % left type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(-5,2){140}}% % exo (b)
+ \putlatom{-150}{26}{\@memberb}% % left type
+ \fi\fi\fi\fi\fi
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=64
+ \put(-10,15){\line(-5,-2){160}}%
+ \put(-5,-15){\line(-5,-2){160}}%
+ \putlatom{-170}{-124}{\@memberb}% % left type
+ \else \if\@tmpb A%alpha single bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{-150}{-86}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,0){\line(-5,-2){140}}% % endo (a)
+ }%
+ \else \if\@tmpb B%beta single bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{-150}{-86}{\@memberb}% % left type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-5,-2){140}}% % exo (b)
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-140,-56)}}%
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=20
+ \put(0,0){\line(-5,2){160}}%
+ \putlatom{-170}{44}{\@memberb}% % left type
+ \fi\fi\fi\fi%
+\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@bornf}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 6 %
+% %%%%%%%%%%%%%%%
+\def\@bornf{%
+ \begin{picture}(200,200)(0,0)
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(-5,2){160}}%
+ \putlatom{-170}{44}{\@memberb}% % left type
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=10
+ \yl@ydiff=-10
+ \putlatom{-140}{115}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,0){\line(-4,3){140}}% % endo (a)
+ }%
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=0
+ \yl@ydiff=30
+ \putlatom{-150}{-86}{\@memberb}% % left type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-5,-2){140}}% % exo (b)
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-140,-56)}}%
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(-5,-2){140}}% % endo (a)
+ \putlatom{-150}{-86}{\@memberb}% % left type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=0
+ \yl@ydiff=-10
+ \put(0,0){\line(-4,3){140}}% % exo (b)
+ \putlatom{-140}{115}{\@memberb}% % left type
+ \fi\fi\fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=20
+ \put(10,-15){\line(-5,2){160}}%
+ \put(5,15){\line(-5,2){160}}%
+ \putlatom{-170}{44}{\@memberb}% % left type
+ \else \if\@tmpb A%alpha single bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{-170}{44}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,0){\line(-5,2){160}}%
+ }%
+ \else \if\@tmpb B%beta single bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{-170}{44}{\@memberb}% % left type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-5,2){160}}%
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-160,64)}}%
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=20
+ \put(0,0){\line(-5,2){160}}%
+ \putlatom{-170}{44}{\@memberb}% % left type
+ \fi\fi\fi\fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@borng}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 7 %
+% %%%%%%%%%%%%%%%
+\def\@borng{%
+ \begin{picture}(200,200)(0,0)
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=40
+ \yl@ydiff=-20
+ \put(0,0){\line(0,1){160}}%
+ \putlratom{-40}{180}{\@memberb}% % left & right type
+ \else\if\@tmpc a%(a) left
+ \yl@xdiff=0
+ \yl@ydiff=-10
+ \put(0,0){\line(-4,3){140}}% % left (a)
+ \putlatom{-140}{115}{\@memberb}% % left type
+ \else\if\@tmpc b%(b) right
+ \yl@xdiff=0
+ \yl@ydiff=-10
+ \put(0,0){\line(4,3){140}}% % right (b)
+ \putratom{140}{115}{\@memberb}% % right type
+ \fi\fi\fi%\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=40
+ \yl@ydiff=-20
+ \put(-10,0){\line(0,1){160}}%
+ \put(10,0){\line(0,1){160}}%
+ \putlratom{-40}{180}{\@memberb}% % left & right type
+ \else%
+ \yl@xdiff=40
+ \yl@ydiff=-20
+ \put(0,0){\line(0,1){160}}%
+ \putlratom{-40}{180}{\@memberb}% % left & right type
+ \fi\fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Drawing of borane derivatives}
+%
+% The stereo-type skeleton of bicycloheptanes is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ***********************************************
+% * bornane derivatives *
+% * (bicycloe[2.2.1]heptane derivatives) *
+% ***********************************************
+% The following numbering is adopted in this macro.
+%
+% 7 g
+% f / `
+% _ / - 1_ a
+% e 6 / h - 2
+% * / *
+% 5 - 4 * b
+% d c` 3
+%
+% \end{verbatim}
+%
+% The macro |\bornane| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \bornane[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to h, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : bicyclo[2.2.1]heptane
+% 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
+% g : 1,7-double bond
+% h : 4,7-double bond
+% \end{verbatim}
+%
+% The |SUBSLIST| argument takes the standard format of \XyMTeX{}, in which
+% more substitution descriptors are separated from each other
+% by a semicolon.
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents (max 7 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 single bond at n-atom
+% nSb : beta single bond at n-atom
+% \end{verbatim}
+%
+% The 7-position of a bornane skeleton cannot be specified by
+% capital characters `A' and `B'.
+% \begin{verbatim}
+% for n = 7 (bridge position)
+%
+% nD : exocyclic double bond at 7-atom
+% n or nS : exocyclic single bond at 7-atom
+% nSa : left single bond at 7-atom
+% nSb : right single bond at 7-atom
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+%
+% \begin{verbatim}
+% e.g.
+%
+% \bornane{1==N}{1==Cl;2==F}
+% \bornane[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \bornane[eb]{1==N}{1D==O;4==MeO;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\@bicycloheph| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macro |\@borna| to |\@borng| defined in chemstr.sty of \XyMTeX{}
+% system.
+%
+% \changes{v1.01b}{1998/10/08}{The drawing are of \cs{bornane}
+% has been changed by SF.}
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylbornaneposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\@bornane}
+% \begin{macro}{\bornane}
+% \begin{macrocode}
+
+\def\bornane{\@ifnextchar[{\@bornane}{\@bornane[r]}}
+\def\@bornane[#1]#2{%
+\@reset@ylsw%
+\ylbornaneposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+% \begin{picture}(1400,1000)(-200,-240)
+ \begin{picture}(1000,1000)(-200,-240)%changed by SF 1998/09/26
+ \iforigpt \put(-200,-240){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `bornane' origin: (0,0) ---> (200,240)}
+ \fi%
+\fi
+% skeletal bonds
+ \thicklines%
+ \put(0,0){\line(5,1){237}}% % bond 5 to 4 (d)
+ \put(237,47){\line(5,-2){225}}% % bond 4 to 3 (c)
+ \put(237,47){\line(0,1){400}}% % front part of bridge (h)
+ \thinlines%
+ \put(462,-43){\line(2,5){80}}% % bond 3 to 2 (b)
+ \put(543,157){\line(-5,2){225}}% % bond 2 to 1 (a)
+ \put(318,247){\line(-5,-1){237}}% % bond 1 to 6 (f)
+ \put(80,200){\line(-2,-5){80}}% % bond 6 to 5 (e)
+ \put(318,247){\line(-2,5){80}}% % back part of bridge (g)
+% inner double bond
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic bonds
+\else \if\member a%%%%
+ \put(513,127){\line(-5,2){180}}% % bond 2 to 1
+\else \if\member b%%%%
+ \put(446,-3){\line(2,5){60}}% % bond 3 to 2
+\else \if\member c%%%%
+ \put(267,77){\line(5,-2){180}}% % bond 4 to 3
+\else \if\member d%%%%
+ \put(40,42){\line(5,1){180}}% % double bond 5 to 4
+\else \if\member e%%%
+ \put(100,180){\line(-2,-5){60}}% % bond 6 to 5
+\else \if\member f%
+ \put(288,207){\line(-5,-1){180}}% % bond 1 to 6
+\else \if\member g%
+ \put(288,260){\line(-2,5){40}}% % back part of bridge (g)
+\else \if\member h%
+ \put(257,77){\line(0,1){290}}% % front part of bridge (h)
+\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa%0 omit
+ \or \@borna% subst. on 1
+ \or \put(543,157){\@bornb}% subst. on 2
+ \or \put(462,-43){\@bornc}% subst. on 3
+ \or \@bornd% subst. on 4
+ \or \put(0,0){\@borne}% subst. on 5
+ \or \put(80,200){\@bornf}% subst. on 6
+ \or \put(237,440){\@borng}% subst. on 7
+\fi%end of ifcase
+\fi\fi%
+}\end{picture}\iniatom\iniflag} %end of \bornane macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylbornaneposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/23}{New ommands for setting substituents} +%
+% \begin{macro}{\ylbornaneposition}
+% \begin{macrocode}
+\def\ylbornaneposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{-318}\gdef\@yli{-247}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{-543}\gdef\@yli{-157}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-462}\gdef\@yli{43}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{-237}\gdef\@yli{-47}\global\@ylswtrue% subst. on 4
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 5
+ \or\gdef\@ylii{-80}\gdef\@yli{-200}\global\@ylswtrue% subst. on 6
+ \or\gdef\@ylii{-237}\gdef\@yli{-440}\global\@ylswtrue% subst. on 7
+\fi%end of ifcase
+\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Adamantanes}
+%
+% \subsection{Vertical drawing}
+%
+% The macros |\@adamanea| to |\@adamanej| are used to
+% set substituents on each edge of an adamantane skeleton
+% drawn by the |\adamantane| commands.
+% \changes{v1.02}{1998/10/24}{The macros \cs{@adamanea} to \cs{@adamanej}
+% are separated from the original definition of \cs{adamantane}.}
+%
+% \begin{macro}{\@adamanea}
+% \begin{macro}{\@adamaneb}
+% \begin{macro}{\@adamanec}
+% \begin{macro}{\@adamaned}
+% \begin{macro}{\@adamanee}
+% \begin{macro}{\@adamanef}
+% \begin{macro}{\@adamaneg}
+% \begin{macro}{\@adamaneh}
+% \begin{macro}{\@adamanei}
+% \begin{macro}{\@adamanej}
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 1 %
+% %%%%%%%%%%%%%%%
+\def\@adamanea{%
+ \yl@xdiff=12
+ \yl@ydiff=21
+ \put(-360,720){\hbox to0pt{\hss \@memberb}}% %atom 1
+ \if\@tmpb a%
+ \put(-240,660){\line(-4,3){108}}% %bond 1
+ \else \ifx\@tmpb\empty%
+ \put(-240,660){\line(-4,3){108}}% %bond 1
+ \fi\fi}%
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 2 %
+% %%%%%%%%%%%%%%%
+\def\@adamaneb{%
+ \if\@tmpb a%
+ \yl@xdiff=6
+ \yl@ydiff=-16
+ \put(0,780){\line(1,4){26}}% %bond 2-ax
+ \put(20,900){\hbox to0pt{\@memberb \hss}}% %atom 2-ax
+ \else \if\@tmpb b%
+ \yl@xdiff=-6
+ \yl@ydiff=-16
+ \put(0,780){\line(-1,4){26}}% %bond 2-eq
+ \put(-20,900){\hbox to0pt{\hss \@memberb}}% %atom 2-eq
+ \else \ifx\@tmpb\empty%
+ \yl@xdiff=42
+ \yl@ydiff=-22
+ \put(-42,910){\hbox to0pt{\hss \@memberb}}% %atom 2
+ \put(0,780){\line(0,1){108}}% %bond 2
+ \else \if\@tmpb D%
+ \yl@xdiff=42
+ \yl@ydiff=-22
+ \putlratom{-42}{910}{\@memberb}% %atom 2
+ \put(-12,780){\line(0,1){108}}% %double bond 2
+ \put(12,780){\line(0,1){108}}% %double bond 2
+ \fi\fi\fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 3 %
+% %%%%%%%%%%%%%%%
+\def\@adamanec{%
+ \yl@xdiff=-12
+ \yl@ydiff=21
+ \put(360,720){\hbox to0pt{\@memberb \hss}}% %atom 3
+% \if\@tmpb S%
+ \if\@tmpb a%1998/10/24 by SF
+ \put(240,660){\line(4,3){108}}% %bond 3
+ \else \ifx\@tmpb\empty%
+ \put(240,660){\line(4,3){108}}% %bond 3
+ \fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 4 %
+% %%%%%%%%%%%%%%%
+\def\@adamaned{%
+ \if\@tmpb a%
+ \yl@xdiff=-17
+ \yl@ydiff=33
+ \put(300,420){\line(4,-3){103}}% %bond 4-ax
+ \put(420,310){\hbox to0pt{\@memberb \hss}}% %atom 4-ax
+ \else \if\@tmpb b%
+ \yl@xdiff=26
+ \yl@ydiff=-26
+ \put(300,420){\line(1,4){26}}% %bond 4-eq
+ \put(300,540){\hbox to0pt{\@memberb \hss}}% %atom 4-eq
+ \else \ifx\@tmpb\empty%
+ \yl@xdiff=-17
+ \yl@ydiff=33
+ \put(300,420){\line(4,-3){103}}% %bond 4
+ \put(420,310){\hbox to0pt{\@memberb \hss}}% %atom 4
+ \else \if\@tmpb D%
+ \yl@xdiff=-17
+ \yl@ydiff=33
+ \put(296,432){\line(5,-3){103}}% %double bond 4
+ \put(292,408){\line(5,-3){103}}% %double bond 4
+ \put(420,310){\hbox to0pt{\@memberb \hss}}% %atom 4
+ \fi\fi\fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 5 %
+% %%%%%%%%%%%%%%%
+\def\@adamanee{%
+ \yl@xdiff=20
+ \yl@ydiff=110
+% \if\@tmpb S%
+ \if\@tmpb a%1998/10/24 by SF
+ \put(60,240){\line(1,-5){30}}% %bond 5
+ \put(70,-20){\hbox to0pt{\@memberb \hss}}% %atom 5
+ \else \ifx\@tmpb\empty%
+ \put(60,240){\line(1,-5){30}}% %bond 5
+ \put(70,-20){\hbox to0pt{\@memberb \hss}}% %atom 5
+ \fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 6 %
+% %%%%%%%%%%%%%%%
+\def\@adamanef{%
+ \if\@tmpb a%
+ \yl@xdiff=33
+ \yl@ydiff=103
+ \put(0,0){\line(4,-3){103}}% %bond 6-ax
+ \put(70,-180){\hbox to0pt{\@memberb \hss}}% %atom 6-ax
+ \else \if\@tmpb b%
+ \yl@xdiff=-33
+ \yl@ydiff=103
+ \put(0,0){\line(-4,-3){103}}% %bond 6-eq
+ \put(-70,-180){\hbox to0pt{\hss \@memberb}}% %atom 6-eq
+ \else \ifx\@tmpb\empty%
+ \yl@xdiff=22
+ \yl@ydiff=94
+ \put(0,0){\line(0,-1){108}}% %bond 6
+ \put(-22,-202){\hbox to0pt{\hss \@memberb}}% %atom 6
+ \else \if\@tmpb D%
+ \yl@xdiff=42
+ \yl@ydiff=94
+ \put(-12,0){\line(0,-1){108}}% %double bond 6
+ \put(12,0){\line(0,-1){108}}% %double bond 6
+ \putlratom{-42}{-202}{\@memberb}% %atom 6
+ \fi\fi\fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 7 %
+% %%%%%%%%%%%%%%%
+\def\@adamaneg{%
+ \yl@xdiff=-20
+ \yl@ydiff=110
+% \if\@tmpb S%
+ \if\@tmpb a%1998/10/24 by SF
+ \put(-60,240){\line(-1,-5){30}}% %bond 7
+ \put(-70,-20){\hbox to0pt{\hss \@memberb}}% %atom 7
+ \else \ifx\@tmpb\empty%
+ \put(-60,240){\line(-1,-5){30}}% %bond 7
+ \put(-70,-20){\hbox to0pt{\hss \@memberb}}% %atom 7-eq
+ \fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 8 %
+% %%%%%%%%%%%%%%%
+\def\@adamaneh{%
+ \if\@tmpb a%
+ \yl@xdiff=17
+ \yl@ydiff=33
+ \put(-300,420){\line(-4,-3){103}}% %bond 8-ax
+ \put(-420,310){\hbox to0pt{\hss \@memberb}}% %atom 8-ax
+ \else \if\@tmpb b%
+ \yl@xdiff=-26
+ \yl@ydiff=-16
+ \put(-300,420){\line(-1,4){26}}% %bond 8-eq
+ \put(-300,540){\hbox to0pt{\hss \@memberb}}% %atom 8-eq
+ \else \ifx\@tmpb\empty%
+ \yl@xdiff=17
+ \yl@ydiff=33
+ \put(-300,420){\line(-4,-3){103}}% %bond 8
+ \put(-420,310){\hbox to0pt{\hss \@memberb}}% %atom 8
+ \else \if\@tmpb D%
+ \yl@xdiff=17
+ \yl@ydiff=50
+ \put(-300,432){\line(-5,-3){103}}% %double bond 8
+ \put(-303,408){\line(-5,-3){103}}% %double bond 8
+ \put(-420,310){\hbox to0pt{\hss \@memberb}}% %atom 8
+ \fi\fi\fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 9 %
+% %%%%%%%%%%%%%%%
+\def\@adamanei{%
+ \if\@tmpb a%
+ \yl@xdiff=-43
+ \yl@ydiff=93
+ \put(-180,420){\line(-4,-3){103}}% %bond 9-ax
+ \put(-240,250){\hbox to0pt{\hss \@memberb}}% %atom 9-ax
+ \else \if\@tmpb b%
+ \yl@xdiff=26
+ \yl@ydiff=-16
+ \put(-180,420){\line(1,4){26}}% %bond 9-eq
+ \put(-180,540){\hbox to0pt{\@memberb \hss}}% %atom 9-eq
+ \else \ifx\@tmpb\empty%
+ \yl@xdiff=17
+ \yl@ydiff=93
+ \put(-180,420){\line(-4,-3){103}}% %bond 9
+ \put(-300,250){\hbox to0pt{\hss \@memberb}}% %atom 9
+ \else \if\@tmpb D%
+ \yl@xdiff=17
+ \yl@ydiff=113
+ \put(-183,432){\line(-5,-3){103}}% %double bond 9
+ \put(-180,408){\line(-5,-3){103}}% %double bond 9
+ \put(-300,250){\hbox to0pt{\hss \@memberb}}% %atom 9
+ \fi\fi\fi\fi}
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/24}{A new command for setting substituents} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%%
+% % subst. on 10 %
+% %%%%%%%%%%%%%%%%
+\def\@adamanej{%
+ \if\@tmpb a%
+ \yl@xdiff=43
+ \yl@ydiff=92
+ \put(180,420){\line(4,-3){103}}% %bond 10-ax
+ \put(240,250){\hbox to0pt{\@memberb \hss}}% %atom 10-ax
+ \else \if\@tmpb b%
+ \yl@xdiff=-26
+ \yl@ydiff=-16
+ \put(180,420){\line(-1,4){26}}% %bond 10-eq
+ \put(180,540){\hbox to0pt{\hss \@memberb}}% %atom 10-eq
+ \else \ifx\@tmpb\empty%
+ \yl@xdiff=43
+ \yl@ydiff=92
+ \put(180,420){\line(4,-3){103}}% %bond 10
+ \put(240,250){\hbox to0pt{\@memberb \hss}}% %atom 10
+ \else \if\@tmpb D%
+ \yl@xdiff=3
+ \yl@ydiff=112
+ \put(176,432){\line(5,-3){103}}% %double bond 10
+ \put(172,408){\line(5,-3){103}}% %double bond 10
+ \put(280,250){\hbox to0pt{\@memberb \hss}}% %atom 10
+ \fi\fi\fi\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The stereo-type skeleton of adamantane is selected
+% to have the following specification. The |\adamantane|
+% command prints a vertical-type formula in which two bridge carbons
+% are placed at the top and the bottom.
+%
+% \begin{verbatim}
+% *************************************************
+% * For preparing adamantane derivatives *
+% * with 4 substituents on bridgehead positions *
+% * (1, 3, 5 and 7) *
+% * with 12 substituents on bridge positions *
+% * (2, 4, 6, 8, 9, 10) *
+% *************************************************
+% \end{verbatim}
+%
+% The macro |\adamantane| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \adamantane[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The adamantane skeleton scarcely takes an inner (endcyclic) double bond.
+% Hence we have
+% \begin{verbatim}
+% BONDLIST: not effective
+% \end{verbatim}
+%
+% The |SUBSLIST| argument takes the standard format of \XyMTeX{}, in which
+% more substitution descriptors are separated from each other
+% by a semicolon.
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents (max 10 substitution positions)
+%
+% for n = 1, 3, 5, and 7 (bridgeheads)
+%
+% n or na : exocyclic single bond at n-atom
+%
+% for n = 2, 4, 6, 8, 9, and 10 (bridges)
+%
+% na : exocyclic single bond at n-atom (axial)
+% nb : exocyclic single bond at n-atom (equatorial)
+% nD : exocyclic double bond at n-atom (2 and 6)
+%
+% \end{verbatim}
+%
+% For numbers larger than 9 (two digits), you should designate
+% the |SUBSLIST| as, e.g.,
+% \begin{verbatim}
+% {{10}a}==Cl; ...
+% \end{verbatim}
+%
+% The definition of |\@adamantane| uses a picture environment, in which
+% both bonds are substituents are put directly.
+% \changes{v1.02}{1998/10/31}{Adding \cs{yladamanposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\@adamantane}
+% \begin{macro}{\adamantane}
+% \begin{macrocode}
+% \changes{v1.02}{1998/10/24}{The macros \cs{@adamanea} to \cs{@adamanej}
+% are separated from the original definition of \cs{adamantane}.}
+\def\adamantane{\@ifnextchar[{\@mantane}{\@damantane[Z]}}
+\def\@damantane[#1]#2{%
+\@reset@ylsw%
+\yladamanposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+ \begin{picture}(1100,1300)(-550,-300)
+ \iforigpt \put(-550,-300){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `adamantane' origin: (0,0) ---> (550,300)}
+ \fi%
+\fi
+%bonds for an adamantane skeleton
+ \put(0,0){\line(-1,4){60}}% %bond 6-7
+ \put(0,780){\line(2,-1){240}}% %bond 2-3
+ \put(0,780){\line(-2,-1){240}}% %bond 2-1
+ \put(-60,240){\line(-4,3){240}}% %bond 7-8
+ \put(-300,420){\line(1,4){60}}% %bond 8-1
+ \put(240,660){\line(-1,-4){60}}% %bond 3-10
+ \put(-60,240){\line(4,3){240}}% %bond 10-7
+{\thicklines%
+ \put(300,420){\line(-1,4){60}}% %bond 4-3
+ \put(-240,660){\line(1,-4){60}}% %bond 1-9
+ \put(0,0){\line(1,4){60}}% %bond 6-5
+ \put(60,240){\line(4,3){240}}% %bond 5-4
+ \put(60,240){\line(-4,3){240}}% %bond 5-9
+}%
+%substituents
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}\relax%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa%0 omit
+\or\@adamanea% subst. on 1
+\or\@adamaneb% subst. on 2
+\or\@adamanec% subst. on 3
+\or\@adamaned% subst. on 4
+\or\@adamanee% subst. on 5
+\or\@adamanef% subst. on 6
+\or\@adamaneg% subst. on 7
+\or\@adamaneh% subst. on 8
+\or\@adamanei% subst. on 9
+\or\@adamanej% subst. on 10
+\fi%the end of ifcase
+\fi\fi}%
+\end{picture}} %end of \adamantane macro%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\yladamanposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/23}{New commands for setting substituents} +%
+% \begin{macro}{\yladamanposition}
+% \begin{macrocode}
+\def\yladamanposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{240}\gdef\@yli{-660}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{0}\gdef\@yli{-780}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-240}\gdef\@yli{-660}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{-300}\gdef\@yli{-420}\global\@ylswtrue% subst. on 4
+ \or\gdef\@ylii{-60}\gdef\@yli{-240}\global\@ylswtrue% subst. on 5
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 6
+ \or\gdef\@ylii{60}\gdef\@yli{-240}\global\@ylswtrue% subst. on 7
+ \or\gdef\@ylii{300}\gdef\@yli{-420}\global\@ylswtrue% subst. on 8
+ \or\gdef\@ylii{180}\gdef\@yli{-420}\global\@ylswtrue% subst. on 9
+ \or\gdef\@ylii{-180}\gdef\@yli{-420}\global\@ylswtrue% subst. on 10
+\fi%end of ifcase
+\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Horizontal drawing}
+%
+% The stereo-type skeleton of adamantane is selected
+% to have the following specification. The |\hadamantane|
+% command prints a horizontal-type formula in which one bridge-head carbon
+% is put at the top position and a chair-form cyclohexane moiety is
+% placed at the bottom position.
+%
+% \begin{verbatim}
+% ********************************************
+% * adamantane derivatives (horizontal type) *
+% ********************************************
+% The following numbering is adopted in this macro.
+%
+% 1
+% h // `
+% //i ` a
+% 89 `
+% g|| 2
+% ||j | b
+% f 7| l k 3
+% * | ` 10 *
+% 6 * 5 * c
+% e d` 4
+% \end{verbatim}
+%
+% \begin{verbatim}
+% *************************************************
+% * For preparing adamantane derivatives *
+% * with 4 substituents on bridgehead positions *
+% * (1, 3, 5 and 7) *
+% * with 12 substituents on bridge positions *
+% * (2, 4, 6, 8, 9, 10) *
+% *************************************************
+% \end{verbatim}
+%
+% The macro |\hadamantane| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \hadamantane[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The adamantane skeleton scarcely takes an inner (endcyclic) double bond.
+% However, we can designate |BONDLIST|. (This point is different from the
+% specification of the |\adamantane| command.
+%
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : adamantane skeleton
+% a : 1,2-double bond
+% b : 2,3-double bond
+% c : 3,4-double bond
+% d : 4,5-double bond
+% e : 5,6-double bond
+% f : 6,7-double bond
+% g : 7,8-double bond
+% h : 8,1-double bond
+% i : 9,1-double bond
+% j : 5,9-double bond
+% k : 3,10-double bond
+% l : 7,10-double bond
+%
+% \end{verbatim}
+%
+% The |SUBSLIST| argument takes the standard format of \XyMTeX{}, in which
+% more substitution descriptors are separated from each other
+% by a semicolon.
+% \begin{verbatim}
+%
+% SUBSLIST: list of substituents (max 10 substitution positions)
+%
+% for n = 1, 3, 5, and 7 (bridgeheads)
+%
+% n or na : exocyclic single bond at n-atom
+%
+% for n = 2, 4, 6, 8, 9, and 10 (bridges)
+%
+% na : exocyclic single bond at n-atom (axial)
+% nb : exocyclic single bond at n-atom (equatorial)
+% nD : exocyclic double bond at n-atom (2 and 6)
+%
+% \end{verbatim}
+%
+% Moreover, bond modifieer used for chair-form cyclohexanes
+% such as $n$Sa and $n$Se (see above) can be also used in the |SUBSLIST|
+% of the |\hdadamantane| command.
+%
+% For numbers larger than 9 (two digits), you should designate
+% the |SUBSLIST| as, e.g.,
+% \begin{verbatim}
+% {{10}a}==Cl; ...
+% \end{verbatim}
+%
+% The definition of |\@hadamantane| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macro |\@chairiI| to |\@chairX| defined below.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylhadamanposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\@hadamantane}
+% \begin{macro}{\hadamantane}
+% \begin{macrocode}
+% *************************
+% * input of basic macros *
+% *************************
+\def\hadamantane{\@ifnextchar[{\@hadamantane}{\@hadamantane[H]}}
+\def\@hadamantane[#1]#2{%
+\@reset@ylsw%
+\ylhadamanposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+\else
+ \begin{picture}(1600,1400)(-400,-319)
+ \iforigpt \put(-400,-319){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `hadamantane' origin: (0,0) ---> (400,319)}
+ \fi%
+\fi
+ \thinlines%
+ \put(0,0){\line(3,4){170}}% % bond 6 to 7
+ \put(170,226){\line(3,-1){403}}% % 7 to 10
+ \put(573,91){\line(3,1){270}}% % 10 to 3
+% %%%
+ \put(170,226){\line(0,1){360}}% % 7 to 8
+ \put(170,586){\line(3,1){270}}% % 8 to 1
+ \put(843,181){\line(0,1){360}}% % 3 to 2
+ \put(843,541){\line(-3,1){403}}% % 2 to 1
+ \thicklines%
+ \put(843,181){\line(-3,-4){170}}% % 3 to 4
+ \put(673,-46){\line(-3,1){403}}% % 4 to 5
+ \put(0,0){\line(3,1){270}}% % 6 to 5
+% %%%
+ \put(270,90){\line(0,1){360}}% % 5 to 9
+ \put(270,450){\line(3,4){170}}% % 9 to 1
+ \thinlines%
+% inner double bonds
+\@tfor\member:=#1\do{%
+\if\member r%no endocyclic bonds
+\else \if\member a%
+ \put(450,636){\line(3,-1){373}}% % double bond 1 to 2
+\else \if\member b%
+ \put(803,206){\line(0,1){320}}% % 3 to 2
+\else \if\member c%%%a%
+ \put(767,139){\line(-3,-4){110}}% % 3 to 4
+\else \if\member d%%%b%
+ \put(640,-5){\line(-3,1){343}}% % 4 to 5
+\else \if\member e%%%%c%
+ \put(240,111){\line(-3,-1){190}}% % 5 to 6
+\else \if\member f%%%d%
+ \put(63,40){\line(3,4){110}}% % 6 to 7
+\else \if\member g%
+ \put(200,246){\line(0,1){320}}% % 7 to 8
+\else \if\member h%
+ \put(400,626){\line(-3,-1){190}}% % 8 to 1
+\else \if\member i%
+ \put(450,636){\line(-3,-4){150}}% % 9 to 1
+\else \if\member j%
+ \put(300,110){\line(0,1){320}}% % 5 to 9
+\else \if\member k%%%f%
+ \put(768,131){\line(-3,-1){170}}% % 3 to 10
+\else \if\member l%
+ \put(182,187){\line(3,-1){343}}% % 7 to 10
+\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi\fi}%
+% %
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa% %0 omit
+ \or \put(440,676){\@chairiI}% %subst. on 1%%%9
+ \or \put(843,541){\@chairiII}% %subst. on 2%%10
+ \or \@chairiIII% %subst. on 3%%%4
+ \or \@chairiIV% %subst. on 4%%%3
+ \or \@chairiV% %subst. on 5%%%2
+ \or \@chairiVI% %subst. on 6%%%1
+ \or \@chairiVII% %subst. on 7%%%6
+ \or \put(170,586){\@chairiVIII}%subst. on 8%%%8
+ \or \put(270,450){\@chairiIX}% %subst. on 9%%%7
+ \or \@chairiX% %subst. on 10%%5
+\fi %end of ifcase
+\fi\fi%
+}\end{picture}}% %end of \hadamantane macro
+% End of addition 1994/03/05 SF
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylhadamanposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/23}{New commands for setting substituents} +%
+% \begin{macro}{\ylhadamanposition}
+% \begin{macrocode}
+\def\ylhadamanposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{-440}\gdef\@yli{-676}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{-843}\gdef\@yli{-541}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-843}\gdef\@yli{-181}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{-673}\gdef\@yli{46}\global\@ylswtrue% subst. on 4
+ \or\gdef\@ylii{-270}\gdef\@yli{-90}\global\@ylswtrue% subst. on 5
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 6
+ \or\gdef\@ylii{-170}\gdef\@yli{-226}\global\@ylswtrue% subst. on 7
+ \or\gdef\@ylii{-170}\gdef\@yli{-586}\global\@ylswtrue% subst. on 8
+ \or\gdef\@ylii{-270}\gdef\@yli{-450}\global\@ylswtrue% subst. on 9
+ \or\gdef\@ylii{-573}\gdef\@yli{-91}\global\@ylswtrue% subst. on 10
+\fi%end of ifcase
+\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% Hereafter, the definitions of the commands |\@chairiI| to |\@chairiX|
+% are described. Each of the commands can treat $n$a-type bond modifiers
+% as well as $n$Sa-type bond modifiers.
+%
+% \begin{macro}{\@chairiVI}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% ********************************************************
+% * treatment of the chair form (inverse) of cyclohexane *
+% * added March 05, 1994 by Shinsaku Fujita *
+% ********************************************************
+% %%%%%%%%%%%%%%%
+% % subst. on 6 %
+% %%%%%%%%%%%%%%%
+\def\@chairiVI{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=42
+ \yl@ydiff=92
+ \put(0,0){\line(0,-1){168}}% single bond at 6 axial
+ \putlratom{-42}{-260}{\@memberb}% left & right type
+ \else\if\@tmpb b%single bond
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 6 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=90
+ \put(0,0){\line(-1,-1){120}}% single bond at 6
+ \putlatom{-130}{-210}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=92
+ \put(0,0){\line(0,-1){168}}% single bond at 6 axial
+ \putlratom{-42}{-260}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 6 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=90
+ \putlatom{-130}{-210}{\@memberb}% left type
+ \put(-10,10){\line(-1,-1){120}}% double bond at 6
+ \put(10,-10){\line(-1,-1){120}}% double bond at 6
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=90
+ \putlatom{-130}{-210}{\@memberb}% left type
+ \put(0,0){\line(-1,-1){120}}% single bond at 6
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiVII}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 7 %
+% %%%%%%%%%%%%%%%
+\def\@chairiVII{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=26
+ \yl@ydiff=46
+ \put(170,226){\line(-5,-3){144}}% single bond at 7 equatorial
+ \putlatom{10}{94}{\@memberb}% left type
+ \else\ifx\@tmpb\empty%single bond
+ \yl@xdiff=26
+ \yl@ydiff=46
+ \put(170,226){\line(-5,-3){144}}% single bond at 7 equatorial
+ \putlatom{10}{94}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(170,226){\line(-1,1){120}}% single bond at 7
+ \putratom{40}{316}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=32
+ \yl@ydiff=12
+ \put(170,226){\line(0,1){168}}% single bond at 7 axial
+ \putlratom{138}{406}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=26
+ \yl@ydiff=46
+ \put(170,226){\line(-5,-3){144}}% single bond at 7 equatorial
+ \putlatom{10}{94}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{40}{316}{\@memberb}% left type
+ \put(160,216){\line(-1,1){120}}% double bond at 7
+ \put(180,236){\line(-1,1){120}}% double bond at 7
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \putlatom{40}{316}{\@memberb}% left type
+ \put(170,226){\line(-1,1){120}}% single bond at 7
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiX}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%%
+% % subst. on 10 %
+% %%%%%%%%%%%%%%%%
+\def\@chairiX{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=40
+ \yl@ydiff=104
+ \put(573,91){\line(0,-1){168}}% single bond at 5 axial
+ \putlratom{533}{-181}{\@memberb}% left type
+ \else\if\@tmpb b%single bond
+ \yl@xdiff=-36
+ \yl@ydiff=3
+ \put(573,91){\line(5,3){144}}% single bond at 5 equatorial
+ \putlatom{753}{180}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=56
+ \put(573,91){\line(5,-4){170}}% single bond at 5
+ \putratom{753}{-101}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=40
+ \yl@ydiff=104
+ \put(573,91){\line(0,-1){168}}% single bond at 5 axial
+ \putlratom{533}{-181}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-36
+ \yl@ydiff=3
+ \put(573,91){\line(5,3){144}}% single bond at 5 equatorial
+ \putlatom{753}{180}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=86
+ \putratom{733}{-141}{\@memberb}% right type
+ \put(563,83){\line(5,-4){170}}% double bond at 5
+ \put(583,99){\line(5,-4){170}}% double bond at 5
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=76
+ \put(573,91){\line(5,-4){170}}% single bond at 5
+ \putratom{753}{-121}{\@memberb}% right type
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiIII}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 3 %
+% %%%%%%%%%%%%%%%
+\def\@chairiIII{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=-16
+ \yl@ydiff=64
+ \put(843,181){\line(5,-3){144}}% single bond at 3 equatorial
+ \putratom{1003}{31}{\@memberb}% right type
+ \else\ifx\@tmpb\empty%single bond
+ \yl@xdiff=-16
+ \yl@ydiff=64
+ \put(843,181){\line(5,-3){144}}% single bond at 3 equatorial
+ \putratom{1003}{31}{\@memberb}% right type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(843,181){\line(1,1){120}}% single bond at 3
+ \putratom{953}{271}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=11
+ \put(843,181){\line(0,1){168}}% single bond at 3 axial
+ \putlratom{801}{360}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-16
+ \yl@ydiff=64
+ \put(843,181){\line(5,-3){144}}% single bond at 3 equatorial
+ \putratom{1003}{31}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=30
+ \putratom{953}{271}{\@memberb}% right type
+ \put(833,191){\line(1,1){120}}% double bond at 3
+ \put(853,171){\line(1,1){120}}% double bond at 3
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(843,181){\line(1,1){120}}% single bond at 3
+ \putratom{953}{271}{\@memberb}% right type
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiIV}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 4 %
+% %%%%%%%%%%%%%%%
+\def\@chairiIV{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=40
+ \yl@ydiff=104
+ \put(673,-46){\line(0,-1){168}}% single bond at 4 axial
+ \putlratom{633}{-318}{\@memberb}% left & right type
+ \else\if\@tmpb b%single bond
+ \yl@xdiff=-6
+ \yl@ydiff=17
+ \put(673,-46){\line(5,3){144}}% single bond at 4 equatorial
+ \putratom{823}{23}{\@memberb}% right type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=92
+ \put(673,-46){\line(1,-1){120}}% single bond at 4
+ \putratom{803}{-258}{\@memberb}% right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=40
+ \yl@ydiff=104
+ \put(673,-46){\line(0,-1){168}}% single bond at 4 axial
+ \putlratom{633}{-318}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-6
+ \yl@ydiff=17
+ \put(673,-46){\line(5,3){144}}% single bond at 4 equatorial
+ \putratom{823}{23}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-10
+ \yl@ydiff=92
+ \putratom{803}{-258}{\@memberb}% right type
+ \put(663,-53){\line(1,-1){120}}% double bond at 4
+ \put(683,-38){\line(1,-1){120}}% double bond at 4
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=76
+ \put(673,-46){\line(5,-4){170}}% single bond at 4
+ \putratom{853}{-258}{\@memberb}% right type
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiV}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 5 %
+% %%%%%%%%%%%%%%%
+\def\@chairiV{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=26
+ \yl@ydiff=102
+ \put(270,90){\line(-5,-3){144}}% single bond at 5 equatorial
+ \putratom{100}{-98}{\@memberb}% left type
+ \else\ifx\@tmpb\empty%single bond
+ \yl@xdiff=26
+ \yl@ydiff=102
+ \put(270,90){\line(-5,-3){144}}% single bond at 5 equatorial
+ \putratom{100}{-98}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=0
+ \yl@ydiff=46
+ \put(270,90){\line(-5,4){170}}% single bond at 5
+ \putlatom{100}{180}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=32
+ \yl@ydiff=12
+ \put(270,90){\line(0,1){168}}% single bond at 5 axial
+ \putlratom{238}{270}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=36
+ \yl@ydiff=102
+ \put(270,90){\line(-5,-3){144}}% single bond at 5 equatorial
+ \putratom{100}{-98}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=0
+ \yl@ydiff=36
+ \putlatom{100}{200}{\@memberb}% left or right type
+ \put(260,80){\line(-5,4){170}}% double bond at 5
+ \put(280,100){\line(-5,4){170}}% double bond at 5
+ \else%
+ \yl@xdiff=0
+ \yl@ydiff=26
+ \putlatom{100}{200}{\@memberb}% left type
+ \put(270,90){\line(-5,4){170}}% single bond at 5
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@chairiI}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 1 %
+% %%%%%%%%%%%%%%%
+\def\@chairiI{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \else\ifx\@tmpb\empty%
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \else%
+ \yl@xdiff=42
+ \yl@ydiff=-10
+ \put(0,0){\line(0,1){168}}% single bond at 1 axial
+ \putlratom{-42}{178}{\@memberb}% left & right type
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiII}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%%
+% % subst. on 2 %
+% %%%%%%%%%%%%%%%%
+\def\@chairiII{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=-10
+ \yl@ydiff=13
+ \put(0,0){\line(3,1){190}}% single bond at 6 equatorial
+ \putratom{200}{50}{\@memberb}% right type
+ \else\if\@tmpb b%single bond
+ \yl@xdiff=-10
+ \yl@ydiff=0
+ \put(0,0){\line(3,4){120}}% % bond 1 to 6
+ \putratom{130}{160}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=-10
+ \put(0,0){\line(1,1){120}}% single bond at 1
+ \putratom{130}{130}{\@memberb}% left type
+ \else\if\@tmpc a%(a) axial
+ \yl@xdiff=-10
+ \yl@ydiff=0
+ \put(0,0){\line(3,4){120}}% % bond 1 to 6
+ \putratom{130}{160}{\@memberb}% left type
+ \else\if\@tmpc e%(e) beta
+ \yl@xdiff=-10
+ \yl@ydiff=13
+ \put(0,0){\line(3,1){190}}% single bond at 6 equatorial
+ \putratom{200}{50}{\@memberb}% right type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-10
+ \yl@ydiff=-10
+ \putratom{130}{130}{\@memberb}% left type
+ \put(-10,10){\line(1,1){120}}% double bond at 1
+ \put(10,-10){\line(1,1){120}}% double bond at 1
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=-10
+ \putratom{130}{130}{\@memberb}% left type
+ \put(0,0){\line(1,1){120}}% single bond at 1
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairigVIII}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 8 %
+% %%%%%%%%%%%%%%%
+\def\@chairiVIII{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \else\if\@tmpb b%single bond
+ \yl@xdiff=-10
+ \yl@ydiff=0
+ \put(0,0){\line(3,4){120}}% % bond 1 to 6
+ \putratom{130}{160}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=4
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-140}{50}{\@memberb}% left type
+ \else\if\@tmpc e% right-hand
+ \yl@xdiff=-10
+ \yl@ydiff=0
+ \put(0,0){\line(3,4){120}}% % bond 1 to 6
+ \putratom{130}{160}{\@memberb}% left type
+ \else\if\@tmpc a% left-hand
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=4
+ \yl@ydiff=26
+ \putlatom{-140}{60}{\@memberb}% left type
+ \put(10,10){\line(-5,3){144}}% single bond at 1 equatorial
+ \put(0,-10){\line(-5,3){144}}% single bond at 1 equatorial
+ \else%
+ \yl@xdiff=4
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-140}{50}{\@memberb}% left type
+ \fi\fi\fi\fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@chairiIX}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 9 %
+% %%%%%%%%%%%%%%%
+\def\@chairiIX{%
+ \if\@tmpb a%single bond
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \else\if\@tmpb b%single bond
+ \yl@xdiff=-16
+ \yl@ydiff=36
+ \put(0,0){\line(5,3){144}}% single bond at 6 equatorial
+ \putratom{160}{50}{\@memberb}% left type
+ \else\if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=4
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-140}{50}{\@memberb}% left type
+ \else\if\@tmpc e% right-hand
+ \yl@xdiff=-16
+ \yl@ydiff=36
+ \put(0,0){\line(5,3){144}}% single bond at 6 equatorial
+ \putratom{160}{50}{\@memberb}% left type
+ \else\if\@tmpc a% left-hand
+ \yl@xdiff=16
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-160}{50}{\@memberb}% left type
+ \fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=4
+ \yl@ydiff=36
+ \putlatom{-140}{50}{\@memberb}% left type
+ \put(10,10){\line(-5,3){144}}% single bond at 1 equatorial
+ \put(0,-10){\line(-5,3){144}}% single bond at 1 equatorial
+ \else%
+ \yl@xdiff=4
+ \yl@ydiff=36
+ \put(0,0){\line(-5,3){144}}% single bond at 1 equatorial
+ \putlatom{-140}{50}{\@memberb}% left type
+ \fi\fi\fi\fi}%
+%</ccycle>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/chemist.drv b/Master/texmf-dist/source/latex/xymtex/chemist.drv new file mode 100644 index 00000000000..1ad0e7b0143 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/chemist.drv @@ -0,0 +1,89 @@ +%% +%% This is file `chemist.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% chemist.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996, 2000 by Shinsaku Fujita +%% +%% This file is part of the ChemSci system. +%% ======================================= +%% +%% Released on June 1, 1996 +%% Released on November 3, 2000 (v2.00a) +%% +%% Copyright (C) 1996 by Shinsaku Fujita, all rights reserved. +%% This style file is created for submitting a manuscript to +%% scientific journals. This style file is to be contained in the +%% ``chemist'' directory which is an input directory for TeX. +%% +%% For using this file, see +%% Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' +%% Tokyo Kagaku Dojin, Tokyo (1993), Chapter 16. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``chemist'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file is a modification of latex.tex (LaTeX2.09) and of latex.ltx +%% (a LaTeX2e), the reused parts of which is subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% \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 \~} +%% +%% `chemist.dtx' ver1.01a (for LaTeX2e) 1996/06/15 +%% by Shinsaku Fujita +%% +\ProvidesFile{chemist.drv} + [2000/11/03 v2.00a + ChemSci package driver (English) + ] +\documentclass{ltxdoc} +\GetFileInfo{chemist.drv} +\title{Chemist Package \space\fileversion} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology \\ +Kyoto Institute of Technology +%% Ashigara Research Laboratories \\ +%% Fuji Photo Film Co. Ltd. +} +\date{\filedate} +\begin{document} +\maketitle +\tableofcontents +\DocInput{chemist.dtx} +\end{document} +\def\versi@ndate{November 3, 2000} +\def\versi@nno{ver2.00a} +\def\copyrighth@lder{SF} % Shinsaku Fujita +\endinput +%% +%% End of file `chemist.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/chemist.ins b/Master/texmf-dist/source/latex/xymtex/chemist.ins new file mode 100644 index 00000000000..f43ac6a0280 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/chemist.ins @@ -0,0 +1,53 @@ +\def\batchfile{chemist.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996, 2000 by Shinsaku Fujita
+
+This file is part of the ChemSci system.
+=======================================
+
+Released on June 1, 1996
+Released on November 3, 2000 (v2.00a)
+
+Copyright (C) 1996 by Shinsaku Fujita, all rights reserved.
+This style file is created for submitting a manuscript to
+scientific journals. This style file is to be contained in the
+``chemist'' directory which is an input directory for TeX.
+
+For using this file, see
+ Shinsaku Fujita, ``LaTeX for Chemists and Biochemists''
+ Tokyo Kagaku Dojin, Tokyo (1993), Chapter 16.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``chemist'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file is a modification of latex.tex (LaTeX2.09) and of latex.ltx
+(a LaTeX2e), the reused parts of which is subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{chemist.drv}{t}{%
+ \from{chemist.dtx}{driver}}
+
+\generateFile{chemist.sty}{t}{%
+ \from{chemist.dtx}{chemist}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/chemstr.drv b/Master/texmf-dist/source/latex/xymtex/chemstr.drv new file mode 100644 index 00000000000..c9832eaad5a --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/chemstr.drv @@ -0,0 +1,82 @@ +%% +%% This is file `chemstr.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% chemstr.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996, 1988 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1998 (private version) +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1996, 1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: chemstr.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{chemstr.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{chemstr.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Basic Commands for Drawing Chemical Structures +by {\sffamily chemstr.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{chemstr.dtx} +\end{document} +\endinput +%% +%% End of file `chemstr.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/chemstr.ins b/Master/texmf-dist/source/latex/xymtex/chemstr.ins new file mode 100644 index 00000000000..09f26e8d7c9 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/chemstr.ins @@ -0,0 +1,50 @@ +\def\batchfile{chemstr.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996, 1988 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1998 (private version)
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1996, 1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{chemstr.drv}{t}{%
+ \from{chemstr.dtx}{driver}}
+
+\generateFile{chemstr.sty}{t}{%
+ \from{chemstr.dtx}{chemstr}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/doins.bat b/Master/texmf-dist/source/latex/xymtex/doins.bat new file mode 100644 index 00000000000..38a90a2f401 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/doins.bat @@ -0,0 +1,14 @@ +platex aliphat.ins
+platex carom.ins
+platex ccycle.ins
+platex chemist.ins
+platex chemstr.ins
+platex hcycle.ins
+platex hetarom.ins
+platex hetaromh.ins
+platex locant.ins
+platex lowcycle.ins
+platex polymers.ins
+platex methylen.ins
+platex fusering.ins
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/fusering.drv b/Master/texmf-dist/source/latex/xymtex/fusering.drv new file mode 100644 index 00000000000..937c74106ca --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/fusering.drv @@ -0,0 +1,80 @@ +%% +%% This is file `fusering.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fusering.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1998 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.02 Released on October 31, 1998 (private version) +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: fusering.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{methylen.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{methylen.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Fusing Ring Units by {\sffamily fusering.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{fusering.dtx} +\end{document} +\endinput +%% +%% End of file `fusering.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/fusering.dtx b/Master/texmf-dist/source/latex/xymtex/fusering.dtx new file mode 100644 index 00000000000..a7b6695ad70 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/fusering.dtx @@ -0,0 +1,4575 @@ +% \iffalse meta-comment +%% File: fusering.dtx +% +% Copyright 1998 by Shinsaku Fujita +% +% This file is part of XyMTeX system. +% ------------------------------------- +% +% 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]. +% +% Copying of this file is authorized only if either +% (1) you make absolutely no changes to your copy, including name and +% directory name; or +% (2) if you do make changes, +% (a) you name it something other than the names included in the +% ``xymtex'' directory and +% (b) you are requested to leave this notice intact. +% This restriction ensures that all standard styles are identical. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Department of Chemistry and Materials Technology, +% Kyoto Institute of Technology, \\ +% Matsugasaki, Sakyoku, Kyoto, 606 Japan +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \fi +% +% \CheckSum{4211} +%% \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{v2.00}{1998/12/25}{enhanced edition for LaTeX2e} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{methylen.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +% \iffalse +\documentclass{ltxdoc} +\GetFileInfo{methylen.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{Fusing Ring Units by {\sffamily fusering.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +% +\begin{document} + \maketitle + \DocInput{fusering.dtx} +\end{document} +%</driver> +% \fi +% +% \section{Introduction}\label{methylen:intro} +% +% \subsection{Options for {\sffamily docstrip}} +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% \emph{option} & \emph{function}\\ \hline +% fusering & fusering.sty \\ +% driver & driver for this dtx file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsection{Version Information} +% +% \begin{macrocode} +%<*fusering> +\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00} +\typeout{ -- Released December 25, 1998 by Shinsaku Fujita} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\j@urnalname{methylen} +\def\versi@ndate{December 25, 1998} +\def\versi@nno{ver2.00} +\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +% \end{macrocode} +% +% \section{List of commands for fusering.sty} +% +% \begin{verbatim} +% ********************************** +% * fusering.sty: list of commands * +% ********************************** +% +% <Six-membered fused ring units> +% \sixfusev \@sixfusev \sixfuseposv +% \sixfusevi \@sixfusevi \sixfuseposvi +% \sixfuseh \@sixfuseh \sixfuseposh +% \sixfusehi \@sixfusehi \sixfuseposhi +% +% <Five-membered fused ring units> +% \fivefusev \@fivefusev \fivefuseposv +% \fivefusevi \@fivefusevi \fivefuseposvi +% \fivefuseh \@fivefuseh \fivefuseposh +% \fivefusehi \@fivefusehi \fivefuseposhi +% +% <Four-membered fused ring units> +% \fourfuse \@fourfuse \fourfusepos +% +% <Three-membered fused ring units> +% \threefusev \@threefusev \threefuseposv +% \threefusevi \@threefusevi \threefuseposvi +% \threefuseh \@threefuseh \threefuseposh +% \threefusehi \@threefusehi \threefuseposhi + +% \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 polymers.sty} for the present case). Hence, the combination +% of |\input| and |\@ifundefined| is used to crossload sty +% files ({\sf chemstr.sty} etc. 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{bzdrv}{\input carom.sty\relax}{} +\@ifundefined{hbonde}{\input hetaromh.sty\relax}{} +\@ifundefined{bonde}{\input hetarom.sty\relax}{} +\unitlength=0.1pt +% \end{macrocode} +% +% \section{Six-Membered Fusing Units} +% \subsection{Vertical Type} +% +% The command |\sixfusev| produces a six-membered fusing unit +% of vertical type. The structure produced lacks a given bond +% in order to realize ring fusion, which produces a new ring system. +% The following numbering is adopted in this macro. +% Note that the difference between |\sixfusev| and |\sixuniv|, +% the latter of which is designed as an inner command for giving +% a building block with no adjustment of attached sites, while +% the former has a function of such adjustment. +% +% \begin{verbatim} +% ***************************** +% * six-membered fusing unit * +% * (vertical type) * +% ***************************** +% +% 1 +% f * a +% 6 * * 2 +% d | | b +% | | +% 5 * * 3 +% d * c +% 4 <===== the original point +% \end{verbatim} +% +% The macro |\sixfusev| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \sixfusev(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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'. +% +% \begin{verbatim} +% SKBONDLIST = +% A: dotted bond for an alpha (down) bond +% B: boldfaced bond for a beta (upper) bond +% +% \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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, e, or f) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \sixfusev{1==N}{1==Cl;2==F}{e} +% \end{verbatim} +% +% \changes{v2.00}{1998/12/25}{New command: \cs{sixfusev}} +% +% \begin{macro}{\if@skbondlist} +% \begin{macrocode} +%\newif\if@skbondlist +%\@skbondlistfalse +% \end{macrocode} +% \end{macro}% to hetarom.sty +% +% \begin{macro}{\sixfusev} +% \begin{macro}{\@six@fusev} +% \begin{macro}{\@six@@fusev} +% \begin{macro}{\@sixfusev} +% \begin{macrocode} +\def\sixfusev{\@ifnextchar({\@six@fusev(@}{\@six@fusev(@)}} +\def\@six@fusev(#1){\@ifnextchar[{\@six@@fusev(#1)[@}% +{\@six@@fusev(#1)[@]}} +\def\@six@@fusev(#1)[#2]#3#4#5{\@ifnextchar[% +{\@sixfusev(#1)[#2]{#3}{#4}{#5}[@}% +{\@sixfusev(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@sixfusev(#1)[#2]#3#4#5[#6]{% +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize% +\test@vertix@sixv{#3}{a}{b}{c}{d}{e}{f}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\sixfuseposv{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-\shiftii,-\shifti)% + \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `sixfusev' origin: % + (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE into a list 1993/11/21 by Shinsaku Fujita +{% +\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\set@skel@bond{#1}{a}{a}% bond between 1 and 2 \@aaa -> \skbonda etc +\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc +\set@skel@bond{#1}{c}{c}% bond between 3 and 4 \@ccc -> \skbondc etc +\set@skel@bond{#1}{d}{d}% bond between 4 and 5 \@ddd -> \skbondd etc +\set@skel@bond{#1}{e}{e}% bond between 5 and 6 \@eee -> \skbonde etc +\set@skel@bond{#1}{f}{f}% bond between 6 and 1 \@fff -> \skbondf etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r\relax% +\else\if\member l\relax% +\else\if\member a\relax% + \bonda% +\else\if\member b\relax% + \bondb% +\else\if\member c\relax% + \bondc% +\else\if\member d\relax% + \bondd% +\else\if\member e\relax% + \bonde% +\else\if\member f\relax% + \bondf% +\else\if\member A%left aromatic circle + \put(0,203){\circle{240}}% %circle +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% +\else \expandafter\twoCH@@R\member//% + \set@fusionadd@sixv +\fi\fi\fi\fi\fi\fi\fi\fi\fi% +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting hetero atoms % +% %%%%%%%%%%%%%%%%%%%%%%%% +\set@hetatom@sixv{#3}{0}{0}{7}{0}% %atom 1--6% +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringv{#4}{0}{0}{7}{0}% +\end{picture}% +\sixfuseposv{#5}%for FuseWaring when nested +\iniatom\iniflag}% %end of \sixfusev macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\sixfuseposv| is used in the definition of +% the |\sixfusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\if@sixfuseposv} +% \begin{macro}{\sixfuseposv} +% \begin{macrocode} +\newif\if@sixfuseposv \@sixfuseposvfalse +\def\fuseAx{0} +\def\fuseAy{0} +\def\fuseBx{0} +\def\fuseBy{0} +\def\sixfuseposv#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{406}% + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{406}% + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer f\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `f'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \gdef\fuseBx{0}\gdef\fuseBy{406}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer F\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `F'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \gdef\fuseAx{0}\gdef\fuseAy{406}% + \global\@sixfuseposvtrue + \fi +\fi}}}% end of the macro \sixfuseposv +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\@bond@fuse@omit| is used in |\sixfusev| etc. +% for detecting omitted bonds, where |\@aaa| etc. are empty if +% they are omitted. +% +% \begin{macro}{\@bond@fuse@omit} +% \begin{macrocode} +\def\@bond@fuse@omit#1#2{% +\ifx#1a\relax\gdef\@aaa{}\fi +\ifx#1b\relax\gdef\@bbb{}\fi +\ifx#1c\relax\gdef\@ccc{}\fi +\ifx#1d\relax\gdef\@ddd{}\fi +\ifx#1e\relax\gdef\@eee{}\fi +\ifx#1f\relax\gdef\@fff{}\fi +\ifx#1A\relax\gdef\@aaa{}\fi +\ifx#1B\relax\gdef\@bbb{}\fi +\ifx#1C\relax\gdef\@ccc{}\fi +\ifx#1D\relax\gdef\@ddd{}\fi +\ifx#1E\relax\gdef\@eee{}\fi +\ifx#1F\relax\gdef\@fff{}\fi +%%%% +\@tfor\memBer:=#2\do{% +\if\memBer a\relax\gdef\@aaa{}% + \ifx#1a\relax + \XyMTeXWarning{Double spec. of bond `a' in FUSE and OMIT}\fi +\fi% +\if\memBer A\relax\gdef\@aaa{}% + \ifx#1a\relax + \XyMTeXWarning{Double spec. of bond `a' in FUSE and OMIT}\fi +\fi% +\if\memBer b\relax\gdef\@bbb{}% + \ifx#1b\relax + \XyMTeXWarning{Double spec. of bond `b' in FUSE and OMIT}\fi +\fi% +\if\memBer B\relax\gdef\@bbb{}% + \ifx#1b\relax + \XyMTeXWarning{Double spec. of bond `b' in FUSE and OMIT}\fi +\fi% +\if\memBer c\relax\gdef\@ccc{}% + \ifx#1c\relax + \XyMTeXWarning{Double spec. of bond `c' in FUSE and OMIT}\fi +\fi% +\if\memBer C\relax\gdef\@ccc{}% + \ifx#1c\relax + \XyMTeXWarning{Double spec. of bond `c' in FUSE and OMIT}\fi +\fi% +\if\memBer d\relax\gdef\@ddd{}% + \ifx#1d\relax + \XyMTeXWarning{Double spec. of bond `d' in FUSE and OMIT}\fi +\fi% +\if\memBer D\relax\gdef\@ddd{}% + \ifx#1d\relax + \XyMTeXWarning{Double spec. of bond `d' in FUSE and OMIT}\fi +\fi% +\if\memBer e\relax\gdef\@eee{}% + \ifx#1e\relax + \XyMTeXWarning{Double spec. of bond `e' in FUSE and OMIT}\fi +\fi% +\if\memBer E\relax\gdef\@eee{}% + \ifx#1e\relax + \XyMTeXWarning{Double spec. of bond `e' in FUSE and OMIT}\fi +\fi% +\if\memBer f\relax\gdef\@fff{}% + \ifx#1f\relax + \XyMTeXWarning{Double spec. of bond `f' in FUSE and OMIT}\fi +\fi% +\if\memBer F\relax\gdef\@fff{}% + \ifx#1f\relax + \XyMTeXWarning{Double spec. of bond `f' in FUSE and OMIT}\fi +\fi% +}}% +% \end{macrocode} +% \end{macro} +% +% \subsection{Inverse Vertical Type} +% +% The command |\sixfusevi| produces a six-membered fusing unit +% of vertical type. The structure produced lacks a given bond +% in order to realize ring fusion, which produces a new ring system. +% The following numbering is adopted in this macro. +% Note that the difference between |\sixfusevi| and |\sixunivi|, +% the latter of which is designed as an inner command for giving +% a building block with no adjustment of attached sites, while +% the former has a function of such adjustment. +% +% \begin{verbatim} +% ***************************** +% * six-membered fusing unit * +% * (inverse vertical type) * +% ***************************** +% +% 4 +% d * c +% 5 * * 3 +% e | | b +% | | +% 6 * * 2 +% f * a +% 1 <===== the original point +% \end{verbatim} +% +% The macro |\sixfusevi| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \sixfusevi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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'. +% +% \begin{verbatim} +% SKBONDLIST = +% A: dotted bond for an alpha (down) bond +% B: boldfaced bond for a beta (upper) bond +% \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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, e, or f) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \sixfusevi{1==N}{1==Cl;2==F}{e} +% \end{verbatim} +% +% \changes{v2.00}{1998/12/25}{New command: \cs{sixfusevi}} +% +% \begin{macro}{\sixfusevi} +% \begin{macro}{\@six@fusevi} +% \begin{macro}{\@six@@fusevi} +% \begin{macro}{\@sixfusevi} +% \begin{macrocode} +\def\sixfusevi{\@ifnextchar({\@six@fusevi(@}{\@six@fusevi(@)}} +\def\@six@fusevi(#1){\@ifnextchar[{\@six@@fusevi(#1)[@}% +{\@six@@fusevi(#1)[@]}} +\def\@six@@fusevi(#1)[#2]#3#4#5{\@ifnextchar[% +{\@sixfusevi(#1)[#2]{#3}{#4}{#5}[@}% +{\@sixfusevi(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@sixfusevi(#1)[#2]#3#4#5[#6]{% +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize% +\test@vertix@sixv{#3}{d}{c}{b}{a}{f}{e}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\sixfuseposvi{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-\shiftii,-\shifti)% + \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `sixfusev' origin: % + (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE into a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\set@skel@bond{#1}{a}{c}% bond between 1 and 2 \@aaa -> \skbondc etc +\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc +\set@skel@bond{#1}{c}{a}% bond between 3 and 4 \@ccc -> \skbonda etc +\set@skel@bond{#1}{d}{f}% bond between 4 and 5 \@ddd -> \skbondf etc +\set@skel@bond{#1}{e}{e}% bond between 5 and 6 \@eee -> \skbonde etc +\set@skel@bond{#1}{f}{d}% bond between 6 and 1 \@fff -> \skbondd etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r\relax% +\else\if\member l\relax% +\else\if\member a\relax% + \bondc% +\else\if\member b\relax% + \bondb% +\else\if\member c\relax% + \bonda% +\else\if\member d\relax% + \bondf% +\else\if\member e\relax% + \bonde% +\else\if\member f\relax% + \bondd% +\else\if\member A%left aromatic circle + \put(0,203){\circle{240}}% %circle +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% +\else \expandafter\twoCH@@R\member//% + \set@fusionadd@sixvi +\fi\fi\fi\fi\fi\fi\fi\fi\fi% +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting hetero atoms % +% %%%%%%%%%%%%%%%%%%%%%%%% +\set@hetatom@sixv{#3}{5}{0}{5}{-1}% %atom 1--4% +\set@hetatom@sixv{#3}{11}{4}{7}{-1}% %atom 5 and 6% +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringv{#4}{5}{0}{5}{-1}% %subst 1--4 +\setsixringv{#4}{11}{4}{7}{-1}% %subst 5 and 6 +\end{picture}% +\sixfuseposvi{#5}%%for FuseWaring when nested +\iniatom\iniflag}% %end of \sixfusevi macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\sixfuseposvi| is used in the definition of +% the |\sixfusevi| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\sixfuseposvi} +% \begin{macrocode} +\def\sixfuseposvi#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{406}% + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{406}% + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `b'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `a'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `A'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer f\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `f'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer F\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `F'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \gdef\fuseAx{0}\gdef\fuseAy{406}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \gdef\fuseBx{0}\gdef\fuseBy{406}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \sixfuseposvi +% \end{macrocode} +% \end{macro} +% +% \subsection{Normal Horizontal Type} +% +% The command |\sixfuseh| produces a six-membered fusing unit +% of horizontal type. The structure produced lacks a given bond +% in order to realize ring fusion, which produces a new ring system. +% The following numbering is adopted in this macro. +% Note that the difference between |\sixfuseh| and |\sixunih|, +% the latter of which is designed as an inner command for giving +% a building block with no adjustment of attached sites, while +% the former has a function of such adjustment. +% +% \begin{verbatim} +% ***************************** +% * six-membered fusing unit * +% * (horizontal type) * +% ***************************** +% b +% 2 3 +% a ----- c +% * * +% the original point ===> 1 * * 4 +% (0,0) * * d +% f ----- +% 6 5 +% e +% \end{verbatim} +% +% The macro |\sixfuseh| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \sixfuseh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 `$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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, e, or f) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \sixfuseh{1==N}{1==Cl;2==F}{e} +% \end{verbatim} +% +% The definition of |\sixfuseh| 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} +% \changes{v2.00}{1998/12/29}{New command: \cs{sixfuseh}} +% +% \begin{macro}{\sixfuseh} +% \begin{macro}{\@six@fuseh} +% \begin{macro}{\@six@@fuseh} +% \begin{macro}{\@sixfuseh} +% \begin{macrocode} +\def\sixfuseh{\@ifnextchar({\@six@fuseh(@}{\@six@fuseh(@)}} +\def\@six@fuseh(#1){\@ifnextchar[{\@six@@fuseh(#1)[@}% +{\@six@@fuseh(#1)[@]}} +\def\@six@@fuseh(#1)[#2]#3#4#5{\@ifnextchar[% +{\@sixfuseh(#1)[#2]{#3}{#4}{#5}[@}% +{\@sixfuseh(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@sixfuseh(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize% +\test@vrtx@sixh{#3}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\sixfuseposh{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-240,-400)% + \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `sixunith' origin: % + (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE into a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\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% +\else \if\member l\relax% +\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(203,0){\circle{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% +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringh{#4}{0}{0}{7}{0}% +\end{picture}% +\sixfuseposh{#5}%%for FuseWaring when nested +\iniatom\iniflag}% %end of \sixfuseh macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\sixfuseposh| is used in the definition of +% the |\sixfuseh| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\sixfuseposh} +% \begin{macrocode} +\def\sixfuseposh#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \gdef\fuseBx{406}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \gdef\fuseAx{406}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseAx{406}\gdef\fuseAy{0}% + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseBx{406}\gdef\fuseBy{0}% + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer f\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `f'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer F\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `F'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi}}}% end of the macro \sixfuseposh +% \end{macrocode} +% \end{macro} +% +% \subsection{Inverse Horizontal Type} +% +% The command |\sixfusehi| produces a six-membered fusing unit +% of inverse horizontal type. The structure produced lacks a given bond +% in order to realize ring fusion, which produces a new ring system. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ***************************** +% * six-membered fusing unit * +% * (inverse horizontal type) * +% ***************************** +% b +% 3 2 +% c ----- a +% * * +% 4 * * 1 <== the original point (0,0) +% * * f +% d ----- +% 5 6 +% e +% \end{verbatim} +% +% The macro |\sixfusehi| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \sixfusehi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 `$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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, e, or f) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \sixfusehi{1==N}{1==Cl;2==F}{e} +% \end{verbatim} +% +% \changes{v2.00}{1998/12/29}{New command: \cs{sixfusehi}} +% +% \begin{macro}{\sixfusehi} +% \begin{macro}{\@six@fusehi} +% \begin{macro}{\@six@@fusehi} +% \begin{macro}{\@sixfusehi} +% \begin{macrocode} +\def\sixfusehi{\@ifnextchar({\@six@fusehi(@}{\@six@fusehi(@)}} +\def\@six@fusehi(#1){\@ifnextchar[{\@six@@fusehi(#1)[@}% +{\@six@@fusehi(#1)[@]}} +\def\@six@@fusehi(#1)[#2]#3#4#5{\@ifnextchar[% +{\@sixfusehi(#1)[#2]{#3}{#4}{#5}[@}% +{\@sixfusehi(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@sixfusehi(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize% +\test@vrtx@sixhi{#3}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\sixfuseposhi{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-240,-400)% + \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `sixunith' origin: % + (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE into a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\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% +\else \if\member l\relax% +\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(203,0){\circle{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 +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringh{#4}{5}{0}{5}{-1}% %subst 1--4 +\setsixringh{#4}{11}{4}{7}{-1}% %subst 5 and 6 +\end{picture}% +\sixfuseposhi{#5}%%for FuseWaring when nested +\iniatom\iniflag}% %end of \sixfusehi macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\sixfuseposhi| is used in the definition of +% the |\sixfusehi| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\sixfuseposhi} +% \begin{macrocode} +\def\sixfuseposhi#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `C'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `c'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `B'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `b'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `A'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \gdef\fuseBx{406}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `a'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \gdef\fuseAx{406}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer F\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `F'}% + \else + \gdef\fuseAx{406}\gdef\fuseAy{0}% + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer f\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `f'}% + \else + \gdef\fuseBx{406}\gdef\fuseBy{0}% + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi}}}% end of the macro \sixfuseposhi +% \end{macrocode} +% \end{macro} +% +% \section{Five-membered fused ring unit} +% \subsection{Vertical type} +% +% The macro |\fivefusev| 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 fused* +% * (vertical type) * +% ********************** +% +% 4 _______ 3 +% | | +% | | +% 5 * * 2 +% * +% 1 <===== the original point +% \end{verbatim} +% +% The macro |\fivefusev| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \fivefusev(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 +% {n+} : plus at the n-nitrogen atom (n = 1 to 5) +% \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 |FUSE| represents one bond to be omitted for fusion. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, or e) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \fivefusev{1==N}{1==H;2==F}{a} +% \end{verbatim} +% +% \begin{macro}{\fivefusev} +% \begin{macro}{\@five@fusev} +% \begin{macro}{\@five@@fusev} +% \begin{macro}{\@fivefusev} +% \begin{macrocode} +\def\fivefusev{\@ifnextchar({\@five@fusev(@}{\@five@fusev(@)}} +\def\@five@fusev(#1){\@ifnextchar[{\@five@@fusev(#1)[@}% +{\@five@@fusev(#1)[@]}} +\def\@five@@fusev(#1)[#2]#3#4#5{\@ifnextchar[% +{\@fivefusev(#1)[#2]{#3}{#4}{#5}[@}% +{\@fivefusev(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@fivefusev(#1)[#2]#3#4#5[#6]{% +\iniatom\iniflag%initialize +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\test@vertix@sixv{#3}{d}{c}{b}{f}{e}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\fivefuseposv{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-\shiftii,-\shifti)% + \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `fivefusev' origin: % + (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%% +% %% outer skeleton % +% %%%%%%%%%%%%%%%%%%% +% changed FUSE to a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\set@skel@bond{#1}{a}{c}% bond between 1 and 2 \@aaa -> \skbondc etc +\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc +\set@skel@longbond{#1}{c}{skbondhoriz}% + % bond between 3 and 4 \@ccc -> \skbondhoriz etc +\set@skel@bond{#1}{d}{e}% bond between 4 and 5 \@ddd -> \skbonde etc +\set@skel@bond{#1}{e}{d}% bond between 5 and 1 \@eee -> \skbondd etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%% +% %% inner double bond % +% %%%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r% +\else\if\member a\relax% + \bondc% +\else\if\member b\relax% + \bondb% +\else\if\member c\relax% + \bondhoriz% +\else\if\member d\relax% + \bonde% +\else\if\member e\relax% + \bondd% +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@fivev +\fi\fi\fi\fi\fi\fi}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%% +% % setting heteroatoms % +% %%%%%%%%%%%%%%%%%%%%%%% +\set@hetatom@sixv{#3}{5}{1}{5}{-1}% % for 1 to 3 +\set@hetatom@sixv{#3}{10}{4}{7}{-1}% % for 4 to 5 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringv{#4}{5}{1}{5}{-1}% % for 1 to 3 +\setsixringv{#4}{10}{4}{7}{-1}% % for 4 to 5 +\end{picture}% +{\let\XyMTeXWarning\@gobble +\fivefuseposv{#5}}%%for FuseWaring when nested +\iniatom\iniflag}%end of \fivefusev macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\fivefuseposv| is used in the definition of +% the |\fivefusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\fivefuseposv} +% \begin{macrocode} +\def\fivefuseposv#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer c\relax + \XyMTeXWarning{Not-used fusion at bond `c'}% +\fi +\if\memBer C\relax + \XyMTeXWarning{Not-used fusion at bond `C'}% +\fi +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `b'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `a'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `A'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `f'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `F'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \fivefuseposv +% \end{macrocode} +% \end{macro} +% +% \subsection{Inverse vertical type} +% +% The macro |\fivefusevi| 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 fusing unit * +% * (vertical type, inverse type) * +% ************************************ +% +% 1 +% * +% 6 * * 2 +% | | +% |_____| +% 4 3 +% * +% (0,0) <===== the original point +% \end{verbatim} +% +% The macro |\fivefusevi| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \fivefusevi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 +% {n+} : plus at the n-nitrogen atom (n = 1 to 5) +% \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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, or e) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \fivefusevi{1==N}{1==H;2==F}{a} +% \end{verbatim} +% +% \begin{macro}{\fivefusevi} +% \begin{macro}{\@five@fusevi} +% \begin{macro}{\@five@@fusevi} +% \begin{macro}{\@fivefusevi} +% \begin{macrocode} +\def\fivefusevi{\@ifnextchar({\@five@fusevi(@}{\@five@fusevi(@)}} +\def\@five@fusevi(#1){\@ifnextchar[{\@five@@fusevi(#1)[@}% +{\@five@@fusevi(#1)[@]}} +\def\@five@@fusevi(#1)[#2]#3#4#5{\@ifnextchar[% +{\@fivefusevi(#1)[#2]{#3}{#4}{#5}[@}% +{\@fivefusevi(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@fivefusevi(#1)[#2]#3#4#5[#6]{% +\iniatom\iniflag%initialize +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\test@vertix@sixv{#3}{a}{b}{c}{e}{f}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\fivefuseposvi{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-\shiftii,-\shifti)% + \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `fivefusevi' origin: % + (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE to a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\set@skel@bond{#1}{a}{a}% bond between 1 and 2 \@aaa -> \skbonda etc +\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc +\set@skel@longbond{#1}{c}{skbondhorizi}% + % bond between 3 and 4 \@ccc -> \skbondhorizi etc +\set@skel@bond{#1}{d}{e}% bond between 4 and 5 \@ddd -> \skbonde etc +\set@skel@bond{#1}{e}{f}% bond between 5 and 6 \@eee -> \skbondf etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r% +\else\if\member a\relax% + \bonda% +\else\if\member b\relax% + \bondb% +\else\if\member c\relax% + \bondhorizi% +\else\if\member d\relax% + \bonde% +\else\if\member e\relax% + \bondf% +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@fivevi +\fi\fi\fi\fi\fi\fi}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%% +% % setting heteroatoms % +% %%%%%%%%%%%%%%%%%%%%%%% +\set@hetatom@sixv{#3}{0}{0}{4}{0}% % for 1 to 3 +\set@hetatom@sixv{#3}{1}{4}{7}{0}% % for 4 to 5 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringv{#4}{0}{0}{4}{0}% % for 1 to 3 +\setsixringv{#4}{1}{4}{7}{0}% % for 4 to 5 +\end{picture}% +{\let\XyMTeXWarning\@gobble +\fivefuseposvi{#5}}%%for FuseWaring when nested +\iniatom\iniflag}% %end of \fivefusevi macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\fivefuseposvi| is used in the definition of +% the |\fivefusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\fivefuseposvi} +% \begin{macrocode} +\def\fivefuseposvi#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{406}% + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{406}% + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{303}% + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{303}% + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \XyMTeXWarning{Not-used fusion at bond `c'}% +\fi +\if\memBer C\relax + \XyMTeXWarning{Not-used fusion at bond `C'}% +\fi +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \gdef\fuseBx{0}\gdef\fuseBy{406}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \gdef\fuseAx{0}\gdef\fuseAy{406}% + \global\@sixfuseposvtrue + \fi +\fi}}}% end of the macro \fivefuseposvi +% \end{macrocode} +% \end{macro} +% +% \subsection{Horizonatl type} +% +% The macro |\fivefuseh| 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 |\fivefuseh| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| 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} +% \fivefuseh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, or e) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \fivefuseh{1==N}{1==H;2==F}{a} +% \end{verbatim} +% +% \begin{macro}{\fivefuseh} +% \begin{macro}{\@five@fuseh} +% \begin{macro}{\@five@@fuseh} +% \begin{macro}{\@fivefuseh} +% \begin{macrocode} +\def\fivefuseh{\@ifnextchar({\@five@fuseh(@}{\@five@fuseh(@)}} +\def\@five@fuseh(#1){\@ifnextchar[{\@five@@fuseh(#1)[@}% +{\@five@@fuseh(#1)[@]}} +\def\@five@@fuseh(#1)[#2]#3#4#5{\@ifnextchar[% +{\@fivefuseh(#1)[#2]{#3}{#4}{#5}[@}% +{\@fivefuseh(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@fivefuseh(#1)[#2]#3#4#5[#6]{% +\iniatom\iniflag%initialize +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\test@vertix@sixv{#3}{d}{c}{b}{f}{e}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\fivefuseposh{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-240,-400)% + \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `fivefuseh' origin: % + (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE to a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\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 -> \hskbondvert 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 6 \@eee -> \skbondd etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % 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(233,0){\circle{180}}% %circle +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@fiveh +\fi\fi\fi\fi\fi\fi\fi}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%% +% % setting heteroatoms % +% %%%%%%%%%%%%%%%%%%%%%%% +\set@hetatom@sixh{#3}{5}{1}{5}{-1}% % for 1 to 3 +\set@hetatom@sixh{#3}{10}{4}{7}{-1}% % for 4 to 5 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\setsixringh{#4}{5}{1}{5}{-1}% % for 1 to 3 +\setsixringh{#4}{10}{4}{7}{-1}% % for 4 to 5 +\end{picture}% +{\let\XyMTeXWarning\@gobble +\fivefuseposh{#5}}%for FuseWaring when nested% +\iniatom\iniflag}% %end of \fivefuseh macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\fivefuseposh| is used in the definition of +% the |\sixfusehi| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\fivefuseposh} +% \begin{macrocode} +\def\fivefuseposh#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer c\relax + \XyMTeXWarning{Not-used fusion at bond `c'}% +\fi +\if\memBer C\relax + \XyMTeXWarning{Not-used fusion at bond `C'}% +\fi +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `B'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `b'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `A'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \gdef\fuseBx{406}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `a'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \gdef\fuseAx{406}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseAx{406}\gdef\fuseAy{0}% + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseBx{406}\gdef\fuseBy{0}% + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \fivefuseposh +% \end{macrocode} +% \end{macro} +% +% \subsection{Inverse horizontal type} +% +% The macro |\fivefusehi| 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 fusing unit * +% * (horizontal type, inverse type) * +% ************************************ +% +% 2 ----- 3 +% * | +% the original point 1 * | +% * | +% _____| +% 5 4 +% \end{verbatim} +% +% The macro |\fivefusehi| has three arguments |ATOMLIST|, |SUBSLIST| +% and |FUSE| +% 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} +% \fivefusehi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, d, or e) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as 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. +% +% \fivefusehi{1==N}{1==H;2==F}{a} +% \end{verbatim} +% +% \begin{macro}{\fivefusehi} +% \begin{macro}{\@five@fusehi} +% \begin{macro}{\@five@@fusehi} +% \begin{macro}{\@fivefusehi} +% \begin{macrocode} +\def\fivefusehi{\@ifnextchar({\@five@fusehi(@}{\@five@fusehi(@)}} +\def\@five@fusehi(#1){\@ifnextchar[{\@five@@fusehi(#1)[@}% +{\@five@@fusehi(#1)[@]}} +\def\@five@@fusehi(#1)[#2]#3#4#5{\@ifnextchar[% +{\@fivefusehi(#1)[#2]{#3}{#4}{#5}[@}% +{\@fivefusehi(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@fivefusehi(#1)[#2]#3#4#5[#6]{% +\iniatom\iniflag%initialize +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\test@vertix@sixv{#3}{a}{b}{c}{e}{f}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adjustment of attached positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\fivefuseposhi{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else + \begin{picture}(800,880)(-240,-400)% + \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `fivefusehi' origin: % + (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +% changed FUSE to a list 1993/11/21 by Shinsaku Fujita +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\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(173,0){\circle{180}}% %circle +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@fivehi +\fi\fi\fi\fi\fi\fi\fi}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%% +% % setting heteroatoms % +% %%%%%%%%%%%%%%%%%%%%%%% +\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{picture}% +{\let\XyMTeXWarning\@gobble +\fivefuseposhi{#5}}%for FuseWaring when nested +\iniatom\iniflag}% %end of \fivefusehi macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\fivefuseposhi| is used in the definition of +% the |\sixfuseh| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\fivefuseposhi} +% \begin{macrocode} +\def\fivefuseposhi#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{171}% + \gdef\fuseBx{303}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{171}% + \gdef\fuseAx{303}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \XyMTeXWarning{Not-used fusion at bond `c'}% +\fi +\if\memBer C\relax + \XyMTeXWarning{Not-used fusion at bond `C'}% +\fi +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseAx{303}\gdef\fuseAy{-171}% + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseBx{303}\gdef\fuseBy{-171}% + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer e\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `e'}% + \else + \gdef\fuseAx{103}\gdef\fuseAy{-171}% + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer E\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `E'}% + \else + \gdef\fuseBx{103}\gdef\fuseBy{-171}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi}}}% end of the macro \fivefuseposhi +% \end{macrocode} +% \end{macro} +% +% \section{Four-membered fused ring unit} +% +% The macro |\fourfuse| typesets a four-membered ring unit for ring fusion. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ************************** +% * fourfuse derivatives * +% * (vertical type) * +% ************************** +% The following numbering is adopted in this macro. +% +% c +% 4 _____ 3 +% d | | b +% | | +% 1 ----- 2<===== the original point +% a +% \end{verbatim} +% +% The macro |\fourfuse| has two arguments |ATOMLIST|, |SUBSLIST| and |FUSE| +% 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} +% \fourfuse(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 e, each of which indicates the presence of +% an inner (endcyclic) double bond on the corresponding position. +% The option `$n+$' ($n=1$ to $4$) 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 +% e : 4,1-double bond +% +% {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 4 atoms) +% +% for n = 1 to 4 +% +% 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 4 +% +% nD : exocyclic double bond at n-atom +% n or nS : exocyclic single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% nSA : alpha single bond at n-atom (boldface) +% nSB : beta single bond at n-atom (dotted line) +% nSa : alpha (not specified) single bond at n-atom +% nSb : beta (not specified) single bond at n-atom +% +% nSd : alpha single bond at n-atom (dotted line) +% with an alternative direction to nSA +% nSu : beta single bond at n-atom (boldface) +% with an alternative direction to nSB +% nFA : alpha single bond at n-atom (dotted line) +% for ring fusion +% nFB : beta single bond at n-atom (boldface) +% for ring fusion +% nGA : alpha single bond at n-atom (dotted line) +% for the other ring fusion +% nGB : beta single bond at n-atom (boldface) +% for the other ring fusion +% \end{verbatim} +% +% The argument |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, c, or d) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as non-fused positions. +% +% \begin{verbatim} +% OMIT: one or more bonds omitted (a, b, c, or d) +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \fourfuse{1==N}{1==H;2==F}{c} +% \fourfuse[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}{a} +% \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} +% +% \begin{macro}{\fourfuse} +% \begin{macro}{\@four@fuse} +% \begin{macro}{\@four@@fuse} +% \begin{macro}{\@fourfuse} +% \begin{macrocode} +\def\fourfuse{\@ifnextchar({\@four@fuse(@}{\@four@fuse(@)}} +\def\@four@fuse(#1){\@ifnextchar[{\@four@@fuse(#1)[@}% +{\@four@@fuse(#1)[@]}} +\def\@four@@fuse(#1)[#2]#3#4#5{\@ifnextchar[% +{\@fourfuse(#1)[#2]{#3}{#4}{#5}[@}% +{\@fourfuse(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@fourfuse(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize +\test@vertix@sixv{#3}{e}{c}{b}{f}{@}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adustment of subs positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\fourfusepos{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(800,880)(-571,-137)% + \iforigpt\put(-571,-137){\circle*{50}}% + \put(-171,103){\circle{50}}% + \typeout{command `fourfuse' origin: % + (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\put(0,0){\set@skel@longbond{#1}{a}{skbondshorizi}}% + % bond between 1 and 2 \@aaa -> \skbondshorizi etc +\put(-142,0){\set@skel@bond{#1}{b}{b}}% + % bond between 2 and 3 \@bbb -> \skbondb etc +\put(0,0){\set@skel@longbond{#1}{c}{skbondshoriz}}% + % bond between 3 and 4 \@ccc -> \skbondshoriz etc +\put(0,0){\set@skel@bond{#1}{d}{e}}% + % bond between 4 and 1 \@ddd -> \skbonde etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r% +\else\if\member a\relax \put(0,0){\bondshorizi}% +\else\if\member b\relax \put(-142,0){\bondb}% +\else\if\member c\relax \put(0,0){\bondshoriz}% +\else\if\member d\relax \put(0,0){\bonde}% +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@fourv +\fi\fi\fi\fi\fi}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%% +% % setting heteroatoms % +% %%%%%%%%%%%%%%%%%%%%%%% +\put(-142,0){\set@hetatom@sixv{#3}{5}{1}{4}{-1}}% for 2 to 3 +\put(0,0){\set@hetatom@sixv{#3}{4}{4}{6}{0}}% for 1 +\put(0,0){\set@hetatom@sixv{#3}{2}{5}{7}{0}}% for 4 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-142,0){\setsixringv{#4}{5}{1}{4}{-1}}% for 2 to 3 +\put(0,0){\setsixringv{#4}{4}{4}{6}{0}}% for 1 +\put(0,0){\setsixringv{#4}{2}{5}{7}{0}}% for 4 +\end{picture}% +\fourfusepos{#5}%%for FuseWaring when nested +\iniatom\iniflag +\global\@smallringswtrue%for permition at a center bond +}% %end of \fourfuse macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\fourfusepos| is used in the definition of +% the |\sixfuseh| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\fourfusepos} +% \begin{macrocode} +\def\fourfusepos#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \gdef\fuseBx{29}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseAx{29}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{29}\gdef\fuseAy{103}% + \gdef\fuseBx{29}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{29}\gdef\fuseBy{103}% + \gdef\fuseAx{29}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{29}\gdef\fuseAy{303}% + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else + \gdef\fuseBx{29}\gdef\fuseBy{303}% + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer d\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `d'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{303}% + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer D\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `D'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{303}% + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \fourfusepos +% \end{macrocode} +% \end{macro} +% +% \section{Three-membered fusing unit} +% \subsection{Vertical type} +% +% The macro |\threefusev| typesets a three-membered ring to be fused. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ********************** +% * theree fusing unit * +% * (vertical type) * +% ********************** +% +% b +% 3--------2 +% c ` / a +% `1/ <===== the original point +% \end{verbatim} +% +% The macro |\threefusev| has two arguments |ATOMLIST|, |SUBSLIST| and +% |FUSE| 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} +% \threefusev(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, or c) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as non-fused positions. +% +% \begin{verbatim} +% OMIT: one or more bonds omitted (a, b, or c) +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \threefusev{1==N}{1==Cl;2==F}{b} +% \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} +% +% \begin{macro}{\threefusev} +% \begin{macro}{\@three@fusev} +% \begin{macro}{\@three@@fusev} +% \begin{macro}{\@threefusev} +% \begin{macrocode} +\def\threefusev{\@ifnextchar({\@three@fusev(@}{\@three@fusev(@)}} +\def\@three@fusev(#1){\@ifnextchar[{\@three@@fusev(#1)[@}% +{\@three@@fusev(#1)[@]}} +\def\@three@@fusev(#1)[#2]#3#4#5{\@ifnextchar[% +{\@threefusev(#1)[#2]{#3}{#4}{#5}[@}% +{\@threefusev(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@threefusev(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize +\test@vertix@sixv{#3}{d}{b}{f}{@}{@}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adustment of subs positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\threefuseposv{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(800,580)(-468,-240)% + \iforigpt \put(-468,-240){\circle*{50}}% + \put(-68,0){\circle{50}}% + \typeout{command `threefusevv' origin: % + (68,0) ---> (468,240)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\put(-68,0){\set@skel@longbond{#1}{a}{skbondtria}}% + % bond between 1 and 2 \@aaa -> \skbondtria etc +\put(0,-132){\set@skel@longbond{#1}{b}{skbondshoriz}}% + % bond between 2 and 3 \@bbb -> \skbondb etc +\put(-68,0){\set@skel@longbond{#1}{c}{skbondtrib}}% + % bond between 3 and 1 \@ccc -> \skbondtria etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r\relax% +\else\if\member a\relax\put(-68,0){\bondtria}% +\else\if\member b\relax\put(0,-126){\bondshoriz}% +\else\if\member c\relax\put(-68,0){\bondtrib}% +\else\if\member A\relax% aromatic circle + \put(-70,108){\circle{100}}% %circle +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@threev +\fi\fi\fi\fi\fi% +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting hetero atoms % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-68,0){\set@hetatom@sixv{#3}{3}{3}{5}{0}% +\if@clip\global\@cliptrue\fi +}%subst 1 +\put(-142,-132){\set@hetatom@sixv{#3}{0}{1}{3}{0}% +\if@bclip\global\@bcliptrue\fi +}%subst 2 +\put(0,-132){\set@hetatom@sixv{#3}{3}{5}{7}{0}% +\if@fclip\global\@fcliptrue\fi +}%subst 3 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-68,0){\setsixringv{#4}{3}{3}{5}{0}}%subst 1 +\put(-142,-132){\setsixringv{#4}{0}{1}{3}{0}}%subst 2 +\put(0,-132){\setsixringv{#4}{3}{5}{7}{0}}%subst 3 +\end{picture}% +\threefuseposv{#5}%%for FuseWaring when nested +\iniatom\iniflag +\global\@smallringswtrue%for permition at a center bond +}% %end of \threefusev macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\threefuseposv| is used in the definition of +% the |\threefusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\threefuseposv} +% \begin{macrocode} +\def\threefuseposv#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{-68}\gdef\fuseAy{0}% +% \gdef\fuseBx{29}\gdef\fuseBy{171}% + \gdef\fuseBx{35}\gdef\fuseBy{171}%corrected + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else +% \gdef\fuseBx{-68}\gdef\fuseBy{0}% + \gdef\fuseBx{-74}\gdef\fuseBy{0}%corrected + \gdef\fuseAx{29}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{29}\gdef\fuseAy{171}% + \gdef\fuseBx{-171}\gdef\fuseBy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{29}\gdef\fuseBy{171}% + \gdef\fuseAx{-171}\gdef\fuseAy{171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{171}% + \gdef\fuseBx{-68}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{171}% + \gdef\fuseAx{-68}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \threefuseposv +% \end{macrocode} +% \end{macro} +% +% \subsection{Inverse vertical type} +% +% The macro |\threefusevi| typesets a three-membered ring of +% inverse vertical type. The following numbering is adopted +% in this macro. +% \changes{v1.02}{1998/10/20}{Newly added commands: +% \cs{threefusevi}} +% +% \begin{verbatim} +% **************************** +% * thereehetero derivatives * +% * (inverse vertical type) * +% **************************** +% +% /1` <===== the original point +% c / ` a +% 3--------2 +% b +% \end{verbatim} +% +% The macro |\threefusevi| has two arguments |ATOMLIST|, |SUBSLIST| and |FUSE| +% 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} +% \threefusevi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, or c) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as non-fused positions. +% +% \begin{verbatim} +% OMIT: one or more bonds omitted (a, b, or c) +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \threefusevi{1==N}{1==Cl;2==F}{c} +% \threefusevi[c]{1==N}{1==Cl;3==F;2==CH$_{3}$}{a} +% \threefusevi{1==N}{1D==O}{b} +% \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} +% +% \begin{macro}{\threefusevi} +% \begin{macro}{\@three@fusevi} +% \begin{macro}{\@three@@fusevi} +% \begin{macro}{\@threefusevi} +% \begin{macrocode} +\def\threefusevi{\@ifnextchar({\@three@fusevi(@}{\@three@fusevi(@)}} +\def\@three@fusevi(#1){\@ifnextchar[{\@three@@fusevi(#1)[@}% +{\@three@@fusevi(#1)[@]}} +\def\@three@@fusevi(#1)[#2]#3#4#5{\@ifnextchar[% +{\@threefusevi(#1)[#2]{#3}{#4}{#5}[@}% +{\@threefusevi(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@threefusevi(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%%%% +% % treatment of atom list % +% %%%%%%%%%%%%%%%%%%%%%%%%%% +\iniatom\iniflag%initialize +\test@vertix@sixv{#3}{a}{c}{e}{@}{@}{@}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % adustment of subs positions % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\threefuseposvi{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(800,580)(-468,-340)% + \iforigpt \put(-468,-340){\circle*{50}}% + \put(-68,0){\circle{50}}% + \typeout{command `threefusevi' origin: % + (0,0) ---> (-468,-340)}\fi% +\fi +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%% +% % outer skeleton % +% %%%%%%%%%%%%%%%%%% +{\resetbdsw% +\@bond@fuse@omit{#5}{#6}% +\put(-68,0){\set@skel@longbond{#1}{a}{skBondtria}}% + % bond between 1 and 2 \@aaa -> \skBondtria etc +\put(0,-275){\set@skel@longbond{#1}{b}{skbondshorizi}}% + % bond between 2 and 3 \@bbb -> \skbondb etc +\put(-68,0){\set@skel@longbond{#1}{c}{skBondtrib}}% + % bond between 3 and 1 \@ccc -> \skBondtrib etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r\relax% +\else\if\member a\relax\put(-68,0){\Bondtria}% +\else\if\member b\relax\put(0,-274){\bondshorizi}% +\else\if\member c\relax\put(-68,0){\Bondtrib}% +\else\if\member A\relax% aromatic circle + \put(-70,-108){\circle{100}}% %circle +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@threevi +\fi\fi\fi\fi\fi% +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting hetero atoms % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-68,-406){\set@hetatom@sixv{#3}{0}{0}{2}{0}% +\if@aclip\global\@acliptrue\fi +}%subst 1 +\put(0,-275){\set@hetatom@sixv{#3}{2}{4}{6}{0}% +\if@cclip\global\@ccliptrue\fi +}%subst 3 +\put(-142,-275){\set@hetatom@sixv{#3}{1}{2}{4}{0}% +\if@eclip\global\@ecliptrue\fi +}%subst 2 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-68,-406){\setsixringv{#4}{0}{0}{2}{0}}%subst 1 +\put(0,-275){\setsixringv{#4}{2}{4}{6}{0}}%subst 3 +\put(-142,-275){\setsixringv{#4}{1}{2}{4}{0}}%subst 2 +\end{picture}% +\threefuseposvi{#5}%%for FuseWaring when nested +\iniatom\iniflag +\global\@smallringswtrue%for permition at a center bond +}% %end of \threefusevi macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\threefuseposvi| is used in the definition of +% the |\threefusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\threefuseposvi} +% \begin{macrocode} +\def\threefuseposvi#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{-68}\gdef\fuseAy{0}% +% \gdef\fuseBx{29}\gdef\fuseBy{-171}% + \gdef\fuseBx{35}\gdef\fuseBy{-171}%corrected + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else +% \gdef\fuseBx{-68}\gdef\fuseBy{0}% + \gdef\fuseBx{-74}\gdef\fuseBy{0}%corrected + \gdef\fuseAx{29}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{29}\gdef\fuseAy{-171}% + \gdef\fuseBx{-171}\gdef\fuseBy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{29}\gdef\fuseBy{-171}% + \gdef\fuseAx{-171}\gdef\fuseAy{-171}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{-171}% + \gdef\fuseBx{-68}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{-171}% + \gdef\fuseAx{-68}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \threefuseposvi +% \end{macrocode} +% \end{macro} +% +% \subsection{Horizontal type} +% +% The macro |\threefuseh| typesets a three-membered ring to be fused. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% **************************** +% * thereehetero fusing unit * +% * (horizontal type) * +% **************************** + +% aaa fff +% 3 +% | ` c +% b | 1 bbb ccc +% | / a +% 2/ +% ddd eee +% +% \end{verbatim} +% +% The macro |\threefuseh| has two arguments |ATOMLIST|, |SUBSLIST| and |FUSE| +% 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} +% \threefuseh(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, or c) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as non-fused positions. +% +% \begin{verbatim} +% OMIT: one or more bonds omitted (a, b, or c) +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \threefuseh{1==N}{1==Cl;2==F}{c} +% \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} +% +% \begin{macro}{\threefuseh} +% \begin{macro}{\@three@fuseh} +% \begin{macro}{\@three@@fuseh} +% \begin{macro}{\@threefuseh} +% \begin{macrocode} +\def\threefuseh{\@ifnextchar({\@three@fuseh(@}{\@three@fuseh(@)}} +\def\@three@fuseh(#1){\@ifnextchar[{\@three@@fuseh(#1)[@}% +{\@three@@fuseh(#1)[@]}} +\def\@three@@fuseh(#1)[#2]#3#4#5{\@ifnextchar[% +{\@threefuseh(#1)[#2]{#3}{#4}{#5}[@}% +{\@threefuseh(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@threefuseh(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \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 % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\threefuseposh{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(580,700)(-200,-240)% + \iforigpt \put(-200,-200){\circle*{50}}% + \put(0,0){\circle{50}}% + \typeout{command `threefuseh' origin: % + (0,0) ---> (200,200)}\fi% +\fi +% \end{macrocode} +% +% \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@fuse@omit{#5}{#6}% +\put(0,0){\set@skel@bond{#1}{a}{c}}% + % bond between 1 and 2 \@aaa -> \skbondc etc +\put(171,-103){\set@skel@bond{#1}{b}{e}}% + % bond between 2 and 3 \@bbb -> \skbonde etc +\put(0,-200){\set@skel@bond{#1}{c}{a}}% + % bond between 3 and 1 \@ccc -> \skbonda etc +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%% +% % inner double bond % +% %%%%%%%%%%%%%%%%%%%%% +\@tfor\member:=#2\do{% +\if\member r\relax% +\else\if\member a\relax\put(0,0){\bondc}% +\else\if\member b\relax\put(171,-103){\bonde}% +\else\if\member c\relax\put(0,-200){\bonda}% +\else\if\member A\relax% aromatic circle + \put(70,103){\circle{100}}% %circle +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@threeh +\fi\fi\fi\fi\fi% +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting hetero atoms % +% %%%%%%%%%%%%%%%%%%%%%%%% +\iniflag +%\put(-235,103){\set@hetatom@sixh{#3}{3}{3}{5}{0}% +\put(-215,103){\set@hetatom@sixh{#3}{3}{3}{5}{0}% +\if@clip \global\@cliptrue\fi}%subst 1 <--six h 4 +\put(-103,29){\set@hetatom@sixh{#3}{-1}{1}{3}{0}% +\if@bclip \global\@bcliptrue\fi}%subst 3 <--six h 2 +\put(-103,171){\set@hetatom@sixh{#3}{4}{5}{7}{0}% +\if@fclip \global\@fcliptrue\fi}%subst 2 <--six h 6 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-235,103){\setsixringh{#4}{3}{3}{5}{0}}%subst 1 +\put(-103,29){\setsixringh{#4}{-1}{1}{3}{0}}%subst 3 +\put(-103,171){\setsixringh{#4}{4}{5}{7}{0}}%subst 2 +\end{picture}% +\threefuseposh{#5}%%for FuseWaring when nested +\iniatom\iniflag +\global\@smallringswtrue%for permition at a center bond +}% %end of \threefuseh macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\threefuseposh| is used in the definition of +% the |\threefusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\threefuseposh} +% \begin{macrocode} +\def\threefuseposh#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{171}\gdef\fuseAy{103}%corrected + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{171}\gdef\fuseBy{103}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{0}\gdef\fuseBy{200}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{0}\gdef\fuseAy{200}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{200}% +% \gdef\fuseBx{171}\gdef\fuseBy{103}% + \gdef\fuseBx{171}\gdef\fuseBy{97}%corrected + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else +% \gdef\fuseBx{0}\gdef\fuseBy{200}% + \gdef\fuseBx{0}\gdef\fuseBy{206}%corrected + \gdef\fuseAx{171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \threefuseposh +% \end{macrocode} +% \end{macro} +% +% \subsection{Inverse horizontal type} +% +% The macro |\threefusehi| typesets a three-membered ring to be fused. +% The following numbering is adopted in this macro. +% +% \begin{verbatim} +% ******************************* +% * thereehetero fusing unit * +% * (vertical horizontal type) * +% ******************************* +% +% aaa bbb +% c 3 +% / | +% eee 1 | b +% fff a` | +% 2 <---original point +% ccc ddd +% \end{verbatim} +% +% The macro |\threefusehi| has two arguments |ATOMLIST|, |SUBSLIST| and |FUSE| +% 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} +% \threefusehi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}{FUSE}[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 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 |FUSE| represents one bond to be omitted. +% The omitted edge is regarded as a fused position. +% +% \begin{verbatim} +% FUSE: one bond omitted (a, b, or c) +% \end{verbatim} +% +% The argument |OMIT| represents one or more bonds to be omitted. +% The omitted edges are regarded as non-fused positions. +% +% \begin{verbatim} +% OMIT: one or more bonds omitted (a, b, or c) +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \threefusehi{1==N}{1==Cl;2==F}{c} +% \threefusehi[c]{1==N}{1==Cl;3==F;2==CH$_{3}$}{a} +% \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} +% +% \begin{macro}{\threefusehi} +% \begin{macro}{\@three@fusehi} +% \begin{macro}{\@three@@fusehi} +% \begin{macro}{\@threefusehi} +% \begin{macrocode} +\def\threefusehi{\@ifnextchar({\@three@fusehi(@}{\@three@fusehi(@)}} +\def\@three@fusehi(#1){\@ifnextchar[{\@three@@fusehi(#1)[@}% +{\@three@@fusehi(#1)[@]}} +\def\@three@@fusehi(#1)[#2]#3#4#5{\@ifnextchar[% +{\@threefusehi(#1)[#2]{#3}{#4}{#5}[@}% +{\@threefusehi(#1)[#2]{#3}{#4}{#5}[@]}} +\def\@threefusehi(#1)[#2]#3#4#5[#6]{% +% \end{macrocode} +% +% \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 % +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\threefuseposhi{#5}% +\if@sixfuseposv + \yl@shiftii=-\fuseAx + \yl@shifti=-\fuseAy + \advance\yl@shiftii\yl@xdiff + \advance\yl@shifti\yl@ydiff + \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti) + \reset@yl@xydiff%1999/1/6 by S. Fujita +\else +\begin{picture}(580,700)(-400,-240)% + \iforigpt \put(-400,-200){\circle*{50}}% + \put(0,0){\circle{50}}% + \typeout{command `threefusehi' origin: % + (0,0) ---> (400,200)}\fi% +\fi +% \end{macrocode} +% +% \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@fuse@omit{#5}{#6}% +\put(0,0){\set@skel@bond{#1}{a}{d}}% + % bond between 1 and 2 \@aaa -> \skbondd etc +\put(-171,-103){\set@skel@bond{#1}{b}{b}}% + % bond between 2 and 3 \@bbb -> \skbondb etc +\put(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(0,0){\bondd}% +\else\if\member b\relax\put(-171,-103){\bondb}% +\else\if\member c\relax\put(0,-200){\bondf}% +\else\if\member A\relax% aromatic circle + \put(70,103){\circle{100}}% %circle +\else +% %%%%%%%%%%%%%%%%%%%%%%%%% +% % inner bond attachment % +% %%%%%%%%%%%%%%%%%%%%%%%%% + \expandafter\twoCH@@R\member//% + \set@fusionadd@threehi +\fi\fi\fi\fi\fi% +}% +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting hetero atoms % +% %%%%%%%%%%%%%%%%%%%%%%%% +\iniflag +\put(-171,103){\set@hetatom@sixh{#3}{0}{0}{2}{0}% +\if@aclip \global\@acliptrue\fi}%subst 1 <--six h 1 +\put(-303,29){\set@hetatom@sixh{#3}{0}{2}{4}{0}% +\if@cclip \global\@ccliptrue\fi}%subst 3 <--six h 3 +\put(-303,171){\set@hetatom@sixh{#3}{3}{4}{6}{0}% +\if@eclip \global\@ecliptrue\fi}%subst 2 <--six h 5 +% \end{macrocode} +% +% \begin{macrocode} +% %%%%%%%%%%%%%%%%%%%%%%%% +% % setting substituents % +% %%%%%%%%%%%%%%%%%%%%%%%% +\put(-171,103){\setsixringh{#4}{0}{0}{2}{0}}%subst 1 +\put(-303,29){\setsixringh{#4}{0}{2}{4}{0}}%subst 3 +\put(-303,171){\setsixringh{#4}{3}{4}{6}{0}}%subst 2 +\end{picture}% +\threefuseposhi{#5}%%for FuseWaring when nested +\iniatom\iniflag +\global\@smallringswtrue%for permition at a center bond +}% %end of \threefusehi macro +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\threefuseposhi| is used in the definition of +% the |\threefusev| macro to detect a fused edge, where +% the coordinates of a reference terminal (|\fuseAx| and |\fuseAy|) +% and of the other terminal of the edge (|\fuseBx| and |\fuseBy|) +% are given for the successive process of adjustment. +% +% \begin{macro}{\threefuseposhi} +% \begin{macrocode} +\def\threefuseposhi#1{% +\global\@sixfuseposvfalse +{\resetbdsw% +\@tfor\memBer:=#1\do{% +\if\memBer a\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `a'}% + \else + \gdef\fuseAx{-171}\gdef\fuseAy{103}%corrected + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer A\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `A'}% + \else + \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer b\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bond at bond `b'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{0}% + \gdef\fuseBx{0}\gdef\fuseBy{200}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer B\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `B'}% + \else + \gdef\fuseBx{0}\gdef\fuseBy{0}% + \gdef\fuseAx{0}\gdef\fuseAy{200}% + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer c\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `c'}% + \else + \gdef\fuseAx{0}\gdef\fuseAy{200}% +% \gdef\fuseBx{-171}\gdef\fuseBy{103}% + \gdef\fuseBx{-171}\gdef\fuseBy{97}%corrected + \global\@sixfuseposvtrue + \fi +\fi% +\if\memBer C\relax + \if@sixfuseposv + \XyMTeXWarning{Double fused bonds at bond `C'}% + \else +% \gdef\fuseBx{0}\gdef\fuseBy{200}% + \gdef\fuseBx{0}\gdef\fuseBy{206}%corrected + \gdef\fuseAx{-171}\gdef\fuseAy{103}% + \global\@sixfuseposvtrue + \fi +\fi% +}}}% end of the macro \threefuseposhi +%</fusering> +% \end{macrocode} +% \end{macro} +% +% \Finale +% +\endinput +
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/fusering.ins b/Master/texmf-dist/source/latex/xymtex/fusering.ins new file mode 100644 index 00000000000..0c228764feb --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/fusering.ins @@ -0,0 +1,49 @@ +\def\batchfile{fusering.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1998 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.02 Released on October 31, 1998 (private version)
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{fusering.drv}{t}{%
+ \from{fusering.dtx}{driver}}
+
+\generateFile{fusering.sty}{t}{%
+ \from{fusering.dtx}{fusering}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/hcycle.drv b/Master/texmf-dist/source/latex/xymtex/hcycle.drv new file mode 100644 index 00000000000..6fc2980ee14 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hcycle.drv @@ -0,0 +1,81 @@ +%% +%% This is file `hcycle.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hcycle.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996,1998 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1996 (private version) +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1996,1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: hcycle.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{hcycle.dtx}[1996/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{hcycle.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Further Hetrocycles by {\sffamily hcycle.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{hcycle.dtx} +\end{document} +\endinput +%% +%% End of file `hcycle.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/hcycle.dtx b/Master/texmf-dist/source/latex/xymtex/hcycle.dtx new file mode 100644 index 00000000000..1ad1c0059f9 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hcycle.dtx @@ -0,0 +1,780 @@ +% \iffalse meta-comment
+%% File: hcycle.dtx
+%
+% Copyright 1993,1996,1998 by Shinsaku Fujita
+%
+% This file is part of XyMTeX system.
+% -------------------------------------
+%
+% This file is a successor to:
+%
+% hcycle.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].
+%
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name and
+% directory name; or
+% (2) if you do make changes,
+% (a) you name it something other than the names included in the
+% ``xymtex'' directory and
+% (b) you are requested to leave this notice intact.
+% This restriction ensures that all standard styles are identical.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
+% Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
+%
+% New address:
+% Shinsaku Fujita,
+% Department of Chemistry and Materials Technology,
+% Kyoto Institute of Technology, \\
+% Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hcycle}
+% \def\versi@ndate{December 01, 1993}
+% \def\versi@nno{ver1.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hcycle}
+% \def\versi@ndate{August 16, 1996}
+% \def\versi@nno{ver1.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hcycle}
+% \def\versi@ndate{October 31, 1998}
+% \def\versi@nno{ver1.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{740}
+%% \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}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+\ProvidesFile{hcycle.dtx}[1996/12/25 v2.00 XyMTeX{} package file]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{hcycle.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{Further Hetrocycles by {\sffamily hcycle.sty}
+(\fileversion) of \XyMTeX{}}
+\author{Shinsaku Fujita \\
+Department of Chemistry and Materials Technology, \\
+Kyoto Institute of Technology, \\
+Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% % (old address)
+% % Ashigara Research Laboratories,
+% % Fuji Photo Film Co., Ltd., \\
+% % Minami-Ashigara, Kanagawa, 250-01 Japan
+}
+\date{\filedate}
+%
+\begin{document}
+ \maketitle
+ \DocInput{hcycle.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \section{Introduction}\label{hcycle:intro}
+%
+% \subsection{Options for {\sffamily docstrip}}
+%
+% \DeleteShortVerb{\|}
+% \begin{center}
+% \begin{tabular}{|l|l|}
+% \hline
+% \emph{option} & \emph{function}\\ \hline
+% hcycle & hcycle.sty \\
+% driver & driver for this dtx file \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \MakeShortVerb{\|}
+%
+% \subsection{Version Information}
+%
+% \begin{macrocode}
+%<*hcycle>
+\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
+\typeout{ -- Released December 25, 1998 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{hcycle}
+\def\versi@ndate{December 25, 1998}
+\def\versi@nno{ver2.00}
+\def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
+\space[\copyrighth@lder]}
+% \end{macrocode}
+%
+% \section{List of commands for hcycle.sty}
+%
+% \begin{verbatim}
+% ********************************
+% * hcycle.sty: list of commands *
+% ********************************
+%
+% <Convention for bond-setting>
+%
+% \@pyrana
+% \@pyranb
+% \@pyranc
+%
+% <Pyranose and Furanose>
+%
+% \pyranose \@pyranose
+% \furanose \@furanose
+%
+% <Adustment as substituents>
+%
+% \ylpyranoseposition
+% \ylfuranoseposition
+% \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 hcycle.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}{}
+\unitlength=0.1pt
+% \end{macrocode}
+%
+% \section{Macros for setting substituents}
+%
+% Macros |\@pyrana| to |\@pyranc| are used to set substituents
+% on each position of a pyranose and furanose. 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{macro}{\@pyrana}
+% \begin{macro}{\@pyranb}
+% \begin{macro}{\@pyranbb}
+% \begin{macro}{\@pyranbB}
+% \begin{macro}{\@pyranc}
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}}
+% \begin{macrocode}
+% **************************************************
+% * setting substituents for pyranose and furanose *
+% **************************************************
+% %%%%%%%%%%%%%%%
+% % subst. on 1 %
+% %%%%%%%%%%%%%%%
+\def\@pyrana{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \put(0,0){\line(1,0){120}}% single bond at 1
+ \putratom{130}{-30}{\@memberb}% right type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=32
+ \yl@ydiff=72
+ \put(0,0){\line(0,-1){118}}% single bond at 1 alpha (down)
+ \putratom{-32}{-190}{\@memberb}% right type
+ \else\if\@tmpc b%(e) beta
+ \yl@xdiff=32
+ \yl@ydiff=-12
+ \put(0,0){\line(0,1){118}}% single bond at 1 beta (up)
+ \putratom{-32}{130}{\@memberb}% right type
+ \else\if\@tmpc A% alpha
+ \yl@xdiff=-10
+ \yl@ydiff=60
+ \put(0,0){\line(1,-1){120}}% single bond at 1
+ \putratom{130}{-180}{\@memberb}% right type
+ \else\if\@tmpc B% beta
+ \yl@xdiff=-10
+ \yl@ydiff=10
+ \put(0,0){\line(1,1){120}}% single bond at 1
+ \putratom{130}{110}{\@memberb}% right type
+ \fi\fi\fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \put(0,-15){\line(1,0){120}}% double bond at 1
+ \put(0,15){\line(1,0){120}}% double bond at 1
+ \putratom{130}{-30}{\@memberb}% right type
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=30
+ \put(0,0){\line(1,0){120}}% single bond at 1
+ \putratom{130}{-30}{\@memberb}% right type
+ \fi\fi}%
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/25}{\cs{@pyranb} is divided into
+% \cs{@pyranb}, \cs{@pyranbb} and \cs{@pyranbB}} +% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%
+% % subst. on 2,3,5 %
+% %%%%%%%%%%%%%%%%%%%
+% %%%%%%%%%%%%%%%
+% % subst. on 2 %
+% %%%%%%%%%%%%%%%
+\def\@pyranb{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=60
+ \put(0,0){\line(1,-1){120}}% single bond at 1
+ \putratom{130}{-180}{\@memberb}% left type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=32
+ \yl@ydiff=72
+ \put(0,0){\line(0,-1){118}}% single bond alpha (down)
+ \putlratom{-32}{-190}{\@memberb}% left & right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=32
+ \yl@ydiff=-12
+ \put(0,0){\line(0,1){118}}% single bond beta (up)
+ \putlratom{-32}{130}{\@memberb}% left & right type
+ \fi\fi\fi%\fi\fi%
+ \else \if\@tmpb D%double bond: Added by SF 1998/10/25
+ \yl@xdiff=-10
+ \yl@ydiff=60
+ \put(-15,-15){\line(1,-1){120}}% double bond at 1
+ \put(0,15){\line(1,-1){120}}% double bond at 1
+ \putratom{130}{-180}{\@memberb}% right type
+ \else%
+ \yl@xdiff=-10
+ \yl@ydiff=10
+ \put(0,0){\line(1,1){120}}% single bond at 1
+ \putratom{130}{110}{\@memberb}% left type
+\fi\fi}%
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 3 %
+% %%%%%%%%%%%%%%%
+\def\@pyranbb{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=60
+ \put(0,0){\line(1,-1){120}}% single bond at 1
+ \putratom{130}{-180}{\@memberb}% left type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=32
+ \yl@ydiff=72
+ \put(0,0){\line(0,-1){118}}% single bond alpha (down)
+ \putlratom{-32}{-190}{\@memberb}% left & right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=32
+ \yl@ydiff=-12
+ \put(0,0){\line(0,1){118}}% single bond beta (up)
+ \putlratom{-32}{130}{\@memberb}% left & right type
+ \fi\fi\fi%\fi\fi%
+ \else \if\@tmpb D%double bond: Added by SF 1998/10/25
+ \yl@xdiff=20
+ \yl@ydiff=60
+ \put(15,-15){\line(-1,-1){120}}% double bond at 1
+ \put(0,15){\line(-1,-1){120}}% double bond at 1
+ \putlatom{-130}{-180}{\@memberb}%left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=60
+ \put(0,0){\line(-1,-1){120}}% single bond at 1
+ \putlatom{-130}{-180}{\@memberb}% left type
+\fi\fi}%
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 5 %
+% %%%%%%%%%%%%%%%
+\def\@pyranbB{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=-10
+ \yl@ydiff=60
+ \put(0,0){\line(1,-1){120}}% single bond at 5
+ \putratom{130}{-180}{\@memberb}% left type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=32
+ \yl@ydiff=72
+ \put(0,0){\line(0,-1){118}}% single bond alpha (down)
+ \putlratom{-32}{-190}{\@memberb}% left & right type
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=32
+ \yl@ydiff=-12
+ \put(0,0){\line(0,1){118}}% single bond beta (up)
+ \putlratom{-32}{130}{\@memberb}% left & right type
+ \fi\fi\fi%\fi\fi%
+ \else \if\@tmpb D%double bond: Added by SF 1998/10/25
+ \yl@xdiff=0
+ \yl@ydiff=-20
+ \put(15,15){\line(-1,1){120}}% double bond at 5
+ \put(0,-15){\line(-1,1){120}}% double bond at 5
+ \putlatom{-120}{140}{\@memberb}%left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=-20
+ \put(0,0){\line(-1,1){120}}% single bond at 1
+ \putlatom{-130}{140}{\@memberb}% left type
+\fi\fi}%
+% \end{macrocode}
+%
+% \changes{v1.02}{1998/10/31}{Adding \cs{yl@xdiff} and \cs{yl@ydiff}} +% \begin{macrocode}
+% %%%%%%%%%%%%%%%
+% % subst. on 4 %
+% %%%%%%%%%%%%%%%
+\def\@pyranc{%
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(-1,0){120}}% single bond at 4
+ \putlatom{-130}{-30}{\@memberb}% left type
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=-32
+ \yl@ydiff=72
+ \put(0,0){\line(0,-1){118}}% single bond at 4 alpha (down)
+ \putlatom{32}{-190}{\@memberb}% left type
+ \else\if\@tmpc b%(e) beta
+ \yl@xdiff=-32
+ \yl@ydiff=-12
+ \put(0,0){\line(0,1){118}}% single bond at 4 beta (up)
+ \putlatom{32}{130}{\@memberb}% left type
+ \else\if\@tmpc A% alpha
+ \yl@xdiff=10
+ \yl@ydiff=60
+ \put(0,0){\line(-1,-1){120}}% single bond at 4
+ \putlatom{-130}{-180}{\@memberb}% left type
+ \else\if\@tmpc B% beta
+ \yl@xdiff=10
+ \yl@ydiff=10
+ \put(0,0){\line(-1,1){120}}% single bond at 4
+ \putlatom{-130}{110}{\@memberb}% left type
+ \fi\fi\fi\fi\fi%
+ \else \if\@tmpb D%double bond
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,-15){\line(-1,0){120}}% double bond at 4
+ \put(0,15){\line(-1,0){120}}% double bond at 4
+ \putlatom{-130}{-30}{\@memberb}% left type
+ \else%
+ \yl@xdiff=10
+ \yl@ydiff=30
+ \put(0,0){\line(-1,0){120}}% single bond at 4
+ \putlatom{-130}{-30}{\@memberb}% left type
+ \fi\fi}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{Pyranose derivatives}
+%
+% The standard skeleton of pyranose is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ***********************
+% * pyranose derivative *
+% ***********************
+%
+% The following numbering is adopted in this macro.
+%
+% 5 e 6
+% ----O
+% d * * f
+% the original point ===> 4 * * 1
+% (0,0) * * a
+% c -----
+% 3 b 2
+% \end{verbatim}
+%
+% The macro |\pyranose| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+% \begin{verbatim}
+%
+% \pyranose[BONDLIST]{SUBSLIST}
+%
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to f, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% \begin{verbatim}
+%
+% BONDLIST =
+%
+% none : mother skeleton
+% 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
+%
+% \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 5 substitution positions)
+%
+% for n = 1 to 5
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nSA : single bond (down) at n-atom (for n=1)
+% nSB : single bond (up) at n-atom (for n=1)
+% nSa : alpha single bond at n-atom
+% nSb : beta single bond at n-atom
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \pyranose{1Sb==Cl;2Sa==F}
+% \pyranose{1Sb==Cl;4Sa==F;2Sa==CH$_{3}$}
+% \pyranose[a]{3Sb==OAc;4Sb==\lmoiety{MeO};5Sb==CH$_{2}$OAc}
+% \end{verbatim}
+%
+% The definition of |\@pyranose| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macros |\@pyrana| to |\@pyranc| described above.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylpyranoseposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\pyranose}
+% \begin{macro}{\@pyranose}
+% \begin{macrocode}
+\def\pyranose{\@ifnextchar[{\@pyranose}{\@pyranose[r]}}
+\def\@pyranose[#1]#2{%
+\@reset@ylsw%
+\ylpyranoseposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(880,800)(-240,-400)
+ \iforigpt \put(-240,-400){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `pyranose' origin: (0,0) ---> (240,400)}
+ \fi%
+\fi
+ \put(0,0){\line(3,5){120}}% %bond 4-5
+ \put(120,200){\line(1,0){252}}% %bond 5-6
+ \put(532,0){\line(-3,5){96}}% %bond 1-6
+ {\thicklines%
+ \put(0,0){\line(3,-5){120}}% %bond 4-3
+ \put(412,-200){\line(3,5){120}}% %bond 2-1
+ \put(120,-200){\line(1,0){292}}}% %bond 3-2
+ \putratom{382}{160}{O}% left type
+ %
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic double bonds
+\else \if\member a%
+ \put(400,-150){\line(3,5){90}}% %double bond 2-1
+\else \if\member b%
+ \put(150,-160){\line(1,0){232}}% %double bond 3-2
+\else \if\member c%
+ \put(50,-12){\line(3,-5){90}}% %double bond 4-3
+\else \if\member d%
+ \put(50,12){\line(3,5){90}}% %double bond 4-5
+\else \if\member e%
+ \put(150,160){\line(1,0){232}}% %double bond 5-6
+\else \if\member f%
+ \put(482,12){\line(-3,5){70}}% %double bond 1-6
+\fi\fi\fi\fi\fi\fi\fi}%
+%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa%0 omit
+ \or \put(532,0){\@pyrana}% subst. on 1
+ \or \put(412,-200){\@pyranb}% subst. on 2
+ \or \put(120,-200){\@pyranbb}% subst. on 3
+ \or \put(0,0){\@pyranc}% subst. on 4
+ \or \put(120,200){\@pyranbB}% subst. on 5
+\fi %end of ifcase
+\fi\fi%
+}\end{picture}}% %end of \pyranose macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylpyranoseposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/25}{New commands for setting substituents} +%
+% \begin{macro}{\ylpyranoseposition}
+% \begin{macrocode}
+\def\ylpyranoseposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
+ \or\gdef\@ylii{-120}\gdef\@yli{-200}\global\@ylswtrue% subst. on 5
+\fi%end of ifcase
+\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Furanose derivatives}
+%
+% The standard skeleton of furanose is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% ***********************
+% * furanose derivative *
+% ***********************
+%
+% The following numbering is adopted in this macro.
+%
+% 5
+% O
+% d * * e
+% the original point ===> 4 * * 1
+% (0,0) * * a
+% c -----
+% 3 b 2
+%
+% \end{verbatim}
+%
+% The macro |\furanose| has an argument |SUBSLIST| as well as an optional
+% argument |BONDLIST|.
+% \begin{verbatim}
+% \furanose[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one or more
+% characters selected from a to e, each of which indicates the presence of
+% an inner (endcyclic) double bond on the corresponding position.
+% \begin{verbatim}
+% BONDLIST =
+%
+% none : mother skeleton
+% 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
+% \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 4 substitution positions)
+%
+% for n = 1 to 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nSA : single bond (down) at n-atom (for n=1)
+% nSB : single bond (up) at n-atom (for n=1)
+% nSa : alpha single bond at n-atom
+% nSb : beta single bond at n-atom
+%\end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \furanose{1Sa==Cl;2Sb==F}
+%
+% \end{verbatim}
+%
+% The definition of |\@furanose| uses a picture environment, in which
+% bonds are put directly, while subsituents are typset by using
+% the macros |\@pyrana| to |\@pyranc| described above.
+% \changes{v1.02}{1998/10/31}{Adding \cs{ylfuranoseposition}, \cs{if@ylsw},
+% \cs{yl@shifti}, \cs{@ylii}, \cs{yl@shiftii}, \cs{@ylii},
+% \cs{yl@xdiff} and \cs{yl@ydiff}}
+%
+% \begin{macro}{\furanose}
+% \begin{macro}{\@furanose}
+% \begin{macrocode}
+\def\furanose{\@ifnextchar[{\@furanose}{\@furanose[r]}}
+\def\@furanose[#1]#2{%
+\@reset@ylsw%
+\ylfuranoseposition{#2}%
+\def\@@ylii{0}\def\@@yli{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(880,800)(-240,-400)
+ \iforigpt \put(-240,-400){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `furanose' origin: (0,0) ---> (240,400)}
+\fi
+ \fi%
+ \put(0,0){\line(5,3){236}}% %bond 4-5
+ \put(532,0){\line(-5,3){236}}% %bond 1-5
+ {\thicklines%
+ \put(0,0){\line(3,-5){120}}% %bond 4-3
+ \put(412,-200){\line(3,5){120}}% %bond 2-1
+ \put(120,-200){\line(1,0){292}}}% %bond 3-2
+ \putratom{236}{130}{O}% left type
+%
+\@tfor\member:=#1\do{%
+\if\member r%no endcyclic double bonds
+\else \if\member a%
+ \put(400,-150){\line(3,5){80}}% %double bond 2-1
+\else \if\member b%
+ \put(150,-160){\line(1,0){232}}% %double bond 3-2
+\else \if\member c%
+ \put(50,-12){\line(3,-5){80}}% %double bond 4-3
+\else \if\member d%
+ \put(50,0){\line(5,3){180}}% %double bond 4-5
+\else \if\member e%
+ \put(482,0){\line(-5,3){180}}% %double bond 1-5
+\fi\fi\fi\fi\fi\fi}%
+%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\ifx\@memberb\@yl\else
+\ifcase\@tmpa%0 omit
+ \or \put(532,0){\@pyrana}% subst. on 1
+ \or \put(412,-200){\@pyranb}% subst. on 2
+ \or \put(120,-200){\@pyranbb}% subst. on 3
+ \or \put(0,0){\@pyranc}% subst. on 4
+\fi%end of ifcase
+\fi\fi%
+}\end{picture}}% %end of \furanose macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylfuranoseposition| is to obtain the shift values
+% |\@ylii| and |\@yli| which are used for shifting the standard
+% point of a substituent.
+% \changes{v1.02}{1998/10/23}{New commands for setting substituents} +%
+% \begin{macro}{\ylfuranoseposition}
+% \begin{macrocode}
+\def\ylfuranoseposition#1{%
+\@@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
+\ifcase\@tmpa%0 omit
+ \or\gdef\@ylii{-532}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \or\gdef\@ylii{-412}\gdef\@yli{200}\global\@ylswtrue% subst. on 2
+ \or\gdef\@ylii{-120}\gdef\@yli{200}\global\@ylswtrue% subst. on 3
+ \or\gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 4
+\fi%end of ifcase
+\fi\fi\fi}}%
+%</hcycle>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/hcycle.ins b/Master/texmf-dist/source/latex/xymtex/hcycle.ins new file mode 100644 index 00000000000..6923dd23dae --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hcycle.ins @@ -0,0 +1,50 @@ +\def\batchfile{hcycle.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996,1998 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1996 (private version)
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1996,1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{hcycle.drv}{t}{%
+ \from{hcycle.dtx}{driver}}
+
+\generateFile{hcycle.sty}{t}{%
+ \from{hcycle.dtx}{hcycle}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/hetarom.drv b/Master/texmf-dist/source/latex/xymtex/hetarom.drv new file mode 100644 index 00000000000..28c92655836 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hetarom.drv @@ -0,0 +1,82 @@ +%% +%% This is file `hetarom.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hetarom.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996, 1998, 2000 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1998 (private version) +%% Version 2.00 Released on December 25, 1998 +%% Version 2.00a Released on November 11, 2000 +%% +%% Copyright (C) 1996,1998,2000 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: hetarom.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{hetarom.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{hetarom.dtx} +\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 vertical type by {\sffamily hetarom.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{hetarom.dtx} +\end{document} +\endinput +%% +%% End of file `hetarom.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/hetarom.dtx b/Master/texmf-dist/source/latex/xymtex/hetarom.dtx new file mode 100644 index 00000000000..e4c4108c4a2 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hetarom.dtx @@ -0,0 +1,9028 @@ +% \iffalse meta-comment
+%% File: hetarom.dtx
+%
+% Copyright 1993,1996,1998,2000 by Shinsaku Fujita
+%
+% This file is part of XyMTeX system.
+% -------------------------------------
+%
+% This file is a successor to:
+%
+% hetarom.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].
+%
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name and
+% directory name; or
+% (2) if you do make changes,
+% (a) you name it something other than the names included in the
+% ``xymtex'' directory and
+% (b) you are requested to leave this notice intact.
+% This restriction ensures that all standard styles are identical.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
+% Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
+%
+% New address:
+% Shinsaku Fujita,
+% Department of Chemistry and Materials Technology,
+% Kyoto Institute of Technology, \\
+% Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetarom}
+% \def\versi@ndate{December 01, 1993}
+% \def\versi@nno{ver1.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetarom}
+% \def\versi@ndate{August 16, 1996}
+% \def\versi@nno{ver1.01}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetarom}
+% \def\versi@ndate{October 31, 1998}
+% \def\versi@nno{ver1.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{hetarom}
+% \def\versi@ndate{December 25, 1998}
+% \def\versi@nno{ver2.00}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{9447}
+%% \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/27}{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}{1998/11/11}{bug fix}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+\ProvidesFile{hetarom.dtx}[1998/12/25 v2.00 XyMTeX{} package file]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{hetarom.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 vertical type by {\sffamily hetarom.sty}
+(\fileversion) of \XyMTeX{}}
+\author{Shinsaku Fujita \\
+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{hetarom.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \section{Introduction}\label{hetarom:intro}
+%
+% \subsection{Options for {\sffamily docstrip}}
+%
+% \DeleteShortVerb{\|}
+% \begin{center}
+% \begin{tabular}{|l|l|}
+% \hline
+% \emph{option} & \emph{function}\\ \hline
+% hetarom & hetarom.sty \\
+% driver & driver for this dtx file \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \MakeShortVerb{\|}
+%
+% \subsection{Version Information}
+%
+% \begin{macrocode}
+%<*hetarom>
+\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
+\typeout{ -- Released December 25, 1998 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{hetarom}
+\def\versi@ndate{November 11, 2000}
+\def\versi@nno{ver2.00a}
+\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 hetarom.sty}
+%
+% \begin{verbatim}
+% *********************************
+% * hetarom.sty: list of commands *
+% *********************************
+%
+% <Various flags (switches)>
+%
+% \if@gclip \@gclipfalse \@gcliptrue
+% \if@hclip \@hclipfalse \@hcliptrue
+% \if@iclip \@iclipfalse \@icliptrue
+% \if@jclip \@jclipfalse \@jcliptrue
+% \iniflag
+% \iniatom
+% \aaa
+% \bbb
+% \ccc
+% \ddd
+% \eee
+% \fff
+% \ggg
+% \hhh
+% \iii
+% \jjj
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Six-Membered Heterocycles>
+% Setting inner double bonds
+%
+% \bonda
+% \bondb
+% \bondc
+% \bondd
+% \bonde
+% \bondf
+% \bondhoriz
+% \bondhorizi
+%
+% Setting skeletal bonds
+%
+% \skbonda
+% \skbondf
+% \skbondc
+% \skbondd
+% \skbondb
+% \skbonde
+% \skbondhoriz
+% \skbondhorizi
+%
+% Setting dotted skeletal bonds
+%
+% \dotskbonda
+% \dotskbondf
+% \dotskbondc
+% \dotskbondd
+% \dotskbondb
+% \dotskbonde
+% \dotskbondhoriz
+% \dotskbondhorizi
+%
+% Basic Macros
+%
+% \sixheterov \@sixheterov
+% \sixheterovi \@sixheterovi
+%
+% Application Macros
+%
+% \pyridinev \@pyridinev
+% \pyridinevi \@pyridinevi
+% \pyrazinev \@pyrazinev
+% \pyrimidinev \@pyrimidinev
+% \pyrimidinevi \@pyrimidinevi
+% \pyridazinev \@pyridazinev
+% \pyridazinevi \@pyridazinevi
+% \triazinev \@triazinev
+% \triazinevi \@triazinevi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Five-Membered Heterocycles>
+% Basic Macros
+%
+% \fiveheterov \@fiveheterov
+% \fiveheterovi \@fiveheterovi
+%
+% Application Macros
+%
+% \pyrrolev \@pyrrolev
+% \pyrazolev \@pyrazolev
+% \imidazolev \@imidazolev
+% \isoxazolev \@isoxazolev
+% \oxazolev \@oxazolev
+%
+% \furanv \@furanv
+% \thiophenev \@thiophenev
+%
+% \pyrrolevi \@pyrrolevi
+% \pyrazolevi \@pyrazolevi
+% \imidazolevi \@imidazolevi
+% \isoxazolevi \@isoxazolevi
+% \oxazolevi \@oxazolevi
+%
+% \furanvi \@furanvi
+% \thiophenevi \@thiophenevi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Six-Six-Fused Heterocycles>
+% Basic Macros
+%
+% \decaheterov \@decaheterov
+% \decaheterovi \@decaheterovi
+% \decaheterovb \@decaheterovb
+% \decaheterovt \@decaheterovt
+%
+% Adjustment Macros (for structures as substituents)
+% \changes{v1.02}{1998/10/16}{Newly added command}
+%
+% \clipdetection
+% \ylhetposition
+% \ylhetpositionb
+% \ylhetpositiont
+%
+% Application Macros
+%
+% \quinolinev \@quinolinev
+% \quinolinevi \@quinolinevi
+% \quinolinevb \@quinolinevb
+% \quinolinevt \@quinolinevt
+%
+% \isoquinolinev \@isoquinolinev
+% \isoquinolinevi \@isoquinolinevi
+% \isoquinolinevb \@isoquinolinevb
+% \isoquinolinevt \@isoquinolinevt
+%
+% \quinoxalinev \@quinoxalinev
+% \quinoxalinevi \@quinoxalinevi
+% \quinoxalinevb \@quinoxalinevb
+% \quinoxalinevt \@quinoxalinevt
+%
+% \quinazolinev \@quinazolinev
+% \quinazolinevi \@quinazolinevi
+% \quinazolinevb \@quinazolinevb
+% \quinazolinevt \@quinazolinevt
+%
+% \cinnolinev \@cinnolinev
+% \cinnolinevi \@cinnolinevi
+% \cinnolinevb \@cinnolinevb
+% \cinnolinevt \@cinnolinevt
+%
+% \pteridinev \@pteridinev
+% \pteridinevi \@pteridinevi
+% \pteridinevb \@pteridinevb
+% \pteridinevt \@pteridinevt
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Six-Five-Fused Heterocycles>
+% Basic Macros
+%
+% \nonaheterov \@nonaheterov
+% \nonaheterovi \@nonaheterovi
+%
+% Application Macros
+%
+% \purinev \@purinev
+% \purinevi \@purinevi
+% \indolev \@indolev
+% \indolevi \@indolevi
+% \indolizinev \@indolizinev
+% \indolizinevi \@indolizinevi
+% \isoindolev \@isoindolev
+% \isoindolevi \@isoindolevi
+% \benzofuranev \@benzofuranev
+% \benzofuranevi \@benzofuranevi
+% \isobenzofuranev \@isobenzofuranev
+% \isobenzofuranevi \@isobenzofuranevi
+% \benzoxazolev \@benzoxazolev
+% \benzoxazolevi \@benzoxazolevi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Four-Membered Heterocycles>
+% Setting bonds
+% \bondshoriz \bondshorizi
+% \skbondshoriz \skbondshorizi
+%
+% Basic Macros
+%
+% \fourhetero \@fourhetero
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Four-Membered Heterocycles>
+% Setting inner double bonds
+%
+% \bondtria \bondtrib
+% \skbondtria \skbondtrib
+% \Bondtria \Bondtrib
+% \skBondtria \skBondtrib
+%
+% Basic Macros
+%
+% \fourhetero \@fourhetero
+% \set@fusionadd@fourv \set@fusion@fourv
+%
+% <Three-Membered Heterocycles>
+%
+% \threehetero \@threehetero
+% \threeheteroi \@threeheteroi
+%
+% \threeheterov \@threeheterov
+% \threeheterovi \@threeheterovi
+%
+% \set@fusionadd@threev \set@fusion@threev
+% \set@fusionadd@threevi \set@fusion@threevi
+% \end{verbatim}
+%
+% \begin{verbatim}
+%
+% <Building Units>
+%
+% \sixunitv \@sixunitv
+% \fiveunitv \@fiveunitv
+% \fiveunitvi \@fiveunitvi
+% \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 hetarom.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}{}%
+\unitlength=0.1pt%
+% \end{macrocode}
+%
+% The following switches and macros have been moved to {\sf chemstr.sty};
+% hence, they are commented out.
+% \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\ggg{}\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}}%
+% \end{macrocode}
+%
+% \section{Initialization}
+%
+% \begin{macrocode}
+\iniatom%
+% \end{macrocode}
+%
+% \section{Macros for setting bonds}
+% \subsection{Inner double bonds}
+%
+% The macros |\sixhetero| and |\fivehetero| 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 |\bonda| to |\bondf| are used to set a bond
+% on each edge of a six- or five-membered ring; and
+% the inner macros |\bondz| to |\bondzi| draw horizontal 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 *
+% ******************************
+% The following numbering is adopted in these macros.
+% aaa
+% 1
+% f * a
+% fff 6 * * 2 bbb
+% e | | b
+% | |
+% eee 5 * * 3 ccc
+% d * c
+% 4 <===== the original point
+% ddd
+% \end{verbatim}
+%
+% \begin{macro}{\bonda}
+% The macro |\bonda| 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\bonda{%
+ \ifx\aaa\empty%
+ \ifx\bbb\empty%
+ \put(6,364){\line(5,-3){126}}% %double bond 1-2
+ \else%
+ \put(6,364){\line(5,-3){100}}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(35,340){\line(5,-3){100}}% %double bond 1-2
+ \else%
+ \put(35,352){\line(5,-3){100}}% %double bond 1-2
+ \fi% % line <1OO not available
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondb}
+% The macro |\bondb| 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\bondb{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \put(138,129){\line(0,1){148}}% %double bond 3-2
+ \else%
+ \put(138,143){\line(0,1){134}}% %double bond 3-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(138,129){\line(0,1){134}}% %double bond 3-2
+ \else%
+ \put(138,143){\line(0,1){110}}% %double bond 3-2
+ \fi%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondc}
+% The macro |\bondc| 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\bondc{%
+ \ifx\ddd\empty%
+ \ifx\ccc\empty%
+ \put(6,42){\line(5,3){126}} %double bond 4-3
+ \else%
+ \put(6,42){\line(5,3){100}} %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(35,66){\line(5,3){100}}% %double bond 4-3
+ \else%
+ \put(35,60){\line(5,3){100}}% %double bond 4-3
+ \fi% % line <1OO not available
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondd}
+% The macro |\bondd| 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\bondd{%
+ \ifx\ddd\empty%
+ \ifx\eee\empty%
+ \put(-6,42){\line(-5,3){126}}% %double bond 4-5
+ \else%
+ \put(-6,42){\line(-5,3){100}}% %double bond 4-5
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(-35,66){\line(-5,3){100}}% %double bond 4-5
+ \else%
+ \put(-35,60){\line(-5,3){100}}% %double bond 4-5
+ \fi% % line <1OO not available
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bonde}
+% The macro |\bonde| 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\bonde{%
+ \ifx\fff\empty%
+ \ifx\eee\empty%
+ \put(-138,129){\line(0,1){148}}% %double bond 5-6
+ \else%
+ \put(-138,143){\line(0,1){134}}% %double bond 5-6
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(-138,129){\line(0,1){134}}% %double bond 5-6
+ \else%
+ \put(-138,143){\line(0,1){110}}% %double bond 5-6
+ \fi%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondf}
+% The macro |\bondf| 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\bondf{%
+ \ifx\aaa\empty%
+ \ifx\fff\empty%
+ \put(-6,364){\line(-5,-3){126}}% %double bond 1-6
+ \else%
+ \put(-6,364){\line(-5,-3){100}}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(-35,340){\line(-5,-3){100}}% %double bond 1-6
+ \else%
+ \put(-35,352){\line(-5,-3){100}}% %double bond 1-6
+ \fi% % line <1OO not available
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondz}
+% The macro |\bondz| 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}
+% horizontal inner bond for five-membered rings
+\def\bondhoriz{%
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \put(-138,270){\line(1,0){277}}% %double bond 4-3
+ \else%
+ \put(-138,270){\line(1,0){258}}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(-120,270){\line(1,0){258}}% %double bond 4-3
+ \else%
+ \put(-120,270){\line(1,0){239}}% %double bond 4-3
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondzi}
+% The macro |\bondzi| 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}
+% horizontal inner bond for five-membered rings (inverse type)
+\def\bondhorizi{%
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \put(-138,136){\line(1,0){277}}% %double bond 4-3
+ \else%
+ \put(-138,136){\line(1,0){258}}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(-120,136){\line(1,0){258}}% %double bond 4-3
+ \else%
+ \put(-120,136){\line(1,0){239}}% %double bond 4-3
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Skeletal bonds}
+%
+% The macros |\sixhetero| and |\fivehetero| 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 |\skbondz| to |\skbondzi| draw horizontal bonds
+% of a five-membered ring.
+%
+% \begin{verbatim}
+% **************************
+% * setting skeletal bonds *
+% **************************
+% The following numbering is adopted in this macro.
+% aaa
+% 1
+% f * a
+% fff 6 * * 2 bbb
+% e | | b
+% | |
+% eee 5 * * 3 ccc
+% d * c
+% 4 <===== the original point
+% ddd
+%
+% \end{verbatim}
+%
+% \begin{macro}{\skbonda}
+% The macro |\skbonda| 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\skbonda{%
+ \ifx\aaa\empty%
+ \ifx\bbb\empty%
+ \put(0,406){\line(5,-3){171}}% %bond 1-2
+ \else%
+ \put(0,406){\line(5,-3){136}}% %bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(35,385){\line(5,-3){136}}% %bond 1-2
+ \else%
+ \put(35,385){\line(5,-3){100}}% %bond 1-2
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondf}
+% The macro |\skbonda| 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\skbondf{%
+ \ifx\aaa\empty%
+ \ifx\fff\empty%
+ \put(0,406){\line(-5,-3){171}}% %bond 1-6
+ \else%
+ \put(0,406){\line(-5,-3){136}}% %bond 1-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(-35,385){\line(-5,-3){136}}% %bond 1-6
+ \else%
+ \put(-35,385){\line(-5,-3){100}}% %bond 1-6
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondc}
+% The macro |\skbondc| refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ccc| and |\ddd|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 4 and 3
+\def\skbondc{%
+ \ifx\ddd\empty%
+ \ifx\ccc\empty%
+ \put(0,0){\line(5,3){171}}% %bond 4-3
+ \else%
+ \put(0,0){\line(5,3){136}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(35,21){\line(5,3){138}}% %bond 4-3
+ \else%
+ \put(35,21){\line(5,3){100}}% %bond 4-3
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondd}
+% The macro |\skbondd| 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\skbondd{%
+ \ifx\ddd\empty%
+ \ifx\eee\empty%
+ \put(0,0){\line(-5,3){171}}% %bond 4-5
+ \else%
+ \put(0,0){\line(-5,3){136}}% %bond 4-5
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(-35,21){\line(-5,3){138}}% %bond 4-5
+ \else%
+ \put(-35,21){\line(-5,3){100}}% %bond 4-5
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondb}
+% The macro |\skbondb| 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\skbondb{%
+ \ifx\bbb\empty%%
+ \ifx\ccc\empty%%
+ \put(171,103){\line(0,1){200}}% %bond 3-2
+ \else%
+ \put(171,143){\line(0,1){160}}% %bond 3-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%%
+ \put(171,103){\line(0,1){150}}% %bond 3-2
+ \else%
+ \put(171,143){\line(0,1){110}}% %bond 3-2
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbonde}
+% The macro |\skbonde| 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\skbonde{%
+ \ifx\eee\empty%
+ \ifx\fff\empty%
+ \put(-171,103){\line(0,1){200}}% %bond 5-6
+ \else%
+ \put(-171,103){\line(0,1){150}}% %bond 5-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(-171,143){\line(0,1){160}}% %bond 5-6
+ \else%
+ \put(-171,143){\line(0,1){110}}% %bond 5-6
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondhoriz}
+% The macro |\skbondhoriz| 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}
+%horizontal bond for five-membered rings
+\def\skbondhoriz{%
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \put(-171,303){\line(1,0){342}}% %bond 4-3
+ \else%
+ \put(-171,303){\line(1,0){300}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(171,303){\line(-1,0){300}}% %bond 4-3
+ \else%
+ \put(-129,303){\line(1,0){258}}% %bond 4-3
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondhorizi}
+% The macro |\skbondhorizi| 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}
+%horizontal bond for five-membered rings (inverse type)
+\def\skbondhorizi{%
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \put(-171,103){\line(1,0){342}}% %bond 4-3
+ \else%
+ \put(-171,103){\line(1,0){300}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(171,103){\line(-1,0){300}}% %bond 4-3
+ \else%
+ \put(-129,103){\line(1,0){258}}% %bond 4-3
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\set@outskel@sixv}
+% The macro |\set@outskel@sixv| is to typeset a series of
+% outer-skeleton bonds to six rings. It is
+% used in |\sixheterov| and |\sixheterovi|.
+%
+% \begin{macrocode}
+\def\set@outskel@sixv{%
+ \skbonda% bond between 1 and 2
+ \skbondf% bond between 1 and 6
+ \skbondc% bond between 4 and 3
+ \skbondd% bond between 4 and 5
+ \skbondb% bond between 3 and 2
+ \skbonde% bond between 5 and 6
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Dotted Skeletal Bonds}
+%
+% The macros |\sixfusev| 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 |\dotskbonda| to |\dotskbondf| are used
+% to set a dotted bond on each edge of a six- or five-membered ring.
+%
+% \begin{macro}{\dotskbonda}
+% The macro |\dotskbonda| is the dotted couterpart of |\skbonda|,
+% 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\dotskbonda{%
+ \ifx\aaa\empty%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(5,-3){171}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,406)(171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(5,-3){136}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,406)(136,324)}}%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(35,385){\line(5,-3){136}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(35,386)(171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(35,385){\line(5,-3){100}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(35,386)(136,324)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondb}
+% The macro |\dotskbondb| is the dotted couterpart of |\skbondb|,
+% 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\dotskbondb{%
+ \ifx\bbb\empty%%
+ \ifx\ccc\empty%%
+ \@ifundefined{dottedline}{%
+ \put(171,103){\line(0,1){200}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(171,103)(171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(171,143){\line(0,1){160}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(171,143)(171,303)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%%
+ \@ifundefined{dottedline}{%
+ \put(171,103){\line(0,1){150}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(171,103)(171,253)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(171,143){\line(0,1){110}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(171,143)(171,253)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondc}
+% The macro |\dotskbondc| is the dotted couterpart of |\skbondc|,
+% which refers to the control sequences representing
+% atoms on both of the terminal vertices (|\ccc| and |\ddd|) and
+% examine whether these are empty or not. Thereby,
+% it decides the vertices to be truncated.
+%
+% \begin{macrocode}
+%bond between 4 and 3
+\def\dotskbondc{%
+ \ifx\ddd\empty%
+ \ifx\ccc\empty%%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(5,3){171}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(0,0)(171,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(5,3){136}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(0,0)(136,81)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(35,21){\line(5,3){138}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(35,21)(171,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(35,21){\line(5,3){100}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(35,21)(136,81)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondd}
+% The macro |\dotskbondd| is the dotted couterpart of |\skbondd|,
+% 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\dotskbondd{%
+ \ifx\ddd\empty%
+ \ifx\eee\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-5,3){171}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-171,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-5,3){136}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-136,81)}}%
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \@ifundefined{dottedline}{%
+ \put(-35,21){\line(-5,3){138}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(-35,21)(-171,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-35,21){\line(-5,3){100}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(-35,21)(-136,81)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbonde}
+% The macro |\dotskbonde| is the dotted couterpart of |\skbonde|,
+% 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\dotskbonde{%
+ \ifx\eee\empty%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(-171,103){\line(0,1){200}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(-171,103)(-171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-171,103){\line(0,1){150}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(-171,103)(-171,253)}}%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(-171,143){\line(0,1){160}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(-171,143)(-171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-171,143){\line(0,1){110}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(-171,143)(-171,253)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondf}
+% The macro |\dotskbondf| is the dotted couterpart of |\skbondf|,
+% 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\dotskbondf{%
+ \ifx\aaa\empty%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(-5,-3){171}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(0,406)(-171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(-5,-3){136}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(0,406)(-136,325)}}%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(-35,385){\line(-5,-3){136}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(-35,385)(-171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-35,385){\line(-5,-3){100}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(-35,385)(-136,325)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondhoriz}
+% The macro |\dotskbondhoriz| is the dotted couterpart of |\skbondhoriz|,
+% which 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}
+%horizontal bond for five-membered rings
+\def\dotskbondhoriz{%
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(-171,303){\line(1,0){342}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,303)(171,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-171,303){\line(1,0){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,303)(129,303)}}%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(171,303){\line(-1,0){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(171,303)(-129,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-129,303){\line(1,0){258}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-129,303)(129,303)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondhorizi}
+% The macro |\dotskbondhorizi| 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}
+%horizontal bond for five-membered rings (inverse type)
+\def\dotskbondhorizi{%
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(-171,103){\line(1,0){342}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,103)(171,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-171,103){\line(1,0){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,103)(129,103)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(171,103){\line(-1,0){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(171,103)(-129,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-129,103){\line(1,0){258}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-129,103)(129,103)}}%
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@skel@bond| is used in such commands as |\sixheterov|
+% and |\sixfusev| 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.
+%
+% \begin{macro}{\if@skbondlist}
+% \begin{macrocode}
+\newif\if@skbondlist
+\@skbondlistfalse
+% \end{macrocode}
+% \end{macro}% from fusering.sty to hetarom.sty
+%
+% \begin{macro}{\set@skel@bond}
+% \begin{macrocode}
+\def\set@skel@bond#1#2#3{%
+ \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
+ % \if\@aaa #2\relax%OK
+ \@skbondlistfalse
+ \@tfor\member:=#1\do{%
+ \expandafter\twoCH@@R\member//%
+ \if\@@tmpa #2\relax%
+ \if\@@tmpb A\relax%
+ \expandafter\csname dotskbond#3\endcsname% \dotskbonda etc.
+ \@skbondlisttrue
+ \else\if\@@tmpb B\relax%
+ {\thicklines
+ \expandafter\csname skbond#3\endcsname% \skbonda etc.
+ }%
+ \@skbondlisttrue
+ \fi\fi
+ \fi%
+ }%
+ \if@skbondlist\else
+ {\thinlines
+ \expandafter\csname skbond#3\endcsname% \skbonda 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@bond
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@skel@longbond| is used in |\fivefusev| 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.
+%
+% \begin{macro}{\set@skel@longbond}
+% \begin{macrocode}
+\def\set@skel@longbond#1#2#3{%
+ \expandafter\if\csname @#2#2#2\endcsname #2\relax%OK
+ % \if\@aaa #2\relax%OK
+ \@skbondlistfalse
+ \@tfor\member:=#1\do{%
+ \expandafter\twoCH@@R\member//%
+ \if\@@tmpa #2\relax%
+ \if\@@tmpb A\relax%
+ \expandafter\csname dot#3\endcsname% \dotskbonda etc.
+ \@skbondlisttrue
+ \else\if\@@tmpb B\relax%
+ {\thicklines
+ \expandafter\csname #3\endcsname% \skbonda etc.
+ }%
+ \@skbondlisttrue
+ \fi\fi
+ \fi%
+ }%
+ \if@skbondlist\else
+ {\thinlines
+ \expandafter\csname #3\endcsname% \skbonda 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@longbond
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\@bond@@omit| is used in |\sixheterov| etc.
+% for detecting omitted bonds, where |\@aaa| etc. are empty if
+% they are omitted.
+%
+% \begin{macro}{\@bond@@omit}
+% \begin{macrocode}
+\def\@bond@@omit#1{%
+\@tfor\memBer:=#1\do{%
+\if\memBer a\relax\gdef\@aaa{}\fi%
+\if\memBer A\relax\gdef\@aaa{}\fi%
+\if\memBer b\relax\gdef\@bbb{}\fi%
+\if\memBer B\relax\gdef\@bbb{}\fi%
+\if\memBer c\relax\gdef\@ccc{}\fi%
+\if\memBer C\relax\gdef\@ccc{}\fi%
+\if\memBer d\relax\gdef\@ddd{}\fi%
+\if\memBer D\relax\gdef\@ddd{}\fi%
+\if\memBer e\relax\gdef\@eee{}\fi%
+\if\memBer E\relax\gdef\@eee{}\fi%
+\if\memBer f\relax\gdef\@fff{}\fi%
+\if\memBer F\relax\gdef\@fff{}\fi%
+\if\memBer g\relax\gdef\@ggg{}\fi%
+\if\memBer G\relax\gdef\@ggg{}\fi%
+\if\memBer h\relax\gdef\@hhh{}\fi%
+\if\memBer H\relax\gdef\@hhh{}\fi%
+\if\memBer i\relax\gdef\@iii{}\fi%
+\if\memBer I\relax\gdef\@iii{}\fi%
+\if\memBer j\relax\gdef\@jjj{}\fi%
+\if\memBer J\relax\gdef\@jjj{}\fi%
+\if\memBer k\relax\gdef\@kkk{}\fi%
+\if\memBer K\relax\gdef\@kkk{}\fi%
+}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Six-membered heterocyles}
+% \subsection{Vertical type}
+%
+% The standard skeleton of a six-membered heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% *************************
+% * sixhetero derivatives *
+% * (vertical type) *
+% *************************
+% The following numbering is adopted in this macro.
+%
+% 1
+% *
+% 6 * * 2
+% | |
+% | |
+% 5 * * 3
+% *
+% 4 <===== the original point
+% \end{verbatim}
+%
+% The macro |\sixheterov| 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}
+% \sixheterov(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 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 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.
+%
+% \sixheterov{1==N}{1==Cl;2==F}
+% \sixheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \sixheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\sixheterov| 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 |\setsixringv|.
+% \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/15}{Adding \cs{test@vertix@sixv}}
+%
+% \begin{macro}{\sixheterov}
+% \begin{macro}{\@six@heterov}
+% \begin{macro}{\@six@@heterov}
+% \begin{macro}{\@sixheterov}
+% \begin{macrocode}
+\def\sixheterov{\@ifnextchar({\@six@heterov(@}{\@six@heterov(@)}}
+\def\@six@heterov(#1){\@ifnextchar[{\@six@@heterov(#1)[@}%
+{\@six@@heterov(#1)[@]}}
+\def\@six@@heterov(#1)[#2]#3#4{\@ifnextchar[%
+{\@sixheterov(#1)[#2]{#3}{#4}[@}%
+{\@sixheterov(#1)[#2]{#3}{#4}[@]}}
+\def\@sixheterov(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{a}{b}{c}{d}{e}{f}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{0}{0}{7}{0}%
+\if@ylsw%
+\yl@shiftii=\@ylii
+\yl@shifti=\@yli
+\advance\yl@shiftii\yl@xdiff
+\advance\yl@shifti\yl@ydiff
+\begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(800,880)(-\shiftii,-\shifti)
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `sixheterov' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{%
+\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bond{#1}{a}{a}% bond between 1 and 2 \@aaa -> \skbonda etc
+\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc
+\set@skel@bond{#1}{c}{c}% bond between 3 and 4 \@ccc -> \skbondc etc
+\set@skel@bond{#1}{d}{d}% bond between 4 and 5 \@ddd -> \skbondd etc
+\set@skel@bond{#1}{e}{e}% bond between 5 and 6 \@eee -> \skbonde etc
+\set@skel@bond{#1}{f}{f}% bond between 6 and 1 \@fff -> \skbondf etc
+}%
+%%%%%\set@outskel@sixv % replaced by above 1998/12/30
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax \bondd \bondf \bondb%
+\else\if\member l\relax \bonda \bondc \bonde%
+\else\if\member a\relax \bonda%
+\else\if\member b\relax \bondb%
+\else\if\member c\relax \bondc%
+\else\if\member d\relax \bondd%
+\else\if\member e\relax \bonde%
+\else\if\member f\relax \bondf%
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}}% %circle
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+\else \expandafter\twoCH@@R\member//%
+ \set@fusionadd@sixv
+\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixv{#3}{0}{0}{7}{0}% %atom 1--6%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringv{#4}{0}{0}{7}{0}% %subst 1--6
+\end{picture}\iniatom\iniflag}% %end of \sixheterov macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Inverse vertical type}
+%
+% The standard skeleton of a six-membered heterocycle of inverse type
+% is selected to have the following locant numbers.
+%
+% \begin{verbatim}
+% **********************************
+% * sixhetero derivatives *
+% * (vertical type, inverse type) *
+% **********************************
+% The following numbering is adopted in this macro.
+%
+% 4
+% *
+% 5 * * 3
+% | |
+% | |
+% 6 * * 2
+% *
+% 1 <===== the original point
+% \end{verbatim}
+%
+% The macro |\sixheterovi| 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}
+% \sixheterovi(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 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 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.
+%
+% \sixheterovi{1==N}{1==Cl;2==F}
+% \sixheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \sixheterovi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+%
+% \end{verbatim}
+%
+% The definition of |\sixheterovi| 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 |\setsixringv|.
+% \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}}
+%
+% \begin{macro}{\sixheterovi}
+% \begin{macro}{\@six@heterovi}
+% \begin{macro}{\@six@@heterovi}
+% \begin{macro}{\@sixheterovi}
+% \begin{macrocode}
+\def\sixheterovi{\@ifnextchar({\@six@heterovi(@}{\@six@heterovi(@)}}
+\def\@six@heterovi(#1){\@ifnextchar[{\@six@@heterovi(#1)[@}%
+{\@six@@heterovi(#1)[@]}}
+\def\@six@@heterovi(#1)[#2]#3#4{\@ifnextchar[%
+{\@sixheterovi(#1)[#2]{#3}{#4}[@}%
+{\@sixheterovi(#1)[#2]{#3}{#4}[@]}}
+\def\@sixheterovi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{d}{c}{b}{a}{f}{e}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{5}{0}{5}{-1}% %subst 1--4
+\ylposition{#4}{11}{4}{7}{-1}% %subst 5 and 6
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(800,880)(-\shiftii,-\shifti)
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `sixheterovi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bond{#1}{a}{c}% bond between 1 and 2 \@aaa -> \skbondc etc
+\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc
+\set@skel@bond{#1}{c}{a}% bond between 3 and 4 \@ccc -> \skbonda etc
+\set@skel@bond{#1}{d}{f}% bond between 4 and 5 \@ddd -> \skbondf etc
+\set@skel@bond{#1}{e}{e}% bond between 5 and 6 \@eee -> \skbonde etc
+\set@skel@bond{#1}{f}{d}% bond between 6 and 1 \@fff -> \skbondd etc
+}%
+%%%\set@outskel@sixv% replaced by the above 1998/12/30
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax \bondd \bondf \bondb%
+\else\if\member l\relax \bonda \bondc \bonde%
+\else\if\member a\relax \bondc%
+\else\if\member b\relax \bondb%
+\else\if\member c\relax \bonda%
+\else\if\member d\relax \bondf%
+\else\if\member e\relax \bonde%
+\else\if\member f\relax \bondd%
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}}% %circle
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+\else \expandafter\twoCH@@R\member//%
+ \set@fusionadd@sixvi
+\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+}%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixv{#3}{5}{0}{5}{-1}% %atom 1--4%
+\set@hetatom@sixv{#3}{11}{4}{7}{-1}% %atom 5 and 6%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringv{#4}{5}{0}{5}{-1}% %subst 1--4
+\setsixringv{#4}{11}{4}{7}{-1}% %subst 5 and 6
+\end{picture}\iniatom\iniflag}% %end of \sixheterovi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Pyridine derivatives of vertical type}
+%
+% The macros |\sixheterov| and |\sixheterovi| 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 *
+% * (vertical type) *
+% ************************
+%
+% \pyridinev[BONDLIST]{SUBSLIST}
+% \pyridinevi[BONDLIST]{SUBSLIST}
+% \pyrazinev[BONDLIST]{SUBSLIST}
+% \pyrimidinev[BONDLIST]{SUBSLIST}
+% \pyrimidinevi[BONDLIST]{SUBSLIST}
+% \triazinev[BONDLIST]{SUBSLIST}
+% \triazinevi[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 n-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.
+%
+% \pyridinev{1==Cl;2==F}
+% \pyridinev[c]{1==Cl;4==F;2==CH$_{3}$}
+% \pyridinev[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\pridinev}
+% \begin{macro}{\pridinevi}
+% \begin{macrocode}
+\def\pyridinev{\@ifnextchar[{\@pyridinev[@}{\@pyridinev[r]}}
+\def\@pyridinev[#1]#2{%
+\iforigpt \typeout{command `pyridinev' %
+ is based on `sixheterov'.}\fi%
+\sixheterov[#1]{1==N}{#2}}%end of \pyridinev macro
+\def\pyridinevi{\@ifnextchar[{\@pyridinevi[@}{\@pyridinevi[r]}}
+\def\@pyridinevi[#1]#2{%
+\iforigpt \typeout{command `pyridinevi' %
+ is based on `sixheterovi'.}\fi%
+\sixheterovi[#1]{1==N}{#2}}%end of \pyridinevi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pyrazinev}
+% \begin{macro}{\pyrazinevi}
+% \begin{macrocode}
+\def\pyrazinev{\@ifnextchar[{\@pyrazinev[@}{\@pyrazinev[r]}}
+\def\@pyrazinev[#1]#2{%
+\iforigpt \typeout{command `pyrazinev' %
+ is based on `sixheterov'.}\fi%
+\sixheterov[#1]{1==N;4==N}{#2}}%end of \pyrazinev macro
+%the same formula with an alternative locant numbering
+\def\pyrazinevi{\@ifnextchar[{\@pyrazinevi[@}{\@pyrazinevi[r]}}
+\def\@pyrazinevi[#1]#2{%
+\iforigpt \typeout{command `pyrazinevi' %
+ is based on `sixheterovi'.}\fi%
+\sixheterovi[#1]{1==N;4==N}{#2}}%end of \pyrazinevi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pyrimidinev}
+% \begin{macro}{\pyrimidinevi}
+% \begin{macrocode}
+\def\pyrimidinev{\@ifnextchar[{\@pyrimidinev[@}{\@pyrimidinev[r]}}
+\def\@pyrimidinev[#1]#2{%
+\iforigpt \typeout{command `pyrimidinev' %
+ is based on `sixheterov'.}\fi%
+\sixheterov[#1]{1==N;3==N}{#2}}%end of \pyrimidinev macro
+\def\pyrimidinevi{\@ifnextchar[{\@pyrimidinevi[@}{\@pyrimidinevi[r]}}
+\def\@pyrimidinevi[#1]#2{%
+\iforigpt \typeout{command `pyrimidinevi' %
+ is based on `sixheterovi'.}\fi%
+\sixheterovi[#1]{1==N;3==N}{#2}}%end of \pyrimidinevi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pyridazinev}
+% \begin{macro}{\pyridazinevi}
+% \begin{macrocode}
+\def\pyridazinev{\@ifnextchar[{\@pyridazinev[@}{\@pyridazinev[r]}}
+\def\@pyridazinev[#1]#2{%
+\iforigpt \typeout{command `pyridazinev' %
+ is based on `sixheterov'.}\fi%
+\sixheterov[#1]{1==N;2==N}{#2}}%end of \pyridazinev macro
+\def\pyridazinevi{\@ifnextchar[{\@pyridazinevi[@}{\@pyridazinevi[r]}}
+\def\@pyridazinevi[#1]#2{%
+\iforigpt \typeout{command `pyridazinev' %
+ is based on `sixheterovi'.}\fi%
+\sixheterovi[#1]{1==N;2==N}{#2}}%end of \pyridazinevi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\triazinev}
+% \begin{macro}{\triazinevi}
+% \begin{macrocode}
+\def\triazinev{\@ifnextchar[{\@triazinev[@}{\@triazinev[r]}}
+\def\@triazinev[#1]#2{%
+\iforigpt \typeout{command `triazinev' %
+ is based on `sixheterov'.}\fi%
+\sixheterov[#1]{1==N;3==N;5==N}{#2}}%end of \triazinev macro
+\def\triazinevi{\@ifnextchar[{\@triazinevi[@}{\@triazinevi[r]}}
+\def\@triazinevi[#1]#2{%
+\iforigpt \typeout{command `triazinevi' %
+ is based on `sixheterovi'.}\fi%
+\sixheterovi[#1]{1==N;3==N;5==N}{#2}}%end of \triazinevi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Five-membered heterocycles}
+% \subsection{Vertical type}
+%
+% The standard skeleton of a five-membered heterocycle
+% is selected to have the following locant numbers.
+%
+% \begin{verbatim}
+% **************************
+% * fivehetero derivatives *
+% * (vertical type) *
+% **************************
+% The following numbering is adopted in this macro.
+%
+% 4 _____ 3
+% | |
+% | |
+% 5 * * 2
+% *
+% 1 <===== the original point
+% \end{verbatim}
+%
+% The macro |\fiveheterov| 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}
+% \fiveheterov(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+$' typesets 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 minus) 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.
+%
+% \fiveheterov{1==N}{1==H;2==F}
+% \fiveheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \fiveheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\fiveheterov| 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/10/31}{Add: fused and spiro rings}
+%
+% \begin{macro}{\fiveheterov}
+% \begin{macro}{\@five@heterov}
+% \begin{macro}{\@five@@heterov}
+% \begin{macro}{\@fiveheterov}
+% \begin{macrocode}
+\def\fiveheterov{\@ifnextchar({\@five@heterov(@}{\@five@heterov(@)}}
+\def\@five@heterov(#1){\@ifnextchar[{\@five@@heterov(#1)[@}%
+{\@five@@heterov(#1)[@]}}
+\def\@five@@heterov(#1)[#2]#3#4{\@ifnextchar[%
+{\@fiveheterov(#1)[#2]{#3}{#4}[@}%
+{\@fiveheterov(#1)[#2]{#3}{#4}[@]}}
+\def\@fiveheterov(#1)[#2]#3#4[#5]{%
+\iniatom\iniflag%initialize
+% %%%%%%%%%%%%%
+% % atom list %
+% %%%%%%%%%%%%%
+\test@vertix@sixv{#3}{d}{c}{b}{f}{e}{a}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{5}{1}{5}{-1}% % for 1 to 3
+\ylposition{#4}{10}{4}{7}{-1}% % for 4 to 5
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(800,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `fiveheterov' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bond{#1}{a}{c}% bond between 1 and 2 \@aaa -> \skbondc etc
+\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc
+\set@skel@longbond{#1}{c}{skbondhoriz}%
+ % bond between 3 and 4 \@ccc -> \skbondhoriz etc
+\set@skel@bond{#1}{d}{e}% bond between 4 and 5 \@ddd -> \skbonde etc
+\set@skel@bond{#1}{e}{d}% bond between 5 and 1 \@eee -> \skbondd etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r%
+\else\if\member a\relax \bondc%
+\else\if\member b\relax \bondb%
+\else\if\member c\relax \bondhoriz%
+\else\if\member d\relax \bonde%
+\else\if\member e\relax \bondd%
+\else\if\member A\relax%
+ \put(0,173){\circle{180}}%aromatic circle
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@fivev
+\fi\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % setting heteroatoms %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixv{#3}{5}{1}{5}{-1}% % for 1 to 3
+\set@hetatom@sixv{#3}{10}{4}{7}{-1}% % for 4 to 5
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringv{#4}{5}{1}{5}{-1}% % for 1 to 3
+\setsixringv{#4}{10}{4}{7}{-1}% % for 4 to 5
+\end{picture}\iniatom\iniflag}% end of \fiveheterov macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Inverse vertical type}
+%
+% The standard skeleton of a five-membered heterocycle of inverse type
+% is selected to have the following locant numbers.
+%
+% \begin{verbatim}
+% *****************************
+% * fivehetero derivatives *
+% * (vertical type, inverse) *
+% *****************************
+% The following numbering is adopted in this macro.
+%
+% 1
+% *
+% 6 * * 2
+% | |
+% |_____|
+% 4 3
+% *
+% (0,0) <===== the original point
+% \end{verbatim}
+%
+% The macro |\fiveheterovi| 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}
+% \fiveheterovi(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 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+$' typesets 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 minus) 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.
+%
+% \fiveheterovi{1==N}{1==H;2==F}
+% \fiveheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \fiveheterovi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\fiveheterovi| 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}}
+%
+% \begin{macro}{\fiveheterovi}
+% \begin{macro}{\@five@heterovi}
+% \begin{macro}{\@five@@heterovi}
+% \begin{macro}{\@fiveheterovi}
+% \begin{macrocode}
+\def\fiveheterovi{\@ifnextchar({\@five@heterovi(@}{\@five@heterovi(@)}}
+\def\@five@heterovi(#1){\@ifnextchar[{\@five@@heterovi(#1)[@}%
+{\@five@@heterovi(#1)[@]}}
+\def\@five@@heterovi(#1)[#2]#3#4{\@ifnextchar[%
+{\@fiveheterovi(#1)[#2]{#3}{#4}[@}%
+{\@fiveheterovi(#1)[#2]{#3}{#4}[@]}}
+\def\@fiveheterovi(#1)[#2]#3#4[#5]{%
+\iniatom\iniflag%initialize
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%
+% % atom list %
+% %%%%%%%%%%%%%
+\test@vertix@sixv{#3}{a}{b}{c}{e}{f}{d}% d -- dummy
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{0}{0}{4}{0}% % for 1 to 3
+\ylposition{#4}{1}{4}{7}{0}% % for 4 to 5
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(800,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `fiveheterovi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\set@skel@bond{#1}{a}{a}% bond between 1 and 2 \@aaa -> \skbonda etc
+\set@skel@bond{#1}{b}{b}% bond between 2 and 3 \@bbb -> \skbondb etc
+\set@skel@longbond{#1}{c}{skbondhorizi}%
+ % bond between 3 and 4 \@ccc -> \skbondhorizi etc
+\set@skel@bond{#1}{d}{e}% bond between 4 and 5 \@ddd -> \skbonde etc
+\set@skel@bond{#1}{e}{f}% bond between 5 and 6 \@eee -> \skbondf etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r%
+\else\if\member a\relax \bonda%
+\else\if\member b\relax \bondb%
+\else\if\member c\relax \bondhorizi%
+\else\if\member d\relax \bonde%
+\else\if\member e\relax \bondf%
+\else\if\member A\relax%
+ \put(0,233){\circle{180}}%aromatic circle
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@fivevi
+\fi\fi\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % setting heteroatoms %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\set@hetatom@sixv{#3}{0}{0}{4}{0}% % for 1 to 3
+\set@hetatom@sixv{#3}{1}{4}{7}{0}% % for 4 to 5
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\setsixringv{#4}{0}{0}{4}{0}% % for 1 to 3
+\setsixringv{#4}{1}{4}{7}{0}% % for 4 to 5
+\end{picture}\iniatom\iniflag}%end of \fiveheterovi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Pyrrole derivatives of vertical type}
+%
+% The macro |\fiveheterov| 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 *
+% * (vertical type) *
+% ***********************************
+%
+% \pyrrolev[BONDLIST]{SUBSLIST}
+% \pyrazolev[BONDLIST]{SUBSLIST}
+% \imidazolev[BONDLIST]{SUBSLIST}
+% \isoxazolev[BONDLIST]{SUBSLIST}
+% \oxazolev[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.
+%
+% \pyrrolev{1==H;2==F}
+% \pyrrolev[]{1==H;2==F}
+% \imidazolev[c]{1==Cl;4==F;2==CH$_{3}$}
+% \isoxazolev[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\pyrrolev}
+% \begin{macro}{\pyrazolev}
+% \begin{macro}{\imidazolev}
+% \begin{macro}{\isoxazolev}
+% \begin{macro}{\oxazolev}
+% \begin{macrocode}
+\def\pyrrolev{\@ifnextchar[{\@pyrrolev[@}{\@pyrrolev[bd]}}
+\def\@pyrrolev[#1]#2{%
+\iforigpt \typeout{command `pyrrolev' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==N}{#2}}
+\def\pyrazolev{\@ifnextchar[{\@pyrazolev[@}{\@pyrazolev[bd]}}
+\def\@pyrazolev[#1]#2{%
+\iforigpt \typeout{command `pyrazolev' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==N;2==N}{#2}}
+\def\imidazolev{\@ifnextchar[{\@imidazolev[@}{\@imidazolev[bd]}}
+\def\@imidazolev[#1]#2{%
+\iforigpt \typeout{command `imidazolev' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==N;3==N}{#2}}
+\def\isoxazolev{\@ifnextchar[{\@isoxazolev[@}{\@isoxazolev[bd]}}
+\def\@isoxazolev[#1]#2{%
+\iforigpt \typeout{command `isoxazolev' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==O;2==N}{#2}}
+\def\oxazolev{\@ifnextchar[{\@oxazolev[@}{\@oxazolev[bd]}}
+\def\@oxazolev[#1]#2{%
+\iforigpt \typeout{command `oxazolev' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==O;3==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\furanv}
+% \begin{macro}{\thiophenev}
+% \begin{macrocode}
+\def\furanv{\@ifnextchar[{\@furanv[@}{\@furanv[bd]}}
+\def\@furanv[#1]#2{%
+\iforigpt \typeout{command `furanv' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==O}{#2}}
+\def\thiophenev{\@ifnextchar[{\@thiophenev[@}{\@thiophenev[bd]}}
+\def\@thiophenev[#1]#2{%
+\iforigpt \typeout{command `thiophenev' %
+ is based on `fiveheterov'.}\fi%
+\fiveheterov[#1]{1==S}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Pyrrole derivatives of inverse vertical type}
+%
+% The macro |\fiveheterovi| 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 *
+% * (vertical type, inverse) *
+% ***********************************
+%
+% \pyrrolevi[BONDLIST]{SUBSLIST}
+% \pyrazolevi[BONDLIST]{SUBSLIST}
+% \imidazolevi[BONDLIST]{SUBSLIST}
+% \isoxazolevi[BONDLIST]{SUBSLIST}
+% \oxazolevi[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 (max 6 substitution positions)
+%
+% 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.
+%
+% \pyrrolevi{1==H;2==F}
+% \pyrrolevi[]{1==H;2==F}
+% \imidazolevi[c]{1==Cl;4==F;2==CH$_{3}$}
+% \isoxazolevi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% \begin{macro}{\pyrrolevi}
+% \begin{macro}{\pyrazolevi}
+% \begin{macro}{\imidazolevi}
+% \begin{macro}{\isoxazolevi}
+% \begin{macro}{\oxazolevi}
+% \begin{macrocode}
+\def\pyrrolevi{\@ifnextchar[{\@pyrrolevi[@}{\@pyrrolevi[bd]}}
+\def\@pyrrolevi[#1]#2{%
+\iforigpt \typeout{command `pyrrolevi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==N}{#2}}
+\def\pyrazolevi{\@ifnextchar[{\@pyrazolevi[@}{\@pyrazolevi[bd]}}
+\def\@pyrazolevi[#1]#2{%
+\iforigpt \typeout{command `pyrazolevi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==N;2==N}{#2}}
+\def\imidazolevi{\@ifnextchar[{\@imidazolevi[@}{\@imidazolevi[bd]}}
+\def\@imidazolevi[#1]#2{%
+\iforigpt \typeout{command `imidazolevi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==N;3==N}{#2}}
+\def\isoxazolevi{\@ifnextchar[{\@isoxazolevi[@}{\@isoxazolevi[bd]}}
+\def\@isoxazolevi[#1]#2{%
+\iforigpt \typeout{command `isoxazolevi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==O;2==N}{#2}}
+\def\oxazolevi{\@ifnextchar[{\@oxazolevi[@}{\@oxazolevi[bd]}}
+\def\@oxazolevi[#1]#2{%
+\iforigpt \typeout{command `oxazolevi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==O;3==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\furanvi}
+% \begin{macro}{\thiophenevi}
+% \begin{macrocode}
+\def\furanvi{\@ifnextchar[{\@furanvi[@}{\@furanvi[bd]}}
+\def\@furanvi[#1]#2{%
+\iforigpt \typeout{command `furanvi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==O}{#2}}
+\def\thiophenevi{\@ifnextchar[{\@thiophenevi[@}{\@thiophenevi[bd]}}
+\def\@thiophenevi[#1]#2{%
+\iforigpt \typeout{command `thiophenevi' %
+ is based on `fiveheterovi'.}\fi%
+\fiveheterovi[#1]{1==S}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \section{Six-to-six fused heterocyles}
+% \subsection{Vertical type}
+%
+% The standard skeleton of a six-to-six fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% **************************
+% * decahetero derivatives *
+% * (vertical type) *
+% **************************
+% The following numbering is adopted in this macro.
+%
+% 8 (10)1
+% * 8a *
+% 7 * * * * 2
+% | | |
+% | | |
+% 6 * * * * 3
+% * 4a *
+% 5 (9) 4
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decaheterov| 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}
+% \decaheterov(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 : 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 |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.
+%
+% \decaheterov{1==N}{1==Cl;2==F}
+% \decaheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \decaheterov[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\decaheterov| 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| 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/25}{Spiro rings and fused rings
+% \cs{test@vertix@sixv}, \cs{test@vertix@decav}, etc.}
+%
+% \begin{macro}{\decaheterov}
+% \begin{macro}{\@deca@heterov}
+% \begin{macro}{\@deca@@heterov}
+% \begin{macro}{\@decaheterov}
+% \begin{macrocode}
+\def\decaheterov{\@ifnextchar({\@deca@heterov(@}{\@deca@heterov(@)}}
+\def\@deca@heterov(#1){\@ifnextchar[{\@deca@@heterov(#1)[@}%
+{\@deca@@heterov(#1)[@]}}
+\def\@deca@@heterov(#1)[#2]#3#4{\@ifnextchar[%
+{\@decaheterov(#1)[#2]{#3}{#4}[@}%
+{\@decaheterov(#1)[#2]{#3}{#4}[@]}}
+\def\@decaheterov(#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%
+\ylhetposition{#4}{0}{0}{5}{0}% %substituents on 1 to 4
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+\ylhetposition{#4}{-1}{3}{7}{0}% %substituents on 5 to 7
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylhetposition{#4}{-7}{0}{2}{0}% %substituent on 8
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{7}% %9 %for 4a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-103}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-9}{1}% %10 for 8a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `decaheterov' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\put(342,0){\set@skel@bond{#1}{a}{a}}%
+ % bond between 1 and 2 \@aaa -> \skbonda etc
+\put(342,0){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(342,0){\set@skel@bond{#1}{c}{c}}%
+ % bond between 3 and 4 \@ccc -> \skbondc etc
+\put(342,0){\set@skel@bond{#1}{d}{d}}%
+ % bond between 4 and 4a \@ddd -> \skbondd etc
+\put(342,0){\set@skel@bond{#1}{k}{e}}%
+ % bond between 4a and 8a \@kkk -> \skbonde etc
+\put(342,0){\set@skel@bond{#1}{j}{f}}%
+ % bond between 8a and 1 \@jjj -> \skbondf etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\set@skel@bond{#1}{i}{a}% bond between 8 and 8a \@iii -> \skbonda etc
+\set@skel@bond{#1}{e}{c}% bond between 5 and 4a \@eee -> \skbondc etc
+\set@skel@bond{#1}{f}{d}% bond between 5 and 6 \@fff -> \skbondd etc
+\set@skel@bond{#1}{g}{e}% bond between 6 and 7 \@ggg -> \skbonde etc
+\set@skel@bond{#1}{h}{f}% bond between 7 and 8 \@hhh -> \skbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\fff=\jjj \let\eee=\iii%
+ \put(342,0){\bonda}% bond between 1 and 2
+ \put(342,0){\bondc}% bond between 3 and 4
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 8a and 4a
+ \put(0,0){\bondf}% bond between 8 and 7
+ \put(0,0){\bondd}% bond between 5 and 6
+}%
+\else\if\member l\relax%
+\else\if\member a\relax%
+ \put(342,0){\bonda}% bond between 1 and 2
+\else\if\member b\relax
+ \put(342,0){\bondb}% bond between 2 and 3
+\else\if\member c\relax
+ \put(342,0){\bondc}% bond between 3 and 4
+\else\if\member d\relax%
+{\let\eee=\iii%
+ \put(342,0){\bondd}% bond between 4 and 4a
+}%
+\else\if\member e\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,0){\bondc}% bond between 5 and 4a
+}%
+\else\if\member f\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \put(0,0){\bondd}% bond between 5 and 6
+}%
+\else\if\member g\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,0){\bonde}% bond between 6 and 7
+}%
+\else\if\member h\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,0){\bondf}% bond between 8 and 7
+}%
+\else\if\member i\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,0){\bonda}% bond between 8 and 8a
+}%
+\else\if\member j\relax%
+{\let\fff=\jjj%
+ \put(342,0){\bondf}% bond between 1 and 8a
+}%
+\else\if\member k\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 8a and 4a
+}%
+\else\if\member K\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(342,0){\bonde}% bond between 8a and 4a in the other ring
+}%
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else\if\member B%left aromatic circle
+ \put(342,203){\circle{240}} %circle
+\else
+ \expandafter\twoCH@@R\member//
+ \def\aax{8a}\def\aay{4a}\def\aaz{10}%
+ \if\@@tmpa 1\relax% % plus charge etc.
+ \putratom{304}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{402}{253}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{402}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{304}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{-38}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putlatom{-60}{253}{\@@tmpb}% % left type
+ \else\if\@@tmpa 7\relax%
+ \putlatom{-60}{120}{\@@tmpb}% % left type
+ \else\if\@@tmpa 8\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 10\relax%
+ \else\ifx\@@tmpa\aaz\relax%1998/10/17
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@decav
+\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.}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms and spiro rings %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\put(342,0){\set@hetatom@sixv{#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}% %substituents on 1 to 4
+\put(0,0){\iniflag%2000/11/11 by S. Fujita
+ \set@hetatom@sixv{#3}{-1}{3}{7}{0}%
+ \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+ \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+ \@eclipfalse \if@clip \global\@ecliptrue \fi}%substituents on 5 to 7
+\put(0,0){\iniflag%2000/11/11 by S. Fujita
+ \set@hetatom@sixv{#3}{-7}{0}{2}{0}%
+ \@hclipfalse \if@aclip \global\@hcliptrue \fi}%%substituent on 8
+\put(0,0){\set@vrtx@fuse{#3}%
+ \if@iclip \global\@icliptrue \fi
+ \if@jclip \global\@jcliptrue \fi}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(342,0){\setsixringv{#4}{0}{0}{5}{0}}% %substituents on 1 to 4
+{%
+ \@clipfalse \if@eclip \@cliptrue \fi% %substituents on 5 to 7
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\put(0,0){\setsixringv{#4}{-1}{3}{7}{0}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 8
+\put(0,0){\setsixringv{#4}{-7}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(171,103){\setatombond{#4}{-8}{7}}% %9 %for 4a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(171,303){\setatombond{#4}{-9}{1}}% %10 for 8a position
+}%
+\end{picture}\iniatom\iniflag}% %end of \decaheterov macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The |\clipdetection| command is used for the detection of
+% clippings for a six-six ring. In particular, the clippings
+% at the fused positions are detected in the |\decaheterov| command,
+% where the data are applied to the command
+% |\ylatombondposition| (chemstr.dtx).
+% \changes{v1.02}{1998/10/16}{Newly added command}
+%
+% \begin{macro}{\clipdetection}
+% \begin{macrocode}
+\def\clipdetection{%
+% hetero atom on 1
+\ifx\aaa\empty\else%
+ \@acliptrue%
+\fi%
+% hetero atom on 2
+\ifx\bbb\empty\else%
+ \@bcliptrue%
+\fi%
+% hetero atom on 3
+\ifx\ccc\empty\else%
+ \@ccliptrue%
+\fi%
+% hetero atom on 4
+\ifx\ddd\empty\else%
+ \@cliptrue%
+\fi%
+% hetero atom on 4a
+{\let\eee=\iii%
+\ifx\eee\empty\else%
+ \global\@icliptrue%
+\fi%
+}%
+% hetero atom on 8a
+{\let\fff=\jjj%
+\ifx\fff\empty\else%
+ \global\@jcliptrue%
+\fi%
+}%
+% hetero atom on 5
+{\let\ddd=\eee%
+\ifx\ddd\empty\else
+ \global\@ecliptrue%
+\fi%
+}%
+% hetero atom on 6
+{\let\eee=\fff%
+\ifx\eee\empty\else%
+ \global\@fcliptrue%
+\fi%
+}%
+% hetero atom on 7
+{\let\fff=\ggg%
+\ifx\fff\empty\else%
+ \global\@gcliptrue%
+\fi%
+}%
+% hetero atom on 8
+{\let\aaa=\hhh%
+\ifx\aaa\empty\else%
+ \global\@hcliptrue%
+\fi%
+}}% end \clipdetection
+% \end{macrocode}
+% \end{macro}
+%
+% The command |\ylhetposition| is used in the |\decaheterov| command,
+% giving the sift values for drawing a structure as a substituent.
+% \changes{v1.02}{1998/10/16}{Newly added command}
+%
+% \begin{macro}{\ylhetposition}
+% \begin{macrocode}
+\def\ylhetposition#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
+% \end{macrocode}
+%
+% The flags |\@lyatrue| etc are not used in a revised edition.
+%
+% \begin{macrocode}
+ \or
+ \ifx\aaa\empty
+ \ifx\hhh\empty% aaa and hhh are absent
+ \gdef\@ylii{0}\gdef\@yli{-406}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \else% hhh is present
+ \def\@ylii{0}\def\@yli{-442}\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \else%aaa is present
+ \def\@ylii{0}\def\@yli{-442}\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \or\ifx\bbb\empty
+ \def\@ylii{-171}\def\@yli{-303}\@ylswtrue%\@ylbtrue% subst. on 2
+% \def\@ylii{-513}\def\@yli{-303}\@ylswtrue%\@ylbtrue% subst. on 2
+ \else
+ \def\@ylii{-213}\def\@yli{-327}\@ylswtrue%\@ylbtrue% subst. on 2
+% \def\@ylii{-555}\def\@yli{-327}\@ylswtrue%\@ylbtrue% subst. on 2
+ \fi
+ \or\ifx\ccc\empty
+ \def\@ylii{-171}\def\@yli{-103}\@ylswtrue%\@ylctrue% subst. on 3
+% \def\@ylii{-513}\def\@yli{-103}\@ylswtrue%\@ylctrue% subst. on 3
+ \else
+ \def\@ylii{-213}\def\@yli{-79}\@ylswtrue%\@ylctrue% subst. on 3
+% \def\@ylii{-555}\def\@yli{-79}\@ylswtrue%\@ylctrue% subst. on 3
+ \fi
+ \or\ifx\ddd\empty
+ \ifx\eee\empty% ddd and eee are absent
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \else% eee present
+ \gdef\@ylii{0}\gdef\@yli{36}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \fi
+ \else% ddd present
+ \gdef\@ylii{0}\gdef\@yli{36}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \fi
+ \or
+ \ifx\eee\empty
+ \ifx\iii\empty
+ \ifx\fff\empty% eee, iii and fff are absent
+ \def\@ylii{173}\def\@yli{-103}\@ylswtrue%\@yletrue% subst. on 5
+ \else% fff is present
+ \def\@ylii{213}\def\@yli{-79}\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+% \else% iii is present; fused position => no action here
+% \def\@ylii{0}\def\@yli{-36}\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+ \else% eee is present
+ \def\@ylii{213}\def\@yli{-79}\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+ \or
+ \ifx\fff\empty
+ \ifx\jjj\empty
+ \ifx\ggg\empty% fff, jjj, and ggg are absent
+ \def\@ylii{173}\def\@yli{-303}\@ylswtrue%\@ylftrue% subst. on 6
+ \else%ggg is present
+ \def\@ylii{213}\def\@yli{-327}\@ylswtrue%\@ylftrue% subst. on 6
+ \fi
+% \else%jjj is present; fused position => no action here
+% \def\@ylii{213}\def\@yli{-327}\@ylswtrue%\@ylftrue% subst. on 6
+ \fi
+ \else%fff is present
+ \def\@ylii{213}\def\@yli{-327}\@ylswtrue%\@ylftrue% subst. on 6
+ \fi%
+\fi%end of ifcase
+\fi\fi\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse vertical type}
+%
+% The standard skeleton of a six-to-six fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% **********************************
+% * decahetero derivatives *
+% * (vertical type, inverse type) *
+% **********************************
+% The following numbering is adopted in this macro.
+%
+% 5 (9) 4
+% * 4a *
+% 6 * * * * 3
+% | | |
+% | | |
+% 7 * * * * 2
+% * 8a *
+% 8 (10)1
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decaheterovi| 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}
+% \decaheterovi(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 : 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
+% 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.
+%
+% \decaheterovi{1==N}{1==Cl;2==F}
+% \decaheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \decaheterovi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\decaheterovi| uses a picture environment and
+% consists of the same unit processes as shown in |\sixheterovi|:
+% \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| 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/25}{Spiro rings and fused rings:
+% \cs{test@vertix@decavi}, etc.}
+%
+% \begin{macro}{\decaheterovi}
+% \begin{macro}{\@deca@heterovi}
+% \begin{macro}{\@deca@@heterovi}
+% \begin{macro}{\@decaheterovi}
+% \begin{macrocode}
+\def\decaheterovi{\@ifnextchar({\@deca@heterovi(@}{\@deca@heterovi(@)}}
+\def\@deca@heterovi(#1){\@ifnextchar[{\@deca@@heterovi(#1)[@}%
+{\@deca@@heterovi(#1)[@]}}
+\def\@deca@@heterovi(#1)[#2]#3#4{\@ifnextchar[%
+{\@decaheterovi(#1)[#2]{#3}{#4}[@}%
+{\@decaheterovi(#1)[#2]{#3}{#4}[@]}}
+\def\@decaheterovi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+%%\test@vertix@sixv{#3}{d}{c}{b}{a}{h}{g}%
+%%\test@vertix@decav{#3}{f}{e}{i}{j}{@}{@}%{i}{j} fixed
+\test@vertix@decavi{#3}%
+%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylhetposition{#4}{5}{0}{5}{-1}% %substituents on 1 to 4
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+\ylhetposition{#4}{12}{3}{7}{-1}% %substituents on 6 to 8
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylhetposition{#4}{-4}{0}{2}{0}% %substituent on 5
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \ylatombondposition{#4}{-9}{7}% %10 for 8a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-103}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{1}% %9 for 4a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `decaheterovi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\put(342,0){\set@skel@bond{#1}{c}{a}}%
+ % bond between 1 and 2 \@aaa -> \skbonda etc
+\put(342,0){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(342,0){\set@skel@bond{#1}{a}{c}}%
+ % bond between 3 and 4 \@ccc -> \skbondc etc
+\put(342,0){\set@skel@bond{#1}{j}{d}}%
+ % bond between 4 and 4a \@ddd -> \skbondd etc
+\put(342,0){\set@skel@bond{#1}{k}{e}}%
+ % bond between 4a and 8a \@kkk -> \skbonde etc
+\put(342,0){\set@skel@bond{#1}{d}{f}}%
+ % bond between 8a and 1 \@jjj -> \skbondf etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\set@skel@bond{#1}{e}{a}% bond between 8 and 8a \@eee -> \skbonda etc
+\set@skel@bond{#1}{i}{c}% bond between 5 and 4a \@iii -> \skbondc etc
+\set@skel@bond{#1}{h}{d}% bond between 5 and 6 \@hhh -> \skbondd etc
+\set@skel@bond{#1}{g}{e}% bond between 6 and 7 \@ggg -> \skbonde etc
+\set@skel@bond{#1}{f}{f}% bond between 7 and 8 \@fff -> \skbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\fff=\jjj \let\eee=\iii%
+ \put(342,0){\bonda}% bond between 1 and 2
+ \put(342,0){\bondc}% bond between 3 and 4
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 8a and 4a
+ \put(0,0){\bondf}% bond between 8 and 7
+ \put(0,0){\bondd}% bond between 5 and 6
+}%
+\else\if\member l\relax%
+\else\if\member a\relax%
+ \put(342,0){\bondc}% bond between 3 and 4
+\else\if\member b\relax%
+ \put(342,0){\bondb}% bond between 2 and 3
+\else\if\member c\relax%
+ \put(342,0){\bonda}% bond between 1 and 2
+\else\if\member d\relax%
+{\let\fff=\jjj%
+ \put(342,0){\bondf}% bond between 1 and 8a
+}%
+\else\if\member e\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,0){\bonda}% bond between 8 and 8a
+}%
+\else\if\member f\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,0){\bondf}% bond between 8 and 7
+}%
+\else\if\member g\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,0){\bonde}% bond between 6 and 7
+}%
+\else\if\member h\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \put(0,0){\bondd}% bond between 5 and 6
+}%
+\else\if\member i\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,0){\bondc}% bond between 5 and 4a
+}%
+\else\if\member j\relax%
+{\let\eee=\iii%
+ \put(342,0){\bondd}% bond between 4 and 4a
+}%
+\else\if\member k\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 8a and 4a
+}%
+\else\if\member K\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(342,0){\bonde}% bond between 8a and 4a in the other ring
+}%
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else\if\member B%left aromatic circle
+ \put(342,203){\circle{240}} %circle
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{4a}\def\aay{8a}\def\aaz{10}%
+ \if\@@tmpa 4\relax% % plus charge etc.
+ \putratom{304}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{402}{253}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{402}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 1\relax%
+ \putratom{304}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putlatom{-60}{253}{\@@tmpb}% % left type
+ \else\if\@@tmpa 6\relax%
+ \putlatom{-60}{120}{\@@tmpb}% % left type
+ \else\if\@@tmpa 5\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aaz\relax% 1998/10/17 by S. Fujita
+% \else\if\@@tmpa 10\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{-38}{68}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@decavi
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms and spiro rings %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\@tmpclipfalse
+\put(0,0){\set@hetatom@sixv{#3}{12}{3}{7}{-1}%
+ \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+ \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+ \@eclipfalse \if@clip \global\@ecliptrue \fi%
+}%substituents on 6 to 8
+\put(0,0){\set@hetatom@sixv{#3}{-4}{0}{2}{0}%
+ \@aclipfalse \if@aclip \global\@hcliptrue \fi%
+}%%substituent on 5
+\put(0,0){\set@vrtx@decafusevi{#3}%
+ \@tmpclipfalse
+ \if@iclip \global\@tmpcliptrue \fi
+ \if@jclip \global\@icliptrue \fi
+ \if@tmpclip \global\@jcliptrue \fi
+}% fused positions
+%to be done after all
+\put(342,0){\set@hetatom@sixv{#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
+}% %substituents on 1 to 4
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(342,0){\setsixringv{#4}{5}{0}{5}{-1}}% %substituents on 1 to 4
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 6 to 8
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\put(0,0){\setsixringv{#4}{12}{3}{7}{-1}}%
+}
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 5
+\put(0,0){\setsixringv{#4}{-4}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(171,103){\setatombond{#4}{-9}{7}}% %10 for 8a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(171,303){\setatombond{#4}{-8}{1}}% %9 for 4a position
+}%
+\end{picture}\iniatom\iniflag}% %end of \decaheterovi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\test@vertix@decavi| is used to test the presence of
+% a hetero atom or a spiro substituent on a vertex of the
+% decaheterovi nucleus.
+%
+% \begin{macro}{\if@tmpclip}
+% \begin{macro}{\test@vertix@decavi}
+% \begin{macrocode}
+\newif\if@tmpclip \@tmpclipfalse
+\def\test@vertix@decavi#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%2
+ \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
+ \or%3
+ \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
+ \or%
+ \if\@tmpb a%
+ \def\jjj{@}%4a
+ \else\if\@tmpb s%
+ \def\aaa{}%4
+ \else\if\@tmpb h%
+ \def\aaa{@}%4
+ \else\ifx\@tmpb\empty%
+ \def\aaa{@}%4
+ \fi\fi\fi\fi%
+ \or%5
+ \if\@tmpb s\relax\def\hhh{}\else\def\hhh{@}\fi
+ \or%6
+ \if\@tmpb s\relax\def\ggg{}\else\def\ggg{@}\fi
+ \or%7
+ \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+ \or%
+ \if\@tmpb a%
+ \xdef\iii{@}%8a
+ \else\if\@tmpb s%
+ \xdef\eee{}%8s
+ \else\if\@tmpb h%
+ \xdef\eee{@}%8h
+ \else\ifx\@tmpb\empty%
+ \xdef\eee{@}%8
+ \fi\fi\fi\fi%
+\or%9 (= 4a)
+ \if\@tmpb s\relax\def\jjj{}\else\def\jjj{@}\fi
+\or%10 (= 8a)
+ \if\@tmpb s\relax\def\iii{}\else\def\iii{@}\fi
+\fi\fi}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@vrtx@decafusevi| is used to set
+% a hetero atom or on a vertex of a bridgehead location.
+%
+% \begin{macro}{\set@vrtx@decafusevi}
+% \begin{macrocode}
+\def\set@vrtx@decafusevi#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{207}{280}{\@memberb}% % left type
+ \else\relax
+ \fi
+ \or\or\or
+ \or%8
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putlatom{207}{65}{\@memberb}% % left type
+ \else\relax
+ \fi
+\or%9 (= 4a)
+ \global\@icliptrue%
+ \putlatom{207}{280}{\@memberb}% % left type
+\or%10 (= 8a)
+ \global\@jcliptrue%
+ \putlatom{207}{65}{\@memberb}% % left type
+\fi\fi}%
+}% end of the macro \set@vrtx@decafusevi
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@fusion@decavi| is used to set
+% a fused ring or on an edge of the decaheterovi nucleus.
+%
+% \begin{macro}{\set@fusion@decavi}
+% \begin{macrocode}
+\def\set@fusion@decavi{%
+ \let\@@tmpa=\@tmpa
+ \let\@@tmpb=\@tmpb
+ \if\@tmpa a%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa A%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa b%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa B%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa c%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa C%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa d%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `d'}%
+ \fi
+ \else\if\@tmpa D%
+ \let\@@tmpa=\@tmpa
+ \put(342,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `D'}%
+ \fi
+ \else\if\@tmpa e%
+ \edef\@@tmpa{c}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `e'}%
+ \fi
+ \else\if\@tmpa E%
+ \edef\@@tmpa{C}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `E'}%
+ \fi
+ \else\if\@tmpa f%
+ \edef\@@tmpa{d}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa F%
+ \edef\@@tmpa{D}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa g%
+ \edef\@@tmpa{e}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa G%
+ \edef\@@tmpa{E}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa h%
+ \edef\@@tmpa{f}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa H%
+ \edef\@@tmpa{F}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \else\if\@tmpa i%
+ \edef\@@tmpa{a}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `i'}%
+ \fi
+ \else\if\@tmpa I%
+ \edef\@@tmpa{A}%
+ \put(0,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `I'}%
+ \fi
+ \else\if\@tmpa j%
+ \edef\@@tmpa{f}%
+ \put(342,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `j'}%
+ \fi
+ \else\if\@tmpa J%
+ \edef\@@tmpa{F}%
+ \put(342,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `J'}%
+ \fi
+ \else\if\@tmpa k%
+ \edef\@@tmpa{e}%
+ \put(342,0){\set@fusionadd@sixvi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `k'}%
+ \fi
+ \else\if\@tmpa K%
+ \edef\@@tmpa{E}%
+ \put(342,0){\set@fusionadd@sixvi}%
+ \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@decavi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Vertical-bottom type}
+% The macro |\decaheterovb| is used for drawing six-six heterocyclic
+% derivatives of vertical-bottom type (numbering from the bottom
+% to the left-upper part).
+% The word ``vertical'' means that each benzene ring is a vertical type.
+% The word ``bottom'' means that the benzene ring with young locant numbers
+% is located at the bottom.
+% The skeleton and endocyclic double bonds are drawn directly,
+% while substituents and exocyclic bonds are placed by useing
+% the inner macro |\setsixringv|.
+%
+% The standard skeleton of a six-to-six fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \changes{v1.02}{1998/10/16}{Newly added command}
+%
+% \begin{verbatim}
+% ***************************
+% * decahetro derivatives *
+% * (vertical bottom type) *
+% ***************************
+% The following numbering is adopted in this macro.
+%
+% 7
+% *
+% 6 * * 8
+% | |
+% | | 0G (4a)
+% 5 * * *
+% 0F(4a) * * 1
+% | |
+% | |
+% 4 * * 2
+% *
+% 3
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decaheterovb| 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}
+% \decaheterovb(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 : 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
+% 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.
+%
+% \decaheterovb{1==N}{1==Cl;2==F}
+% \decaheterovb[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \decaheterovb[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\decaheterovb| 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| 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/25}{Spiro rings and fused rings}
+%
+% \begin{macro}{\decaheterovb}
+% \begin{macro}{\@deca@heterovb}
+% \begin{macro}{\@deca@@heterovb}
+% \begin{macro}{\@decaheterovb}
+% \begin{macrocode}
+\def\decaheterovb{\@ifnextchar({\@deca@heterovb(@}{\@deca@heterovb(@)}}
+\def\@deca@heterovb(#1){\@ifnextchar[{\@deca@@heterovb(#1)[@}%
+{\@deca@@heterovb(#1)[@]}}
+\def\@deca@@heterovb(#1)[#2]#3#4{\@ifnextchar[%
+{\@decaheterovb(#1)[#2]{#3}{#4}[@}%
+{\@decaheterovb(#1)[#2]{#3}{#4}[@]}}
+\def\@decaheterovb(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\test@vertix@decavb{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+{\let\eee=\ddd\let\ddd=\ccc
+\let\ccc=\bbb\let\bbb=\aaa
+\ylhetpositionb{#4}{1}{1}{6}{0}% %substituents on 1 to 4
+}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylhetpositionb{#4}{0}{4}{7}{0}% %substituents on 5 to 6
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{171}\def\@@yli{-303}\fi
+\else
+{\let\aaa=\ggg \let\bbb=\hhh
+\ylhetpositionb{#4}{-6}{0}{3}{0}% %substituents on 7 to 8
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{171}\def\@@yli{-303}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{9}% %9 %for 4a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{171}\def\@@yli{-303}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-9}{3}% %10 for 8a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{-406}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1000,1200)(-550,-240)
+ \iforigpt \put(-550,-240){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `decaheterovb' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\eee=\ddd\let\ddd=\ccc
+ \let\ccc=\bbb\let\bbb=\aaa
+ \let\aaa=\jjj \let\fff=\iii
+\set@skel@bond{#1}{j}{a}% bond between 8a and 1 \@jjj -> \skbonda etc
+\set@skel@bond{#1}{a}{b}% bond between 1 and 2 \@aaa -> \skbondb etc
+\set@skel@bond{#1}{b}{c}% bond between 2 and 3 \@bbb -> \skbondc etc
+\set@skel@bond{#1}{c}{d}% bond between 3 and 4 \@ccc -> \skbondd etc
+\set@skel@bond{#1}{d}{e}% bond between 4 and 4a \@ddd -> \skbonde etc
+\set@skel@bond{#1}{k}{f}% bond between 4a and 8a \@kkk -> \skbondf etc
+}%
+{\let\aaa=\ggg\let\bbb=\hhh\let\ccc=\jjj\let\ddd=\iii
+\put(-171,303){\set@skel@bond{#1}{h}{a}}%
+ % bond between 7 and 8 \@hhh -> \skbonda etc
+\put(-171,303){\set@skel@bond{#1}{i}{b}}%
+ % bond between 8 and 8a \@iii -> \skbondb etc
+\put(-171,303){\set@skel@bond{#1}{e}{d}}%
+ % bond between 4a and 5 \@eee -> \skbondd etc
+\put(-171,303){\set@skel@bond{#1}{f}{e}}%
+ % bond between 5 and 6 \@fff -> \skbonde etc
+\put(-171,303){\set@skel@bond{#1}{g}{f}}%
+ % bond between 6 and 7 \@ggg -> \skbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{\let\aaa=\ggg\let\bbb=\hhh\let\ccc=\jjj\let\ddd=\iii
+ \put(-171,303){\bonda}% bond between 7 and 8
+ \put(-171,303){\bonde}% bond between 5 and 6
+}%
+{\let\eee=\ddd\let\ddd=\ccc
+ \let\ccc=\bbb\let\bbb=\aaa
+ \let\aaa=\jjj \let\fff=\iii
+ \put(0,0){\bondb}% bond between 1 and 2
+ \put(0,0){\bondd}% bond between 3 and 4
+ \put(0,0){\bondf}% bond between 4a and 4b
+}%
+\else\if\member l\relax%
+\else\if\member a\relax%
+{\let\ccc=\bbb\let\bbb=\aaa
+ \put(0,0){\bondb}% bond between 1 and 2
+}%
+\else\if\member b\relax
+{\let\ddd=\ccc\let\ccc=\bbb
+ \put(0,0){\bondc}% bond between 2 and 3
+}%
+\else\if\member c\relax
+{\let\eee=\ddd\let\ddd=\ccc
+ \put(0,0){\bondd}% bond between 3 and 4
+}%
+\else\if\member d\relax%
+{\let\fff=\eee\let\eee=\ddd
+ \put(0,0){\bonde}% bond between 4 and 4a
+}%
+\else\if\member e\relax%
+{\let\ddd=\iii%
+ \put(-171,303){\bondd}% bond between 5 and 4a
+}%
+\else\if\member f\relax%
+ \put(-171,303){\bonde}% bond between 5 and 6
+\else\if\member g\relax%
+{\let\aaa=\ggg
+ \put(-171,303){\bondf}% bond between 6 and 7
+}%
+\else\if\member h\relax%
+{\let\aaa=\ggg \let\bbb=\hhh%
+ \put(-171,303){\bonda}% bond between 8 and 7
+}%
+\else\if\member i\relax%
+{\let\bbb=\hhh \let\ccc=\jjj%
+ \put(-171,303){\bondb}% bond between 8 and 8a
+}%
+\else\if\member j\relax%
+{\let\bbb=\aaa\let\aaa=\jjj%
+ \put(0,0){\bonda}% bond between 1 and 8a
+}%
+\else\if\member k\relax%
+{\let\aaa=\jjj\let\fff=\iii%
+ \put(0,0){\bondf}% bond between 8a and 4a
+}%
+\else\if\member K\relax%
+{\let\ccc=\jjj\let\ddd=\iii%
+ \put(-171,303){\bondc}% bond between 8a and 4a in the other ring
+}%
+\else\if\member A%left aromatic circle
+ \put(-171,506){\circle{240}} %circle
+\else\if\member B%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else \expandafter\twoCH@@R\member//%
+ \def\aax{8a}\def\aay{4a}\def\aaz{10}%
+ \if\@@tmpa 1\relax% % plus charge etc.
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{-38}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{-120}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putlatom{-209}{431}{\@@tmpb}% % left type
+ \else\if\@@tmpa 6\relax%
+ \putlatom{-209}{546}{\@@tmpb}% % left type
+ \else\if\@@tmpa 7\relax%
+ \putratom{-209}{585}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{-111}{546}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putlatom{-60}{253}{\@@tmpb}% % left type
+ \else\ifx\@@tmpa\aaz\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{-209}{371}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@decavb
+\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.}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom
+\put(-171,303){\set@hetatom@sixv{#3}{0}{4}{7}{0}%
+\if@eclip \global\@ecliptrue\fi%
+\if@fclip \global\@fcliptrue\fi%
+}% %substituents on 5 to 6
+\put(-171,303){\set@hetatom@sixv{#3}{-6}{0}{3}{0}%
+ \@gclipfalse \if@aclip \global\@gcliptrue \fi%
+ \@hclipfalse \if@bclip \global\@hcliptrue \fi%
+}% %substituents on 7 to 8
+\put(0,0){\set@vrtx@decafusevb{#3}%
+ \if@iclip \global\@icliptrue \fi
+ \if@jclip \global\@jcliptrue \fi
+}%9 %for 4a position, %10 for 8a position
+%to be done after all
+\put(0,0){\iniflag%2000/11/11 by S. Fujita
+\set@hetatom@sixv{#3}{1}{1}{6}{0}%
+\@aclipfalse \if@bclip \global\@acliptrue \fi%
+\@bclipfalse \if@cclip \global\@bcliptrue \fi%
+\@cclipfalse \if@clip \global\@ccliptrue \fi%
+\@clipfalse \if@eclip \global\@cliptrue \fi%
+}% %substituents on 1 to 4
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+{%
+\@eclipfalse \if@clip \@ecliptrue \fi%
+\@clipfalse \if@cclip \@cliptrue \fi%
+\@cclipfalse \if@bclip \@ccliptrue \fi%
+\@bclipfalse \if@aclip \@bcliptrue \fi%
+\put(0,0){\setsixringv{#4}{1}{1}{6}{0}}% %substituents on 1 to 4
+}%
+{%
+\put(-171,303){\setsixringv{#4}{0}{4}{7}{0}}% %substituents on 5 to 6
+}%
+{%
+ \@aclipfalse \if@gclip \@acliptrue \fi%
+ \@bclipfalse \if@hclip \@bcliptrue \fi%
+\put(-171,303){\setsixringv{#4}{-6}{0}{3}{0}}% %substituents on 7 to 8
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(-171,303){\setatombond{#4}{-8}{9}}% %9 %for 4a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(0,406){\setatombond{#4}{-9}{3}}% %10 for 8a position
+}%
+\end{picture}\iniatom\iniflag}% %end of \decaheterovb macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylhetpositionb| is used in the |\decaheterovb| command,
+% giving the sift values for drawing a structure as a substituent.
+% \changes{v1.02}{1998/10/16}{Newly added command}
+%
+% \begin{macro}{\ylhetpositionb}
+% \begin{macrocode}
+\def\ylhetpositionb#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%
+ \ifx\ggg\empty% aaa and ggg are absent
+ \gdef\@ylii{0}\gdef\@yli{-406}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \else% ggg is present
+ \gdef\@ylii{0}\gdef\@yli{-442}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \else%aaa is present
+ \gdef\@ylii{0}\gdef\@yli{-442}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \or
+ \ifx\bbb\empty
+ \ifx\hhh\empty% aaa and hhh are absent
+ \gdef\@ylii{-171}\gdef\@yli{-303}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \else%hhh is present
+ \gdef\@ylii{-213}\gdef\@yli{-327}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \fi
+ \else
+ \gdef\@ylii{-213}\gdef\@yli{-327}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \fi
+ \or\ifx\ccc\empty
+ \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \else
+ \gdef\@ylii{-213}\gdef\@yli{-79}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \fi
+ \or
+ \ifx\ddd\empty
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \else% ddd present
+ \gdef\@ylii{0}\gdef\@yli{36}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \fi
+ \or
+ \ifx\eee\empty
+ \gdef\@ylii{173}\gdef\@yli{-103}\global\@ylswtrue%\@yletrue% subst. on 5
+ \else% eee is present
+ \gdef\@ylii{223}\gdef\@yli{-79}\global\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+ \or
+ \ifx\fff\empty
+ \gdef\@ylii{173}\gdef\@yli{-303}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \else%fff is present
+ \gdef\@ylii{213}\gdef\@yli{-327}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \fi
+\fi%end of ifcase
+\fi\fi\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\test@vertix@decavb| determines the presence of
+% a hetro atom or a spriro ring at each of the vertices.
+% \changes{v2.00}{1998/12/25}{Added: spiro rings}
+%
+% \begin{macro}{\test@vertix@decavb}
+% \begin{macrocode}
+\def\test@vertix@decavb#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}%1
+ \if\@tmpb s\relax\def\aaa{}\else\def\aaa{@}\fi
+ \or% \xdef\bbb{\@memberb}%2
+ \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
+ \or% \xdef\ccc{\@memberb}%3
+ \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
+ \or%
+ \if\@tmpb a%
+ \def\iii{@}%4a
+ \else\if\@tmpb s%
+ \def\ddd{}%4
+ \else\if\@tmpb h%
+ \def\ddd{@}%4
+ \else\ifx\@tmpb\empty%
+ \def\ddd{@}%4
+ \fi\fi\fi\fi%
+ \or% \xdef\eee{\@memberb}%5
+ \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
+ \or% \xdef\fff{\@memberb}%6
+ \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+ \or% \xdef\ggg{\@memberb}%7
+ \if\@tmpb s\relax\def\ggg{}\else\def\ggg{@}\fi
+ \or%
+ \if\@tmpb a%
+ \def\jjj{@}%8a
+ \else\if\@tmpb s%
+ \def\hhh{}%8
+ \else\if\@tmpb h%
+ \def\hhh{@}%4
+ \else\ifx\@tmpb\empty%
+ \def\hhh{@}%4
+ \fi\fi\fi\fi%
+\or% \xdef\iii{\@memberb}%9 (= 4a)
+ \if\@tmpb s\relax\def\iii{}\else\def\iii{@}\fi
+\or% \xdef\jjj{\@memberb}%10 (= 8a)
+ \if\@tmpb s\relax\def\jjj{}\else\def\jjj{@}\fi
+\fi\fi}%
+}% end of the macro \test@vertix@decavb
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@vrtx@decafusevb| typesets a hetero atom
+% at each fused position.
+% \changes{v2.00}{1998/12/25}{Added: spiro rings}
+%
+% \begin{macro}{\set@vrtx@decafusevb}
+% \begin{macrocode}
+\def\set@vrtx@decafusevb#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}{280}{\@memberb}% % left type
+ \else\relax
+ \fi
+ \or\or\or
+ \or%8
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putratom{-31}{356}{\@memberb}% % right type
+ \else\relax
+ \fi
+\or%9 (= 4a)
+ \global\@icliptrue%
+ \putlatom{-135}{280}{\@memberb}% % left type
+\or%10 (= 8a)
+ \global\@jcliptrue%
+ \putratom{-31}{356}{\@memberb}% % right type
+\fi\fi}%
+}% end of the macro \set@vrtx@decafusevb
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Vertical-top type}
+%
+% The macro |\decaheterovt| is used for drawing six-to-six fused derivatives
+% of vertical-bottom type (numbering from the top to the left-down part).
+% The word ``vertical'' means that each benzene ring is a vertical type.
+% The word ``top'' means that the benzene ring with young locant numbers
+% is located at the top.
+% The skeleton and endocyclic double bonds are drawn directly,
+% while substituents and exocyclic bonds are placed by useing
+% the inner macro |\setsixringv|.
+% \changes{v1.02}{1998/10/18}{Newly added command}
+%
+% \begin{verbatim}
+% ****************************
+% * decaheterovt derivatives *
+% * (vertical-top type) *
+% ****************************
+% The following numbering is adopted in this macro.
+%
+% 2
+% *
+% 1 * * 3
+% | |
+% | |
+% 0G (8a) * * 4
+% 8 * * 0F(4a)
+% | |
+% | |
+% 7 * * 5
+% *
+% 6
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\decaheterovt| 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}
+% \decaheterovt(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 : 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
+% 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.
+%
+% \decaheterovt{1==N}{1==Cl;2==F}
+% \decaheterovt[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \decaheterovt[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\decaheterovt| 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| 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/10/31}{Add: Spiro and fused rings}
+%
+% \begin{macro}{\decaheterovt}
+% \begin{macro}{\@deca@heterovt}
+% \begin{macro}{\@deca@@heterovt}
+% \begin{macro}{\@decaheterovt}
+% \begin{macrocode}
+\def\decaheterovt{\@ifnextchar({\@deca@heterovt(@}{\@deca@heterovt(@)}}
+\def\@deca@heterovt(#1){\@ifnextchar[{\@deca@@heterovt(#1)[@}%
+{\@deca@@heterovt(#1)[@]}}
+\def\@deca@@heterovt(#1)[#2]#3#4{\@ifnextchar[%
+{\@decaheterovt(#1)[#2]{#3}{#4}[@}%
+{\@decaheterovt(#1)[#2]{#3}{#4}[@]}}
+\def\@decaheterovt(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\test@vertix@decavb{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+{\let\fff=\aaa
+\ylhetpositiont{#4}{5}{5}{7}{0}% %substituent on 1
+}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\else
+{\let\aaa=\bbb\let\bbb=\ccc\let\ccc=\ddd
+\ylhetpositiont{#4}{-1}{0}{4}{0}% %substituents on 2 to 4
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\else
+{\let\ccc=\eee\let\ddd=\fff
+\let\eee=\ggg\let\fff=\hhh
+\ylhetpositiont{#4}{-2}{2}{7}{0}% %substituents on 5 to 8
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{5}% %9 %for 4a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-9}{11}% %10 for 8a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{-406}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `decaheterovt' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{%
+ \let\fff=\aaa \let\aaa=\bbb \let\bbb=\ccc
+ \let\ccc=\ddd \let\ddd=\iii \let\eee=\jjj
+\put(171,303){\set@skel@bond{#1}{b}{a}}%
+ % bond between 2 and 3 \@bbb -> \skbonda etc
+\put(171,303){\set@skel@bond{#1}{c}{b}}%
+ % bond between 3 and 4 \@ccc -> \skbondb etc
+\put(171,303){\set@skel@bond{#1}{d}{c}}%
+ % bond between 4 and 4a \@ddd -> \skbondc etc
+\put(171,303){\set@skel@bond{#1}{k}{d}}%
+ % bond between 4a and 8a \@kkk -> \skbondd etc
+\put(171,303){\set@skel@bond{#1}{j}{e}}%
+ % bond between 8a and 1 \@jjj -> \skbonde etc
+\put(171,303){\set@skel@bond{#1}{a}{f}}%
+ % bond between 1 and 2 \@aaa -> \skbondf etc
+}%
+{%
+ \let\aaa=\jjj\let\bbb=\iii
+ \let\ccc=\eee\let\ddd=\fff
+ \let\eee=\ggg\let\fff=\hhh
+\set@skel@bond{#1}{e}{b}% bond between 4a and 5 \@eee -> \skbondb etc
+\set@skel@bond{#1}{f}{c}% bond between 5 and 6 \@fff -> \skbondc etc
+\set@skel@bond{#1}{g}{d}% bond between 6 and 7 \@ggg -> \skbondd etc
+\set@skel@bond{#1}{h}{e}% bond between 7 and 8 \@hhh -> \skbonde etc
+\set@skel@bond{#1}{i}{f}% bond between 8 and 8a \@iii -> \skbondf etc
+}%
+\endgroup
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+{%
+ \let\ccc=\eee\let\ddd=\fff\let\eee=\ggg\let\fff=\ggg
+ \put(0,0){\bondc}% bond between 7 and 8
+ \put(0,0){\bonde}% bond between 5 and 6
+}%
+{%
+ \let\fff=\aaa\let\aaa=\bbb
+ \let\bbb=\ccc\let\ccc=\ddd
+ \let\ddd=\iii\let\eee=\jjj
+ \put(171,303){\bondf}% bond between 1 and 2
+ \put(171,303){\bondb}% bond between 3 and 4
+ \put(171,303){\bondd}% bond between 4a and 8a
+}%
+\else\if\member l\relax%
+\else\if\member a\relax%
+{\let\fff=\aaa\let\aaa=\bbb
+ \put(171,303){\bondf}% bond between 1 and 2
+}%
+\else\if\member b\relax
+{\let\aaa=\bbb\let\bbb=\ccc
+ \put(171,303){\bonda}% bond between 2 and 3
+}%
+\else\if\member c\relax
+{\let\bbb=\ccc\let\ccc=\ddd
+ \put(171,303){\bondb}% bond between 3 and 4
+}%
+\else\if\member d\relax%
+{\let\ccc=\ddd\let\ddd=\eee
+ \put(171,303){\bondc}% bond between 4 and 4a
+}%
+\else\if\member e\relax%
+{\let\ccc=\eee\let\bbb=\iii%
+ \put(0,0){\bondb}% bond between 5 and 4a
+}%
+\else\if\member f\relax%
+{\let\ccc=\eee\let\ddd=\fff
+ \put(0,0){\bondc}% bond between 5 and 6
+}%
+\else\if\member g\relax%
+{\let\ddd=\fff\let\eee=\ggg
+ \put(0,0){\bondd}% bond between 6 and 7
+}%
+\else\if\member h\relax%
+{\let\eee=\ggg \let\fff=\hhh%
+ \put(0,0){\bonde}% bond between 8 and 7
+}%
+\else\if\member i\relax%
+{\let\aaa=\jjj \let\fff=\hhh%
+ \put(0,0){\bondf}% bond between 8 and 8a
+}%
+\else\if\member j\relax%
+{\let\fff=\aaa\let\eee=\jjj%
+ \put(171,303){\bonde}% bond between 1 and 8a
+}%
+\else\if\member k\relax%
+{\let\aaa=\jjj\let\bbb=\iii%
+ \put(0,0){\bonda}% bond between 8a and 4a
+}%
+\else\if\member K\relax%
+{\let\eee=\jjj\let\ddd=\iii%
+ \put(171,303){\bondd}% bond between 8a and 4a in the other ring
+}%
+\else\if\member A%left aromatic circle
+ \put(171,506){\circle{240}} %circle
+\else\if\member B%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{8a}\def\aay{4a}\def\aaz{10}%
+ \if\@@tmpa 1\relax% % plus charge etc.
+ \putlatom{111}{546}{\@@tmpb}% % left type
+ \else\if\@@tmpa 2\relax%
+ \putlatom{209}{585}{\@@tmpb}% % left type
+ \else\if\@@tmpa 3\relax%
+ \putratom{209}{546}{\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{209}{431}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{-38}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putratom{-120}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putlatom{-60}{253}{\@@tmpb}% % left type
+ \else\if\@@tmpa 9\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aaz\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@decavt
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\put(0,0){\set@hetatom@sixv{#3}{-2}{2}{7}{0}%
+ \@hclipfalse \if@fclip \global\@hcliptrue \fi%
+ \@gclipfalse \if@eclip \global\@gcliptrue \fi%
+ \@fclipfalse \if@clip \global\@fcliptrue \fi%
+ \@eclipfalse \if@cclip \global\@ecliptrue \fi%
+}% %substituents on 5 to 8
+\put(0,0){\set@vrtx@decafusevt{#3}%
+ \if@iclip \global\@icliptrue \fi
+ \if@jclip \global\@jcliptrue \fi
+}%9 %for 4a position, %10 for 8a position
+%to be done after all (exept aclip)
+\put(171,303){\set@hetatom@sixv{#3}{-1}{0}{4}{0}%
+\@clipfalse \if@cclip \global\@cliptrue \fi%
+\@cclipfalse \if@bclip \global\@ccliptrue \fi%
+\@bclipfalse \if@aclip \global\@bcliptrue \fi%
+}% %substituents on 2 to 4
+{%
+\@fclipfalse%locally cancelled 1999/2/15 by Shinsaku Fujita
+\put(171,303){\set@hetatom@sixv{#3}{5}{5}{7}{0}%
+\@aclipfalse \if@fclip \global\@acliptrue \fi%
+}% %substituent on 1
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+{%
+\@fclipfalse \if@aclip \@fcliptrue \fi%
+\put(171,303){\setsixringv{#4}{5}{5}{7}{0}}% %substituent on 1
+}%
+{%
+\@aclipfalse \if@bclip \@acliptrue \fi%
+\@bclipfalse \if@cclip \@bcliptrue \fi%
+\@cclipfalse \if@clip \@ccliptrue \fi%
+\put(171,303){\setsixringv{#4}{-1}{0}{4}{0}}% %substituents on 2 to 4
+}%
+{%
+ \@cclipfalse \if@eclip \@ccliptrue \fi%
+ \@clipfalse \if@fclip \@cliptrue \fi%
+ \@eclipfalse \if@gclip \@ecliptrue \fi%
+ \@fclipfalse \if@hclip \@fcliptrue \fi%
+\put(0,0){\setsixringv{#4}{-2}{2}{7}{0}}% %substituents on 5 to 8
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(171,303){\setatombond{#4}{-8}{5}}% %9 %for 4a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(0,406){\setatombond{#4}{-9}{11}}% %10 for 8a position
+}%
+\end{picture}\iniatom\iniflag}% %end of \decaheterovt macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The command |\ylhetpositiont| is used in the |\decaheterovt| command,
+% giving the sift values for drawing a structure as a substituent.
+% \changes{v1.02}{1998/10/18}{Newly added command}
+%
+% \begin{macro}{\ylhetpositiont}
+% \begin{macrocode}
+\def\ylhetpositiont#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%
+ \ifx\bbb\empty% aaa and bbb are absent
+ \gdef\@ylii{0}\gdef\@yli{-406}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \else% bbb is present
+ \gdef\@ylii{0}\gdef\@yli{-442}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \else%aaa is present
+ \gdef\@ylii{0}\gdef\@yli{-442}\global\@ylswtrue%\@ylatrue% subst. on 1
+ \fi
+ \or
+ \ifx\bbb\empty
+ \ifx\ccc\empty% aaa and ccc are absent
+ \gdef\@ylii{-171}\gdef\@yli{-303}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \else%ccc is present
+ \gdef\@ylii{-213}\gdef\@yli{-327}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \fi
+ \else
+ \gdef\@ylii{-213}\gdef\@yli{-327}\global\@ylswtrue%\@ylbtrue% subst. on 2
+ \fi
+ \or
+ \ifx\ccc\empty
+ \ifx\ddd\empty
+ \ifx\eee\empty% ccc, ddd, eee are absent
+ \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue%\@ylctrue%subst. on 3
+ \else%eee is present
+ \gdef\@ylii{-213}\gdef\@yli{-79}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \fi
+ \else%ddd is present
+ \gdef\@ylii{-213}\gdef\@yli{-79}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \fi
+ \else%ccc is present
+ \gdef\@ylii{-213}\gdef\@yli{-79}\global\@ylswtrue%\@ylctrue% subst. on 3
+ \fi
+ \or
+ \ifx\ddd\empty
+ \ifx\fff\empty%ddd and fff are absent
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \else%fff present
+ \gdef\@ylii{0}\gdef\@yli{36}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \fi
+ \else% ddd present
+ \gdef\@ylii{0}\gdef\@yli{36}\global\@ylswtrue%\@yldtrue% subst. on 4
+ \fi
+ \or
+ \ifx\eee\empty
+ \ifx\ggg\empty%eee and ggg are absent
+ \gdef\@ylii{173}\gdef\@yli{-103}\global\@ylswtrue%\@yletrue% subst. on 5
+ \else% ggg is present
+ \gdef\@ylii{223}\gdef\@yli{-79}\global\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+ \else% eee is present
+ \gdef\@ylii{223}\gdef\@yli{-79}\global\@ylswtrue%\@yletrue% subst. on 5
+ \fi
+ \or
+ \ifx\fff\empty
+ \ifx\hhh\empty%fff and hhh are absent
+ \gdef\@ylii{173}\gdef\@yli{-303}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \else%hhh is present
+ \gdef\@ylii{213}\gdef\@yli{-327}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \fi
+ \else%fff is present
+ \gdef\@ylii{213}\gdef\@yli{-327}\global\@ylswtrue%\@ylftrue% subst. on 6
+ \fi
+\fi%end of ifcase
+\fi\fi\fi\fi\fi}}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@vrtx@decafusevt| is used to typeset a hetero
+% atom at each fused vertex (4a or 8a) of a decaheterovt ring.
+%
+% \begin{macro}{\set@vrtx@decafusevt}
+% \begin{macrocode}
+\def\set@vrtx@decafusevt#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%
+ \putratom{135}{280}{\@memberb}% % right type
+ \else\relax
+ \fi
+ \or\or\or
+ \or%8
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putlatom{31}{356}{\@memberb}% % left type
+ \else\relax
+ \fi
+\or%9 (= 4a)
+ \global\@icliptrue%
+ \putratom{135}{280}{\@memberb}% % right type
+\or%10 (= 8a)
+ \global\@jcliptrue%
+ \putlatom{31}{356}{\@memberb}% % left type
+\fi\fi}%
+}% end of the macro \set@vrtx@decafusevt
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Short-cut commands for fused heterocycles}
+%
+% The macros |\decaheterov|, |\decaheterovb|, and
+% |\decaheterovt| 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 *
+% * (vertical type) *
+% ****************************************************
+%
+% \quinolinev[BONDLIST]{SUBSLIST}
+% \quinolinevi[BONDLIST]{SUBSLIST}
+% \quinolinevb[BONDLIST]{SUBSLIST}
+% \quinolinevt[BONDLIST]{SUBSLIST}
+%
+% \isoquinolinev[BONDLIST]{SUBSLIST}
+% \isoquinolinevi[BONDLIST]{SUBSLIST}
+% \isoquinolinevb[BONDLIST]{SUBSLIST}
+% \isoquinolinevt[BONDLIST]{SUBSLIST}
+%
+% \quinoxalinev[BONDLIST]{SUBSLIST}
+% \quinoxalinevi[BONDLIST]{SUBSLIST}
+% \quinoxalinevb[BONDLIST]{SUBSLIST}
+% \quinoxalinevt[BONDLIST]{SUBSLIST}
+%
+% \quinazolinev[BONDLIST]{SUBSLIST}
+% \quinazolinevi[BONDLIST]{SUBSLIST}
+% \quinazolinevb[BONDLIST]{SUBSLIST}
+% \quinazolinevt[BONDLIST]{SUBSLIST}
+%
+% \cinnolinev[BONDLIST]{SUBSLIST}
+% \cinnolinevi[BONDLIST]{SUBSLIST}
+% \cinnolinevb[BONDLIST]{SUBSLIST}
+% \cinnolinevt[BONDLIST]{SUBSLIST}
+%
+% \pteridinev[BONDLIST]{SUBSLIST}
+% \pteridinevi[BONDLIST]{SUBSLIST}
+% \pteridinevb[BONDLIST]{SUBSLIST}
+% \pteridinevt[BONDLIST]{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected
+% from a to k (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
+% 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 |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.
+%
+% \quinolinev{3==Cl;2==F}
+% \quinolinev{3==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\quinolinev}
+% \begin{macro}{\quinolinevi}
+% \begin{macro}{\quinolinevb}
+% \begin{macro}{\quinolinevt}
+% \changes{v1.02}{1998/10/18}{Newly added commands:
+% \cs{quinolinevb} and \cs{quinolinevt}}
+% \begin{macrocode}
+\def\quinolinev{%
+ \@ifnextchar[{\@quinolinev[@}{\@quinolinev[acfhk]}}
+\def\@quinolinev[#1]#2{%
+\iforigpt \typeout{command `quinolinev' %
+ is based on `decaheterov'.}\fi%
+\decaheterov[#1]{1==N}{#2}}
+\def\quinolinevi{%
+ \@ifnextchar[{\@quinolinevi[@}{\@quinolinevi[acfhk]}}
+\def\@quinolinevi[#1]#2{%
+\iforigpt \typeout{command `quinolinevi' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovi[#1]{1==N}{#2}}
+\def\quinolinevb{%
+ \@ifnextchar[{\@quinolinevb[@}{\@quinolinevb[acfhk]}}
+\def\@quinolinevb[#1]#2{%
+\iforigpt \typeout{command `quinolinevb' %
+ is based on `decaheterovb'.}\fi%
+\decaheterovb[#1]{1==N}{#2}}
+\def\quinolinevt{%
+ \@ifnextchar[{\@quinolinevt[@}{\@quinolinevt[acfhk]}}
+\def\@quinolinevt[#1]#2{%
+\iforigpt \typeout{command `quinolinevt' %
+ is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{1==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\isoquinolinev}
+% \begin{macro}{\isoquinolinevi}
+% \begin{macro}{\isoquinolinevb}
+% \begin{macro}{\isoquinolinevt}
+% \changes{v1.02}{1998/10/18}{Newly added commands:
+% \cs{isoquinolinevb} and \cs{isoquinolinevt}}
+% \begin{macrocode}
+\def\isoquinolinev{%
+ \@ifnextchar[{\@isoquinolinev[@}{\@isoquinolinev[acfhk]}}
+\def\@isoquinolinev[#1]#2{%
+\iforigpt \typeout{command `isoquinolinev' %
+ is based on `decaheterov'.}\fi%
+\decaheterov[#1]{2==N}{#2}}
+\def\isoquinolinevi{%
+ \@ifnextchar[{\@isoquinolinevi[@}{\@isoquinolinevi[acfhk]}}
+\def\@isoquinolinevi[#1]#2{%
+\iforigpt \typeout{command `isoquinolinevi' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovi[#1]{2==N}{#2}}%
+\def\isoquinolinevb{%
+ \@ifnextchar[{\@isoquinolinevb[@}{\@isoquinolinevb[acfhk]}}
+\def\@isoquinolinevb[#1]#2{%
+\iforigpt \typeout{command `isoquinolinevb' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovb[#1]{2==N}{#2}}%
+\def\isoquinolinevt{%
+ \@ifnextchar[{\@isoquinolinevt[@}{\@isoquinolinevt[acfhk]}}
+\def\@isoquinolinevt[#1]#2{%
+\iforigpt \typeout{command `isoquinolinevt' %
+ is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{2==N}{#2}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\quinoxalinev}
+% \begin{macro}{\quinoxalinevi}
+% \begin{macro}{\quinoxalinevb}
+% \begin{macro}{\quinoxalinevt}
+% \changes{v1.02}{1998/10/18}{Newly added commands:
+% \cs{quinoxalinevb} and \cs{quinoxalinevt}}
+% \begin{macrocode}
+\def\quinoxalinev{%
+ \@ifnextchar[{\@quinoxalinev[@}{\@quinoxalinev[acfhk]}}
+\def\@quinoxalinev[#1]#2{%
+\iforigpt \typeout{command `quinoxalinev' %
+ is based on `decaheterov'.}\fi%
+\decaheterov[#1]{1==N;4==N}{#2}}
+\def\quinoxalinevi{%
+ \@ifnextchar[{\@quinoxalinevi[@}{\@quinoxalinevi[acfhk]}}
+\def\@quinoxalinev[#1]#2{%
+\iforigpt \typeout{command `quinoxalinevi' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovi[#1]{1==N;4==N}{#2}}
+\def\quinoxalinevb{%
+ \@ifnextchar[{\@quinoxalinevb[@}{\@quinoxalinevb[acfhk]}}
+\def\@quinoxalinevb[#1]#2{%
+\iforigpt \typeout{command `quinoxalinevb' %
+ is based on `decaheterovb'.}\fi%
+\decaheterovb[#1]{1==N;4==N}{#2}}
+\def\quinoxalinevt{%
+ \@ifnextchar[{\@quinoxalinevt[@}{\@quinoxalinevt[acfhk]}}
+\def\@quinoxalinevt[#1]#2{%
+\iforigpt \typeout{command `quinoxalinevt' %
+ is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{1==N;4==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\quinazolinev}
+% \begin{macro}{\quinazolinevi}
+% \begin{macro}{\quinazolinevb}
+% \begin{macro}{\quinazolinevt}
+% \changes{v1.02}{1998/10/18}{Newly added commands:
+% \cs{quinazolinevb} and \cs{quinazolinevt}}
+% \begin{macrocode}
+\def\quinazolinev{%
+ \@ifnextchar[{\@quinazolinev[@}{\@quinazolinev[acfhk]}}
+\def\@quinazolinev[#1]#2{%
+\iforigpt \typeout{command `quinazolinev' %
+ is based on `decaheterov'.}\fi%
+\decaheterov[#1]{1==N;3==N}{#2}}
+\def\quinazolinevi{%
+ \@ifnextchar[{\@quinazolinevi[@}{\@quinazolinevi[acfhk]}}
+\def\@quinazolinevi[#1]#2{%
+\iforigpt \typeout{command `quinazolinevi' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovi[#1]{1==N;3==N}{#2}}
+\def\quinazolinevb{%
+ \@ifnextchar[{\@quinazolinevb[@}{\@quinazolinevb[acfhk]}}
+\def\@quinazolinevb[#1]#2{%
+\iforigpt \typeout{command `quinazolinevb' %
+ is based on `decaheterovb'.}\fi%
+\decaheterovb[#1]{1==N;3==N}{#2}}
+\def\quinazolinevt{%
+ \@ifnextchar[{\@quinazolinevt[@}{\@quinazolinevt[acfhk]}}
+\def\@quinazolinevt[#1]#2{%
+\iforigpt \typeout{command `quinazolinevt' %
+ is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{1==N;3==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\cinnolinev}
+% \begin{macro}{\cinnolinevi}
+% \begin{macro}{\cinnolinevb}
+% \begin{macro}{\cinnolinevt}
+% \changes{v1.02}{1998/10/18}{Newly added commands:
+% \cs{cinnolinevb} and \cs{cinnolinevt}}
+% \begin{macrocode}
+\def\cinnolinev{%
+ \@ifnextchar[{\@cinnolinev[@}{\@cinnolinev[acfhk]}}
+\def\@cinnolinev[#1]#2{%
+\iforigpt \typeout{command `cinnolinev' %
+ is based on `decaheterov'.}\fi%
+\decaheterov[#1]{1==N;2==N}{#2}}
+\def\cinnolinevi{%
+ \@ifnextchar[{\@cinnolinevi[@}{\@cinnolinevi[acfhk]}}
+\def\@cinnolinevi[#1]#2{%
+\iforigpt \typeout{command `cinnolinevi' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovi[#1]{1==N;2==N}{#2}}
+\def\cinnolinevb{%
+ \@ifnextchar[{\@cinnolinevb[@}{\@cinnolinevb[acfhk]}}
+\def\@cinnolinevb[#1]#2{%
+\iforigpt \typeout{command `cinnolinevb' %
+ is based on `decaheterovb'.}\fi%
+\decaheterovb[#1]{1==N;2==N}{#2}}
+\def\cinnolinevt{%
+ \@ifnextchar[{\@cinnolinevt[@}{\@cinnolinevt[acfhk]}}
+\def\@cinnolinevt[#1]#2{%
+\iforigpt \typeout{command `cinnolinevt' %
+ is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{1==N;2==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\pteridinev}
+% \begin{macro}{\pteridinevi}
+% \begin{macro}{\pteridinevb}
+% \begin{macro}{\pteridinevt}
+% \changes{v1.02}{1998/10/18}{Newly added commands:
+% \cs{pteridinevb} and \cs{pteridinevt}}
+% \begin{macrocode}
+\def\pteridinev{\@ifnextchar[{\@pteridinev[@}{\@pteridinev[acfhk]}}
+\def\@pteridinev[#1]#2{%
+\iforigpt \typeout{command `pteridinev' %
+ is based on `decaheterov'.}\fi%
+\decaheterov[#1]{1==N;3==N;5==N;8==N}{#2}}
+\def\pteridinevi{\@ifnextchar[{\@pteridinevi[@}{\@pteridinevi[acfhk]}}
+\def\@pteridinevi[#1]#2{%
+\iforigpt \typeout{command `pteridinevi' %
+ is based on `decaheterovi'.}\fi%
+\decaheterovi[#1]{1==N;3==N;5==N;8==N}{#2}}
+\def\pteridinevb{\@ifnextchar[{\@pteridinevb[@}{\@pteridinevb[acfhk]}}
+\def\@pteridinevb[#1]#2{%
+\iforigpt \typeout{command `pteridinevb' %
+ is based on `decaheterovb'.}\fi%
+\decaheterovb[#1]{1==N;3==N;5==N;8==N}{#2}}
+\def\pteridinevt{\@ifnextchar[{\@pteridinevt[@}{\@pteridinevt[acfhk]}}
+\def\@pteridinevt[#1]#2{%
+\iforigpt \typeout{command `pteridinevt' %
+ is based on `decaheterovt'.}\fi%
+\decaheterovt[#1]{1==N;3==N;5==N;8==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{Six-to-five fused heterocycles}
+% \subsection{Vertical type}
+%
+% The standard skeleton of a six-to-five fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% **************************
+% * nonahetero derivatives *
+% * (vertical type) *
+% **************************
+% The following numbering is adopted in this macro.
+%
+% 4
+% * 3a(8)
+% 5 * * _____ 3
+% | | |
+% | | |
+% 6 * * * * 2
+% * 7a *
+% 7 (9) 1
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\nonaheterov| 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}
+% \nonaheterov(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 ring)
+% B : aromatic circle (five-membered ring)
+% {n+} : plus at the n-nitrogen atom (n = 1 to 9)
+% \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.
+%
+% \nonaheterov{1==N}{1==Cl;2==F}
+% \nonaheterov[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\nonaheterov| 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| several times in
+% a restricted fashion.
+% \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: fused and spiro rings}
+%
+% \begin{macro}{\nonaheterov}
+% \begin{macro}{\@nona@heterov}
+% \begin{macro}{\@nona@@heterov}
+% \begin{macro}{\@nonaheterov}
+% \begin{macrocode}
+\def\nonaheterov{\@ifnextchar({\@nona@heterov(@}{\@nona@heterov(@)}}
+\def\@nona@heterov(#1){\@ifnextchar[{\@nona@@heterov(#1)[@}%
+{\@nona@@heterov(#1)[@]}}
+\def\@nona@@heterov(#1)[#2]#3#4{\@ifnextchar[%
+{\@nonaheterov(#1)[#2]{#3}{#4}[@}%
+{\@nonaheterov(#1)[#2]{#3}{#4}[@]}}
+\def\@nonaheterov(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\test@vertix@nonav{#3}%
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % adjustment for (yl) %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{5}{1}{5}{-1}% %substituents on 1 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\let\ddd=\eee\let\eee=\fff\let\fff=\ggg
+\ylposition{#4}{11}{3}{7}{-1}% %substituents on 5 to 7
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\let\aaa=\hhh
+\ylposition{#4}{-3}{0}{2}{0}%%substituent on 4
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{7}% %9 %for 7a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-103}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-7}{1}% %8 for 3a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `nonaheterov' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\put(342,0){\set@skel@bond{#1}{a}{c}}%
+ % bond between 1 and 2 \@aaa -> \skbondc etc
+\put(342,0){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(342,0){\set@skel@longbond{#1}{c}{skbondhoriz}}%
+ % bond between 3 and 3a \@ccc -> \skbondhoriz etc
+\put(342,0){\set@skel@bond{#1}{j}{e}}%
+ % bond between 3a and 7a \@jjj -> \skbonde etc
+\put(342,0){\set@skel@bond{#1}{i}{d}}%
+ % bond between 7a and 1 \@iii -> \skbondd etc
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\set@skel@bond{#1}{d}{a}% bond between 3a and 4 \@ddd -> \skbonda etc
+\set@skel@bond{#1}{h}{c}% bond between 7 and 7a \@hhh -> \skbondc etc
+\set@skel@bond{#1}{g}{d}% bond between 6 and 7 \@ggg -> \skbondd etc
+\set@skel@bond{#1}{f}{e}% bond between 5 and 6 \@fff -> \skbonde etc
+\set@skel@bond{#1}{e}{f}% bond between 4 and 5 \@eee -> \skbondf 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=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 3a and 7a
+ \put(0,0){\bondf}% bond between 4 and 5
+ \put(0,0){\bondd}% bond between 6 and 7
+}%
+\else\if\member l\relax%
+\else\if\member a\relax%
+ \put(342,0){\bondc}% bond between 3 and 4
+\else\if\member b\relax%
+ \put(342,0){\bondb}% bond between 2 and 3
+\else\if\member c\relax%
+ \put(342,0){\bondhoriz}% bond between 3 and 3a
+\else\if\member d\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,0){\bonda}% bond between 4 and 3a
+}
+\else\if\member e\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,0){\bondf}% bond between 4 and 5
+}%
+\else\if\member f\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,0){\bonde}% bond between 5 and 6
+}%
+\else\if\member g\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \put(0,0){\bondd}% bond between 6 and 7
+}%
+\else\if\member h\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,0){\bondc}% bond between 7 and 7a
+}%
+\else\if\member i\relax%
+{\let\eee=\iii%
+ \put(342,0){\bondd}% bond between 1 and 7a
+}%
+\else\if\member j\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 7a and 3a
+}%
+\else\if\member J\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(342,0){\bonde}% bond between 7a and 3a
+}%
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}} %circle
+\else\if\member B%left aromatic circle
+ \put(342,173){\circle{180}} %circle 1993/11/20 S.Fujita
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{7a} \def\aay{3a}%
+ \if\@@tmpa 1\relax%
+ \putratom{304}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{402}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{402}{253}{\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putlatom{-60}{120}{\@@tmpb}% % left type
+ \else\if\@@tmpa 6\relax%
+ \putlatom{-60}{253}{\@@tmpb}% % left type
+ \else\if\@@tmpa 7\relax%
+ \putratom{-38}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@nonav
+\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms and spiro rings %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag\iniatom%
+\@tmpclipfalse
+%position 7 should be treated befor position 1 (using the same \if@clip)
+\put(0,0){\set@hetatom@sixv{#3}{11}{3}{7}{-1}%
+ \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+ \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+ \@eclipfalse \if@clip \global\@ecliptrue \fi%
+}%substituents on 5 to 7
+\put(342,0){\set@hetatom@sixv{#3}{5}{1}{5}{-1}%
+ \if@bclip \global\@bcliptrue\fi
+ \if@cclip \global\@ccliptrue\fi
+ \if@clip \global\@cliptrue\fi
+}% %substituents on 1 to 3
+\put(0,0){\set@hetatom@sixv{#3}{-3}{0}{2}{0}%
+ \@aclipfalse \if@aclip \global\@hcliptrue \fi%
+}%%substituent on 4
+\put(0,0){\set@vrtx@nonafusev{#3}%
+ \@tmpclipfalse
+ \if@iclip \global\@tmpcliptrue \fi
+ \if@jclip \global\@icliptrue \fi
+ \if@tmpclip \global\@jcliptrue \fi
+}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(342,0){\setsixringv{#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(0,0){\setsixringv{#4}{11}{3}{7}{-1}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 4
+\put(0,0){\setsixringv{#4}{-3}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(171,103){\setatombond{#4}{-8}{7}}% %9 for 7a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(171,303){\setatombond{#4}{-7}{1}}% %8 for 3a position
+}%
+\end{picture}\iniatom\iniflag}% %end of \nonaheterov macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\test@vertix@nonav| is used to test the presence of
+% a hetero atom or a spiro substituent on a vertex of the
+% nonaheterov nucleus.
+% \changes{v2.00}{1998/12/05}{New command: \cs{test@vertix@nonav}}
+%
+% \begin{macro}{\test@vertix@nonav}
+% \begin{macrocode}
+\def\test@vertix@nonav#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%2
+ \if\@tmpb s\relax\def\ccc{}\else\def\ccc{@}\fi
+ \or%3%
+ \if\@tmpb a%
+ \def\jjj{@}%3a
+ \else\if\@tmpb s%
+ \def\bbb{}%3
+ \else\if\@tmpb h%
+ \def\bbb{@}%3
+ \else\ifx\@tmpb\empty%
+ \def\bbb{@}%3
+ \fi\fi\fi\fi%
+ \or%4
+ \if\@tmpb s\relax\def\hhh{}\else\def\hhh{@}\fi
+ \or%5
+ \if\@tmpb s\relax\def\ggg{}\else\def\ggg{@}\fi
+ \or%6
+ \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+ \or%7
+ \if\@tmpb a%
+ \xdef\iii{@}%7a
+ \else\if\@tmpb s%
+ \xdef\eee{}%7s
+ \else\if\@tmpb h%
+ \xdef\eee{@}%7h
+ \else\ifx\@tmpb\empty%
+ \xdef\eee{@}%7
+ \fi\fi\fi\fi%
+\or%8 (= 3a)
+ \if\@tmpb s\relax\def\jjj{}\else\def\jjj{@}\fi
+\or%9 (= 7a)
+ \if\@tmpb s\relax\def\iii{}\else\def\iii{@}\fi
+\fi\fi}}% end of \test@vertix@nonav
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@vrtx@nonafusev| is used to set
+% a hetero atom or on a vertex of a bridgehead location.
+%
+% \begin{macro}{\set@vrtx@nonafusev}
+% \begin{macrocode}
+\def\set@vrtx@nonafusev#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{207}{280}{\@memberb}% % left type
+ \else\relax
+ \fi
+ \or\or\or
+ \or%7
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putlatom{207}{65}{\@memberb}% % left type
+ \else\relax
+ \fi
+\or%8 (= 3a)
+ \global\@icliptrue%
+ \putlatom{207}{280}{\@memberb}% % left type
+\or%9 (= 7a)
+ \global\@jcliptrue%
+ \putlatom{207}{65}{\@memberb}% % left type
+\fi\fi}%
+}% end of the macro \set@vrtx@nonafusev
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse vertical type}
+%
+% The standard skeleton of a six-to-five fused heterocycle is selected
+% to have the following locant numbers.
+%
+% \begin{verbatim}
+% **********************************
+% * nonahetero derivatives *
+% * (vertical type, inverse type) *
+% **********************************
+% The following numbering is adopted in this macro.
+%
+% 7(10) 1
+% * 7a *
+% 6 * * * * 2
+% | | |
+% | |_____|
+% 5 * * 3
+% * 3a(8)
+% 4
+% ^
+% |
+% the original point
+% \end{verbatim}
+%
+% The macro |\nonaheterovi| 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}
+% \nonaheterovi(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 ring)
+% B : aromatic circle (five-membered ring)
+% {n+} : plus at the n-nitrogen atom (n = 1 to 9)
+% \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.
+%
+% \nonaheterovi{1==N}{1==Cl;2==F}
+% \nonaheterovi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\nonaheterovi| 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| several times in
+% a restricted fashion.
+% \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/05}{Added: spiro and fused rings}
+%
+% \begin{macro}{\nonaheterovi}
+% \begin{macro}{\@nona@heterovi}
+% \begin{macro}{\@nona@@heterovi}
+% \begin{macro}{\@nonaheterovi}
+% \begin{macrocode}
+\def\nonaheterovi{\@ifnextchar({\@nona@heterovi(@}{\@nona@heterovi(@)}}
+\def\@nona@heterovi(#1){\@ifnextchar[{\@nona@@heterovi(#1)[@}%
+{\@nona@@heterovi(#1)[@]}}
+\def\@nona@@heterovi(#1)[#2]#3#4{\@ifnextchar[%
+{\@nonaheterovi(#1)[#2]{#3}{#4}[@}%
+{\@nonaheterovi(#1)[#2]{#3}{#4}[@]}}
+\def\@nonaheterovi(#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%
+\ylposition{#4}{0}{0}{4}{0}% %substituents on 1 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\let\ddd=\eee\let\eee=\fff\let\fff=\ggg
+\ylposition{#4}{0}{3}{7}{0}%%substituents on 4 to 6
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\let\aaa=\hhh
+\ylposition{#4}{-6}{0}{2}{0}%%substituent on 7
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-7}{7}% %8 for 3a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-103}\fi
+\else
+{%
+\clipdetection%
+\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+\ylatombondposition{#4}{-8}{1}% %9 for 7a position
+}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-171}\def\@@yli{-303}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,880)(-\shiftii,-\shifti)%
+ \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `nonaheterovi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+\begingroup
+\resetbdsw%
+\@bond@@omit{#5}%
+{\let\fff=\jjj \let\eee=\iii%
+\put(342,0){\set@skel@bond{#1}{a}{a}}%
+ % bond between 1 and 2 \@aaa -> \skbonda etc
+\put(342,0){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(342,0){\set@skel@longbond{#1}{c}{skbondhorizi}}%
+ % bond between 3 and 3a \@ccc -> \skbondhoriz etc
+\put(342,0){\set@skel@bond{#1}{j}{e}}%
+ % bond between 3a and 7a \@jjj -> \skbonde etc
+\put(342,0){\set@skel@bond{#1}{i}{f}}%
+ % bond between 7a and 1 \@iii -> \skbondf etc
+%
+% \put(342,0){\skbonda}% bond between 1 and 2
+% \put(342,0){\skbondb}% bond between 2 and 3
+% \put(342,0){\skbonde}% bond between 7a and 3a
+% \put(342,0){\skbondf}% bond between 1 and 7a
+% \put(342,0){\skbondhorizi}% bond between 3 and 3a
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\set@skel@bond{#1}{h}{a}% bond between 7a and 7 \@hhh -> \skbonda etc
+\set@skel@bond{#1}{d}{c}% bond between 3a and 4 \@ddd -> \skbondc etc
+\set@skel@bond{#1}{e}{d}% bond between 4 and 5 \@eee -> \skbondd etc
+\set@skel@bond{#1}{f}{e}% bond between 5 and 6 \@fff -> \skbonde etc
+\set@skel@bond{#1}{g}{f}% bond between 6 and 7 \@ggg -> \skbondf etc
+%
+% \put(0,0){\skbonda}% bond between 7 and 7a
+% \put(0,0){\skbondc}% bond between 4 and 3a
+% \put(0,0){\skbondf}% bond between 6 and 7
+% \put(0,0){\skbondd}% bond between 4 and 5
+% \put(0,0){\skbonde}% bond between 5 and 6
+}%
+\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=\ggg
+ \let\ccc=\iii\let\bbb=\jjj
+ \put(0,0){\bondb}% bond between 3a and 7a
+ \put(0,0){\bondf}% bond between 6 and 7
+ \put(0,0){\bondd}% bond between 4 and 5
+}%
+\else\if\member l\relax%
+\else\if\member a\relax%
+ \put(342,0){\bonda}% bond between 1 and 2
+\else\if\member b\relax%
+ \put(342,0){\bondb}% bond between 2 and 3
+\else\if\member c\relax%
+ \put(342,0){\bondhorizi}% bond between 3 and 3a
+\else\if\member d\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,0){\bondc}% bond between 4 and 3a
+}%
+\else\if\member e\relax%
+{\let\ddd=\eee\let\eee=\fff%
+ \put(0,0){\bondd}% bond between 4 and 5
+}%
+\else\if\member f\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,0){\bonde}% bond between 5 and 6
+}%
+\else\if\member g\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,0){\bondf}% bond between 7 and 6
+}%
+\else\if\member h\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,0){\bonda}% bond between 7 and 7a
+}%
+\else\if\member i\relax%
+{\let\fff=\jjj%
+ \put(342,0){\bondf}% bond between 1 and 7a
+}%
+\else\if\member j\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,0){\bondb}% bond between 7a and 3a
+}%
+\else\if\member J\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(342,0){\bonde}% bond between 7a and 3a
+}%
+\else\if\member A%left aromatic circle
+ \put(0,203){\circle{240}}% %circle
+\else\if\member B%left aromatic circle
+ \put(342,233){\circle{180}} %circle 1993/11/20 S.Fujita
+\else
+ \expandafter\twoCH@@R\member//%
+ \def\aax{7a} \def\aay{3a}%
+ \if\@@tmpa 1\relax%
+ \putratom{304}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{402}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{402}{253}{\@@tmpb}% % right type
+ \else\if\@@tmpa 7\relax%
+ \putratom{-38}{282}{\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putlatom{-60}{120}{\@@tmpb}% % left type
+ \else\if\@@tmpa 5\relax%
+ \putlatom{-60}{253}{\@@tmpb}% % left type
+ \else\if\@@tmpa 4\relax%
+ \putratom{-38}{68}{\@@tmpb}% % right type
+ \else\if\@@tmpa 9\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aax\relax%
+ \putratom{60}{253}{\@@tmpb}% % right type
+ \else\ifx\@@tmpa\aay\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \else\if\@@tmpa 8\relax%
+ \putratom{60}{120}{\@@tmpb}% % right type
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% ***********************
+% * setting fused rings *
+% ***********************
+ \expandafter\twoCH@R\member//%
+ \set@fusion@nonavi
+\fi\fi\fi\fi\fi\fi\fi\fi\fi%
+\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms and spiro rings %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\put(342,0){\set@hetatom@sixv{#3}{0}{0}{4}{0}%
+ \if@aclip \global\@acliptrue\fi
+ \if@bclip \global\@bcliptrue\fi
+ \if@cclip \global\@ccliptrue\fi
+}% %substituents on 1 to 3
+\put(0,0){\set@hetatom@sixv{#3}{0}{3}{7}{0}%
+ \@gclipfalse \if@fclip \global\@gcliptrue \fi%
+ \@fclipfalse \if@eclip \global\@fcliptrue \fi%
+ \@eclipfalse \if@clip \global\@ecliptrue \fi}%substituents on 4 to 6
+\put(0,0){\set@hetatom@sixv{#3}{-6}{0}{2}{0}%
+ \@hclipfalse \if@aclip \global\@hcliptrue \fi}%%substituent on 7
+\put(0,0){\set@vrtx@nonafusevi{#3}%
+ \if@iclip \global\@icliptrue \fi
+ \if@jclip \global\@jcliptrue \fi}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(342,0){\setsixringv{#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(0,0){\setsixringv{#4}{0}{3}{7}{0}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 7
+\put(0,0){\setsixringv{#4}{-6}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(171,103){\setatombond{#4}{-7}{7}}% %8 for 3a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(171,303){\setatombond{#4}{-8}{1}}% %9 for 7a position
+}%
+\end{picture}\iniatom\iniflag}% %end of \nonaheterovi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\test@vertix@nonavi| is used to test the presence of
+% a hetero atom or a spiro substituent on a vertex of the
+% nonaheterovi nucleus.
+% \changes{v2.00}{1998/12/05}{New command: \cs{test@vertix@nonavi}}
+%
+% \begin{macro}{\test@vertix@nonavi}
+% \begin{macrocode}
+\def\test@vertix@nonavi#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\aaa{}\else\def\aaa{@}\fi
+ \or%2
+ \if\@tmpb s\relax\def\bbb{}\else\def\bbb{@}\fi
+ \or%3%
+ \if\@tmpb a%
+ \def\iii{@}%3a
+ \else\if\@tmpb s%
+ \def\ccc{}%3
+ \else\if\@tmpb h%
+ \def\ccc{@}%3
+ \else\ifx\@tmpb\empty%
+ \def\ccc{@}%3
+ \fi\fi\fi\fi%
+ \or%4
+ \if\@tmpb s\relax\def\eee{}\else\def\eee{@}\fi
+ \or%5
+ \if\@tmpb s\relax\def\fff{}\else\def\fff{@}\fi
+ \or%6
+ \if\@tmpb s\relax\def\ggg{}\else\def\ggg{@}\fi
+ \or%7
+ \if\@tmpb a%
+ \xdef\jjj{@}%7a
+ \else\if\@tmpb s%
+ \xdef\hhh{}%7s
+ \else\if\@tmpb h%
+ \xdef\hhh{@}%7h
+ \else\ifx\@tmpb\empty%
+ \xdef\hhh{@}%7
+ \fi\fi\fi\fi%
+\or%8 (= 3a)
+ \if\@tmpb s\relax\def\iii{}\else\def\iii{@}\fi
+\or%9 (= 7a)
+ \if\@tmpb s\relax\def\jjj{}\else\def\jjj{@}\fi
+\fi\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@vrtx@nonafusevi| 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@nonafusevi}}
+%
+% \begin{macro}{\set@vrtx@nonafusevi}
+% \begin{macrocode}
+\def\set@vrtx@nonafusevi#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{207}{65}{\@memberb}% % left type
+ \else\relax
+ \fi
+ \or\or\or
+ \or%7
+ \if\@tmpb a%
+ \global\@jcliptrue%
+ \putlatom{207}{280}{\@memberb}% % left type
+ \else\relax
+ \fi
+\or%8 (= 3a)
+ \global\@icliptrue%
+ \putlatom{207}{65}{\@memberb}% % left type
+\or%9 (= 7a)
+ \global\@jcliptrue%
+ \putlatom{207}{280}{\@memberb}% % left type
+\fi\fi}%
+}% end of the macro \set@vrtx@nonafusevi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Short-cut commands for fused heterocycles}
+%
+% The macros |\nonaheterov| and |\nonaheterovi| 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 *
+% * (vertical type) *
+% **********************************************************
+%
+% N-heterocycles:
+%
+% \indolev[BONDLIST]{SUBSLIST}
+% \indolevi[BONDLIST]{SUBSLIST}
+%
+% \isoindolev[BONDLIST]{SUBSLIST}
+% \isoindolevi[BONDLIST]{SUBSLIST}
+%
+% \indolizinev[BONDLIST]{SUBSLIST}
+% \indolizinevi[BONDLIST]{SUBSLIST}
+% (different from the IUPAC numbering)
+%
+% \purinev[BONDLIST]{SUBSLIST}
+% \purinevi[BONDLIST]{SUBSLIST}
+% (different from the IUPAC numbering)
+%
+% O-heterocycles:
+%
+% \benzofuranev[BONDLIST]{SUBSLIST}
+% \benzofuranevi[BONDLIST]{SUBSLIST}
+%
+% \isobenzofuranevi[BONDLIST]{SUBSLIST}
+%
+% \benzoxazolev[BONDLIST]{SUBSLIST}
+% \benzoxazolevi[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' and `B' typeset aromatic circles.
+% 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 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.
+%
+% \indolev{1==N}{1==Cl;2==F}
+% \indolev[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\purinev}
+% \begin{macro}{\purinevi}
+% \begin{macrocode}
+\def\purinev{\@ifnextchar[{\@purinev[@}{\@purinev[ra]}}
+\def\@purinev[#1]#2{%
+\iforigpt \typeout{command `purinev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{1==N;3==N;5==N;7==N}{#2}}
+\def\purinevi{\@ifnextchar[{\@purinevi[@}{\@purinevi[ra]}}
+\def\@purinevi[#1]#2{%
+\iforigpt \typeout{command `purinevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#1]{1==N;3==N;5==N;7==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\indolev}
+% \begin{macro}{\indolevi}
+% \begin{macrocode}
+\def\indolev{\@ifnextchar[{\@indolev[@}{\@indolev[rb]}}
+\def\@indolev[#1]#2{%
+\iforigpt \typeout{command `indolev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{1==N}{#2}}
+\def\indolevi{\@ifnextchar[{\@indolevi[@}{\@indolevi[rb]}}
+\def\@indolevi[#1]#2{%
+\iforigpt \typeout{command `indolevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#1]{1==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\indolizinev}
+% \begin{macro}{\indolizinevi}
+% \begin{macrocode}
+\def\indolizinev{%
+ \@ifnextchar[{\@indolizinev[@}{\@indolizinev[aceg]}}
+\def\@indolizinev[#1]#2{%
+\iforigpt \typeout{command `indolizinev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{7a==N}{#2}}
+\def\indolizinevi{%
+ \@ifnextchar[{\@indolizinevi[@}{\@indolizinevi[aceg]}}
+\def\@indolizinevi[#1]#2{%
+\iforigpt \typeout{command `indolizinevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#1]{7a==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\isoindolev}
+% \begin{macro}{\isoindolevi}
+% \begin{macrocode}
+\def\isoindolev{\@ifnextchar[{\@isoindolev[@}{\@isoindolev[cegi]}}
+\def\@isoindolev[#1]#2{%
+\iforigpt \typeout{command `isoindolev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{2==N}{#2}}
+\def\isoindolevi{\@ifnextchar[{\@isoindolevi[@}{\@isoindolevi[cegi]}}
+\def\@isoindolevi[#1]#2{%
+\iforigpt \typeout{command `isoindolevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#1]{2==N}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\benzofuranev}
+% \begin{macro}{\benzofuranevi}
+% \begin{macrocode}
+\def\benzofuranev{%
+ \@ifnextchar[{\@benzofuranev[@}{\@benzofuranev[rb]}}
+\def\@benzofuranev[#1]#2{%
+\iforigpt \typeout{command `benzofuranev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{1==O}{#2}}
+\def\benzofuranevi{%
+ \@ifnextchar[{\@benzofuranevi[@}{\@benzofuranevi[rb]}}
+\def\@benzofuranevi[#1]#2{%
+\iforigpt \typeout{command `benzofuranevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#1]{1==O}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\isobenzofuranev}
+% \begin{macro}{\isobenzofuranevi}
+% \begin{macrocode}
+\def\isobenzofuranev{\@ifnextchar[{\@isobenzofuranev[@}%
+ {\@isobenzofuranev[cegi]}}
+\def\@isobenzofuranev[#1]#2{%
+\iforigpt \typeout{command `isobenzofuranev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{2==O}{#2}}
+\def\isobenzofuranevi{\@ifnextchar[{\@isobenzofuranevi[@}%
+ {\@isobenzofuranevi[cegi]}}
+\def\@isobenzofuranevi[#1]#2{%
+\iforigpt \typeout{command `isobenzofuranevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#1]{2==O}{#2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\benzoxazolev}
+% \begin{macro}{\benzoxazolevi}
+% \begin{macrocode}
+\def\benzoxazolev{%
+ \@ifnextchar[{\@benzoxazolev[@}{\@benzoxazolev[rb]}}
+\def\@benzoxazolev[#1]#2{%
+\iforigpt \typeout{command `benzoxazolev' %
+ is based on `nonaheterov'.}\fi%
+\nonaheterov[#1]{1==O;3==N}{#2}}
+\def\benzoxazolevi{%
+ \@ifnextchar[{\@benzoxazolevi[@}{\@benzoxazolevi[rb]}}
+\def\@benzoxazolevi[#1]#2{%
+\iforigpt \typeout{command `benzoxazolevi' %
+ is based on `nonaheterovi'.}\fi%
+\nonaheterovi[#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 |\sixunitv| 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 *
+% * (vertical type) *
+% **********************
+%
+% 1
+% *
+% 6 * * 2
+% | |
+% | |
+% 5 * * 3
+% *
+% 4 <===== the original point
+% \end{verbatim}
+%
+% The macro |\sixunitv| has three arguments |ATOMLIST|, |SUBSLIST|
+% and |OMIT|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \sixunitv[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 |\sixunitv| 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|.
+% \end{enumerate}
+%
+% \changes{v1.01a}{1998/06/08}{\cs{sixunitv} bug fix:
+% \cs{bbb} to \cs{fff} and \cs{ccc} to \cs{eee}}
+%
+% \begin{macro}{\sixunitv}
+% \begin{macro}{\@sixunitv}
+% \begin{macrocode}
+\def\sixunitv{\@ifnextchar[{\@sixunitv[@}{\@sixunitv[@]}}
+\def\@sixunitv[#1]#2#3#4{\sixheterov[#1]{#2}{#3}[#4]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{verbatim}
+% (Old difinition)
+% % \begin{macro}{\sixunitv}
+% % \begin{macro}{\@sixunitv}
+% % \begin{macrocode}
+% \def\sixunitv{\@ifnextchar[{\@sixunitv}{\@sixunitv[r]}}
+% \def\@sixunitv[#1]#2#3#4{%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % treatment of atom list %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% \iniatom\iniflag%initialize%
+% \@forsemicol\member:=#2\do{%
+% \expandafter\@m@mb@r\member;\relax%
+% \expandafter\twoch@r\@membera{}%
+% \ifcase\@tmpa%
+% \or \xdef\aaa{\@memberb}%
+% \or \xdef\bbb{\@memberb}%
+% \or \xdef\ccc{\@memberb}%
+% \or \xdef\ddd{\@memberb}%
+% \or \xdef\eee{\@memberb}%
+% \or \xdef\fff{\@memberb}%
+% \fi}%
+% \begin{picture}(800,880)(-\shiftii,-\shifti)%
+% \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `sixunitv' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%
+% % % outer skeleton %
+% % %%%%%%%%%%%%%%%%%%
+% % changed OMIT into a list 1993/11/21 by Shinsaku Fujita
+% {\resetbdsw%
+% \@tfor\memBer:=#4\do{%
+% \if\memBer a\relax\gdef\@aaa{}\fi%
+% \if\memBer b\relax\gdef\@bbb{}\fi%
+% \if\memBer c\relax\gdef\@ccc{}\fi%
+% \if\memBer d\relax\gdef\@ddd{}\fi%
+% \if\memBer e\relax\gdef\@eee{}\fi%
+% \if\memBer f\relax\gdef\@fff{}\fi%
+% }%
+% \if\@aaa a\relax\skbonda\fi% bond between 1 and 2
+% \if\@bbb b\relax\skbondb\fi% bond between 2 and 3
+% \if\@ccc c\relax\skbondc\fi% bond between 3 and 4
+% \if\@ddd d\relax\skbondd\fi% bond between 4 and 5
+% \if\@eee e\relax\skbonde\fi% bond between 5 and 6
+% \if\@fff f\relax\skbondf\fi% bond between 6 and 1
+% }%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%
+% % % inner double bond %
+% % %%%%%%%%%%%%%%%%%%%%%
+% \@tfor\member:=#1\do{%
+% \if\member r\relax%
+% \else\if\member l\relax%
+% \else\if\member a\relax%
+% \ifx#4a\relax\else%
+% \bonda%
+% \fi%
+% \else\if\member b\relax%
+% \ifx#4b\relax\else%
+% \bondb%
+% \fi%
+% \else\if\member c\relax%
+% \ifx#4c\relax\else%
+% \bondc%
+% \fi%
+% \else\if\member d\relax%
+% \ifx#4d\relax\else%
+% \bondd%
+% \fi%
+% \else\if\member e\relax%
+% \ifx#4e\relax\else%
+% \bonde%
+% \fi%
+% \else\if\member f\relax%
+% \ifx#4f\relax\else%
+% \bondf%
+% \fi%
+% \else\if\member A%left aromatic circle
+% \put(0,203){\circle{240}}% %circle
+% \else \expandafter\twoch@@r\member{}{}%
+% \if\@@tmpa 1\relax%
+% \putratom{-38}{282}{\@@tmpb}% % right type
+% \else\if\@@tmpa 2\relax%
+% \putratom{60}{253}{\@@tmpb}% % right type
+% \else\if\@@tmpa 3\relax%
+% \putratom{60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 4\relax%
+% \putratom{-38}{68}{\@@tmpb}% % right type
+% \fi\fi\fi\fi%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+% }%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting hetero atoms %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \ifx\ddd\empty\else%
+% \@cliptrue%
+% \putratom{-31}{-10}{\ddd}% % right type
+% \fi%
+% \ifx\aaa\empty\else%
+% \@acliptrue%
+% \putratom{-31}{356}{\aaa}% % right type
+% \fi%
+% \ifx\bbb\empty\else%
+% \@bcliptrue%
+% \putratom{135}{280}{\bbb}% % right type
+% \fi%
+% \ifx\ccc\empty\else%
+% \@ccliptrue%
+% \putratom{135}{65}{\ccc}% % right type
+% \fi%
+% \ifx\fff\empty\else%
+% \@fcliptrue%
+% % \putlatom{-135}{280}{\bbb}% % left type
+% \putlatom{-135}{280}{\fff}% % left type
+% \fi%
+% \ifx\eee\empty\else%
+% \@ecliptrue%
+% % \putlatom{-135}{65}{\ccc}% % left type
+% \putlatom{-135}{65}{\eee}% % left type
+% \fi%
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \setsixringv{#3}{0}{0}{7}{0}%
+% \end{picture}\iniatom\iniflag}% %end of \sixunitv macro
+% % \end{macrocode}
+% % \end{macro}
+% % \end{macro}
+% % \end{verbatim}
+%
+% \subsection{Five-membered ring unit}
+% \subsubsection{Vertical type}
+%
+% The old function (v1.01) of |\fiveunitv| as a fusing ring unit
+% is succeeded by |\fivefusev|.
+% The command |\fiveunitv| has been changed into a subsidiary
+% command of |\fiveheterov| (v2.00).
+%
+% The macro |\fiveunitv| 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 *
+% * (vertical type) *
+% **********************
+%
+% 4 _______ 3
+% | |
+% | |
+% 5 * * 2
+% *
+% 1 <===== the original point
+% \end{verbatim}
+%
+% The macro |\fiveunitv| has three arguments |ATOMLIST|, |SUBSLIST|
+% and |OMIT|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \fiveunitv[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
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% \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.
+%
+% \fiveunitv{1==N}{1==H;2==F}{a}
+% \end{verbatim}
+%
+% The definition of |\fiveunitv| 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}
+%
+% \begin{macro}{\fiveunitv}
+% \begin{macro}{\@fiveunitv}
+% \begin{macrocode}
+\def\fiveunitv{\@ifnextchar[{\@fiveunitv[@}{\@fiveunitv[r]}}
+\def\@fiveunitv[#1]#2#3#4{\fiveheterov[#1]{#2}{#3}[#4]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\fiveunitv}
+% % \begin{macro}{\@fiveunitv}
+% % \begin{macrocode}
+% \def\fiveunitv{\@ifnextchar[{\@fiveunitv}{\@fiveunitv[r]}}
+% \def\@fiveunitv[#1]#2#3#4{%
+% \iniatom\iniflag%initialize
+% %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % treatment of atom list %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% \@forsemicol\member:=#2\do{%
+% \expandafter\@m@mb@r\member;\relax%
+% \expandafter\twoch@r\@membera{}%
+% \ifcase\@tmpa%
+% \or \xdef\ddd{\@memberb}%
+% \or \xdef\ccc{\@memberb}%
+% \or \xdef\bbb{\@memberb}%
+% \or \xdef\fff{\@memberb}%
+% \or \xdef\eee{\@memberb}%
+% \fi}%
+% \begin{picture}(800,880)(-\shiftii,-\shifti)%
+% \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `fiveunitv' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%
+% % %% outer skeleton %
+% % %%%%%%%%%%%%%%%%%%%
+% % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
+% {\resetbdsw%
+% \@tfor\memBer:=#4\do{%
+% \if\memBer a\relax\gdef\@aaa{}\fi%
+% \if\memBer b\relax\gdef\@bbb{}\fi%
+% \if\memBer c\relax\gdef\@ccc{}\fi%
+% \if\memBer d\relax\gdef\@ddd{}\fi%
+% \if\memBer e\relax\gdef\@eee{}\fi%
+% %\if\memBer f\relax\gdef\@fff{}\fi%
+% }%
+% \if\@aaa a\relax\skbondc\fi% bond between 1 and 2
+% \if\@bbb b\relax\skbondb\fi% bond between 2 and 3
+% \if\@ccc c\relax\skbondhoriz\fi% bond between 3 and 4
+% \if\@ddd d\relax\skbonde\fi% bond between 4 and 5
+% \if\@eee e\relax\skbondd\fi% bond between 5 and 6
+% %\if\@fff f\relax\skbondf\fi% bond between 6 and 1
+% }%
+% % old
+% %\ifx#4a\relax\else%
+% % \skbondc%bond between 1 and 2
+% %\fi%
+% %\ifx#4e\relax\else%
+% % \skbondd%bond between 1 and 5
+% %\fi%
+% %\ifx#4b\relax\else%
+% % \skbondb%bond between 2 to 3
+% %\fi%
+% %\ifx#4d\relax\else%
+% % \skbonde%bond between 5 and 4
+% %\fi%
+% %\ifx#4c\relax\else%
+% % \skbondhoriz%bond between 4 and 3
+% %\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%
+% % %% inner double bond %
+% % %%%%%%%%%%%%%%%%%%%%%%
+% \@tfor\member:=#1\do{%
+% \if\member r%
+% \else\if\member a\relax%
+% \ifx#4a\relax\else%
+% \bondc%
+% \fi%
+% \else\if\member b\relax%
+% \ifx#4b\relax\else%
+% \bondb%
+% \fi%
+% \else\if\member c\relax%
+% \ifx#4c\relax\else%
+% \bondhoriz%
+% \fi%
+% \else\if\member d\relax%
+% \ifx#4d\relax\else%
+% \bonde%
+% \fi%
+% \else\if\member e\relax%
+% \ifx#4e\relax\else%
+% \bondd%
+% \fi%
+% \else \expandafter\twoch@@r\member{}{}% %plus or minus charges
+% \if\@@tmpa 1\relax%
+% \putratom{-38}{68}{\@@tmpb}% % right type
+% \else\if\@@tmpa 2\relax%
+% \putratom{60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 3\relax%
+% \putratom{60}{233}{\@@tmpb}% % right type
+% \else\if\@@tmpa 4\relax%
+% \putratom{-60}{233}{\@@tmpb}% % right type
+% \else\if\@@tmpa 5\relax%
+% \putratom{-60}{120}{\@@tmpb}% % right type
+% \fi\fi\fi\fi\fi%
+% \fi\fi\fi\fi\fi\fi}%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% % % setting heteroatoms %
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% \ifx\ddd\empty\else%
+% \@cliptrue%
+% \putratom{-31}{-10}{\ddd}% % right type at 1
+% \fi%
+% \ifx\bbb\empty\else%
+% \@bcliptrue%
+% \putratom{135}{280}{\bbb}% % right type at 3
+% \fi%
+% \ifx\fff\empty\else%
+% \@fcliptrue%
+% \putlatom{-135}{280}{\fff}% % left type at 4
+% \fi%
+% \ifx\ccc\empty\else%
+% \@ccliptrue%
+% \putratom{135}{65}{\ccc}% % right type at 2
+% \fi%
+% \ifx\eee\empty\else%
+% \@ecliptrue%
+% \putlatom{-135}{65}{\eee}% % left type at 5
+% \fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \setsixringv{#3}{5}{1}{5}{-1}% % for 1 to 3
+% \setsixringv{#3}{10}{4}{7}{-1}% % for 4 to 5
+% \end{picture}\iniatom\iniflag}%end of \fiveunitv macro
+% % \end{macrocode}
+% % \end{macro}
+% % \end{macro}
+% \end{verbatim}
+%
+% \subsubsection{Inverse vertical type}
+%
+% The old function (v1.01) of |\fiveunitvi| as a fusing ring unit
+% is succeeded by |\fivefusevi|.
+% The command |\fiveunitvi| has been changed into a subsidiary
+% command of |\fiveheterovi| (v2.00).
+%
+% The macro |\fiveunitvi| 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 *
+% * (vertical type, inverse type) *
+% ************************************
+%
+% 1
+% *
+% 6 * * 2
+% | |
+% |_____|
+% 4 3
+% *
+% (0,0) <===== the original point
+% \end{verbatim}
+%
+% The macro |\fiveunitvi| has three arguments |ATOMLIST|, |SUBSLIST|
+% and |OMIT|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \fiveunitvi[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
+% {n+} : plus at the n-nitrogen atom (n = 1 to 5)
+% \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.
+%
+% \fiveunitvi{1==N}{1==H;2==F}{a}
+% \end{verbatim}
+%
+% The definition of |\fiveunitvi| 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}
+%
+% \begin{macro}{\fiveunitvi}
+% \begin{macro}{\@fiveunitvi}
+% \begin{macrocode}
+\def\fiveunitvi{\@ifnextchar[{\@fiveunitvi[@}{\@fiveunitvi[r]}}
+\def\@fiveunitvi[#1]#2#3#4{\fiveheterovi[#1]{#2}{#3}[#4]}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\fiveunitvi}
+% % \begin{macro}{\@fiveunitvi}
+% % \begin{macrocode}
+% \def\fiveunitvi{\@ifnextchar[{\@fiveunitvi}{\@fiveunitvi[r]}}
+% \def\@fiveunitvi[#1]#2#3#4{%
+% \iniatom\iniflag%initialize
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % treatment of atom list %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
+% \@forsemicol\member:=#2\do{%
+% \expandafter\@m@mb@r\member;\relax%
+% \expandafter\twoch@r\@membera{}%
+% \ifcase\@tmpa%
+% \or \xdef\aaa{\@memberb}%
+% \or \xdef\bbb{\@memberb}%
+% \or \xdef\ccc{\@memberb}%
+% \or \xdef\eee{\@memberb}%
+% \or \xdef\fff{\@memberb}%
+% \fi}%
+% \begin{picture}(800,880)(-\shiftii,-\shifti)%
+% \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `fiveunitvi' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%
+% % % outer skeleton %
+% % %%%%%%%%%%%%%%%%%%
+% % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
+% {\resetbdsw%
+% \@tfor\memBer:=#4\do{%
+% \if\memBer a\relax\gdef\@aaa{}\fi%
+% \if\memBer b\relax\gdef\@bbb{}\fi%
+% \if\memBer c\relax\gdef\@ccc{}\fi%
+% \if\memBer d\relax\gdef\@ddd{}\fi%
+% \if\memBer e\relax\gdef\@eee{}\fi%
+% %\if\memBer f\relax\gdef\@fff{}\fi%
+% }%
+% \if\@aaa a\relax\skbonda\fi% bond between 1 and 2
+% \if\@bbb b\relax\skbondb\fi% bond between 2 and 3
+% \if\@ccc c\relax\skbondhorizi\fi% bond between 3 and 4
+% \if\@ddd d\relax\skbonde\fi% bond between 4 and 5
+% \if\@eee e\relax\skbondf\fi% bond between 5 and 6
+% %\if\@fff f\relax\skbondf\fi% bond between 6 and 1
+% }%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%
+% % % inner double bond %
+% % %%%%%%%%%%%%%%%%%%%%%
+% \@tfor\member:=#1\do{%
+% \if\member r%
+% \else\if\member a\relax%
+% \ifx#4a\relax\else%
+% \bonda%
+% \fi%
+% \else\if\member b\relax%
+% \ifx#4b\relax\else%
+% \bondb%
+% \fi%
+% \else\if\member c\relax%
+% \ifx#4c\relax\else%
+% \bondhorizi%
+% \fi%
+% \else\if\member d\relax%
+% \ifx#4d\relax\else%
+% \bonde%
+% \fi%
+% \else\if\member e\relax%
+% \ifx#4e\relax\else%
+% \bondf%
+% \fi%
+% \else \expandafter\twoch@@r\member{}{}% %plus or minus charges
+% \if\@@tmpa 1\relax%
+% \putratom{-38}{282}{\@@tmpb}% % right type
+% \else\if\@@tmpa 2\relax%
+% \putratom{60}{233}{\@@tmpb}% % right type
+% \else\if\@@tmpa 3\relax%
+% \putratom{60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 4\relax%
+% \putratom{-60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 5\relax%
+% \putratom{-60}{233}{\@@tmpb}% % right type
+% \fi\fi\fi\fi\fi%
+% \fi\fi\fi\fi\fi\fi}%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% % % setting heteroatoms %
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% \ifx\aaa\empty\else%
+% \@acliptrue%
+% \putratom{-31}{356}{\aaa}% % right type at 1
+% \fi%
+% \ifx\bbb\empty\else%
+% \@bcliptrue%
+% \putratom{135}{280}{\bbb}% % right type at 3
+% \fi%
+% \ifx\fff\empty\else%
+% \@fcliptrue%
+% \putlatom{-135}{280}{\fff}% % left type at 4
+% \fi%
+% \ifx\ccc\empty\else%
+% \@ccliptrue%
+% \putratom{135}{65}{\ccc}% % right type at 2
+% \fi%
+% \ifx\eee\empty\else%
+% \@ecliptrue%
+% \putlatom{-135}{65}{\eee}% % left type at 5
+% \fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \setsixringv{#3}{0}{0}{4}{0}% % for 1 to 3
+% \setsixringv{#3}{1}{4}{7}{0}% % for 4 to 5
+% \end{picture}\iniatom\iniflag}% %end of \fiveunitvi macro
+% % \end{macrocode}
+% % \end{macro}
+% % \end{macro}
+% \end{verbatim}
+%
+% \section{Four-membered heterocycles}
+% \subsection{Horizontal bonds}
+%
+% \begin{macro}{\bondshoriz}
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%
+% % horizontal bond %
+% %%%%%%%%%%%%%%%%%%%
+% horizontal inner bond for four-membered rings
+\def\bondshoriz{%
+ \begin{picture}(200,300)(0,0)
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \put(-138,270){\line(1,0){134}}%double bond 4-3
+ \else%
+ \put(-138,270){\line(1,0){115}}%double bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(-120,270){\line(1,0){115}}%double bond 4-3
+ \else%
+ \put(-120,270){\line(1,0){96}}%double bond 4-3
+ \fi%
+ \fi\end{picture}}%
+% horizontal inner bond for four-membered rings (inverse type)
+\def\bondshorizi{%
+ \begin{picture}(200,300)(0,0)
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \put(-138,136){\line(1,0){134}}%double bond 4-3
+ \else%%
+ \put(-138,136){\line(1,0){115}}%double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(-120,136){\line(1,0){115}}%double bond 4-3
+ \else%
+ \put(-120,136){\line(1,0){96}}%double bond 4-3
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondshoriz}
+% \begin{macrocode}
+%horizontal bond for four-membered rings
+\def\skbondshoriz{%
+ \begin{picture}(200,300)(0,0)
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \put(-171,303){\line(1,0){200}}%bond 4-3
+ \else%
+ \put(-171,303){\line(1,0){158}}%bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(29,303){\line(-1,0){158}}%bond 4-3
+ \else%
+ \put(-129,303){\line(1,0){116}}%bond 4-3
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondshorizi}
+% \begin{macrocode}
+%horizontal bond for four-membered rings (inverse type)
+\def\skbondshorizi{%
+ \begin{picture}(200,300)(0,0)
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \put(-171,103){\line(1,0){200}}%bond 4-3
+ \else%
+ \put(-171,103){\line(1,0){158}}%bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(29,103){\line(-1,0){158}}%bond 4-3
+ \else%
+ \put(-129,103){\line(1,0){116}}%bond 4-3
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondshoriz}
+% \begin{macrocode}
+%horizontal bond for four-membered rings
+\def\dotskbondshoriz{%
+ \begin{picture}(200,300)(0,0)
+ \ifx\fff\empty%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(-171,303){\line(1,0){200}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,303)(29,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-171,303){\line(1,0){158}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,303)(-29,303)}}%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(29,303){\line(-1,0){158}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(29,303)(-129,303)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-129,303){\line(1,0){116}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-129,303)(-13,303)}}%
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondshorizi}
+% \begin{macrocode}
+%horizontal bond for four-membered rings (inverse type)
+\def\dotskbondshorizi{%
+ \begin{picture}(200,300)(0,0)
+ \ifx\eee\empty%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(-171,103){\line(1,0){200}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,103)(29,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-171,103){\line(1,0){158}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-171,103)(-29,103)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(29,103){\line(-1,0){158}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(29,103)(-129,103)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-129,103){\line(1,0){116}}%bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(-129,103)(-13,103)}}%
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Drawing four-membered heterocycles}
+%
+% The macro |\fourhetero| typesets a four-membered ring. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% **************************
+% * fourhetero derivatives *
+% * (vertical type) *
+% **************************
+% The following numbering is adopted in this macro.
+%
+% c
+% 4 _____ 3
+% d | | b
+% | |
+% 1 ----- 2<===== the original point
+% a
+% \end{verbatim}
+%
+% The macro |\fourhetero| 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}
+% \fourhetero(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 `d' 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 `$n+$' ($n=1$ to $4$) 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
+% e : 4,1-double bond
+%
+% {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 4 atoms)
+%
+% for n = 1 to 4
+%
+% 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 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+%
+% nSd : alpha single bond at n-atom (dotted line)
+% with an alternative direction to nSA
+% nSu : beta single bond at n-atom (boldface)
+% with an alternative direction to nSB
+% nFA : alpha single bond at n-atom (dotted line)
+% for ring fusion
+% nFB : beta single bond at n-atom (boldface)
+% for ring fusion
+% nGA : alpha single bond at n-atom (dotted line)
+% for the other ring fusion
+% nGB : beta single bond at n-atom (boldface)
+% for the other ring fusion
+% \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 d: see BONDLIST)
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \fourhetero{1==N}{1==H;2==F}
+% \fourhetero[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \fourhetero[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\fourhetero| 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}
+%
+% \begin{macro}{\fourhetero}
+% \begin{macro}{\@four@hetero}
+% \begin{macro}{\@four@@hetero}
+% \begin{macro}{\@fourhetero}
+% \begin{macrocode}
+\def\fourhetero{\@ifnextchar({\@four@hetero(@}{\@four@hetero(@)}}
+\def\@four@hetero(#1){\@ifnextchar[{\@four@@hetero(#1)[@}%
+{\@four@@hetero(#1)[@]}}
+\def\@four@@hetero(#1)[#2]#3#4{\@ifnextchar[%
+{\@fourhetero(#1)[#2]{#3}{#4}[@}%
+{\@fourhetero(#1)[#2]{#3}{#4}[@]}}
+\def\@fourhetero(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{e}{c}{b}{f}{@}{@}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{5}{1}{4}{-1}% for 2 to 3
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{142}\def\@@yli{0}\fi
+\else
+\ylposition{#4}{4}{4}{6}{0}% for 1
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+\ylposition{#4}{2}{5}{7}{0}% for 4
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+%
+%\begin{picture}(800,880)(-\shiftii,-\shifti)%
+% \iforigpt\put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `fourhetero' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+% Correction of the zero point: S. Fujita 1993/11/19
+% x axis: 400 + 171 = 571
+% y axis: 240 - 103 = 137
+%
+\begin{picture}(800,880)(-571,-137)%
+ \iforigpt\put(-571,-137){\circle*{50}}%
+ \put(-171,103){\circle{50}}%
+ \typeout{command `fourhetero' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shifti)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\put(0,0){\set@skel@longbond{#1}{a}{skbondshorizi}}%
+ % bond between 1 and 2 \@aaa -> \skbondshorizi etc
+\put(-142,0){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(0,0){\set@skel@longbond{#1}{c}{skbondshoriz}}%
+ % bond between 3 and 4 \@ccc -> \skbondshoriz etc
+\put(0,0){\set@skel@bond{#1}{d}{e}}%
+ % bond between 4 and 1 \@ddd -> \skbonde etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r%
+\else\if\member a\relax \put(0,0){\bondshorizi}%
+\else\if\member b\relax \put(-142,0){\bondb}%
+\else\if\member c\relax \put(0,0){\bondshoriz}%
+\else\if\member d\relax \put(0,0){\bonde}%
+\else
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@fourv
+\fi\fi\fi\fi\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%
+% % setting heteroatoms %
+% %%%%%%%%%%%%%%%%%%%%%%%
+\put(-142,0){\set@hetatom@sixv{#3}{5}{1}{4}{-1}}% for 2 to 3
+\put(0,0){\set@hetatom@sixv{#3}{4}{4}{6}{0}}% for 1
+\put(0,0){\set@hetatom@sixv{#3}{2}{5}{7}{0}}% for 4
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-142,0){\setsixringv{#4}{5}{1}{4}{-1}}% for 2 to 3
+\put(0,0){\setsixringv{#4}{4}{4}{6}{0}}% for 1
+\put(0,0){\setsixringv{#4}{2}{5}{7}{0}}% for 4
+\end{picture}\iniatom\iniflag}% %end of \fourhetero macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% The macro |\set@fusionadd@fourv| is an inner command contained
+% in the definition of |\fourhetero| 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@fourv|.
+%
+% \begin{macro}{\set@fusionadd@fourv}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusionadd@fourv}} +% \begin{macrocode}
+\def\set@fusionadd@fourv{%
+ \if\@@tmpa 1\relax%
+ \putlatom{-200}{120}{\scriptsize \@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{60}{120}{\scriptsize \@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{60}{233}{\scriptsize \@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putlatom{-200}{233}{\scriptsize \@@tmpb}% % right type
+ \else
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+ \set@fusion@fourv
+ \fi\fi\fi\fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@fourv| 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@fourv}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@fourv}} +% \begin{macrocode}
+\def\set@fusion@fourv{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa d\relax%
+ \putlratom{-171}{303}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
+ \else\if\@@tmpa D\relax%
+ \putlratom{-171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{-200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
+ \else\if\@@tmpa a\relax%
+ \putlratom{-173}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{27}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{27}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{-200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{27}{303}{\@@tmpb}% % bond fused
+ \FuseWarning{0}{200}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{27}{303}{\@@tmpb}% % bond fused
+ \FuseWarning{200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{-171}{303}{\@@tmpb}% % bond fused
+ \FuseWarning{-200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+\fi\fi\fi\fi\fi\fi\fi\fi%
+}% end of the macro \set@fusion@fourv
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Three-membered heterocycles}
+% \subsection{Vertical type}
+% \subsubsection{Sloped bonds}
+%
+% \begin{macro}{\bondtria}
+% \begin{macrocode}
+% **********************
+% * bonds for triangle *
+% **********************
+% fff 3--------2bbb
+% ` /
+% ddd `1/ <===== the original point
+% bond between 1 and 2
+ \def\bondtria{%
+ \ifx\ddd\empty%
+ \ifx\bbb\empty%
+ \put(-6,42){\line(3,5){72}}% %double bond 1-2
+ \else%
+ \put(-6,42){\line(3,5){60}}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(6,62){\line(3,5){60}}% %double bond 1-2
+ \else%
+ \put(10,32){\line(3,5){60}}% %double bond 1-2
+ \fi%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bondtrib}
+% \begin{macrocode}
+% bond between 1 and 3
+ \def\bondtrib{%
+ \ifx\ddd\empty%
+ \ifx\fff\empty%
+ \put(6,42){\line(-3,5){72}}% %double bond 1-3
+ \else%
+ \put(6,42){\line(-3,5){60}}% %double bond 1-3
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(-6,62){\line(-3,5){60}}% %double bond 1-2
+ \else%
+ \put(6,42){\line(-3,5){60}}% %double bond 1-2
+ \fi%
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondtria}
+% \begin{macrocode}
+%bond between 1 and 2
+\def\skbondtria{%
+ \begin{picture}(200,200)(0,0)
+ \ifx\ddd\empty%
+ \ifx\bbb\empty%
+ \put(0,0){\line(3,5){103}}% %bond 1-2
+ \else%
+ \put(0,0){\line(3,5){80}}% %bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(103,171){\line(-3,-5){80}}% %bond 1-2
+ \else%
+ \put(35,21){\line(3,5){60}}% %bond 1-2
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\skbondtrib}
+% \begin{macrocode}
+%bond between 1 and 3
+\def\skbondtrib{%
+ \begin{picture}(200,200)(0,0)
+ \ifx\ddd\empty%
+ \ifx\fff\empty%
+ \put(0,0){\line(-3,5){103}}% %bond 1-3
+ \else%
+ \put(0,0){\line(-3,5){80}}% %bond 1-3
+ \fi%
+ \else%
+% \ifx\eee\empty%bug fix 1993/11/19
+ \ifx\fff\empty%
+ \put(-103,171){\line(3,-5){80}}% %bond 1-3
+ \else%
+ \put(-35,21){\line(-3,5){60}}% %bond 1-3
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondtria}
+% \begin{macrocode}
+%bond between 1 and 2
+\def\dotskbondtria{%
+ \begin{picture}(200,200)(0,0)
+ \ifx\ddd\empty%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,5){103}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,0)(103,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,5){80}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,0)(80,133)}}%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(103,171){\line(-3,-5){80}}% %bond 1-2
+ }{{\thicklines%
+% \dottedline{20}(0,0)(23,38)}}%
+ \dottedline{20}(103,171)(23,38)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(35,21){\line(3,5){60}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(35,21)(95,121)}}%
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dotskbondtrib}
+% \begin{macrocode}
+%bond between 1 and 3
+\def\dotskbondtrib{%
+ \begin{picture}(200,200)(0,0)
+ \ifx\ddd\empty%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-3,5){103}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-103,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-3,5){80}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-80,133)}}%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(-103,171){\line(3,-5){80}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(-103,171)(-23,38)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-35,21){\line(-3,5){60}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(-35,21)(-95,121)}}%
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Drawing three-membered heterocycles}
+%
+% The macro |\threehetero| typesets a three-membered ring. The following
+% numbering is adopted in this macro.
+%
+% \begin{verbatim}
+% ****************************
+% * thereehetero derivatives *
+% * (vertical type) *
+% ****************************
+%
+% b
+% 3--------2
+% c ` / a
+% `1/ <===== the original point
+% \end{verbatim}
+%
+% The macro |\threehetero| 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}
+% \threehetero(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \threeheterov(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.
+%
+% \threehetero{1==N}{1==Cl;2==F}
+% \threehetero[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \threehetero{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\threehetero| 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}
+%
+% \begin{macro}{\threehetero}
+% \begin{macro}{\@three@hetero}
+% \begin{macro}{\@three@@hetero}
+% \begin{macro}{\@threehetero}
+% \begin{macrocode}
+\def\threehetero{\@ifnextchar({\@three@hetero(@}{\@three@hetero(@)}}
+\def\@three@hetero(#1){\@ifnextchar[{\@three@@hetero(#1)[@}%
+{\@three@@hetero(#1)[@]}}
+\def\@three@@hetero(#1)[#2]#3#4{\@ifnextchar[%
+{\@threehetero(#1)[#2]{#3}{#4}[@}%
+{\@threehetero(#1)[#2]{#3}{#4}[@]}}
+\def\@threehetero(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{d}{b}{f}{@}{@}{@}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{3}{3}{5}{0}%subst 1
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{68}\def\@@yli{0}\fi
+\else
+\ylposition{#4}{0}{1}{3}{0}%subst 2
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{142}\def\@@yli{132}\fi
+\else
+\ylposition{#4}{3}{5}{7}{0}%subst 3
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{132}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+%
+%\begin{picture}(800,880)(-\shiftii,-\shifti)%
+% \iforigpt \put(-\shiftii,-\shifti){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% adjust x,y-coodinate by S. Fujita 1993/11/20
+\begin{picture}(800,580)(-468,-240)%
+ \iforigpt \put(-468,-240){\circle*{50}}%
+ \put(-68,0){\circle{50}}%
+ \typeout{command `threeheterov' origin: %
+ (68,0) ---> (468,240)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\put(-68,0){\set@skel@longbond{#1}{a}{skbondtria}}%
+ % bond between 1 and 2 \@aaa -> \skbondtria etc
+\put(0,-132){\set@skel@longbond{#1}{b}{skbondshoriz}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(-68,0){\set@skel@longbond{#1}{c}{skbondtrib}}%
+ % bond between 3 and 1 \@ccc -> \skbondtria etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+\else\if\member a\relax\put(-68,0){\bondtria}%
+\else\if\member b\relax\put(0,-126){\bondshoriz}%
+\else\if\member c\relax\put(-68,0){\bondtrib}%
+\else\if\member A\relax% aromatic circle
+ \put(-70,108){\circle{100}}% %circle
+\else
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@threev
+\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-68,0){\set@hetatom@sixv{#3}{3}{3}{5}{0}%
+\if@clip\global\@cliptrue\fi
+}%subst 1
+\put(-142,-132){\set@hetatom@sixv{#3}{0}{1}{3}{0}%
+\if@bclip\global\@bcliptrue\fi
+}%subst 2
+\put(0,-132){\set@hetatom@sixv{#3}{3}{5}{7}{0}%
+\if@fclip\global\@fcliptrue\fi
+}%subst 3
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-68,0){\setsixringv{#4}{3}{3}{5}{0}}%subst 1
+\put(-142,-132){\setsixringv{#4}{0}{1}{3}{0}}%subst 2
+\put(0,-132){\setsixringv{#4}{3}{5}{7}{0}}%subst 3
+\end{picture}%
+\iniatom\iniflag}% %end of \threehetero macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\threeheterov}
+% \begin{macrocode}
+\let\threeheterov=\threehetero
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@fusionadd@threev| is an inner command contained
+% in the definition of |\threehetero| 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@threev|.
+%
+% \begin{macro}{\set@fusionadd@threev}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusionadd@threev}} +% \begin{macrocode}
+\def\set@fusionadd@threev{%
+ \if\@@tmpa 0\relax%
+ \putratom{-94}{92}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 1\relax%
+ \putratom{-94}{60}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{-52}{120}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{-126}{126}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{-30}{-20}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{52}{110}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{-250}{110}{\scriptsize\@@tmpb}% % right type
+ \else
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+ \set@fusion@threev
+ \fi\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@threev| 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@threev}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@threev}} +% \begin{macrocode}
+\def\set@fusion@threev{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa b\relax%
+ \putlratom{29}{171}{\@@tmpb}% % bond fused
+ \FuseWarning{200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{-171}{171}{\@@tmpb}% % bond fused
+ \FuseWarning{-200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa a\relax%
+ \putlratom{-68}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-103}{-171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{29}{171}{\@@tmpb}% % bond fused
+ \FuseWarning{103}{171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{-171}{171}{\@@tmpb}% % bond fused
+ \FuseWarning{-103}{171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{-68}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{103}{-171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+\fi\fi\fi\fi\fi\fi%
+}% end of the macro \set@fusion@threev
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse vertical type}
+% \subsubsection{Sloped bonds}
+%
+% \changes{v1.02}{1998/10/20}{Newly added commands:
+% \cs{Bondtria}}
+% \begin{macro}{\Bondtria}
+% \begin{macrocode}
+% **********************
+% * bonds for triangle *
+% **********************
+%
+% aaa /1` <===== the original point
+% / `
+% eee 3--------2ccc
+% bond between 1 and 2
+ \def\Bondtria{%
+ \ifx\aaa\empty%
+ \ifx\ccc\empty%
+ \put(-6,-42){\line(3,-5){72}}% %double bond 1-2
+ \else%
+ \put(-6,-42){\line(3,-5){60}}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(6,-62){\line(3,-5){60}}% %double bond 1-2
+ \else%
+ \put(10,-32){\line(3,-5){60}}% %double bond 1-2
+ \fi%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.02}{1998/10/20}{Newly added commands: \cs{Bondtrib}}
+% \begin{macro}{\Bondtrib}
+% \begin{macrocode}
+% bond between 1 and 3
+ \def\Bondtrib{%
+ \ifx\aaa\empty%
+ \ifx\eee\empty%
+ \put(6,-42){\line(-3,-5){72}}% %double bond 1-3
+ \else%
+ \put(6,-42){\line(-3,-5){60}}% %double bond 1-3
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(-6,-62){\line(-3,-5){60}}% %double bond 1-2
+ \else%
+ \put(6,-42){\line(-3,-5){60}}% %double bond 1-2
+ \fi%
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.02}{1998/10/20}{Newly added commands:
+% \cs{skBondtria}}
+% \begin{macro}{\skBondtria}
+% \begin{macrocode}
+%bond between 1 and 2
+\def\skBondtria{%
+% \begin{picture}(200,200)(0,0)
+% \begin{picture}(0,0)(0,0)
+ \ifx\aaa\empty%
+ \ifx\ccc\empty%
+ \put(0,0){\line(3,-5){103}}% %bond 1-2
+ \else%
+ \put(0,0){\line(3,-5){80}}% %bond 1-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(103,-171){\line(-3,5){80}}% %bond 1-2
+ \else%
+ \put(35,-21){\line(3,-5){60}}% %bond 1-2
+ \fi%
+ \fi
+%\end{picture}
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v1.02}{1998/10/20}{Newly added commands:
+% \cs{skBondtrib}}
+% \begin{macro}{\skBondtrib}
+% \begin{macrocode}
+%bond between 1 and 3
+\def\skBondtrib{%
+% \begin{picture}(0,0)(0,0)
+% \begin{picture}(200,200)(0,0)
+ \ifx\aaa\empty%
+ \ifx\eee\empty%
+ \put(0,0){\line(-3,-5){103}}% %bond 1-3
+ \else%
+ \put(0,0){\line(-3,-5){80}}% %bond 1-3
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(-103,-171){\line(3,5){80}}% %bond 1-3
+ \else%
+ \put(-35,-21){\line(-3,-5){60}}% %bond 1-3
+ \fi%
+ \fi
+%\end{picture}
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.00}{1998/12/25}{Newly added commands:
+% \cs{dotskBondtria}}
+% \begin{macro}{\dotskBondtria}
+% \begin{macrocode}
+%bond between 1 and 2
+\def\dotskBondtria{%
+ \ifx\aaa\empty%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,-5){103}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,0)(103,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,-5){80}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,0)(80,-133)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(103,-171){\line(-3,5){80}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(103,-171)(23,-38)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(35,-21){\line(3,-5){60}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(35,-21)(95,-121)}}%
+ \fi%
+ \fi
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.00}{1998/12/25}{Newly added commands:
+% \cs{dotskBondtrib}}
+% \begin{macro}{\dotskBondtrib}
+% \begin{macrocode}
+%bond between 1 and 3
+\def\dotskBondtrib{%
+ \ifx\aaa\empty%
+ \ifx\eee\empty%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-3,-5){103}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-103,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(-3,-5){80}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(0,0)(-80,-133)}}%
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \@ifundefined{dottedline}{%
+ \put(-103,-171){\line(3,5){80}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(-103,-171)(-23,-38)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(-35,-21){\line(-3,-5){60}}% %bond 1-3
+ }{{\thicklines%
+ \dottedline{20}(-35,-21)(-95,-121)}}%
+ \fi%
+ \fi
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Drawing three-membered heterocycles (inverse)}
+%
+% The macro |\threeheteroi| typesets a three-membered ring of
+% inverse vertical type. The following numbering is adopted
+% in this macro.
+% \changes{v1.02}{1998/10/20}{Newly added commands:
+% \cs{threeheteroi}}
+%
+% \begin{verbatim}
+% ****************************
+% * thereehetero derivatives *
+% * (inverse vertical type) *
+% ****************************
+%
+% /1` <===== the original point
+% c / ` a
+% 3--------2
+% b
+% \end{verbatim}
+%
+% The macro |\threeheteroi| 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}
+% \threeheteroi(SKBONDLIST)[BONDLIST]{ATOMLIST}{SUBSLIST}[OMIT]
+% \threeheterovi(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.
+%
+% \threeheteroi{1==N}{1==Cl;2==F}
+% \threeheteroi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \threeheteroi{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
+% \end{verbatim}
+%
+% The definition of |\threehetero| 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}
+%
+% \begin{macro}{\threeheteroi}
+% \begin{macro}{\@three@heteroi}
+% \begin{macro}{\@three@@heteroi}
+% \begin{macro}{\@threeheteroi}
+% \begin{macrocode}
+\def\threeheteroi{\@ifnextchar({\@three@heteroi(@}{\@three@heteroi(@)}}
+\def\@three@heteroi(#1){\@ifnextchar[{\@three@@heteroi(#1)[@}%
+{\@three@@heteroi(#1)[@]}}
+\def\@three@@heteroi(#1)[#2]#3#4{\@ifnextchar[%
+{\@threeheteroi(#1)[#2]{#3}{#4}[@}%
+{\@threeheteroi(#1)[#2]{#3}{#4}[@]}}
+\def\@threeheteroi(#1)[#2]#3#4[#5]{%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % treatment of atom list %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%
+\iniatom\iniflag%initialize
+\test@vertix@sixv{#3}{a}{c}{e}{@}{@}{@}%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % adustment of subs positions %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\@reset@ylsw%
+\ylposition{#4}{0}{0}{2}{0}%subst 1
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{68}\def\@@yli{406}\fi
+\else
+\ylposition{#4}{1}{2}{4}{0}%subst 2
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{142}\def\@@yli{275}\fi
+\else
+\ylposition{#4}{2}{4}{6}{0}%subst 3
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{275}\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(800,580)(-468,-340)%
+ \iforigpt \put(-468,-340){\circle*{50}}%
+ \put(-68,0){\circle{50}}%
+ \typeout{command `threeheteroi' origin: %
+ (0,0) ---> (-468,-340)}\fi%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+{\resetbdsw%
+\@bond@@omit{#5}%
+\put(-68,0){\set@skel@longbond{#1}{a}{skBondtria}}%
+ % bond between 1 and 2 \@aaa -> \skBondtria etc
+\put(0,-275){\set@skel@longbond{#1}{b}{skbondshorizi}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(-68,0){\set@skel@longbond{#1}{c}{skBondtrib}}%
+ % bond between 3 and 1 \@ccc -> \skBondtrib etc
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\@tfor\member:=#2\do{%
+\if\member r\relax%
+\else\if\member a\relax\put(-68,0){\Bondtria}%
+\else\if\member b\relax\put(0,-274){\bondshorizi}%
+\else\if\member c\relax\put(-68,0){\Bondtrib}%
+\else\if\member A\relax% aromatic circle
+ \put(-70,-108){\circle{100}}% %circle
+\else
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+% % inner bond attachment %
+% %%%%%%%%%%%%%%%%%%%%%%%%%
+ \expandafter\twoCH@@R\member//%
+ \set@fusionadd@threevi
+\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-68,-406){\set@hetatom@sixv{#3}{0}{0}{2}{0}%
+\if@aclip\global\@acliptrue\fi
+}%subst 1
+\put(0,-275){\set@hetatom@sixv{#3}{2}{4}{6}{0}%
+\if@eclip\global\@ecliptrue\fi
+}%subst 3
+\put(-142,-275){\set@hetatom@sixv{#3}{1}{2}{4}{0}%
+\if@cclip\global\@ccliptrue\fi
+}%subst 2
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-68,-406){\setsixringv{#4}{0}{0}{2}{0}}%subst 1
+\put(0,-275){\setsixringv{#4}{2}{4}{6}{0}}%subst 3
+\put(-142,-275){\setsixringv{#4}{1}{2}{4}{0}}%subst 2
+\end{picture}%
+\iniatom\iniflag}% %end of \threeheteroi macro
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\threeheterovi}
+% \begin{macrocode}
+\let\threeheterovi=\threeheteroi
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@fusionadd@threevi| is an inner command contained
+% in the definition of |\threeheteroi| 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@threevi|.
+%
+% \begin{macro}{\set@fusionadd@threevi}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusionadd@threevi}} +% \begin{macrocode}
+\def\set@fusionadd@threevi{%
+ \if\@@tmpa 0\relax%
+ \putratom{-94}{-120}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 1\relax%
+ \putratom{-94}{-80}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 2\relax%
+ \putratom{-52}{-150}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 3\relax%
+ \putratom{-126}{-150}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 4\relax%
+ \putratom{-30}{0}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 5\relax%
+ \putratom{32}{-130}{\scriptsize\@@tmpb}% % right type
+ \else\if\@@tmpa 6\relax%
+ \putratom{-230}{-130}{\scriptsize\@@tmpb}% % right type
+ \else
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+ \set@fusion@threevi
+ \fi\fi\fi\fi\fi\fi\fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@threevi| 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@threevi}
+% \changes{v2.00}{1998/12/5}{New command: \cs{set@fusion@threevi}} +% \begin{macrocode}
+\def\set@fusion@threevi{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa b\relax%
+ \putlratom{29}{-171}{\@@tmpb}% % bond fused
+ \FuseWarning{200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{-171}{-171}{\@@tmpb}% % bond fused
+ \FuseWarning{-200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa a\relax%
+ \putlratom{-68}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-103}{171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{29}{-171}{\@@tmpb}% % bond fused
+ \FuseWarning{103}{-171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{-171}{-171}{\@@tmpb}% % bond fused
+ \FuseWarning{103}{171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{-68}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-103}{-171}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+\fi\fi\fi\fi\fi\fi%
+}% end of the macro \set@fusion@threevi
+%</hetarom>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/hetaromh.drv b/Master/texmf-dist/source/latex/xymtex/hetaromh.drv new file mode 100644 index 00000000000..fa9b0ae95db --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hetaromh.drv @@ -0,0 +1,83 @@ +%% +%% This is file `hetaromh.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hetaromh.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996,1998,2000 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1996 (private version) +%% Version 2.00 Released on December 25, 1998 +%% Version 2.00a Released on November 11, 2000 +%% +%% Copyright (C) 1996, 1998, 2000 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: hetaromh.dtx +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{hetaromh.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{hetaromh.dtx} +\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 \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{hetaromh.dtx} +\end{document} +\endinput +%% +%% End of file `hetaromh.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/hetaromh.dtx b/Master/texmf-dist/source/latex/xymtex/hetaromh.dtx new file mode 100644 index 00000000000..c90896bf019 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hetaromh.dtx @@ -0,0 +1,6700 @@ +% \iffalse meta-comment
+%% File: hetaromh.dtx
+%
+% Copyright 1993,1996,1998,2000 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].
+%
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name and
+% directory name; or
+% (2) if you do make changes,
+% (a) you name it something other than the names included in the
+% ``xymtex'' directory and
+% (b) you are requested to leave this notice intact.
+% This restriction ensures that all standard styles are identical.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd.,
+% Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
+%
+% New address:
+% Shinsaku Fujita,
+% 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
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{5947}
+%% \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}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+\ProvidesFile{hetaromh.dtx}[1998/12/25 v2.00 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 \\
+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 2.00}
+\typeout{ -- Released December 25, 1998 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{hetaromh}
+\def\versi@ndate{November 11, 2000}
+\def\versi@nno{ver2.00a}
+\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
+% \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
+% \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
+% \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\ggg{}\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(42,6){\line(3,5){78}}% %double bond 1-2
+ \else%
+ \put(42,6){\line(3,5){62}}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(57,36){\line(3,5){62}}% %double bond 1-2
+ \else%
+ \put(57,36){\line(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(42,-6){\line(3,-5){78}}% %double bond 1-6
+ \else%
+ \put(42,-6){\line(3,-5){62}}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(57,-36){\line(3,-5){62}}% %double bond 1-6
+ \else%
+ \put(57,-36){\line(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(129,138){\line(1,0){148}}% %double bond 2-3
+ \else%
+ \put(129,138){\line(1,0){134}}% %double bond 3-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(143,138){\line(1,0){134}}% %double bond 3-2
+ \else%
+ \put(143,138){\line(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(364,6){\line(-3,5){78}}% %double bond 4-3
+ \else%
+ \put(364,6){\line(-3,5){62}}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(349,36){\line(-3,5){62}}% %double bond 4-3
+ \else%
+ \put(349,36){\line(-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(364,-6){\line(-3,-5){78}}% %double bond 4-5
+ \else%
+ \put(364,-6){\line(-3,-5){62}}% %double bond 4-5
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(349,-36){\line(-3,-5){62}}% %double bond 4-5
+ \else%
+ \put(349,-36){\line(-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(129,-138){\line(1,0){148}}% %double bond 6-5
+ \else%
+ \put(129,-138){\line(1,0){134}}% %double bond 5-6
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(143,-138){\line(1,0){134}}% %double bond 5-6
+ \else%
+ \put(143,-138){\line(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(136,-138){\line(0,1){277}}% %double bond 4-3
+ \else%
+ \put(136,-138){\line(0,1){258}}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(136,-120){\line(0,1){258}}% %double bond 4-3
+ \else
+ \put(136,-120){\line(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(270,-138){\line(0,0){277}}% %double bond 4-3
+ \else%
+ \put(270,-138){\line(0,1){258}}% %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(270,-120){\line(0,1){258}}% %double bond 4-3
+ \else%
+ \put(270,-120){\line(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(0,0){\line(3,5){103}}% %bond 1-2
+ \else%
+ \put(0,0){\line(3,5){79}}% %bond 1-2
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(24,40){\line(3,5){79}}% %bond 1-2
+ \else%
+ \put(24,40){\line(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(0,0){\line(3,-5){103}}% %bond 1-6
+ \else%
+ \put(0,0){\line(3,-5){79}}% %bond 1-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(24,-40){\line(3,-5){79}}% %bond 1-6
+ \else%
+ \put(24,-40){\line(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(406,0){\line(-3,5){103}}% %bond 4-3
+ \else%
+ \put(406,0){\line(-3,5){79}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(382,40){\line(-3,5){79}}% %bond 4-3
+ \else%
+ \put(382,40){\line(-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(406,0){\line(-3,-5){103}}% %bond 4-5
+ \else%
+ \put(406,0){\line(-3,-5){79}}% %bond 4-5
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \put(382,-40){\line(-3,-5){79}}% %bond 4-5
+ \else%
+ \put(382,-40){\line(-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(103,171){\line(1,0){200}}% %bond 2-3
+ \else%
+ \put(103,171){\line(1,0){160}}% %bond 3-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(143,171){\line(1,0){160}}% %bond 3-2
+ \else%
+ \put(143,171){\line(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(103,-171){\line(1,0){200}}% %bond 6-5
+ \else%
+ \put(143,-171){\line(1,0){160}}% %bond 5-6
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \put(103,-171){\line(1,0){160}}% %bond 5-6
+ \else%
+ \put(143,-171){\line(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(103,-171){\line(0,1){342}}% %bond 4-3
+ \else%
+ \put(103,-171){\line(0,1){300}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \put(103,171){\line(0,-1){300}}% %bond 4-3
+ \else%
+ \put(103,-129){\line(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(303,-171){\line(0,1){342}}% %bond 4-3
+ \else%
+ \put(303,-171){\line(0,1){300}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(303,171){\line(0,-1){300}}% %bond 4-3
+ \else%
+ \put(303,-129){\line(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%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,5){103}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,0)(103,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,5){79}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(0,0)(79,132)}}%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(24,40){\line(3,5){79}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(24,40)(103,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(24,40){\line(3,5){62}}% %bond 1-2
+ }{{\thicklines%
+ \dottedline{20}(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%
+ \@ifundefined{dottedline}{%
+ \put(103,171){\line(1,0){200}}% %bond 2-3
+ }{{\thicklines%
+ \dottedline{20}(103,171)(303,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(103,171){\line(1,0){160}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(103,171)(263,171)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(143,171){\line(1,0){160}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(143,171)(303,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(143,171){\line(1,0){120}}% %bond 3-2
+ }{{\thicklines%
+ \dottedline{20}(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%
+ \@ifundefined{dottedline}{%
+ \put(406,0){\line(-3,5){103}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(406,0)(303,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(406,0){\line(-3,5){79}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(406,0)(327,132)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(382,40){\line(-3,5){79}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(382,40)(303,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(382,40){\line(-3,5){62}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(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%
+ \@ifundefined{dottedline}{%
+ \put(406,0){\line(-3,-5){103}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(406,0)(303,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(406,0){\line(-3,-5){79}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(406,0)(327,-132)}}%
+ \fi%
+ \else%
+ \ifx\eee\empty%
+ \@ifundefined{dottedline}{%
+ \put(382,-40){\line(-3,-5){79}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(382,-40)(303,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(382,-40){\line(-3,-5){62}}% %bond 4-5
+ }{{\thicklines%
+ \dottedline{20}(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%
+ \@ifundefined{dottedline}{%
+ \put(103,-171){\line(1,0){200}}% %bond 6-5
+ }{{\thicklines%
+ \dottedline{20}(103,-171)(303,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(143,-171){\line(1,0){160}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(143,-171)(303,-171)}}%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(103,-171){\line(1,0){160}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(103,-171)(263,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(143,-171){\line(1,0){120}}% %bond 5-6
+ }{{\thicklines%
+ \dottedline{20}(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
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,-5){103}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(0,0)(103,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,-5){79}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(0,0)(79,-131)}}%
+ \fi%
+ \else%
+ \ifx\fff\empty%
+ \@ifundefined{dottedline}{%
+ \put(24,-40){\line(3,-5){79}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(24,-40)(103,-171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(24,-40){\line(3,-5){62}}% %bond 1-6
+ }{{\thicklines%
+ \dottedline{20}(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%
+ \@ifundefined{dottedline}{%
+ \put(103,-171){\line(0,1){342}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(103,-171)(103,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(103,-171){\line(0,1){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(103,-171)(103,129)}}%
+ \fi%
+ \else%
+ \ifx\bbb\empty%
+ \@ifundefined{dottedline}{%
+ \put(103,171){\line(0,-1){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(103,171)(103,-129)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(103,-129){\line(0,1){258}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(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%
+ \@ifundefined{dottedline}{%
+ \put(303,-171){\line(0,1){342}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(303,-171)(303,171)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(303,-171){\line(0,1){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(303,-171)(303,129)}}%
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \@ifundefined{dottedline}{%
+ \put(303,171){\line(0,-1){300}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(303,171)(303,-129)}}%
+ \else%
+ \@ifundefined{dottedline}{%
+ \put(303,-129){\line(0,1){258}}% %bond 4-3
+ }{{\thicklines%
+ \dottedline{20}(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.
+%
+% \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
+ \@skbondlistfalse
+ \@tfor\member:=#1\do{%
+ \expandafter\twoCH@@R\member//
+ \if\@@tmpa #2\relax%
+ \if\@@tmpb A\relax%
+ \expandafter\csname dothskbond#3\endcsname% \dothskbonda etc.
+ \@skbondlisttrue
+ \else\if\@@tmpb B\relax%
+ {\thicklines
+ \expandafter\csname hskbond#3\endcsname% \hskbonda etc.
+ }%
+ \@skbondlisttrue
+ \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}
+%
+% \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}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+\begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(880,800)(-240,-400)%
+ \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `sixheteroh' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+\fi
+% \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(0,203){\circle{240}}% %circle
+ \put(203,0){\circle{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{picture}\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}
+%
+% \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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(880,800)(-240,-400)%
+ \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `sixheterohi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+\fi
+% \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(0,203){\circle{240}}% %circle
+ \put(203,0){\circle{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{picture}\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}
+% \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}{\pyridazineh}
+% \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
+% \end{macrocode}
+% \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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(800,880)(-240,-400)%
+ \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `fiveheteroh' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+\fi
+% \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(233,0){\circle{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(0,0){\set@hetatom@sixh{#3}{5}{1}{5}{-1}}% % for 1 to 3
+\put(0,0){\set@hetatom@sixh{#3}{10}{4}{7}{-1}}% % for 4 to 5
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(0,0){\setsixringh{#4}{5}{1}{5}{-1}}% % for 1 to 3
+\put(0,0){\setsixringh{#4}{10}{4}{7}{-1}}% % for 4 to 5
+\end{picture}\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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(800,880)(-240,-400)%
+ \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `fiveheterohi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+\fi
+% \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(173,0){\circle{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{picture}\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}
+%
+% \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=\ggg
+\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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1200,1200)(-400,-800)
+ \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `decaheteroh' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
+\fi
+% \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=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\put(0,-342){\set@skel@bondh{#1}{i}{a}}%
+ % bond between 8a and 8 \@iii -> \hskbonda etc
+\put(0,-342){\set@skel@bondh{#1}{e}{c}}%
+ % bond between 4a and 5 \@eee -> \hskbondc etc
+\put(0,-342){\set@skel@bondh{#1}{f}{d}}%
+ % bond between 5 and 6 \@fff -> \hskbondd etc
+\put(0,-342){\set@skel@bondh{#1}{g}{e}}%
+ % bond between 6 and 7 \@ggg -> \hskbonde etc
+\put(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(0,0){\hbonda}% bond between 1 and 2%
+ \put(0,0){\hbondc}% bond between 3 and 4%
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 8a and 4a
+ \put(0,-342){\hbondf}% bond between 8 and 7
+ \put(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \put(0,0){\hbonda}% bond between 1 and 2
+\else \if\member b\relax%
+ \put(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax%
+ \put(0,0){\hbondc}% bond between 3 and 4
+% \put(342,0){\hbondc}% bond between 3 and 4
+\else \if\member d\relax%
+{\let\eee=\iii%
+ \put(0,0){\hbondd}% bond between 4 and 4a
+}%
+\else \if\member e\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,-342){\hbondc}% bond between 5 and 4a
+}%
+\else \if\member f\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \put(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member g\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,-342){\hbonde}% bond between 6 and 7
+}%
+\else \if\member h\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,-342){\hbondf}% bond between 8 and 7
+}%
+\else \if\member i\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,-342){\hbonda}% bond between 8 and 8a
+}%
+\else \if\member j\relax%
+{\let\fff=\jjj%
+ \put(0,0){\hbondf}% bond between 1 and 8a
+}%
+\else \if\member k\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 8a and 4a
+}%
+\else \if\member K\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(0,0){\hbonde}% bond between 8a and 4a in the other ring
+}%
+\else \if\member A%left aromatic circle
+ \put(203,0){\circle{240}}% %circle
+\else \if\member B%left aromatic circle
+ \put(203,-342){\circle{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.}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\iniflag
+\put(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}% %substituents on 1 to 4
+\put(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}%substituents on 5 to 7
+\put(0,-342){\iniflag%2000/11/11 by Shinsaku Fujita
+ \set@hetatom@sixh{#3}{-7}{0}{2}{0}%
+ \@hclipfalse \if@aclip \global\@hcliptrue \fi}%%substituent on 8
+\put(0,0){\set@vrtx@fuseh{#3}%
+ \if@iclip \global\@icliptrue \fi
+ \if@jclip \global\@jcliptrue \fi}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(0,0){\setsixringh{#4}{0}{0}{5}{0}}% %substituents on 1 to 4
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 5 to 7
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\put(0,-342){\setsixringh{#4}{-1}{3}{7}{0}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 8
+\put(0,-342){\setsixringh{#4}{-7}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(303,-171){\setatombond{#4}{-8}{4}} %9 for 4a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(103,-171){\setatombond{#4}{-9}{10}} %10 for 8a position
+}%
+\end{picture}\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}
+%
+% \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=\ggg
+\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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1200,1200)(-400,-800)%
+ \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `decaheterohi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
+\fi
+% \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=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\put(0,-342){\set@skel@bondh{#1}{e}{a}}%
+ % bond between 4a and 5 \@eee -> \hskbonda etc
+\put(0,-342){\set@skel@bondh{#1}{i}{c}}%
+ % bond between 8a and 8 \@iii -> \hskbondc etc
+\put(0,-342){\set@skel@bondh{#1}{h}{d}}%
+ % bond between 7 and 8 \@hhh -> \hskbondd etc
+\put(0,-342){\set@skel@bondh{#1}{g}{e}}%
+ % bond between 6 and 7 \@ggg -> \hskbonde etc
+\put(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(0,0){\hbonda}% bond between 1 and 2
+ \put(0,0){\hbondc}% bond between 3 and 4
+}%
+{\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 8a and 4a
+ \put(0,-342){\hbondf}% bond between 8 and 7
+ \put(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \put(0,0){\hbondc}% bond between 3 and 4
+\else \if\member b\relax
+ \put(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax
+ \put(0,0){\hbonda}% bond between 1 and 2
+\else \if\member d\relax%
+{\let\fff=\jjj%
+ \put(0,0){\hbondf}% bond between 1 and 8a
+}%
+\else \if\member e\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,-342){\hbonda}% bond between 8 and 8a
+}%
+\else \if\member f\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,-342){\hbondf}% bond between 8 and 7
+}%
+\else \if\member g\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,-342){\hbonde}% bond between 6 and 7
+}%
+\else \if\member h\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \put(0,-342){\hbondd}% bond between 5 and 6
+}%
+\else \if\member i\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,-342){\hbondc}% bond between 5 and 4a
+}%
+\else \if\member j\relax%
+{\let\eee=\iii%
+ \put(0,0){\hbondd}% bond between 4 and 4a
+}%
+\else \if\member k\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 8a and 4a
+}%
+\else \if\member K\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(0,0){\hbonde}% bond between 8a and 4a
+}%
+\else \if\member A%left aromatic circle
+ \put(203,0){\circle{240}}% %circle
+\else \if\member B%left aromatic circle
+ \put(203,-342){\circle{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(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
+}% %substituents on 1 to 4
+\put(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%
+}%substituents on 6 to 8
+\put(0,-342){\set@hetatom@sixh{#3}{-4}{0}{2}{0}%
+ \@aclipfalse \if@aclip \global\@hcliptrue \fi%
+}%%substituent on 5
+\put(0,0){\set@vrtx@decafusehi{#3}%
+ \@tmpclipfalse
+ \if@iclip \global\@tmpcliptrue \fi
+ \if@jclip \global\@icliptrue \fi
+ \if@tmpclip \global\@jcliptrue \fi
+}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(0,0){\setsixringh{#4}{5}{0}{5}{-1}}% %substituents on 1 to 4
+{\@clipfalse \if@eclip \@cliptrue \fi% %substituents on 6 to 8
+ \@eclipfalse \if@fclip \@ecliptrue \fi%
+ \@fclipfalse \if@gclip \@fcliptrue \fi%
+\put(0,-342){\setsixringh{#4}{12}{3}{7}{-1}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 5
+\put(0,-342){\setsixringh{#4}{-4}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(303,-171){\setatombond{#4}{-9}{4}}% %10 for 8a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi
+ \put(103,-171){\setatombond{#4}{-8}{10}}% %9 for 4a position
+}%
+\end{picture}\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(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa A%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa b%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa B%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa c%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa C%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \else\if\@tmpa d%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `d'}%
+ \fi
+ \else\if\@tmpa D%
+ \let\@@tmpa=\@tmpa
+ \put(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `D'}%
+ \fi
+ \else\if\@tmpa e%
+ \edef\@@tmpa{c}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `e'}%
+ \fi
+ \else\if\@tmpa E%
+ \edef\@@tmpa{C}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `E'}%
+ \fi
+ \else\if\@tmpa f%
+ \edef\@@tmpa{d}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa F%
+ \edef\@@tmpa{D}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa g%
+ \edef\@@tmpa{e}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa G%
+ \edef\@@tmpa{E}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa h%
+ \edef\@@tmpa{f}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa H%
+ \edef\@@tmpa{F}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \else\if\@tmpa i%
+ \edef\@@tmpa{a}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `i'}%
+ \fi
+ \else\if\@tmpa I%
+ \edef\@@tmpa{A}%
+ \put(0,-342){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `I'}%
+ \fi
+ \else\if\@tmpa j%
+ \edef\@@tmpa{f}%
+ \put(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `j'}%
+ \fi
+ \else\if\@tmpa J%
+ \edef\@@tmpa{F}%
+ \put(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Unfavorable Fusion for bond `J'}%
+ \fi
+ \else\if\@tmpa k%
+ \edef\@@tmpa{e}%
+ \put(0,0){\set@fusionadd@sixhi}%
+ \if@smallringsw\else
+ \XyMTeXWarning{Forbidden Fusion for bond `k'}%
+ \fi
+ \else\if\@tmpa K%
+ \edef\@@tmpa{E}%
+ \put(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}
+% \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{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}}%
+% \end{macrocode}
+% \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}
+%
+% \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=\ggg
+\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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,1200)(-400,-800)%
+ \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `nonahetero' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
+\fi
+% \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=\ggg
+ \let\ccc=\iii\let\bbb=\jjj%
+\put(0,-342){\set@skel@bondh{#1}{d}{a}}%
+ % bond between 3a and 4 \@ddd -> \hskbonda etc
+\put(0,-342){\set@skel@bondh{#1}{h}{c}}%
+ % bond between 7a and 7 \@hhh -> \hskbondc etc
+\put(0,-342){\set@skel@bondh{#1}{g}{d}}%
+ % bond between 6 and 7 \@ggg -> \hskbondd etc
+\put(0,-342){\set@skel@bondh{#1}{f}{e}}%
+ % bond between 5 and 6 \@fff -> \hskbonde etc
+\put(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=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 3a and 7a
+ \put(0,-342){\hbondf}% bond between 4 and 5
+ \put(0,-342){\hbondd}% bond between 6 and 7
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \put(0,0){\hbondc}% bond between 3 and 4
+\else \if\member b\relax%
+ \put(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax%
+ \put(0,0){\hbondvert}% bond between 3 and 3a
+\else \if\member d\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,-342){\hbonda}% bond between 4 and 3a
+}%
+\else \if\member e\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,-342){\hbondf}% bond between 4 and 5
+}%
+\else \if\member f\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,-342){\hbonde}% bond between 5 and 6
+}%
+\else \if\member g\relax%
+{\let\ddd=\eee \let\eee=\fff%
+ \put(0,-342){\hbondd}% bond between 6 and 7
+}%
+\else \if\member h\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,-342){\hbondc}% bond between 7 and 7a
+}%
+\else \if\member i\relax%
+{\let\eee=\iii%
+ \put(0,0){\hbondd}% bond between 1 and 7a
+}%
+\else \if\member j\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 7a and 3a
+}%
+\else \if\member J\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(0,0){\hbonde}% bond between 7a and 3a
+}%
+\else \if\member B%left aromatic circle
+ \put(233,0){\circle{180}}% %circle (five-membered)
+\else \if\member A%left aromatic circle
+ \put(203,-342){\circle{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
+\put(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
+}% %substituents on 1 to 3
+\put(0,-342){\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%
+}%substituents on 5 to 7
+\put(0,-342){\set@hetatom@sixh{#3}{-3}{0}{2}{0}%
+ \@aclipfalse \if@aclip \global\@hcliptrue \fi%
+}%%substituent on 4
+\put(0,0){\set@vrtx@nonafuseh{#3}%
+ \@tmpclipfalse
+ \if@iclip \global\@tmpcliptrue \fi
+ \if@jclip \global\@icliptrue \fi
+ \if@tmpclip \global\@jcliptrue \fi
+}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(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(0,-342){\setsixringh{#4}{11}{3}{7}{-1}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 4
+\put(0,-342){\setsixringh{#4}{-3}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(303,-171){\setatombond{#4}{-8}{4}}% %9 for 7a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(103,-171){\setatombond{#4}{-7}{10}}% %8 for 3a position
+}%
+\end{picture}\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}
+%
+% \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=\ggg
+\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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+ \begin{picture}(1200,1200)(-400,-800)%
+ \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
+ \put(-\noshift,-\noshift){\circle{50}}%
+ \typeout{command `nonaheterohi' origin: %
+ (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
+\fi
+% \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=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+\put(0,-342){\set@skel@bondh{#1}{h}{a}}%
+ % bond between 7a and 7 \@hhh -> \hskbonda etc
+\put(0,-342){\set@skel@bondh{#1}{d}{c}}%
+ % bond between 3a and 4 \@ddd -> \hskbondc etc
+\put(0,-342){\set@skel@bondh{#1}{e}{d}}%
+ % bond between 4 and 5 \@eee -> \hskbondd etc
+\put(0,-342){\set@skel@bondh{#1}{f}{e}}%
+ % bond between 5 and 6 \@fff -> \hskbonde etc
+\put(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=\ggg%
+ \let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 3a and 7a
+ \put(0,-342){\hbondf}% bond between 6 and 7
+ \put(0,-342){\hbondd}% bond between 4 and 5
+}%
+\else \if\member l\relax%
+\else \if\member a\relax%
+ \put(0,0){\hbonda}% bond between 1 and 2
+\else \if\member b\relax%
+ \put(0,0){\hbondb}% bond between 2 and 3
+\else \if\member c\relax%
+ \put(0,0){\hbondverti}% bond between 3 and 3a
+\else \if\member d\relax%
+{\let\ccc=\iii \let\ddd=\eee%
+ \put(0,-342){\hbondc}% bond between 4 and 3a
+}%
+\else \if\member e\relax%
+{\let\ddd=\eee\let\eee=\fff%
+ \put(0,-342){\hbondd}% bond between 4 and 5
+}%
+\else \if\member f\relax%
+{\let\eee=\fff \let\fff=\ggg%
+ \put(0,-342){\hbonde}% bond between 5 and 6
+}%
+\else \if\member g\relax%
+{\let\aaa=\hhh \let\fff=\ggg%
+ \put(0,-342){\hbondf}% bond between 7 and 6
+}%
+\else \if\member h\relax%
+{\let\aaa=\hhh \let\bbb=\jjj%
+ \put(0,-342){\hbonda}% bond between 7 and 7a
+}%
+\else \if\member i\relax%
+{\let\fff=\jjj%
+ \put(0,0){\hbondf}% bond between 1 and 7a
+}%
+\else \if\member j\relax%
+{\let\ccc=\iii\let\bbb=\jjj%
+ \put(0,-342){\hbondb}% bond between 7a and 3a
+}%
+\else \if\member J\relax%
+{\let\eee=\iii\let\fff=\jjj%
+ \put(0,0){\hbonde}% bond between 7a and 3a
+}%
+\else \if\member B%aromatic circle
+ \put(173,0){\circle{180}}% %circle (five-membered)
+\else \if\member A%aromatic circle
+ \put(203,-342){\circle{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(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
+}% %substituents on 1 to 3
+\put(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}%substituents on 4 to 6
+\put(0,-342){\set@hetatom@sixh{#3}{-6}{0}{2}{0}%
+ \@hclipfalse \if@aclip \global\@hcliptrue \fi}%%substituent on 7
+\put(0,0){\set@vrtx@nonafusehi{#3}%
+ \if@iclip \global\@icliptrue \fi
+ \if@jclip \global\@jcliptrue \fi}% fused positions
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents and exocyclic bonds %
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\put(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(0,-342){\setsixringh{#4}{0}{3}{7}{0}}%
+}%
+{\@aclipfalse \if@hclip \@acliptrue \fi% %substituent on 7
+\put(0,-342){\setsixringh{#4}{-6}{0}{2}{0}}%
+}%
+{\@clipfusefalse \if@iclip \@clipfusetrue \fi%
+ \put(303,-171){\setatombond{#4}{-7}{4}}% %8 for 3a position
+}%
+{\@clipfusefalse \if@jclip \@clipfusetrue \fi%
+ \put(103,-171){\setatombond{#4}{-8}{10}}%%9 for 7a position
+}%
+\end{picture}\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}
+%
+% \begin{verbatim}
+% (Old difinition)
+% % \begin{macro}{\sixunith}
+% % \begin{macro}{\@sixunith}
+% % \begin{macrocode}
+% \def\sixunith{\@ifnextchar[{\@sixunith}{\@sixunith[r]}}
+% \def\@sixunith[#1]#2#3#4{%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % treatment of atom list %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% \iniatom\iniflag%initialize%
+% \@forsemicol\member:=#2\do{%
+% \expandafter\@m@mb@r\member;\relax%
+% \expandafter\twoch@r\@membera{}%
+% \ifcase\@tmpa%
+% \or \xdef\aaa{\@memberb}%
+% \or \xdef\bbb{\@memberb}%
+% \or \xdef\ccc{\@memberb}%
+% \or \xdef\ddd{\@memberb}%
+% \or \xdef\eee{\@memberb}%
+% \or \xdef\fff{\@memberb}%
+% \fi}%
+% \begin{picture}(800,880)(-240,-400)%
+% \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `sixunith' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%
+% % % outer skeleton %
+% % %%%%%%%%%%%%%%%%%%
+% % changed OMIT into a list 1993/11/21 by Shinsaku Fujita
+% {\resetbdsw%
+% \@tfor\memBer:=#4\do{%
+% \if\memBer a\relax\gdef\@aaa{}\fi%
+% \if\memBer b\relax\gdef\@bbb{}\fi%
+% \if\memBer c\relax\gdef\@ccc{}\fi%
+% \if\memBer d\relax\gdef\@ddd{}\fi%
+% \if\memBer e\relax\gdef\@eee{}\fi%
+% \if\memBer f\relax\gdef\@fff{}\fi%
+% }%
+% \if\@aaa a\relax\hskbonda\fi% bond between 1 and 2
+% \if\@bbb b\relax\hskbondb\fi% bond between 2 and 3
+% \if\@ccc c\relax\hskbondc\fi% bond between 3 and 4
+% \if\@ddd d\relax\hskbondd\fi% bond between 4 and 5
+% \if\@eee e\relax\hskbonde\fi% bond between 5 and 6
+% \if\@fff f\relax\hskbondf\fi% bond between 6 and 1
+% }%
+% %\ifx#4a\relax \else%
+% % \hskbonda% bond between 1 and 2
+% %\fi%
+% %\ifx#4f\relax \else%
+% % \hskbondf% bond between 1 and 6
+% %\fi%
+% %\ifx#4c\relax \else%
+% % \hskbondc% bond between 4 and 3
+% %\fi%
+% %\ifx#4d\relax \else%
+% % \hskbondd% bond between 4 and 5
+% %\fi%
+% %\ifx#4b\relax \else%
+% % \hskbondb% bond between 3 and 2
+% %\fi%
+% %\ifx#4e\relax \else%
+% % \hskbonde% bond between 5 and 6
+% %\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%
+% % % inner double bond %
+% % %%%%%%%%%%%%%%%%%%%%%
+% \@tfor\member:=#1\do{%
+% \if\member r\relax%
+% \else \if\member l\relax%
+% \else \if\member a\relax%
+% \ifx#4a\relax \else%
+% \hbonda%
+% \fi%
+% \else \if\member b\relax%
+% \ifx#4b\relax \else%
+% \hbondb%
+% \fi%
+% \else \if\member c\relax%
+% \ifx#4c\relax \else%
+% \hbondc%
+% \fi%
+% \else \if\member d\relax%
+% \ifx#4d\relax \else%
+% \hbondd%
+% \fi%
+% \else \if\member e\relax%
+% \ifx#4e\relax \else%
+% \hbonde%
+% \fi%
+% \else \if\member f\relax%
+% \ifx#4f\relax \else%
+% \hbondf%
+% \fi%
+% \else \if\member A%left aromatic circle
+% \put(203,0){\circle{240}}% %circle
+% \else \expandafter\twoch@@r\member{}{}%
+% \if\@@tmpa 4\relax%
+% \putratom{272}{-18}{\@@tmpb}% % right type
+% \else\if\@@tmpa 1\relax%
+% \putratom{68}{-18}{\@@tmpb}% % right type
+% \else\if\@@tmpa 3\relax
+% \putratom{233}{60}{\@@tmpb}% % right type
+% \else\if\@@tmpa 2\relax%
+% \putratom{120}{60}{\@@tmpb}% % right type
+% \else\if\@@tmpa 5\relax%
+% \putratom{233}{-110}{\@@tmpb}% % right type
+% \else\if\@@tmpa 6\relax%
+% \putratom{120}{-110}{\@@tmpb}% % right type
+% \fi\fi\fi\fi\fi\fi%
+% \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting hetero atoms %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \ifx\ddd\empty\else%
+% \@cliptrue%
+% \putratom{346}{-36}{\ddd}% % right type
+% \fi%
+% \ifx\aaa\empty\else%
+% \@acliptrue%
+% \putlatom{60}{-36}{\aaa}% % left type
+% \fi%
+% \ifx\bbb\empty\else%
+% \@bcliptrue%
+% \putlatom{135}{141}{\bbb}% % left type
+% \fi%
+% \ifx\ccc\empty\else%
+% \@ccliptrue%
+% \putratom{273}{141}{\ccc}% % right type
+% \fi%
+% \ifx\fff\empty\else%
+% \@fcliptrue%
+% \putlatom{135}{-211}{\fff}% % left type
+% \fi%
+% \ifx\eee\empty\else%
+% \@ecliptrue%
+% \putratom{273}{-211}{\eee}% % right type
+% \fi%
+% \setsixringh{#3}{0}{0}{7}{0}%
+% \end{picture}\iniatom\iniflag}% %end of \sixunith macro
+% % \end{macrocode}
+% % \end{macro}
+% % \end{macro}
+% \end{verbatim}
+%
+% \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}
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\fiveunith}
+% % \begin{macro}{\@fiveunith}
+% % \begin{macrocode}
+% \def\fiveunith{\@ifnextchar[{\@fiveunith}{\@fiveunith[r]}}
+% \def\@fiveunith[#1]#2#3#4{%
+% \iniatom\iniflag%initialize
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % treatment of atom list %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
+% \@forsemicol\member:=#2\do{%
+% \expandafter\@m@mb@r\member;\relax%
+% \expandafter\twoch@r\@membera{}%
+% \ifcase\@tmpa%
+% \or \xdef\ddd{\@memberb}%
+% \or \xdef\ccc{\@memberb}%
+% \or \xdef\bbb{\@memberb}%
+% \or \xdef\fff{\@memberb}%
+% \or \xdef\eee{\@memberb}%
+% \fi}%
+% \begin{picture}(800,880)(-240,-400)%
+% \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `fiveunith' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%
+% % % outer skeleton %
+% % %%%%%%%%%%%%%%%%%%
+% % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
+% {\resetbdsw%
+% \@tfor\memBer:=#4\do{%
+% \if\memBer a\relax\gdef\@aaa{}\fi%
+% \if\memBer b\relax\gdef\@bbb{}\fi%
+% \if\memBer c\relax\gdef\@ccc{}\fi%
+% \if\memBer d\relax\gdef\@ddd{}\fi%
+% \if\memBer e\relax\gdef\@eee{}\fi%
+% %\if\memBer f\relax\gdef\@fff{}\fi%
+% }%
+% \if\@aaa a\relax\hskbondc\fi% bond between 1 and 2
+% \if\@bbb b\relax\hskbondb\fi% bond between 2 and 3
+% \if\@ccc c\relax\hskbondvert\fi% bond between 3 and 4
+% \if\@ddd d\relax\hskbonde\fi% bond between 4 and 5
+% \if\@eee e\relax\hskbondd\fi% bond between 5 and 6
+% %\if\@fff f\relax\hskbondf\fi% bond between 6 and 1
+% }%
+% % old
+% %\ifx#4a\relax\else%
+% % \hskbondc%bond between 1 and 2
+% %\fi%
+% %\ifx#4e\relax\else%
+% % \hskbondd%bond between 1 and 5
+% %\fi%
+% %\ifx#4b\relax\else%
+% % \hskbondb%bond between 2 to 3
+% %\fi%
+% %\ifx#4d\relax\else%
+% % \hskbonde%bond between 5 and 4
+% %\fi%
+% %\ifx#4c\relax\else%
+% % \hskbondvert%bond between 4 and 3
+% %\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%
+% % % inner double bond %
+% % %%%%%%%%%%%%%%%%%%%%%
+% \@tfor\member:=#1\do{%
+% \if\member r%
+% \else \if\member a\relax%
+% \ifx#4a\relax\else%
+% \hbondc%
+% \fi%
+% \else \if\member b\relax%
+% \ifx#4b\relax\else%
+% \hbondb%
+% \fi%
+% \else \if\member c\relax%
+% \ifx#4c\relax\else%
+% \hbondvert%
+% \fi%
+% \else \if\member d\relax%
+% \ifx#4d\relax\else%
+% \hbonde%
+% \fi%
+% \else \if\member e\relax%
+% \ifx#4e\relax\else%
+% \hbondd%
+% \fi%
+% \else \if\member A%left aromatic circle
+% \put(233,0){\circle{180}}% %circle
+% \else \expandafter\twoch@@r\member{}{}%
+% \if\@@tmpa 1\relax%
+% \putratom{272}{-18}{\@@tmpb}% % right type
+% \else\if\@@tmpa 2\relax%
+% \putratom{233}{60}{\@@tmpb}% % right type
+% \else\if\@@tmpa 3\relax%
+% \putratom{120}{60}{\@@tmpb}% % right type
+% \else\if\@@tmpa 5\relax%
+% \putratom{233}{-110}{\@@tmpb}% % right type
+% \else\if\@@tmpa 4\relax%
+% \putratom{120}{-110}{\@@tmpb}% % right type
+% \else\if\@@tmpa 0\relax%
+% \putratom{196}{-30}{\@@tmpb}% % right type
+% \fi\fi\fi\fi\fi\fi%
+% \fi\fi\fi\fi\fi\fi\fi}%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% % % setting heteroatoms %
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% \ifx\ddd\empty\else%
+% \@cliptrue%
+% \putratom{346}{-36}{\ddd}% % right type
+% \fi%
+% \ifx\bbb\empty\else%
+% \@bcliptrue%
+% \putlatom{135}{141}{\bbb}% % left type
+% \fi%
+% \ifx\ccc\empty\else%
+% \@ccliptrue%
+% \putratom{273}{141}{\ccc}% % right type
+% \fi%
+% \ifx\fff\empty\else%
+% \@fcliptrue%
+% \putlatom{135}{-211}{\fff}% % left type
+% \fi%
+% \ifx\eee\empty\else%
+% \@ecliptrue%
+% \putratom{273}{-211}{\eee}% % right type
+% \fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \setsixringh{#3}{5}{1}{5}{-1}% % for 1 to 3
+% \setsixringh{#3}{10}{4}{7}{-1}% % for 4 to 5
+% \end{picture}\iniatom\iniflag}% %end of \fiveunith macro
+% % \end{macrocode}
+% % \end{macro}
+% % \end{macro}
+% \end{verbatim}
+%
+% \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}
+%
+% \begin{verbatim}
+% (Old definition)
+% % \begin{macro}{\fiveunithi}
+% % \begin{macro}{\@fiveunithi}
+% % \begin{macrocode}
+% \def\fiveunithi{\@ifnextchar[{\@fiveunithi}{\@fiveunithi[r]}}%
+% \def\@fiveunithi[#1]#2#3#4{%
+% \iniatom\iniflag%initialize
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% % % treatment of atom list %
+% % %%%%%%%%%%%%%%%%%%%%%%%%%%
+% %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
+% \@forsemicol\member:=#2\do{%
+% \expandafter\@m@mb@r\member;\relax%
+% \expandafter\twoch@r\@membera{}%
+% \ifcase\@tmpa%
+% \or \xdef\aaa{\@memberb}%
+% \or \xdef\bbb{\@memberb}%
+% \or \xdef\ccc{\@memberb}%
+% \or \xdef\eee{\@memberb}%
+% \or \xdef\fff{\@memberb}%
+% \fi}%
+% \begin{picture}(800,880)(-240,-400)%
+% \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
+% \put(-\noshift,-\noshift){\circle{50}}%
+% \typeout{command `fiveunithi' origin: %
+% (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%
+% % % outer skeleton %
+% % %%%%%%%%%%%%%%%%%%
+% % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
+% {\resetbdsw%
+% \@tfor\memBer:=#4\do{%
+% \if\memBer a\relax\gdef\@aaa{}\fi%
+% \if\memBer b\relax\gdef\@bbb{}\fi%
+% \if\memBer c\relax\gdef\@ccc{}\fi%
+% \if\memBer d\relax\gdef\@ddd{}\fi%
+% \if\memBer e\relax\gdef\@eee{}\fi%
+% %\if\memBer f\relax\gdef\@fff{}\fi%
+% }%
+% \if\@aaa a\relax\hskbonda\fi% bond between 1 and 2
+% \if\@bbb b\relax\hskbondb\fi% bond between 2 and 3
+% \if\@ccc c\relax\hskbondverti\fi% bond between 3 and 4
+% \if\@ddd d\relax\hskbonde\fi% bond between 4 and 5
+% \if\@eee e\relax\hskbondf\fi% bond between 5 and 6
+% %\if\@fff f\relax\hskbondf\fi% bond between 6 and 1
+% }%
+% % old
+% %\ifx#4a\relax\else%
+% % \hskbonda%bond between 1 and 2
+% %\fi%
+% %\ifx#4e\relax\else%
+% % \hskbondf%bond between 1 and 5
+% %\fi%
+% %\ifx#4b\relax\else%
+% % \hskbondb%bond between 2 to 3
+% %\fi%
+% %\ifx#4d\relax\else%
+% % \hskbonde%bond between 5 and 4
+% %\fi%
+% %\ifx#4c\relax\else%
+% % \hskbondverti%bond between 4 and 3
+% %\fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%
+% % % inner double bond %
+% % %%%%%%%%%%%%%%%%%%%%%
+% \@tfor\member:=#1\do{%
+% \if\member r%
+% \else \if\member a\relax%
+% \ifx#4a\relax\else%
+% \hbonda%
+% \fi%
+% \else \if\member b\relax%
+% \ifx#4b\relax\else%
+% \hbondb%
+% \fi%
+% \else \if\member c\relax%
+% \ifx#4c\relax\else%
+% \hbondverti%
+% \fi%
+% \else \if\member d\relax%
+% \ifx#4d\relax\else%
+% \hbonde%
+% \fi%
+% \else \if\member e\relax%
+% \ifx#4e\relax\else%
+% \hbondf%
+% \fi%
+% \else \if\member A%left aromatic circle
+% \put(173,0){\circle{180}}% %circle
+% \else \expandafter\twoch@@r\member{}{}% %plus or minus charges
+% \if\@@tmpa 1\relax%
+% \putratom{-38}{282}{\@@tmpb}% % right type
+% \else\if\@@tmpa 2\relax%
+% \putratom{60}{233}{\@@tmpb}% % right type
+% \else\if\@@tmpa 3\relax%
+% \putratom{60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 4\relax%
+% \putratom{-60}{120}{\@@tmpb}% % right type
+% \else\if\@@tmpa 5\relax%
+% \putratom{-60}{233}{\@@tmpb}% % right type
+% \else\if\@@tmpa 0\relax%
+% \putratom{140}{-30}{\@@tmpb}% % right type
+% \fi\fi\fi\fi\fi\fi%
+% \fi\fi\fi\fi\fi\fi\fi}%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% % % setting heteroatoms %
+% % %%%%%%%%%%%%%%%%%%%%%%%
+% \ifx\aaa\empty\else%
+% \@acliptrue%
+% \putlatom{60}{-36}{\aaa}% % left type
+% \fi%
+% \ifx\bbb\empty\else%
+% \@bcliptrue%
+% \putlatom{135}{141}{\bbb}% % left type
+% \fi%
+% \ifx\ccc\empty\else%
+% \@ccliptrue%
+% \putratom{273}{141}{\ccc}% % right type
+% \fi%
+% \ifx\fff\empty\else%
+% \@fcliptrue%
+% \putlatom{135}{-211}{\fff}% % left type
+% \fi%
+% \ifx\eee\empty\else%
+% \@ecliptrue%
+% \putratom{273}{-211}{\eee}% % right type
+% \fi%
+% % \end{macrocode}
+% %
+% % \begin{macrocode}
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% % % setting substituents %
+% % %%%%%%%%%%%%%%%%%%%%%%%%
+% \setsixringh{#3}{0}{0}{4}{0}% % for 1 to 3
+% \setsixringh{#3}{1}{4}{7}{0}% % for 4 to 5
+% \end{picture}\iniatom\iniflag}% %end of \fiveunithi macro
+% % \end{macrocode}
+% % \end{macro}
+% \end{verbatim}
+%
+% \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}
+%
+% \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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(580,700)(-200,-240)%
+ \iforigpt \put(-200,-240){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `threeheteroh' origin: %
+ (0,0) ---> (200,240)}\fi%
+\fi
+% \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(0,0){\set@skel@bond{#1}{a}{c}}%
+ % bond between 1 and 2 \@aaa -> \skbondc etc
+\put(171,-103){\set@skel@bond{#1}{b}{e}}%
+ % bond between 2 and 3 \@bbb -> \skbonde etc
+\put(0,-200){\set@skel@bond{#1}{c}{a}}%
+ % bond between 3 and 1 \@ccc -> \skbonda etc
+}%
+%
+% \put(0,0){\skbondc}% bond between 1 and 2
+% \put(0,-200){\skbonda}% bond between 1 and 3
+% \put(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(0,0){\bondc}%
+\else\if\member b\relax\put(171,-103){\bonde}%
+\else\if\member c\relax\put(0,-200){\bonda}%
+\else\if\member A\relax% aromatic circle
+ \put(70,103){\circle{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(-235,103){\set@hetatom@sixh{#3}{3}{3}{5}{0}%
+\put(-215,103){\set@hetatom@sixh{#3}{3}{3}{5}{0}%
+\if@clip \global\@cliptrue\fi}%subst 1 <--six h 4
+\put(-103,29){\set@hetatom@sixh{#3}{-1}{1}{3}{0}%
+\if@bclip \global\@bcliptrue\fi}%subst 3 <--six h 2
+\put(-103,171){\set@hetatom@sixh{#3}{4}{5}{7}{0}%
+\if@fclip \global\@fcliptrue\fi}%subst 2 <--six h 6
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-235,103){\setsixringh{#4}{3}{3}{5}{0}}%subst 1
+\put(-103,29){\setsixringh{#4}{-1}{1}{3}{0}}%subst 3
+\put(-103,171){\setsixringh{#4}{4}{5}{7}{0}}%subst 2
+\end{picture}%
+\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}} +% \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%
+}% end of the macro \set@fusion@threeh
+% \end{macrocode}
+% \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}
+%
+% \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
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(580,700)(-400,-240)%
+ \iforigpt \put(-400,-240){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `threeheterohi' origin: %
+ (0,0) ---> (400,240)}\fi%
+\fi
+% \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(0,0){\set@skel@bond{#1}{a}{d}}%
+ % bond between 1 and 2 \@aaa -> \skbondd etc
+\put(-171,-103){\set@skel@bond{#1}{b}{b}}%
+ % bond between 2 and 3 \@bbb -> \skbondb etc
+\put(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(0,0){\bondd}%
+\else\if\member b\relax\put(-171,-103){\bondb}%
+\else\if\member c\relax\put(0,-200){\bondf}%
+\else\if\member A\relax% aromatic circle
+ \put(70,103){\circle{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(-171,103){\set@hetatom@sixh{#3}{0}{0}{2}{0}%
+\if@aclip \global\@acliptrue\fi}%subst 1 <--six h 1
+\put(-303,29){\set@hetatom@sixh{#3}{0}{2}{4}{0}%
+\if@cclip \global\@ccliptrue\fi}%subst 3 <--six h 3
+\put(-303,171){\set@hetatom@sixh{#3}{3}{4}{6}{0}%
+\if@eclip \global\@ecliptrue\fi}%subst 2 <--six h 5
+% \end{macrocode}
+%
+% \begin{macrocode}
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\put(-171,103){\setsixringh{#4}{0}{0}{2}{0}}%subst 1
+\put(-303,29){\setsixringh{#4}{0}{2}{4}{0}}%subst 3
+\put(-303,171){\setsixringh{#4}{3}{4}{6}{0}}%subst 2
+\end{picture}%
+\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}} +% \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%
+}% end of the macro \set@fusion@threehi
+%</hetaromh>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/hetaromh.ins b/Master/texmf-dist/source/latex/xymtex/hetaromh.ins new file mode 100644 index 00000000000..c3e9cb59d1b --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/hetaromh.ins @@ -0,0 +1,51 @@ +\def\batchfile{hetaromh.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996,1998,2000 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1996 (private version)
+Version 2.00 Released on December 25, 1998
+Version 2.00a Released on November 11, 2000
+
+Copyright (C) 1996, 1998, 2000 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{hetaromh.drv}{t}{%
+ \from{hetaromh.dtx}{driver}}
+
+\generateFile{hetaromh.sty}{t}{%
+ \from{hetaromh.dtx}{hetaromh}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/locant.drv b/Master/texmf-dist/source/latex/xymtex/locant.drv new file mode 100644 index 00000000000..b64fb464d38 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/locant.drv @@ -0,0 +1,78 @@ +%% +%% This is file `locant.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% locant.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Released on August 16, 1996 +%% +%% Copyright (C) 1996 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: locant.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{locant.dtx}[1996/08/16 v1.01 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{locant.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Setting locant numbers by {\sffamily locant.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Ashigara Research Laboratories, +Fuji Photo Film Co., Ltd., \\ +Minami-Ashigara, Kanagawa, 250-01 Japan} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{locant.dtx} +\end{document} +\endinput +%% +%% End of file `locant.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/locant.dtx b/Master/texmf-dist/source/latex/xymtex/locant.dtx new file mode 100644 index 00000000000..1b9170f7d94 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/locant.dtx @@ -0,0 +1,240 @@ +% \iffalse meta-comment +%% File: locant.dtx +% +% Copyright 1993,1996 by Shinsaku Fujita +% +% This file is part of XyMTeX system. +% ------------------------------------- +% +% This file is a successor to: +% +% locant.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]. +% +% Copying of this file is authorized only if either +% (1) you make absolutely no changes to your copy, including name and +% directory name; or +% (2) if you do make changes, +% (a) you name it something other than the names included in the +% ``xymtex'' directory and +% (b) you are requested to leave this notice intact. +% This restriction ensures that all standard styles are identical. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., +% Minami-Ashigara, Kanagawa-ken, 250-01, Japan. +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\def\j@urnalname{locant} +%\def\versi@ndate{December 01, 1993} +%\def\versi@nno{ver1.00} +%\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \fi +% +% \CheckSum{88} +%% \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} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{locant.dtx}[1996/08/16 v1.01 XyMTeX{} package file] +% \iffalse +\documentclass{ltxdoc} +\GetFileInfo{locant.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{Setting locant numbers by {\sffamily locant.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Ashigara Research Laboratories, +Fuji Photo Film Co., Ltd., \\ +Minami-Ashigara, Kanagawa, 250-01 Japan} +\date{\filedate} +% +\begin{document} + \maketitle + \DocInput{locant.dtx} +\end{document} +%</driver> +% \fi +% +% \section{Introduction}\label{locant:intro} +% +% \subsection{Options for {\sffamily docstrip}} +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% \emph{option} & \emph{function}\\ \hline +% locant & locant.sty \\ +% driver & driver for this dtx file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsection{Version Information} +% +% \begin{macrocode} +%<*locant> +\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.01} +\typeout{ -- Released August 16, 1996 by Shinsaku Fujita} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\j@urnalname{locant} +\def\versi@ndate{August 16, 1996} +\def\versi@nno{ver1.01} +\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +% \end{macrocode} +% +% \section{Macros for designating locant numbers} +% \subsection{Bond indicators for vertical formulas} +% +% \begin{macro}{\dbloocant} +% \begin{macro}{\dblocant} +% The macro |\dbloocant| is used to designate six edges (inner double bonds) +% of a six-membered ring. Any character can be asigned to the respective +% bond. +% The macro |\dblocant| provides a fixed set of aliphabetical charactors +% on the six edges. +% \begin{macrocode} +\def\bdloocant#1#2#3#4#5#6{% +\begin{picture}(800,880)(-\shiftii,-\shifti) +\putratom{90}{360}{#1}% +\putratom{200}{180}{#2}% +\putratom{90}{-20}{#3}% +\putlatom{-90}{360}{#6}% +\putlatom{-200}{180}{#5}% +\putlatom{-90}{-20}{#4}% +\end{picture}}% +\def\bdlocant{\bdloocant{a}{b}{c}{d}{e}{f}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\sxloocant} +% \begin{macro}{\sxlocant} +% The macro |\sxloocant| is used to designate six vertices +% of a six-membered ring. Any character can be asigned to the respective +% bond. +% The macro |\sxlocant| provides a fixed set of arabic numerals +% on the six edges. +% \begin{macrocode} +\def\sxloocant#1#2#3#4#5#6{% +\begin{picture}(800,880)(-\shiftii,-\shifti)% +\putratom{-10}{340}{\scriptsize #1}% +\putlatom{150}{260}{\scriptsize #2}% +\putlatom{150}{110}{\scriptsize #3}% +\putratom{-10}{40}{\scriptsize #4}% +\putratom{-150}{110}{\scriptsize #5}% +\putratom{-150}{260}{\scriptsize #6}% +\end{picture}}% +\def\sxlocant{\sxloocant{1}{2}{3}{4}{5}{6}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Bond indicators for vertical formulas} +% +% \begin{macro}{\dbloocanth} +% \begin{macro}{\dblocanth} +% The macro |\dbloocanth| is used to designate six edges (inner double bonds) +% of a horizontal six-membered ring. +% Any character can be asigned to the respective bond. +% The macro |\dblocanth| provides a fixed set of aliphabetical charactors +% on the six edges. +% \begin{macrocode} +\def\bdloocnth#1#2#3#4#5#6{% +\begin{picture}(880,800)(-\shifti,-\shiftii)% +\putlatom{10}{80}{#1}% +\putratom{180}{210}{#2}% +\putratom{380}{80}{#3}% +\putratom{380}{-120}{#4}% +\putratom{180}{-260}{#5}% +\putlatom{10}{-120}{#6}% +\end{picture}}% +\def\bdlocnth{\bdloocnth{a}{b}{c}{d}{e}{f}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\sxloocanth} +% \begin{macro}{\sxlocanth} +% The macro |\sxloocanth| is used to designate six vertices +% of a horizontal six-membered ring. +% Any character can be asigned to the respective bond. +% The macro |\sxlocanth| provides a fixed set of arabic numerals +% on the six edges. +% \begin{macrocode} +\def\sxloocnth#1#2#3#4#5#6{% +\begin{picture}(880,800)(-\shifti,-\shiftii)% +\putratom{40}{-20}{\scriptsize #1}% +\putratom{110}{100}{\scriptsize #2}% +\putlatom{290}{100}{\scriptsize #3}% +\putlatom{380}{-20}{\scriptsize #4}% +\putratom{110}{-140}{\scriptsize #6}% +\putlatom{290}{-140}{\scriptsize #5}% +\end{picture}}% +\def\sxlocnth{\sxloocnth{1}{2}{3}{4}{5}{6}} +%</locant> +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \Finale +% +\endinput +
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/locant.ins b/Master/texmf-dist/source/latex/xymtex/locant.ins new file mode 100644 index 00000000000..789de1ea609 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/locant.ins @@ -0,0 +1,48 @@ +\def\batchfile{locant.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Released on August 16, 1996
+
+Copyright (C) 1996 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{locant.drv}{t}{%
+ \from{locant.dtx}{driver}}
+
+\generateFile{locant.sty}{t}{%
+ \from{locant.dtx}{locant}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/lowcycle.drv b/Master/texmf-dist/source/latex/xymtex/lowcycle.drv new file mode 100644 index 00000000000..6a3c5f5fa1d --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/lowcycle.drv @@ -0,0 +1,81 @@ +%% +%% This is file `lowcycle.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lowcycle.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1996,1998 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.01 Released on August 16, 1996 +%% Version 1.02 Released on October 31, 1996 (private version) +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1996, 1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: lowcycle.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{lowcycle.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{lowcycle.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Lower carbocyclic compounds by {\sffamily lowcycle.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{lowcycle.dtx} +\end{document} +\endinput +%% +%% End of file `lowcycle.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/lowcycle.dtx b/Master/texmf-dist/source/latex/xymtex/lowcycle.dtx new file mode 100644 index 00000000000..11d142a18d1 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/lowcycle.dtx @@ -0,0 +1,854 @@ +% \iffalse meta-comment +%% File: lowcycle.dtx +% +% Copyright 1993,1996,1998 by Shinsaku Fujita +% +% This file is part of XyMTeX system. +% ------------------------------------- +% +% This file is a successor to: +% +% lowcycle.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]. +% +% Copying of this file is authorized only if either +% (1) you make absolutely no changes to your copy, including name and +% directory name; or +% (2) if you do make changes, +% (a) you name it something other than the names included in the +% ``xymtex'' directory and +% (b) you are requested to leave this notice intact. +% This restriction ensures that all standard styles are identical. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., +% Minami-Ashigara, Kanagawa-ken, 250-01, Japan. +% +% New address: +% Shinsaku Fujita, +% Department of Chemistry and Materials Technology, +% Kyoto Institute of Technology, \\ +% Matsugasaki, Sakyoku, Kyoto, 606 Japan +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{lowcycle} +% \def\versi@ndate{December 01, 1993} +% \def\versi@nno{ver1.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{lowcycle} +% \def\versi@ndate{August 16, 1996} +% \def\versi@nno{ver1.01} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{lowcycle} +% \def\versi@ndate{October 31, 1998} +% \def\versi@nno{ver1.02} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \fi +% +% \CheckSum{175} +%% \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} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{lowcycle.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +% \iffalse +\documentclass{ltxdoc} +\GetFileInfo{lowcycle.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{Lower carbocyclic compounds by {\sffamily lowcycle.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +% % (old address) +% % Ashigara Research Laboratories, +% % Fuji Photo Film Co., Ltd., \\ +% % Minami-Ashigara, Kanagawa, 250-01 Japan +} +\date{\filedate} +% +\begin{document} + \maketitle + \DocInput{lowcycle.dtx} +\end{document} +%</driver> +% \fi +% +% \section{Introduction}\label{lowcycle:intro} +% +% \subsection{Options for {\sffamily docstrip}} +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% \emph{option} & \emph{function}\\ \hline +% lowcycle & lowcycle.sty \\ +% driver & driver for this dtx file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsection{Version Information} +% +% \begin{macrocode} +%<*lowcycle> +\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00} +\typeout{ -- Released December 25, 1998 by Shinsaku Fujita} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\j@urnalname{lowcycle} +\def\versi@ndate{December 25, 1998} +\def\versi@nno{ver2.00} +\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +% \end{macrocode} +% +% \section{List of commands for lowcycle.sty} +% +% \begin{verbatim} +% ********************************** +% * lowcycle.sty: list of commands * +% ********************************** +% +% \cyclopentanev \@cyclopentanev +% \cyclopentanevi \@cyclopentanevi +% \cyclopentaneh \@cyclopentaneh +% \cyclopentanehi \@cyclopentanehi +% +% \cyclobutane \@cyclobutane +% +% \cyclopropane \@cyclopropane +% \cyclopropanei \@cyclopropanei +% \cyclopropaneh \@cyclopropaneh +% \cyclopropanehi \@cyclopropanehi +% +% \indanev \@indanev +% \indanevi \@indanevi +% \indaneh \@indaneh +% \indanehi \@indanehi +% \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 lowcycle.sty} for the present case). Hence, the combination +% of |\input| and |\@ifundefined| is used to crossload sty +% files ({\sf chemstr.sty} etc. 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{threehetero}{\input hetarom.sty\relax}{} +\@ifundefined{sixheteroh}{\input hetaromh.sty\relax}{} +\unitlength=0.1pt +% \end{macrocode} +% +% \section{Cyclopentane derivatives} +% \subsection{Vertical type} +% +% The macros |\cyclopentanev| and |\cyclopentanevi| have an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% The macro |\cyclopentanev| draws a five-membered ring with a +% flat top bond, while the macro |\cyclopentanevi| draws an +% inverse ring with a flat bottom bond. +% \begin{verbatim} +% ****************************** +% * cyclopentane derivatives * +% * (vertical type & inverse) * +% ****************************** +% +% \cyclopentanev[BONDLIST]{SUBSLIST} +% \cyclopentanevi[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters 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$--$5$) is used for designating a plus charge on +% the $n$-carbon. +% The option `$0+$'is used for designating a plus charge at the center +% of the five-membered ring. +% \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-carbon atom (n = 1 to 5) +% {0+} : plus at the center +% \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 +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \cyclopentanev{1==H;2==F} +% \cyclopentanev[]{1==H;2==F} +% \cyclopentanev[H]{1==H;2==F} +% \end{verbatim} +% +% \begin{macro}{\cyclopentanev} +% \begin{macro}{\cyclopentanevi} +% \begin{macrocode} +\def\cyclopentanev{\@ifnextchar[{\@cyclopentanev[@}{\@cyclopentanev[]}} +\def\@cyclopentanev[#1]#2{% +\iforigpt \typeout{command `cyclopentanev' % + is based on `fiveheterov'.}\fi% +\fiveheterov[#1]{}{#2}} +% \end{macrocode} +% +% \begin{macrocode} +\def\cyclopentanevi{\@ifnextchar[{\@cyclopentanevi[@}{\@cyclopentanevi[]}} +\def\@cyclopentanevi[#1]#2{% +\iforigpt \typeout{command `cyclopentanevi' % + is based on `fiveheterovi'.}\fi% +\fiveheterovi[#1]{}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Horizontal type} +% +% The macros |\cyclopentaneh| and |\cyclopentanehi| have an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% The macro |\cyclopentaneh| draws a five-membered ring with a +% vertical left bond, while the macro |\cyclopentanehi| draws an +% inverse ring with a vertical right bond. +% \begin{verbatim} +% ******************************** +% * cyclopentane derivatives * +% * (horizontal type & inverse) * +% ******************************** +% +% \cyclopentaneh[BONDLIST]{SUBSLIST} +% \cyclopentanehi[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters 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$--$5$) is used for designating a plus charge on +% the $n$-carbon. +% The option `$0+$'is used for designating a plus charge at the center +% of the five-membered ring. +% \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-carbon atom (n = 1 to 5) +% {0+} : plus at the center +% \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 +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% +% e.g. +% +% \cyclopentaneh{1==H;2==F} +% \cyclopentanehi[]{1==H;2==F} +% \cyclopentanehi[H]{1==H;2==F} +% +% \end{verbatim} +% +% \begin{macro}{\cyclopentaneh} +% \begin{macro}{\cyclopentanehi} +% \begin{macrocode} +\def\cyclopentaneh{\@ifnextchar[{\@cyclopentaneh[@}{\@cyclopentaneh[]}} +\def\@cyclopentaneh[#1]#2{% +\iforigpt \typeout{command `cyclophentaneh' % + is based on `fiveheteroh'.}\fi% +\fiveheteroh[#1]{}{#2}} +% \end{macrocode} +% +% \begin{macrocode} +\def\cyclopentanehi{% + \@ifnextchar[{\@cyclopentanehi[@}{\@cyclopentanehi[]}} +\def\@cyclopentanehi[#1]#2{% +\iforigpt \typeout{command `cyclopentanehi' % + is based on `fiveheterohi'.}\fi% +\fiveheterohi[#1]{}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \section{Indan derivatives} +% \subsection{Vertical type} +% +% The macros |\indanev| and |\indanevi| have an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% The macro |\indanev| draws a five-membered ring with a +% flat top bond, while the macro |\indanevi| draws an +% inverse ring with a flat bottom bond. +% \begin{verbatim} +% *********************************************************** +% * indane derivatives (fused six- and five-membered rings) * +% * (vertical type & inverse) * +% *********************************************************** +% +% \indanev[BONDLIST]{SUBSLIST} +% \indanevi[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters selected from a to j, each of which indicates the presence of +% an inner (endcyclic) double bond on the corresponding position. +% The option `A' typesets a six-membered ring with an aromatic circle. +% The option `$n+$' ($n=1$--$7$) is used for designating a plus charge on +% the $n$-carbon. +% \begin{verbatim} +% +% BONDLIST: list of bonds +% +% none or r : aromatic six-membered ring +% H or [] : 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 +% A : aromatic circle +% {n+} : plus at the n-nitrogen atom (n = 1 to 7) +% \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 7 substitution positions) +% +% 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 +% +% 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. +% +% \indanev{1==Cl;2==F} +% \indanev[c]{1==Cl;4==F;2==CH$_{3}$} +% \indanev[eb]{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl} +% +% \end{verbatim} +% +% \begin{macro}{\indanev} +% \begin{macro}{\indanevi} +% \begin{macrocode} +\def\indanev{\@ifnextchar[{\@indanev[@}{\@indanev[rb]}} +\def\@indanev[#1]#2{% +\iforigpt \typeout{command `indanev' % + is based on `nonaheterov'.}\fi% +\nonaheterov[#1]{}{#2}} +% \end{macrocode} +% +% \begin{macrocode} +\def\indanevi{\@ifnextchar[{\@indanevi[@}{\@indanevi[rb]}} +\def\@indanevi[#1]#2{% +\iforigpt \typeout{command `indanevi' % + is based on `nonaheterovi'.}\fi% +\nonaheterovi[#1]{}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Horizontal type} +% +% The macros |\indaneh| and |\indanehi| have an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% The macro |\indaneh| draws a five-membered ring with a +% vertical left bond, while the macro |\indanehi| draws an +% inverse ring with a vertical right bond. +% \begin{verbatim} +% *********************************************************** +% * indane derivatives (fused six- and five-membered rings) * +% * (horizontal type & inverse) * +% *********************************************************** +% +% \indaneh[BONDLIST]{SUBSLIST} +% \indanehi[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters selected from a to j, each of which indicates the presence of +% an inner (endcyclic) double bond on the corresponding position. +% The option `A' typesets a six-membered ring with an aromatic circle. +% The option `$n+$' ($n=1$--$7$) is used for designating a plus charge on +% the $n$-carbon. +% \begin{verbatim} +% +% BONDLIST: list of bonds +% +% none or r : aromatic six-membered ring +% H or [] : 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 +% A : aromatic circle +% {n+} : plus at the n-nitrogen atom (n = 1 to 7) +% \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 +% +% 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. +% +% \indaneh{1==Cl;2==F} +% \indaneh[c]{1==Cl;4==F;2==CH$_{3}$} +% \indaneh[eb]{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl} +% \end{verbatim} +% +% \begin{macro}{\indaneh} +% \begin{macro}{\indanehi} +% \begin{macrocode} +\def\indaneh{\@ifnextchar[{\@indaneh[@}{\@indaneh[rb]}} +\def\@indaneh[#1]#2{% +\iforigpt \typeout{command `indaneh' % + is based on `nonaheteroh'.}\fi% +\nonaheteroh[#1]{}{#2}} +\def\indanehi{\@ifnextchar[{\@indanehi[@}{\@indanehi[rb]}} +\def\@indanehi[#1]#2{% +\iforigpt \typeout{command `indanehi' % + is based on `nonaheterohi'.}\fi% +\nonaheterohi[#1]{}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \section{Cyclobutane derivatives} +% +% The macros |\cyclobutane| has an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% This macro is based on the \verb/\fourhetero/ command for drawing +% four-membered heterocycles. +% \begin{verbatim} +% *************************** +% * cyclobutane derivatives * +% *************************** +% The following numbering is adopted in this macro. +% +% c +% 4 _____ 3 +% d | | b +% | | +% 1 ----- 2<===== the original point +% a +% +% \cyclobutane[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters 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$--$4$) is used for designating a plus charge on +% the $n$-carbon. +% \begin{verbatim} +% +% BONDLIST: list of inner double bonds +% +% a : 1,2-double bond +% b : 2,3-double bond +% c : 4,3-double bond +% e : 4,1-double bond +% +% {n+} : plus at the n-nitrogen atom (n = 1 to 4) +% \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 5 substitution positions) +% +% for n = 1 to 4 +% +% nD : exocyclic double bond at n-atom +% n or nS : exocyclic single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% nSA : alpha single bond at n-atom (boldface) +% nSB : beta single bond at n-atom (dotted line) +% nSa : alpha (not specified) single bond at n-atom +% nSb : beta (not specified) single bond at n-atom +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% e.g. +% +% \cyclobutane{1==H;2==F} +% \cyclobutane[c]{1==Cl;4==F;2==CH$_{3}$} +% \cyclobutane[eb]{1D==O;4SA==MeO;4SB==OMe} +% \end{verbatim} +% +% \begin{macro}{\cyclobutane} +% \begin{macrocode} +\def\cyclobutane{\@ifnextchar[{\@cyclobutane[@}{\@cyclobutane[]}} +\def\@cyclobutane[#1]#2{% +\iforigpt \typeout{command `cyclobutane' % + is based on `fourhetero'.}\fi% +\fourhetero[#1]{}{#2}} +% \end{macrocode} +% \end{macro} +% +% \section{Cyclopropane derivatives} +% +% The macros |\cyclopropane| has an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% This macro is based on the \verb/\threehetero/ command for drawing +% three-membered heterocycles. +% \begin{verbatim} +% **************************** +% * cyclopropane derivatives * +% * (vertical type) * +% **************************** +% The following numbering is adopted in this macro. +% +% b +% 3--------2 +% c ` / a +% `1/ <===== the original point +% +% +% \cyclopropane[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters selected from a to c, each of which indicates the presence of +% an inner (endcyclic) double bond on the corresponding position. +% The option `A' is used for designating an aromatic character with a +% circle. +% The option `$n+$' ($n=1$--$3$) is used for designating a plus charge on +% the $n$-carbon, while +% the case $n=4$--$6$) indicates a plus charge outside the ring. +% The option `0+' draws a plus symbol 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 |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 3 substitution positions) +% +% 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 +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% +% e.g. +% +% \cyclopropane{1==N}{1==Cl;2==F} +% +% \end{verbatim} +% +% \begin{macro}{\cyclopropane} +% \begin{macro}{\cyclopropanev} +% \begin{macrocode} +\def\cyclopropane{\@ifnextchar[{\@cyclopropane[@}{\@cyclopropane[]}} +\def\@cyclopropane[#1]#2{% +\iforigpt \typeout{command `cyclopropane' % + is based on `threehetero'.}\fi% +\threehetero[#1]{}{#2}} +\let\cyclopropanev=\cyclopropane +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macros |\cyclopropanei| has an +% argument |SUBSLIST| as well as an optional argument |BONDLIST|. +% This macro is based on the \verb/\threehetero/ command for drawing +% three-membered heterocycles. +% \begin{verbatim} +% **************************** +% * cyclopropane derivatives * +% * (inverse vertical type) * +% **************************** +% The following numbering is adopted in this macro. +% +% /1` <===== the original point +% c / ` a +% 3--------2 +% b +% +% \cyclopropanei[BONDLIST]{SUBSLIST} +% \end{verbatim} +% +% The |BONDLIST| argument contains one or more +% characters selected from a to c, each of which indicates the presence of +% an inner (endcyclic) double bond on the corresponding position. +% The option `A' is used for designating an aromatic character with a +% circle. +% The option `$n+$' ($n=1$--$3$) is used for designating a plus charge on +% the $n$-carbon, while +% the case $n=4$--$6$) indicates a plus charge outside the ring. +% The option `0+' draws a plus symbol 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 |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 3 substitution positions) +% +% 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 +% \end{verbatim} +% +% Several examples are shown as follows. +% \begin{verbatim} +% +% e.g. +% +% \cyclopropanei{1==N}{1==Cl;2==F} +% +% \end{verbatim} +% \changes{v1.02}{1998/10/20}{Newly added command} +% +% \begin{macro}{\cyclopropanei} +% \begin{macro}{\cyclopropenevi} +% \begin{macrocode} +\def\cyclopropanei{\@ifnextchar[{\@cyclopropanei[@}{\@cyclopropanei[]}} +\def\@cyclopropanei[#1]#2{% +\iforigpt \typeout{command `cyclopropanei' % + is based on `threeheteroi'.}\fi% +\threeheteroi[#1]{}{#2}} +\let\cyclopropanevi=\cyclopropanei +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\cyclopropaneh} +% \begin{macrocode} +\def\cyclopropaneh{\@ifnextchar[{\@cyclopropaneh[@}{\@cyclopropaneh[]}} +\def\@cyclopropaneh[#1]#2{% +\iforigpt \typeout{command `cyclopropaneh' % + is based on `threeheteroh'.}\fi% +\threeheteroh[#1]{}{#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cyclopropanehi} +% \begin{macrocode} +\def\cyclopropanehi{\@ifnextchar[{\@cyclopropanehi[@}{\@cyclopropanehi[]}} +\def\@cyclopropanehi[#1]#2{% +\iforigpt \typeout{command `cyclopropanehi' % + is based on `threeheterohi'.}\fi% +\threeheterohi[#1]{}{#2}} +%</lowcycle> +% \end{macrocode} +% \end{macro} +% +% \Finale +% +\endinput +
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/lowcycle.ins b/Master/texmf-dist/source/latex/xymtex/lowcycle.ins new file mode 100644 index 00000000000..eb4ac5abb4c --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/lowcycle.ins @@ -0,0 +1,50 @@ +\def\batchfile{lowcycle.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996,1998 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1996 (private version)
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1996, 1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{lowcycle.drv}{t}{%
+ \from{lowcycle.dtx}{driver}}
+
+\generateFile{lowcycle.sty}{t}{%
+ \from{lowcycle.dtx}{lowcycle}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/methylen.drv b/Master/texmf-dist/source/latex/xymtex/methylen.drv new file mode 100644 index 00000000000..036f42c10d7 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/methylen.drv @@ -0,0 +1,80 @@ +%% +%% This is file `methylen.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% methylen.dtx (with options: `driver') +%% +%% This is a generated file. +%% +%% Copyright 1998 by Shinsaku Fujita +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% +%% Version 1.02 Released on October 31, 1996 (private version) +%% Version 2.00 Released on December 25, 1998 +%% +%% Copyright (C) 1998 by Shinsaku Fujita, all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Copying of this file is authorized only if either +%% +%% (1) you make absolutely no changes to your copy, including name and +%% directory name +%% (2) if you do make changes, +%% (a) you name it something other than the names included in the +%% ``xymtex'' directory and +%% (b) you acknowledge the original name. +%% This restriction ensures that all standard styles are identical. +%% +%% ======================================= +%% +%% This file contains several codes modified from latex.tex (LaTeX2.09) +%% and from latex.ltx (a LaTeX2e), the reused parts of which are subject to +%% Copyright 1994 the LaTeX3 project and the individual authors (For further +%% copyright information see the file legal.txt of the LaTeX2e standard +%% distribution, and any other copyright indicated in this file.) +%% +%% File: methylen.dtx +%% \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 \~} +\NeedsTeXFormat{pLaTeX2e} +\ProvidesFile{methylen.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +\documentclass{ltxdoc} +\GetFileInfo{methylen.dtx} +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +\title{Methylene Chains by {\sffamily methylen.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +} +\date{\filedate} +\begin{document} + \maketitle + \DocInput{methylen.dtx} +\end{document} +\endinput +%% +%% End of file `methylen.drv'. diff --git a/Master/texmf-dist/source/latex/xymtex/methylen.dtx b/Master/texmf-dist/source/latex/xymtex/methylen.dtx new file mode 100644 index 00000000000..7c10c684766 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/methylen.dtx @@ -0,0 +1,5689 @@ +% \iffalse meta-comment
+%% File: methylen.dtx
+%
+% Copyright 1998 by Shinsaku Fujita
+%
+% This file is part of XyMTeX system.
+% -------------------------------------
+%
+% 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].
+%
+% Copying of this file is authorized only if either
+% (1) you make absolutely no changes to your copy, including name and
+% directory name; or
+% (2) if you do make changes,
+% (a) you name it something other than the names included in the
+% ``xymtex'' directory and
+% (b) you are requested to leave this notice intact.
+% This restriction ensures that all standard styles are identical.
+%
+% Please report any bugs, comments, suggestions, etc. to:
+% Shinsaku Fujita,
+% Department of Chemistry and Materials Technology,
+% Kyoto Institute of Technology, \\
+% Matsugasaki, Sakyoku, Kyoto, 606 Japan
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \def\j@urnalname{methylen}
+% \def\versi@ndate{October 31, 1998}
+% \def\versi@nno{ver1.02}
+% \def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+%
+% \CheckSum{7043}
+%% \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.02}{1998/10/31}{first edition for LaTeX2e}
+% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e}
+% \fi
+%
+% \iffalse
+%<*driver>
+\NeedsTeXFormat{pLaTeX2e}
+% \fi
+\ProvidesFile{methylen.dtx}[1998/12/25 v2.00 XyMTeX{} package file]
+% \iffalse
+\documentclass{ltxdoc}
+\GetFileInfo{methylen.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{Methylene Chains by {\sffamily methylen.sty}
+(\fileversion) of \XyMTeX{}}
+\author{Shinsaku Fujita \\
+Department of Chemistry and Materials Technology, \\
+Kyoto Institute of Technology, \\
+Matsugasaki, Sakyoku, Kyoto, 606 Japan
+}
+\date{\filedate}
+%
+\begin{document}
+ \maketitle
+ \DocInput{methylen.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \section{Introduction}\label{methylen:intro}
+%
+% \subsection{Options for {\sffamily docstrip}}
+%
+% \DeleteShortVerb{\|}
+% \begin{center}
+% \begin{tabular}{|l|l|}
+% \hline
+% \emph{option} & \emph{function}\\ \hline
+% methylen & methylen.sty \\
+% driver & driver for this dtx file \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \MakeShortVerb{\|}
+%
+% \subsection{Version Information}
+%
+% \begin{macrocode}
+%<*methylen>
+\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00}
+\typeout{ -- Released December 25, 1998 by Shinsaku Fujita}
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\j@urnalname{methylen}
+\def\versi@ndate{December 25, 1998}
+\def\versi@nno{ver2.00}
+\def\copyrighth@lder{SF} % Shinsaku Fujita
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
+\space[\copyrighth@lder]}
+% \end{macrocode}
+%
+% \section{List of commands for methylen.sty}
+%
+% \begin{verbatim}
+% **********************************
+% * methylen.sty: list of commands *
+% **********************************
+%
+% <Switches for drawing substituents and bonds>
+%
+% \if@adoublebond \if@bdoublebond
+% \if@Adoublebond \if@adoublebond}
+% \reset@double
+% \if@linterchainsw \if@rinterchainsw}
+% \reset@interchainsw
+%
+% <Command for drawing substituents and bonds>
+%
+% \@methsubsta \@methsubstd \@methsubstdL
+% \SKbondA \SKbondB
+% \bondA \bondAA
+% \bondB \bondBB
+%
+% <Basic commands for typesetting aliphatic chains>
+%
+% \@@trimethylene
+% \@@dimethylene
+%
+% <Commands for adjusting substitution sites>
+%
+% \yltrimethyleneposition
+% \yldimethyleneposition
+%
+% <Commands for drawing aliphatic chains>
+%
+% \trimethylene
+% \dimethylene
+% \tetramethylene
+% \pentamethylene
+%
+% \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 polymers.sty} for the present case). Hence, the combination
+% of |\input| and |\@ifundefined| is used to crossload sty
+% files ({\sf chemstr.sty} etc. 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{Westbond}{\input aliphat.sty\relax}{}
+\@ifundefined{bzdrv}{\input carom.sty\relax}{}
+\@ifundefined{hbonde}{\input hetaromh.sty\relax}{}
+\unitlength=0.1pt
+% \end{macrocode}
+%
+% \section{Setting Substituents}
+%
+% Substitutions on each methylene of a polymethylene chain
+% is typeset by macros |\@methsubsta| etc.
+% The macro |\@methsubsta| is used to place substituents on an
+% upper-side methylene. A new bond modifier ``W'' is added to
+% typeset a terminal substituent.
+%
+% \begin{macro}{\@methsubsta}
+% \begin{macrocode}
+\newif\if@wrongbdWa \@wrongbdWafalse
+\newif\if@wrongbdWd \@wrongbdWdfalse
+\newif\if@wrongbdWaL \@wrongbdWaLfalse
+\newif\if@wrongbdWdL \@wrongbdWdLfalse
+\def\@methsubsta{%
+\if@aclip% %clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=-27\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(-18,436){\line(-3,5){60}}% % single bond at 1
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=-27\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(18,436){\line(3,5){60}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(18,436)(72,526)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=-27\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ \put(-18,436){\line(-3,5){60}}% % single bond at 1
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=-27\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \put(18,436){\line(3,5){60}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(-12,436){\line(0,1){110}}% % double bond at 1
+ \put(12,436){\line(0,1){110}}% % double bond at 1
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(0,436)(0,546)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=-10\relax
+ \yl@ydiff=46\relax
+ \if@wrongbdWa
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \putratom{150}{276}{\@memberb}% % left or right type
+ \put(40,382){\line(5,-3){100}}% % single bond at 1
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+\else% % no clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=-37\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,406){\line(-3,5){72}}% % single bond at 1
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=-37\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(3,5){72}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(0,406)(72,526)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=-37\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ \put(0,406){\line(-3,5){72}}% % single bond at 1
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=-37\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \put(0,406){\line(3,5){72}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(-12,406){\line(0,1){140}}% % double bond at 1
+ \put(12,406){\line(0,1){140}}% % double bond at 1
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(0,406)(0,546)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=-10\relax
+ \yl@ydiff=58\relax
+ \if@wrongbdWa
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \putratom{130}{276}{\@memberb}% % left or right type
+ \put(0,406){\line(5,-3){120}}% % single bond at 1
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\@methsubstd| is used to place substituents on a
+% down-side methylene. A new bond modifier ``W'' is added to
+% typeset a terminal substituent.
+%
+% \begin{macro}{\@methsubstd}
+% \begin{macrocode}
+\def\@methsubstd{%
+\if@clip %clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=100\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(-18,-30){\line(-3,-5){60}}% % single bond at 4
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=100\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(18,-30){\line(3,-5){60}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(18,-30)(72,-120)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=100\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ \put(-18,-30){\line(-3,-5){60}}% % single bond at 4
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=100\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \put(18,-30){\line(3,-5){60}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(-12,-30){\line(0,-1){110}}% % double bond at 4
+ \put(12,-30){\line(0,-1){110}}% % double bond at 4
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(0,-30)(0,-140)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=-10\relax
+ \yl@ydiff=30\relax
+ \putlratom{150}{54}{\@memberb}% % left or right type
+ \put(40,24){\line(5,3){100}}% % single bond at 4
+ \if@wrongbdWd
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \else% no clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=110\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,0){\line(-3,-5){72}}% % single bond at 4
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=110\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,-5){72}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(0,0)(72,-120)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=110\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ \put(0,0){\line(-3,-5){72}}% % single bond at 4
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=110\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \put(0,0){\line(3,-5){72}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(-12,0){\line(0,-1){140}}% % double bond at 4
+ \put(12,0){\line(0,-1){140}}% % double bond at 4
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(0,0)(0,-140)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=-10\relax
+ \yl@ydiff=30\relax
+ \putlratom{150}{54}{\@memberb}% % left or right type
+ \put(0,0){\line(5,3){140}}% % single bond at 4
+ \if@wrongbdWd
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\@methsubstdL| is used to place substituents on a
+% left-teminal down-side methylene. A new bond modifier ``W'' is
+% added to typeset a terminal substituent.
+%
+% \begin{macro}{\@methsubstdL}
+% \begin{macrocode}
+\def\@methsubstdL{%
+\if@clip %clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=100\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(-18,-30){\line(-3,-5){60}}% % single bond at 4
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=100\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(18,-30){\line(3,-5){60}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(18,-30)(72,-120)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=100\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ \put(-18,-30){\line(-3,-5){60}}% % single bond at 4
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=100\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \put(18,-30){\line(3,-5){60}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(-12,-30){\line(0,-1){110}}% % double bond at 4
+ \put(12,-30){\line(0,-1){110}}% % double bond at 4
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(0,-30)(0,-140)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=10\relax
+ \yl@ydiff=30\relax
+ \putlatom{-150}{54}{\@memberb}% % lefttype
+ \put(-40,24){\line(-5,3){100}}% % single bond at 4
+ \if@wrongbdWdL
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,-30){\line(0,-1){110}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \else% no clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=110\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,0){\line(-3,-5){72}}% % single bond at 4
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=110\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(3,-5){72}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(0,0)(72,-120)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=110\relax
+ \putlatom{-42}{-230}{\@memberb}% % left type
+ \put(0,0){\line(-3,-5){72}}% % single bond at 4
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=110\relax
+ \putratom{41}{-230}{\@memberb}% % right type
+ \put(0,0){\line(3,-5){72}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(-12,0){\line(0,-1){140}}% % double bond at 4
+ \put(12,0){\line(0,-1){140}}% % double bond at 4
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ }{{\thicklines%
+ \dottedline{20}(0,0)(0,-140)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=10\relax
+ \yl@ydiff=30\relax
+ \putlatom{-150}{54}{\@memberb}% % left type
+ \put(0,0){\line(-5,3){140}}% % single bond at 4
+ \if@wrongbdWdL
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=90\relax
+ \putlratom{-31}{-230}{\@memberb}% % left or right type
+ \put(0,0){\line(0,-1){140}}% % single bond at 4
+ \fi\fi\fi\fi\fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\@methsubstaL| is used to place substituents on a
+% left-teminal upper-side methylene. A new bond modifier ``W'' is
+% added to typeset a terminal substituent.
+%
+% \begin{macro}{\@methsubstaL}
+% \begin{macrocode}
+\def\@methsubstaL{%
+\if@aclip% %clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=-27\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(-18,436){\line(-3,5){60}}% % single bond at 1
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=-27\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(18,436){\line(3,5){60}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(18,436)(72,526)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-36\relax
+ \yl@ydiff=-27\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ \put(-18,436){\line(-3,5){60}}% % single bond at 1
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=37\relax
+ \yl@ydiff=-27\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \put(18,436){\line(3,5){60}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(-12,436){\line(0,1){110}}% % double bond at 1
+ \put(12,436){\line(0,1){110}}% % double bond at 1
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(0,436)(0,546)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=10\relax
+ \yl@ydiff=46\relax
+ \putlatom{-150}{276}{\@memberb}% % left type
+ \put(-40,382){\line(-5,-3){100}}% % single bond at 1
+ \if@wrongbdWaL
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(0,436){\line(0,1){110}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+\else% % no clipping
+ \if\@tmpb S%single bond
+ \ifx\@tmpc\empty%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \else\if\@tmpc B%(B) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=-37\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ {%
+ \thicklines%
+ \put(0,406){\line(-3,5){72}}% % single bond at 1
+ }%
+ \else\if\@tmpc A%(A) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=-37\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(3,5){72}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(0,406)(72,526)}}%
+ \else\if\@tmpc b%(b) beta
+ \yl@xdiff=-30\relax
+ \yl@ydiff=-37\relax
+ \putlatom{-42}{563}{\@memberb}% % left type
+ \put(0,406){\line(-3,5){72}}% % single bond at 1
+ \else\if\@tmpc a%(a) alpha
+ \yl@xdiff=31\relax
+ \yl@ydiff=-37\relax
+ \putratom{41}{563}{\@memberb}% % right type
+ \put(0,406){\line(3,5){72}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+ \else\if\@tmpb D%double bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(-12,406){\line(0,1){140}}% % double bond at 1
+ \put(12,406){\line(0,1){140}}% % double bond at 1
+ \else\if\@tmpb B%beta single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ {%
+ \thicklines%
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ }%
+ \else\if\@tmpb A%alpha single bond
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \@ifundefined{dottedline}{%
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ }{{\thicklines%
+ \dottedline{20}(0,406)(0,546)}}%
+ \else\if\@tmpb W%beta single bond
+ \yl@xdiff=10\relax
+ \yl@ydiff=58\relax
+ \putlatom{-130}{276}{\@memberb}% % left type
+ \put(0,406){\line(-5,-3){120}}% % single bond at 1
+ \if@wrongbdWaL
+ \XyMTeXWarning{Wrong Bond-Modifier (W)}%
+ \fi
+ \else%
+ \yl@xdiff=31\relax
+ \yl@ydiff=-17\relax
+ \putlratom{-31}{563}{\@memberb}% % left or right type
+ \put(0,406){\line(0,1){140}}% % single bond at 1
+ \fi\fi\fi\fi\fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Setting Bonds}
+% \subsection{Outer Skeletal Bonds}
+%
+% The macros |\SKbondB| and |\SKbondA| are used to typeset
+% outer skeletal bonds of a methylene chain (|\..methylene|)
+%
+% \begin{macro}{\SKbondB}
+% \begin{macrocode}
+\def\SKbondB{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \put(0,406){\line(5,-3){171}}% %bond 1-2
+ \else%
+ \put(0,406){\line(5,-3){136}}% %bond 1-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(35,385){\line(5,-3){136}}% %bond 1-2
+ \else%
+ \put(35,385){\line(5,-3){100}}% %bond 1-2
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SKbondA}
+% \begin{macrocode}
+\def\SKbondA{%
+ \ifx\bbb\empty%
+ \ifx\aaa\empty%
+ \put(0,406){\line(-5,-3){171}}% %bond 1-6
+ \else%
+ \put(0,406){\line(-5,-3){136}}% %bond 1-6
+ \fi%
+ \else%
+ \ifx\aaa\empty%
+ \put(-35,385){\line(-5,-3){136}}% %bond 1-6
+ \else%
+ \put(-35,385){\line(-5,-3){100}}% %bond 1-6
+ \fi%
+ \fi}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\SKbondBi| and |\SKbondAi| are used to typeset
+% outer skeletal bonds of a methylene chain (inverse type |\..methylenei|).
+%
+% \begin{macro}{\SKbondBi}
+% \begin{macrocode}
+\def\SKbondBi{%
+ \begin{picture}(0,0)(0,0)
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \put(0,0){\line(5,3){171}}% %bond 4-3
+ \else%
+ \put(0,0){\line(5,3){136}}% %bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(35,21){\line(5,3){138}}% %bond 4-3
+ \else%
+ \put(35,21){\line(5,3){100}}% %bond 4-3
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\SKbondAi}
+% \begin{macrocode}
+\def\SKbondAi{%
+ \begin{picture}(0,0)(0,0)
+ \ifx\bbb\empty%
+ \ifx\aaa\empty%
+ \put(0,0){\line(-5,3){171}}% %bond 4-5
+ \else%
+ \put(0,0){\line(-5,3){136}}% %bond 4-5
+ \fi%
+ \else%
+ \ifx\aaa\empty%
+ \put(-35,21){\line(-5,3){138}}% %bond 4-5
+ \else%
+ \put(-35,21){\line(-5,3){100}}% %bond 4-5
+ \fi%
+ \fi\end{picture}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inner Double Bonds}
+%
+% The macros |\bondB| is used to place a line of
+% a double bond in the (5,-3) direction at the lower side
+% of an outer skeletal bond.
+%
+% \begin{macro}{\bondB}
+% \begin{macrocode}
+\def\bondB{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \put(6,364){\line(5,-3){126}}% %double bond 1-2
+ \else%
+ \put(6,364){\line(5,-3){100}}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(35,340){\line(5,-3){100}}% %double bond 1-2
+ \else%
+ \put(35,352){\line(5,-3){100}}% %double bond 1-2
+ \fi% % line <1OO not available
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\bondBB| is used to place a line of
+% a double bond in the (5,-3) direction at the upper side
+% of an outer skeletal bond.
+%
+% \begin{macro}{\bondBB}
+% \begin{macrocode}
+\def\bondBB{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \put(42,420){\line(5,-3){126}}% %double bond 1-2
+ \else%
+ \put(42,420){\line(5,-3){100}}% %double bond 1-2
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(52,412){\line(5,-3){110}}% %double bond 1-2
+ \else%
+ \put(52,412){\line(5,-3){100}}% %double bond 1-2
+ \fi% % line <1OO not available
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\bondA| is used to place a line of
+% a double bond in the (-5,-3) direction at the lower
+% side of an outer skeletal bond.
+%
+% \begin{macro}{\bondA}
+% \begin{macrocode}
+\def\bondA{%
+ \ifx\bbb\empty%
+ \ifx\aaa\empty%
+ \put(-6,364){\line(-5,-3){126}}% %double bond 1-6
+ \else%
+ \put(-6,364){\line(-5,-3){100}}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\aaa\empty%
+ \put(-35,340){\line(-5,-3){100}}% %double bond 1-6
+ \else%
+ \put(-35,352){\line(-5,-3){100}}% %double bond 1-6
+ \fi% % line <1OO not available
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\bondAA| is used to place a line of
+% a double bond in the (-5,-3) direction at the upper side
+% of an outer skeletal bond.
+%
+% \begin{macro}{\bondAA}
+% \begin{macrocode}
+\def\bondAA{%
+ \ifx\bbb\empty%
+ \ifx\aaa\empty%
+ \put(-42,420){\line(-5,-3){126}}% %double bond 1-6
+ \else%
+ \put(-42,420){\line(-5,-3){100}}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\aaa\empty%
+ \put(-52,412){\line(-5,-3){100}}% %double bond 1-6
+ \else%
+ \put(-52,412){\line(-5,-3){100}}% %double bond 1-6
+ \fi% % line <1OO not available
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The bond-setting commands with sufix ``i'' are used in the definitions
+% of commands such as |\...methylenei|.
+%
+% The macros |\bondBi| is used to place a line of
+% a double bond in the (5,3) direction at the upper side
+% of an outer skeletal bond.
+%
+% \begin{macro}{\bondBi}
+% \begin{macrocode}
+ \def\bondBi{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+ \put(6,42){\line(5,3){126}} %double bond 4-3
+ \else%
+ \put(6,42){\line(5,3){100}} %double bond 4-3
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+ \put(35,66){\line(5,3){100}}% %double bond 4-3
+ \else%
+ \put(35,60){\line(5,3){100}}% %double bond 4-3
+ \fi% % line <1OO not available
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\bondBBi| is used to place a line of
+% a double bond in the (5,3) direction at the lower
+% side of an outer skeletal bond.
+%
+% \begin{macro}{\bondBBi}
+% \begin{macrocode}
+ \def\bondBBi{%
+ \ifx\bbb\empty%
+ \ifx\ccc\empty%
+% \put(6,42){\line(5,3){126}} %double bond 4-3
+ \put(42,-14){\line(5,3){126}}% %double bond 1-6
+ \else%
+% \put(6,42){\line(5,3){100}} %double bond 4-3
+% \put(42,-14){\line(5,3){100}}% %double bond 1-6
+ \put(30,-14){\line(5,3){100}}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\ccc\empty%
+% \put(35,66){\line(5,3){100}}% %double bond 4-3
+% \put(52,6){\line(5,3){100}}% %double bond 1-6
+ \put(52,0){\line(5,3){100}}% %double bond 1-6
+ \else%
+% \put(35,60){\line(5,3){100}}% %double bond 4-3
+ \put(52,0){\line(5,3){100}}% %double bond 4-5
+ \fi% % line <1OO not available
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\bondAi| is used to place a line of
+% a double bond in the (-5,3) direction at the upper
+% side of an outer skeletal bond.
+
+% \begin{macro}{\bondAi}
+% \begin{macrocode}
+ \def\bondAi{%
+ \ifx\bbb\empty%
+ \ifx\aaa\empty%
+ \put(-6,42){\line(-5,3){126}}% %double bond 4-5
+ \else%
+ \put(-6,42){\line(-5,3){100}}% %double bond 4-5
+ \fi%
+ \else%
+ \ifx\aaa\empty%
+ \put(-35,66){\line(-5,3){100}}% %double bond 4-5
+ \else%
+ \put(-35,60){\line(-5,3){100}}% %double bond 4-5
+ \fi% % line <1OO not available
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% The macros |\bondAAi| is used to place a line of
+% a double bond in the (-5,3) direction at the lower
+% side of an outer skeletal bond.
+%
+% \begin{macro}{\bondAAi}
+% \begin{macrocode}
+ \def\bondAAi{%
+ \ifx\bbb\empty%
+ \ifx\aaa\empty%
+% \put(-6,42){\line(-5,3){126}}% %double bond 4-5
+ \put(-42,-14){\line(-5,3){126}}% %double bond 1-6
+ \else%
+% \put(-6,42){\line(-5,3){100}}% %double bond 4-5
+ \put(-42,-14){\line(-5,3){100}}% %double bond 1-6
+ \fi%
+ \else%
+ \ifx\aaa\empty%
+% \put(-35,66){\line(-5,3){100}}% %double bond 4-5
+ \put(-52,6){\line(-5,3){100}}% %double bond 1-6
+ \else%
+% \put(-35,60){\line(-5,3){100}}% %double bond 4-5
+ \put(-52,0){\line(-5,3){100}}% %double bond 4-5
+ \fi% % line <1OO not available
+ \fi%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Switches}
+%
+% \begin{macro}{\if@adoublebond}
+% \begin{macro}{\if@bdoublebond}
+% \begin{macro}{\if@Adoublebond}
+% \begin{macro}{\if@adoublebond}
+% \begin{macro}{\reset@double}
+% \begin{macrocode}
+\newif\if@adoublebond \@adoublebondfalse
+\newif\if@bdoublebond \@bdoublebondfalse
+\newif\if@Adoublebond \@Adoublebondfalse
+\newif\if@Bdoublebond \@Bdoublebondfalse
+\def\reset@double{%
+\@adoublebondfalse\@bdoublebondfalse
+\@Adoublebondfalse\@Bdoublebondfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\if@linterchainsw}
+% \begin{macro}{\if@rinterchainsw}
+% \begin{macro}{\reset@interchainsw}
+% \begin{macrocode}
+\newif\if@linterchainsw \@linterchainswfalse
+\newif\if@rinterchainsw \@rinterchainswfalse
+\def\reset@interchainsw{\@linterchainswfalse\@rinterchainswfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \section{Trimethylene}
+% \subsection{Normal direction}
+%
+% A trimethylene (or propane) and its hetera analogs can be typeset
+% by the command |\trimethylene|, which is mainly based on
+% two inner commands: |\yltrimethyleneposition| for adjusting a
+% substitution site and |\@@trimethylene| for
+% placing hetero atoms, double bonds, and substituents.
+%
+% \begin{macro}{\@@trimethylene}
+% \begin{verbatim}
+% \@@trimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: positions bbb and ccc
+% 2: positions aaa and bbb
+%
+% bbb
+% 2
+% a / ` b
+% 1 3
+% aaa ccc
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}
+\def\@@trimethylene#1#2#3#4{%
+\leavevmode
+\iniatom\iniflag%initialize
+\test@vrtx@trimethy{#1}{#4}%
+%\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
+\begin{picture}(450,480)(0,0)
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+ \put(171,-303){\SKbondB}% bond between 1 and 2
+ \put(171,-303){\SKbondA}% bond between 1 and 6
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@adoublebond\relax\put(171,-303){\bondA}\fi
+\if@bdoublebond\relax\put(171,-303){\bondB}\fi
+\if@Adoublebond\relax\put(171,-303){\bondAA}\fi
+\if@Bdoublebond\relax\put(171,-303){\bondBB}\fi
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\test@termcnt=#3\relax
+%\set@hetatom@methyl{#1}{0}{0}{4}{0}%
+\set@hetatom@methyl{#1}{#4}{0}{4}{0}%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\else
+\ifcase\@tmpaa%0 omit
+\or
+ \ifcase#3
+ {\if@aclip \@cliptrue \else \@clipfalse\fi
+ \put(0,0){\@methsubstdL}}%
+ \or\relax
+ \or
+ {\if@aclip \@cliptrue \else \@clipfalse\fi
+ \put(0,0){\@methsubstdL}}%
+ \fi
+\or
+{\if@bclip \@acliptrue \else \@aclipfalse\fi
+ \put(171,-303){\@methsubsta}}
+\or
+ \ifcase#3
+ {\if@cclip \@cliptrue\else \@clipfalse\fi
+ \put(342,0){\@methsubstd}}%
+ \or
+ {\if@cclip \@cliptrue\else \@clipfalse\fi
+ \put(342,0){\@methsubstd}}%
+ \or\relax
+ \fi
+\fi%end of ifcase
+\fi\fi
+}%
+\end{picture}}% end of \@@trimethylene
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\test@vrtx@trimethy}
+% \changes{v2.00}{1998/12/21}{New command: \cs{test@vrtx@trimethy}} +% \begin{macrocode}
+\def\test@vrtx@trimethy#1#2{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
+\ifcase\@tmpaa%
+ \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
+ \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
+ \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
+ \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
+ \or \if\@tmpb s\relax \xdef\ccc{}\else\if\@tmpb h\relax
+ \xdef\ccc{@}\else\xdef\ccc{@}\fi\fi
+\fi\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% The |\yltrimethyleneposition| is used to adjust
+% substitution sites for the command |\@@trimethylene|.
+%
+% \begin{macro}{\yltrimethyleneposition}
+% \begin{verbatim}
+% \yltrimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: positions bbb and ccc
+% 2: positions aaa and bbb
+%
+% bbb
+% 2
+% a / ` b
+% 1 3
+% aaa ccc
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}%
+\def\yltrimethyleneposition#1#2#3#4{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifcase\@tmpaa%
+ \or \def\aaa{@}%\def\aaa{\@memberb}%
+ \or \def\bbb{@}%\def\bbb{\@memberb}%
+ \or \def\ccc{@}%\def\ccc{\@memberb}%
+\fi\fi}%
+\@@ylswfalse%%%\@reset@ylsw
+\@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
+\if@@ylsw
+\ifcase\@tmpaa%0 omit
+\or
+ \ifcase#3
+ \ifx\aaa\empty
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+ \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \else% terminal position
+ \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \or\relax
+ \or
+ \ifx\aaa\empty
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+ \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \else% terminal position
+ \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \fi
+\or
+ \ifx\bbb\empty
+ \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
+ \else
+ \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
+ \fi
+\or
+ \ifcase#3
+ \ifx\ccc\empty
+ \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
+ \else
+ \if@rinterchainsw%interchain position
+ \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
+ \else
+ \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
+ \fi
+ \fi
+ \or
+ \ifx\ccc\empty
+ \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
+ \else
+ \if@rinterchainsw%interchain position
+ \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
+ \else
+ \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
+ \fi
+ \fi
+ \or\relax
+ \fi
+\fi%end of ifcase
+\fi}}% end of \yltrimethyleneposition
+% \end{macrocode}
+% \end{macro}
+%
+% The counter |\test@termcnt|, which is equal to
+% the argument \#3 of command |\@@trimethylene|,
+% is used for testing a terminal point.
+%
+% \begin{macro}{\test@termcnt}
+% \changes{v2.00}{1998/12/21}{New command: \cs{test@termcnt}} +% \begin{macrocode}
+\newcount\test@termcnt
+% \end{macrocode}
+% \end{macro}
+%
+% The |\set@hetatom@methyl| is used to set a hetero atom
+% at each vertex in the command |\@@trimethylene|.
+%
+% \begin{macro}{\set@hetatom@methyl}
+% \changes{v2.00}{1998/12/20}{New command: \cs{set@hetatom@methyl}} +% \begin{macrocode}
+\def\set@hetatom@methyl#1#2#3#4#5{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+%\expandafter\twoch@r\@membera{}%
+\expandafter\twoCH@R\@membera//%
+\ifnum#5 < 0\relax%
+\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
+\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
+\ifnum\@tmpaa >#3\relax%
+\ifnum\@tmpaa <#4\relax%
+\ifcase\@tmpaa%
+\or%position 1 <--- position 6 of set@hetatom@sixv
+ \ifnum\test@termcnt=1\else%not terminal point (left)
+ \if\@tmpb h\relax%
+ \@acliptrue%
+ \putlatom{0}{30}{\@memberb}% % right type
+ \else\if\@tmpb s\relax%
+ \@aclipfalse%
+% \putlatom{-4}{0}{\@memberb}% % right type
+ \putlatom{0}{0}{\@memberb}% % right type
+ \else\if\@tmpb a\relax%omit fused position
+ \else
+ \@acliptrue%
+ \putlatom{36}{-23}{\@memberb}% % left type
+ \fi\fi\fi
+ \fi
+\or%position 2 <--- position 1 of set@hetatom@sixv
+ \if\@tmpb h\relax%
+ \@bcliptrue%
+ \putratom{171}{53}{\@memberb}% % right type
+ \else\if\@tmpb s\relax%
+ \@bclipfalse%
+ \putratom{171}{103}{\@memberb}% % right type
+ \else\if\@tmpb a\relax%omit fused position
+ \else
+ \@bcliptrue%
+% \putratom{140}{53}{\@memberb}% % right type
+ \putratom{140}{65}{\@memberb}% % right type
+ \fi\fi\fi
+\or%position 3 <--- position 2 of set@hetatom@sixv
+ \ifnum\test@termcnt=2\else%not terminal point (right)
+ \if\@tmpb h\relax
+ \@ccliptrue%
+% \putratom{320}{30}{\@memberb}% % right type
+ \putratom{330}{30}{\@memberb}% % right type
+ \else\if\@tmpb s\relax
+ \@cclipfalse%
+ \putratom{346}{0}{\@memberb}% % right type
+ \else\if\@tmpb a\relax%omit fused position
+ \else
+ \@ccliptrue%
+ \putratom{306}{-23}{\@memberb}% % right type
+ \fi\fi\fi
+ \fi
+\fi% end of ifcase
+\fi\fi\fi}}% end of the macro \set@hetatom@methyl
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\trimethylene| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\trimethylene}
+% \begin{macro}{\@trimethylene}
+%
+% \begin{verbatim}
+%
+% bbb
+% 2
+% a / ` b (or uppercase letters)
+% / `
+% 1 3
+% aaa ccc
+% \end{verbatim}
+%
+%
+% \begin{verbatim}
+% \trimethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character a, A, b, or B
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a lower-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a upper-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 1,2-double bond in an opposite side
+% \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
+% nW : terminal single bond (n=1 or 3)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \trimethylene{1==N}{1==Cl;2==F}
+% \trimethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\trimethylene| uses a picture environment and
+% consists of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yltrimethyleneposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@trimethylene|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\trimethylene{%
+\@ifnextchar[{\@trimethylene[@}{\@trimethylene[]}}
+\def\@trimethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+\reset@interchainsw%
+\yltrimethyleneposition{#2}{#3}{0}{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(450,480)(-50,-180)
+ \iforigpt \put(-50,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `trimethylene' origin: %
+ (0,0) ---> (50,180)}\fi%
+\fi
+\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@trimeth
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdfalse
+ \put(0,0){\@@trimethylene{#2}{#3}{0}{0}}%
+\end{picture}}% end of \trimethylene \@trimethylene
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@trimeth| 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@trimeth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@trimeth}} +% \begin{macrocode}
+\def\set@fusion@trimeth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{342}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@trimeth
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse direction}
+%
+% A trimethylene (or propane) and its hetera analogs can be typeset
+% by the command |\trimethylenei|, which is mainly based on
+% two inner commands: |\yltrimethyleneiposition| for adjusting a
+% substitution site and |\@@trimethylenei| for
+% placing hetero atoms, double bonds, and substituents.
+%
+% \begin{macro}{\@@trimethylenei}
+% \begin{verbatim}
+% \@@trimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: positions bbb and ccc
+% 2: positions aaa and bbb
+%
+% aaa ccc
+% 1 3
+% a ` / b
+% ` /
+% 2
+% bbb
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}
+\def\@@trimethylenei#1#2#3#4{%
+\leavevmode
+\iniatom\iniflag%initialize
+\test@vrtx@trimethy{#1}{#4}%
+%\test@vertix@sixv{#1}{a}{b}{c}{@}{@}{@}%
+\begin{picture}(450,480)(0,0)
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+ \put(171,0){\SKbondAi}% bond between 1 and 2
+ \put(171,0){\SKbondBi}% bond between 2 and 3
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@adoublebond\relax\put(171,0){\bondAi}\fi
+\if@bdoublebond\relax\put(171,0){\bondBi}\fi
+\if@Adoublebond\relax\put(171,0){\bondAAi}\fi
+\if@Bdoublebond\relax\put(171,0){\bondBBi}\fi
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\test@termcnt=#3\relax
+%\set@hetatom@methyli{#1}{0}{0}{4}{0}%
+\set@hetatom@methyli{#1}{#4}{0}{4}{0}%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\else
+\ifcase\@tmpaa%0 omit
+\or
+ \ifcase#3
+ \put(0,-303){\@methsubstaL}%
+ \or\relax
+ \or
+ \put(0,-303){\@methsubstaL}%
+ \fi
+\or
+{\if@bclip \@cliptrue \else \@clipfalse\fi
+ \put(171,0){\@methsubstd}}%
+\or
+ \ifcase#3
+ {\if@cclip \@acliptrue\else \@aclipfalse\fi
+ \put(342,-303){\@methsubsta}}%
+ \or
+ {\if@cclip \@acliptrue\else \@aclipfalse\fi
+ \put(342,-303){\@methsubsta}}%
+ \or\relax
+ \fi
+\fi%end of ifcase
+\fi\fi
+}%
+\end{picture}}% end of \@@trimethylenei
+% \end{macrocode}
+% \end{macro}
+%
+% The |\yltrimethyleneiposition| is used to adjust
+% substitution sites.
+%
+% \begin{macro}{\yltrimethyleneiposition}
+% \begin{verbatim}
+% \yltrimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: positions bbb and ccc
+% 2: positions aaa and bbb
+%
+% aaa ccc
+% 1 3
+% a ` / b
+% ` /
+% 2
+% bbb
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}%
+\def\yltrimethyleneiposition#1#2#3#4{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+%\expandafter\twoch@r\@membera{}%
+\expandafter\twoCH@R\@membera//%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifcase\@tmpaa%
+ \or \def\aaa{@}%\def\aaa{\@memberb}%
+ \or \def\bbb{@}%\def\bbb{\@memberb}%
+ \or \def\ccc{@}%\def\ccc{\@memberb}%
+\fi%
+\fi}%
+\@@ylswfalse%%%\@reset@ylsw
+\@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
+\if@@ylsw
+\ifcase\@tmpaa%0 omit
+\or%%%%%%position 1
+ \ifcase#3
+ \ifx\aaa\empty
+%% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+% \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
+ \else% terminal position
+%% \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \or\relax
+ \or
+ \ifx\aaa\empty
+%% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+ \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
+% \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \else% terminal position
+%% \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \fi
+\or%%%%%%%%position 2
+ \ifx\bbb\empty
+%% \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
+ \else
+%% \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-171}\gdef\@yli{50}\global\@ylswtrue% subst. on 2
+ \fi
+\or%%%%%%%%position 3
+ \ifcase#3
+ \ifx\ccc\empty
+%% \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
+ \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
+ \else
+ \if@rinterchainsw%interchain position
+%% \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
+ \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
+ \else
+%% \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
+ \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3
+ \fi
+ \fi
+ \or
+ \ifx\ccc\empty
+% \gdef\@ylii{-342}\gdef\@yli{0}\global\@ylswtrue% subst. on 3
+ \gdef\@ylii{-342}\gdef\@yli{-103}\global\@ylswtrue% subst. on 3
+ \else
+ \if@rinterchainsw%interchain position
+% \gdef\@ylii{-342}\gdef\@yli{40}\global\@ylswtrue% subst. on 3
+ \gdef\@ylii{-342}\gdef\@yli{-133}\global\@ylswtrue% subst. on 3
+ \else
+% \gdef\@ylii{-382}\gdef\@yli{-24}\global\@ylswtrue% subst. on 3
+ \gdef\@ylii{-382}\gdef\@yli{-79}\global\@ylswtrue% subst. on 3
+ \fi
+ \fi
+ \or\relax
+ \fi
+\fi%end of ifcase
+\fi}}% end of \yltrimethyleneiposition
+% \end{macrocode}
+% \end{macro}
+%
+% The |\set@hetatom@methyli| is used to set a hetero atom
+% at each vertex in the command |\@@trimethylenei|.
+%
+% \begin{macro}{\set@hetatom@methyli}
+% \changes{v2.00}{1998/12/20}{New command: \cs{set@hetatom@methyli}} +% \begin{macrocode}
+\def\set@hetatom@methyli#1#2#3#4#5{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifnum#5 < 0\relax%
+\@tmpaa=-\@tmpa\relax \advance\@tmpaa by#2\relax%
+\else\@tmpaa=\@tmpa\relax \advance\@tmpaa by#2\relax \fi
+\ifnum\@tmpaa >#3\relax%
+\ifnum\@tmpaa <#4\relax%
+\ifcase\@tmpaa%
+\or%position 1 <-- \set@hetatom@sixv position 5
+ \ifnum\test@termcnt=1\else%not terminal point (left)
+ \if\@tmpb h\relax
+ \@acliptrue%
+ \putlatom{0}{70}{\@memberb}% % right type
+ \else\if\@tmpb s\relax
+ \@aclipfalse%
+ \putlatom{0}{103}{\@memberb}% % right type
+ \else\if\@tmpb a\relax%omit fused position
+ \else
+ \@acliptrue%
+ \putlatom{36}{65}{\@memberb}% % left type
+ \fi\fi\fi
+ \fi
+\or%position 2 <-- \set@hetatom@sixv position 4
+ \if\@tmpb h\relax
+ \@bcliptrue%
+ \putratom{171}{50}{\@memberb}% % right type
+ \else\if\@tmpb s\relax
+ \@bclipfalse%
+ \putratom{171}{0}{\@memberb}% % right type
+ \else\if\@tmpb a\relax%omit fused position
+ \else
+ \@bcliptrue%
+% \putratom{140}{-10}{\@memberb}% % right type
+ \putratom{140}{-23}{\@memberb}% % right type
+ \fi\fi\fi
+\or%position 3 <-- \set@hetatom@sixv position 3
+ \ifnum\test@termcnt=2\else%not terminal point (right)
+ \if\@tmpb h\relax
+ \@ccliptrue%
+ \putratom{342}{70}{\@memberb}% % right type
+ \else\if\@tmpb s\relax
+ \@cclipfalse%
+ \putratom{342}{103}{\@memberb}% % right type
+ \else\if\@tmpb a\relax%omit fused position
+ \else
+ \@ccliptrue%
+ \putratom{306}{65}{\@memberb}% % right type
+ \fi\fi\fi
+ \fi
+\fi% end of ifcase
+\fi\fi\fi}}% end of the macro \set@hetatom@methyli
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\trimethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\trimethylenei}
+% \begin{macro}{\@trimethylenei}
+%
+% \begin{verbatim}
+% aaa ccc
+% 1 3
+% a ` / b (or uppercase letters)
+% ` /
+% 2
+% bbb
+% \end{verbatim}
+%
+%
+% \begin{verbatim}
+% \trimethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character a, A, b, or B
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a upper-side of an outer skeletal bond,
+% while a uppercase letter typesets a double bond at a lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 1,2-double bond in an opposite side
+% \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
+% nW : terminal single bond (n=1 or 3)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \trimethylenei{1==N}{1==Cl;2==F}
+% \trimethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\trimethylene| uses a picture environment and
+% consists of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yltrimethyleneiposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@trimethylenei|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\trimethylenei{%
+\@ifnextchar[{\@trimethylenei[@}{\@trimethylenei[]}}
+\def\@trimethylenei[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+\reset@interchainsw%
+\yltrimethyleneiposition{#2}{#3}{0}{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(450,480)(-50,-180)
+ \iforigpt \put(-50,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `trimethylene' origin: %
+ (0,0) ---> (50,180)}\fi%
+\fi
+\reset@double%
+%\@adoublebondfalse
+%\@bdoublebondfalse
+%\@Adoublebondfalse
+%\@Bdoublebondfalse
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@trimethi
+\fi\fi\fi\fi}%
+\@wrongbdWafalse
+\@wrongbdWdtrue
+ \put(0,0){\@@trimethylenei{#2}{#3}{0}{0}}%
+\end{picture}}% end of \trimethylenei
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@trimethi| 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@trimethi}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@trimethi}} +% \begin{macrocode}
+\def\set@fusion@trimethi{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{342}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@trimethi
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Dimethylene}
+% \subsection{Normal direction}
+%
+% A dimethylene (or ethane) and its hetera analogs can be typeset
+% by the command |\dimethylene|, which is mainly based on
+% two inner commands: |\yldimethyleneposition| for adjusting a
+% substitution site and |\@@dimethylene| for
+% placing hetero atoms, double bonds, and substituents.
+%
+% \begin{macro}{\@@dimethylene}
+% \begin{verbatim}
+% \@@dimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: position bbb
+% 2: position aaa
+%
+% bbb
+% 2
+% a /
+% 1
+% aaa
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}
+\def\@@dimethylene#1#2#3#4{%
+\leavevmode
+\iniatom\iniflag%initialize
+\test@vrtx@dimethy{#1}{#4}%
+%\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
+\begin{picture}(250,480)(0,0)
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+ \put(171,-303){\SKbondA}% bond between 1 and 2
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@adoublebond
+ \put(171,-303){\bondA}%upper side double bond
+\else\if@Adoublebond
+ \put(171,-303){\bondAA}%lower side double bond
+\fi\fi%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\test@termcnt=#3\relax
+%\set@hetatom@methyl{#1}{0}{0}{3}{0}%
+\set@hetatom@methyl{#1}{#4}{0}{3}{0}%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\else
+\ifcase\@tmpaa%0 omit
+\or
+ \ifcase#3
+ {\if@aclip \@cliptrue \else \@clipfalse\fi
+ \put(0,0){\@methsubstdL}}%
+ \or\relax
+ \or
+ {\if@aclip \@cliptrue \else \@clipfalse\fi
+ \put(0,0){\@methsubstdL}}%
+ \fi
+\or
+ \ifcase#3
+ {\if@bclip \@acliptrue \else \@aclipfalse\fi
+ \put(171,-303){\@methsubsta}}
+ \or
+ {\if@bclip \@acliptrue \else \@aclipfalse\fi
+ \put(171,-303){\@methsubsta}}
+ \or\relax
+ \fi
+\fi%end of ifcase
+\fi\fi%
+}%
+\end{picture}}% end of \@@dimethylene
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\test@vrtx@dimethy}
+% \changes{v2.00}{1998/12/21}{New command: \cs{test@vrtx@dimethy}} +% \begin{macrocode}
+\def\test@vrtx@dimethy#1#2{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#2\relax
+\ifcase\@tmpaa%
+ \or \if\@tmpb s\relax \xdef\aaa{}\else\if\@tmpb h\relax
+ \xdef\aaa{@}\else\xdef\aaa{@}\fi\fi
+ \or \if\@tmpb s\relax \xdef\bbb{}\else\if\@tmpb h\relax
+ \xdef\bbb{@}\else\xdef\bbb{@}\fi\fi
+\fi\fi}}
+% \end{macrocode}
+% \end{macro}
+%
+% The |\yldimethyleneposition| is used to adjust
+% substitution sites.
+%
+% \begin{macro}{\yldimethyleneposition}
+% \begin{verbatim}
+% \yldimethylene{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: position bbb
+% 2: position aaa
+%
+% bbb
+% 2
+% a /
+% 1
+% aaa
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}%
+\def\yldimethyleneposition#1#2#3#4{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifcase\@tmpaa%
+ \or \def\aaa{\@memberb}%
+ \or \def\bbb{\@memberb}%
+\fi\fi}%
+\@@ylswfalse%%%\@reset@ylsw
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
+\if@@ylsw
+\ifcase\@tmpaa%0 omit
+\or
+ \ifcase#3
+ \ifx\aaa\empty
+% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+ \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \else%terminal position
+ \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \or\relax
+ \or
+ \ifx\aaa\empty
+ \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+ \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \else%terminal position
+ \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \fi
+\or
+ \ifcase#3
+ \ifx\bbb\empty
+ \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
+ \else
+ \if@rinterchainsw%interchain position
+ \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
+ \else%terminal position
+ \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
+ \fi
+ \fi
+ \or
+ \ifx\bbb\empty
+ \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
+ \else
+ \if@rinterchainsw%interchain position
+ \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
+ \else%terminal position
+ \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
+ \fi
+ \fi
+ \or \relax
+ \fi
+\fi%end of ifcase
+\fi\fi}}% end of \yldimethyleneposition
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\dimethylene| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\dimethylene}
+% \begin{macro}{\@dimethylene}
+% \begin{verbatim}
+%
+% bbb
+% 2
+% a / (or uppercase letters)
+% /
+% 1
+% aaa
+% \end{verbatim}
+%
+%
+% \begin{verbatim}
+% \dimethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character a or A,
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a lower-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a upper-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc. )
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% \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 2 atoms)
+%
+% for n = 1 and 2
+%
+% 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 and 2
+%
+% 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
+% nW : terminal single bond (n=1 or 2)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \dimethylene{1==N}{1==Cl;2==F}
+% \dimethylene[a]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\dimethylene| uses a picture environment and
+% consists of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yldimethyleneposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@dimethylene|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\dimethylene{%
+\@ifnextchar[{\@dimethylene[@}{\@dimethylene[]}}
+\def\@dimethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+\reset@interchainsw%
+\yldimethyleneposition{#2}{#3}{0}{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(250,480)(-50,-180)
+ \iforigpt \put(-50,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `dimethylene' origin: %
+ (0,0) ---> (50,180)}\fi%
+\fi
+\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@dimeth
+\fi\fi}%
+\@wrongbdWafalse
+\@wrongbdWdfalse
+ \put(0,0){\@@dimethylene{#2}{#3}{0}{0}}%
+\end{picture}}% end of \dimethylene
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@dimeth| 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@dimeth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@dimeth}} +% \begin{macrocode}
+\def\set@fusion@dimeth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \fi\fi
+}% end of the macro \set@fusion@dimeth
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse direction}
+%
+% A dimethylene (or ethane) and its hetera analogs (of inverse direction)
+% can be typeset by the command |\dimethylenei|, which is mainly based on
+% two inner commands: |\yldimethyleneiposition| for adjusting a
+% substitution site and |\@@dimethylenei| for
+% placing hetero atoms, double bonds, and substituents.
+%
+% \begin{macro}{\@@dimethylenei}
+% \begin{verbatim}
+% \@@dimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: position bbb
+% 2: positions aaa
+%
+% aaa
+% 1
+% a `
+% `
+% 2
+% bbb
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}
+\def\@@dimethylenei#1#2#3#4{%
+\leavevmode
+\iniatom\iniflag%initialize
+\test@vrtx@dimethy{#1}{#4}%
+%\test@vertix@sixv{#1}{a}{b}{@}{@}{@}{@}%
+\begin{picture}(250,480)(0,0)
+% %%%%%%%%%%%%%%%%%%
+% % outer skeleton %
+% %%%%%%%%%%%%%%%%%%
+ \put(171,0){\SKbondAi}% bond between 1 and 2
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner double bond %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@adoublebond
+ \put(171,0){\bondAi}%upper side double bond
+\else\if@Adoublebond
+ \put(171,0){\bondAAi}%lower side double bond
+\fi\fi%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting hetero atoms %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\test@termcnt=#3\relax
+%\set@hetatom@methyli{#1}{0}{0}{3}{0}%
+\set@hetatom@methyli{#1}{#4}{0}{3}{0}%
+% %%%%%%%%%%%%%%%%%%%%%%%%
+% % setting substituents %
+% %%%%%%%%%%%%%%%%%%%%%%%%
+\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\else
+\ifcase\@tmpaa%0 omit
+\or
+ \ifcase#3
+ \put(0,-303){\@methsubstaL}%
+ \or\relax
+ \or
+ \put(0,-303){\@methsubstaL}%
+ \fi
+\or
+ \ifcase#3
+ {\if@bclip \@cliptrue \else \@clipfalse\fi
+ \put(171,0){\@methsubstd}}
+ \or
+ {\if@bclip \@cliptrue \else \@clipfalse\fi
+ \put(171,0){\@methsubstd}}
+ \or\relax
+ \fi
+\fi%end of ifcase
+\fi\fi%
+}%
+\end{picture}}% end of \@@dimethylenei
+% \end{macrocode}
+% \end{macro}
+%
+% The |\yldimethyleneiposition| is used to adjust
+% substitution sites.
+%
+% \begin{macro}{\yldimethyleneiposition}
+% \begin{verbatim}
+% \yldimethylenei{ATOMLIST}{BONDLIST}{TERMswitch}{Adjust}
+%
+% <TERMswitch>
+% 0: all positions
+% 1: position bbb
+% 2: position aaa
+%
+% aaa
+% 1
+% a `
+% `
+% 2
+% bbb
+%
+% <Adjust>
+% a positive or negative integer to adjust locant numbers
+% \end{verbatim}
+%
+% \begin{macrocode}%
+\def\yldimethyleneiposition#1#2#3#4{%
+\@forsemicol\member:=#1\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifcase\@tmpaa%
+ \or \def\aaa{\@memberb}%
+ \or \def\bbb{\@memberb}%
+\fi\fi}%
+\@@ylswfalse%%%\@reset@ylsw
+\@forsemicol\member:=#2\do{\expandafter\@m@mb@r\member;\relax%
+\expandafter\threech@r\@membera{}{}%
+\@tmpaa=\@tmpa \advance\@tmpaa by#4\relax
+\ifx\@memberb\@yl\relax\@@ylswtrue\else\@@ylswfalse\fi
+\if@@ylsw
+\ifcase\@tmpaa%0 omit
+\or%%%%%%%%position 1
+ \ifcase#3
+ \ifx\aaa\empty
+% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+% \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
+ \else%terminal position
+% \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \or\relax
+ \or
+ \ifx\aaa\empty
+% \gdef\@ylii{0}\gdef\@yli{0}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-103}\global\@ylswtrue% subst. on 1
+ \else
+ \if@linterchainsw%interchain position
+% \gdef\@ylii{0}\gdef\@yli{40}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{0}\gdef\@yli{-133}\global\@ylswtrue% subst. on 1
+ \else%terminal position
+% \gdef\@ylii{40}\gdef\@yli{-24}\global\@ylswtrue% subst. on 1
+ \gdef\@ylii{40}\gdef\@yli{-79}\global\@ylswtrue% subst. on 1
+ \fi
+ \fi
+ \fi
+\or%%%%%%%%position 2
+ \ifcase#3
+ \ifx\bbb\empty
+% \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
+ \else
+ \if@rinterchainsw%interchain position
+% \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
+ \else%terminal position
+ % \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2
+ \fi
+ \fi
+ \or
+ \ifx\bbb\empty
+% \gdef\@ylii{-171}\gdef\@yli{-103}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-171}\gdef\@yli{0}\global\@ylswtrue% subst. on 2
+ \else
+ \if@rinterchainsw%interchain position
+% \gdef\@ylii{-171}\gdef\@yli{-133}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-171}\gdef\@yli{33}\global\@ylswtrue% subst. on 2
+ \else%terminal position
+% \gdef\@ylii{-211}\gdef\@yli{-93}\global\@ylswtrue% subst. on 2
+ \gdef\@ylii{-211}\gdef\@yli{-10}\global\@ylswtrue% subst. on 2
+ \fi
+ \fi
+ \or \relax
+ \fi
+\fi%end of ifcase
+\fi}}% end of \yldimethyleneiposition
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\dimethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\dimethylenei}
+% \begin{macro}{\@dimethylenei}
+% \begin{verbatim}
+%
+% aaa
+% 1
+% a ` (or uppercase letter)
+% `
+% 2
+% bbb
+% \end{verbatim}
+%
+% \begin{verbatim}
+% \dimethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character a or A,
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc. )
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% \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 2 atoms)
+%
+% for n = 1 and 2
+%
+% 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 and 2
+%
+% 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
+% nW : terminal single bond (n=1 or 2)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \dimethylenei{1==N}{1==Cl;2==F}
+% \dimethylenei[a]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\dimethylenei| uses a picture environment and
+% consists of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yldimethyleneposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@dimethylene|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\dimethylenei{%
+\@ifnextchar[{\@dimethylenei[@}{\@dimethylenei[]}}
+\def\@dimethylenei[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+\reset@interchainsw%
+\yldimethyleneiposition{#2}{#3}{0}{0}%
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(250,480)(-50,-180)
+ \iforigpt \put(-50,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `dimethylene' origin: %
+ (0,0) ---> (50,180)}\fi%
+\fi
+\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@dimethi
+\fi\fi}%
+\@wrongbdWafalse
+\@wrongbdWdfalse
+ \put(0,0){\@@dimethylenei{#2}{#3}{0}{0}}%
+\end{picture}}% end of \dimethylenei
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@dimethi| 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@dimethi}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@dimethi}} +% \begin{macrocode}
+\def\set@fusion@dimethi{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+\fi\fi
+}% end of the macro \set@fusion@dimethi
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Tetramethylenes}
+% \subsection{Normal direction}
+%
+% The macro |\tetramethylene| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\tetramethylene}
+% \begin{macro}{\@tetramethylene}
+%
+% \begin{verbatim}
+%
+% bbb ddd
+% 2 4
+% a / ` b / c (or uppercase letters)
+% / ` /
+% 1 3
+% aaa ccc
+% \end{verbatim}
+%
+% \begin{verbatim}
+% \tetramethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to c (or A to C),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a lower-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a upper-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% \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 4 atoms)
+%
+% for n = 1 to 4
+%
+% 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 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+% nW : terminal single bond (n=1 or 4)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \tetramethylene{1==N}{1==Cl;2==F}
+% \tetramethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\tetramethylene| uses a picture environment and
+% is based on |\@@trimethylene| and |\@@dimethylene|, each of which
+% is consist of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yltrimethyleneposition| or
+% |\yldimethyleneposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@trimethylene|or |\@@dimethylene|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\tetramethylene{%
+\@ifnextchar[{\@tetramethylene[@}{\@tetramethylene[]}}
+\def\@tetramethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\yltrimethyleneposition{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\yldimethyleneposition{#2}{#3}{1}{-2}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(900,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `tetramethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@tetrameth
+\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\fi\fi}%
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\put(342,0){\@@dimethylene{#2}{#3}{1}{-2}}}%
+\end{picture}}% end of \tetramethylene
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@tetrameth| 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@tetrameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetrameth}} +% \begin{macrocode}
+\def\set@fusion@tetrameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{342}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{342}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{513}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+ \fi\fi
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@tetrameth
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse direction}
+%
+% The macro |\tetramethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\tetramethylenei}
+% \begin{macro}{\@tetramethylenei}
+%
+% \begin{verbatim}
+%
+% aaa ccc
+% 1 3
+% a ` b / ` c (or uppercase letters)
+% ` / `
+% 2 4
+% bbb ddd
+% \end{verbatim}
+%
+% \begin{verbatim}
+% \tetramethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to c (or A to C),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a lower-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a upper-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% \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 4 atoms)
+%
+% for n = 1 to 4
+%
+% 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 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+% nW : terminal single bond (n=1 or 4)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \tetramethylenei{1==N}{1==Cl;2==F}
+% \tetramethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\tetramethylenei| uses a picture environment and
+% is based on |\@@trimethylenei| and |\@@dimethylenei|, each of which
+% is consist of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yltrimethylenieposition| or
+% |\yldimethyleneiposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@trimethylenei| or |\@@dimethylenei|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\tetramethylenei{%
+\@ifnextchar[{\@tetramethylenei[@}{\@tetramethylenei[]}}
+\def\@tetramethylenei[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\yltrimethyleneiposition{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\yldimethyleneiposition{#2}{#3}{1}{-2}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(900,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `tetramethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@tetramethi
+\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdfalse
+\put(342,0){\@@dimethylenei{#2}{#3}{1}{-2}}}
+\end{picture}}%end of \tetramethylenei
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@tetramethi| 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@tetramethi}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetramethi}} +% \begin{macrocode}
+\def\set@fusion@tetramethi{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{342}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{342}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{513}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+ \fi\fi
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@tetramethi
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Cisoid types}
+%
+% The macros |\tetramethylenecup| and |\tetramethylenecap| are
+% used to draw tetramethylenes of cisoid types.
+%
+% \begin{verbatim}
+% Cup:
+% aaa ddd
+% 1 4
+% ` /
+% a ` / c (or uppercase letters)
+% 2------3
+% bbb b ccc
+%
+% Cap:
+% bbb b ccc
+% 2------3
+% a / ` c (or uppercase letters)
+% / `
+% 1 4
+% aaa ddd
+% \end{verbatim}
+%
+% The macros have two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% \begin{verbatim}
+% \tetramethylenecup[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \tetramethylenecap[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to c (or A to C),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a lower-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a upper-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% \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 4 atoms)
+%
+% for n = 1 to 4
+%
+% 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 4
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+% nW : terminal single bond (n=1 or 4)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \tetramethylenecup{1==N}{1==Cl;2==F}
+% \tetramethylenecap[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% \begin{macro}{\tetramethylenecup}
+% \begin{macro}{\@tetramethylenecup}
+% \begin{macrocode}
+\def\tetramethylenecup{%
+\@ifnextchar[{\@tetramethylenecup[@}{\@tetramethylenecup[]}}
+\def\@tetramethylenecup[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\yldimethyleneiposition{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\yldimethyleneposition{#2}{#3}{0}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-371}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff
+\else
+\begin{picture}(900,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `tetramethylenecup' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+%bond a and atoms 1 and 2
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member b\relax%dummy
+\else\if\member B\relax%dummy
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@tetracup% for all bonds
+\fi\fi\fi\fi
+\fi\fi}%
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\put(0,0){\@@dimethylenei{#2}{#3}{0}{0}}}%
+%bond b
+{\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa%
+ \or \relax%
+ \or \if\@tmpb s\relax\else\if\@tmpb h\relax
+ \xdef\fff{@}\xdef\bbb{@}\else
+ \xdef\fff{@}\xdef\bbb{@}\fi\fi
+ \or \if\@tmpb s\relax\else\if\@tmpb h\relax
+ \xdef\eee{@}\xdef\ccc{@}\else
+ \xdef\eee{@}\xdef\ccc{@}\fi\fi
+\fi\fi}%
+\put(68,171){\hskbonde}%
+\reset@double%
+\@tfor\member:=#1\do{%
+ \if\member b\relax
+ \@bdoublebondtrue
+ \put(68,171){\hbonde}%
+ \else\if\member B\relax
+ \@bdoublebondtrue
+ \put(68,-171){\hbondb}%
+ \fi\fi}}%
+%bond c and atoms 3 and 4
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+ \@wrongbdWafalse
+ \@wrongbdWdLtrue
+\put(371,0){\@@dimethylene{#2}{#3}{0}{-2}}}%
+\end{picture}}% end of \tetramethylenecup
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@tetracup| 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@tetracup}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetracup}} +% \begin{macrocode}
+\def\set@fusion@tetracup{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{371}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{371}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{542}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+ \fi\fi
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@tetracup
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\tetramethylenecap}
+% \begin{macro}{\@tetramethylenecap}
+% \begin{macrocode}
+\def\tetramethylenecap{%
+\@ifnextchar[{\@tetramethylenecap[@}{\@tetramethylenecap[]}}
+\def\@tetramethylenecap[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\yldimethyleneposition{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\yldimethyleneiposition{#2}{#3}{0}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-371}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(900,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `tetramethylenecap' origin: %
+ (0,0) ---> (50,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member b\relax%dummy
+\else\if\member B\relax%dummy
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@tetracap% for all bonds
+\fi\fi\fi\fi
+\fi\fi}%
+\@wrongbdWatrue
+\put(0,0){\@@dimethylene{#2}{#3}{0}{0}}}%
+{\@forsemicol\member:=#2\do{%
+\ifx\member\empty\else
+\expandafter\@m@mb@r\member;\relax%
+\expandafter\twoch@r\@membera{}%
+\ifcase\@tmpa%
+ \or \relax%
+ \or \if\@tmpb s\relax\else\if\@tmpb h\relax
+ \xdef\fff{@}\xdef\bbb{@}\else
+ \xdef\fff{@}\xdef\bbb{@}\fi\fi
+ \or \if\@tmpb s\relax\else\if\@tmpb h\relax
+ \xdef\eee{@}\xdef\ccc{@}\else
+ \xdef\eee{@}\xdef\ccc{@}\fi\fi
+\fi\fi}%
+\put(68,-68){\hskbondb}%
+\reset@double%
+\@tfor\member:=#1\do{%
+ \if\member b\relax
+ \@bdoublebondtrue
+ \put(68,-68){\hbondb}%
+ \else\if\member B\relax
+ \@bdoublebondtrue
+ \put(68,274){\hbonde}%
+ \fi\fi}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+ \@wrongbdWaLtrue
+\put(371,0){\@@dimethylenei{#2}{#3}{0}{-2}}}%
+\end{picture}}% end of \tetramethylenecap
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@tetracap| 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@tetracap}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@tetracap}} +% \begin{macrocode}
+\def\set@fusion@tetracap{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{371}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{200}{0}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{371}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{542}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+ \fi\fi
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@tetracap
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Pentamethylene}
+% \subsection{Normal direction}
+%
+% The macro |\pentamethylene| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\pentamethylene}
+% \begin{macro}{\@pentamethylene}
+%
+% \begin{verbatim}
+%
+% bbb ddd
+% 2 4
+% a / ` b / c` d (or uppercase letters)
+% / ` / `
+% 1 3 5
+% aaa ccc
+% \end{verbatim}
+%
+%
+% \begin{verbatim}
+% \pentamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to d (or A to D),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at a lower-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at a upper-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% \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
+% nW : terminal single bond (n=1 or 5)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \pentamethylene{1==N}{1==Cl;2==F}
+% \pentamethylene[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\pentamethylene| uses a picture environment and
+% is based on two |\@@trimethylene| commands, each of which
+% is consist of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yltrimethyleneposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@trimethylene|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\pentamethylene{%
+\@ifnextchar[{\@pentamethylene[@}{\@pentamethylene[]}}
+\def\@pentamethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\yltrimethyleneposition{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\yltrimethyleneposition{#2}{#3}{1}{-2}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1100,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `pentamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@pentameth% for all bonds
+\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trimethylene{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdfalse
+\put(342,0){\@@trimethylene{#2}{#3}{1}{-2}}}%
+\end{picture}}% end of \pentamethylene
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@pentameth| 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@pentameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@pentameth}} +% \begin{macrocode}
+\def\set@fusion@pentameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{342}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{342}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{513}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+ \else\if\@@tmpa d\relax%
+ \putlratom{513}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
+ \else\if\@@tmpa D\relax%
+ \putlratom{684}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
+ \fi\fi\fi\fi
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@pentameth
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Inverse direction}
+%
+% The macro |\pentamethylenei| has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{macro}{\pentamethylenei}
+% \begin{macro}{\@pentamethylenei}
+%
+% \begin{verbatim}
+%
+% (aaa)
+% aaa ccc eee (ccc)
+% 1 3 5
+% a ` b / ` c / d
+% ` / ` /
+% 2 4
+% bbb ddd (bbb)
+% \end{verbatim}
+%
+% \begin{verbatim}
+% \pentamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to d (or A to D),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at the upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at the lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% \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
+% nW : terminal single bond (n=1 or 5)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \pentamethylenei{1==N}{1==Cl;2==F}
+% \pentamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The definition of |\pentamethylenei| uses a picture environment and
+% is based on two |\@@trimethylenei| commands, each of which
+% is consist of the following unit processes:
+% \begin{enumerate}
+% \item adjusting substitution site by
+% |\yltrimethyleneiposition|
+% \item treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents by |\@@trimethylenei|.
+% \end{enumerate}
+%
+% \begin{macrocode}
+\def\pentamethylenei{%
+\@ifnextchar[{\@pentamethylenei[@}{\@pentamethylenei[]}}
+\def\@pentamethylenei[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\yltrimethyleneiposition{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\yltrimethyleneiposition{#2}{#3}{1}{-2}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi\fi
+\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1100,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `pentamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@pentamethi% for all bonds
+\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trimethylenei{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\put(342,0){\@@trimethylenei{#2}{#3}{1}{-2}}}
+\end{picture}}% end of \pentamethylenei
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% The inner command |\set@fusion@pentamethi| 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@pentamethi}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@pentamethi}} +% \begin{macrocode}
+\def\set@fusion@pentamethi{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if\@@tmpa a\relax%
+ \putlratom{0}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{a}%
+ \else\if\@@tmpa A\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{A}%
+ \else\if\@@tmpa b\relax%
+ \putlratom{171}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{b}%
+ \else\if\@@tmpa B\relax%
+ \putlratom{342}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{B}%
+ \else\if\@@tmpa c\relax%
+ \putlratom{342}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{c}%
+ \else\if\@@tmpa C\relax%
+ \putlratom{513}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{C}%
+ \else\if\@@tmpa d\relax%
+ \putlratom{513}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{d}%
+ \else\if\@@tmpa D\relax%
+ \putlratom{684}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{D}%
+ \fi\fi\fi\fi
+ \fi\fi\fi\fi
+}% end of the macro \set@fusion@pentamethi
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Switches for Selecting Normal and Inverse Directions}
+%
+% The switch |\@normorinvsw| is used to select normal or
+% inverse direction in the definition of commands for drawing
+% hexametylenes and higher homologs. The value of this switch is
+% false for normal direction and true for inverse direction.
+%
+% \begin{macro}{\if@normorinvsw}
+% \begin{macrocode}
+\newif\if@normorinvsw \@normorinvswfalse
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@normaldirection| assigns active commands to
+% temporary commands in the definition of a command for drawing
+% hexametylenes or higher homologs of normal direction.
+% \begin{macro}{\set@normaldirection}
+% \begin{macrocode}
+\def\set@normaldirection{%
+\@normorinvswfalse
+\let\@yltrinormorinv=\yltrimethyleneposition
+\let\@yldinormorinv=\yldimethyleneposition
+\let\@@trinormorinv=\@@trimethylene
+\let\@@dinormorinv=\@@dimethylene}
+% \end{macrocode}
+% \end{macro}
+%
+% The macro |\set@inversedirection| assigns active commands to
+% temporary commands in the definition of a command for drawing
+% hexametylenes or higher homologs of inverse direction.
+% \begin{macro}{\set@inversedirection}
+% \begin{macrocode}
+\def\set@inversedirection{%
+\@normorinvswtrue
+\let\@yltrinormorinv=\yltrimethyleneiposition
+\let\@yldinormorinv=\yldimethyleneiposition
+\let\@@trinormorinv=\@@trimethylenei
+\let\@@dinormorinv=\@@dimethylenei}
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Hexamethylenes of normal and inverse direction}
+%
+% Hexamethylene and hetera derivatives are typeset with the commands
+% |\hexamethylene| and |\hexamethylenei|. The former macro
+% is to draw hexamethylenes of normal direction, while the latter
+% is to draw ones of inverse directions.
+%
+% \begin{verbatim}
+% Normal direction:
+%
+% (bbb) ((bbb))
+% bbb ddd fff
+% 2 4 6
+% a / ` b / c` d / e
+% / ` / ` /
+% 1 3 5
+% aaa ccc eee
+% (aaa) (ccc)
+% ((aaa))
+%
+% Inverse direction:
+%
+% (aaa)
+% aaa ccc eee (ccc) ((aaa))
+% 1 3 5
+% a ` b / ` c / d ` e
+% ` / ` / `
+% 2 4 6
+% bbb ddd (bbb) fff((bbb))
+% \end{verbatim}
+%
+% The macros have two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \hexamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \hexamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to e (or A to E),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at the upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at the lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% e : 5,6-double bond
+% E : 5,6-double bond in an opposite side
+% \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
+% nW : terminal single bond (n=1 or 6)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \hexamethylene{1==N}{1==Cl;2==F}
+% \hexamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The macros |\hexamethylene| and |\hexamethylenei| are
+% based on a common inner macro |\@hexamethylene|,
+% the definition of which uses a picture environment.
+%
+% \begin{macro}{\hexamethylene}
+% \begin{macrocode}
+\def\hexamethylene{%
+\@ifnextchar[{\set@normaldirection\@hexamethylene[@}{%
+\set@normaldirection\@hexamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hexamethylenei}
+% \begin{macrocode}
+\def\hexamethylenei{%
+\@ifnextchar[{\set@inversedirection\@hexamethylene[@}{%
+\set@inversedirection\@hexamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% Inner temporary commands such as |\@@trinormorinv| and
+% |\@@dinormorinv| in the common |\@hexamethylene| macro
+% are replaced by active commands such as |\@@trimethylene| and
+% |\@@dimethylene|. They carry out the following unit processes.
+% \begin{enumerate}
+% \item Adjusting substitution site:
+% |\yltrimethyleneposition|
+% or |\yldimethyleneposition| for normal direction;
+% |\yltrimethyleneiposition|
+% or |\yldimethyleneiposition| for inverse direction.
+% \item Treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents:
+% |\@@trimethylene|
+% or |\@@dimethylene| for normal direction;
+% |\@@trimethylenei|
+% or |\@@dimethylenei| for normal direction.
+% \end{enumerate}
+%
+% \begin{macro}{\@hexamethylene}
+% \begin{macrocode}
+\def\@hexamethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\@yltrinormorinv{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\@yldinormorinv{#2}{#3}{1}{-4}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1100,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `hexamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else\if\member e\relax%dummy
+\else\if\member E\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@hexameth% for all bonds
+\fi\fi\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member e\relax
+\@adoublebondtrue
+\else\if\member E\relax
+\@Adoublebondtrue
+\fi\fi}%
+\if@normorinvsw% inverse
+ \@wrongbdWatrue
+ \@wrongbdWdfalse
+\else% normal
+ \@wrongbdWafalse
+ \@wrongbdWdtrue
+\fi
+\put(684,0){\@@dinormorinv{#2}{#3}{1}{-4}}}%
+\end{picture}}% end of \@hexamethylene
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@hexameth| 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@hexameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@hexameth}} +% \begin{macrocode}
+\def\set@fusion@hexameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@normorinvsw
+ \if\@@tmpa e\relax%
+ \putlratom{684}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
+ \else\if\@@tmpa E\relax%
+ \putlratom{855}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
+ \else
+ \set@fusion@pentamethi
+ \fi\fi
+\else
+ \if\@@tmpa e\relax%
+ \putlratom{684}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
+ \else\if\@@tmpa E\relax%
+ \putlratom{855}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
+ \else
+ \set@fusion@pentameth
+ \fi\fi
+\fi
+}% end of the macro \set@fusion@hexameth
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Heptamethylenes of normal and inverse direction}
+%
+% Heptamethylene and hetera derivatives are typeset with the commands
+% |\heptamethylene| and |\heptamethylenei|. The former macro
+% is to draw heptamethylenes of normal direction, while the latter
+% is to draw ones of inverse directions.
+%
+% \begin{verbatim}
+% Normal direction:
+%
+% (bbb) ((bbb))
+% bbb ddd fff
+% 2 4 6
+% a / ` b / c` d / e ` f
+% / ` / ` / `
+% 1 3 5 7
+% aaa ccc eee gggg
+% (aaa) (ccc) ((ccc))
+% ((aaa))
+%
+% Inverse direction:
+%
+% (aaa) ((aaa)) ((ccc))
+% aaa ccc eee (ccc) ggg
+% 1 3 5 7
+% a ` b / ` c / d ` e /f
+% ` / ` / ` /
+% 2 4 6
+% bbb ddd (bbb) fff((bbb))
+% (aaa)
+% \end{verbatim}
+%
+% The macros have two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% \begin{verbatim}
+% \heptamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \heptamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to f (or A to F),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at the upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at the lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% e : 5,6-double bond
+% E : 5,6-double bond in an opposite side
+% f : 6,7-double bond
+% F : 6,7-double bond in an opposite side
+% \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 7 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
+% \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 7
+%
+% 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
+% nW : terminal single bond (n=1 or 7)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \heptamethylene{1==N}{1==Cl;2==F}
+% \heptamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The macros |\heptamethylene| and |\heptamethylenei| are
+% based on a common inner macro |\@heptamethylene|,
+% the definition of which uses a picture environment.
+%
+% \begin{macro}{\heptamethylene}
+% \begin{macrocode}
+\def\heptamethylene{%
+\@ifnextchar[{\set@normaldirection\@heptamethylene[@}{%
+\set@normaldirection\@heptamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\heptamethylenei}
+% \begin{macrocode}
+\def\heptamethylenei{%
+\@ifnextchar[{\set@inversedirection\@heptamethylene[@}{%
+\set@inversedirection\@heptamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% Inner temporary commands such as |\@@trinormorinv| and
+% |\@@dinormorinv| in the common |\@heptamethylene| macro
+% are replaced by active commands such as |\@@trimethylene| and
+% |\@@dimethylene|. They carry out the following unit processes.
+% \begin{enumerate}
+% \item Adjusting substitution site:
+% |\yltrimethyleneposition|
+% or |\yldimethyleneposition| for normal direction;
+% |\yltrimethyleneiposition|
+% or |\yldimethyleneiposition| for inverse direction.
+% \item Treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents:
+% |\@@trimethylene|
+% or |\@@dimethylene| for normal direction;
+% |\@@trimethylenei|
+% or |\@@dimethylenei| for normal direction.
+% \end{enumerate}
+%
+% \begin{macro}{\@heptamethylene}
+% \begin{macrocode}
+\def\@heptamethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\@yltrinormorinv{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-4}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1450,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `heptamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else\if\member e\relax%dummy
+\else\if\member E\relax%dummy
+\else\if\member f\relax%dummy
+\else\if\member F\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@heptameth% for all bonds
+\fi\fi\fi\fi\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member e\relax
+\@adoublebondtrue
+\else\if\member E\relax
+\@Adoublebondtrue
+\else\if\member f\relax
+\@bdoublebondtrue
+\else\if\member F\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\if@normorinvsw% inverse
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\else%normal
+\@wrongbdWatrue
+\@wrongbdWdfalse
+\fi
+\put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
+\end{picture}}% end of \@heptamethylene
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@heptameth| 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@heptameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@heptameth}} +% \begin{macrocode}
+\def\set@fusion@heptameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@normorinvsw
+ \if\@@tmpa e\relax%
+ \putlratom{684}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
+ \else\if\@@tmpa E\relax%
+ \putlratom{855}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
+ \else\if\@@tmpa f\relax%
+ \putlratom{855}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
+ \else\if\@@tmpa F\relax%
+ \putlratom{1027}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
+ \else
+ \set@fusion@pentamethi
+ \fi\fi\fi\fi
+\else
+ \if\@@tmpa e\relax%
+ \putlratom{684}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
+ \else\if\@@tmpa E\relax%
+ \putlratom{855}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
+ \else\if\@@tmpa f\relax%
+ \putlratom{855}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
+ \else\if\@@tmpa F\relax%
+ \putlratom{1027}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
+ \else
+ \set@fusion@pentameth
+ \fi\fi\fi\fi
+\fi
+}% end of the macro \set@fusion@heptameth
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Octamethylenes of normal and inverse directions}
+%
+% Octamethylene and hetera derivatives are typeset with the commands
+% |\octamethylene| and |\octamethylenei|. The former macro
+% is to draw octamethylenes of normal direction, while the latter
+% is to draw ones of inverse directions.
+%
+% \begin{verbatim}
+% Normal direction:
+%
+% (bbb) ((bbb)) (((bbb)))
+% bbb ddd fff hhh
+% 2 4 6 8
+% a / ` b / c` d / e ` f /g
+% / ` / ` / ` /
+% 1 3 5 7
+% aaa ccc eee gggg
+% (aaa) (ccc) ((ccc))
+% ((aaa)) (((aaa)))
+%
+% Inverse direction:
+% (((aaa)))
+% (aaa) ((aaa)) ((ccc))
+% aaa ccc eee (ccc) ggg
+% 1 3 5 7
+% a ` b / ` c / d ` e /f ` g
+% ` / ` / ` / `
+% 2 4 6 8
+% bbb ddd fff hhh
+% (bbb) ((bbb)) (((bbb)))
+% \end{verbatim}
+%
+% The macros has two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% \begin{verbatim}
+% \octamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \octamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to g (or A to G),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at the upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at the lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% e : 5,6-double bond
+% E : 5,6-double bond in an opposite side
+% f : 6,7-double bond
+% F : 6,7-double bond in an opposite side
+% g : 7,8-double bond
+% G : 7,8-double bond in an opposite side
+% \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 8 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
+% \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
+% nW : terminal single bond (n=1 or 8)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \octamethylene{1==N}{1==Cl;2==F}
+% \octamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The macros |\octamethylene| and |\octamethylenei| are
+% based on a common inner macro |\@octamethylene|,
+% the definition of which uses a picture environment.
+%
+% \begin{macro}{\octamethylene}
+% \begin{macrocode}
+\def\octamethylene{%
+\@ifnextchar[{\set@normaldirection\@octamethylene[@}{%
+\set@normaldirection\@octamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\octamethylenei}
+% \begin{macrocode}
+\def\octamethylenei{%
+\@ifnextchar[{\set@inversedirection\@octamethylene[@}{%
+\set@inversedirection\@octamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% Inner temporary commands such as |\@@trinormorinv| and
+% |\@@dinormorinv| in the common |\@octamethylene| macro
+% are replaced by active commands such as |\@@trimethylene| and
+% |\@@dimethylene|. They carry out the following unit processes.
+% \begin{enumerate}
+% \item Adjusting substitution site:
+% |\yltrimethyleneposition|
+% or |\yldimethyleneposition| for normal direction;
+% |\yltrimethyleneiposition|
+% or |\yldimethyleneiposition| for inverse direction.
+% \item Treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents:
+% |\@@trimethylene|
+% or |\@@dimethylene| for normal direction;
+% |\@@trimethylenei|
+% or |\@@dimethylenei| for normal direction.
+% \end{enumerate}
+%
+% \begin{macro}{\@octamethylene}
+% \begin{macrocode}
+\def\@octamethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\@yltrinormorinv{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-4}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\@yldinormorinv{#2}{#3}{1}{-6}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-1026}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1620,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `octamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else\if\member e\relax%dummy
+\else\if\member E\relax%dummy
+\else\if\member f\relax%dummy
+\else\if\member F\relax%dummy
+\else\if\member g\relax%dummy
+\else\if\member G\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@octameth% for all bonds
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member e\relax
+\@adoublebondtrue
+\else\if\member E\relax
+\@Adoublebondtrue
+\else\if\member f\relax
+\@bdoublebondtrue
+\else\if\member F\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member g\relax
+\@adoublebondtrue
+\else\if\member G\relax
+\@Adoublebondtrue
+\fi\fi}%
+\if@normorinvsw% inverse
+\@wrongbdWatrue
+\@wrongbdWdfalse
+\else% normal
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\fi
+\put(1026,0){\@@dinormorinv{#2}{#3}{1}{-6}}}%
+\end{picture}}% end of \@octamethylene
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@octameth| 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@octameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@octameth}} +% \begin{macrocode}
+\def\set@fusion@octameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@normorinvsw
+ \if\@@tmpa e\relax%
+ \putlratom{684}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
+ \else\if\@@tmpa E\relax%
+ \putlratom{855}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
+ \else\if\@@tmpa f\relax%
+ \putlratom{855}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
+ \else\if\@@tmpa F\relax%
+ \putlratom{1027}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
+ \else\if\@@tmpa g\relax%
+ \putlratom{1027}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
+ \else\if\@@tmpa G\relax%
+ \putlratom{1198}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
+ \else
+ \set@fusion@pentamethi
+ \fi\fi\fi\fi\fi\fi
+\else
+ \if\@@tmpa e\relax%
+ \putlratom{684}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{e}%
+ \else\if\@@tmpa E\relax%
+ \putlratom{855}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{E}%
+ \else\if\@@tmpa f\relax%
+ \putlratom{855}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{f}%
+ \else\if\@@tmpa F\relax%
+ \putlratom{1027}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{F}%
+ \else\if\@@tmpa g\relax%
+ \putlratom{1027}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{g}%
+ \else\if\@@tmpa G\relax%
+ \putlratom{1198}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{G}%
+ \else
+ \set@fusion@pentameth
+ \fi\fi\fi\fi\fi\fi
+\fi
+}% end of the macro \set@fusion@octameth
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Nonamethylenes of normal and inverse direction}
+%
+% Nonamethylene and hetera derivatives are typeset with the commands
+% |\nonamethylene| and |\nonamethylenei|. The former macro
+% is to draw nonamethylenes of normal direction, while the latter
+% is to draw ones of inverse directions.
+%
+% \begin{verbatim}
+% Normal direction:
+%
+% (bbb) ((bbb)) (((bbb)))
+% bbb ddd fff hhh
+% 2 4 6 8
+% a / ` b / c` d / e ` f /g` h
+% / ` / ` / ` / `
+% 1 3 5 7 9
+% aaa ccc eee gggg (((ccc)))
+% (aaa) (ccc) ((ccc))
+% ((aaa)) (((aaa)))
+%
+% Inverse direction:
+% (((aaa)))
+% (aaa) ((aaa)) ((ccc))
+% aaa ccc eee (ccc) ggg (((ccc)))
+% 1 3 5 7 9
+% a ` b / ` c / d ` e /f ` g / h
+% ` / ` / ` / ` /
+% 2 4 6 8
+% bbb ddd fff hhh
+% (bbb) ((bbb)) (((bbb)))
+% (aaa) ((aaa)) ((ccc))
+% \end{verbatim}
+%
+% The macros have two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+%
+% \begin{verbatim}
+% \nonamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \nonamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to h (or A to H),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at the upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at the lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% e : 5,6-double bond
+% E : 5,6-double bond in an opposite side
+% f : 6,7-double bond
+% F : 6,7-double bond in an opposite side
+% g : 7,8-double bond
+% G : 7,8-double bond in an opposite side
+% h : 8,9-double bond
+% H : 8,9-double bond in an opposite side
+% \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 9
+%
+% 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 9
+%
+% 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
+% nW : terminal single bond (n=1 or 9)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \nonamethylene{1==N}{1==Cl;2==F}
+% \nonamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The macros |\nonamethylene| and |\nonamethylenei| are
+% based on a common inner macro |\@nonamethylene|,
+% the definition of which uses a picture environment.
+%
+% \begin{macro}{\nonamethylene}
+% \begin{macrocode}
+\def\nonamethylene{%
+\@ifnextchar[{\set@normaldirection\@nonamethylene[@}{%
+\set@normaldirection\@nonamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\nonamethylenei}
+% \begin{macrocode}
+\def\nonamethylenei{%
+\@ifnextchar[{\set@inversedirection\@nonamethylene[@}{%
+\set@inversedirection\@nonamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% Inner temporary commands such as |\@@trinormorinv| and
+% |\@@dinormorinv| in the common |\@nonamethylene| macro
+% are replaced by active commands such as |\@@trimethylene| and
+% |\@@dimethylene|. They carry out the following unit processes.
+% \begin{enumerate}
+% \item Adjusting substitution site:
+% |\yltrimethyleneposition|
+% or |\yldimethyleneposition| for normal direction;
+% |\yltrimethyleneiposition|
+% or |\yldimethyleneiposition| for inverse direction.
+% \item Treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents:
+% |\@@trimethylene|
+% or |\@@dimethylene| for normal direction;
+% |\@@trimethylenei|
+% or |\@@dimethylenei| for normal direction.
+% \end{enumerate}
+%
+% \begin{macro}{\@nonamethylene}
+% \begin{macrocode}
+\def\@nonamethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\@yltrinormorinv{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-4}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-6}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-1026}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1790,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `nonamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else\if\member e\relax%dummy
+\else\if\member E\relax%dummy
+\else\if\member f\relax%dummy
+\else\if\member F\relax%dummy
+\else\if\member g\relax%dummy
+\else\if\member G\relax%dummy
+\else\if\member h\relax%dummy
+\else\if\member H\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@nonameth% for all bonds
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member e\relax
+\@adoublebondtrue
+\else\if\member E\relax
+\@Adoublebondtrue
+\else\if\member f\relax
+\@bdoublebondtrue
+\else\if\member F\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member g\relax
+\@adoublebondtrue
+\else\if\member G\relax
+\@Adoublebondtrue
+\else\if\member h\relax
+\@bdoublebondtrue
+\else\if\member H\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\if@normorinvsw% inverse
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\else% normal
+\@wrongbdWatrue
+\@wrongbdWdfalse
+\fi
+\put(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
+\end{picture}}% end of \@nonamethylene
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@nonameth| 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@nonameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@nonameth}} +% \begin{macrocode}
+\def\set@fusion@nonameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@normorinvsw
+ \if\@@tmpa h\relax%
+ \putlratom{1198}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
+ \else\if\@@tmpa H\relax%
+ \putlratom{1369}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
+ \else
+ \set@fusion@octameth
+ \fi\fi
+\else
+ \if\@@tmpa h\relax%
+ \putlratom{1198}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
+ \else\if\@@tmpa H\relax%
+ \putlratom{1369}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
+ \else
+ \set@fusion@octameth
+ \fi\fi
+\fi
+}% end of the macro \set@fusion@nonameth
+% \end{macrocode}
+% \end{macro}
+%
+% \section{Decamethylenes of normal and inverse directions}
+%
+% Decamethylene and hetera derivatives are typeset with the commands
+% |\decamethylene| and |\decamethylenei|. The former macro
+% is to draw decamethylenes of normal direction, while the latter
+% is to draw ones of inverse directions.
+%
+% \begin{verbatim}
+% Normal direction:
+%
+% (bbb) ((bbb)) (((bbb)))
+% bbb ddd fff hhh <bbb>
+% 2 4 6 8 10
+% a / ` b / c` d / e ` f /g ` h / i
+% / ` / ` / ` / ` /
+% 1 3 5 7 9
+% aaa ccc eee gggg (((ccc)))
+% (aaa) (ccc) ((ccc)) <aaa>
+% ((aaa)) (((aaa)))
+%
+% Inverse direction:
+% (((aaa)))
+% (aaa) ((aaa)) ((ccc)) <aaa>
+% aaa ccc eee (ccc) ggg (((ccc)))
+% 1 3 5 7 9
+% a ` b / ` c / d ` e /f ` g / h ` i
+% ` / ` / ` / ` / `
+% 2 4 6 8 10
+% bbb ddd fff hhh <bbb>
+% (bbb) ((bbb)) (((bbb)))
+% \end{verbatim}
+%
+% The macros have two arguments |ATOMLIST| and |SUBSLIST|
+% as well as an optional argument |BONDLIST|.
+% \begin{verbatim}
+% \decamethylene[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \decamethylenei[BONDLIST]{ATOMLIST}{SUBSLIST}
+% \end{verbatim}
+%
+% The |BONDLIST| argument contains one character selected from
+% a to i (or A to I),
+% each of which indicates the presence of an inner (endcyclic) double
+% bond on the corresponding position. A lowercase letter is used
+% to typeset a double bond at the upper-side of an outer skeletal bond,
+% while an uppercase letter typesets a double bond at the lower-side of
+% an outer skeletal bond.
+% (Note that the option `A' represents an aromatic circle in
+% commands |\sixheterov| etc.)
+%
+% \begin{verbatim}
+% BONDLIST =
+%
+% [] or none : no double bond
+% a : 1,2-double bond
+% A : 1,2-double bond in an opposite side
+% b : 2,3-double bond
+% B : 2,3-double bond in an opposite side
+% c : 3,4-double bond
+% C : 3,4-double bond in an opposite side
+% d : 4,5-double bond
+% D : 4,5-double bond in an opposite side
+% e : 5,6-double bond
+% E : 5,6-double bond in an opposite side
+% f : 6,7-double bond
+% F : 6,7-double bond in an opposite side
+% g : 7,8-double bond
+% G : 7,8-double bond in an opposite side
+% h : 8,9-double bond
+% H : 8,9-double bond in an opposite side
+% i : 9,10-double bond
+% I : 9,10-double bond in an opposite side
+% \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 10
+%
+% 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 10
+%
+% nD : exocyclic double bond at n-atom
+% n or nS : exocyclic single bond at n-atom
+% nA : alpha single bond at n-atom
+% nB : beta single bond at n-atom
+% nSA : alpha single bond at n-atom (boldface)
+% nSB : beta single bond at n-atom (dotted line)
+% nSa : alpha (not specified) single bond at n-atom
+% nSb : beta (not specified) single bond at n-atom
+% nW : terminal single bond (n=1 or 10)
+%
+% \end{verbatim}
+%
+% Several examples are shown as follows.
+% \begin{verbatim}
+% e.g.
+%
+% \decamethylene{1==N}{1==Cl;2==F}
+% \decamethylenei[b]{1==N}{1==Cl;4==F;2==CH$_{3}$}
+% \end{verbatim}
+%
+% The macros |\decamethylene| and |\decamethylenei| are
+% based on a common inner macro |\@decamethylene|,
+% the definition of which uses a picture environment.
+% \begin{macro}{\decamethylene}
+% \begin{macrocode}
+\def\decamethylene{%
+\@ifnextchar[{\set@normaldirection\@decamethylene[@}{%
+\set@normaldirection\@decamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\decamethylenei}
+% \begin{macrocode}
+\def\decamethylenei{%
+\@ifnextchar[{\set@inversedirection\@decamethylene[@}{%
+\set@inversedirection\@decamethylene[]}}
+% \end{macrocode}
+% \end{macro}
+%
+% Inner temporary commands such as |\@@trinormorinv| and
+% |\@@dinormorinv| in the common |\@decamethylene| macro
+% are replaced by active commands such as |\@@trimethylene| and
+% |\@@dimethylene|. They carry out the following unit processes.
+% \begin{enumerate}
+% \item Adjusting substitution site:
+% |\yltrimethyleneposition|
+% or |\yldimethyleneposition| for normal direction;
+% |\yltrimethyleneiposition|
+% or |\yldimethyleneiposition| for inverse direction.
+% \item Treating atom list,
+% placing outer skeletons, inner double bonds,
+% setting hetero atoms, and
+% placing substituents:
+% |\@@trimethylene|
+% or |\@@dimethylene| for normal direction;
+% |\@@trimethylenei|
+% or |\@@dimethylenei| for normal direction.
+% \end{enumerate}
+%
+% \begin{macro}{\@decamethylene}
+% \begin{macrocode}
+\def\@decamethylene[#1]#2#3{%
+\iniflag\iniatom%
+\@reset@ylsw%
+{\@linterchainswfalse%
+\@rinterchainswtrue%
+\@yltrinormorinv{#2}{#3}{0}{0}}%
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{0}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-2}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-342}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-4}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-684}\def\@@yli{0}\fi
+\else
+{\@rinterchainswtrue%
+\@linterchainswtrue%
+\@yltrinormorinv{#2}{#3}{1}{-6}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-1026}\def\@@yli{0}\fi
+\else
+{\@rinterchainswfalse%
+\@linterchainswtrue%
+\@yldinormorinv{#2}{#3}{1}{-8}}%
+\fi
+\if@ylsw \ifx\@@ylii\empty
+\def\@@ylii{-1368}\def\@@yli{0}\fi\fi
+\if@ylsw
+ \yl@shiftii=\@ylii
+ \yl@shifti=\@yli
+ \advance\yl@shiftii\@@ylii
+ \advance\yl@shifti\@@yli
+ \advance\yl@shiftii\yl@xdiff
+ \advance\yl@shifti\yl@ydiff
+ \begin{picture}(0,0)(-\yl@shiftii,-\yl@shifti)
+ \reset@yl@xydiff%1999/1/6 by S. Fujita
+\else
+\begin{picture}(1960,480)(-200,-180)
+ \iforigpt \put(-200,-180){\circle*{50}}%
+ \put(0,0){\circle{50}}%
+ \typeout{command `decamethylene' origin: %
+ (0,0) ---> (200,180)}\fi%
+\fi%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member a\relax
+\@adoublebondtrue
+\else\if\member b\relax
+\@bdoublebondtrue
+\else\if\member A\relax
+\@Adoublebondtrue
+\else\if\member B\relax
+\@Bdoublebondtrue
+\else\if\member c\relax%dummy
+\else\if\member C\relax%dummy
+\else\if\member d\relax%dummy
+\else\if\member D\relax%dummy
+\else\if\member e\relax%dummy
+\else\if\member E\relax%dummy
+\else\if\member f\relax%dummy
+\else\if\member F\relax%dummy
+\else\if\member g\relax%dummy
+\else\if\member G\relax%dummy
+\else\if\member h\relax%dummy
+\else\if\member H\relax%dummy
+\else\if\member i\relax%dummy
+\else\if\member I\relax%dummy
+\else
+ \expandafter\twoCH@@R\member//%
+ \set@fusion@decameth% for all bonds
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(0,0){\@@trinormorinv{#2}{#3}{0}{0}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member c\relax
+\@adoublebondtrue
+\else\if\member d\relax
+\@bdoublebondtrue
+\else\if\member C\relax
+\@Adoublebondtrue
+\else\if\member D\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(342,0){\@@trinormorinv{#2}{#3}{1}{-2}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member e\relax
+\@adoublebondtrue
+\else\if\member E\relax
+\@Adoublebondtrue
+\else\if\member f\relax
+\@bdoublebondtrue
+\else\if\member F\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(684,0){\@@trinormorinv{#2}{#3}{1}{-4}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member g\relax
+\@adoublebondtrue
+\else\if\member G\relax
+\@Adoublebondtrue
+\else\if\member h\relax
+\@bdoublebondtrue
+\else\if\member H\relax
+\@Bdoublebondtrue
+\fi\fi\fi\fi}%
+\@wrongbdWatrue
+\@wrongbdWdtrue
+\put(1026,0){\@@trinormorinv{#2}{#3}{1}{-6}}}%
+{\reset@double%
+\@tfor\member:=#1\do{%
+\if\member i\relax
+\@adoublebondtrue
+\else\if\member I\relax
+\@Adoublebondtrue
+\fi\fi}%
+\if@normorinvsw% inverse
+\@wrongbdWatrue
+\@wrongbdWdfalse
+\else% normal
+\@wrongbdWafalse
+\@wrongbdWdtrue
+\fi
+\put(1368,0){\@@dinormorinv{#2}{#3}{1}{-8}}}%
+\end{picture}}% end \@decamethylene
+% \end{macrocode}
+% \end{macro}
+%
+% The inner command |\set@fusion@decameth| 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@decameth}
+% \changes{v2.00}{1998/12/21}{New command: \cs{set@fusion@decameth}} +% \begin{macrocode}
+\def\set@fusion@decameth{%
+% %%%%%%%%%%%%%%%%%%%%%
+% % inner bond fusion %
+% %%%%%%%%%%%%%%%%%%%%%
+\if@normorinvsw
+ \if\@@tmpa h\relax%
+ \putlratom{1198}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
+ \else\if\@@tmpa H\relax%
+ \putlratom{1369}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
+ \else\if\@@tmpa i\relax%
+ \putlratom{1369}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
+ \else\if\@@tmpa I\relax%
+ \putlratom{1540}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
+ \else
+ \set@fusion@octameth
+ \fi\fi\fi\fi
+\else
+ \if\@@tmpa h\relax%
+ \putlratom{1198}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{h}%
+ \else\if\@@tmpa H\relax%
+ \putlratom{1369}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{H}%
+ \else\if\@@tmpa i\relax%
+ \putlratom{1369}{0}{\@@tmpb}% % bond fused
+ \FuseWarning{-171}{-103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{i}%
+ \else\if\@@tmpa I\relax%
+ \putlratom{1540}{103}{\@@tmpb}% % bond fused
+ \FuseWarning{171}{103}%
+ {\fuseAx}{\fuseAy}{\fuseBx}{\fuseBy}{I}%
+ \else
+ \set@fusion@octameth
+ \fi\fi\fi\fi
+\fi%
+}% end of the macro \set@fusion@decameth
+%</methylen>
+% \end{macrocode}
+% \end{macro}
+%
+% \Finale
+%
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/methylen.ins b/Master/texmf-dist/source/latex/xymtex/methylen.ins new file mode 100644 index 00000000000..660232fd285 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/methylen.ins @@ -0,0 +1,49 @@ +\def\batchfile{methylen.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1998 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.02 Released on October 31, 1996 (private version)
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{methylen.drv}{t}{%
+ \from{methylen.dtx}{driver}}
+
+\generateFile{methylen.sty}{t}{%
+ \from{methylen.dtx}{methylen}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/polymers.dtx b/Master/texmf-dist/source/latex/xymtex/polymers.dtx new file mode 100644 index 00000000000..843f326e9a7 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/polymers.dtx @@ -0,0 +1,717 @@ +% \iffalse meta-comment +%% File: polymers.dtx +% +% Copyright 1996, 1998 by Shinsaku Fujita +% +% This file is part of XyMTeX system. +% ------------------------------------- +% +% 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]. +% +% Copying of this file is authorized only if either +% (1) you make absolutely no changes to your copy, including name and +% directory name; or +% (2) if you do make changes, +% (a) you name it something other than the names included in the +% ``xymtex'' directory and +% (b) you are requested to leave this notice intact. +% This restriction ensures that all standard styles are identical. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., +% Minami-Ashigara, Kanagawa-ken, 250-01, Japan. +% +% New address: +% Shinsaku Fujita, +% Department of Chemistry and Materials Technology, +% Kyoto Institute of Technology, \\ +% Matsugasaki, Sakyoku, Kyoto, 606 Japan +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{polymers} +% \def\versi@ndate{August 16, 1996} +% \def\versi@nno{ver1.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{polymers} +% \def\versi@ndate{October 31, 1998} +% \def\versi@nno{ver1.02} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \fi +% +% \CheckSum{503} +%% \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.00}{1996/07/07}{first edition for LaTeX2e} +% \changes{v1.02}{1998/10/31}{revised edition for LaTeX2e} +% \changes{v2.00}{1998/12/25}{enhanced edition for LaTeX2e} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{polymers.dtx}[1998/12/25 v2.00 XyMTeX{} package file] +% \iffalse +\documentclass{ltxdoc} +\GetFileInfo{polymers.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{Polymers by {\sffamily polymers.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Department of Chemistry and Materials Technology, \\ +Kyoto Institute of Technology, \\ +Matsugasaki, Sakyoku, Kyoto, 606 Japan +% % (old address) +% % Ashigara Research Laboratories, +% % Fuji Photo Film Co., Ltd., \\ +% % Minami-Ashigara, Kanagawa, 250-01 Japan +} +\date{\filedate} +% +\begin{document} + \maketitle + \DocInput{polymers.dtx} +\end{document} +%</driver> +% \fi +% +% \section{Introduction}\label{polymers:intro} +% +% \subsection{Options for {\sffamily docstrip}} +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% \emph{option} & \emph{function}\\ \hline +% polymers & polymers.sty \\ +% driver & driver for this dtx file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsection{Version Information} +% +% \begin{macrocode} +%<*polymers> +\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 2.00} +\typeout{ -- Released December 25, 1998 by Shinsaku Fujita} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\j@urnalname{polymers} +\def\versi@ndate{December 25, 1998} +\def\versi@nno{ver2.00} +\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +% \end{macrocode} +% +% \section{List of commands for polymers.sty} +% +% \begin{verbatim} +% ********************************** +% * polymers.sty: list of commands * +% ********************************** +% +% <Delimeters for polymer units> +% +% \leftPMdelim \rightPMdelim +% \leftpmdelim \rightpmdelim +% +% \leftPolymer \leftpolymer +% \rightPolymer \rightpolymer +% +% \leftsqrPolymer \leftSqrpolymer +% \lsqrdelimiter \leftsqrpolymer +% +% \rightsqrPolymer \rightSqrpolymer +% \rsqrdelimiter \rightsqrpolymer +% +% \@sqrpolymer +% \sqrpolymer \Sqrpolymer +% \mpolymer +% +% <Bonds for polymers> +% +% \WestPbond \EastPbond +% \sbond +% +% <Polymers> +% +% \polyethylene \@polyethylene +% \polystyrene \@polystyrene +% +% \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 polymers.sty} for the present case). Hence, the combination +% of |\input| and |\@ifundefined| is used to crossload sty +% files ({\sf chemstr.sty} etc. 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{Westbond}{\input aliphat.sty\relax}{} +\@ifundefined{bzdrv}{\input carom.sty\relax}{} +\unitlength=0.1pt +% \end{macrocode} +% +% \begin{macrocode} +% **************************************************** +% * For separating an augument list to each argument * +% **************************************************** +% +\def\@forsemicol#1:=#2\do#3{% +%% \edef\@fortmp{#2}\ifx\@fortmp\@empty% + \expandafter\def\expandafter\@fortmp\expandafter{#2}% + \ifx\@fortmp\@empty% + \else% + \expandafter\@forl@@p#2;\@nil;\@nil\@@#1{#3}\fi} +% \end{macrocode} +% +% \section{Delimeters for polymer units} +% +% \subsection{Right and left delimeters} +% +% A polymer structure has a unit surrounded by +% parentheses or other delimeters. For drawing a +% parenthesis as the part of a substituent, +% the following commands are prepared. +% +% \subsubsection{Parentheses} +% +% \begin{macro}{\leftPMdelim} +% \begin{macro}{\leftpmdelim} +% \begin{macrocode} +% ******************************** +% * Delimeters for polymer units * +% ******************************** +\def\leftPMdelim#1{$\mathstrut #1$} +\def\leftpmdelim{\leftPMdelim{\biggm(}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\rightPMdelim} +% \begin{macro}{\rightpmdelim} +% \begin{macrocode} +\def\rightPMdelim#1#2{% + $\mathstrut #1_{\mkern-5mu #2}$} +\def\rightpmdelim#1{\rightPMdelim{\biggm)}{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\leftpolymer| typesets the left parenthesis of +% a polymer unit. +% The command |\leftPolymer| is the inner commend of |\leftpolymer|, +% where a delimeter can be selected as an argument. +% +% \begin{macro}{\leftPolymer} +% \begin{macro}{\leftpolymer} +% \begin{macrocode} +\def\leftPolymer#1#2{% +\begin{picture}(0,0)(0,0) +\putlatom{0}{0}{#2} +\putlatom{120}{0}{$#1$} +\end{picture}} +\def\leftpolymer#1{\leftPolymer{\biggm(}{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\rightpolymer| typesets the left parenthesis of +% a polymer unit along with a repeating number as a subscript. +% The command |\rightPolymer| is the inner commend of |\rightpolymer|, +% where a delimeter can be selected as an argument. +% +% \begin{macro}{\Rightpolymer} +% \begin{macro}{\rightpolymer} +% \begin{macrocode} +\def\rightPolymer#1#2#3{% +\begin{picture}(0,0)(0,0) +\putratom{0}{0}{#2} +\putratom{-150}{0}{% +% $\mathstrut#1_{\mkern-3mu \mbox{\scriptsize\rm #3}}$} + $\mathstrut#1_{\mkern-2mu #3}$} +\end{picture}} +\def\rightpolymer#1#2{\rightPolymer{\biggm)}{#1}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{Brackets} +% +% The command |\leftSqrpolymer| typesets the left bracket of +% a polymer unit. +% The command |\leftsqrPolymer| is the inner commend of |\leftSqrpolymer|, +% where a delimeter can be selected as an argument. +% The bracket selected by the command |\leftSqrpolymer| is +% a \TeX{} big mathematical symbol, +% the line of which is +% boldfaced. +% +% \begin{macro}{\leftsqrPolymer} +% \begin{macro}{\leftSqrpolymer} +% \begin{macrocode} +\def\leftsqrPolymer#1#2{% +\begin{picture}(0,0)(0,0) +\putlatom{0}{0}{#2} +\putlatom{120}{0}{$#1$} +\end{picture}} +\def\leftSqrpolymer#1{\leftsqrPolymer{\Biggm[}{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\rightSqrpolymer| typesets the right bracket of +% a polymer unit. +% The command |\rightsqrPolymer| is the inner commend of |\rightSqrpolymer|, +% where a delimeter can be selected as an argument. +% The bracket selected by the command |\rightSqrpolymer| is +% a \TeX{} big mathematical symbol, +% the line of which is boldfaced. +% +% \begin{macro}{\rightsqrPolymer} +% \begin{macro}{\rightSqrpolymer} +% \begin{macrocode} +\def\rightsqrPolymer#1#2#3{% +\begin{picture}(0,0)(0,0) +\putratom{0}{0}{#2} +\putratom{-150}{0}{% +% $\mathstrut #1_{\mbox{\scriptsize\rm #3}}$} + $\mathstrut #1_{#3}$} +\end{picture}} +\def\rightSqrpolymer#1#2{\rightsqrPolymer{\Biggm]}{#1}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% For drawing polymer brackets of thin line width, +% we prepare the command |\lsqrdelimiter|. The height of +% the bracket can be designated by the argument of this +% command. The command +% is used to define the command |\leftsqrpolymer|. +% This command typesets a left bracket of thin line width. +% +% \begin{macro}{\lsqrdelimiter} +% \begin{macro}{\leftsqrpolymer} +% \begin{macrocode} +\def\lsqrdelimiter#1{% +\hbox{\vrule \@width\fboxrule +$\vcenter to#1{% +\hrule \@height\fboxrule \@width\fboxsep +\vfill +\hrule \@height\fboxrule \@width\fboxsep}$}} +\def\leftsqrpolymer#1{% + \leftsqrPolymer{\lsqrdelimiter{300\unitlength}}{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The command |\rsqrdelimiter| is +% used to define the command |\rightsqrpolymer|, which +% typesets a right bracket of thin line width. +% +% \begin{macro}{\rsqrdelimiter} +% \begin{macro}{\rightsqrpolymer} +% \begin{macrocode} +\def\rsqrdelimiter#1{% +\hbox{$\vcenter to#1{% +\hrule \@height\fboxrule \@width\fboxsep \vfill +\hrule \@height\fboxrule \@width\fboxsep}$\kern-\fboxrule +\vrule \@width\fboxrule\kern2pt}} +\def\rightsqrpolymer#1#2{% +\rightsqrPolymer{\rsqrdelimiter{300\unitlength}}{#1}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Pairs of delimeters} +% +% The command |\sqrpolymer| typesets a pair of thin-line brackets that +% surrounds a polymer unit after measuring the height of +% the unit. On the other hand, +% the command |\Sqrpolymer| typesets a pair of thick-line brackets. +% Both of the commands are based on the inner macro |\@sqrpolymer|, +% in which a line width is designated by means of an argument. +% +% \begin{macro}{\@sqrpolymer} +% \begin{macro}{\sqrpolymer} +% \begin{macro}{\Sqrpolymer} +% \begin{macrocode} +\long\def\@sqrpolymer#1#2#3{% +\begingroup \fboxrule=#1 + \leavevmode\setbox\@tempboxa\hbox{#2}\@tempdima\fboxrule + \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa + \@tempdimb=\wd\@tempboxa + \advance\@tempdimb by \fboxsep + \advance\@tempdimb by \fboxsep + \advance\@tempdimb by \fboxrule + \advance\@tempdimb by \fboxrule + \hbox{\lower \@tempdima\hbox + {\vbox{ + \hbox to\@tempdimb{% + \vrule \@height \fboxrule \@width\fboxsep\hfill + \vrule \@height \fboxrule \@width\fboxsep} + \nointerlineskip + \hbox{\vrule \@width \fboxrule \hskip\fboxsep + \vbox{\vskip\fboxsep \copy\@tempboxa\vskip\fboxsep}\hskip + \fboxsep\vrule \@width \fboxrule} + \nointerlineskip + \hbox to\@tempdimb{% + \vrule \@height \fboxrule \@width\fboxsep\hfill + \vrule \@height \fboxrule \@width\fboxsep}}}}% +\kern2pt\lower\@tempdima\hbox{\scriptsize$#3$}\endgroup} +\long\def\sqrpolymer#1#2{\@sqrpolymer{0.4pt}{#1}{#2}} +\long\def\Sqrpolymer#1#2{\@sqrpolymer{1pt}{#1}{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The command |\mpolymer| typesets a pair of parentheses that +% surrounds a polymer unit after measuring the height of +% the unit. +% +% \begin{macro}{\mpolymer} +% \begin{macrocode} +\long\def\mpolymer#1#2{% + \leavevmode\setbox\@tempboxa\hbox{#1}\@tempdima\fboxrule + \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa + \hbox{\lower \@tempdima\hbox{\vbox{\hbox{\hskip\fboxsep% + $\left(\vcenter{\vskip\fboxsep \copy\@tempboxa\vskip\fboxsep}% + \right)_{#2}$}}}}} +% \end{macrocode} +% \end{macro} +% +% \section{Commands for drawing polymers} +% +% \subsection{Bonds for polymers} +% +% The original commands +% |\Westbond| and |\Eastbond| are changed into +% |\WestPbond| and |\EastPbond|, where each bond is lengthened +% for making a space for drawing delimiters. +% +% \begin{macro}{\WestPbond} +% \begin{macro}{\EastPbond} +% \begin{macro}{\sbond} +% \begin{macrocode} +% ********************** +% * Bonds for polymers * +% ********************** +\def\WestPbond{% +\begin{picture}(100,100)(0,0) +\put(-100,0){\Westbond} +\put(-60,0){\line(-1,0){90}} +\end{picture}} +\def\EastPbond{% +\begin{picture}(100,100)(0,0) +\put(100,0){\Eastbond} +\put(60,0){\line(1,0){90}} +\end{picture}} +\def\sbond{% +\begin{picture}(160,0)(0,0) +\put(0,33){\line(1,0){160}} +\end{picture}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Polyethylene unit} +% +% The command |\polyethylene| is used to draw polyethylene derivatives, +% in which each substituent is designated by the |SUBSLIST|. +% The following numbering is used in this macro. +% +% \begin{verbatim} +% ******************** +% * polyethylene unit* +% ******************** +% +% The following numbering is adopted in this macro. +% +% | 1 6 | +% | | +% | | | | +% 2 ---- (1) -- (2) ---- 5 +% | | (0) | | +% | | +% | 3 4 |0 +% \end{verbatim} +% +% The command |\polyethylene| has arguments, +% |CALIST| and |SUBSLIST|, as well as an optional argument |AUXLIST|. +% \begin{verbatim} +% \polyethylene[AUXLIST]{CALIST}{SUBSLIST} +% \end{verbatim} +% +% The optional argument |AUXLIST| is used for +% typesetting auxiliary symbols on central atoms. +% \begin{verbatim} +% AUXLIST = +% +% {n+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The argument |CALIST| is used for indicating center atoms. +% \begin{verbatim} +% CALIST: central atom list +% +% for 1 : cetral atom (e.g. 1==C) +% 2 : cetral atom (e.g. 2==C) +% 0 : cetral bond (e.g. 0D==) +% \end{verbatim} +% +% The argument |SUBSLIST| is used for indicating substituents. +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% \end{verbatim} +% +% \begin{macro}{\if@centbondsw} +% \begin{macro}{\if@centatswi} +% \begin{macro}{\if@centatswii} +% \begin{macrocode} +\newif\if@centbondsw \@centbondswfalse +\newif\if@centatswi \@centatswifalse +\newif\if@centatswii \@centatswiifalse +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\polyethylene} +% \begin{macro}{\@polyethylene} +% \begin{macrocode} +\def\polyethylene{\@ifnextchar[{\@polyethylene}{\@polyethylene[]}} +\def\@polyethylene[#1]#2#3{% + \begin{picture}(1100,600)(-400,-300)% + \iforigpt \put(-400,-300){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `polyethylene' origin: % + (\the\noshift,\the\noshift) ---> (400,300)}\fi% +% \end{macrocode} +% +% \begin{macrocode} +% ************ +% * aux list * +% ************ +\def\@@@temp{#1} +\ifx\@@@temp\empty\else +\@tfor\member:=#1\do{% + \expandafter\twoch@@r\member{}{}% + \ifcase\@@tmpa + \or \relax \putratom{47}{50}{\scriptsize\@@tmpb}% + \or \relax \putratom{347}{50}{\scriptsize\@@tmpb}% +\fi}\fi +% \end{macrocode} +% +% \begin{macrocode} +% ***************** +% * central atoms * +% ***************** +\@forsemicol\member:=#2\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% + \expandafter\threech@r\@membera{}{}% + \ifcase\@tmpa \global\@centbondswtrue \put(20,0){\Eastbond}% + \or \global\@centatswitrue \putlratom{-40}{-33}{\@memberb}% + \or \global\@centatswiitrue \putlratom{260}{-33}{\@memberb}% +\fi\fi}% +\if@centatswi \else \putlratom{-40}{-33}{C}\fi +\if@centatswii \else \putlratom{260}{-33}{C}\fi +\if@centbondsw \else \put(70,0){\line(1,0){160}}\fi +\global\@centbondswfalse +\global\@centatswifalse +\global\@centatswiifalse +% \end{macrocode} +% +% \begin{macrocode} +% **************** +% * Substituents * +% **************** +\gdef\numrepeated{x} +\@forsemicol\member:=#3\do{% +\ifx\member\empty\else +\expandafter\@m@mb@r\member;\relax% +\expandafter\threech@r\@membera{}{}% +\ifcase\@tmpa \gdef\numrepeated{\@memberb}% +\or\put(0,0){\Northbond}% +\or\put(0,0){\WestPbond}% +\or\put(0,0){\Southbond}% +\or\put(300,0){\Southbond}% +\or\put(300,0){\EastPbond}% +\or\put(300,0){\Northbond}% +\fi\fi}%end of ifcase +% \end{macrocode} +% +% \begin{macrocode} +% ************** +% * Delimeters * +% ************** +\put(-200,-33){\leftpmdelim} +\put(400,-33){\rightpmdelim{\numrepeated}} +\end{picture}}%end of macro polyethylene +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Polyestyrene unit} +% +% The command |\polyestrene| is used to draw polystyrene derivatives, +% in which substituents on both the polymer chain and the phenyl group +% are designated by the |SUBSLIST| and |PHSUBSLIST|, respectively. +% The following numbering is adopted in this macro. +% \begin{verbatim} +% ******************** +% * polystyrene unit * +% ******************** +% +% | 1 6 | +% | | +% | | | | +% 2 ---- (1) -- (2) ---- 5 +% | | (0) | | +% | | | +% | 3 | |0 +% / ` +% 6 | | 2 +% | | +% 5 ` / 3 +% ` +% 4 +% \end{verbatim} +% +% The command |\polyethylene| has arguments, +% |CALIST|, |SUBSLIST| and |PHSUBSLIST|, +% as well as an optional argument |AUXLIST|. +% \begin{verbatim} +% \polystyrene[AUXLIST]{CALIST}{SUBSLIST}{PHSUBSLIST} +% \end{verbatim} +% +% The optional argument |AUXLIST| is used for +% typesetting auxiliary symbols on central atoms. +% \begin{verbatim} +% AUXLIST = +% +% {n+} : + charge (or another one chararacter) on the center +% \end{verbatim} +% +% The argument |CALIST| is used for indicating center atoms. +% \begin{verbatim} +% CALIST: central atom list +% +% for 1 : cetral atom (e.g. 1==C) +% 2 : cetral atom (e.g. 2==C) +% 0 : cetral bond (e.g. 0D==) +% \end{verbatim} +% +% The argument |SUBSLIST| is used for indicating substituents on +% the polymer chain. +% \begin{verbatim} +% SUBSLIST: list of substituents +% +% for n = 1 to 4 +% +% nT : triple bond at n-atom +% nD : double bond at n-atom +% n or nS : single bond at n-atom +% nA : alpha single bond at n-atom +% nB : beta single bond at n-atom +% \end{verbatim} +% +% The argument |PHSUBSLIST| is used for indicating substituents on +% the phenyl group. +% \begin{verbatim} +% PHSUBSLIST: list of phenyl substituents +% +% for n = 2 to 6 +% +% n or nS : single bond at n-atom +% \end{verbatim} +% +% \begin{macro}{\polyethylene} +% \begin{macro}{\@polyethylene} +% \begin{macrocode} +\def\polystyrene{\@ifnextchar[{\@polystyrene}{\@polystyrene[]}} +\def\@polystyrene[#1]#2#3#4{% +\begin{picture}(1100,1200)(0,-640)% + \iforigpt \put(0,-640){\circle*{50}}% + \put(-\noshift,-\noshift){\circle{50}}% + \typeout{command `polystyrene' origin: % + (\the\noshift,\the\noshift) ---> (0,640)}\fi% +\begingroup \origptfalse +\put(0,0){\polyethylene[#1]{#2}{#3}}% +\put(700,0){\line(0,1){240}}% +\put(300,-646){\bzdrv{#4}}% +\endgroup +\end{picture}}%end of macro polystyrene +%</polymers> +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \Finale +% +\endinput +
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/polymers.ins b/Master/texmf-dist/source/latex/xymtex/polymers.ins new file mode 100644 index 00000000000..66e71995c27 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/polymers.ins @@ -0,0 +1,50 @@ +\def\batchfile{polymers.ins}
+\input docstrip.tex
+\preamble
+
+This is a generated file.
+
+Copyright 1996,1998 by Shinsaku Fujita
+
+This file is part of the XyMTeX system.
+=======================================
+
+Version 1.01 Released on August 16, 1996
+Version 1.02 Released on October 31, 1996 (private version)
+Version 2.00 Released on December 25, 1998
+
+Copyright (C) 1998 by Shinsaku Fujita, all rights reserved.
+This style file is created for drawing chemical structural formulas
+This style file is to be contained in the ``xymtex'' directory which
+is an input directory for TeX.
+
+Copying of this file is authorized only if either
+
+ (1) you make absolutely no changes to your copy, including name and
+ directory name
+ (2) if you do make changes,
+ (a) you name it something other than the names included in the
+ ``xymtex'' directory and
+ (b) you acknowledge the original name.
+ This restriction ensures that all standard styles are identical.
+
+=======================================
+
+This file contains several codes modified from latex.tex (LaTeX2.09)
+and from latex.ltx (a LaTeX2e), the reused parts of which are subject to
+Copyright 1994 the LaTeX3 project and the individual authors (For further
+copyright information see the file legal.txt of the LaTeX2e standard
+distribution, and any other copyright indicated in this file.)
+
+\endpreamble
+
+\keepsilent
+
+\generateFile{polymers.drv}{t}{%
+ \from{polymers.dtx}{driver}}
+
+\generateFile{polymers.sty}{t}{%
+ \from{polymers.dtx}{polymers}}
+
+\endinput
+
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/xymtex/xymtex2.jpn b/Master/texmf-dist/source/latex/xymtex/xymtex2.jpn new file mode 100644 index 00000000000..341acf60360 --- /dev/null +++ b/Master/texmf-dist/source/latex/xymtex/xymtex2.jpn @@ -0,0 +1,86 @@ +xymtex2.jpn +XyMTeXのオンラインドキュメント (日本語版) +Copyright (C) 1993, 1996, 1998 by Shinsak Fujita. All rights reserved. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +(旧)xymtex1.jpnを改名 +XyMTeXのオンラインドキュメント (日本語版) +Copyright (C) 1993, 1996 by Shinsak Fujita. All rights reserved. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +`XyMTeX' は化学構造式を描くためのマクロパッケージです。 + +(1) 設定 + + このマクロパッケージは、LHAで圧縮されています。この解凍は、次のように + 行います。 + まず、圧縮されたxymtex2.lzhが、ディレクトリーb:にあるとします。解凍先を + ディレクトリーa:\texとします。ディレクトリーa:\texに入ったのち、コマンド + ラインに次のように入力します。 + + a:\tex>lha x b:\xymtex2 + + この結果、解凍が行われて、ディリクトリー\xymtexが自動的に発生します。 + 発生したディレクトリーは、階層を略さずに書けば、a:\tex\xymtexとなります。 + このディレクトリーの中に、XyMTeXの各種スタイルファイルやドキュメント類 + が次のように展開されています。 + + a---\tex---\xymtex --- hetaromh.sty, hetarom.sty, ccycle.sty, + | | | chemstr.sty, carom.sty, lowcycl.sty, aliphat.sty, + | hcycle.sty, locant.sty, polymers.sty, chemist.sty + | methylen.sty, fusering.sty + | + | (dtx files) + | + |--\drvdvi---drv files, dvi files + | + |--\doc200--- xymtx200.tex, xymtx200.dvi, + | xymyl.tex, xymadd.tex + | (other files for the document preparation) + | + |---xymtex1.doc (英語版オンラインドキュメント) + | + |---xymtex1.jpn (このドキュメント) + | + |---readme1.doc (覚え書き) + | + |---readme1.jpn (覚え書き) + + 同時にアップロードしたxymtx200.dviは、本システムに含まれるコマンドの + 使用例と仕様を示したものです。プリンタードライバーやプレビューアーにかけて + ご覧下さい。約100ページです。 + また、ディレクトリー\doc200に含まれるxymtx200.texは、xymtx200.dviを発生する + ためのtexファイルです。両者を比較すると、構造式を書くときのヒントが得 + られるでしょう。 + +(2) サーチパスの設定。 + + XyMTeXを使うには、次のようにサーチパスを設定します。この設定は、 + 上記の解凍操作によって発生したことを前提にしています。他のディレクトリー + 階層にした場合は、それに応じてサーチパスを設定して下さい.多分 + ディレクトリー\tex\texmf\web2cに\texmf.cnfが含まれているので, + これにパスを追加してください. + For example, you add + + platex2e_inputs = .;$TEXMF/tex/platex2e//;$TEXMF/tex/latex2e//; + $TEXMF/tex//;a:/tex/inputs//; + a:/tex/chem//;a:/tex/xymtex//;a:/tex/opsty// + ~~~~~~~~~~~~~~~ <---- 追加 +(3) 原稿への記入事項 + + XyMTeXの命令を使うには、その命令の含まれているスタイルファイルを + オプション指定する必要があります。たとえば、hetarom.styとhetaromh.styを + 使うときには、 + + \documentclass{article} + \usepackage{epic,hetarom,hetaromh} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + と、原稿の先頭に記入します。いちいち指定するのが面倒ならば, + + \documentclass{article} + \usepackage{xymtex} + + と指定すると,XyMTeX関係のstyファイルがすべて読み込まれます. + +(4) LaTeXeまたはpLaTeX2eの起動 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(END) +
\ No newline at end of file |