How to number atoms using chemfig?

You can use invisible bonds:

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\definesubmol\QQ{-[,0.2,,,draw=none]\scriptstyle}
\chemfig{*6((!\QQ1)=(!\QQ5)-(-[6,0.2,,,draw=none]\scriptstyle9)*6(-=-=-=)-[,,,,draw=none]-=(!\QQ2)-)}
\end{document}

enter image description here


  • To avoid breaking the lines, create an empty bond and attach it
  • To raise or lower an argument of \chemabove or \chembelow, use the optional argument

The chemfig manual recommends \definesubmol\nobond{[,0.2,,,draw=none]} in 12.2 Add a superscript without modifying a bond and using this:

\documentclass{minimal}
\usepackage{chemfig}
\definesubmol\nobond{[,0.2,,,draw=none]}
\begin{document}
\chemfig{*6((!\nobond\chembelow[1ex]{}{1})=
  (!\nobond\chembelow[1ex]{}{5})-(!\nobond\chembelow[1ex]{}{9})
  (*6(-=-=-=-=))--=(!\nobond\chemabove[1ex]{}{2})-)}
\end{document}

numbered atoms