I have a problem aligning atoms in chemfig
when one of the atoms has a descender. The solution proposed in the manual is not really good, because it changes the position of bonds. Consider the test case:
\documentclass{article}
\usepackage{tikz}
\usepackage{chemfig}
\begin{document}
\fbox{\chemfig{A-X-M} \chemfig{A-X-Mg}}
\fbox{\chemfig{A-X-M} \chemfig{{A\strut}-{X\strut}-Mg}}
\end{document}
which gives:
In the top row, the second formula has Mg
too high. When adding the \strut
(or \vphantom
) to the other atoms, the bond lines are then too low, which is especially bad if you are displaying different formulas side by side, as in the example.
Is there any way I can move the Mg
label down or make the descender invisible to \chemfig
?
chemfig
manual.\chemfig{A-X-\smash{\printatom{Mg}}}
?Mg
, but I don't mind doing that in my current document.\smash[b]{\printatom{Mg}}
(requiresamsmath
).