Using Beamer and Donald Arseneau's dchem.sty package (my favorite package for typesetting chemistry), the fonts in dchem's chemistry environments are Beamer's default CM sans font, not the font specified in the preamble (like txfonts). For example, in:
Code: Select all
\documentclass{beamer}
\usepackage{txfonts}
\usepackage{dchem}
\begin{document}
\begin{frame}
H$_2$O $\ch H_2O$
\end{frame}
\end{document}
The first "H2O" is in the proper Times sans serif, while the second "H2O" is in what appears to be Beamer's default CM sans serif. I'm presuming this is because either Beamer doesn't know what font to put into dchem's chemistry environments and so reverts to default, or dchem.sty is grabbing the wrong font somehow. This is way beyond my LaTeX ability to resolve. I've attached dchem.sty, since it is not a common package.
This may help a bit with the troubleshooting/debugging:
\usefonttheme[onlymath]{serif} gives proper Times serif in both math and chemistry environments, but \usefonttheme[stillsansserifmath]{serif} gives Times sans in math and CM sans in chemistry.
Hopefully someone can figure this out, and suggest a fix - maybe by editing dchem.sty? Thanks!