2

I want to make this chemical scheme: enter image description here

I try with this code. But not very elegant. Somebody can I help me ?

   \documentclass[12pt,twoside,a4paper,openright]{report}
    \usepackage[portuguese]{babel}
    \usepackage[utf8]{inputenc}
    \usepackage{chemformula}
    \usepackage{chemfig}
    \usepackage{chemmacros}


    \begin{document}


\begin{center}
\schemestart
\chemfig{RO-Si(-[6]OR)(-[2]OR)-OR} + \ch{H2O}
\arrow(.mid east--.mid west){->[ Hidrólise]}
\chemfig{RO-Si(-[6]OR)(-[2]OR)-OH}
\schemestop

\schemestart
\chemfig{RO-Si(-[6]OR)(-[2]OR)-OR} + \ch{H2O}
\arrow(.mid east--.mid west){->[ Condensação]}
\chemfig{RO-Si(-[6]OR)(-[2]OR)-OH}
\schemestop

\end{center}
\end{document}
2
  • Maybe mychemistry package could help.
    – pablos
    Jun 25, 2014 at 14:34
  • Thank you for providing a complete example. It might help if you could provide a minimal example - the minimum code necessary to reproduce the problem you have. For instance, you load the chemformula package twice...
    – darthbith
    Jun 25, 2014 at 14:53

2 Answers 2

3

Here is one way you can do this. I have modified the interatomic separation and the length of the arrows in the scheme. If this is not what you want, please explain what you mean by "elegant" :-) NB: \quad and \; are for horizontal spacing on the lines

\documentclass[12pt,twoside,a4paper,openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[official]{eurosym}
\usepackage{chemformula}
\usepackage{chemfig}

\begin{document}

\begin{center}
\setatomsep{2em} %<-- Add this for atom spacing
\schemestart[0,1.5] %<-- Add the optional argument here to specify the angle (0) and length of the arrows
a) \quad \chemfig{RO-Si(-[6]OR)(-[2]OR)-OR} + \ch{H2O}
\arrow(.mid east--.mid west){->[ Hidrólise]}
\chemfig{RO-Si(-[6]OR)(-[2]OR)-OH} + \ch{HOR}
\schemestop

\vspace*{0.5cm} %<-- Add this for vertical spacing

\schemestart[0,1.75]
b) \quad 2 \; \chemfig{RO-Si(-[6]OR)(-[2]OR)-OH}
\arrow(.mid east--.mid west){->[ Condensação]}
\chemfig{RO-Si(-[6]OR)(-[2]OR)-O-Si(-[6]OR)(-[2]OR)-OR} + \ch{H2O}
\schemestop

\end{center}
\end{document}

chemfig

4
  • fantastic! thank you. Just one more thing. I want to put numbers or letters to identify each reaction. Is it possible ?
    – user46548
    Jun 25, 2014 at 15:56
  • If you simply want letters on each line, just type them there :-) If you want to be able to refer to them with \ref and similar, have a look at this answer: tex.stackexchange.com/a/114933/32374 to define a new floating type and you may also need to look at the documentation of the subfig package to see how to add new types of subfigures.
    – darthbith
    Jun 25, 2014 at 16:08
  • I want letters on each line, but centered
    – user46548
    Jun 25, 2014 at 16:19
  • Just put them inside the scheme. See my edit.
    – darthbith
    Jun 25, 2014 at 19:03
5

»not very elegant« is not a very precise description of what's wrong...

First of all I'd use a list for the, well, list, i.e., enumerate. The labels can easily be adjusted with enumitem.

Then I'd make the arrows longer using the last optional argument of the \arrow command:

\arrow[<angle>,<length factor>]

I'd also shorten the bond length a bit, maybe \setatomsep{2em}.

Last but not least I'd use chemfig's \+ command in the schemes for a bit more spacing around the compounds.

Then I get this (the lines just show the page dimensions so we're sure nothing sticks into the margin):

enter image description here

\documentclass[12pt]{article}
% \usepackage[portuguese]{babel}% not necessary for the example
\usepackage[utf8]{inputenc}
\usepackage{chemformula}% already loaded by chemmacros
\usepackage{chemfig}
% \usepackage{chemmacros}% not necessary for the example

\usepackage{enumitem}

\usepackage{showframe}% to visualize page dimensions

\begin{document}

\begin{enumerate}[label=(\alph*)]
  \item\setatomsep{2em}
  \schemestart
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-OR} \+ \ch{H2O}
    \arrow(.mid east--.mid west){->[ Hidrólise]}[,2]
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-OH}
  \schemestop
  \item
  \schemestart
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-OR} \+ \ch{H2O}
    \arrow(.mid east--.mid west){->[ Condensação]}[,2]
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-OH}
  \schemestop
\end{enumerate}

\end{document}

Of course the chemistry is still wrong but that was not your question, right? After correcting it the equations got a little but too long but that can be fixed by adjusting the lengths of the arrows and the bonds:

\documentclass[12pt]{article}
% \usepackage[portuguese]{babel}% not necessary for the example
\usepackage[utf8]{inputenc}
\usepackage{chemformula}% already loaded by chemmacros
\usepackage{chemfig}
% \usepackage{chemmacros}% not necessary for the example

\usepackage{enumitem}

\usepackage{showframe}% to visualize page dimensions

\begin{document}

\begin{enumerate}[label=(\alph*)]
  \item\setatomsep{1.8em}
  \schemestart
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-OR} \+ \ch{H2O}
    \arrow(.mid east--.mid west){->[ Hidrólise]}[,1.8]
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-OH} \+ \ch{HOR}
  \schemestop
  \item
  \schemestart
    2 \chemfig{RO-Si(-[6]OR)(-[2]OR)-OR}
    \arrow(.mid east--.mid west){->[ Condensação]}[,1.8]
    \chemfig{RO-Si(-[6]OR)(-[2]OR)-O-Si(-[6]OR)(-[2]OR)-OR} \+ \ch{H2O}
  \schemestop
\end{enumerate}

\end{document}

enter image description here

You must log in to answer this question.

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