Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am currently working on a beamer project where I use the align enviroment. My code is as follows:

\begin{frame}
\frametitle{The Hovorka model}
\begin{tabular}{l l}
\begin{minipage}{0.5\textwidth}
The Hovorka model as an IVP:
\begin{align*}
\boldsymbol{\dot{x}}(t) = f(\boldsymbol{x}(t),d_k,u_k,\boldsymbol{\theta}_k)\\
\boldsymbol{x}(t_0) = \boldsymbol{x_0} \\
f : \left( \mathbb{R}^{n_x}, \mathbb{R}, \mathbb{R}, \mathbb{R}^{n_\theta} \right) \mapsto \mathbb{R}^{n_x}
\end{align*}
CGM model:
\begin{align*}
\frac{dG_I}{dt}(t) = -\frac{(G_I(t)-G(t))}{\tau_I} \\
G_{CGM}(t) = G_I(t) + \varepsilon_n \\
\varepsilon_n = \left( \xi +\lambda \cdot  \sinh \left(\frac{e_n - \gamma}{\delta} \right) \right)
\end{align*}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\includegraphics[scale=0.15]{Hovorka}\\
16 variable parameters
\end{minipage}
\end{tabular}
\end{frame}

If I may lead your attention to the first align* environment I try to align the following using &:

\begin{align*}
    \boldsymbol{\dot{x}}(t) &= f(\boldsymbol{x}(t),d_k,u_k,\boldsymbol{\theta}_k)\\
    \boldsymbol{x}(t_0) &= \boldsymbol{x_0} \\
    f &: \left( \mathbb{R}^{n_x}, \mathbb{R}, \mathbb{R}, \mathbb{R}^{n_\theta} \right) \mapsto \mathbb{R}^{n_x}
    \end{align*}

By doing this I get approximately 20-30 error codes, where the first three is:

! Argument of \align has an extra }.<inserted text>\par \end{frame}
! Paragraph ended before \align was complete.<to be read again>\par \end{frame}
! Missing $ inserted.<inserted text>$ \end{frame}

Now, I am confused why this is happening beacuse the only thing I am adding is the three & as usually works outside the frame environment. Somehow, it does not work inside the frame environment. Do you have any idea why I cannot align inside my frame environment?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The frame environment is not the problem, but the tabular.

\documentclass[12pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\begin{document}
    \begin{frame}
    \frametitle{The Hovorka model}
    \begin{columns}

        \begin{column}{.5\textwidth}

            The Hovorka model as an IVP:
            \begin{align*}
                \boldsymbol{\dot{x}}(t) &= f(\boldsymbol{x}(t),d_k,u_k,\boldsymbol{\theta}_k)\\
                \boldsymbol{x}(t_0) &= \boldsymbol{x_0} \\
                f &: \left( \mathbb{R}^{n_x}, \mathbb{R}, \mathbb{R}, \mathbb{R}^{n_\theta} \right) \mapsto \mathbb{R}^{n_x}
            \end{align*}
            CGM model:
            \begin{align*}
                \frac{dG_I}{dt}(t) = -\frac{(G_I(t)-G(t))}{\tau_I} \\
                G_{CGM}(t) = G_I(t) + \varepsilon_n \\
                \varepsilon_n = \left( \xi +\lambda \cdot  \sinh \left(\frac{e_n - \gamma}{\delta} \right) \right)
            \end{align*}

        \end{column}

        \begin{column}{.5\textwidth}
            \includegraphics[scale=0.15]{Hovorka}
        \end{column}    

        \end{columns}   
    \end{frame}
\end{document}

enter image description here

share|improve this answer
    
Thank you very much Samcarter - this solved my problem! I appreciate your help! –  SteewDK Apr 8 at 13:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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