[texhax] reply to 'Organic chemistry with LaTeX'

John Simmie john.simmie at nuigalway.ie
Sat Feb 7 11:52:14 CET 2004



 >Date: Fri, 06 Feb 2004 13:01:53 +0100
 >From: Renju Zacharia <zacharia at fhi-berlin.mpg.de>
 >Dear TeX users,
 >How do I make organic chemisty structures with LaTeX(in Winedt
 >environment)? For example, to represent a carbonyl group, I need to you
 >in text,  ">C=O", . I tried to use, the package ochem, but it needs perl
 >as well as the manual is unfortunately in German. Is there any other
 >package to do it?   Please let me know.
 >Much thanks in advance,
 >Zach.

Zach.: One can use the following approach for ultra-simple chemistry

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% typesets single, double or triple bond e.g. C\bond2{O} gives C=O
% origin ???
%
\def\bond#1{\relax
    \hbox \bgroup
       \kern 0.1em
       \setbox0=\hbox{X}%
       \vbox to \ht0 \bgroup
          \vss
          \ifcase#1
          \or
             \hrule width 1em depth 0pt height 0.05em
          \or
             \hrule width 1em depth 0pt height 0.05em
             \vskip 0.2em%changed jms89 from 0.1
             \hrule width 1em depth 0pt height 0.05em
          \or
             \hrule width 1em depth 0pt height 0.05em
             \vskip 0.2em%changed jms89 from 0.1
             \hrule width 1em depth 0pt height 0.05em
             \vskip 0.2em%changed jms89 from 0.1
             \hrule width 1em depth 0pt height 0.05em
          \fi
          \vss
          \egroup
       \kern 0.1em
       \egroup
    }%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
which works fine in text for 'carbon double bond O' but will not
show the dangling bonds off carbon in your example.

None of the LaTeX packages can handle the geometrical requirements
needed to draw chemical structures properly; all such attempts always
look wrong, so if you have to go beyond Si=Si or C-N then you have
to use what the professionals use.

Most of us use Isis/Draw (freely available) which allows one
to draw virtually any molecule or reaction scheme and which
can then exported as a graphic file back to LaTeX.




                Dr. John M. Simmie
Chemistry Department & Environmental Change Institute
    National University of Ireland, Galway::Ireland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20040207/6df7fa36/attachment.htm


More information about the texhax mailing list