Consider the following MWE:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{
X
-[:30,,,2]^{18}\chemabove{O}{H}
-[:-30]X
}
\end{document}
This code returns an error:
Package chemfig Error: no atom found at position 2, pershaps you mispelled the optional argument of the bond.. }
Elimination of the number 2 as an argument for the arrival oxygen atom resolves that issue, but the left X-O bond is placed incorrectly:
\chemfig{
X
-[:30]^{18}\chemabove{O}{H}
-[:-30]X
}
I've been playing around a bit and the best hack I've came up so far is to use a shortened invisible O-H bond:
\chemfig{
X
-[:30,,,2]^{18}O(-[:90,0.3,2,,draw=none]H)
-[:-30]X
}
Still, I find the latter solution less robust and elegant. Is there a way to still use \chemabove
or \chembelow
in tandem with departure/arriving atom numbering arguments?