# Chemfig: scheme vertical align

How can I vertical align this scheme to the same bottom line?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[
a4paper,
margin=15mm,
bindingoffset=2mm,
heightrounded,
]{geometry}
\usepackage{chemfig}
\usepackage{chemformula}
\usepackage{xcolor}
\usepackage[version=4]{mhchem}
\newcommand{\br}{\\ \vspace{5pt}}

\begin{document}
\begin{flushleft}
\begin{figure}[htbp]
\schemestart
\chemfig{R-C(-[2]O^{\oplus}(-[2]R')(-[4]H))(-[6]H)-C(-[2]H)(-[6]H)(-[0]H)}
\arrow(.-1--){->[{-}\chemfig{H^+}]}[,1.5]
\chemname{\chemfig{R-C(-[2]{\color{red}O}|{\color{red}R'})(-[6]H)-C(-[2]H)(-[6]H)(-[0]H)}}{Etere}
\schemestop
\chemnameinit{}
\end{figure}

\end{flushleft}
\end{document}


• Maybe related: tex.stackexchange.com/a/330375/124842 – Bobyandbob Jun 22 '17 at 18:51
• Putting a figure inside a flushleft environment is just wrong. \begin{figure} \raggedright ... \end{figure} would be the right thing instead… – cgnieder Jun 23 '17 at 6:32
• I'm also wondering why you're loading both chemformula and mhchem? Using both \ch{...} and \ce{...} will only produce visually inconsistent results… – cgnieder Jun 23 '17 at 6:33

As indicated by @Bobyandbob, this is a duplicate of tex.stackexchange.com/a/330375/124842.

The baseline of each molecule is the first atom, in this case R. The arrow needs to be anchored to that baseline to get a suitable vertical alignment. This is done using \arrow{base east --.base west). Since the arrow then sits directly on the baseline, it is more pleasing to apply a small vertical shift [3pt] to move the arrow slightly upwards, without affecting the baseline alignment of the molecules.

This is the result:

This is the MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemmacros}
\usepackage[italian]{babel}
\usepackage[
a4paper,
margin=15mm,
bindingoffset=2mm,
heightrounded,
]{geometry}
\usepackage{chemfig}
\usepackage{chemformula}
\usepackage{xcolor}
\usepackage[version=4]{mhchem}
\newcommand{\br}{\\ \vspace{5pt}}

\begin{document}

\schemestart
\chemfig{R-C(-[2]O^{\oplus}(-[2]R')(-[4]H))(-[6]H)-C(-[2]H)(-[6]H)(-[0]H)}
\arrow(.base east--.base west){->[$-\chemfig{H^+}$][][3pt]}
\chemname{\chemfig{R-C(-[2]{\color{red}O}|{\color{red}R'})(-[6]H)-C(-[2]H)(-[6]H)(-[0]H)}}{Etere}
\schemestop
\chemnameinit{}

\end{document}

• Would you mind removing the flushleft environment? Putting a figure inside is just wrong. \begin{figure} \raggedright ... \end{figure} would be the right thing instead – cgnieder Jun 23 '17 at 6:31
• Instead of ->[{-}\chemfig{H^+}] it should probably be ->[$-\chemfig{H^+}$] – cgnieder Jun 23 '17 at 6:36