1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
% \input{init.tex}
% \input{fparts.tex}
% \input{cto.tex}
% \input{bonds.tex}
\textfont1=\tenrm
\initial
\len=4
\subsection{General Utility Macros}
\subsubsection{Macro {\tt\char"5C{}fuseiv}[9]}
This macro typesets a fragment that is designed to be
connected at two places to another ring system with the
effect of fusing an additional sixring to that system.
The fragment can be fused to positions 1 and~2 of the
carbon fivering and the carbon sixring, and to positions
2 and~3 of the \verb+\hetifive+ and \verb+\hetisix+ rings
without changing
the unitlength and the \verb+\yi+ coordinate.
\yi=200 \pht=750
\[ \fuseiv{$R^1$}{$R^2$}{$R^3$}{$R^4$}{D}{$R^6$}{Q}{Q}{D} \]
\reinit
\begin{description}
\item[{\rm Arguments 1--4:}] \rhq All other argument
values are used as the substituent formulas ${\rm R^1}$--${\rm R^4}$.
\item[{\rm Argument 5:}] An argument of ``D''
prints a second bond between the upper point of
attachment and position 1 (this double bond is shown
in the diagram). \rii
\item[{\rm Argument 6:}] \rhq An argument of ``D'' prints
a second bond between positions 1 and 2. All other argument
values are used as the substituent formula ${\rm R^6}$.
\item[{\rm Argument 7:}] An argument of ``D''
prints a second bond between positions 2 and 3. All other
argument values cause no action.
\item[{\rm Argument 8:}] \rhq An argument of ``D'' prints
a second bond between positions 3 and 4. All other
argument values are used as a second substituent in
position 3 (not shown in the diagram).
\item[{\rm Argument 9:}] An argument of ``D'' prints
a second bond from the lower point of attachment to
position 4 (this double bond is shown in the diagram).
All other argument values cause no action.
\end{description}
\subsubsection{Macro {\tt\char"5C{}fuseup}[9]}
This macro typesets a fragment that is designed to be
connected at two places to another ring system with the
effect of fusing an additional sixring to that system
at an angle. The fragment can be fused to positions
1 and~6 of the carbon sixring and positions 3 and~4 of
the \verb+\hetisix+ rings without changing the unitlength
and the \verb+\yi+ coordinate.
\advance \yi by -500
\[ \fuseup{$R^1$}{$R^2$}{$R^3$}{$R^4$}{D}{Q}{D}{Q}{D} \]
\yi=300
\begin{description}
\item[{\rm Arguments 1--4:}] \rhq All other
argument values are used as the respective substituent
formulas ${\rm R^1}$--${\rm R^4}$.
\item[{\rm Argument 5:}] An argument of ``D'' prints
a second bond from the upper point of attachment to
position 1 (the resulting double bond is shown in the
diagram). \rii
\item[{\rm Argument 6:}] An argument of ``D'' prints
a second bond between positions 1 and 2. \rii
\item[{\rm Argument 7:}] An argument of ``D'' prints
a second bond between positions 2 and 3 (the resulting
double bond is shown in the diagram). \rii
\item[{\rm Argument 8:}] An argument of ``D'' prints
a second bond between positions 3 and 4. \rii
\item[{\rm Argument 9:}] An argument of ``D'' prints
a second bond between position 4 and the lower point
of attachment (the resulting double bond is shown in
the diagram). \rii
\end{description}
\subsubsection{Macro {\tt\char"5C{}fuseiii}[6]}
This macro typesets a fragment that is designed to be
connected at two places to another ring system with the
effect of fusing an additional fivering to that system.
The fragment can be fused to positions 1 and 2 of the
carbon fivering and sixring, and to positions 2 and 3 of
the \verb+\hetifive+ and \verb+\hetisix+ rings
without changing the unitlength and the \verb+\yi+
coordinate.
\pht=600
\[ \fuseiii{$R^1$}{$R^2$}{$R^3$}{$R^4$}{Q}{D} \]
\begin{description}
\item[{\rm Arguments 1--4:}] \rhq All other
arguments are used as the respective substituent
formulas ${\rm R^1}$--${\rm R^4}$.
\item[{\rm Argument 5:}] \rhq All other argument
values are used as a second substituent in position~2
(not shown in the diagram).
\item[{\rm Argument 6:}] An argument of ``D''
prints a second bond between positions 1 and 2. \rii
\end{description}
\subsubsection{Macro {\tt\char"5C{}cto}[3]}
This macro draws a reaction arrow and puts the requested
character strings representing reagents and reaction
conditions on top and below the arrow, respectively.
The arrow is made long enough to accommodate the longer
of the strings. The vertical position of the arrow can be
changed by changing the \verb+\yi+ value.
\pw=1500
\[ \cto{string\ on\ top\ of\ the\ arrow}{string\ below}{26} \]
\begin{description}
\item[{\rm Arguments 1 and 2:}] The character
strings above and below the arrow, respectively.
\item[{\rm Argument 3:}] An integer, the number of
characters---including subscripts---in the longer string.
\end{description}
\subsubsection{Macro {\tt\char"5C{}sbond}[1]}
This macro draws a horizontal single bond of a specified
length, vertically centered on a line. It should be used
for structural formulas that do not use the picture
environment and are written on one line.
\[ \sbond{20} \]
The argument is an integer, expressing the length of the
bond in printer points (1pt~=~.35mm).
\subsubsection{Macro {\tt\char"5C{}dbond}[2]}
This macro draws a horizontal double bond of a
specified length. It should be used for structural
formulas that do not use the picture environment and
are written on one line.
\[ \dbond{20}{10} \]
\begin{description}
\item[{\rm Argument 1:}] An integer, expressing
the length of the bond in printer points.
\item[{\rm Argument 2:}] An integer, expressing
the amount of vertical space by which the bonds have
to be pushed together to give the desired vertical
distance. In a document with double spacing, the
value~19 produces appropriate spacing. The value~10 works for
single spacing.
\end{description}
\subsubsection{Macro {\tt\char"5C{}tbond}[2]}
This macro is similar to \verb+\dbond+, except that it
draws a triple bond:
\[ \tbond{20}{11} \]
The meaning of the arguments is the same as in
\verb+\dbond+. The value 20~can be used as argument~2 for double
spacing; 11~works for single spacing.
\section{Common requirements for the use of the system}
So far in this thesis it has been explained how to write
\LaTeX\ code to produce a chemical structure diagram at a
particular place in a document. This section will discuss the
mandatory and the optional statements at the beginning of an
input file that make the system of macros accessible and
its use more practical and convenient. Figure~\ref{fg:preamble}
contains
these statements together with the two required declarations
at the beginning of a \LaTeX\ file, lines (1) and~(7).
(The line numbers are for reference only, they are not used
in the input file.)
The part of the input file preceding the \verb+\begin{document}+
statement is called the ``preamble'' in the \LaTeX\ Manual.
In addition to the statements shown here, the preamble usually
contains declarations pertaining to text formatting details
such as margin width, text height on a page, and space between
lines.
The document style option \verb+chemtex+ on line~(1) of
Figure~\ref{fg:preamble} is necessary if the
structure-drawing macros of this thesis are to be used for
the preparation of a document. This statement reads the file
\verb+chemtex.sty+ into \TeX's memory, a file that contains the
macros, \verb+\initial+ and \verb+\reinit+ as well as those
described above. Macro \verb+\initial+
defines the command sequences \verb+\xi+, \verb+\yi+, \verb+\pw+,
\verb+\pht+, \verb+\xbox+, and \verb+\len+ as integer variables
and assigns a count register to each of them. The use of the
first four variables in the picture declaration and the use
of \verb+\xbox+ in a minipage or parbox environment was
explained in chapter II. The counter \verb+\len+ is a general
purpose integer variable for the user. All the variables
except \verb+\len+ are also given initial values.
Furthermore, the unitlength for the picture environments is
set to 0.1 printer points in \verb+\initial+. This is the
recommended unitlength for the chemical structure diagrams,
but it can be changed anywhere in the document.
Line~(9) from Figure~\ref{fg:preamble}
calls \verb+\initial+.
The macro \verb+\reinit+ simply resets all the parameters
to their initial values from \verb+\initial+. It is a
convenience, especially for cases where more than one
variable needs to be reset.
\begin{figure}\centering
\begin{minipage}{10cm}
\begin{verbatim}
(1) \documentstyle[chemtex,...]{report}
(2) \setcounter{totalnumber}{4}
(3) \setcounter{topnumber}{2}
(4) \setcounter{bottomnumber}{2}
(5) \renewcommand{\topfraction}{.5}
(6) \renewcommand{\bottomfraction}{.5}
(7) \begin{document}
(8) \textfont1=\tenrm
(9) \initial
\end{verbatim}
\end{minipage}
\caption{Statements at the beginning of a \LaTeX\ file}
\label{fg:preamble}
\end{figure}
Note that
other document style options (represented by the \verb+...+) can
also be indicated on the \verb+\documentstyle+ command. See the
\LaTeX\ manual for details.
Lines (2)--(6) in Figure~\ref{fg:preamble} affect the placement of
``floats'' on the page. The only floats discussed in this
thesis are the diagrams produced in the figure
environment (see Chapter~\ref{ch:frags}). In defining the style
of a document--the report style is designated by
line~(1)---the \LaTeX\ program sets default values for the maximum
total number of floats on a page (three), the maximum
number of floats at the top of the page (two), and at
the bottom of the page (one). These values can be
changed for documents with an unusually large number
of figures. Thus, lines (2)--(4) increase the
maximum number of floats to~4, evenly distributed on
the page. It is then necessary to change the counters
\verb+\topfraction+ and \verb+\+bottomfraction+ to
reflect the distribution of figures on the page.
Finally, line~(9) is the optional redefinition of the
math textfont, discussed in Chapter~\ref{ch:txltx}. This definition
can be changed anywhere in the document.
|