%% %% This is file `xymtx-ps.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% xymtx-ps.dtx (with options: `xymtxps') %% %% This is a generated file. %% %% Copyright 2002,2004,2005,2009 by Shinsaku Fujita %% %% This file is part of the XyMTeX system. %% ======================================= %% %% Version 1.00 Released on April 30, 2002 %% Version 4.01 Released on August 30, 2004 (adjust for XyMTeX version 4.01) %% Version 4.02 Released on December 20, 2004 (wedged bonds for stereochemistry) %% Version 4.03 Released on July 20, 2005 (wave line for stereochemistry) %% Version 4.03a Released on August 02, 2005 (Bug fix) %% Version 4.04a Released on June 15, 2009 (Bug fix) %% Version 4.05 Released on November 05, 2009 (Bug fix) %% %% Copyright (C) 2002,2004,2005,2009 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: xymtx-ps.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 \~} \def\j@urnalname{xymtx-ps} \def\versi@ndate{November 05, 2009} \def\versi@nno{ver4.05} \def\copyrighth@lder{SF} % Shinsaku Fujita \typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% \space[\copyrighth@lder]} \@ifundefined{setsixringv}{\input chemstr.sty\relax}{} \RequirePackage{pstricks} \RequirePackage{pst-coil} \unitlength=0.1pt %%\psset{xunit=\the\unitlength,yunit=\the\unitlength}%delete August 2, 2005 \newif\if@thicklinesw \@thicklineswfalse \def\Thick@Lines{\@thicklineswtrue}%redefinition \def\Thin@Lines{\@thicklineswfalse}%redefinition \def\thickLineWidth{1.6pt} \def\thinLineWidth{0.4pt} \newif\if@wedgesw \@wedgeswtrue \newif\if@hasheddashsw \@hasheddashswtrue \def\wedgehasheddash{\@wedgeswtrue\@hasheddashswtrue} \def\wedgehashedwedge{\@wedgeswtrue\@hasheddashswfalse} \def\dashhasheddash{\@wedgeswfalse\@hasheddashswtrue} \@ifundefined{ifmolfront}{\newif\ifmolfront \molfrontfalse}{} \@ifundefined{if@skbondlist}{\newif\if@skbondlist \@skbondlistfalse}{} \newcount\@tempcntXa \newcount\@tempcntYa \newcount\@tempcntz \newcount\@tempcntXb \newcount\@tempcntYb \newcount\@tempcntzz \newcount\@tempcntXc \newcount\@tempcntYc \newcount\@tempcntzzz \long\gdef\Put@@@Line(#1,#2)(#3,#4)#5{% \begingroup %%x-coordinate \@tempcntXa=0\relax \ifnum#3>0\relax \@tempcntXa=#5\relax \else\ifnum#3<0\relax\@tempcntXa=-#5\relax\fi\fi \advance\@tempcntXa by#1\relax %%y-coordinate \@tempcntYa=#5\relax \ifnum#3=0\relax\else \multiply\@tempcntYa by#4\relax\multiply\@tempcntYa by10\relax \divide\@tempcntYa by#3\relax\divide\@tempcntYa by10\relax\fi \ifnum\@tempcntYa<0\relax \ifnum#4>0\relax\@tempcntYa=-\@tempcntYa\fi \else \ifnum\@tempcntYa>0\relax \ifnum#4<0\relax\@tempcntYa=-\@tempcntYa\fi\fi \fi \advance\@tempcntYa by#2\relax \if@thicklinesw \if@wedgesw \ifmolfront%bold dash bond for skeletal bond for pyranose etc. \psline[unit=\unitlength,linewidth=\thickLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% \else \if@skbondlist%bold dash bond skeletal bond for general cases \psline[unit=\unitlength,linewidth=\thickLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% \else%wedged bond \stereo@wedgedimension(#3,#4){10}% \pspolygon*[unit=\unitlength](#1,#2)% (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc) \fi\fi \else \psline[unit=\unitlength,linewidth=\thickLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% \fi \else \ifwavebond \pszigzag[unit=\unitlength,coilheight=1,coilwidth=.13cm,linewidth=\thinLineWidth,linearc=5,% coilarm=0]{-}(\the\@tempcntXa,\the\@tempcntYa)(#1,#2)% \else \psline[unit=\unitlength,linewidth=\thinLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% \fi \fi \@tempcntXa=0\relax \@tempcntYa=0\relax \endgroup}%end of Put@@@Line \newif\if@wedgeadjust \def\stereo@wedgedimension(#1,#2)#3{% \@tempcntXb=0\relax \@tempcntYb=0\relax \@tempcntXc=0\relax \@tempcntYc=0\relax %% \@wedgeadjustfalse \ifnum#1<0 \@tempcntzz=-#1\else\@tempcntzz=#1\fi \ifnum#2<0 \@tempcntzzz=-#2\else\@tempcntzzz=#2\fi \ifnum#1=0\else \multiply\@tempcntzzz by10\relax \divide\@tempcntzzz by\@tempcntzz\fi%% (3/5)x10=6 \ifnum\@tempcntzzz>7\relax\else\@wedgeadjusttrue\fi %%one point of wedge \ifnum#1=0\relax \@tempcntXb=#3 \advance\@tempcntXb by8\relax \@tempcntYb=0\relax \else \ifnum#2=0\relax \@tempcntXb=0\relax \@tempcntYb=#3 \advance\@tempcntYb by8\relax \else \@tempcntXb=#3\relax \@tempcntYb=-#3\relax \if@wedgeadjust \advance\@tempcntXb by8\relax \advance\@tempcntYb by-8\relax \fi \multiply\@tempcntXb by#2\relax\multiply\@tempcntXb by10\relax \divide\@tempcntXb by#1\relax\divide\@tempcntXb by10\relax\fi\fi \advance\@tempcntXb by\@tempcntXa\relax \advance\@tempcntYb by\@tempcntYa\relax %%other point of wedge \ifnum#1=0\relax \@tempcntXc=-#3 \advance\@tempcntXc by-8\relax \@tempcntYc=0\relax \else \ifnum#2=0\relax \@tempcntXc=0\relax \@tempcntYc=-#3 \advance\@tempcntYc by-8\relax \else \@tempcntXc=-#3\relax \@tempcntYc=#3\relax \if@wedgeadjust \advance\@tempcntXc by-6\relax \advance\@tempcntYc by6\relax \fi \multiply\@tempcntXc by#2\relax\multiply\@tempcntXc by10\relax \divide\@tempcntXc by#1\relax\divide\@tempcntXc by10\relax\fi\fi \advance\@tempcntXc by\@tempcntXa\relax \advance\@tempcntYc by\@tempcntYa\relax }%%end of \stereo@wedgedimension \@ifundefined{iftdir}{\newif\iftdir \tdirfalse}{}%pLaTeXe vs. LaTeXe \def\Put@@@Direct(#1,#2)#3{\begingroup\psset{unit=\unitlength}% \iftdir \rput[bl]{0}(#1,#2){#3}\else\rput[Bl]{0}(#1,#2){#3}\fi \endgroup} \def\Put@@@oCircle(#1,#2)#3{% \begingroup \@tempcntz=#3 \divide\@tempcntz by2\relax \pscircle[linewidth=.4pt,unit=\unitlength](#1,#2){\@tempcntz}\endgroup} \def\Put@@@sCircle(#1,#2)#3{% \begingroup \@tempcntz=#3 \divide\@tempcntz by2\relax \pscircle[linewidth=2pt,unit=\unitlength](#1,#2){\@tempcntz}\endgroup} \def\d@@t@rline(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% \if@hasheddashsw \@ifundefined{psline}{% \XyMTeXWarning{A dottedline is replaced by a solid line.}% \Put@Line(#1,#2)(#3,#4){#5}% }{{\thicklines% \hasheddashbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% \else \if@skbondlist%hashed dash bond skeletal bond for general cases \@ifundefined{psline}{% \XyMTeXWarning{A dottedline is replaced by a solid line.}% \Put@Line(#1,#2)(#3,#4){#5}% }{{\thicklines% \hasheddashbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% \else \hashedwedgebond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% \fi\fi }%end of \d@@t@rline \def\hasheddashbond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% \begingroup \@tempcntzz=12\relax \@tempcntzzz=-30\relax%almost no shortening \bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% \ifdim\unitlength>0.08pt \psline[unit=\unitlength,linewidth=\thickLineWidth,linestyle=dashed,dash=1pt 1.2pt]% (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% \else \psline[unit=\unitlength,linewidth=\thickLineWidth,linestyle=dashed,dash=1pt 1.2pt]% (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% \fi \endgroup} \def\hashedwedgebond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% \begingroup \@tempcntXa=#8\relax \@tempcntYa=#9\relax \stereo@wedgedimension(#3,#4){10}% \pspolygon*[unit=\unitlength](#1,#2)(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% \@tempcntzz=5\relax \@tempcntzzz=-12\relax \bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% \ifdim\unitlength>0.08pt \psline[unit=\unitlength,linewidth=3.8pt,linestyle=dashed,dash=0.8pt 1pt,linecolor=white]% (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% \else \psline[unit=\unitlength,linewidth=3pt,linestyle=dashed,dash=0.6pt 0.8pt,linecolor=white]% (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% \fi \endgroup }%%end of \hashedwedgebond \def\bond@shorten(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% \@tempcntXb=#8\relax \@tempcntYb=#9\relax \advance\@tempcntXb by-#6\relax \divide\@tempcntXb by\@tempcntzz\relax \advance\@tempcntYb by-#7\relax \divide\@tempcntYb by\@tempcntzz\relax \advance\@tempcntXb by#6\relax \advance\@tempcntYb by#7\relax \@tempcntXc=#8\relax \@tempcntYc=#9\relax \advance\@tempcntXc by-#6\relax \divide\@tempcntXc by\@tempcntzzz\relax \advance\@tempcntYc by-#7\relax \divide\@tempcntYc by\@tempcntzzz\relax \advance\@tempcntXc by#8\relax \advance\@tempcntYc by#9\relax }%%end of \bondshorten \def\WedgeAsSubst(#1,#2)(#3,#4)#5{% \begingroup \@thicklineswtrue \@wedgeswtrue \molfrontfalse \@skbondlistfalse \Put@@@Line(#1,#2)(#3,#4){#5}% \endgroup} \def\HashWedgeAsSubst(#1,#2)(#3,#4)#5{% \begingroup \@thicklineswtrue \@wedgeswtrue \molfrontfalse \@skbondlistfalse \Put@@@Line(#1,#2)(#3,#4){#5}% %%x-coordinate \@tempcntXa=0\relax \ifnum#3>0\relax \@tempcntXa=#5\relax \advance\@tempcntXa by-10\relax \else\ifnum#3<0\relax\@tempcntXa=-#5\relax\fi\fi \advance\@tempcntXa by#1\relax %%y-coordinate \@tempcntYa=#5\relax \advance\@tempcntYa by-10\relax \ifnum#3=0\relax\else \multiply\@tempcntYa by#4\relax\multiply\@tempcntYa by10\relax \divide\@tempcntYa by#3\relax\divide\@tempcntYa by10\relax\fi \ifnum\@tempcntYa<0\relax \ifnum#4>0\relax\@tempcntYa=-\@tempcntYa\fi \else \ifnum\@tempcntYa>0\relax \ifnum#4<0\relax\@tempcntYa=-\@tempcntYa\fi\fi \fi \advance\@tempcntYa by#2\relax \ifdim\unitlength>0.08pt \psline[unit=\unitlength,linewidth=5pt,linestyle=dashed,dash=0.8pt 1pt,linecolor=white]% %%(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% (#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% \else \psline[unit=\unitlength,linewidth=3pt,linestyle=dashed,dash=0.6pt 0.8pt,linecolor=white]% %%(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% (#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% \fi \endgroup }%%end of \HashWedgeAsSubst \def\downnobond#1#2{% \hbox{\smash{\hbox to0.72em{\hss#1\hss}\kern-0.72em\lower2.2ex\hbox{#2}}}} \newif\ifsizereduction\sizereductionfalse \def\@@changeunitlength#1{\unitlength=#1\relax %%\psset{unit=\unitlength}%delete August 02, 2005 \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} \def\setxymtxps{% \@ifnextchar[{\@setxymtxps}{\@setxymtxps[0.1pt]}} \def\@setxymtxps[#1]{% \let\sfpicture=\picture \let\endsfpicture=\endpicture \let\thicklines=\Thick@Lines \let\thinlines=\Thin@Lines \let\Put@Line=\Put@@@Line \let\Put@Direct=\Put@@@Direct \let\Put@oCircle=\Put@@@oCircle \let\Put@sCircle=\Put@@@sCircle \let\dotorline=\d@@t@rline \let\changeunitlength=\@@changeunitlength \changeunitlength{#1}% \wedgehasheddash% } \setxymtxps \endinput %% %% End of file `xymtx-ps.sty'.