2

我想创建一个可以包含两个列表的新环境,每个列表都有任意数量的项目。

Some fixed text
\begin{itemize}
\item item 1
\item item 2
\item item 3
\item item 4
% Maybe more items
\end{itemize}
Some more fixed text
\begin{itemize}
\item item 5
\item item 6
% Could have more items here
\end{itemize}
Some text at the end

我正在使用 Beamer 创建演示文稿,并且在几张幻灯片(但不是全部)上有一个重复的幻灯片结构。一个有两个列表,右侧有一个图像。我想将内容(项目和图片路径)与显示分开。假设我想让图片在右边而不是左边。我希望能够更改环境定义,并将更改应用于所有相关幻灯片。

谢谢

4

1 回答 1

1

我不确定我是否理解您的要求。我想\newcommand你可能只需要一个:

\newcommand{\myenvironment}[6]{%
Some fixed text
\begin{itemize}
\item #1
\item #2
\item #3
\item #4
\end{itemize}
Some more fixed text
\begin{itemize}
\item #5
\item #6
\end{itemize}
Some text at the end
}

如果您将上述内容放入文件的序言中,您将使用

\myenvironment{item 1}{item 2}{item 3}{item 4}{item 5}{item 6}

文内。

如果不同,请在您需要的内容中添加一些细节。;-)

于 2010-02-25T16:43:44.293 回答