I'm trying to convert some of my lecture slides to LaTeX. What's the best way to convert a number of slides (similar to the one below) into nice notes? I am aware of mhchem and chemstyle, but I don't think either does what I want.

I also have ChemDraw, but creating each of these seems like an extremely slow process unless I'm just missing some features. Is ChemFig a good alternative?

Oxymercuration/demurcuration slide

  • Joseph Wright's chemstyle documentation, section 8, has some thoughts on this. He ends up on ChemDraw, but your situation and needs may differ. Commented Mar 6, 2012 at 16:51

3 Answers 3


Yes chemfig is a great tool. But as well as almost every code to picture system the syntax is not trival. Please consider the following example. You can easily see, that chemfig syntax follows a logical and human readable syntax, but will become extremely complex for larger structures. And so far as i can see chemfig is the easiest system for chemical structures build (somehow) on TeX. I remember my early days when xymtex made me cry several times.

\chemrel[\chemfig{NaBH_4}][]{->}\chemname{\chemfig{C(-[2]CH_3)(-[4]H_3C)(-[6]OH)-C(-[2]H)(-[6]CH_3)-H}}{MORE substituted alcohol} \hspace*{.5\textwidth}$\underbrace{\hspace{.4\textwidth}}_{\text{demercuration}}$

the result

Please forgive me that i improvised the brackets. I think there must be a better way to do that.

As it had been said, ChemDraw is the standard all over the chemical world. For me who has to draw a few structures per document chemfig fits perfect. So it won´t fit for me if i had to draw very much of this structures (if i were a real chemist)


ChemFig is a great package but I don't believe that you'll gain much in time if you create your schemes with it rather than with ChemDraw.

Once you know you're way around ChemFig you're just as fast or slow with it than with ChemDraw (supposing you know your way around that, too), at least that's my experience.

There are other points you should consider:

  • In order to produce really nice schemes with ChemFig one has to master several steps, though:
    • the syntax for the creation of the formulae; this is both very intuitive and easy to learn and difficult to read for larger compounds
    • the scheme creating part; that's basically the knowledge of the \arrow command which has a rather complex syntax but thus is a very flexible command
    • it helps a lot if one has basic skills in TikZ
  • ChemFig is great as long as your formulae stay 2-dimensional and organic. Trying to set something like Ferrocene is possible but tedious, let alone larger 3-dimensional substances like Fe6(CO)12.

If you have many descriptions to your schemes one property of ChemFig could come in handy, though: in its schemes each compound is a TikZ node with a name that you can refer to, which easily allows you to add arrows between a compound in the scheme and some descriptive text, for instance:

\usepackage{chemstyle} % provides the `scheme` environment
\usepackage{chemmacros} % for the small formulae

    inner sep=0,
    remember picture]{\node (#1) at (0,0) {#2};}}

\schemedebug{false}% set this to `true' to get information about node names ...
 \ch{H2O} \arrow{<<->} \ch{H+} \+ \subscheme{\ch{OH-}}
% the \subscheme creates an extra node
Look, I refer to the \referto{hydroxide}!
  \draw[red,thick,->,shorten >= 3pt]
    (ref.90) .. controls +(0,1) and +(0,-1) .. (c3.-90);


enter image description here

At last I'd like to give an example of how you could use ChemFig and its scheming commands to set the scheme of your example. These commands (\schemestart, \schemestop, \arrow) are more powerful than the \chemrel command with respect of relative positioning of compounds, the length of the arrows etc.

I also use \chemup. and \chemdown\} for the braces. (There is \chemleft and \chemright, too.) These commands serve the same purpose as \left and \right do for maths.


\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}} % the style of the atom groups
\setcompoundsep{7em} % (not quite) the length of the arrows
\setatomsep{2em} % (not quite) the bond length

 % that was the first reaction step, we now can refer to the
 % second compound named `snd`
 \arrow(--[blue]){0}[-90,0] % invisible arrow of length 0 to the text below
 % skip back to the second compound and add next reaction step:
 \arrow(--[blue]){0}[-90,.1] MORE substituted alcohol
 % empty compounds to get the right spacing for the second brace:
 \subscheme{\arrow(@[email protected]){0}\arrow{0}[-90,1.5]}
 \large Markovnikov addition

  \arrow{->[1) \ch{H2O}, \ch{Hg(OAc)2}][2) \ch{NaBH4}]}[,2]


enter image description here


I haven't had to typeset a lot of chemicals, but perhaps the following may be useful. I have used TikZ to typeset the first formula in the slide to give you a feel for how it works.



% First chemical.
\node (CarbonL) {C};
\node[right of=CarbonL] (CarbonR) {C};
\node[above left of=CarbonL] (TopL) {CH$_3$};
\node[below left of=CarbonL] (BotL) {CH$_3$};
\node[above right of=CarbonR] (TopR) {H};
\node[below right of=CarbonR] (BotR) {CH$_3$};
\draw[double] (CarbonL) -- (CarbonR);
\draw (CarbonL) -- (TopL);
\draw (CarbonL) -- (BotL);
\draw (CarbonR) -- (TopR);
\draw (CarbonR) -- (BotR);


enter image description here

I used relative positioning in this example, but absolute positioning, positioning in matrices and positioning on chains are also possible. This is an easy approach for simple formulae like those in your example, but for anything more elaborate I wouldn't recommend it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .