%%
%% This is file `sizeredc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sizeredc.dtx  (with options: `sizeredc')
%% 
%% This is a generated file.
%% 
%% Copyright 1996, 2001, 2002, 2004 by Shinsaku Fujita
%% 
%% This file is part of the XyMTeX system.
%% =======================================
%% 
%% Released on June 20, 2001 version 1.00
%% Released on April 30, 2002 version 1.01
%% Released on Auguts 30, 2004 version 4.01 (for XyMTeX 4.01)
%% 
%% Copyright (C) 1996, 2001,2002,2004 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: sizeredc.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{XyMTeX for Drawing Chemical Structural Formulas. Version 4.01}
\typeout{       -- Released August 30, 2004 by Shinsaku Fujita}
\def\j@urnalname{sizeredc}
\def\versi@ndate{August 30, 2004}
\def\versi@nno{ver4.01}
\def\copyrighth@lder{SF} % Shinsaku Fujita
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
\space[\copyrighth@lder]}
\newcount\@tempcntx \newcount\@tempcnty \newcount\@tempcntz
\newif\ifseifuflag \seifuflagfalse
\def\DIVIDE#1#2#3{%
\seifuflagfalse \@tempcntx=#1
\ifnum\@tempcntx<0 \@tempcntx=-\@tempcntx\seifuflagtrue\fi
\divide\@tempcntx by#2\relax
\ifnum\@tempcntx<0 \@tempcntx=-\@tempcntx
\ifseifuflag \seifuflagfalse \else \seifuflagtrue\fi\fi
\@tempcntz=\@tempcntx%%store
\@tempcnty=\@tempcntx \multiply\@tempcnty by#2%
\ifnum\@tempcnty<0 \@tempcnty=-\@tempcnty\fi
\@tempcntx=#1%
\ifnum\@tempcntx<0 \@tempcntx=-\@tempcntx\fi
\advance\@tempcntx by-\@tempcnty%
\multiply\@tempcntx by10 \edef\s{\the\@tempcntx}%
\divide\@tempcntx by#2
\ifnum\@tempcntx<0 \@tempcntx=-\@tempcntx\fi
\ifnum\@tempcntx>4\relax \advance\@tempcntz by1\fi
\ifseifuflag \xdef#3{-\the\@tempcntz}%
\else\xdef#3{\the\@tempcntz}\fi}
\newcount\@xArg \newcount\@yArg
\def\LineTemp(#1,#2)#3{\begingroup
\@xArg #1\relax \@yArg #2\relax
\ifnum\@xArg<0 \@tempcntx=-#3 \else
\ifnum\@xArg>0 \@tempcntx=#3 \else \@tempcntx=0 \fi\fi
\@tempcnty=#3
\multiply\@tempcnty by\@yArg\relax
\ifnum\@tempcnty<0 \@tempcnty=-\@tempcnty\fi
\ifnum\@xArg<0 \@xArg=-\@xArg\fi
\ifnum\@xArg=0 \edef\RR{#3}\else
{\DIVIDE{\@tempcnty}{\@xArg}\RR}\fi
\@tempcnty=\RR%
\ifnum\@yArg<0 \ifnum\@tempcnty>0 \@tempcnty=-\@tempcnty\fi\fi
\drawline(0,0)(\the\@tempcntx,\the\@tempcnty)%
\endgroup}
\RequirePackage{epic}%
\newif\ifsizereduction \sizereductionfalse
\def\reduced@line(#1,#2)#3{\ifsizereduction
\ifdim\unitlength<0.1pt \LineTemp(#1,#2){#3}\else
\@ldline(#1,#2){#3}\fi
\else\@ldline(#1,#2){#3}\fi}
\let\line=\reduced@line
\def\@changeunitlength#1{\unitlength=#1\relax
\ifdim\unitlength<0.1pt \sizereductiontrue
\ifdim\unitlength<0.062pt \let\substfontsize=\tiny \else
\ifdim\unitlength<0.072pt \let\substfontsize=\scriptsize \else
\ifdim\unitlength<0.082pt \let\substfontsize=\footnotesize
\fi\fi\fi
\else\let\substfontsize=\normalsize
\fi}
\let\changeunitlength=\@changeunitlength
\def\reducedsizepicture{%
\@ifnextchar[{\reduced@picture}{\reduced@picture[0.1pt]}}
\def\reduced@picture[#1]{%
\sizereductiontrue
\let\sfpicture=\picture
\let\endsfpicture=\endpicture
\let\Put@Direct=\put
\let\Multiput@Direct=\multiput
\let\thicklines=\@ldthicklines
\let\thinlines=\@ldthinlines
\let\line=\reduced@line
\let\dotorline=\d@t@rline
\let\Put@Line=\Put@@Line
\let\Put@sCircle=\Put@@sCircle
\let\Put@oCircle=\Put@@oCircle
\xymtexpsswfalse
\let\changeunitlength=\@changeunitlength
\changeunitlength{#1}}
\reducedsizepicture%size-reduction setting
\let\oldlineslope=\lineslope%used only in the manual
\def\lineslope(#1,#2){%
\begingroup
\ifdim #1 <0pt \@xdim= -#1 \else\@xdim=#1\fi
\ifdim #2 <0pt \@ydim= -#2 \else\@ydim=#2\fi
\multiply\@xdim by10\relax%by S. Fujita 2001/6/20
\multiply\@ydim by10\relax%by S. Fujita 2001/6/20
\ifdim\@xdim >\@ydim \@tempdima=\@xdim \@xdim=\@ydim \@ydim=\@tempdima
\@flippedargstrue\else\@flippedargsfalse\fi% x < y
\ifdim\@ydim >1pt \@tempcntx=\@ydim
            \divide\@tempcntx by 65536% now \@tempcntx=integral part of #1.
            \divide\@xdim \@tempcntx\fi
\ifdim\@xdim <.083333pt \@xarg=1 \@yarg=0
 \else\ifdim\@xdim <.183333pt \@xarg=6 \@yarg=1
 \else\ifdim\@xdim <.225pt  \@xarg=5 \@yarg=1
 \else\ifdim\@xdim <.291666pt  \@xarg=4 \@yarg=1
 \else\ifdim\@xdim <.366666pt  \@xarg=3 \@yarg=1
 \else\ifdim\@xdim <.45pt  \@xarg=5 \@yarg=2
 \else\ifdim\@xdim <.55pt  \@xarg=2 \@yarg=1
 \else\ifdim\@xdim <.633333pt  \@xarg=5 \@yarg=3
 \else\ifdim\@xdim <.708333pt  \@xarg=3 \@yarg=2
 \else\ifdim\@xdim <.775pt  \@xarg=4 \@yarg=3
 \else\ifdim\@xdim <.816666pt  \@xarg=5 \@yarg=4
 \else\ifdim\@xdim <.916666pt  \@xarg=6 \@yarg=5
       \else \@xarg=1 \@yarg=1%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\if@flippedargs\relax\else\@tempcntx=\@xarg \@xarg=\@yarg
  \@yarg=\@tempcntx\fi
\ifdim #1 <0pt \global\@xarg= -\@xarg\else\global\@xarg= \@xarg\fi
\ifdim #2 <0pt \global\@yarg= -\@yarg\else\global\@yarg= \@yarg\fi
%%\typeout{closest slope integers = \the\@xarg, \the\@yarg}
\endgroup}
\endinput
%%
%% End of file `sizeredc.sty'.
