diff options
Diffstat (limited to 'info/digests/texline/no12/chemist.tex')
-rw-r--r-- | info/digests/texline/no12/chemist.tex | 276 |
1 files changed, 276 insertions, 0 deletions
diff --git a/info/digests/texline/no12/chemist.tex b/info/digests/texline/no12/chemist.tex new file mode 100644 index 0000000000..f8bd5aa555 --- /dev/null +++ b/info/digests/texline/no12/chemist.tex @@ -0,0 +1,276 @@ +{\overfullrule0pt\def\cite#1{[#1]} +% Warning: This is an input file for AMSTeX, rather than for LaTeX. +% This is just so that I can use the commands for arrows +% mentioned on pages 140-141 of "The Joy of TeX". +% It may not be "good AmSTeX", since it's the first time +% I've used AmSTeX seriously! +\title{Could \LaTeXbf\ do more for chemists?} +From time to time I have seen queries in {\TeXhax} and +elsewhere from people who wish to use \LaTeX\ for documents +that involve chemical formulae, etc. Since there are now plans for +\LaTeX\ 3.0 \cite{1}, +I thought this might be a good time to consider +what facilities one could reasonably ask the people implementing the new +\LaTeX\ to provide for chemists. + +I'm not a chemist myself, but have been involved in helping chemists +use \LaTeX\ 2.09 \cite{2} for producing theses, etc. + +\section{Typesetting and artwork} + It may help to consider the division of labour within a traditional +publishing house. A `copy-editor' \cite{3, p236} might divide the work on +chemical formulae up between `the printer' and `the draughtsman'. Thus, +some formulae can be typeset, but others are treated as `artwork' and are +drawn. + +Although there have been valiant attempts \cite{4-5} to define \TeX\ macros +for drawing chemical structure diagrams, I think it is inevitable that, +whatever \TeX\ macros are defined, there will be chemists who come along with +requirements that are beyond the abilities of the macro packages. Therefore, +it seems sensible to retain the traditional division between typesetting and +artwork: to typeset those formulae that can be typeset easily and to get the +other formulae drawn in some way. + +In \TeX\ terms, artwork can be treated as `graphics' to be +`pasted' into a typeset document via |\special|. +For example, {\sans Chemdraw} +\cite{6} can produce `encapsulated {\PS}', +so a \LaTeX-ed document with {\sans Chemdraw} diagrams can be printed on +a {\PS} printer. + +\section{Desirable facilities for chemists} +\LaTeX\ is never going to be a system for producing `artwork', +so it seems to me that it would be unwise to attempt to provide +comprehensive facilities for `chemical artwork' in \LaTeX. However, it does +seem worth providing a limited number of facilities to make it +easier to produce the chemical formulae that should be +treated as `typesetting'. + +\subsection{Environments} +Chemists' problems start when they use \LaTeX's `mathematics' +environments for `chemistry'. Chemistry is not mathematics, and +the conventions for typesetting chemistry are different from those for +typesetting mathematics. In terms of the \LaTeX\ philosophy \cite{2, p6}, +`mathematics' and `chemistry' represent `logically distinct structural +elements'. + +It would seem natural to: +\bi define environments for chemists that are + analogous to the environments that are available for mathematicians +\bi within these `chemistry' environments, aim to keep to + whatever typesetting conventions are usual in chemistry. + +\noindent +How about defining {\tt chem}, {\tt displaychem} and {\tt chem\-equation} + environments, +by analogy with {\tt math}, {\tt displaymath} and {\tt equation}? + +If such environments were defined, the style-file writer would then +have control over `mathematics' and `chemistry' separately. +In particular: +\bi The default would be {|\rm|} for chemistry (although + a designer could change the default in a {\tt .sty} file). + Individual + authors would no longer have to search through + ``double bend'' sections of the \TB\ themselves + \cite{7, pp163 \& 179}. +\bi A designer could implement a house-style in which + mathematical and chemical equations are numbered in separate + sequences \cite{3, p224} or a house-style in which there is only one + sequence of numbers \cite{8, p32}. +\bi It might be possible to arrange that subscripts will normally be + at the same level \cite{7, p179} inside the environments + for chemistry. + + +\subsection{Commands} +At first sight, the \LaTeX\ manual \cite{2, ch.\ 3} gives the impression that +\LaTeX\ 2.09 provides the `building blocks' to give all the arrows, +harpoons and annotation that a chemist could want. However, it is often +difficult to get these building blocks arranged in the ways required. +For example: + +\bi How does one obtain CH${_3}$(C=O)OCl \cite{3, p235} in `math mode'? + We can't + use `=' + to mean ``double bond'', since \TeX\ puts space + around it. +\bi To represent a reversible reaction with rate constants above\slash below + a pair of harpoons, I ended up with +\begintt +\renewcommand{\arraystretch}{0.5} +A \begin\{array}{c} + \scriptstyle k_1\\[1mm] + \rightleftharpoons\\ + \scriptstyle k\_2 + \end{array} B +\endtt + before it looked right. Surely individual \LaTeX\ users shouldn't have + to re-do the `tuning' needed to get these things right? +\bi As in the above example, arrows and harpoons are often labelled to show +reaction conditions. It is not clear how to get +arrows\slash harpoons that expand to the width of the labels. + +\noindent Many of these difficulties are another consequence of trying to +use, for chemistry, the structural elements that were designed for +mathematics. + +So what commands might usefully be made available inside some future +`chemistry' environments? + +It seems desirable \cite{3, p237} to have documented facilities for +single and double bonds. Triple bonds might also be needed \cite{9}. +A documented facility for representing single +bonds by raised dots would also be useful \cite{10, p59}. +Might commands such as |\bond|, |\doublebond| and +|\triplebond| +be appropriate? + +It seems desirable to have specific commands for typesetting +arrows\slash harpoons with labels above\slash below (to indicate conditions or +rate constants). An indication of the combinations +of arrows\slash harpoons that have been typeset traditionally is given +in \cite{11,~p371}. Thus, as well as providing simple arrows for one-way +reactions, it might be worth aiming to provide commands for: equilibrium +reactions (beginning at left and right); reversible reactions (beginning at +left and right); reactions beginning at left\slash right and completed to +left\slash right. Might it be worth defining some commands such as + +\centerline{\vbox{\tt\halign{\char'134#\quad&\char'134#\cr +oneway\cr +equilibriumR &equilibriumL\cr +reversibleR &reversibleL\cr +rightright &rightleft\cr +leftright &leftleft\cr +}}} +\noindent that each accept two parameters: one to give a label +above the symbol, the other to give a label below the symbol? +For example, +\begintt +\begin{chem} +2H_2 + O_2 +\oneway{catalyst}{300 K; 4 bar} 2 H_2O +\end{chem} +\endtt +might be a natural way to specify +% This is the line that contains the command that made me use AMSTeX. +% I couldn't find anything else ready-made in plain TeX or LaTeX. +\newdimen\bigaw +\def\oneway>#1>#2>{% +\setbox0\hbox{$\scriptstyle#1$} +\setbox1\hbox{$\scriptstyle#2$} +\bigaw\wd0\ifdim\wd1>\bigaw\bigaw\wd1\fi +\mathrel{\mathop{\hbox +to\bigaw{\rightarrowfill}}\limits^{#1}_{#2}}} +$${\rm2H}_2 + {\rm O}_2 + \oneway >{\rm catalyst} > {\rm 300 K; 4 bar} > + {\rm 2H}_2{\rm O} +$$ + +\section{Work involved} +I'd guess that my suggestions about environments could be implemented +by slight modications of the code that implements the corresponding +environments for mathematics. + +Some new work would be required for commands such as |\oneway|, +\dots\ , |\leftleft|. The only similar facility that I've found +in an existing macro package is that for arrows in \AmSTeX\ \cite{12, p140}, +but (from a chemist's point-of-view) this doesn't provide sufficient +choice of symbols. + +It might be worth seeking advice about objectives +from people who typeset chemistry professionally. +% Perhaps the UK's Royal Society of Chemistry would be prepared to advise +% about details. I've been in e-mail correspondence with their Publications +% Manager about authors submitting mansuscripts electronically to them, +% although they seem to be going the wordprocessor + chemdraw + SGML route. + +\section{Documentation} +If the facilities that I've outlined above were provided, I would +be inclined to give them less prominence in the documentation than +the analogous facilities for mathematicians. This would help +give the impression that, whereas mathematicians can expect \LaTeX\ +to do everything they want, chemists can only expect \LaTeX\ to do a certain +proportion of what they want. +For example, in the successor to \cite{2}, the description of facilities for +chemists might be relegated to an appendix, which could start with a +paragraph explaining that the facilities are intended to support +`typesetting' but not `artwork'. + +\section{Bibliography}{\parindent0pt\frenchspacing\raggedright +\everypar{\hangafter1\hangindent20pt} +\par +[1] Frank Mittelbach and Rainer Sch\"opf, 1989, +With \LaTeX\ into the Nineties +TUGboat 10, +681--690. + + + +[2] +Leslie Lamport, 1986, +\LaTeX: A Document Preparation System, +Addison-Wesley. + + + +[3] +Judith Butcher, 1981, +Copy-editing +Cambridge University Press, + + + +[4] +Roswitha T. Haas and Kevin C. O'Kane, 1987, +Typesetting chemical structure formulae with the text formatter + \TeX\slash \LaTeX, +Computers and Chemistry 11, +251-271. + +[5] +Michael Ramek, 1990, +Chemical structure formulae and $x/y$ diagrams with \TeX\ {\it in:} + \TeX: applications, uses, methods, Malcolm Clark (editor), +Ellis Horwood. + +[6] +{\sans Chemdraw} (A program for the Macintosh), +Cambridge Scientific Computing, +Cambridge, Massachusetts. + +% +[7] +Donald E. Knuth, 1986, +The \TeX book, +Addison-Wesley. + +[8] +Janet S. Dodd, 1986, +The ACS Style Guide +American Chemical Society + +[9] +Handbook for Chemical Society Authors, 1961, +The Chemical Society + +[10] +Hart's Rules, 1983, +Oxford University Press +1983 + + +[11] +Chicago Manual of Style, 1982, +Chicago University Press +% \publaddr Chicago + +[12] +Michael Spivak, 1986, +The Joy of \TeX, +American Mathematical Society + +}} +% + +\author{David Rhead} |