# rlap and llap in chemfig

In this chemfig document page 44 http://tug.ctan.org/macros/generic/chemfig/chemfig-en.pdf it says that I can move charges by \rlap (for right) and \llap (for left).

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{O\rlap{${}^+$}-[2]B}

\chemfig{O\llap{${}^+$}-[2]B}
\end{document}


As you can see it works with the \rlap, but not with the \llap. Am I missing something? Thanks.

The documentation is a bit unclear, but the \llap would come before the atom, not after it:

\chemfig{\llap{${}^+$}O-[2]B} % DOESN'T QUITE WORK


but trying this, the positioning is messed up a bit, likely because of how Chemfig is parsing the arguments to the \chemfig command. Wrapping both the \llap and the atom in braces fixes it:

\chemfig{{\llap{${}^+$}O}-[2]B} % THIS ONE GIVE THE DESIRED RESULT


(be sure to count the braces carefully to see how everything is distributed).

Edited to add a brief note about \llap and \rlap: These two macros take their contents and overlap them to the left and the right respectively from the place that they're inserted. If you look closely at the original output, you'll see that the ⁺ is printed overlapping the O which, once you think about what \llap means is exactly what you would expect it to do.