Chemist Package v2.00a

Shinsaku Fujita Department of Chemistry and Materials Technology Kyoto Institute of Technology 2000/11/03

Contents

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

5.1 Arrows with variable length . . . . . . . . . . . . . . . . . . . . . . 4 5.2 Reaction arrows with variable length . . . . . . . . . . . . . . . . . 5

6 Captions 9

6.1 Changing caption types within a float . . . . . . . . . . . . . . . . 9 7 Redefinition of verbatim 10 8 Shadowed Boxes 12 9 Framed box environment with and without shadows 14

9.1 Framed box environment without shadows . . . . . . . . . . . . . . 14 9.2 Framed box environment with shadows . . . . . . . . . . . . . . . . 15 9.3 Framed box environment with gradient shadows . . . . . . . . . . 17

10 (Mini)screen environment 19 10.1 (Mini)screen environment without a title . . . . . . . . . . . . . . . 19 10.2 (Mini)screen environment with a title . . . . . . . . . . . . . . . . . 21

11 Further boxes 21 12 Boxes with no height or no width 22 13 Symbols for instant photography 22 14 Various arrows with fixed length 23 15 Chemical Corrections 25

15.1 Correction commands . . . . . . . . . . . . . . . . . . . . . . . . . 25 15.2 Chem Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

16 XyMcompd and XyMtab Environments 28 17 Useful commands 29 18 Logos 29 19 Double and triple bonds 33

1 docstrip options

This dtx file provides the chemist package by docstrip processing.

argument package name
chemist  chemist.sty
driver  a documentation driver file

2 Version information

The old process for typing out version information remains active.

 1 ⟨chemist⟩\def\j@urnalname{chemist} \def\journalID{chemist}
 2 \def\versi@ndate{November 3, 2000}
 3 \def\versi@nno{ver2.00a}
 4 \def\copyrighth@lder{SF} % Shinsaku Fujita

5 ⟨∗chemist⟩

 6 \typeout{Package `\j@urnalname' (\versi@nno) <\versi@ndate>\space
 7 [\copyrighth@lder]}
 8 \typeout{chemist.sty ver2.00a (for LaTeX2e) 2000/11/03[SF]}

9 ⟨/chemist⟩

3 Cross-references of compounds

The compd counter is introduced for numbering chemical compounds.

\thecompd \compd \nocompd The \thecompd command prints compound numbering without advancing the the compd counter. The \compd command prints compound numbering and advances the compd counter by one, while the \nocompd advances the compd counter by one without printing.

10 ⟨∗chemist⟩

11 % *******************
12 % * compound label  *
13 % *   1991 sept 29  *
14 % *******************
15 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
16 \@ifundefined{chapter}{\newcounter{compd}}{\newcounter{compd}[chapter]}
17 \def\thecompd{\arabic{compd}}
18 %\def\compd{\refstepcounter{compd}\unskip{\large\bf \thecompd}}
19 \def\compd{\leavevmode\refstepcounter{compd}{\large\bf \thecompd}}
20 \def\nocompd{\refstepcounter{compd}}

\compdlabel \nocompdlabel \cref The cross-reference of compound numbers are conducted by using \label and \ref commands. Alternative commands are also available as follows.

21 \def\compdlabel#1{\compd \label{#1}}
22 \def\nocompdlabel#1{\nocompd \label{#1}}
23 \@ifundefined{bf}{\def\bf{\normalfont\bfseries}}{}
24 \def\cref#1{{\bf \ref{#1}}}

\compdfbox \compdmbox \lbcompdpbox For takeing a space for compound output, we can use \compdfbox and like.

25 \def\compdfbox#1#2#3{\framebox[#1]{\rule[-0.3mm]{0pt}{#2} #3 }}
26 \def\compdmbox#1#2#3{\makebox[#1]{\rule[-0.3mm]{0pt}{#2} #3 }}
27 \def\lbcompdpbox#1#2#3{\parbox{#2}{\vskip 2em
28 \parbox{#2}{#3 \par \centering{\compdlabel{#1}}\vskip 2em }}}

The deriv counter is introduced for numbering derivatives of a compound.

\thederiv \deriv \noderiv \derivnum
29 % ********************
30 % * deriv label      *
31 % *   1991 oct  01   *
32 % ********************
33 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
34 \newcounter{deriv}[compd]
35 \def\thederiv {\thecompd\alph{deriv}}
36 %\def\deriv{\refstepcounter{deriv}\unskip{\large\bf \thederiv}}
37 \def\deriv{\leavevmode\refstepcounter{deriv}{\large\bf \thederiv}}
38 \def\noderiv{\refstepcounter{deriv}}
39 \def\derivnum{%
40 \leavevmode\refstepcounter{deriv}{\large\bf \alph{deriv}}}

\derivlabel \noderivlabel The cross-reference of derivative numbers are conducted by using \label and \ref commands. Alternative commands are also available as follows.

41 \def\derivlabel#1{\deriv \label{#1}}
42 \def\noderivlabel#1{\noderiv \label{#1}}

\derivfbox \derivmbox \lbderivpbox For takeing a space for placing a derivative, we can use \compdfbox and like.

43 \def\derivfbox#1#2#3{\framebox[#1]{\rule[-0.3mm]{0pt}{#2} #3 }}
44 \def\derivmbox#1#2#3{\makebox[#1]{\rule[-0.3mm]{0pt}{#2} #3 }}
45 \def\lbderivpbox#1#2#3{\parbox{#2}{\vskip 2em
46 \parbox{#2}{#3 \par \centering{\derivlabel{#1}}\vskip 2em }}}

\deriva \noderiva \derivalabel \noderivalabel The deriv counter is also advanced by \deriva command and like. This command produced the net output of the deriv counter.

47 % ********************
48 % * deriva label     *
49 % *   1991 oct  05   *
50 % ********************
51 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
52 %\def\deriva{\refstepcounter{deriv}\unskip{\large\bf \alph{deriv}}}
53 \def\deriva{\leavevmode\refstepcounter{deriv}{\large\bf \alph{deriv}}}
54 \def\noderiva{\refstepcounter{deriv}}
55 \def\derivalabel#1{\deriva \label{#1}}
56 \def\noderivalabel#1{\noderiva \label{#1}}

4 Boxes for placing compounds

\cdonecell \cdtwocell These boxes with a given width are used for printing chemical compounds. A box provided by \cdonecell is used for accomodating a compound. A box provided by \cdtwocell is devied into two vertical cells where the one is to place a compound and the other to place the compound number.

57 % ********************
58 % * cdonecell label  *
59 % *   1991 oct  04   *
60 % ********************
61 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
62 \def\cdonecell#1#2#3{\raisebox{#1}{\parbox{#2}{\centering{#3}}}}
63 % #1 ue, #2 haba, #3 honbun
64 \def\cdtwocell#1#2#3#4{\raisebox{#1}{
65 \parbox{#2}{\centering{#3} \par \vskip 3pt \centering{#4}  }}}
66 % #1 ue, #2 haba, #3 ue honbun, #4 shita label

5 Arrows

5.1 Arrows with variable length

\leftrightarrowfill \Leftarrowfill \Rightarrowfill \Leftrightarrowfill LaTeX are possessed of \leftarrowfill and \rightarrowfill for drawing ar-

rows with variable length. The chemist package defines other arrows with variable length for drawing chemical equations or schemes.

67 % *******************
68 % * variable arrows * 1992 May 24 S. Fujita
69 % *******************
70 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
71 \def\leftrightarrowfill{$\m@th \mathord\leftarrow \mkern-6mu
72 \cleaders\hbox{$\mkern-2mu \mathord- \mkern-2mu$}\hfill
73 \mkern-6mu \mathord\rightarrow$}
74 \def\Leftarrowfill{$\m@th \mathord\Leftarrow \mkern-6mu
75 \cleaders\hbox{$\mkern-2mu \mathord= \mkern-2mu$}\hfill

76 \mkern-6mu \mathord=$}
77 \def\Rightarrowfill{$\m@th \mathord= \mkern-6mu
78 \cleaders\hbox{$\mkern-2mu \mathord= \mkern-2mu$}\hfill
79 \mkern-6mu \mathord\Rightarrow$}
80 \def\Leftrightarrowfill{$\m@th \mathord\Leftarrow \mkern-6mu
81 \cleaders\hbox{$\mkern-2mu \mathord= \mkern-2mu$}\hfill
82 \mkern-6mu \mathord\Rightarrow$}

5.2 Reaction arrows with variable length

\reactrarrow \reactlarrow \reactlrarrow \reacteqarrow The chemist 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.

83 % ******************* 1991 Oct 4 S. Fujita
84 % * reaction arrows * Revised 1992 May 24 S.Fujita%1999/02/02 SF
85 % *******************
86 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

87 %

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

89 %

90 \def\reactrarrow{\@ifnextchar[{\react@rarrow}{\react@rarrow[0pt]}}
91 \def\react@rarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
92 \parbox{#3}{\centering
93  \baselineskip=.8\normalbaselineskip #4 \par
94  \vskip-0.2\normalbaselineskip
95  \rightarrowfill \par
96  \vskip-0.1\normalbaselineskip #5}}}
97 \def\reactlarrow{\@ifnextchar[{\react@larrow}{\react@larrow[0pt]}}
98 \def\react@larrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
99  \parbox{#3}{\centering
100  \baselineskip=.8\normalbaselineskip #4 \par
101  \vskip-0.2\normalbaselineskip
102  \leftarrowfill \par
103  \vskip-0.1\normalbaselineskip #5}}}
104 \def\reactlrarrow{\@ifnextchar[{\react@lrarrow}{\react@lrarrow[0pt]}}
105 \def\react@lrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
106  \parbox{#3}{\centering
107  \baselineskip=.8\normalbaselineskip
108  #4 \par
109  \vskip-0.2\normalbaselineskip
110  \centering{\leftrightarrowfill} \par
111  \vskip-0.1\normalbaselineskip #5}}}
112 \def\reacteqarrow{\@ifnextchar[{\react@eqarrow}{\react@eqarrow[0pt]}}
113 \def\react@eqarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{%
114  \parbox{#3}{\centering
115  \baselineskip=.8\normalbaselineskip
116  #4 \par
117  \vskip-0.2\normalbaselineskip
118  \rightarrowfill \par \vskip-0.55\normalbaselineskip%

119  \leftarrowfill \par
120  \vskip-0.1\normalbaselineskip #5}}}

\k@nz@n The \k@nz@n command is used for changing a dimension to a parameter for the L^{A}TEX picture environment.

121 \def\k@nz@n#1{\@tempdima=#1\relax
122 \@tempcnta=\@tempdima \@tempcntb=\unitlength
123 \divide\@tempcnta by \@tempcntb
124 \edef\kanzanchi{\the\@tempcnta}%
125 \divide\@tempcnta by2\relax
126 \edef\kanzanhalf{\the\@tempcnta}}
\reactdarrow \reactuarrow \reactveqarrow \reactduarrow Vertical reaction arrows has been added.
127 \def\reactdarrow{\@ifnextchar[{\react@darrow}{\react@darrow[0pt]}}
128 \def\react@darrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
129 \def\arraystretch{0.8}%
130 \begin{tabular}{l}#4\end{tabular}%
131 {\tabcolsep=0pt
132 \begin{tabular}{c}\begin{picture}(0,\kanzanchi)(0,0)
133 \put(0,\kanzanchi){\vector(0,-1){\kanzanchi}}
134 \end{picture}\end{tabular}}%
135 \begin{tabular}{l}#5\end{tabular}}}

136 %

137 \def\reactuarrow{\@ifnextchar[{\react@uarrow}{\react@uarrow[0pt]}}
138 \def\react@uarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
139 \def\arraystretch{0.8}%
140 \begin{tabular}{l}#4\end{tabular}%
141 {\tabcolsep=0pt
142 \begin{tabular}{c}\begin{picture}(0,\kanzanchi)(0,0)
143 \put(0,0){\vector(0,1){\kanzanchi}}
144 \end{picture}\end{tabular}}%
145 \begin{tabular}{l}#5\end{tabular}}}

146 %

147 \def\reactveqarrow{\@ifnextchar[%]
148 {\react@veqarrow}{\react@veqarrow[0pt]}}
149 \def\react@veqarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
150 \def\arraystretch{0.8}%
151 \begin{tabular}{l}#4\end{tabular}%
152 {\tabcolsep=0pt
153 \begin{tabular}{c}\begin{picture}(40,\kanzanchi)(0,0)
154 \put(40,0){\vector(0,1){\kanzanchi}}
155 \put(0,\kanzanchi){\vector(0,-1){\kanzanchi}}
156 \end{picture}\end{tabular}}%
157 \begin{tabular}{l}#5\end{tabular}}}

158 %

159 \def\reactduarrow{\@ifnextchar[{\react@duarrow}{\react@duarrow[0pt]}}
160 \def\react@duarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
161 \def\arraystretch{0.8}%
162 \begin{tabular}{l}#4\end{tabular}%
163 {\tabcolsep=0pt

164 \begin{tabular}{c}\begin{picture}(0,\kanzanchi)(0,0)
165 \put(0,\kanzanhalf){\vector(0,1){\kanzanhalf}}
166 \put(0,\kanzanhalf){\vector(0,-1){\kanzanhalf}}
167 \end{picture}\end{tabular}}%
168 \begin{tabular}{l}#5\end{tabular}}}
\reactswarrow \reactsearrow \reactnwrarrow \reactnearrow Further reaction arrows have been added.
169 \def\reactsearrow{\@ifnextchar[{\react@searrow}{\react@searrow[0pt]}}
170 \def\react@searrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
171 \def\arraystretch{0.8}%
172 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
173 \put(0,\kanzanchi){\vector(1,-1){\kanzanchi}}
174 \put(\kanzanhalf,\kanzanhalf){\hbox to0pt{%
175 \begin{tabular}[b]{l}#4\end{tabular}\hss}}
176 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{\hss
177 \begin{tabular}[t]{r}#5\end{tabular}}}
178 \end{picture}}}

179 %

180 \def\reactnwarrow{\@ifnextchar[{\react@nwarrow}{\react@nwarrow[0pt]}}
181 \def\react@nwarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
182 \def\arraystretch{0.8}%
183 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
184 \put(\kanzanchi,0){\vector(-1,1){\kanzanchi}}
185 \put(\kanzanhalf,\kanzanhalf){\hbox to0pt{%
186 \begin{tabular}[b]{l}#4\end{tabular}\hss}}
187 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{\hss
188 \begin{tabular}[t]{r}#5\end{tabular}}}
189 \end{picture}}}

190 %

191 \def\reactnearrow{\@ifnextchar[{\react@nearrow}{\react@nearrow[0pt]}}
192 \def\react@nearrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
193 \def\arraystretch{0.8}%
194 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
195 \put(0,0){\vector(1,1){\kanzanchi}}
196 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{%
197 \begin{tabular}[t]{l}#5\end{tabular}\hss}}
198 \put(\kanzanhalf,\kanzanhalf){\hbox to0pt{\hss
199 \begin{tabular}[b]{r}#4\end{tabular}}}
200 \end{picture}}}

201 %

202 \def\reactswarrow{\@ifnextchar[{\react@swarrow}{\react@swarrow[0pt]}}
203 \def\react@swarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
204 \def\arraystretch{0.8}%
205 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
206 \put(\kanzanchi,\kanzanchi){\vector(-1,-1){\kanzanchi}}
207 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{%
208 \begin{tabular}[t]{l}#5\end{tabular}\hss}}
209 \put(\kanzanhalf,\kanzanhalf){\hbox to0pt{\hss
210 \begin{tabular}[b]{r}#4\end{tabular}}}
211 \end{picture}}}

\reactdeqarrow \reactueqarrow \reactdlrarrow \reactulrarrow Further reaction arrows have been added.
212 \def\reactdeqarrow{\@ifnextchar[%]
213 {\react@deqarrow}{\react@deqarrow[0pt]}}
214 \def\react@deqarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
215 \def\arraystretch{0.8}%
216 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
217 \put(0,\kanzanchi){\put(15,15){\vector(1,-1){\kanzanchi}}}
218 \put(\kanzanchi,0){\put(-15,-15){\vector(-1,1){\kanzanchi}}}
219 \put(\kanzanhalf,\kanzanhalf){\raise1ex\hbox to0pt{%
220 \begin{tabular}[b]{l}#4\end{tabular}\hss}}
221 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{\hss
222 \begin{tabular}[t]{r}#5\end{tabular}}}
223 \end{picture}}}
224 \def\reactueqarrow{\@ifnextchar[%]
225 {\react@ueqarrow}{\react@ueqarrow[0pt]}}
226 \def\react@ueqarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
227 \def\arraystretch{0.8}%
228 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
229 \put(0,0){\put(-15,15){\vector(1,1){\kanzanchi}}}
230 \put(\kanzanchi,\kanzanchi){\put(15,-15){\vector(-1,-1){\kanzanchi}}}
231 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{%
232 \begin{tabular}[t]{l}#5\end{tabular}\hss}}
233 \put(\kanzanhalf,\kanzanhalf){\raise1ex\hbox to0pt{\hss
234 \begin{tabular}[b]{r}#4\end{tabular}}}
235 \end{picture}}}
236 \def\reactulrarrow{\@ifnextchar[%]
237 {\react@ulrarrow}{\react@ulrarrow[0pt]}}
238 \def\react@ulrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
239 \def\arraystretch{0.8}%
240 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
241 \put(\kanzanhalf,\kanzanhalf){\vector(1,1){\kanzanhalf}}
242 \put(\kanzanhalf,\kanzanhalf){\vector(-1,-1){\kanzanhalf}}
243 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{%
244 \begin{tabular}[t]{l}#5\end{tabular}\hss}}
245 \put(\kanzanhalf,\kanzanhalf){\raise1ex\hbox to0pt{\hss
246 \begin{tabular}[b]{r}#4\end{tabular}}}
247 \end{picture}}}
248 \def\reactdlrarrow{\@ifnextchar[%]
249 {\react@dlrarrow}{\react@dlrarrow[0pt]}}
250 \def\react@dlrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{\k@nz@n{#3}%
251 \def\arraystretch{0.8}%
252 \begin{picture}(\kanzanchi,\kanzanchi)(0,0)
253 \put(\kanzanhalf,\kanzanhalf){\vector(-1,1){\kanzanhalf}}
254 \put(\kanzanhalf,\kanzanhalf){\vector(1,-1){\kanzanhalf}}
255 \put(\kanzanhalf,\kanzanhalf){\hbox to0pt{%
256 \begin{tabular}[b]{l}#4\end{tabular}\hss}}
257 \put(\kanzanhalf,\kanzanhalf){\lower2ex\hbox to0pt{\hss
258 \begin{tabular}[t]{r}#5\end{tabular}}}
259 \end{picture}}}

\schemelarrow \schemerarrow \schemelrarrow The chemist 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.

260 % ********************************
261 % * scheme arrows                *
262 % * 1991 OCT 4 S. Fujita         *
263 % * Revised 1992 May 24 S.Fujita * 1999/02/02 by S. Fujita
264 % ********************************
265 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
266 \def\schemelarrow#1#2#3#4{\raisebox{#1}{%
267  \parbox{#2}{\centering
268  \baselineskip=.8\normalbaselineskip #3 \par
269  \vskip-0.2\normalbaselineskip
270  \centering{\Leftarrowfill} \par
271  \vskip-0.1\normalbaselineskip #4}}}
272 \def\schemerarrow#1#2#3#4{\raisebox{#1}{%
273  \parbox{#2}{\centering
274  \baselineskip=.8\normalbaselineskip #3 \par
275  \vskip-0.2\normalbaselineskip
276  \centering{\Rightarrowfill} \par
277  \vskip-0.1\normalbaselineskip #4}}}
278 \def\schemelrarrow#1#2#3#4{\raisebox{#1}{%
279  \parbox{#2}{\centering
280  \baselineskip=.8\normalbaselineskip #3 \par
281  \vskip-0.2\normalbaselineskip
282  \centering{\Leftrightarrowfill} \par
283  \vskip-0.1\normalbaselineskip #4}}}

\changespace The \changespace command is used to change a vertical space between lines.

284 % *************************
285 % * Changing line spacing *
286 % *************************
287 % After Chapter 3 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
288 \def\changespace#1{\def\baselinestretch{#1} \@normalsize}
289 %    %%%%%%%%%%1991 November 6%%%\bslskipchange%%%%%%%%%%
290 % \newenvironment{bslskipchange}[1]%
291 % {\par\begingroup\global\baselineskip= #1\normalbaselineskip}%
292 % {\endgroup\par\global\baselineskip=\normalbaselineskip%
293 %  \global\@ignoretrue}

6 Captions

6.1 Changing caption types within a float

\tbcaption \fgcaption \smcaption These commands enable us to place two or more floats of different kinds in a single floating body.

\tbcaption[TCAP]{CAP} makes a table caption in a float other than “table” or after using

                                 \fgcaption or \smcaption com-

mand. \fgcaption[TCAP]{CAP} makes a figure caption in a float

other than “figure” or after using

                                 \tbcaption or \smcaption com-

mand. \smcaption[TCAP]{CAP} makes a scheme caption in a float

other than “scheme” or after us-

                                 ing \tbcaption or \fgcaption

command.

For exmaple, we have

    \begin{figure}
       \caption{aaa}   % 通常のキャプション。
       \tbcaption{bbb} % 表のキャプションの強制的に変更。
       \fgcaption[ccc]{ddd} %図のキャプションに戻す。
    \end{figure}

294 \def\tbcaption{\def\@captype{table}\caption}
295 \def\fgcaption{\def\@captype{figure}\caption}
296 \def\smcaption{\def\@captype{scheme}\caption}
\chapinitial
297 % *****************
298 % * miscellaneous *
299 % *****************
300 %%%%%%%%%%%1991 November 7%%%chapinitial%%%%%%%%%%%%%
301 \def\chap@initial#1%
302 {\medbreak\begingroup\clubpenalty=10000
303 \def\par{\endgraf\endgroup\medbreak}
304 \noindent\hangindent28pt\hangafter=-2
305 \hbox to0pt{\hskip-\hangindent
306 \hbox to28pt{\hss\raise-4pt\hbox{\lower3pt\hbox{\Huge\bf #1}} }
307 } \hskip-5pt plus2pt minus2pt}
308 \outer\def\chapinitial{\chap@initial}

7 Redefinition of verbatim

\yen The chemist package uses a customaized defintion of \yen for printing the top symbol of each command sequence.

309 % ************

310 % * ￥の定義 *

311 % ************
312 % % ￥ %%%%%from ascmac.sty%%%%added \leavevmode%%%%%%%%%%%%%%%%

313 %\def\yen{\leavevmode{\setbox0=\hbox{Y}Y\kern-.97\wd0\vbox{%
314 % \hrule\@height.1ex\@width.98\wd0%
315 % \kern.33ex\hrule\@height.1ex\@width.98\wd0\kern.45ex}}}

316 %

317 \def\yen{\leavevmode\hbox{\setbox0=\hbox{Y}%
318 \setbox1=\vbox{\hrule height.05\ht0 width.96\wd0%
319 \kern.18\ht0\hrule height.05\ht0 width.96\wd0}%
320 \setbox1=\hbox to\wd0{\raise.3\ht0\box1\hss}%
321 {\ooalign{\hfil\box1\hfil\crcr\box0}}}}
\ifverbswitch \verb The switch \ifverbswitch is used for changing \yen or \backslash for the top

symbol of each control sequence printed by the \verb command.

322 % **************************
323 % * ￥を含んだ verbatim 環境 *
324 % **************************
325 % %%%%%%1992 April 30 %%%verbatim%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

326 % % from  奥村晴彦 LaTeX 美文書作成入門 1991 技術評論社  %

327 % %  omitted: =, by, etc.                                        %
328 % %  added: verbswitch                                           %
329 % %          \verbswitchtrue===> yen mark                        %
330 % %          \verbswitchfalse===> backslash mark                 %
331 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
332 \newif\ifverbswitch \verbswitchtrue
333 \let\old@verbatim\@verbatim
334 \let\old@xverbatim\@xverbatim
335 \let\old@sxverbatim\@sxverbatim
336 \begingroup
337 \catcode`\|=0  \catcode`\\=13
338 |gdef|verbh@@k{|catcode`|\=13 |let\=|yen}
339 |endgroup
340 \def\verb{\begingroup \catcode``=13 \@noligs
341 \tt \let\do\@makeother \dospecials
342 \ifverbswitch \verbh@@k \fi \@ifstar{\@sverb}{\@verb}}

@verbatim verbatim The switch \ifverbswitch is also effective for in a verbtim environment.

343 \begingroup
344 \catcode`|=0 \catcode`[=1 \catcode`]=2
345 \catcode`\{=12 \catcode`\}=12 \catcode`\\=13
346 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
347 |gdef|@sxverbatim#1\end{verbatim*}[#1|end[verbatim*]]
348 |endgroup
349 \newdimen\verbatimleftmargin \verbatimleftmargin\leftmargini
350 \newdimen\verbatimbaselineskip \verbatimbaselineskip11pt
351 \def\verbatimsize{\small}
352 \def\@verbatim{\trivlist \item[]%
353 \if@minipage \else \vskip\baselineskip%
354 \vskip-\verbatimbaselineskip \vskip\parskip\fi
355 \leftskip\@totalleftmargin

356 \if@minipage \else \advance\leftskip\verbatimleftmargin \fi
357 \rightskip\z@ \parindent\z@ \parfillskip\@flushglue \parskip\z@
358 \@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
359 \obeylines \verbatimsize \baselineskip\verbatimbaselineskip \tt
360 \catcode``=13 \@noligs \let\do\@makeother \dospecials}
361 \def\verbatim{\ifverbswitch \@verbatim \else \old@verbatim \fi
362 \frenchspacing \@vobeyspaces
363 \ifverbswitch \verbh@@k \@xverbatim \else \old@xverbatim \fi}
364 \@namedef{verbatim*}{%
365 \ifverbswitch \@verbatim \verbh@@k \@sxverbatim
366 \else \old@verbatim \old@sxverbatim \fi}
367 % %%%%%%%%%%%%%%pLaTeX2e%%%%%%%%%%%%%1996/04/20 by S. Fujita%%%%%%

368 % pLaTeX2e では再定義されているので，上のままだとエラーになる 369 % LaTeX2.09 の定義を補っておく

370 \def\@sverb#1{\def\@tempa ##1#1{##1\endgroup}\@tempa}
371 \def\@verb{\obeyspaces \frenchspacing \@sverb}
372 \def\@sverbtim{\obeyspaces\@verbatim}
373 \let\endverbatim=\endtrivlist
374 \@namedef{varbatim*}{\@verbatim\@sxverbatim}
375 \expandafter\let\csname endverbatim*\endcsname =\endtrivlist

8 Shadowed Boxes

\fb@xit \fboxit

376 %

377 % <<Base box for boxes>>
378 % \fb@xit{LWIDTH}{SPACE}{BWIDTH}{TEXT}
379 %     #1 LWIDTH:  line thickness
380 %     #2 SPACE:   spacing around the text
381 %     #3 BWIDTH:  box width
382 %     #4 TEXT:    text

383 %

384 \long\def\fb@xit#1#2#3#4{%
385 \setbox4=\vbox{\hsize#3\noindent#4}%
386 %\setbox4=\vbox{\hsize#3\noindent\strut#4\strut}%
387 \vbox{\hrule\@height#1\hbox{\vrule\@width#1\kern#2\vbox{%
388 \kern#2\box4\kern#2}\kern#1\vrule\@width#1}\hrule\@height#1}}
389 %\kern#2\box4\kern#2}\vrule\@width#1}\hrule\@height#1}}

390 %

391 % \fboxit{BWIDTH}{TEXT}
392 %     #1 BWIDTH:  box width
393 %     #2 TEXT:    text

394 %

395 \long\def\fboxit#1#2{\fb@xit{\fboxrule}{\fboxsep}{#1}{#2}}
\leftshfr@me
\leftshframe
\leftshfbox

396 % % ************************************************************

397 % % * 影のついた箱 *

398 % % *   January 3, 1993 by Shinsaku Fujita                     *
399 % % *   Borde ({\em \TeX{} by Example}) の記載を参考にして作った*
400 % % ************************************************************
401 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

402 %

403 % left shadow box

404 %

405 %    \leftshfr@me{SWIDTH}{SPACE}{BOXWIDTH}{TEXT}

406 %

407 %     #1 SWIDTH:    shadow width
408 %     #2 SPACE:     spacing around the text
409 %     #3 BOXWIDTH:  box width
410 %     #4 TEXT:      text

411 %

412 %    \leftshframe{BOXWIDTH}{TEXT}

413 %

414 %     #1 BOXWIDTH:  box width
415 %     #2 TEXT:      text

416 %

417 %    \leftshfbox{TEXT}

418 %

419 %     #1 TEXT:      text

420 %

421 % %%leftshfr@me#1 shadow width, #2 space, #3 boxwidth, #4 text%
422 \long\def\leftshfr@me#1#2#3#4{\leavevmode%
423 \vbox{\hbox{\hsize #3\vbox{%
424 \hbox{\vrule\@width #1%
425 \vbox{\kern-#1\fb@xit{%
426 \fboxrule}{#2}{#3}{#4}\kern-\fboxrule}\kern-#1}%
427 \hrule\@height#1}}}\strut\hskip #1\relax}
428 % %leftshframe%%%%%%%%%%%%%%%%%%%%%%%%% #1 width, #2 text%%%%%
429 \long\def\leftshframe#1#2{%
430 \leftshfr@me{\fboxsep}{\fboxsep}{#1}{#2}}
431 % %leftshfbox%%%%%%%%%%%%%%%%%%%%%%%%% #1 text%%%%%%%%%%%%%%%%
432 \long\def\leftshfbox#1{\leavevmode\setbox0=\hbox{\fbox{#1}}%
433 \vbox{\hbox{\vbox{\hbox{\vrule\@width\fboxsep\vbox{%
434  \kern-\fboxsep\box0\kern-\fboxrule}\kern-\fboxsep}%
435 \hrule\@height\fboxsep}}}\hskip\fboxsep\relax} %%%%
\rightshfr@me
\rightshframe
\rightshfbox

436 %

437 % right shadow box

438 %

439 %    \rightshfr@me{SWIDTH}{SPACE}{BOXWIDTH}{TEXT}

440 %

441 %     #1 SWIDTH:    shadow width
442 %     #2 SPACE:     spacing around the text
443 %     #3 BOXWIDTH:  box width
444 %     #4 TEXT:      text

446 %    \rightshframe{BOXWIDTH}{TEXT}

447 %

448 %     #1 BOXWIDTH:  box width
449 %     #2 TEXT:      text

450 %

451 %    \rightshfbox{TEXT}

452 %

453 %     #1 TEXT:      text

454 %

455 % %rightshfr@me#1 shadow width, #2 space, #3 boxwidth, #4 text%
456 \long\def\rightshfr@me#1#2#3#4{\leavevmode%
457 \vbox{\hbox{\kern#1\vbox{\hsize#3\vbox{\kern-#1\hbox{%
458 \kern-#1\fb@xit{\fboxrule}{#2}{#3}{#4}}\hrule\@height#1}}%
459 \vrule\@width#1}}\strut}
460 % %rightshframe%%%%%%%%%%%%%%%%%%%%%%%%% #1 width, #2 text%%%%%
461 \long\def\rightshframe#1#2{%
462 \rightshfr@me{\fboxsep}{\fboxsep}{#1}{#2}}
463 % %rightshfbox%%%%%%%%%%%%%%%%%%%%%%%%% #1 text%%%%%%%%%%%%%%%%
464 \long\def\rightshfbox#1{\leavevmode%
465 \vbox{\hbox{\kern\fboxsep\vbox{\vbox{\kern-\fboxsep\hbox{%
466 \kern-\fboxsep\fbox{#1}}\hrule\@height\fboxsep}}%
467 \vrule\@width\fboxsep}}}
ffboxit \ffparbox
468 % *****************************************

469 % * 箱 (環境版) *

470 % *   November 2, 1991 by Shinsaku Fujita *
471 % *****************************************
472 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
473 % %%%%%%1991 November 2 %%%ffboxit%%%%%%%%%%%%%%%%%%%%%%
474 \def\ffboxit{\par\vskip1pc\hfil\vbox\bgroup
475  \hrule\hbox\bgroup\vrule\kern3pt\vbox\bgroup\kern3pt}
476 \def\endffboxit{\kern3pt\egroup\kern3pt\vrule\egroup\hrule\egroup
477  \hfil\\}
478 \def\ffparbox#1#2{\vbox{\hsize=#1 \noindent\strut #2\strut}}

9 Framed box environment with and without shadows

9.1 Framed box environment without shadows

479 % %%%%%%1991 November 2 %%%frameboxit%%%old definition%%%%%%%%%%
480 %                                   with centering function
481 %\def\frameboxit#1{\par\vskip1pc\hfil\vbox\bgroup
482 %    \hrule\hbox\bgroup\vrule\kern3pt\vbox\bgroup\kern3pt
483 %    \vbox\bgroup\hsize=#1 \noindent\strut
484 %    \@minipagetrue%

485 %    \everypar{\global\@minipagefalse\everypar{}}}
486 %\def\endframeboxit{\strut\egroup\kern3pt\egroup%
487 %\kern3pt\vrule\egroup
488 %             \hrule\egroup\hfil\\}
489 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

490 %

491 % <<Base box for box environments>>
492 % \begin{fr@meboxit}{LWIDTH}{SPACE}{BWIDTH}
493 %     LWIDTH:  line thickness
494 %     SPACE:   spacing around the text
495 %     BWIDTH:  box width
496 % \end{fr@meboxit}

497 %

498 % %%fr@meboxit%%%%%#1 line width, #2 space, #3 width%%%%%%%%%%%%%
499 %\def\fr@meboxit#1#2#3{\gdef\fr@meline{#1}\gdef\fr@mesp{#2}%
500 %    \hbox\bgroup\vbox\bgroup%
501 %    \hrule\@height#1\hbox\bgroup%
502 %    \vrule\@width#1\kern#2\vbox\bgroup%
503 %    \kern#2\vbox\bgroup\hsize=#3\strut%
504 %    \@minipagetrue%
505 %    \everypar{\global\@minipagefalse\everypar{}}}
506 %\def\endfr@meboxit{\strut\egroup%
507 %\kern\fr@mesp\egroup\kern\fr@mesp\egroup\hrule\@height\fr@meline%
508 %\egroup\vrule\@width\fr@meline\egroup}
fr@meboxit frameboxit
509 % %%%%%%%revised by S. Fujita, January 16, 1993%%%%%%%%%%%%%%%%%%%%%
510 \long\def\fr@meboxit#1#2#3{\gdef\fr@meline{#1}\gdef\fr@mesp{#2}%
511 % %    \setbox4=\vbox\bgroup\hsize=#3\@parboxrestore\ignorespaces}
512  \global\setbox4=\hbox\bgroup\minipage{#3}}
513 % %\def\endfr@meboxit{\egroup%
514 \def\endfr@meboxit{\endminipage\egroup%
515  \hbox{\vbox{\hrule\@height\fr@meline%
516  \hbox{\vrule\@width\fr@meline\kern\fr@mesp%
517  \vbox{\kern\fr@meline\kern\fr@mesp\box4\kern\fr@mesp}%
518 % %    \vbox{\kern\fr@mesp\box4\kern\fr@mesp}%
519  \kern\fr@mesp}\hrule\@height\fr@meline}%
520  \vrule\@width\fr@meline}}
521 % %%%%%%%revised by S. Fujita, January 16, 1993%%%%%%%%%%%%%%%%%%%%
522 \def\frameboxit#1{\leavevmode\fr@meboxit{\fboxrule}{\fboxsep}{#1}}
523 \let\endframeboxit=\endfr@meboxit

9.2 Framed box environment with shadows

lshfr@meboxit
lshfboxit
524 % *****************************************

525 % * 影のついた箱 (環境版) *

526 % *   January 16, 1993 by Shinsaku Fujita *
527 % *   \sh@hwidth: 水平の影の太さ  *

528 % *   \sh@vwidth: 垂直の影の太さ  *
529 % *****************************************
530 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

531 %

532 % <<Base box for box environments>>  See above
533 % \begin{fr@meboxit}{LWIDTH}{SPACE}{BWIDTH}
534 %     LWIDTH:  line thickness
535 %     SPACE:   spacing around the text
536 %     BWIDTH:  box width
537 % \end{fr@meboxit}

538 %

539 % <<Base box environment with left shadow>>
540 % \begin{lshfr@meboxit}{HSWIDTH}{VSWIDTH}{SPACE}{BWIDTH}
541 %     HSWIDTH: the thickness of the horizontal shadow
542 %     VSWIDTH: the thickness of the vertical shadow
543 %     SPACE:   spacing around the text
544 %     BWIDTH:  box width
545 % \end{lshfr@meboxit}

546 %

547 % <<Box environment with left shadow>>
548 % \begin{lshfboxit}{BWIDTH}
549 %     BWIDTH:  box width
550 % \end{lshfboxit}

551 %

552 % %%%lshfr@meboxit#1 #2 shadow width, #3 space, #4 boxwidth%%%%
553 \def\lshfr@meboxit#1#2#3#4{\gdef\sh@hwidth{#1}\gdef\sh@vwidth{#2}%
554 \leavevmode%
555 \vbox\bgroup\hbox\bgroup\hsize #4\vbox\bgroup%
556 \hbox\bgroup\vrule\@width\sh@vwidth%
557 \vbox\bgroup\kern-\sh@hwidth\fr@meboxit{\fboxrule}{#3}{#4}}
558 \def\endlshfr@meboxit{\endfr@meboxit%%%%\kern-\fboxrule
559 \egroup\kern-\sh@vwidth\egroup%
560 \hrule\@height\sh@hwidth\egroup\egroup\egroup%
561 \strut\kern\sh@hwidth\relax}
562 % %%lshfboxit%%%%%%%%%%%%%%%%%%%%%%%%% #1 width %%%%%%%%
563 \def\lshfboxit#1{\leavevmode%
564 \lshfr@meboxit{\fboxsep}{\fboxsep}{\fboxsep}{#1}}
565 \let\endlshfboxit=\endlshfr@meboxit
rshfr@meboxit
rshfboxit
566 % <<Base box environment with right shadow>>
567 % \begin{rshfr@meboxit}{HSWIDTH}{VSWIDTH}{SPACE}{BWIDTH}
568 %     HSWIDTH: the thickness of the horizontal shadow
569 %     VSWIDTH: the thickness of the vertical shadow
570 %     SPACE:   spacing around the text
571 %     BWIDTH:  box width
572 % \end{rshfr@meboxit}

573 %

574 % <<Box environment with right shadow>>

575 % \begin{rshfboxit}{BWIDTH}
576 %     BWIDTH:  box width
577 % \end{rshfboxit}

578 %

579 % %%rshfr@meboxit#1 #2 shadow width, #3 space, #4 boxwidth%%%
580 \def\rshfr@meboxit#1#2#3#4{%
581 \gdef\sh@hwidth{#1}\gdef\sh@vwidth{#2}%
582 \leavevmode%
583 \vbox\bgroup\hbox\bgroup\kern\sh@vwidth%
584 \vbox\bgroup\hsize#4\vbox\bgroup%
585 \kern-\sh@hwidth\hbox\bgroup\kern-\sh@vwidth%
586 \fr@meboxit{\fboxrule}{#3}{#4}}
587 \def\endrshfr@meboxit{\endfr@meboxit\egroup%
588 \hrule\@height\sh@hwidth%
589 \egroup\egroup\vrule\@width\sh@vwidth\egroup\egroup\strut}
590 % %%rshfboxit%%%%%%%%%%%%%%%%%%%%%%%%% #1 width%%%%%%%%
591 \def\rshfboxit#1{\leavevmode%
592 \rshfr@meboxit{\fboxsep}{\fboxsep}{\fboxsep}{#1}}
593 \let\endrshfboxit=\endrshfr@meboxit

9.3 Framed box environment with gradient shadows

\hsgr@d
\vsgr@d
\vwgr@d
\hwgr@d
\vsepgr@d
\hsepgr@d
\nrep
\nrepmax

594 % %%parameters%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
595 \newdimen\hsgr@d \newdimen\vsgr@d
596 \newdimen\vwgr@d \newdimen\hwgr@d
597 \newdimen\vsepgr@d \newdimen\hsepgr@d
598 \newcount\nrep \newcount\nrepmax
599 %\nrepmax=20
600 \nrepmax=25
grshfr@meboxit
grshfboxit
601 % *****************************************

602 % * 斜の影のついた箱 (環境版) *

603 % * Box environments with gradient shadow *
604 % *   January 16, 1993 by Shinsaku Fujita *
605 % *****************************************
606 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

607 %

608 % <<Base box environment with gradient right shadow>>
609 % \begin{grshfr@meboxit}{HSWIDTH}{VSWIDTH}{SPACE}{BWIDTH}
610 %     HSWIDTH: the thickness of the horizontal shadow
611 %     VSWIDTH: the thickness of the vertical shadow
612 %     SPACE:   spacing around the text
613 %     BWIDTH:  box width
614 % \end{grshfr@meboxit}

615 %

616 % <<Box environment with gradient right shadow>>
617 % \begin{grshfboxit}{BWIDTH}

618 %     BWIDTH:  box width
619 % \end{grshfboxit}
620 % %%%%%%%%grshfr@meboxit#1 #2 shadow width, #3 space, #4 boxwidth%%%
621 \def\grshfr@meboxit#1#2#3#4{%
622 \hsgr@d=0pt \advance\hsgr@d by#1 \divide\hsgr@d by\nrepmax%
623 \vsgr@d=0pt \advance\vsgr@d by#2 \divide\vsgr@d by\nrepmax%
624 \leavevmode%
625 \setbox0=\vbox\bgroup\fr@meboxit{\fboxrule}{#3}{#4}}
626 \def\brb@xit#1{\vbox{\setbox1=\hbox{#1}%
627  \offinterlineskip%
628 \hbox{\copy1\vsepgr@d=\nrep\vsgr@d%
629  \vwgr@d=\ht1\advance\vwgr@d by-\vsepgr@d%
630  \vrule\@height\vwgr@d\@width\vsgr@d}%
631 \hbox{\hsepgr@d=\nrep\hsgr@d\kern\hsepgr@d%
632  \vbox{\hwgr@d=\wd1\advance\hwgr@d by-\hsepgr@d%
633  \hrule\@height\hsgr@d\@width\hwgr@d}}}}
634 \def\lprb@xit{\expandafter\setbox0=\expandafter\brb@xit{\box0}}
635 \def\endgrshfr@meboxit{\endfr@meboxit\egroup%
636 \nrep=\@ne\@whilenum\nrep<\nrepmax\do%
637 {\lprb@xit\advance\nrep\@ne}\box0\relax}
638 % %%%%% in TeX grammer
639 %\def\endgrshfr@meboxit{\endfr@meboxit\egroup%
640 % \nrep=\@ne \loop \lprb@xit \advance\nrep\@ne%
641 % \ifnum \nrep<\nrepmax \repeat \box0\relax}
642 % %%%%%%%grshfboxit%%%%%%%%%%%%%%%%%%%%%%%%% #1 width, #2 text%%%%%%%%
643 \def\grshfboxit#1{\leavevmode%
644 \grshfr@meboxit{\fboxsep}{\fboxsep}{\fboxsep}{#1}}
645 \let\endgrshfboxit=\endgrshfr@meboxit
glshfr@meboxit
glshfboxit
646 % <<Base box environment with gradient left shadow>>
647 % \begin{glshfr@meboxit}{HSWIDTH}{VSWIDTH}{SPACE}{BWIDTH}
648 %     HSWIDTH: the thickness of the horizontal shadow
649 %     VSWIDTH: the thickness of the vertical shadow
650 %     SPACE:   spacing around the text
651 %     BWIDTH:  box width
652 % \end{glshfr@meboxit}

653 %

654 % <<Box environment with gradient left shadow>>
655 % \begin{glshfboxit}{BWIDTH}
656 %     BWIDTH:  box width
657 % \end{glshfboxit}
658 % %%%%%%%%glshfr@meboxit#1 #2 shadow width, #3 space, #4 boxwidth%%
659 \def\glshfr@meboxit#1#2#3#4{%
660 \hsgr@d=0pt \advance\hsgr@d by#1 \divide\hsgr@d by\nrepmax%
661 \vsgr@d=0pt \advance\vsgr@d by#2 \divide\vsgr@d by\nrepmax%
662 \leavevmode%
663 \setbox0=\vbox\bgroup\fr@meboxit{\fboxrule}{#3}{#4}}
664 \def\blb@xit#1{%

665 \vbox{\setbox1=\hbox{#1}%
666  \offinterlineskip%
667  \vsepgr@d=\nrep\vsgr@d%
668  \vwgr@d=\ht1\advance\vwgr@d by-\vsepgr@d%
669  \hsepgr@d=\nrep\hsgr@d%
670  \hwgr@d=\wd1\advance\hwgr@d by-\hsepgr@d%
671 \hbox{\vrule\@height\vwgr@d\@width\vsgr@d\copy1}%
672 \hbox{\kern-\vsgr@d%
673  \vrule\@height\hsgr@d\@width\hwgr@d}}}
674 % %%       \hbox{\vbox{\hrule\@height\hsgr@d\@width\hwgr@d}}}}
675 \def\lplb@xit{\expandafter\setbox0=\expandafter\blb@xit{\box0}}
676 \def\endglshfr@meboxit{\endfr@meboxit\egroup%
677 \nrep=\@ne\@whilenum\nrep<\nrepmax\do%
678 {\lplb@xit\advance\nrep\@ne}\box0\relax}
679 % %%%%% in TeX grammer
680 %\def\endglshfr@meboxit{\endfr@meboxit\egroup%
681 % \nrep=\@ne \loop \lplb@xit \advance\nrep\@ne%
682 % \ifnum\nrep<\nrepmax\repeat\box0\relax}
683 % %%%%%%%%glshfboxit%%%%%%%%%%%%%%%%%%%%%%%%% #1 width, #2 text%%%
684 \def\glshfboxit#1{\leavevmode%
685 \glshfr@meboxit{\fboxsep}{\fboxsep}{\fboxsep}{#1}}
686 \let\endglshfboxit=\endglshfr@meboxit

10 (Mini)screen environment

10.1 (Mini)screen environment without a title

\@oval \h@b@x \@vrf@
687 \@ifundefined{ybaselineshift}{%
688 \newdimen\ybaselineshift \ybaselineshift=\z@}{}
689 \@ifundefined{tbaselineshift}{%
690 \newdimen\tbaselineshift \tbaselineshift=\z@}{}
691 \newdimen\@savetbaselineshift \@savetbaselineshift=\z@
692 \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
693 \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
694 \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
695 #1\unitlength \@ovyy #2\unitlength
696 \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
697 \advance\@tempdimb -2pt\relax
698 \@getcirc \@tempdimb
699 \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
700 \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
701 \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
702 \@circlefnt \setbox\@tempboxa
703 \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
704 \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
705 \if@ovt \@ovhorz \kern -\@ovxx \fi
706 \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro

707 \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
708 \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
709 \endgroup}
710 \def\h@b@x#1#2#3{\hbox to\dimen1%
711 {\@oval(#3,#3)[#1]\hfil\@oval(#3,#3)[#2]}}
712 \def\@vrf@#1#2{\vskip#1\leaders\vrule\@width#2\vfil\vskip#1}
miniscreen screen
713 % ******************
714 % * miniscreen 環境 *
715 % ******************

716 % 717 % ASCII 版 Micro\TeX の screen 環境を枠の幅を指定できるように改変 718 %

719 %   ifcase 文 ==> 直接計算
720 %   dimen 類 ==> dimen0 to dimen5
721 %   box 類  ==> box0 and box1

722 %

723 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
724 % miniscreen environment

725 %

726 \let\miniscreentoprule=\hrule
727 \def\miniscreen{\@ifnextchar[{\@miniscreen}{\@miniscreen[0]}}
728 \def\miniscreen{\@ifnextchar[{\@miniscreen}{\@miniscreen[0]}}
729 \def\@miniscreen[#1]#2{\dimen1=#2\relax%
730 \@savetbaselineshift\tbaselineshift \tbaselineshift\z@
731 \@tempcnta=-2 \multiply\@tempcnta by#1\relax%
732 \advance\@tempcnta by 20\relax \dimen5=1pt
733 \multiply\dimen5\@tempcnta
734 \dimen4=-1pt \multiply\dimen4 by#1\relax
735 \advance\dimen4 by 10pt
736 \dimen3=\dimen4 \advance\dimen3 by -.2pt
737 \par\vspace{.3\baselineskip}%
738 \dimen2=\dimen1 \advance\dimen2 by .1pt
739 \advance\dimen1 -\dimen5\relax%
740 \setbox0=\hbox\bgroup\minipage{\dimen1
741 \tbaselineshift\@savetbaselineshift}}%
742 \def\endminiscreen{\endminipage\egroup%
743 \setbox1=\hbox to\dimen2{\hfil\vbox{\offinterlineskip%
744 \thinlines\unitlength=1pt
745 \miniscreentoprule%\hrule
746 \kern\dimen3%
747 \h@b@x{tl}{tr}{\@tempcnta}%
748 \kern-\dimen4\box0\h@b@x{bl}{br}{\@tempcnta}%
749 \kern-.4pt\hrule}\hfil}\dimen0=\ht1\noindent%
750 \hbox to\dimen2{\hbox to.4pt{%
751 \vbox to\dimen0{\@vrf@{\dimen4}{.4pt}}\hss}%
752 \box1\hbox to.2pt{%
753 \hss\vbox to\dimen0{\@vrf@{\dimen4}{.4pt}}}\hss}}%

754 % %%%%%%alternative
755 %\def\miniscreen{\@ifnextchar[{\@miniscreen}{\@miniscreen[0]}}
756 %\def\@miniscreen[#1]#2{\noindent\minipage{#2}\@screen[#1]}
757 %\def\endminiscreen{\endscreen\endminipage}
758 \def\screen{\@ifnextchar[{\@screen}{\@miniscreen[0]{\linewidth}}}
759 \def\@screen[#1]{\miniscreen[#1]{\linewidth}}
760 \let\endscreen=\endminiscreen

10.2 (Mini)screen environment with a title

\tboxscreentoprule
\tboxtitle
761 \def\tboxscreentoprule{%
762 \hbox to\wd0{\smash{\lower.4ex\hbox{%
763 \fboxsep=2pt \fbox{\small \tboxtitle}}}\hrulefill}}
764 \def\tboxtitle{\bf Memorandum}
\tboxminiscreen
\tboxscreen
765 % ******************
766 % * tboxscreen 環境 *
767 % ******************
768 % 1996/06/04 by Shinsaku Fujita

769 %

770 \def\tboxminiscreen{\@ifnextchar[{\vskip8pt
771 \let\miniscreentoprule=\tboxscreentoprule%
772 \@miniscreen}{\vskip8pt
773 \let\miniscreentoprule=\tboxscreentoprule%
774 \@miniscreen[0]}}
775 \let\endtboxminiscreen=\endminiscreen
776 \def\tboxscreen{\@ifnextchar[{\@tboxscreen}%
777 {\@tboxscreen[0]}}
778 \def\@tboxscreen[#1]{\tboxminiscreen[#1]{\linewidth}}
779 \let\endtboxscreen=\endtboxminiscreen

11 Further boxes

\sboxit
780 % ******************************

781 % * \sboxit 左右の余裕のない箱 *

782 % ******************************
783 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
784 \def\sboxit#1#2{\vbox{\hrule\hbox%
785 {\vrule\vbox{\kern3pt\vbox{\hsize #1 \noindent #2}%
786 \kern3pt}\vrule}\hrule}}

12 Boxes with no height or no width

\bury \pushtowall
787 % ***********************
788 % * bury and pushtowall *
789 % ***********************
790 % After Chapter 7 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

791 %

792 %  \bury[下げ幅]{内容}
793 %  下げ幅のデフォルト値は， \normalbaselineksip の半分

794 %

795 %  (旧) \def\bury#1{\smash{\lower.5\normalbaselineskip\hbox{#1}}}

796 % これは，「化学と生化学のための LaTeX」に載せた定義です． 797 % 以下の定義は，下げ幅をオプション引数として取るように 798 % 拡張したものです． 799 %

800 \def\bury{\@ifnextchar [{\@bury}{\@bury[.5\normalbaselineskip]}}
801 \def\@bury[#1]#2{\smash{\lower#1\hbox{#2}}}

802 %

803 %  \pushtowall{内容}

804 % 水平方向の押し付ける命令 (\smash の水平方向版) 805 %

806 \def\finpushw@ll{\wd0=0pt \box0}
807 \def\makepushw@ll#1{\setbox0=\hbox{#1}\finpushw@ll}
808 \def\mathpushw@ll#1#2{\setbox0=\hbox{$\m@th#1{#2}$}\finpushw@ll}
809 \def\pushtowall{\relax \leavevmode
810 \ifmmode\def\next{\mathpalette\mathpushw@ll}
811 \else\let\next\makepushw@ll \fi \next}
\penetrate
812 %   \penetrate{DIM}{OBJ}

813 % 幅無し<OBJ>を、印字位置はそのままにして、 <DIM>だけ移動させる。この時 814 % 引き続く文字の印字位置は<OBJ>がなかったとした時の位置になる。 815 % (\bury 命令の水平方向版) 816 % 817 % (比較)

818 %     aaa  bbb  \penetrate{-50pt}{ccc} ddd eee fff \\
819 %     aaa  bbb  \hspace{-50pt} ccc ddd eee fff \\

820 %

821 \def\penetrate#1#2{\pushtowall{\hbox{\hskip#1\hbox{#2}}}}

13 Symbols for instant photography

\cyan
\magenta
\yellow
\cyandv
\magentadv
\yellowdv
\agxlatent
\agxdv
\agx

822 % ***********************
823 % * instant photography *
824 % ***********************
825 % After Chapter 7 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita

22

826 \def\cyan{\mbox{$\bigcirc$\kern-.06em{--}\kern-.06em
827 \ooalign{\hfil
828 \raise.05ex\hbox{\scriptsize C}\hfil\cr\cr$\bigcirc$}\,}}
829 \def\magenta{\mbox{$\bigcirc$\kern-.06em{--}\kern-.06em
830 \ooalign{\hfil
831 \raise.05ex\hbox{\scriptsize M}\hfil\cr\cr$\bigcirc$}\,}}
832 \def\yellow{\mbox{$\bigcirc$\kern-.06em{--}\kern-.06em
833 \ooalign{\hfil
834 \raise.05ex\hbox{\scriptsize Y}\hfil\cr\cr$\bigcirc$}\,}}
835 \def\cyandv{\mbox{$\bigotimes$\kern-.06em{--}\kern-.06em
836 \ooalign{\hfil
837 \raise.05ex\hbox{\scriptsize C}\hfil\cr\cr$\bigcirc$}\,}}
838 \def\magentadv{\mbox{$\bigotimes$\kern-.06em{--}\kern-.06em
839 \ooalign{\hfil
840 \raise.05ex\hbox{\scriptsize M}\hfil\cr\cr$\bigcirc$}\,}}
841 \def\yellowdv{\mbox{$\bigotimes$\kern-.06em{--}\kern-.06em
842 \ooalign{\hfil
843 \raise.05ex\hbox{\scriptsize Y}\hfil\cr\cr$\bigcirc$}\,}}
844 \def\agxlatent{%
845 \mbox{\ooalign{%
846 \hfil\raise.07ex\hbox{\footnotesize $\bullet$}\hfil\cr\cr
847 $\triangle$}\,}}
848 \def\agxdv{%
849 \mbox{\ooalign{\hfil\raise.07ex\hbox{%
850 \small $\spadesuit$}\hfil\cr\cr
851 $\triangle$}\,}}
852 \def\agx{\mbox{$\triangle$}}

14 Various arrows with fixed length

\llongrightarrow
\llongleftarrow
\llongleftrightarrow
\Equilibarrow
\Llongrightarrow
\Llongleftarrow
\Llongleftrightarrow

853 % ***********************
854 % * various long arrows *
855 % ***********************
856 % After Chapter 18 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
857 \def\llongrightarrow{%%%--->
858 \relbar\joinrel\relbar\joinrel\relbar\joinrel\rightarrow}
859 \def\llongleftarrow{%%%<---
860 \leftarrow\joinrel\relbar\joinrel\relbar\joinrel\relbar}
861 \def\llongleftrightarrow{%%%<--->
862 \leftarrow\joinrel\relbar\joinrel\relbar\joinrel\rightarrow}
863 \def\Equilibarrow{%%%<--- and --->
864 \mathrel{\ooalign{\raise.35ex\hbox{$\llongrightarrow$}\crcr
865 \lower.35ex\hbox{$\llongleftarrow$}}}}
866 \def\Llongrightarrow{%%%===>
867 \Relbar\joinrel\Relbar\joinrel\Relbar\joinrel\Rightarrow}
868 \def\Llongleftarrow{%%%<===
869 \Leftarrow\joinrel\Relbar\joinrel\Relbar\joinrel\Relbar}

870 \def\Llongleftrightarrow{%%<===>
871 \Leftarrow\joinrel\Relbar\joinrel\Relbar\joinrel\Rightarrow}
\llongleftharpoondown
\llongrightharpoondown
\equilibarrow

872 \def\llongleftharpoondown{%%% /---
873 \leftharpoondown\joinrel\relbar\joinrel\relbar\joinrel\relbar}
874 \def\llongrightharpoonup{%%%---/
875 \relbar\joinrel\relbar\joinrel\relbar\joinrel\rightharpoonup}
876 \def\equilibarrow{%%% /--- and ---/
877 \mathrel{\ooalign{%
878 \raise.3ex\hbox{$\llongrightharpoonup$}\crcr
879 \lower.3ex\hbox{$\llongleftharpoondown$}}}}
\eqproton
880 % *******************************

881 % * 平衡の両側矢印の上に H+を書く*

882 % *******************************
883 \def\eqproton{\stackrel{{\rm \displaystyle H}^{+}}{\Equilibarrow}}
\lllongrightarrow
\lllongleftarrow
\lllongleftrightarrow
\Equiliblongarrow
\Lllongrightarrow
\Lllongleftarrow
\Lllongleftrightarrow

884 % ****************

885 % * 長い長い矢印 *

886 % ****************
887 \def\lllongrightarrow{\relbar\joinrel\relbar%
888 \joinrel\relbar\joinrel\relbar\joinrel\rightarrow}
889 \def\lllongleftarrow{%%%<-------
890 \leftarrow\joinrel\relbar\joinrel\relbar%
891 \joinrel\relbar\joinrel\relbar}
892 \def\lllongleftrightarrow{%%%<------->
893 \leftarrow\joinrel\relbar\joinrel\relbar%
894 \joinrel\relbar\joinrel\rightarrow}
895 \def\Equiliblongarrow{%%%<------- and ------->
896 \mathrel{\ooalign{\raise.35ex\hbox{$\lllongrightarrow$}\crcr
897 \lower.35ex\hbox{$\lllongleftarrow$}}}}
898 \def\Lllongrightarrow{%%%=======>
899 \Relbar\joinrel\Relbar\joinrel\Relbar\joinrel%
900 \Relbar\joinrel\Rightarrow}
901 \def\Lllongleftarrow{%%%<=======
902 \Leftarrow\joinrel\Relbar\joinrel\Relbar\joinrel%
903 \Relbar\joinrel\Relbar}
904 \def\Lllongleftrightarrow{%%<=======>
905 \Leftarrow\joinrel\Relbar\joinrel\Relbar\joinrel%
906 \Relbar\joinrel\Rightarrow}
\lllongleftharpoondown
\lllongrightharpoondown
\equiliblongarrow
\deHBr

907 \def\lllongleftharpoondown{%%% /-------
908 \leftharpoondown\joinrel\relbar\joinrel\relbar%
909 \joinrel\relbar\joinrel\relbar}
910 \def\lllongrightharpoonup{%%%-------/

911 \relbar\joinrel\relbar\joinrel\relbar\joinrel%
912 \relbar\joinrel\rightharpoonup}
913 \def\equiliblongarrow{%%% /------ and ------/
914 \mathrel{\ooalign{%
915 \raise.3ex\hbox{$\lllongrightharpoonup$}\crcr
916 \lower.3ex\hbox{$\lllongleftharpoondown$}}}}
917 % %%%%%
918 \def\deHBr{\stackrel{\displaystyle \rm -HBr}%
919 {\stackrel{\displaystyle \lllongrightarrow}{\rm E2}}}

15 Chemical Corrections

15.1 Correction commands

\chemcorr
\leavechemcorr
920 % ********************
921 % * chemform command *
922 % ********************
923 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
924 \def\chemcorr{%
925 \fontdimen16\textfont2=3.5pt
926 \fontdimen17\textfont2=3.5pt
927 %\fontdimen14\textfont2=3.8pt

928 }

929 \def\leavechemcorr{%
930 \fontdimen16\textfont2=1.49998pt
931 \fontdimen17\textfont2=2.47217pt
932 %\fontdimen14\textfont2=3.62892pt

933 }

15.2 Chem Version

\ifnewl@tex The ‘chem’ for mathversion is introduced to describe chemical equations.

934 \newif\ifnewl@tex \newl@textrue
935 \@ifundefined{DeclareMathVersion}%
936 {\global\newl@texfalse}{\global\newl@textrue}%

937 %

938 \ifnewl@tex\@ifundefined{mv@chem}{\DeclareMathVersion{chem}%
939 \SetSymbolFont{letters}{chem}{OT1}{cmr}{m}{n}}{}\fi
\chemform
940 \ifnewl@tex
941 \def\chemform#1{{\mathversion{chem}%
942 $\chemcorr #1$\leavechemcorr}}
943 \else
944 \def\chemform#1{\chemcorr
945 $\rm #1$\leavechemcorr}
946 \fi

chemmath
947 % ************************
948 % * chemmath environment *
949 % ************************
950 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
951 \ifnewl@tex
952 \def\chemmath{\begingroup\mathversion{chem}\[\chemcorr}
953 \def\endchemmath{\]\endgroup\leavechemcorr}
954 \else
955 \def\chemmath{\chemcorr\[\rm}
956 \def\endchemmath{\] \leavechemcorr}
957 \fi
chemeqn
958 % ***********************
959 % * chemeqn environment *
960 % ***********************
961 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
962 \ifnewl@tex
963 \def\chemeqn{\begingroup\mathversion{chem}\equation\chemcorr}
964 \def\endchemeqn{\endequation\endgroup\leavechemcorr}
965 \else
966 \def\chemeqn{\chemcorr\equation\rm}
967 \def\endchemeqn{\endequation\leavechemcorr}
968 \fi
chemeqnarray
969 % ****************************
970 % * chemeqnarray environment *
971 % ****************************
972 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
973 \ifnewl@tex
974 \def\chemeqnarray{\stepcounter{equation}
975 \let\@currentlabel=\theequation
976 \global\@eqnswtrue
977 \global\@eqcnt\z@\tabskip\@centering
978 \let\\=\@eqncr
979 \begingroup\mathversion{chem}
980 $$\chemcorr\halign to \displaywidth\bgroup
981 \@eqnsel\hskip\@centering
982 $\rm \displaystyle\tabskip\z@{##}$ &
983 \global\@eqcnt\@ne
984 \hskip \arraycolsep \hfil$\rm{##}$\hfil &
985 \global\@eqcnt\tw@ \hskip \arraycolsep
986 $\rm \displaystyle\tabskip\z@{##}$\hfil
987 \tabskip\@centering &
988 \llap{##}\tabskip\z@\cr}
989 \def\endchemeqnarray{\endeqnarray\endgroup
990 \leavechemcorr}

 991 \else
 992 \def\chemeqnarray{\stepcounter{equation}
 993 \let\@currentlabel=\theequation
 994 \global\@eqnswtrue
 995 \global\@eqcnt\z@\tabskip\@centering
 996 \let\\=\@eqncr \chemcorr
 997 $$\halign to \displaywidth\bgroup
 998 \@eqnsel\hskip\@centering
 999 $\rm \displaystyle\tabskip\z@{##}$ &
1000 \global\@eqcnt\@ne
1001 \hskip \arraycolsep \hfil$\rm{##}$\hfil &
1002 \global\@eqcnt\tw@ \hskip \arraycolsep
1003 $\rm \displaystyle\tabskip\z@{##}$\hfil
1004 \tabskip\@centering &
1005 \llap{##}\tabskip\z@\cr}
1006 \def\endchemeqnarray{\endeqnarray
1007 \leavechemcorr}

1008 \fi

chemeqnarray*
1009 % *****************************
1010 % * chemeqnarray* environment *
1011 % *****************************
1012 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
1013 % bug fix (1996/06/15) the end command is replaced.
1014 \let\@seqncr=\@eqncr
1015 \ifnewl@tex
1016 \@namedef{chemeqnarray*}{%
1017 \def\@eqncr{\nonumber\@seqncr}\chemeqnarray}
1018 \@namedef{endchemeqnarray*}{\nonumber\endchemeqnarray}
1019 \else
1020 \@namedef{chemeqnarray*}{%
1021 \def\@eqncr{\nonumber\@seqncr\rm}\chemeqnarray}
1022 \@namedef{endchemeqnarray*}{\nonumber\endchemeqnarray}

1023 \fi

chemeqnarraya
1024 % *****************
1025 % * chemeqnarraya *
1026 % *****************
1027 % After Chapter 9 of ``LaTeX for (Bio)Chemists'' by S. Fujita
1028 % revised may 21 1992 by S. Fujita
1029 \def\chemeqnarraya{\chemeqn@rraya \chemeqnarray}
1030 \def\chemeqn@rraya{%
1031 \c@enumi=\c@equation
1032 \advance\c@enumi\@ne
1033 \c@equation=\z@
1034 \@ifundefined{chapter}%
1035 {\def\theequation{\theenumi\alph{equation}}}%
1036 {\def\theequation{%

1037 \thechapter.\theenumi\alph{equation}}}}
1038 \def\endchemeqnarraya{\endchemeqnarray
1039 \global\c@equation=\c@enumi}

16 XyMcompd and XyMtab Environments

These environments are designed for XyM Markup Language to treat a XyM tag and a XyMtab tag.

XyMcompd
1040 \def\XyMcompd(#1,#2)(#3,#4)#5#6{%
1041 \begingroup
1042 \edef\xymrefa{#5}\edef\xymrefb{#6}%
1043 \edef\kkk{#1}%
1044 \begin{tabular}{c}
1045 \ifx\kkk\empty\else
1046 \begin{picture}(#1,#2)(#3,#4)\fi\ignorespaces}
1047 \def\endXyMcompd{%
1048 \ifx\kkk\empty\else\end{picture}\fi
1049 \\[-\baselineskip]
1050 \ifx\xymrefa\empty\else{\bf \compd\xymrefb
1051 \expandafter\label{\xymrefa}}\fi
1052 \end{tabular}\endgroup}
XyMtab
1053 \def\XyMtab#1{\center\tabular{#1c}}
1054 \def\endXyMtab{\endtabular\endcenter}

\derivlist For example, derivatives are specified as follows:

    \derivlist{X = Cl;X = F;X = Me}

1055 \def\derivlist#1{%
1056 \mbox{}\\
1057 \begingroup\def\arraystretch{0.7}%
1058 \begin{tabular}{l}
1059 \@forsemicol\member:=#1\do{%
1060 \ifx\member\empty\else%
1061 \hbox to2em{\hss\derivnum}:\space\member \\
1062 \fi}\end{tabular}\endgroup}

This command is used in the XyMderiv environment.

XyMderiv
1063 \def\XyMderiv{\tabular{c}}
1064 \def\endXyMderiv{\endtabular}

17 Useful commands

\endash \Cent \degC \degF
1065 % ***************
1066 % * temperature *
1067 % ***************
1068 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
1069 \def\endash{\mbox{--{}}}
1070 \def\Cent{\mbox{\raise.9ex\hbox{%
1071 \scriptsize$\circ$}\kern-.12em\hbox{C}}}
1072 \def\degC{\mbox{\kern-.2em\char'27\kern-.3em C}}
1073 \def\degF{\mbox{\kern-.2em\char'27\kern-.3em F}}
\yubin \Yubin
1074 % *******************
1075 % * yubin and Yubin *
1076 % *******************
1077 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
1078 \def\yubin{$\overline{\top}$}
1079 \def\Yubin#1{\leavevmode\hbox{\vbox{\hrule\@height.12ex\@width.7em
1080 \kern.28ex\hrule\@height.12ex\@width.7em
1081 \hbox{\kern.35em\kern-.06ex
1082 \vbox{\hrule\@height1ex\@width.12ex}}}\kern.1em{#1}}}
\xlethead
1083 % ***********
1084 % * lethead *
1085 % ***********
1086 % After Chapter 18 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
1087 \def\xlethead#1{%
1088 \kern-.6667\baselineskip \line{\hrulefill\phantom{ #1 }\hrulefill}
1089 \kern-.6667\baselineskip \line{\hrulefill\phantom{ #1 }\hrulefill}
1090 \kern-.6667\baselineskip \line{\hrulefill\hbox{ #1 }\hrulefill}}
1091 \def\lethead#1#2#3{\def\line{\hbox to\textwidth}
1092 \vbox{\line{\hrulefill}
1093 \xlethead{#1} \xlethead{#2} \xlethead{#3}
1094 \kern-.6667\baselineskip \line{\hrulefill}}}
\horizon
1095 % ************
1096 % * baseline *
1097 % ************
1098 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
1099 \def\horizon{\rule{12pt}{0.1pt}}

18 Logos

\resetfontsize
\Bib
\BibTeX
\jBibTeX  29

1100 % ********************************
1101 % * Redefinition of Logos        *
1102 % * January 3, 1993 by S. Fujita *
1103 % ********************************
1104 % After Chapter 12 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita
1105 \newcount\TestCount \def\tmpkern{\kern0pt}
1106 \ifnewl@tex \else
1107 \def\resetfontsize{%
1108 \ifx\@currsize\normalsize%
1109 \def\tmpf@ntsize{%
1110 \load{\footnotesize}{\sf}%
1111 \load{\footnotesize}{\sl}%
1112 \load{\footnotesize}{\bf}%
1113 \def\tmpkern{\kern0.05em}%
1114 \footnotesize}\fi
1115 \ifx\@currsize\scriptsize \let\tmpf@ntsize=\tiny\fi
1116 \ifx\@currsize\footnotesize \let\tmpf@ntsize=\tiny\fi
1117 \ifx\@currsize\small \let\tmpf@ntsize=\scriptsize\fi
1118 \ifx\@currsize\large \let\tmpf@ntsize=\small\fi
1119 \ifx\@currsize\Large \let\tmpf@ntsize=\@normalsize\fi
1120 \ifx\@currsize\LARGE \let\tmpf@ntsize=\large\fi
1121 \ifx\@currsize\huge \let\tmpf@ntsize=\Large\fi
1122 \ifx\@currsize\Huge \let\tmpf@ntsize=\LARGE\fi}

1123 \fi

1124 \ifnewl@tex \else
1125 \def\Bib{\ifnum \fam=\m@ne \fam=\z@ \fi\TestCount=\fam\leavevmode%
1126  \edef\aaa{\fontname\scriptfont\fam}%
1127  \edef\bbb{\fontname\textfont\fam}%
1128 \resetfontsize%
1129 \hbox{$\fam=\TestCount\textstyle B$}%
1130 \ifx\aaa\bbb%
1131 \hbox{\tmpf@ntsize\bf
1132 $\fam=\TestCount\kern-.025em I\kern-.045em B$}%
1133 \else%
1134 \hbox{$\fam\TestCount\scriptstyle\kern-.025em I\kern-.045em B$}%

1135 \fi 1136 } 1137 \fi

1138 %\def\BibTeX{\Bib\kern-.08em\TeX}
1139 %\def\jBibTeX{\leavevmode\lower.46ex\hbox{J}
1140 %\kern-.08em\Bib\kern-.08em\TeX}
1141 % %%\def\BibTeX{%
1142 % {\rm B\kern-.05em{\sc i\kern-.025emb}\kern-.08em\TeX}}
1143 % %%%%%1996/04/20 by Shinsaku Fujita%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1144 \ifnewl@tex
1145 \DeclareRobustCommand{\BibTeX}{%
1146  B\hbox{$\m@th$\csname S@\f@size\endcsname
1147  \fontsize\sf@size\z@ \math@fontsfalse\selectfont
1148  \kern-.025em I\kern-.045em B}\kern-.08em\TeX}

1149 \else \def\BibTeX{\Bib\kern-.08em\TeX} \fi
1150 \ifnewl@tex
1151 \DeclareRobustCommand{\jBibTeX}{\mbox{%
1152 \if b\expandafter\@car\f@series\@nil\boldmath\fi
1153 \leavevmode\lower.46ex\hbox{J}\kern-.08em\BibTeX}}
1154 \else
1155 \def\jBibTeX{\leavevmode\lower.46ex\hbox{J}%
1156 \kern-.08em\Bib\kern-.08em\TeX}

1157 \fi

\jTeX \pTeX
1158 \def\jTeX{\leavevmode\lower.46ex\hbox{J}\kern-.15em\TeX}
1159 \def\pTeX{p\kern-.15em\TeX}
\Sub \Subbib
1160 \ifnewl@tex \else
1161 \def\Sub{\leavevmode\ifnum \fam=\m@ne \fam=\z@ \fi%
1162  \TestCount=\fam{S}%
1163  \edef\aaa{\fontname\scriptfont\fam}%
1164  \edef\bbb{\fontname\textfont\fam}%
1165  \ifx\aaa\bbb\resetfontsize%
1166  \hbox{\tmpf@ntsize\bf%
1167  $\fam=\TestCount\kern-.045em{U}\kern-.12em{B}$}%
1168  \else%
1169  \hbox{$\fam\TestCount%
1170  \scriptstyle\kern-.045em{U}\kern-.12em{B}$}%
1171  \fi}

1172 \fi

1173 %\def\SubBib{\Sub\kern-.08em\Bib}
1174 % %%%%%1996/04/20 by Shinsaku Fujita%%%%%%%%%%%%%%%%%%%%%%%%%%%
1175 \ifnewl@tex
1176 \DeclareRobustCommand{\SubBib}{S\hbox{$\m@th$%
1177 \csname S@\f@size\endcsname\fontsize\sf@size\z@
1178 \math@fontsfalse\selectfont%
1179 \kern-.045em{U}\kern-.12em{B}}B\hbox{$\m@th$%
1180 \csname S@\f@size\endcsname\fontsize\sf@size\z@
1181 \math@fontsfalse\selectfont \kern-.025em I\kern-.045em B}}
1182 \else \def\SubBib{\Sub\kern-.08em\Bib} \fi

{\La \atop \LaTeX}

1183 %\def\La{\TestCount=\fam \leavevmode L\raise.42ex
1184 %        \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}}
1185 \ifnewl@tex \else
1186 \def\La{\ifnum \fam=\m@ne \fam=\z@ \fi\TestCount=\fam%
1187 \edef\aaa{\fontname\scriptfont\fam}%
1188 \edef\bbb{\fontname\textfont\fam}\leavevmode{L}%
1189 \ifx\aaa\bbb \resetfontsize%
1190 \raise.46ex\hbox{{\tmpf@ntsize\bf%
1191 $\fam\TestCount\kern-.4em\tmpkern{A}$}}%

1192 \else%
1193 \raise.42ex\hbox{$\fam\TestCount\scriptstyle\kern-.3em{A}$}%
1194 \fi}

1195 \fi

1196 % %%%%%1996/04/20 by Shinsaku Fujita%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1197 %\def\LaTeX{\La\kern-.15em\TeX}
1198 \ifnewl@tex \else \def\LaTeX{\La\kern-.15em\TeX}\fi
1199 %\def\jLaTeX{\leavevmode\lower.46ex\hbox{J}\kern-.08em\LaTeX}
1200 \ifnewl@tex
1201 \DeclareRobustCommand{\jLaTeX}%
1202 {\leavevmode\lower.46ex\hbox{J}\kern-.08em\LaTeX}
1203 \else
1204 \def\jLaTeX{\leavevmode\lower.46ex\hbox{J}\kern-.08em\LaTeX}

1205 \fi

\PiC \PiCTeX
1206 \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
1207 %\def\PiCTeX{\PiC\kern-.11em\TeX}
1208 \ifnewl@tex
1209 \DeclareRobustCommand{\PiCTeX}{\PiC\kern-.11em\TeX}
1210 \else
1211 \def\PiCTeX{\PiC\kern-.11em\TeX}

1212 \fi

\tpic \PiCTeX
1213 %\def\tpic{\TestCount=\fam \leavevmode T%
1214 % \hbox{$\fam\TestCount\scriptstyle
1215 %\kern-.025em P\kern-.025em I\kern-.025emC$}}
1216 \ifnewl@tex
1217 \DeclareRobustCommand{\tpic}{T\hbox{$\m@th$%
1218 \csname S@\f@size\endcsname\fontsize\sf@size\z@
1219 \math@fontsfalse\selectfont
1220 \kern-.025em P\kern-.025em I\kern-.025emC}}
1221 \else
1222 \def\tpic{\ifnum \fam=\m@ne \fam=\z@ \fi%
1223  \TestCount=\fam \leavevmode%
1224  \edef\aaa{\fontname\scriptfont\fam}%
1225  \edef\bbb{\fontname\textfont\fam}%
1226 \resetfontsize\hbox{$\fam=\TestCount\textstyle T$}%
1227 \ifx\aaa\bbb\hbox{\tmpf@ntsize\bf$\fam=\TestCount%
1228  \kern-.025em P\kern-.025em I\kern-.025emC$}\else%
1229 \hbox{$\fam\TestCount\scriptstyle%
1230  \kern-.025em P\kern-.025em I\kern-.025emC$}\fi}

1231 \fi

\Post \Script \PostScript
1232 \ifnewl@tex \else
1233 \def\Post{\ifnum \fam=\m@ne \fam=\z@ \fi%

1234  \TestCount=\fam\leavevmode%
1235  \edef\aaa{\fontname\scriptfont\fam}%
1236  \edef\bbb{\fontname\textfont\fam}%
1237 \resetfontsize%
1238 \hbox{$\fam=\TestCount\textstyle P$}%
1239 \ifx\aaa\bbb%
1240 \hbox{\tmpf@ntsize\bf%
1241 $\fam=\TestCount\kern-.045em O\kern-.015em ST$}%
1242 \else%
1243 \hbox{$\fam\TestCount%
1244 \scriptstyle\kern-.045em O\kern-.015em ST$}%
1245 \fi}
1246 \def\Script{\ifnum \fam=\m@ne \fam=\z@ \fi%
1247  \TestCount=\fam\leavevmode%
1248  \edef\aaa{\fontname\scriptfont\fam}%
1249  \edef\bbb{\fontname\textfont\fam}%
1250 \resetfontsize%
1251 \hbox{$\fam=\TestCount\textstyle S$}%
1252 \ifx\aaa\bbb%
1253 \hbox{\tmpf@ntsize\bf$\fam=\TestCount\kern-.035em %
1254  C\kern-.015em R\kern-.015em IP\kern-.035em T$}%
1255 \else%
1256 \hbox{$\fam\TestCount\scriptstyle\kern-.035em %
1257 C\kern-.015em R\kern-.015em IP\kern-.035em T$}%
1258 \fi}

1259 \fi

1260 %\def\PostScript{\Post\Script}
1261 % %%%%%1996/04/20 by Shinsaku Fujita%%%%%%%%%%%%%%%%%%%%%%%%%%%
1262 \ifnewl@tex
1263 \DeclareRobustCommand{\PostScript}{P\hbox{$\m@th$%
1264  \csname S@\f@size\endcsname\fontsize\sf@size\z@
1265  \math@fontsfalse\selectfont
1266  \kern-.045em O\kern-.015em ST}S\hbox{$\m@th$%
1267  \csname S@\f@size\endcsname\fontsize\sf@size\z@
1268  \math@fontsfalse\selectfont
1269  \kern-.035em C\kern-.015em R\kern-.015em IP\kern-.035em T}}
1270 \else
1271 \def\PostScript{\Post\Script}

1272 \fi

19 Double and triple bonds

\triplebond \doublebond \tbond \dbond
1273 % *****************

1274 % * 二重三重結合 *

1275 % *****************
1276 \def\triplebond{\leavevmode\kern.2pt\raisebox{.2ex}{%
1277 \hbox{\vbox{\hrule height.03ex width1em\kern.4ex

1278 \hrule height.03ex width1em\kern.4ex
1279 \hrule height.03ex width1em}}}\hskip.4pt}
1280 \def\doublebond{\leavevmode\kern.2pt\raisebox{.3ex}{%
1281 \hbox{\vbox{\hrule height.03ex width1em\kern.6ex
1282 \hrule height.03ex width1em}}}\hskip.4pt}
1283 \let\tbond=\triplebond
1284 \let\dbond=\doublebond

1285 ⟨/chemist⟩