1

When I use an align* environment containing some matrices, compilation gives errors when using the beamer class. When I change to article class, compilation is fine. I can't understand what is wrong, or what I need to do to handle this with beamer...

Beamer code:

\documentclass[9pt]{beamer}    
\usepackage{amsmath}     
\newcommand{\vect}[1]{\boldsymbol{\mathbf{#1}}}    

\begin{document}

\begin{frame}
\begin{align*}
&\underbrace{\mathrm{d}
\begin{bmatrix}
 \eta_1 \\ 
 \eta_2 \\ 
 \eta_3 \\ 
 \eta_4 \\ 
 \eta_5 
 \end{bmatrix}
\big{(}t\big{)}}_{\mathrm{d} \vect{\eta} (t)}   =  \left(
\underbrace{
\begin{bmatrix}
 \text{drlatency}  &  \text{drlatencydisturbance}  &  \text{drlatencyquality}  &  \text{drlatencymood}  &  0 \\ 
 \text{drdisturbancelatency}  &  \text{drdisturbance}  &  \text{drdisturbancequality}  &  \text{drdisturbancemood}  &  0 \\ 
 \text{drqualitylatency}  &  \text{drqualitydisturbance}  &  \text{drquality}  &  \text{drqualitymood}  &  0 \\ 
 \text{drmoodlatency}  &  \text{drmooddisturbance}  &  \text{drmoodquality}  &  \text{drmood}  &  \text{drmoodsleep} \\ 
 0  &  0  &  0  &  \text{drsleepmood}  &  \text{drsleep} 
 \end{bmatrix}
}_{\underbrace{\vect{A}}_\textrm{DRIFT}} \underbrace{
\begin{bmatrix}
 \eta_1 \\ 
 \eta_2 \\ 
 \eta_3 \\ 
 \eta_4 \\ 
 \eta_5 
 \end{bmatrix}
\big{(} t \big{)}
}_{\vect{\eta} (t)} + \underbrace{
\begin{bmatrix}
 0 \\ 
 0 \\ 
 0 \\ 
 0 \\ 
 0 
 \end{bmatrix}
}_{\underbrace{\vect{b}}_\textrm{CINT}}  \right) dt 
\end{align*}


\end{frame}
\end{document}

Article code:

\documentclass[9pt]{article}    
\usepackage{amsmath} %for multiple line equations    
\newcommand{\vect}[1]{\boldsymbol{\mathbf{#1}}}    

\begin{document}

\begin{align*}
&\underbrace{\mathrm{d}
\begin{bmatrix}
 \eta_1 \\ 
 \eta_2 \\ 
 \eta_3 \\ 
 \eta_4 \\ 
 \eta_5 
 \end{bmatrix}
\big{(}t\big{)}}_{\mathrm{d} \vect{\eta} (t)}   =  \left(
\underbrace{
\begin{bmatrix}
 \text{drlatency}  &  \text{drlatencydisturbance}  &  \text{drlatencyquality}  &  \text{drlatencymood}  &  0 \\ 
 \text{drdisturbancelatency}  &  \text{drdisturbance}  &  \text{drdisturbancequality}  &  \text{drdisturbancemood}  &  0 \\ 
 \text{drqualitylatency}  &  \text{drqualitydisturbance}  &  \text{drquality}  &  \text{drqualitymood}  &  0 \\ 
 \text{drmoodlatency}  &  \text{drmooddisturbance}  &  \text{drmoodquality}  &  \text{drmood}  &  \text{drmoodsleep} \\ 
 0  &  0  &  0  &  \text{drsleepmood}  &  \text{drsleep} 
 \end{bmatrix}
}_{\underbrace{\vect{A}}_\textrm{DRIFT}} \underbrace{
\begin{bmatrix}
 \eta_1 \\ 
 \eta_2 \\ 
 \eta_3 \\ 
 \eta_4 \\ 
 \eta_5 
 \end{bmatrix}
\big{(} t \big{)}
}_{\vect{\eta} (t)} + \underbrace{
\begin{bmatrix}
 0 \\ 
 0 \\ 
 0 \\ 
 0 \\ 
 0 
 \end{bmatrix}
}_{\underbrace{\vect{b}}_\textrm{CINT}}  \right) dt 
\end{align*}

\end{document}
3

The fact that

_\textrm{CINT}

works by default is an unfortunate side effect of the parsing rules for primitive subscripts which do not match those of normal macro arguments.

if you use the documented syntax

_{\textrm{CINT}}

then it works in beamer (there are two instances of this in the example)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.