Im using the package chemformula, but I can't find a way to write something like this:
4 Answers
With use of chemfig
and mhchem
packages, chem formulas arein \llap
(left) and rlap
(right) commands:
\documentclass{article}
\usepackage{chemfig}
\usepackage[version=4]{mhchem}
\begin{document}
\begin{center} % or figure[ht]\centering
\schemestart
\llap{\ce{C2H5OH}}\arrow{->[\color{teal}\ce{ZnO}][]}[30] \rlap{\ce{C2H4 + H2O}}
\arrow(@c1--C){->[][\color{teal}\ce{Cu}]}[-30] \rlap{\ce{C2H4O + H2}}
\schemestop
\end{center}
\end{document}
-
2
-
-
with chemfig and chemformula
\documentclass[border=3pt]{standalone}
\usepackage{chemfig}
\usepackage{chemformula}
\begin{document}
\schemestart
\ch{C2H5OH}
\arrow(eth.mid east--.mid west){->[ \color{green!80!black}\scriptsize\ch{ZnO} ]}[10]
\ch{C2H4 + H2O}
\arrow(@eth.mid east--.mid west){->[][ \color{green!80!black}\scriptsize\ch{Cu} ]}[-10]
\ch{C2H4O + H2}
\schemestop
\end{document}
Package chemformula doesn't seem to be concerned with spatial chemistry. No such example is presented. On the other hand, chemfig does present many spatial chemistry compounds.
Chemformula
presents in section 7.2 some examples using more than on line and in section 12 some example inside the math environment align
. I reproduced both below.
A possible workaround if you don't want to swap packages (or can't) is using TikZ wherever needed.
\documentclass{article}
\usepackage{chemformula}
\usepackage{tikz}
\begin{document}
% 7.2. Option Input
\ch{H2O +}\textcolor{red}{\ch{H2SO4}}\ch{-> H3O+ + HSO4-} \par
2 \ch{H2O +}\ch[subscript-vshift=2pt]{H2SO4}\ch{-> H3O+ + HSO4-}
% 12. Usage In Math Equations
\begin{align}
\ch{
H2O & ->[a] H2SO4 \\
Cl2 & ->[x][y] CH4
}
\end{align}
% Possible workaround with TikZ
\begin{tikzpicture}
\draw[->] (0,0) coordinate(A) node[left]{\ch{H2O +}\textcolor{red}{\ch{H2SO4}}} --
++(1,1) node[right]{\ch{H3O+ + HSO4-}};
\draw[->] (A) --
++(1,-1) node[right]{\ch{H3O+ + HSO4-}};;
\end{tikzpicture}
\end{document}
-
1
A slightly more colorful solution
\documentclass[margin={2mm 4mm}]{standalone}
\usepackage{chemfig}
\usepackage{tikz}
\begin{document}
\schemestart
%
\chemfig{C_2H_5O@{z}H}
%
\arrow(@{z}--){0}[60,.1]\chemfig{-[:60,1,,,red,thick]@{y}}
\arrow(@{y}--){->[\chemfig{\textcolor{blue}{ZnO}}]}[0,1.5,,,red,thick,shorten <=-10pt]
%
\chemfig{C_2H_4} \+ \chemfig{H_2O}
%-------------------------------------------------------------------------------------------
\arrow(@{z}--){0}[300,.1]\chemfig{-[:300,1,,,blue,thick]@{x}}
\arrow(@{x}--){->[\chemfig{\textcolor{red}{Cu}}]}[0,1.5,,blue,thick,shorten <=-10pt]
%
\chemfig{C_2H_4O} \+ \chemfig{H_2}
%
\schemestop
\end{document}
chemfig
can do it