4

I'm new to using chemfig. I'm trying to create chemistry handouts and I want to draw the tropylium cation:

tropylium cation

However I am unable to get the charge to come out of the ring. Any help would be appreciated.

1
  • 2
    Welcome to TeX.SE! Please show what you try. Then probably will be more easy to help you by adding missing + ...
    – Zarko
    Nov 16, 2023 at 10:32

3 Answers 3

9

One way to place any symbol at any position and distance is to use \charge.

This is very useful if it is not possible to place the symbol exactly above or below (\above \below) the desired point (second ring).

It is also possible to place delocalized electrical charges in the center of the ring (third ring).

\documentclass[border=4mm]{standalone}
\usepackage{chemfig}
\begin{document}
    \chemfig{[:38.57]*7(=-=-\charge{90:5pt=+}{}-=-)}
    \qquad
    \chemfig{*6(=-=-\charge{45:3pt=+}{N}(-H)=-)}
    \qquad
    \chemfig{*6(-=-=-=)}
    \chemmove{\node[at=(cyclecenter1)](){+};    }
\end{document}

enter image description here

8

A solution with \charge

\documentclass[border=10pt]{standalone}
\usepackage{chemfig}
\begin{document}
    \setchemfig{atom sep=1.5em,bond join=true}
    \chemfig{[:90]*7(-=-\charge{90:3pt={\footnotesize $+$}}{}-=-=)}
\end{document}

enter image description here

8

I think, it would be helpful to you to study the chemfig package manual.

Apart from using the \charge command (which might be the better choice here actually), you could do the following:

\documentclass[border=10pt]{standalone}
\usepackage{chemfig}

\begin{document}

\setchemfig{atom sep=1.5em, bond join=true}
\chemfig{[:90]*7(-=-{\chemabove{}{+}}-=-=)}

\end{document}

enter image description here

2
  • Thanks! I did try to use chemabove, but in the manual i couldn't find any examples where it was within the ring, so I didn't put any {} brackets and kept getting an error.. Nov 16, 2023 at 11:30
  • 2
    @algorhythm This is why you will be typically asked to provide a minimal working example on this site, since it much easier to exactly help you with your problem. Nov 16, 2023 at 11:53

This site is temporarily in read-only mode and not accepting new answers.

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