# Draw molecule charge in latex using chemfig?

I've got a lewis dot structure diagram as seen in the following image:

However, I would like to have brackets on the outside to indicate the positive charge, since this is supposed to represent H3O 1+. Any suggestions would be appreciated.

Here's my current code:

% Preamble
{\color[rgb]{0.500000,0.500000,0.500000}\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{chemfig}
\newcommand{\pol}[1]{\rlap{${}^{^{\color{red} \delta #1}}$}}
\newcommand{\ind}[0]{\text{ }}}
% ========================= end preamble ============================

\chemfig{\lewis{,H}\pol{+}-\lewis{2:,O}\pol{-}(-[6]\lewis{,H}\pol{+})-\lewis{,H}\pol{+}}

• Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Feb 24 '14 at 21:29

\chemleft[\chemfig{\lewis{,H}\pol{+}-\lewis{2:,O}\pol{-}(-[6]\lewis{,H}\pol{+})-\lewis{,H}\pol{+}}\ind\ind\chemright]^{+}

• This throws errors when I try to compile. It does render the molecule with charge, but the code is still broken after that: Missing $inserted. ...+})-\lewis{,H}\pol{+}}\ind\ind\chemright]^ – aiag Jan 28 '17 at 19:08 When I had to draw the ionic charge, I rigged this quick hack: \begin{center} \chemleft[\chemfig{O=[:30]S(-[::60]O)-[::-60]O}\chemright] \chemmove{\node[] at (0pt,55pt) {\footnotesize$2-\$};}