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
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\newcommand{\pol}[1]{\rlap{${}^{^{\color{red} \delta #1}}$}}
\newcommand{\ind}[0]{\text{ }}}
% ========================= end preamble ============================

  • 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

I actually figured this issue out by digging through the 83 pages of the chemfig manual. Here's the code I've changed and the following result:



|improve this answer|||||
  • 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:

\chemmove{\node[] at (0pt,55pt) {\footnotesize $2-$};}

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.