如何将位于不同列且高度相同的项目放置到一起?

如何将位于不同列且高度相同的项目放置到一起?

我在乳胶中使用 beamer 类。

我的代码和结果如下:

\begin{frame}{The Hamilton-Jacobi-Bellman Equation}
    \begin{columns}
        \begin{column}{.5\textwidth}
            \vfill
            \centering
            {\Huge{Discrete}}
            \\[\baselineskip]
            \begin{itemize}
                \item System
                \[
                    x_{k+1} = f(x_k, u_k)
                \]
                \[
                    k \in \{0, \ldots, N\}
                \]
                \item Cost
                \[
                    g_N(x_N) + \sum_{k=0}^{N-1}g_k(x_k, u_k)
                \]
                \item DP equation
                \[
                    J_N(x_N) = g_N(x_N)
                \]
                \[
                    J_k(x_k) = \min_{u_k\in U_k} [g_k(x_k, u_k) \hspace{5em}
                \]
                \[
                    \hspace{8em} + J_{k+1}(x_k, u_k)]
                \]
            \end{itemize}
            \vfill
        \end{column}
        \vrule width 1.5pt
        \begin{column}{.5\textwidth}
            \vfill
            \centering
            {\Huge{Continuous}}
            \\[\baselineskip]
            \begin{itemize}
                \item System
                \[
                    \dot{x}(t) = f(x(t), u(t))
                \]
                \[
                    t \in [0, T]
                \]
                \item Cost
                \[
                    h(x(T)) + \int_0^T g(x(t), u(t)) dt
                \]
                \item HJB equation
                \[
                    V(T, x) = h(x)
                \]
                \[
                    0 = \min_{u\in U}[g(x,u) + \nabla_t V(t, x) \hspace{4em}
                \]
                \[
                    \hspace{6.5em} + \nabla_x V(t, x)'f(x, u)]
                \]
            \end{itemize}
            \vfill
        \end{column}
    \end{columns}
\end{frame}

屏幕图像

我希望每条线都位于同一条水平线上。但是,我的方程式位于不同的线上,例如成本、方程式项等。

答案1

其中一个选项——参见@John Kormylo 评论——是使用tabularx并启用高级数学设置mathtools

\documentclass{beamer}
\usepackage{tabularx}
\usepackage{mathtools}

\begin{document}
\begin{frame}{The Hamilton-Jacobi-Bellman Equation}
\renewcommand\arraystretch{1.2}
    \begin{tabularx}{\textwidth}{X | X}%\vrule width 1.5pt
\hfil\Large   Discrete      &   \hfil\Large   Continuous        \tabularnewline 
\textbullet\ System         &   \textbullet\ System             \tabularnewline 
    $\displaystyle\begin{multlined}[t][0.7\hsize]
x_{k+1} = f(x_k, u_k)   \\
          k \in \{0, \ldots, N\}
      \end{multlined}$      &
                                $\displaystyle\begin{multlined}[t][0.7\hsize]
                            \dot{x}(t) = f(x(t), u(t))   \\
                                      t \in [0, T]
                                  \end{multlined}$              \tabularnewline
\textbullet\ Cost           &   \textbullet\ Cost               \tabularnewline
    $\displaystyle
g_N(x_N) + \sum_{k=0}^{N-1}g_k(x_k, u_k)
    $                       &   $\displaystyle
                            h(x(T)) + \int_0^T g(x(t), u(t)) dt
                                $                               \tabularnewline
\textbullet\ DP equation    &   \textbullet\ HJB equation       \tabularnewline
    $\displaystyle\begin{multlined}[t][0.7\hsize]
J_N(x_N) = g_N(x_N) \vphantom{\int_0^T} \\
           J_k(x_k) = \min_{u_k\in U_k} [g_k(x_k, u_k)  \\
           + J_{k+1}(x_k, u_k)]
      \end{multlined}$      &   $\displaystyle\begin{multlined}[t][0.7\hsize]
                            h(x(T)) + \int_0^T g(x(t), u(t)) dt \\
                                            V(T, x) = h(x)      \\
                                            0 = \min_{u\in U}[g(x,u) + \nabla_t V(t, x)\\
                                            + \nabla_x V(t, x)'f(x, u)]
                                  \end{multlined}$  
    \end{tabularx}
\end{frame}
\end{document}

在此处输入图片描述

相关内容