我目前正在研究beamer
我使用该环境的项目align
。我的代码如下:
\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}
如果我可以将您的注意力引向第一个align*
环境,我会尝试使用以下内容进行调整&
:
\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*}
通过这样做,我得到了大约 20-30 个错误代码,其中前三个是:
! 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}
现在,我很困惑为什么会发生这种情况,因为我唯一添加的是三个,这三个&
通常在框架环境之外有效。不知何故,它在框架环境内不起作用。你知道为什么我无法在框架环境内对齐吗?
答案1
框架环境不是问题,而是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}