I have several question regarding LaTeX and chemfig.

My first question is :

how to create a list of schemes similar to \listoftables and \listoffigures so I can add my reaction schemes to newly created \listofschemes ?

Next question is :

how to make a caption for a reaction scheme in chemfig so I can call the scheme out and it will be displayed in "list of schemes" from my first question. Here is an example of a reaction scheme:




\scriptsize\chemfig{*6((!{Rsubst})-=-(-[,0.8]I)=(-[,0.9]N(-[:150,1.3]R\rlap{$^2$})(-[:30,1.3]R\rlap{$^1$}))-=)}\+{1em,1em ,7pt} 
\arrow{->[\footnotesize\parbox{110pt}{\centering $3$ mol \%,
PdCl$_2${(}PPh{)}$_3$\\[-7pt] $2$ mol \%, CuI, Et$_3$N}][\footnotesize MW,
60$^\circ$C, 20 min\footnotesize]}

%This should be a caption
\centerline{Scheme 1.5. Microwave assisted Sonogashira coupling


My third question is :

How to line up the reaction scheme above?

I really appreciate any help!

  • A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – texenthusiast May 18 '13 at 5:22
  • Concerning your first question: it can be done with tocloft, like shown here. Also, are you sure your MWE is really "minimal"? You load a lot of packages, are all of them really neccesary for this short example? – Tom Bombadil May 18 '13 at 6:35

I'll answer under the assumption that you're the one who emailed me the other day about Missing bond type in chemical rendering packages? and to whom I suggested the following definition of the submol {Rsubst}:

  subst/.style={shorten <= 10pt,preaction={draw=white,line width=6pt}}

since a submol {Rsubst} is used in your code but never defined. If that is wrong please correct me.

Your first and second question are actually the same: captions and a list of <thingy> both are properties of floats. The real question therefore is: how to define a new float?

Since you're already using the caption package I suggest to use the newfloat package for defining a {scheme} environment analogous to the {figure} and {table} environments. The package is from the same author and will work together nicely.

  fileext   = los ,    % name of file extension
  name      = Scheme , % name of float type
  within    = chapter ,% counter within
  placement = htbp     % default placement

This also defines a \listofschemes which will (after two compilations) give the list of schemes.

A few remarks to your scheme: I don't understand what you mean with “line up” in your third question but I made some adjustments:

  • I used the fourth possibility of stacking stuff in arrow labels from my answer to your question Chemfig new line reaction scheme. This means: no need for the \parbox.
  • I deleted the \rlap{...} constructs as I don't think they're needed. The R^2 substituents can be adjusted with chemfig's | syntax for dividing atoms and the use of the arrival option of bonds, see another answer of mine.
  • I used an invisible arrow (type 0) of length 0 to center the plus with respect to the preceding molecule. There are other ways but I find this way the most convenient one in most cases.
  • I introduced the packages siunitx and chemmacros for typesetting of units and for typesetting of chemical formulae.
  • I shortened the bond length of the molecules in the scheme by setting \setatomsep{1.8em}.

The result of all of the above is this, page one:

the list of schemes

and on page two:

the scheme

Here's the whole code:


% make the arrow label nodes center aligned. This will also allow to use \\ in
% the arrow labels and will make the use of \parbox unnecessary
% \xpatchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
% the starred variant replaces all occurrences of <search>
  {node[}% search
  {node[align=center,}% replace
  {}% success
  {}% failure

% define the substituent submol:
  subst/.style={shorten <= 10pt,preaction={draw=white,line width=4pt}}

% use other useful chemistry tools, too, e.g. the handy \ch command:

% set units in a unified way:

% customize captions, define floating scheme environment:
  fileext   = los ,
  name      = Scheme ,
  within    = chapter ,
  placement = htbp



\chapter{Foo Bar}

      [\SI{3}{\molpercent}, \ch{PdCl2(PPh)3}\\ \SI{2}{\molpercent},\ch{CuI}, \ch{Et3N}]%
      [MW, \SI{60}{\degree}, \SI{20}{\minute}]}
  \caption{Microwave assisted Sonogashira coupling reaction.}

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.