![Beamer:如何将带有子项的方程式左对齐](https://linux22.com/image/395124/Beamer%EF%BC%9A%E5%A6%82%E4%BD%95%E5%B0%86%E5%B8%A6%E6%9C%89%E5%AD%90%E9%A1%B9%E7%9A%84%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%B7%A6%E5%AF%B9%E9%BD%90.png)
在下面给出的代码中,我想进行以下更改:我希望方程式与子项对齐。或者至少将方程式进一步向左移动 - 它们太靠右了。
有办法吗?也许使用子项来解释方程式不是一个好方法?
\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}