4

To depict a chemical scheme with more than one reactant and more than one product, I used the handy package chemfig. I found some issues though annotating the below chemical reaction in a better way.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage{chemfig}
\setbondstyle{line width=0.5pt}
\setatomsep{1.6em}
\newcommand*\circleatom[1]{\tikz\node[circle,fill=gray!50]{\printatom{#1}};}
\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}}
%\schemedebug{true} % uncomment to see names of compounds    

\schemestart
\subscheme{
\chemfig{\circleatom{Mol.}-[,1.5]NH_3}
}
\+
\subscheme{
\chemfig{(-[::-150]R)(=[::90]O)(-[::-30]O-[::60]*5(N-(=O)---(=O)-))}
}
\arrow(.mid east--.mid west){->[\chemfig{ pH \rangle 7}]}
\subscheme{
\chemfig{(-[::-150]R)(=[::90]O)(-[::-30]\chembelow{N}{H}-[::60,1.5]\circleatom{Mol.})}
}
\+
\subscheme{
\chemfig{HO-[::30]*5(N-(=O)---(=O)-)}
}
\arrow(@c1.west--){0}[-50,0.5] \parbox[s]{60pt}{\textit{N}-Hydroxy-succinimide-esters}
\arrow(@c3.west--){0}[-50,0.8] \parbox[s]{60pt}{Reactant name2}
\arrow(@c4.west--){0}[-45,1] \parbox[s]{60pt}{Some text}
\arrow(@c6.west--){0}[-35,1.2] \parbox[s]{60pt}{Text}
\schemestop
\end{document}  

MWE result:

enter image description here

Issues that need to be fixed

  1. At the arrow where the pH should be more than 7, after interrogating Detexify, I couldn't find a better way to do \textgreater's equivalent in math mode. The nearest thing was to use \rangle which I don't think is an elegant choice. Anybody knows a better way?

  2. The two (N)itrogen atoms became cluttered as you can see, one nice thing, this issue was addressed in chemfig manual using the #( , ) syntax and that should always be after the bond. Unfortunately, this didn't work in this very example returning an error. Is there any other solution?

  3. Is there any way to center the alignment of the compound names, center and/or justified alignment? I used the \par syntax as it allows text breaking, but is there a better way to address this issue here with LaTeX? It would be better also to come up with a solution where names of all compounds align horizontally.

1
  • The link suggested as duplicate did indeed solve the fourth point, but not helpful for the first three issues asked here, so updated.
    – doctorate
    Oct 1, 2013 at 9:23

1 Answer 1

6

My suggestions for the three points:

  1. just use math mode instead of a \chemfig command.
  2. write the N before you start the ring: N*5(-----)
  3. I would pass a suitable TikZ style to the node containing the text. This can be achieved with the \arrow command: \arrow(<start node>[<options>]--<end node>[<options>]).

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage{chemfig}
\setbondstyle{line width=0.5pt}
\setatomsep{1.6em}
\newcommand*\circleatom[1]{\tikz\node[circle,fill=gray!50]{\printatom{#1}};}
\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}}
% \schemedebug{true} % uncomment to see names of compounds    

\newcommand*\pH{\ensuremath{\text{pH}}}
\tikzset{
  mytext/.style={text width=60pt,align=center}
}

\begin{document}

\schemestart
  \chemfig{\circleatom{Mol.}-[,1.5]NH_3}
  \arrow{0}[,0]\+\arrow{0}[,0]
  \chemfig{R-[::30](=[::60]O)-[::-60]O-[::60]N*5(-(=O)---(=O)-)}
  \arrow{->[$\pH > 7$]}[,1.5]
  \chemfig{(-[::-150]R)(=[::90]O)(-[::-30]\chembelow{N}{H}-[::60,1.5]\circleatom{Mol.})}
  \arrow{0}[,0]\+\arrow{0}[,0]
  \chemfig{HO-[::30]N*5(-(=O)---(=O)-)}
  \arrow(@c1--[mytext]){0}[-90,.6]
  \textit{N}-Hydroxy-succinimide-esters
  \arrow(@c3--[mytext]){0}[-90,.25]
  Reactant name2
  \arrow(@c4--[mytext]){0}[-90,.5]
  Some text
  \arrow(@c6--[mytext]){0}[-90,.25]
  Text
\schemestop
\end{document}
0

You must log in to answer this question.

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