我正在使用 beamer 制作一些演示材料。
由于我不习惯使用Latex,而且这是第一次使用beamer,所以我对Latex和beamer的语法非常不熟悉。:(
请告诉我如何缩进示例环境。
我的一张幻灯片的代码如下:
\begin{frame}[shrink=0, t]{Inventory Control}
\begin{itemize}
\item The \blue{Open-loop} minimization of the cost is to select all orders $u_0, \cdots, u_{N-1}$ at once at time $0$.
\\[1.5em]
\item The \blue{Closed-loop} minimization of the cost is to postpone placing the order $u_k$ until the last possible moment (time $k$) when the current stock $x_k$ will be know.
\\[1.5em]
\item[] Mathematically, in closed-loop inventory optimization, we want to find a sequence of functions $\mu_k, k=0, \cdots, k=N-1$, mapping stock $x_k$ into order $u_k$ so as to minimize the expected cost, where
$$\mu_k(x_k) = \text{amount that should be ordered at time } k \text{ if the stock is } x_k.$$
\\[0.5em]
\item The \blue{Policy} (or \blue{control law})
$$\pi=\left\{\mu_0, \mu_1, \cdots, \mu_{N-1}\right\}$$
\begin{example}
For each $\pi$, the corresponding cost for a fixed initial stock $x_0$ is
$$J_{\pi}(x_0)=E\left\{R(x_N)+\sum_{k=0}^{N-1}\left(r(x_k)+c\mu_k(x_k)\right)\right\}$$
\end{example}
\end{itemize}
\end{frame}
答案1
如果你将example
块设置为minipage
宽度\linewidth
- 列表内的线宽(如itemize
),它将保持不变:
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{amsmath}
\begin{document}
\begin{frame}[shrink=0, t]{Inventory Control}
\begin{itemize}
\item The \textcolor{blue}{Open-loop} minimization of the cost is to
select all orders $u_0, \cdots, u_{N-1}$ at once at time~$0$.
\item The \textcolor{blue}{Closed-loop} minimization of the cost is to
postpone placing the order~$u_k$ until the last possible moment
(time~$k$) when the current stock~$x_k$ will be know.
Mathematically, in closed-loop inventory optimization, we want to
find a sequence of functions $\mu_k, k = 0, \cdots, k = N - 1$,
mapping stock~$x_k$ into order~$u_k$ so as to minimize the expected
cost, where
\[
\mu_k(x_k) = \text{amount that should be ordered at time } k
\text{ if the stock is } x_k.
\]
\item The \textcolor{blue}{Policy} (or \textcolor{blue}{control law})
\[
\pi = \bigl\{ \mu_0, \mu_1, \cdots, \mu_{N-1} \bigr\}
\]
\begin{minipage}{\linewidth}
\begin{example}
For each~$\pi$, the corresponding cost for a fixed initial stock~$x_0$ is
\[
J_{\pi}(x_0) = E \left\{ R(x_N) + \sum_{k=0}^{N-1}
\bigl( r(x_k) + c\mu_k(x_k) \bigr) \right\}
\]
\end{example}
\end{minipage}
\end{itemize}
\end{frame}
\end{document}