%%
%% This is file `bondcolor.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bondcolor.dtx  (with options: `bondcolor')
%% 
%% This is a generated file.
%% 
%% Copyright 2010 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.
%% 
%% This file is part of the XyMTeX system.
%% =======================================
%% Version 5.00 Released on October 01, 2010
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% The Current Maintainer of this work is Shinsaku Fujita.
%% 
%% This work consists of the files bondcolor.dtx and bondcolor.ins
%% and the derived file bondcolor.sty.
%% 
%% =======================================
%% 
%% File: bondcolor.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         \~}
\typeout{Part of XyMTeX for Drawing Chemical Structural Formulas. Version 5.00}
\typeout{       -- Released October 01, 2010 by Shinsaku Fujita}
\def\j@urnalname{bondcolor}
\def\versi@ndate{October 01, 2010}
\def\versi@nno{ver5.00}
\def\copyrighth@lder{SF} % Shinsaku Fujita
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
\space[\copyrighth@lder]}
\RequirePackage{chemstr}
\RequirePackage{hetarom}
\RequirePackage{hetaromh}
\RequirePackage{methylen}
\newif\ifcolorBLsw \colorBLswfalse
\def\RightAtomBond{%
\@ifnextchar({\Right@tomBond}{\Right@tomBond(0,0)}}
\def\Right@tomBond(#1,#2){%
\@ifnextchar[{\Right@tomB@nd(#1,#2)}{\Right@tomB@nd(#1,#2)[\black]}}
\def\Right@tomB@nd(#1,#2)[#3]{%
\@ifnextchar<{\Right@t@mB@nd(#1,#2)[#3]}{\Right@t@mB@nd(#1,#2)[#3]<>}}
\def\Right@t@mB@nd(#1,#2)[#3]<#4>#5{%
\begingroup
\global\let\FuseWarning=\futileFuseWarning
\let\setbscolor=#3\relax
\@ifundefined{@tmpb}{\edef\@tmpb{0}}{}%dummy
\@ifundefined{@@tmpa}{\colorBLswfalse}{\if\@@tmpa @\relax\else
\edef\@@tmpa{a}\colorBLswtrue\fi}%enforced setting
\@tempcntXa=#1\relax \@tempcntYa=#2\relax
\if\@tmpb s\relax
  \@clipfusefalse
\else
 \if#4s\relax
  \@clipfusefalse
 \else
   \ifcolorBLsw
     \@clipfusetrue
     \advance\@tempcntXa by5\relax%tentative value
     \advance\@tempcntYa by-15\relax%tentative value
   \colorBLswfalse
  \else
   \@clipfusetrue
   \advance\@tempcntXa by40\relax%tentative value
   \advance\@tempcntYa by38\relax%tentative value
\fi\fi\fi
\@forsemicol\member:=#5\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\let\local@tmpa=\@tmpa%global to local 2002/5/30 by SF
\ifcase\local@tmpa%
\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{{\setbscolor\setatombonda}\addbscolor{}{}}%2010/10/01% 0 (upward) (0,1)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondF}\addbscolor{}{}}%2010/10/01%%1 (3,5)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondA}\addbscolor{}{}}%2010/10/01%%2 (1,1)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondf}\addbscolor{}{}}%2010/10/01%%3 (5,3)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondb}\addbscolor{}{}}%2010/10/01%%4 (1,0)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombonde}\addbscolor{}{}}%2010/10/01%%5 (5,-3)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondB}\addbscolor{}{}}%2010/10/01%\or%6 (1,-1)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondE}\addbscolor{}{}}%2010/10/01%%7 (3,-5)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondc}\addbscolor{}{}}%2010/10/01%%8 (0,-1)
\fi%end of ifcase
\fi}\endgroup}%end of definition of \RightAtomBond
\def\LeftAtomBond{%
\@ifnextchar({\Left@tomBond}{\Left@tomBond(0,0)}}
\def\Left@tomBond(#1,#2){%
\@ifnextchar[{\Left@tomB@nd(#1,#2)}{\Left@tomB@nd(#1,#2)[\black]}}
\def\Left@tomB@nd(#1,#2)[#3]{%
\@ifnextchar<{\Left@t@mB@nd(#1,#2)[#3]}{\Left@t@mB@nd(#1,#2)[#3]<>}}
\def\Left@t@mB@nd(#1,#2)[#3]<#4>#5{%
\begingroup
\global\let\FuseWarning=\futileFuseWarning
\let\setbscolor=#3\relax
\@ifundefined{@tmpb}{\edef\@tmpb{0}}{}%dummy
\@ifundefined{@@tmpa}{\colorBLswfalse}{\if\@@tmpa @\relax\else
\edef\@@tmpa{a}\colorBLswtrue\fi}%enforced setting
\@tempcntXa=#1\relax \@tempcntYa=#2\relax
\if\@tmpb s\relax
  \@clipfusefalse
\else
 \if#4s\relax
  \@clipfusefalse
 \else
   \ifcolorBLsw
     \@clipfusetrue
     \advance\@tempcntXa by5\relax%tentative value
     \advance\@tempcntYa by-15\relax%tentative value
   \colorBLswfalse
  \else
   \@clipfusetrue
   \advance\@tempcntXa by40\relax%tentative value
   \advance\@tempcntYa by38\relax%tentative value
\fi\fi\fi
\@forsemicol\member:=#5\do{%
\ifx\member\empty\else%
\expandafter\@m@mb@r\member;\relax%
\expandafter\threech@r\@membera{}{}%
\let\local@tmpa=\@tmpa%global to local 2002/5/30 by SF
\ifcase\local@tmpa%
\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{{\setbscolor\setatombonda}\addbscolor{}{}}%2010/10/01% 0 (upward) (0,1)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondD}\addbscolor{}{}}%2010/10/01%%1 (-3,5)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondH}\addbscolor{}{}}%2010/10/01%%2 (-1,1)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondd}\addbscolor{}{}}%2010/10/01%%3 (-5,3)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondh}\addbscolor{}{}}%2010/10/01%%4 (-1,0)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondg}\addbscolor{}{}}%2010/10/01%%5 (-5,-3)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondC}\addbscolor{}{}}%2010/10/01%%6 (-1,-1)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondG}\addbscolor{}{}}%2010/10/01%%7 (-3,-5)
\or{\setbscolor\Put@Direct(\the\@tempcntXa,\the\@tempcntYa)%
{\setatombondc}\addbscolor{}{}}%2010/10/01%%8 (0,-1)
\fi%end of ifcase
\fi}\endgroup}%end of definition of \LeftAtomBond
\def\addvbonda{\put(0,-406){\bonda}}
\def\addvbondb{\put(-171,-303){\bondb}}
\def\addvbondc{\put(-171,-103){\bondc}}
\def\addvbondd{\put(0,0){\bondd}}
\def\addvbonde{\put(171,-103){\bonde}}
\def\addvbondf{\put(171,-303){\bondf}}
\def\addvibonda{\put(0,0){\bondc}}
\def\addvibondb{\put(-171,-103){\bondb}}
\def\addvibondc{\put(-171,-303){\bonda}}
\def\addvibondd{\put(0,-406){\bondf}}
\def\addvibonde{\put(171,-303){\bonde}}
\def\addvibondf{\put(171,-103){\bondd}}
\def\addhbonda{\put(0,0){\hbonda}}
\def\addhbondb{\put(-103,-171){\hbondb}}
\def\addhbondc{\put(-303,-171){\hbondc}}
\def\addhbondd{\put(-406,0){\hbondd}}
\def\addhbonde{\put(-303,171){\hbonde}}
\def\addhbondf{\put(-103,171){\hbondf}}
\def\addhibonda{\put(-403,0){\hbondc}}
\def\addhibondb{\put(-303,-171){\hbondb}}
\def\addhibondc{\put(-103,-171){\hbonda}}
\def\addhibondd{\put(0,0){\hbondf}}
\def\addhibonde{\put(-103,171){\hbonde}}
\def\addhibondf{\put(-303,171){\hbondd}}
\def\addvvbonda{\put(0,0){\bondc}}
\def\addvvbondb{\put(-171,-103){\bondb}}
\def\addvvbondc{\put(-171,-103){\bondhoriz}}
\def\addvvbondd{\put(171,-303){\bonde}}
\def\addvvbonde{\put(171,-103){\bondd}}
\def\addvvibonda{\put(0,-406){\bonda}}
\def\addvvibondb{\put(-171,-303){\bondb}}
\def\addvvibondc{\put(-171,-103){\bondhorizi}}
\def\addvvibondd{\put(171,-103){\bonde}}
\def\addvvibonde{\put(171,-303){\bondf}}
\def\addvhbonda{\put(-403,0){\hbondc}}
\def\addvhbondb{\put(-303,-171){\hbondb}}
\def\addvhbondc{\put(-303,-171){\hbondvert}}
\def\addvhbondd{\put(-103,171){\hbonde}}
\def\addvhbonde{\put(-303,171){\hbondd}}
\def\addvhibonda{\put(0,0){\hbonda}}
\def\addvhibondb{\put(-103,-171){\hbondb}}
\def\addvhibondc{\put(-303,-171){\hbondverti}}
\def\addvhibondd{\put(-303,171){\hbonde}}
\def\addvhibonde{\put(-103,171){\hbondf}}
\def\MethyleneBonda{\Put@Direct(171,-303){\bondA}}
\def\MethyleneBondb{\Put@Direct(0,-406){\bondB}}
\def\MethyleneBondc{\Put@Direct(171,-303){\bondA}}
\def\MethyleneBondd{\Put@Direct(0,-406){\bondB}}
\def\MethyleneBonde{\Put@Direct(171,-303){\bondA}}
\def\MethyleneBondf{\Put@Direct(0,-406){\bondB}}
\def\MethyleneBondg{\Put@Direct(171,-303){\bondA}}
\def\MethyleneBondh{\Put@Direct(0,-406){\bondB}}
\def\MethyleneBondi{\Put@Direct(171,-303){\bondA}}
\def\MethyleneBondA{\Put@Direct(0,-406){\bondAA}}
\def\MethyleneBondB{\Put@Direct(-171,-303){\bondBB}}
\def\MethyleneBondC{\Put@Direct(0,-406){\bondAA}}
\def\MethyleneBondD{\Put@Direct(-171,-303){\bondBB}}
\def\MethyleneBondE{\Put@Direct(0,-406){\bondAA}}
\def\MethyleneBondF{\Put@Direct(-171,-303){\bondBB}}
\def\MethyleneBondG{\Put@Direct(0,-406){\bondAA}}
\def\MethyleneBondH{\Put@Direct(-171,-303){\bondBB}}
\def\MethyleneBondI{\Put@Direct(0,-406){\bondAA}}
\def\MethyleneiBonda{\Put@Direct(171,-103){\bondAi}}
\def\MethyleneiBondb{\Put@Direct(0,0){\bondBi}}
\def\MethyleneiBondc{\Put@Direct(171,-103){\bondAi}}
\def\MethyleneiBondd{\Put@Direct(0,0){\bondBi}}
\def\MethyleneiBonde{\Put@Direct(171,-103){\bondAi}}
\def\MethyleneiBondf{\Put@Direct(0,0){\bondBi}}
\def\MethyleneiBondg{\Put@Direct(171,-103){\bondAi}}
\def\MethyleneiBondh{\Put@Direct(0,0){\bondBi}}
\def\MethyleneiBondi{\Put@Direct(171,-103){\bondAi}}
\def\MethyleneiBondA{\Put@Direct(0,0){\bondAAi}}
\def\MethyleneiBondB{\Put@Direct(-171,-103){\bondBBi}}
\def\MethyleneiBondC{\Put@Direct(0,0){\bondAAi}}
\def\MethyleneiBondD{\Put@Direct(-171,-103){\bondBBi}}
\def\MethyleneiBondE{\Put@Direct(0,0){\bondAAi}}
\def\MethyleneiBondF{\Put@Direct(-171,-103){\bondBBi}}
\def\MethyleneiBondG{\Put@Direct(0,0){\bondAAi}}
\def\MethyleneiBondH{\Put@Direct(-171,-103){\bondBBi}}
\def\MethyleneiBondI{\Put@Direct(0,0){\bondAAi}}
\def\adddbcolor#1#2{%
\global\let\FuseWarning=\futileFuseWarning
\global\@dbondcolortrue
\edef\@@tmpBondSp{#1}%
\edef\@@tmpBondSpi{i}%
\ifx\@@tmpBondSp\empty\relax%\tetrahemethylene etc.
{\Put@Direct(0,0){#2\expandafter\csname MethyleneBond\@@tmpa\endcsname}}%
\else\ifx\@@tmpBondSp\@@tmpBondSpi\relax%\tetramethyleni etc.
{\Put@Direct(0,0){#2\csname MethyleneiBond\@@tmpa\endcsname}}%
\else
{\Put@Direct(0,0){#2\csname add#1bond\@@tmpa\endcsname}}%
\fi\fi}
\def\addskbcolor#1#2{%
\iflongskbond
{#2\expandafter\csname\skbondreplace\endcsname}%
\else
\if#1\empty\relax
{#2\expandafter\csname skbond\skbondreplace\endcsname}%
\else\if#1v\relax
{#2\expandafter\csname skbond\skbondreplace\endcsname}%
\else
{#2\expandafter\csname #1skbond\skbondreplace\endcsname}%
\fi\fi\fi%
\global\let\FuseWarning=\futileFuseWarning%for methylen package
\global\@dbondcolortrue%for heterarom and heteraromh packages
}
\def\red{\color{red}}
\def\blue{\color{blue}}
\def\green{\color{green}}
\def\black{\color{black}}
\def\cyan{\color{cyan}}
\def\yellow{\color{yellow}}
\def\magenta{\color{magenta}}
\def\white{\color{white}}
\def\xymcolor#1#2{\mbox{\color{#1}#2}}
\def\redx#1{\xymcolor{red}{#1}}
\def\bluex#1{\xymcolor{blue}{#1}}
\def\greenx#1{\xymcolor{green}{#1}}
\def\blackx#1{\xymcolor{black}{#1}}
\def\cyanx#1{\xymcolor{cyan}{#1}}
\def\yellowx#1{\xymcolor{yellow}{#1}}
\def\magentax#1{\xymcolor{magenta}{#1}}
\def\whitex#1{\xymcolor{white}{#1}}
\def\Color@@Line{%
\@ifnextchar[{\C@lor@@Line}{\C@lor@@Line[0.4pt]}}
\def\C@lor@@Line[#1](#2,#3)(#4,#5)#6#7{%
\begingroup
\@tempdima=#1\relax
\ifdim\@tempdima=0.4pt\else
\XyMTeXWarning{The line width is ineffective for TeX/LaTeX mode}%
\fi
\put(0,0){\csname #7\endcsname \Put@Line(#2,#3)(#4,#5){#6}}%
\endgroup}%end of \Color@@Line
\let\Color@Line=\Color@@Line%for TeX/LaTeX mode
\def\replaceSKbond{%
\@ifnextchar[{\repl@ceSKbond}{\repl@ceSKbond[0.4pt]}}
\def\repl@ceSKbond[#1](#2,#3)(#4,#5)#6#7{\begingroup%
\global\let\FuseWarning=\futileFuseWarning
\global\@dbondcolortrue
\def\thinLineWidth{#1}%
\@tempdima=#1 \advance\@tempdima by1.2pt
\put(0,0){\Color@Line[\the\@tempdima](#2,#3)(#4,#5){#6}{white}}%
\put(0,0){#7\Put@Line(#2,#3)(#4,#5){#6}}\endgroup}%
\endinput
%%
%% End of file `bondcolor.sty'.