I teach chemistry and wish to demonstrate drawing and naming of chemical structures
I use chemfig
to draw my molecules and I can do that fine. However, in for example the molecule 4-ethyl-3,3-dimethylhexane there are a number of components to the molecule which I want to uncover bit by bit to illustrate the naming/drawing of such a molecule.
We have a hexane root - draw this
add an ethyl group on carbon 4 - highlight this addition
add two methyl groups on carbon 3 - highlight these additions
Below is the code to build the molecule bit by bit as individual figures but I would like to be able to uncover on one molecule and highlight the pieces as they are added.
I had tried to use \onslide<n->
in the parts I wanted to uncover but just got goobleydegook. I would be grateful if anyone has any ideas...
Below is fine but I would prefer to add to the parent molecule bit by bit...
\documentclass[t]{beamer}
\usepackage{chemfig}
\begin{document}
\begin{frame}{}
4-ethyl-3,3-dimethylhexane
\chemfig[][scale=0.5]{CH_3%6 these numbers are the carbon positions in the chain for ease of reading
-[::30]%5
-[::-60]%4
(-[::-60]-[::60]CH_3)%ethyl
-[::60]%3
(-[::30]CH_3)
(-[::90]CH_3)%methyl
-[::-60]%2
-[::60]CH_3%1
}
\begin{itemize}
\item root is hexane; hex=6; 6 carbon alkane
\onslide<2->{
\chemfig[][scale=0.5]{CH_3%6 these numbers are the carbon positions in the chain for ease of reading
-[::30]%5
-[::-60]%4
%(-[::-60]-[::60]CH_3)%ethyl
-[::60]%3
%(-[::30]CH_3)%methyl
%(-[::90]CH_3)%methyl
-[::-60]%2
-[::60]CH_3%1
}
}
\onslide<3->{\item 4-ethyl: ethyl substituent = 2 carbon alkyl group; on carbon 4}
\onslide<4->{
\chemfig[][scale=0.5]{CH_3%6 these numbers are the carbon positions in the chain for ease of reading
-[::30]%5
-[::-60]%4
(-[::-60]-[::60]CH_3)%ethyl}
-[::60]%3
%(-[::30]CH_3)%methyl
%(-[::90]CH_3)%methyl
-[::-60]%2
-[::60]CH_3%1
}
}
\onslide<5->{\item 3,3-dimethyl: di= 2, methyl substituents = 1 carbon alkyl group; on carbons 3 and 3}
\onslide<6->{\chemfig[][scale=0.5]{CH_3%6 these numbers are the carbon positions in the chain for ease of reading
-[::30]%5
-[::-60]%4
(-[::-60]-[::60]CH_3)%ethyl
-[::60]%3
(-[::30]CH_3)%methyl
(-[::90]CH_3)%methyl
-[::-60]%2
-[::60]CH_3%1
}
}
\end{itemize}
\end{frame}
\end{document}