Beamer:如何将带有子项的方程式左对齐

Beamer:如何将带有子项的方程式左对齐

在下面给出的代码中,我想进行以下更改:我希望方程式与子项对齐。或者至少将方程式进一步向左移动 - 它们太靠右了。

有办法吗?也许使用子项来解释方程式不是一个好方法?

\documentclass{beamer}
\usepackage{amsmath}
\usetheme{metropolis}

\begin{document}

        \begin{frame}{State-Space Model}
        \vspace{-2.5cm}
        \begin{columns}[T]
            \begin{column}{.5\textwidth}
                \begin{block}{}
                    \begin{itemize}
                        \item State Equations:
                        \begin{equation}
                        x_k = A x_{k-1} + w_{k-1} \nonumber
                        \end{equation}
                        \begin{itemize}
                            \item k: discrete time index
                            \item x: state variable
                            \item A: state transfer matrix
                            \item w: process noise 
                        \end{itemize}
                    \end{itemize}
                \end{block}
            \end{column}
            \begin{column}{.5\textwidth}
                \begin{block}{}
                    \begin{itemize}
                        \item Output Equations: 
                        \begin{equation}
                        y_k = C x_k + v_k \nonumber
                        \end{equation}
                        \begin{itemize}
                        \item y: measurement
                        \item C: observation matrix
                        \item v: measurement noise
                        \end{itemize}
                    \end{itemize}
                \end{block}
            \end{column}
        \end{columns}
    \end{frame}

\end{document}

答案1

fleqn在 的环境下nccmath,您可以非常轻松地将方程式与项目或子项目对齐:

\documentclass{beamer}
\usepackage{amsmath, nccmath}
\usetheme{metropolis}

\begin{document}

        \begin{frame}{State-Space Model}
        \vspace{-2.5cm}
        \begin{columns}[T]
            \begin{column}{.5\textwidth}
                \begin{block}{}
                    \begin{itemize}
                        \item State Equations:
                        \begin{fleqn}
                        \begin{equation}
                        x_k = A x_{k-1} + w_{k-1} \nonumber
                        \end{equation}
                        \end{fleqn}
                        \begin{itemize}
                            \item k: discrete time index
                            \item x: state variable
                            \item A: state transfer matrix
                            \item w: process noise
                        \end{itemize}
                    \end{itemize}
                \end{block}
            \end{column}
            \begin{column}{.5\textwidth}
                \begin{block}{}
                    \begin{itemize}
                        \item Output Equations:
                        \begin{fleqn}[\dimexpr\leftmarginii]
                        \begin{equation}
                        y_k = C x_k + v_k \nonumber
                        \end{equation}
                        \end{fleqn}
                        \begin{itemize}
                        \item y: measurement
                        \item C: observation matrix
                        \item v: measurement noise
                        \end{itemize}
                    \end{itemize}
                \end{block}
            \end{column}
        \end{columns}
    \end{frame}

\end{document} 

在此处输入图片描述

答案2

包含flalign来自amsmath包的内容且变量列表中没有项目符号:

在此处输入图片描述

\documentclass{beamer}
\usepackage{amsmath}
\usetheme{metropolis}

\begin{document}
\begin{frame}{State-Space Model}
\begin{columns}[T]
\begin{column}{.5\textwidth}
        \begin{itemize}
            \item State Equations:
            \begin{flalign*}
            x_k & = A x_{k-1} + w_{k-1}   &
            \end{flalign*}
        where are:
            \begin{itemize}
                \item[$k$:] discrete time index
                \item[$x$:] state variable
                \item[$A$:] state transfer matrix
                \item[$w$:] process noise
            \end{itemize}
        \end{itemize}
\end{column}
\begin{column}{.5\textwidth}
        \begin{itemize}
            \item Output Equations:
            \begin{flalign*}
            y_k & = C x_k + v_k           &
            \end{flalign*}
            \begin{itemize}
            \item[$y$:] measurement
            \item[$C$:] observation matrix
            \item[$v$:] measurement noise
            \end{itemize}
        \end{itemize}
    \end{column}
\end{columns}
\end{frame}
\end{document}

相关内容