0

Oops, this is similar to this question: Write the charge of an ion as an apex outside the square brackets with chemfig (this question is a bit old though, and the solution is kind of complicated)

I'm trying to draw Lewis Dot electron structures, and want to draw ions. I have figured out a way to put brackets around a molecule,


\chemfig{\charge{180=\:,90=\:,270=\:}{F}-B(-[::90]\charge{90=\:,0=\:,180=\:}{F})(-[::270]\charge{270=\:,180=\:,0=\:}{F})-\charge{0=\:,90=\:,270=\:}{F}} 

\chemright]{-}

% makes a BF4- molecule

but the charge isn't at the top right of the bracket like it should be. Using a ^ before the {-} doesn't work either, it just moves it up a little.

Is there a way to do what I want?

1

1 Answer 1

3

With the help of \chemleft{[} and \chemright{]^{-}} you can achieve the desired output:

enter image description here

\documentclass{article}
\usepackage{chemfig}
\begin{document}

\chemleft{[}
  \chemfig{
    \charge{180=\:,90=\:,270=\:}{F}
    -B
    (-[::90]\charge{90=\:,0=\:,180=\:}{F})
    (-[::270]\charge{270=\:,180=\:,0=\:}{F})
    -\charge{0=\:,90=\:,270=\:}{F}
  }
\chemright{]^{-}}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .