mhchem and Beamer

422 views
Skip to first unread message

Shawn Way

unread,
Aug 4, 2011, 7:23:30 PM8/4/11
to latexus...@googlegroups.com
Recently mhchem and beamer have stopped working well together, especially in the equation environments.  When a chemical equation is placed in an equation environment, I get the following error:

ERROR: Undefined control sequence.

--- TeX said ---
\getanddefine@fonts ...p@font \let \textfont@name 
                                                  \font@name \xdef \font@nam...
l.21 \end{frame}
                

A minimal example is:

\documentclass{beamer} 
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[version=3, arrows=pgf]{mhchem} 
\newcommand*{\ra}[1]{\ensuremath{\dot{\mathsf{#1}}}} 
\usetheme{Goettingen} 
\begin{document} 
\begin{frame} 
   \frametitle{S-Nitrosylation} 
   \begin{itemize} 
     \item{On Cys-residues: \ce{R-SH + $\ra N$O <=> R-S-$\ra N$-OH}} 
     \item{Additional pathway for \ce{$\ra N$O} regulation besides 
         cGMP-dependent kinase} 
   \end{itemize} 
   \begin{eqnarray}
     \label{eq:1}
     \cee{R-SH + $\ra N$O &<=>& R-S-$\ra N$-OH}
   \end{eqnarray}

\end{frame} 
\end{document} 



Any thoughts?

Shawn Way

Peter Flynn

unread,
Aug 5, 2011, 3:52:34 PM8/5/11
to latexus...@googlegroups.com
On Fri, Aug 5, 2011 at 12:23 AM, Shawn Way <shaw...@yahoo.com> wrote:
Recently mhchem and beamer have stopped working well together, especially in the equation environments.  When a chemical equation is placed in an equation environment, I get the following error:

ERROR: Undefined control sequence.

--- TeX said ---
\getanddefine@fonts ...p@font \let \textfont@name 
                                                  \font@name \xdef \font@nam...
l.21 \end{frame}
                

A minimal example is:

I don't get that error. Instead, I get a different one:

(/usr/share/texmf/tex/latex/beamer/themes/theme/beamerthemeGoettingen.sty
(/usr/share/texmf/tex/latex/beamer/themes/outer/beamerouterthemesidebar.sty
! Undefined control sequence.
\Gm@rmargin ->\Geom@rmargin
                           
l.128 ...\beamer@sidebarside=\beamer@sidebarwidth}
                                                 
! Missing number, treated as zero.
<to be read again>
                   !
l.128 ...\beamer@sidebarside=\beamer@sidebarwidth}
                                                 
! Illegal unit of measure (pt inserted).
<to be read again>
                   !
l.128 ...\beamer@sidebarside=\beamer@sidebarwidth}
                                                 
Any thoughts?

To find your error, look more carefully at your log file and find out line 21 of what file is causing the error.

These are all the files my system accessed while processing (command \listfiles before \begin{document}). You might want to check what versions you are using (mine are TeX Live 2009 under Ubuntu).

 *File List*
  beamer.cls    2007/03/11 cvs version 3.07 A class for typesetting presentations (rcs-revision 1.70)
beamerbasercs.sty    2007/01/28 (rcs-revision 1.4)
beamerbasemodes.sty    2007/01/28 (rcs-revision 1.22)
beamerbasedecode.sty    2007/01/28 (rcs-revision 1.20)
beamerbaseoptions.sty    2007/01/28 (rcs-revision 1.8)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
 pgfcore.sty    2008/01/15 v2.00 (rcs-revision 1.6)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2009/08/28 v1.8 graphics configuration of TeX Live
  pdftex.def    2010/03/12 v0.04p Graphics/color for pdfTeX
  pgfsys.sty    2008/02/07 v2.00 (rcs-revision 1.31)
  pgfrcs.sty    2008/02/20 v2.00 (rcs-revision 1.21)
  pgfrcs.code.tex
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/01/23  (rcs-revision 1.6)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfbaseimage.sty   
 xxcolor.sty    2003/10/24 ver 0.1
 amssymb.sty    2009/06/22 v3.00
amsfonts.sty    2009/06/22 v3.00 Basic AMSFonts support
geometry.sty    2010/09/12 v5.6 Page Geometry
   ifpdf.sty    2009/04/10 v2.0 Provides the ifpdf switch (HO)
  ifvtex.sty    2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
 ifxetex.sty    2009/01/23 v0.5 Provides ifxetex conditional
geometry.cfg
hyperref.sty    2009/10/09 v6.79a Hypertext links for LaTeX
 hycolor.sty    2009/10/02 v1.5 Code for color options of hyperref/bookmark (HO
)
xcolor-patch.sty    2009/10/02 xcolor patch
  pd1enc.def    2009/10/09 v6.79a Hyperref: PDFDocEncoding definition (HO)
etexcmds.sty    2007/12/12 v1.2 Prefix for e-TeX command names (HO)
infwarerr.sty    2007/09/09 v1.2 Providing info/warning/message (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty    2009/08/13 v3.4 Keyval support for LaTeX options (HO)
kvsetkeys.sty    2009/07/30 v1.5 Key value parser with default handler support
(HO)
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
  bitset.sty    2007/09/28 v1.0 Data type bit set (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable integer calculations (HO)
bigintcalc.sty    2007/11/11 v1.1 Expandable big integer calculations (HO)
pdftexcmds.sty    2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions (
HO)
ifluatex.sty    2009/04/17 v1.2 Provides the ifluatex switch (HO)
 ltxcmds.sty    2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)

atbegshi.sty    2008/07/31 v1.9 At begin shipout hook (HO)
 hpdftex.def    2009/10/09 v6.79a Hyperref driver for pdfTeX
  size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
beamerbasecompatibility.sty    2007/01/28  (rcs-revision 1.63)
beamerbasefont.sty    2007/01/28  (rcs-revision 1.16)
beamerbasemisc.sty    2007/01/28  (rcs-revision 1.24)
beamerbasetwoscreens.sty    2007/01/28  (rcs-revision 1.7)
beamerbaseoverlay.sty    2007/01/28  (rcs-revision 1.50)
beamerbasetitle.sty    2007/01/28  (rcs-revision 1.25)
beamerbasesection.sty    2007/01/28  (rcs-revision 1.21)
beamerbaseframe.sty    2007/01/28  (rcs-revision 1.60)
beamerbaseverbatim.sty    2007/01/28  (rcs-revision 1.8)
beamerbaseframesize.sty    2007/01/28  (rcs-revision 1.18)
beamerbaseframecomponents.sty    2007/01/28  (rcs-revision 1.41)
beamerbasecolor.sty    2007/01/28  (rcs-revision 1.42)
beamerbasenotes.sty    2007/01/28  (rcs-revision 1.23)
beamerbasetoc.sty    2007/01/28  (rcs-revision 1.21)
beamerbasetemplates.sty    2007/01/28  (rcs-revision 1.51)
beamerbaseauxtemplates.sty    2007/01/28  (rcs-revision 1.28)
beamerbaseboxes.sty    2007/03/11  (rcs-revision 1.32)
beamerbaselocalstructure.sty    2007/01/28  (rcs-revision 1.53)
enumerate.sty    1999/03/05 v3.00 enumerate extensions (DPC)
beamerbasenavigation.sty    2007/01/28  (rcs-revision 1.36)
beamerbasetheorems.sty    2007/01/28  (rcs-revision 1.10)
translator.sty    2007/03/11 ver 1.00
translator-language-mappings.tex
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
  amsthm.sty    2004/08/06 v2.20
beamerbasethemes.sty    2007/01/28  (rcs-revision 1.10)
beamerthemedefault.sty    2007/01/28  (rcs-revision 1.7)
beamerfontthemedefault.sty    2007/01/28  (rcs-revision 1.13)
beamercolorthemedefault.sty    2007/01/28  (rcs-revision 1.28)
beamerinnerthemedefault.sty    2007/01/28  (rcs-revision 1.20)
beamerouterthemedefault.sty    2007/01/28  (rcs-revision 1.14)
inputenc.sty    2008/03/30 v1.1d Input encoding file
  latin1.def    2008/03/30 v1.1d Input encoding file
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
  mhchem.sty    2007/05/19 v3.07 for typesetting chemical formulae
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
  twoopt.sty    2008/08/11 v1.5 Definitions with two optional arguments (HO)
     pgf.sty    2008/01/15 v2.00 (rcs-revision 1.12)
pgfcomp-version-0-65.sty    2007/07/03 v2.00 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.00 (rcs-revision 1.1)
    tikz.sty    2008/02/13 v2.00 (rcs-revision 1.27)
  pgffor.sty    2007/11/07 v2.00 (rcs-revision 1.8)
  pgffor.code.tex
    tikz.code.tex
beamerthemeGoettingen.sty    2007/01/28  (rcs-revision 1.7)
beamerouterthemesidebar.sty    2007/01/28  (rcs-revision 1.9)
supp-pdf.mkii
 nameref.sty    2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty    2008/08/11 v3.1 Data extraction from references (HO)
    test.out
    test.out
translator-theorem-dictionary-English.dict   
    umsa.fd    2009/06/22 v3.00 AMS symbols A
    umsb.fd    2009/06/22 v3.00 AMS symbols B
 ***********

///Peter

Shawn Way

unread,
Aug 6, 2011, 2:33:38 PM8/6/11
to LaTeX Users Group
The error appeared when the mhchem was upgraded from the 6/10 version
to the 5/11 version. I was able to find a copy of the 5/11 version
and the error disappeared. When I have a little time (I have a
pressing document to finish), I'll take a closer look.




On Aug 5, 2:52 pm, Peter Flynn <anglebrac...@gmail.com> wrote:
> 21 of *what* file is causing the error.
Reply all
Reply to author
Forward
0 new messages