summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/xymtex/polymers.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:25:05 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:25:05 +0000
commit2828582f70c71954ec767bead50118e55e23ceae (patch)
treeeb772e5af0b7292319e9fc3357bb16aea5c2c6da /Master/texmf-dist/source/latex/xymtex/polymers.dtx
parent03bbdca8223b2d2590f34f46e6ea18bc4cbbf0bc (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/polymers.dtx')
-rw-r--r--Master/texmf-dist/source/latex/xymtex/polymers.dtx717
1 files changed, 717 insertions, 0 deletions
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