The chmst-ps Package v1.03 (Part of the XyMTeX/ChemSci package v4.06)

Shinsaku Fujita

Shonan Institute of Chemoinformatics and Mathematical Chemistry

Ashigara-Kami-Gun, Kanagawa, 258-0019 Japan 2009/11/26

Contents

1 docstrip options 2 2 Version information 2 3 Cross-references of compounds 2 4 Boxes for placing compounds 2 5 Arrows 2

5.1 Arrows with variable length . . . . . . . . . . . . . . . . . . . . . . 2 5.2 Reaction arrows with variable length . . . . . . . . . . . . . . . . . 3

6 Redefinition of verbatim 15 7 Shadowed Boxes 15 8 Further boxes 16 9 Symbols for instant photography 16 10 Various arrows with fixed length 16 11 Chemical Corrections 19 12 XyMcompd and XyMtab Environments 19 13 Useful commands 19 14 Double and triple bonds 19 15 Curved Arrows 19 16 Initial Setting and Switch to PostScript Arrows 20

1 docstrip options

This dtx file provides the chmst-ps package by docstrip processing.

argument package name
chmstps chmst-ps.sty
driver  a documentation driver file

2 Version information

The old process for typing out version information remains active.

 1 ⟨chmstps⟩\def\j@urnalname{chmst-ps} \def\journalID{chmst-ps}
 2 \def\versi@ndate{November 26, 2009}
 3 \def\versi@nno{ver1.03}
 4 \def\copyrighth@lder{SF} % Shinsaku Fujita

5 ⟨∗chmstps⟩

 6 \typeout{Package `\j@urnalname' (\versi@nno) <\versi@ndate>\space
 7 [\copyrighth@lder]}
 8 \typeout{chmst-ps.sty ver1.03 (for LaTeX2e) 2009/11/26[SF]}

9 ⟨/chmstps⟩

10 ⟨∗chmstps⟩

11 \@ifundefined{if@@@chemtimes}{\newif\if@@@chemtimes}{}
12 \@ifundefined{if@@chemtimes}{\newif\if@@chemtimes}{}%from chemtimes
13 \DeclareOption{chemtimes}{\@@@chemtimestrue}
14 \@@@chemtimesfalse
15 \ProcessOptions
16 \if@@@chemtimes\if@@chemtimes\else
17 \PackageError{chmst-ps}
18  {The option ``chemtimes'' is not permitted}
19  {You should use this option after the chemtimes package is loaded.}
20 \fi\fi
21 \if@@@chemtimes
22 \RequirePackage[chemtimes]{chemist}%
23 \else
24 \RequirePackage{chemist}%
25 \fi

3 Cross-references of compounds

(Deleted)

4 Boxes for placing compounds

(Deleted)

5 Arrows

5.1 Arrows with variable length

(Deleted)

5.2 Reaction arrows with variable length

The chmst-ps package defines arrows with variable length for drawing chemical equations, where additional information can be written on the upper and/or downward sides of each arrow.

Several elements for drawing horizontal reaction arrows within the scope of pstricks package are defined first.

\rArrow@Element
\lArrow@Element
\lrArrow@Element
\eqArrow@Element

26 \newdimen\@tempdimX
27 \newdimen\@tempdimY
28 \def\rArrow@Element#1{\begingroup\hbox to#1{\hss%
29 \begin{pspicture}(0,0)(#1,0.28em)%
30 \psline[linewidth=0.4pt,arrowsize=2pt 2,%
31 arrowlength=1.6,arrowinset=0.6]{->}(0pt,0.28em)(#1,0.28em)%
32 \end{pspicture}\hss}\endgroup}
33 \let\Arrow@Element=\rArrow@Element
34 \def\lArrow@Element#1{\hbox to#1{\hss%
35 \begin{pspicture}(0,0)(#1,0.28em)%
36 \psline[linewidth=0.4pt,arrowsize=2pt 2,%
37 arrowlength=1.6,arrowinset=0.6]{<-}(0pt,0.28em)(#1,0.28em)%
38 \end{pspicture}\hss}}
39 \def\lrArrow@Element#1{\hbox to#1{\hss%
40 \begin{pspicture}(0,0)(#1,0.28em)%
41 \psline[linewidth=0.4pt,arrowsize=2pt 2,%
42 arrowlength=1.6,arrowinset=0.6]{<->}(0pt,0.28em)(#1,0.28em)%
43 \end{pspicture}\hss}}
44 \def\eqArrow@Element#1{\hbox to#1{\hss%
45 \begin{pspicture}(0,0)(#1,0.43em)%
46 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
47 {->}(0pt,0.43em)(#1,0.43em)%
48 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
49 {<-}(0pt,0.13em)(#1,0.13em)%
50 \end{pspicture}\hss}}

Several harpoons are created by means of the mechanism of the PStricks package.

\past@arrowtable Arow types (Hru, Hrd, Hlu, and Hld) are added to the existing arrow table for a right upward harpoon, a right downward harpoon, a left upward harpoon, and a left downward harpoon.

51 \RequirePackage{pstricks}%
52 \edef\past@arrowtable{\pst@arrowtable,Hru-Hru,Hrd-Hrd,Hlu-Hlu,Hld-Hld}

\tx@HarpoonrUp \psas@Hru A right upward harpoon (arow type Hru) is typeset by \tx@HarpoonrUp (/HarpoonrUp as a PostScript name), where its arrowhead is typeset by an internal macro name (\psas@Hru). The PostScript commands (/CLW, /ED, and /L) are defined in pstricks.pro.

53 %rightharpoonup
54 %\edef\past@arrowtable{\pst@arrowtable,Hru-Hru}
55 \def\tx@HarpoonrUp{ \tx@setStrokeTransparency HarpoonrUp }%
56 \@namedef{psas@Hru}{%
57 /HarpoonrUp{%PostScript Procedure

58 CLW mul add dup
59 2 div /w ED
60 mul dup /h ED
61 mul /a ED
62 CLW 2 div /Hwd ED
63 h a sub /Hwh ED
64 0 Hwh moveto
65 Hwd neg Hwh L
66 Hwd neg 0 L
67 0 0 L
68 w h L
69 0 Hwh L
70 gsave fill grestore
71 }def
72 \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@HarpoonrUp

73 }

\tx@HarpoonrDown \psas@Hrd A right downward harpoon (arow type Hrd) is typeset by \tx@HarpoonrDown (/HarpoonrDown as a PostScript name), where its arrowhead is typeset by an internal macro name (\psas@Hrd).

74 %rightharpoondown
75 %\edef\past@arrowtable{\pst@arrowtable,Hrd-Hrd}
76 \def\tx@HarpoonrDown{ \tx@setStrokeTransparency HarpoonrDown }%
77 \@namedef{psas@Hrd}{%
78 /HarpoonrDown {%PostScript Procedure
79 CLW mul add dup
80 2 div /w ED
81 mul dup /h ED
82 mul /a ED
83 CLW 2 div /Hwd ED
84 h a sub /Hwh ED
85 0 Hwh moveto
86 Hwd Hwh L
87 Hwd 0 L
88 0 0 L
89 w neg h L
90 0 Hwh L
91 gsave fill grestore
92 }def
93 \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@HarpoonrDown

94 }

\tx@HarpoonlUp \psas@Hlu A left upward harpoon (arow type Hlu) is typeset by \tx@HarpoonlUp (/HarpoonlUp as a PostScript name), where its arrowhead is typeset by an internal macro name (\psas@Hlu).

95 %leftharpoonup
96 %\edef\past@arrowtable{\pst@arrowtable,Hlu-Hlu}
97 \def\tx@HarpoonlUp{ \tx@setStrokeTransparency HarpoonlUp }%
98 \@namedef{psas@Hlu}{%
99 /HarpoonlUp {%PostScript Procedure
100 CLW mul add dup
101 2 div /w ED
102 mul dup /h ED
103 mul /a ED

104 CLW 2 div /Hwd ED
105 h a sub /Hwh ED
106 0 Hwh moveto
107 Hwd Hwh L
108 Hwd 0 L
109 0 0 L
110 w neg h L
111 0 Hwh L
112 gsave fill grestore
113 }def
114 \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@HarpoonlUp

115 }

\tx@HarpoonlDown \psas@Hld A left downward harpoon (arow type Hld) is typeset by \tx@HarpoonlDown (/HarpoonlDown as a PostScript name), where its arrowhead is typeset by an internal macro name (\psas@Hld).

116 %leftharpoondown
117 %\edef\past@arrowtable{\pst@arrowtable,Hld-Hld}
118 \def\tx@HarpoonlDown{ \tx@setStrokeTransparency HarpoonlDown }%
119 \@namedef{psas@Hld}{%
120 /HarpoonlDown {%PostScript Procedure
121 CLW mul add dup
122 2 div /w ED
123 mul dup /h ED
124 mul /a ED
125 CLW 2 div /Hwd ED
126 h a sub /Hwh ED
127 0 Hwh moveto
128 Hwd neg Hwh L
129 Hwd neg 0 L
130 0 0 L
131 w h L
132 0 Hwh L
133 gsave fill grestore
134 }def
135 \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@HarpoonlDown

136 }

\eqHarpoon@Element
137 \def\eqHarpoon@Element#1{\hbox to#1{\hss%
138 \begin{pspicture}(0,0)(#1,0.43em)%
139 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
140 {-Hru}(0pt,0.43em)(#1,0.43em)%
141 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
142 {Hld-}(0pt,0.13em)(#1,0.13em)%
143 \end{pspicture}\hss}}

144 %

145 %\def\eqHarpoon@Element#1{\hbox to#1{\hss%
146 %\begin{pspicture}(0,0)(#1,0.43em)%
147 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
148 %{->}(0pt,0.43em)(#1,0.43em)%
149 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
150 %{<-}(0pt,0.13em)(#1,0.13em)%
151 %\psline[linewidth=0.277em,linecolor=white]{-}(0pt,0.29em)(#1,0.29em)%

152 %\end{pspicture}\hss}}

Equilibirum arrows with uneven lengths are defined by using the \psline command of the pstricks package.

\reqArrow@Element
\leqArrow@Element
153 \def\reqArrow@Element#1{\begingroup%
154 \dimen1=#1%
155 \dimen0=\eqlbarrowstretch\dimen1%
156 \dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax
157 \dimen2=\dimen1 \advance\dimen2 by\dimen0
158 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
159 {->}(0pt,0.43em)(#1,0.43em)%
160 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
161 {<-}(\dimen1,0.13em)(\dimen2,0.13em)\endgroup}
162 \def\leqArrow@Element#1{\begingroup%
163 \dimen1=#1%
164 \dimen0=\eqlbarrowstretch\dimen1%
165 \dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax
166 \dimen2=\dimen1 \advance\dimen2 by\dimen0
167 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
168 {->}(\dimen1,0.43em)(\dimen2,0.43em)%
169 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
170 {<-}(0pt,0.13em)(#1,0.13em)\endgroup}
\reqHarpoon@Element
\leqHarpoon@Element
171 \def\reqHarpoon@Element#1{\begingroup%
172 \dimen1=#1%
173 \dimen0=\eqlbarrowstretch\dimen1%
174 \dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax
175 \dimen2=\dimen1 \advance\dimen2 by\dimen0
176 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
177 {-Hru}(0pt,0.43em)(#1,0.43em)%
178 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
179 {Hld-}(\dimen1,0.13em)(\dimen2,0.13em)%
180 \endgroup}
181 \def\leqHarpoon@Element#1{\begingroup%
182 \dimen1=#1%
183 \dimen0=\eqlbarrowstretch\dimen1%
184 \dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax
185 \dimen2=\dimen1 \advance\dimen2 by\dimen0
186 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
187 {-Hru}(\dimen1,0.43em)(\dimen2,0.43em)%
188 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
189 {Hld-}(0pt,0.13em)(#1,0.13em)%
190 \endgroup}

191 %

192 %\def\reqHarpoon@Element#1{\begingroup%
193 %\dimen1=#1%
194 %\dimen0=\eqlbarrowstretch\dimen1%
195 %\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax
196 %\dimen2=\dimen1 \advance\dimen2 by\dimen0
197 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
198 %{->}(0pt,0.43em)(#1,0.43em)%

199 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
200 %{<-}(\dimen1,0.13em)(\dimen2,0.13em)%
201 %\psline[linewidth=0.277em,linecolor=white]{-}(0pt,0.29em)(#1,0.29em)%
202 %\endgroup}
203 %\def\leqHarpoon@Element#1{\begingroup%
204 %\dimen1=#1%
205 %\dimen0=\eqlbarrowstretch\dimen1%
206 %\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax
207 %\dimen2=\dimen1 \advance\dimen2 by\dimen0
208 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
209 %\{->}(\dimen1,0.43em)(\dimen2,0.43em)%
210 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
211 %{<-}(0pt,0.13em)(#1,0.13em)%
212 %\psline[linewidth=0.277em,linecolor=white]{-}(0pt,0.287em)(#1,0.287em)%
213 %\endgroup}

Each arrow element is used in the following common command for drawing horizontal reaction arrows.

   \reactarrowsep (dimension) for adjusting the two vertical spaces (default value 0pt)
   \reactarrowseprate (string) for adjusting the lower vertical space (default 1.0)

\react@@rlarrow
214 \def\react@@rlarrow[#1]#2#3#4#5{\ensuremath{\mathrel{%
215 \hskip#1\raisebox{#2}{\begingroup\@tempdimX=#3\relax%
216 \parbox{#3}{\centering
217  \baselineskip=.8\normalbaselineskip \ChemStrut{#4}\par%
218  \vskip-0.2\normalbaselineskip\vskip\reactarrowsep%
219  \begin{pspicture}(0,0)(\@tempdimX,0.6em)%
220 %    \Arrow@Element{\@tempdimX}%
221  \put(0,0){\Arrow@Element{\@tempdimX}}%
222  \end{pspicture}%
223  \par%
224  \vskip\reactarrowseprate\reactarrowsep%
225  \vskip-0.1\normalbaselineskip\ChemStrut{#5}}\endgroup}}}}
226 %(old definition)
227 %\def\react@@rlarrow[#1]#2#3#4#5{%
228 %\hskip#1\raisebox{#2}{\begingroup\@tempdimX=#3\relax%
229 % \begin{pspicture}(\@tempdimX,0)%
230 %  \rput[bl](0,0.86em){\hbox to\@tempdimX{\hss
231 %  \begin{tabular}{c}#4%
232 %  \end{tabular}\hss}}%
233 %  \Arrow@Element{\@tempdimX}%
234 %  \rput[tl](0,-0.3em){\hbox to\@tempdimX{\hss
235 %  \begin{tabular}{c}%
236 %  #5\end{tabular}\hss}}%
237 % \end{pspicture}\endgroup}}
\reactrarrow \reactlarrow \reactlrarrow \reactEqarrow 2009/11/19 renamed from \reacteqarrow
\reacteqarrow 2009/11/19
238 % ******************* 1991 Oct 4 S. Fujita
239 % * reaction arrows * Revised 1992 May 24 S.Fujita%1999/02/02 SF

240 % ******************* Redifined 2002 May 30 S. Fujita for pstricks
241 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

242 %

243 % #1 yoko #2 ue, #3 haba, #4 ya no ue, #5 ya no shita

244 %

245 \def\newreactrarrow{%
246 \@ifnextchar[{\newreact@rarrow}{\newreact@rarrow[0pt]}}
247 \def\newreact@rarrow[#1]#2#3#4#5{%
248 \let\Arrow@Element=\rArrow@Element%
249 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
250 \def\newreactlarrow{%
251 \@ifnextchar[{\newreact@larrow}{\newreact@larrow[0pt]}}
252 \def\newreact@larrow[#1]#2#3#4#5{%
253 \let\Arrow@Element=\lArrow@Element%
254 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
255 \def\newreactlrarrow{%
256 \@ifnextchar[{\newreact@lrarrow}{\newreact@lrarrow[0pt]}}
257 \def\newreact@lrarrow[#1]#2#3#4#5{%
258 \let\Arrow@Element=\lrArrow@Element%
259 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
260 %%%%2009/11/19
261 \def\newreactEqarrow{%
262 \@ifnextchar[{\newreact@Eqarrow}{\newreact@Eqarrow[0pt]}}
263 \def\newreact@Eqarrow[#1]#2#3#4#5{%
264 \let\Arrow@Element=\eqArrow@Element%
265 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
266 \def\newreacteqarrow{%
267 \@ifnextchar[{\newreact@eqarrow}{\newreact@eqarrow[0pt]}}
268 \def\newreact@eqarrow[#1]#2#3#4#5{%
269 \let\Arrow@Element=\eqHarpoon@Element%
270 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
271 %%%%%2009/11/19
272 %\let\reactrarrow=\newreactrarrow
273 %\let\reactlarrow=\newreactlarrow
274 %\let\reactlrarrow=\newreactlrarrow
275 %\let\reactEqarrow=\newreactEqarrow
276 %\let\reacteqarrow=\newreacteqarrow

\reactREqarrow renamed 2009/11/19

\reactLEqarrow renamed 2009/11/19

\reactreqarrow \reactleqarrow These commands have been added for the XyMTeX version 4.05. The chemist package additionally defines arrows with variable length for drawing chemical equilibrium, where additional information can be written on the upper and/or downward sides of each arrow. The length of either one of arrows can be reduced

 by \eqlbarrowstretch.
277 \def\newreactREqarrow{%
278 \@ifnextchar[{\newreact@REqarrow}{\newreact@REqarrow[0pt]}}
279 \def\newreact@REqarrow[#1]#2#3#4#5{%
280 \let\Arrow@Element=\reqArrow@Element
281 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
282 \def\newreactLEqarrow{%
283 \@ifnextchar[{\newreact@LEqarrow}{\newreact@LEqarrow[0pt]}}

284 \def\newreact@LEqarrow[#1]#2#3#4#5{%
285 \let\Arrow@Element=\leqArrow@Element
286 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
287 %%%%%2009/11/19
288 \def\newreactreqarrow{%
289 \@ifnextchar[{\newreact@reqarrow}{\newreact@reqarrow[0pt]}}
290 \def\newreact@reqarrow[#1]#2#3#4#5{%
291 \let\Arrow@Element=\reqHarpoon@Element
292 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
293 \def\newreactleqarrow{%
294 \@ifnextchar[{\newreact@leqarrow}{\newreact@leqarrow[0pt]}}
295 \def\newreact@leqarrow[#1]#2#3#4#5{%
296 \let\Arrow@Element=\leqHarpoon@Element
297 \react@@rlarrow[#1]{#2}{#3}{#4}{#5}}
298 %%%%%2009/11/19
299 %\let\reactREqarrow=\newreactREqarrow
300 %\let\reactLEqarrow=\newreactLEqarrow
301 %\let\reactreqarrow=\newreactreqarrow
302 %\let\reactleqarrow=\newreactleqarrow

Several elements for drawing vertical reaction arrows within the scope of pstricks package are defined first.

\dArrow@Element
\uArrow@Element
\veqArrow@Element
\duArrow@Element

303 \def\dArrow@Element#1{%
304 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
305 {->}(0pt,#1)(0pt,0pt)}
306 \def\uArrow@Element#1{%
307 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
308 {<-}(0pt,#1)(0pt,0pt)}
309 \def\veqArrow@Element#1{%
310 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
311 {->}(-0.15em,#1)(-0.15em,0pt)%
312 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
313 {<-}(0.15em,#1)(0.15em,0pt)}
314 \def\duArrow@Element#1{%
315 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
316 {<->}(0pt,#1)(0pt,0pt)}
\veqHarpoon@Element
317 \def\veqHarpoon@Element#1{%
318 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
319 {-Hrd}(-0.15em,#1)(-0.15em,0pt)%
320 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
321 {Hlu-}(0.15em,#1)(0.15em,0pt)%

322 } 323 %

324 %\def\veqHarpoon@Element#1{%
325 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
326 %{->}(-0.15em,#1)(-0.15em,0pt)%
327 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
328 %{<-}(0.15em,#1)(0.15em,0pt)%
329 %\psline[linewidth=0.28em,linecolor=white]{-}(0pt,0em)(0,#1)%

330 %}

Each arrow element is used in the following common command for drawing vertical reaction arrows.

\react@@duarrow
331 \def\react@@duarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
332 \@tempdimY=#3\def\arraystretch{0.8}%
333 \begin{tabular}{l}#4\end{tabular}%
334 {\tabcolsep=0pt\begin{tabular}{c}%
335 \begin{pspicture}(0,0)(0,\@tempdimY)%
336 \Arrow@Element{\@tempdimY}%
337 \end{pspicture}\end{tabular}}%
338 \begin{tabular}{l}#5\end{tabular}}}
\reactdarrow \reactuarrow \reactduarrow \reactVEqarrow renamed 2009/11/19

\reactveqarrow renamed 2009/11/19 Vertical reaction arrows has been added.

339 \def\newreactdarrow{%
340 \@ifnextchar[{\newreact@darrow}{\newreact@darrow[0pt]}}
341 \def\newreact@darrow[#1]#2#3#4#5{%
342 \let\Arrow@Element=\dArrow@Element
343 \react@@duarrow[#1]{#2}{#3}{#4}{#5}}
344 \def\newreactuarrow{%
345 \@ifnextchar[{\newreact@uarrow}{\newreact@uarrow[0pt]}}
346 \def\newreact@uarrow[#1]#2#3#4#5{%
347 \let\Arrow@Element=\uArrow@Element
348 \react@@duarrow[#1]{#2}{#3}{#4}{#5}}
349 \def\newreactduarrow{%
350 \@ifnextchar[{\newreact@duarrow}{\newreact@duarrow[0pt]}}
351 \def\newreact@duarrow[#1]#2#3#4#5{%
352 \let\Arrow@Element=\duArrow@Element
353 \react@@duarrow[#1]{#2}{#3}{#4}{#5}}
354 %%%%%2009/11/19
355 \def\newreactVEqarrow{%
356 \@ifnextchar[{\newreact@VEqarrow}{\newreact@VEqarrow[0pt]}}
357 \def\newreact@VEqarrow[#1]#2#3#4#5{%
358 \let\Arrow@Element=\veqArrow@Element
359 \react@@duarrow[#1]{#2}{#3}{#4}{#5}}
360 \def\newreactveqarrow{%
361 \@ifnextchar[{\newreact@veqarrow}{\newreact@veqarrow[0pt]}}
362 \def\newreact@veqarrow[#1]#2#3#4#5{%
363 \let\Arrow@Element=\veqHarpoon@Element
364 \react@@duarrow[#1]{#2}{#3}{#4}{#5}}
365 %%%%%2009/11/19
366 %\let\reactdarrow=\newreactdarrow
367 %\let\reactuarrow=\newreactuarrow
368 %\let\reactduarrow=\newreactduarrow
369 %\let\reactVEqarrow=\newreactVEqarrow
370 %\let\reactveqarrow=\newreactveqarrow

Several elements for drawing down-sloped reaction arrows within the scope of pstricks package are defined first.

\seArrow@Element
371 \def\seArrow@Element#1{%

372 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
373 {->}(0pt,#1)(#1,0pt)}
374 \def\nwArrow@Element#1{%
375 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
376 {<-}(0pt,#1)(#1,0pt)}

Each arrow element is used in the following common command for drawing down-sloped reaction arrows.

\react@@decrarrow
377 \def\react@@decrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
378 \@tempdimX=#3\divide\@tempdimX by2\relax
379 \@tempdimY=#3\relax\def\arraystretch{0.8}%
380 \begin{tabular}{l}#4\end{tabular}\kern1em%
381 {\tabcolsep=0pt\begin{tabular}{c}
382 \begin{pspicture}(\@tempdimX,0)(\@tempdimX,\@tempdimY)
383 \Arrow@Element{\@tempdimY}%
384 \end{pspicture}\end{tabular}}\kern1em%
385 \begin{tabular}{l}#5\end{tabular}}}

\reactsearrow \reactnwrarrow Further reaction arrows have been added.

386 \def\newreactsearrow{%
387 \@ifnextchar[{\newreact@searrow}{\newreact@searrow[0pt]}}
388 \def\newreact@searrow[#1]#2#3#4#5{%
389 \let\Arrow@Element=\seArrow@Element
390 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
391 \def\newreactnwarrow{%
392 \@ifnextchar[{\newreact@nwarrow}{\newreact@nwarrow[0pt]}}
393 \def\newreact@nwarrow[#1]#2#3#4#5{%
394 \let\Arrow@Element=\nwArrow@Element
395 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
396 %%%%%2009/11/19
397 %\let\reactsearrow=\newreactsearrow
398 %\let\reactnwarrow=\newreactnwarrow

Several elements for drawing up-sloped reaction arrows within the scope of pstricks package are defined first.

\neArrow@Element
399 \def\neArrow@Element#1{%
400 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
401 {->}(0pt,0pt)(#1,#1)}
402 \def\swArrow@Element#1{%
403 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
404 {<-}(0pt,0pt)(#1,#1)}

Each arrow element is used in the following common command for drawing up-sloped reaction arrows.

\react@@incrarrow
405 \def\react@@incrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
406 \@tempdimX=#3 \divide\@tempdimX by2
407 \@tempdimY=#3%
408 \def\arraystretch{0.8}%

409 \begin{tabular}{l}#4\end{tabular}\kern1em%
410 {\tabcolsep=0pt
411 \begin{tabular}{c}
412 \begin{pspicture}(\@tempdimX,0)(\@tempdimX,\@tempdimY)
413 \Arrow@Element{\@tempdimY}%
414 \end{pspicture}%
415 \end{tabular}}\kern1em%
416 \begin{tabular}{l}#5\end{tabular}}}
\reactnearrow
\reactswarrow
417 \def\newreactnearrow{%
418 \@ifnextchar[{\newreact@nearrow}{\newreact@nearrow[0pt]}}
419 \def\newreact@nearrow[#1]#2#3#4#5{%
420 \let\Arrow@Element=\neArrow@Element
421 \react@@incrarrow[#1]{#2}{#3}{#4}{#5}}
422 \def\newreactswarrow{%
423 \@ifnextchar[{\newreact@swarrow}{\newreact@swarrow[0pt]}}
424 \def\newreact@swarrow[#1]#2#3#4#5{%
425 \let\Arrow@Element=\swArrow@Element
426 \react@@incrarrow[#1]{#2}{#3}{#4}{#5}}
427 %%%%%2009/11/19
428 %\let\reactnearrow=\newreactnearrow
429 %\let\reactswarrow=\newreactswarrow

Additional elements for drawing down- and up-sloped equilibrium arrows within the scope of pstricks package are defined first.

\deqArrow@Element
\ueqArrow@Element
430 \def\deqArrow@Element#1{%
431 \begingroup
432 \@tempdima=#1 \advance\@tempdima by1.2pt
433 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
434 {->}(1.2pt,\@tempdima)(\@tempdima,1.2pt)%
435 \@tempdima=#1 \advance\@tempdima by-1.2pt
436 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
437 {<-}(-1.2pt,\@tempdima)(\@tempdima,-1.2pt)\endgroup}
438 \def\ueqArrow@Element#1{%
439 \@tempdima=#1 \advance\@tempdima by-1.2pt
440 \@tempdimb=#1 \advance\@tempdimb by1.2pt
441 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
442 {->}(-1.2pt,1.2pt)(\@tempdima,\@tempdimb)%
443 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
444 {<-}(1.2pt,-1.2pt)(\@tempdimb,\@tempdima)}

Additional elements for drawing down- and up-sloped equilibrium harpoons within the scope of pstricks package are defined.

\deqHarpoon@Element
\ueqHarpoon@Element
445 \def\deqHarpoon@Element#1{%
446 \begingroup
447 \@tempdima=#1 \advance\@tempdima by1.2pt
448 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
449 {-Hru}(1.2pt,\@tempdima)(\@tempdima,1.2pt)%
450 \@tempdimb=#1 \advance\@tempdimb by-1.2pt

451 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
452 {Hld-}(-1.2pt,\@tempdimb)(\@tempdimb,-1.2pt)%
453 \endgroup}
454 \def\ueqHarpoon@Element#1{%
455 \begingroup
456 \@tempdima=#1 \advance\@tempdima by-1.2pt
457 \@tempdimb=#1 \advance\@tempdimb by1.2pt
458 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
459 {-Hru}(-1.2pt,1.2pt)(\@tempdima,\@tempdimb)%
460 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
461 {Hld-}(1.2pt,-1.2pt)(\@tempdimb,\@tempdima)%
462 \endgroup}

463 %

464 %\def\deqHarpoon@Element#1{%
465 %\begingroup
466 %\@tempdima=#1 \advance\@tempdima by1.2pt
467 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
468 %{->}(1.2pt,\@tempdima)(\@tempdima,1.2pt)%
469 %\@tempdimb=#1 \advance\@tempdimb by-1.2pt
470 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
471 %{<-}(-1.2pt,\@tempdimb)(\@tempdimb,-1.2pt)%
472 %\psline[linewidth=0.28em,linecolor=white]{-}(0pt,#1)(#1,0pt)%
473 %\endgroup}
474 %\def\ueqHarpoon@Element#1{%
475 %\begingroup
476 %\@tempdima=#1 \advance\@tempdima by-1.2pt
477 %\@tempdimb=#1 \advance\@tempdimb by1.2pt
478 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
479 %{->}(-1.2pt,1.2pt)(\@tempdima,\@tempdimb)%
480 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
481 %{<-}(1.2pt,-1.2pt)(\@tempdimb,\@tempdima)%
482 %\psline[linewidth=0.28em,linecolor=white]{-}(0pt,0pt)(#1,#1)%
483 %\endgroup}
\reactDEqarrow \reactUEqarrow \reactdeqarrow \reactueqarrow Further reaction arrows have been added.
484 \def\newreactDEqarrow{\@ifnextchar[%]
485 {\newreact@DEqarrow}{\newreact@DEqarrow[0pt]}}
486 \def\newreact@DEqarrow[#1]#2#3#4#5{%
487 \let\Arrow@Element=\deqArrow@Element
488 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
489 \def\newreactUEqarrow{\@ifnextchar[%]
490 {\newreact@UEqarrow}{\newreact@UEqarrow[0pt]}}
491 \def\newreact@UEqarrow[#1]#2#3#4#5{%
492 \let\Arrow@Element=\ueqArrow@Element
493 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
494 %%%%2009/11/19
495 \def\newreactdeqarrow{\@ifnextchar[%]
496 {\newreact@deqarrow}{\newreact@deqarrow[0pt]}}
497 \def\newreact@deqarrow[#1]#2#3#4#5{%
498 \let\Arrow@Element=\deqHarpoon@Element
499 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
500 \def\newreactueqarrow{\@ifnextchar[%]
501 {\newreact@ueqarrow}{\newreact@ueqarrow[0pt]}}
502 \def\newreact@ueqarrow[#1]#2#3#4#5{%

503 \let\Arrow@Element=\ueqHarpoon@Element
504 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
505 %%%%2009/11/19
506 %\let\reactDEqarrow=\newreactDEqarrow
507 %\let\reactUEqarrow=\newreactUEqarrow
508 %\let\reactdeqarrow=\newreactdeqarrow
509 %\let\reactueqarrow=\newreactueqarrow

Additional elements for drawing down- and up-sloped double-headed arrows within the scope of pstricks package are defined first.

\ulrArrow@Element
\dlrArrow@Element
510 \def\ulrArrow@Element#1{%
511 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
512 {<->}(0pt,0pt)(#1,#1)}
513 \def\dlrArrow@Element#1{%
514 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
515 {<->}(0pt,#1)(#1,0pt)}
\reactulrarrow
\reactdlrarrow
516 \def\newreactulrarrow{\@ifnextchar[%]
517 {\newreact@ulrarrow}{\newreact@ulrarrow[0pt]}}
518 \def\newreact@ulrarrow[#1]#2#3#4#5{%
519 \let\Arrow@Element=\ulrArrow@Element
520 \react@@incrarrow[#1]{#2}{#3}{#4}{#5}}
521 \def\newreactdlrarrow{\@ifnextchar[%]
522 {\newreact@dlrarrow}{\newreact@dlrarrow[0pt]}}
523 \def\newreact@dlrarrow[#1]#2#3#4#5{
524 \let\Arrow@Element=\dlrArrow@Element
525 \react@@decrarrow[#1]{#2}{#3}{#4}{#5}}
526 %%%%2009/11/19
527 %\let\reactulrarrow=\newreactulrarrow
528 %\let\reactdlrarrow=\newreactdlrarrow

A new command \electronshiftAH is added to defining bent (curved) arrows and harpoons.

\electronshiftAH
529 \def\electronshiftAH#1{%
530 \pscurve[unit=\unitlength,linewidth=0.4pt,arrowsize=2pt 2,%
531 arrowlength=1.6,arrowinset=0.6]{#1}}

Several commmands for drawing curved harpoons are defined as follows:

\electronshiftHru
\electronshiftHrd
\electronshiftHlu
\electronshiftHld

532 \def\electronshiftHru{\electronshiftAH{-Hru}}
533 \def\electronshiftHrd{\electronshiftAH{-Hrd}}
534 \def\electronshiftHlu{\electronshiftAH{Hlu-}}
535 \def\electronshiftHld{\electronshiftAH{Hld-}}

Several commmands for drawing curved arrows are defined as follows:

\electronshiftArrowr
\electronshiftArrowl
536 \def\electronshiftArrowr{\electronshiftAH{->}}
537 \def\electronshiftArrowl{\electronshiftAH{<-}}

The chmst-ps package defines double-line arrows with variable length for drawing reaction schemes, where additional information can be written on the upper and/or downward sides of each arrow.

Several elements for drawing horizontal scheme arrows within the scope of pstricks package are defined first.

\lSchemeArrow@Element
538 \def\lSchemeArrow@Element#1{\hbox to#1{\hss%
539 \begin{pspicture}(0,0)(#1,0.28em)%
540 \psline[linewidth=0.4pt,doubleline=true,doublesep=0.16em,%
541 arrowsize=2pt 2,arrowlength=1.2,arrowinset=0.7]{<-}(0pt,0.28em)(#1,0.28em)%
542 \end{pspicture}\hss}}
543 \def\rSchemeArrow@Element#1{\hbox to#1{\hss%
544 \begin{pspicture}(0,0)(#1,0.28em)%
545 \psline[linewidth=0.4pt,doubleline=true,doublesep=0.16em,%
546 arrowsize=2pt 2,arrowlength=1.2,arrowinset=0.7]{->}(0pt,0.28em)(#1,0.28em)%
547 \end{pspicture}\hss}}
548 \def\lrSchemeArrow@Element#1{\hbox to#1{\hss%
549 \begin{pspicture}(0,0)(#1,0.28em)%
550 \psline[linewidth=0.4pt,doubleline=true,doublesep=0.16em,%
551 arrowsize=2pt 2,arrowlength=1.2,arrowinset=0.7]{<->}(0pt,0.28em)(#1,0.28em)%
552 \end{pspicture}\hss}}
\schemelarrow
\schemerarrow
\schemelrarrow

553 % ********************************
554 % * scheme arrows                *
555 % * 1991 OCT 4 S. Fujita         *
556 % * Revised 1992 May 24 S.Fujita * 1999/02/02 by S. Fujita
557 % ******************************** Redefined 2002/05/30 by SF
558 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
559 \def\newschemelarrow#1#2#3#4{%
560 \let\Arrow@Element=\lSchemeArrow@Element
561 \react@@rlarrow[0pt]{#1}{#2}{#3}{#4}}
562 \def\newschemerarrow#1#2#3#4{%
563 \let\Arrow@Element=\rSchemeArrow@Element
564 \react@@rlarrow[0pt]{#1}{#2}{#3}{#4}}
565 \def\newschemelrarrow#1#2#3#4{%
566 \let\Arrow@Element=\lrSchemeArrow@Element
567 \react@@rlarrow[0pt]{#1}{#2}{#3}{#4}}
568 %%%%2009/11/19
569 %\let\schemelarrow=\newschemelarrow
570 %\let\schemerarrow=\newschemerarrow
571 %\let\schemelrarrow=\newschemelrarrow

6 Redefinition of verbatim

(Deleted)

7 Shadowed Boxes

(Deleted)

8 Further boxes

(Deleted)

9 Symbols for instant photography

(Deleted)

10 Various arrows with fixed length

Because various arrows with a fixed length have been defined in the chemist package, the corresponding codes for the chmst-ps package are described here.

\llongrightarrow
\llongleftarrow
\Equilibarrow

572 \def\newllongrightarrow{\ensuremath{\mathrel{%
573 \hbox to28pt{\hss\rArrow@Element{28pt}\hss}}}}
574 \def\newllongleftarrow{\ensuremath{\mathrel{%
575 \hbox to28pt{\hss\lArrow@Element{28pt}\hss}}}}
576 \def\newllongleftrightarrow{\ensuremath{\mathrel{%
577 \hbox to28pt{\hss\lrArrow@Element{28pt}\hss}}}}
578 \def\newEquilibarrow{\ensuremath{\mathrel{%
579 \hbox to28pt{\hss\eqArrow@Element{28pt}\hss}}}}
580 %\let\llongrightarrow=\newllongrightarrow
581 %\let\llongleftarrow=\newllongleftarrow
582 %\let\llongleftrightarrow=\newllongleftrightarrow
583 %\let\Equilibarrow=\newEquilibarrow
\Llongrightarrow
\Llongleftarrow
\Llongleftrightarrow

584 \def\newLlongrightarrow{\ensuremath{\mathrel{%
585 \hbox to28pt{\hss\rSchemeArrow@Element{28pt}\hss}}}}
586 \def\newLlongleftarrow{\ensuremath{\mathrel{%
587 \hbox to28pt{\hss\lSchemeArrow@Element{28pt}\hss}}}}
588 \def\newLlongleftrightarrow{\ensuremath{%
589 \mathrel{\hbox to28pt{\hss\lrSchemeArrow@Element{28pt}\hss}}}}
590 %\let\Llongrightarrow=\newLlongrightarrow
591 %\let\Llongleftarrow=\newLlongleftarrow
592 %\let\Llongleftrightarrow\newLlongleftrightarrow
\lllongrightarrow
\lllongleftarrow
\lllongleftrightarrow
\Equiliblongarrow

593 \def\newlllongrightarrow{\ensuremath{\mathrel{%
594 \hbox to35pt{\hss\rArrow@Element{35pt}\hss}}}}
595 \def\newlllongleftarrow{\ensuremath{\mathrel{%
596 \hbox to35pt{\hss\lArrow@Element{35pt}\hss}}}}
597 \def\newlllongleftrightarrow{\ensuremath{\mathrel{%
598 \hbox to35pt{\hss\lrArrow@Element{35pt}\hss}}}}
599 \def\newEquiliblongarrow{\ensuremath{\mathrel{%
600 \hbox to35pt{\hss\eqArrow@Element{35pt}\hss}}}}
601 %\let\lllongrightarrow=\newlllongrightarrow
602 %\let\lllongleftarrow=\newlllongleftarrow
603 %\let\lllongleftrightarrow=\newlllongleftrightarrow
604 %\let\Equiliblongarrow=\newEquiliblongarrow

\Lllongrightarrow
\Lllongleftarrow
\Lllongleftrightarrow

605 \def\newLllongrightarrow{\ensuremath{\mathrel{%
606 \hbox to35pt{\hss\rSchemeArrow@Element{35pt}\hss}}}}
607 \def\newLllongleftarrow{\ensuremath{\mathrel{%
608 \hbox to35pt{\hss\lSchemeArrow@Element{35pt}\hss}}}}
609 \def\newLllongleftrightarrow{\ensuremath{%
610 \mathrel{\hbox to35pt{\hss\lrSchemeArrow@Element{35pt}\hss}}}}
611 %\let\Lllongrightarrow=\newLllongrightarrow
612 %\let\Lllongleftarrow=\newLllongleftarrow
613 %\let\Lllongleftrightarrow\newLllongleftrightarrow

Several elements for drawing horizontal harpoons within the scope of pstricks package are defined first.

\rightharpoonupElement
614 \def\rightharpoonupElement#1{%
615 \lower0.2pt\hbox to#1{\hss%
616 \begin{pspicture}(0,0)(#1,0.28em)
617 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
618 {-Hru}(0pt,0.28em)(#1,0.28em)
619 \end{pspicture}\hss}}

620 %

621 %\def\rightharpoonupElement#1{%
622 %\lower0.2pt\hbox to#1{\hss%
623 %\begin{pspicture}(0,0)(#1,0.28em)
624 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
625 %{->}(0pt,0.28em)(#1,0.28em)
626 %\psline[linewidth=0.36em,linecolor=white]{-}(0pt,0.1em)(#1,0.1em)
627 %\end{pspicture}\hss}}
\rightharpoondownElement
628 \def\rightharpoondownElement#1{%
629 \raise0.2pt\hbox to#1{\hss%
630 \begin{pspicture}(0,0)(#1,0.28em)
631 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
632 {-Hrd}(0pt,0.28em)(#1,0.28em)
633 \end{pspicture}\hss}}

634 %

635 %\def\rightharpoondownElement#1{%
636 %\raise0.2pt\hbox to#1{\hss%
637 %\begin{pspicture}(0,0)(#1,0.28em)
638 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
639 %{->}(0pt,0.28em)(#1,0.28em)
640 %\psline[linewidth=0.34em,linecolor=white]{-}(0pt,0.49em)(#1,0.49em)
641 %\end{pspicture}\hss}}
\leftharpoonupElement
642 \def\leftharpoonupElement#1{%
643 \lower0.2pt\hbox to#1{\hss%
644 \begin{pspicture}(0,0)(#1,0.28em)
645 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
646 {Hlu-}(0pt,0.28em)(#1,0.28em)
647 \end{pspicture}\hss}}

648 %

649 %\def\leftharpoonupElement#1{%
650 %\lower0.2pt\hbox to#1{\hss%
651 %\begin{pspicture}(0,0)(#1,0.28em)
652 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
653 %{<-}(0pt,0.28em)(#1,0.28em)
654 %\psline[linewidth=0.36em,linecolor=white]{-}(0pt,0.1em)(#1,0.1em)
655 %\end{pspicture}\hss}}
\leftharpoondownElement
656 \def\leftharpoondownElement#1{%
657 \lower0.2pt\hbox to#1{\hss%
658 \begin{pspicture}(0,0)(#1,0.28em)
659 \psline[linewidth=0.4pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
660 {Hld-}(0pt,0.28em)(#1,0.28em)
661 \end{pspicture}\hss}}

662 %

663 %\def\leftharpoondownElement#1{%
664 %\lower0.2pt\hbox to#1{\hss%
665 %\begin{pspicture}(0,0)(#1,0.28em)
666 %\psline[linewidth=0.8pt,arrowsize=2pt 2,arrowlength=1.6,arrowinset=0.6]%
667 %{<-}(0pt,0.28em)(#1,0.28em)
668 %\psline[linewidth=0.34em,linecolor=white]{-}(0pt,0.49em)(#1,0.49em)
669 %\end{pspicture}\hss}}
\llongrightharpoonup
\llongrightharpoondown
\llongleftharpoonup
\llongleftharpoondown

670 \def\newllongrightharpoonup{\ensuremath{\mathrel{\rightharpoonupElement{28pt}}}}
671 \def\newllongrightharpoondown{\ensuremath{\mathrel{\rightharpoondownElement{28pt}}}}
672 \def\newllongleftharpoonup{\ensuremath{\mathrel{\leftharpoonupElement{28pt}}}}
673 \def\newllongleftharpoondown{\ensuremath{\mathrel{\leftharpoondownElement{28pt}}}}
674 %\let\llongrightharpoonup=\newllongrightharpoonup
675 %\let\llongrightharpoondown=\newllongrightharpoondown
676 %\let\llongleftharpoonup=\newllongleftharpoonup
677 %\let\llongleftharpoondown=\newllongleftharpoondown
\lllongrightharpoonup
\lllongrightharpoondown
\lllongleftharpoonup
\lllongleftharpoondown

678 \def\newlllongrightharpoonup{\ensuremath{\mathrel{\rightharpoonupElement{35pt}}}}
679 \def\newlllongrightharpoondown{\ensuremath{\mathrel{\rightharpoondownElement{35pt}}}}
680 \def\newlllongleftharpoonup{\ensuremath{\mathrel{\leftharpoonupElement{35pt}}}}
681 \def\newlllongleftharpoondown{\ensuremath{\mathrel{\leftharpoondownElement{35pt}}}}
682 %\let\lllongrightharpoonup=\newlllongrightharpoonup
683 %\let\lllongrightharpoondown=\newlllongrightharpoondown
684 %\let\lllongleftharpoonup=\newlllongleftharpoonup
685 %\let\lllongleftharpoondown\newlllongleftharpoondown
\equilibarrow
\equiliblongarrow
686 \def\newequilibarrow{\ensuremath{\mathrel{%
687 \hbox to28pt{\hss\eqHarpoon@Element{28pt}\hss}}}}
688 \def\newequiliblongarrow{\ensuremath{\mathrel{%
689 \hbox to35pt{\hss\eqHarpoon@Element{35pt}\hss}}}}
690 %\let\equilibarrow=\newequilibarrow
691 %\let\equiliblongarrow=\newequiliblongarrow

11 Chemical Corrections

(Deleted)

12 XyMcompd and XyMtab Environments

(Deleted)

13 Useful commands

(Deleted)

14 Double and triple bonds

(Deleted)

15 Curved Arrows

To illustrate the mechanisms of organic reactions, curved arrows are used to show an electron shift. First, the macros for drawing them are defined as follows.

\electronrshiftarrow

692 %

693 %    \begin{macrocode}
694 \def\electronrshiftarrow{%
695 \@ifnextchar[{\@electronrshiftarrow}{\@electronrshiftarrow[0]}}
696 \def\@electronrshiftarrow[#1](#2,#3)(#4,#5){%
697 \ifcase#1\relax%upward round
698 \@cnttempa=#2 \advance\@cnttempa by#4\relax
699 \divide\@cnttempa by2\relax
700 \ifnum#3<#5\relax
701 \advance\@cnttempa by-30\relax
702 \else \ifnum#3>#5\relax
703 \advance\@cnttempa by30\relax
704 \fi\fi
705 \@cnttempb=#3 \advance\@cnttempb by#5\relax
706 \divide\@cnttempb by2\relax
707 \advance\@cnttempb by30\relax
708 \or%downward-round
709 \@cnttempa=#2 \advance\@cnttempa by#4\relax
710 \divide\@cnttempa by2\relax
711 \ifnum#3<#5\relax
712 \advance\@cnttempa by30\relax
713 \else \ifnum#3>#5\relax
714 \advance\@cnttempa by-30\relax
715 \fi\fi
716 \@cnttempb=#3 \advance\@cnttempb by#5\relax
717 \divide\@cnttempb by2\relax
718 \advance\@cnttempb by-30\relax
719 \fi

720 \begin{pspicture}(100,100)
721 \pscurve[linewidth=0.4pt]{->}(#2,#3)(\@cnttempa,\@cnttempb)(#4,#5)
722 \end{pspicture}}
\electronlshiftarrow
723 \def\electronlshiftarrow{%
724 \@ifnextchar[{\@electronlshiftarrow}{\@electronlshiftarrow[0]}}
725 \def\@electronlshiftarrow[#1](#2,#3)(#4,#5){%
726 \ifcase#1\relax%upward round
727 \@cnttempa=#2 \advance\@cnttempa by#4\relax
728 \divide\@cnttempa by2\relax
729 \ifnum#3<#5\relax
730 \advance\@cnttempa by-30\relax
731 \else \ifnum#3>#5\relax
732 \advance\@cnttempa by30\relax
733 \fi\fi
734 \@cnttempb=#3 \advance\@cnttempb by#5\relax
735 \divide\@cnttempb by2\relax
736 \advance\@cnttempb by30\relax
737 \or%downward-round
738 \@cnttempa=#2 \advance\@cnttempa by#4\relax
739 \divide\@cnttempa by2\relax
740 \ifnum#3<#5\relax
741 \advance\@cnttempa by30\relax
742 \else \ifnum#3>#5\relax
743 \advance\@cnttempa by-30\relax
744 \fi\fi
745 \@cnttempb=#3 \advance\@cnttempb by#5\relax
746 \divide\@cnttempb by2\relax
747 \advance\@cnttempb by-30\relax
748 \fi
749 \begin{pspicture}(100,100)
750 \pscurve[linewidth=0.4pt]{<-}(#2,#3)(\@cnttempa,\@cnttempb)(#4,#5)
751 \end{pspicture}}
752 \def\futuresubst#1{\kern140\unitlength #1}

16 Initial Setting and Switch to PostScript Arrows

\chmstpssw
753 \def\chmstpssw{%setting of the chmst-ps package
754 \let\reactrarrow=\newreactrarrow%
755 \let\reactlarrow=\newreactlarrow
756 \let\reactlrarrow=\newreactlrarrow
757 \let\reactEqarrow=\newreactEqarrow
758 \let\reacteqarrow=\newreacteqarrow
759 %%%%
760 \let\reactREqarrow=\newreactREqarrow%
761 \let\reactLEqarrow=\newreactLEqarrow
762 \let\reactreqarrow=\newreactreqarrow
763 \let\reactleqarrow=\newreactleqarrow
764 %%%%

765 \let\reactdarrow=\newreactdarrow%
766 \let\reactuarrow=\newreactuarrow
767 \let\reactduarrow=\newreactduarrow
768 \let\reactVEqarrow=\newreactVEqarrow
769 \let\reactveqarrow=\newreactveqarrow
770 %%%%
771 \let\reactnearrow=\newreactnearrow%
772 \let\reactswarrow=\newreactswarrow
773 %%%%
774 \let\reactsearrow=\newreactsearrow%
775 \let\reactnwarrow=\newreactnwarrow
776 %%%%
777 \let\reactDEqarrow=\newreactDEqarrow%
778 \let\reactUEqarrow=\newreactUEqarrow
779 \let\reactdeqarrow=\newreactdeqarrow
780 \let\reactueqarrow=\newreactueqarrow
781 %%%%
782 \let\reactulrarrow=\newreactulrarrow%
783 \let\reactdlrarrow=\newreactdlrarrow
784 %%%%
785 \let\schemelarrow=\newschemelarrow%
786 \let\schemerarrow=\newschemerarrow
787 \let\schemelrarrow=\newschemelrarrow
788 %%%%
789 \let\llongrightarrow=\newllongrightarrow%
790 \let\llongleftarrow=\newllongleftarrow
791 \let\llongleftrightarrow=\newllongleftrightarrow
792 \let\Equilibarrow=\newEquilibarrow
793 %%%
794 \let\Llongrightarrow=\newLlongrightarrow%
795 \let\Llongleftarrow=\newLlongleftarrow
796 \let\Llongleftrightarrow\newLlongleftrightarrow
797 %%%
798 \let\lllongrightarrow=\newlllongrightarrow%
799 \let\lllongleftarrow=\newlllongleftarrow
800 \let\lllongleftrightarrow=\newlllongleftrightarrow
801 \let\Equiliblongarrow=\newEquiliblongarrow
802 %%%
803 \let\Lllongrightarrow=\newLllongrightarrow%
804 \let\Lllongleftarrow=\newLllongleftarrow
805 \let\Lllongleftrightarrow\newLllongleftrightarrow
806 %%%
807 \let\llongrightharpoonup=\newllongrightharpoonup%
808 \let\llongrightharpoondown=\newllongrightharpoondown
809 \let\llongleftharpoonup=\newllongleftharpoonup
810 \let\llongleftharpoondown=\newllongleftharpoondown
811 %%%
812 \let\lllongrightharpoonup=\newlllongrightharpoonup%
813 \let\lllongrightharpoondown=\newlllongrightharpoondown
814 \let\lllongleftharpoonup=\newlllongleftharpoonup
815 \let\lllongleftharpoondown\newlllongleftharpoondown
816 %%%
817 \let\equilibarrow=\newequilibarrow%
818 \let\equiliblongarrow=\newequiliblongarrow

819 %%%

820 }

821 \chmstpssw%initial setting

822 ⟨/chmstps⟩