在 Latex 中创建具有多个子环境的新环境
我想创建一个可以包含两个列表的新环境,每个列表都有任意数量的项目。
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 创建演示文稿,并且在几张幻灯片(但不是全部)上有一个重复的幻灯片结构。一个有两个列表,右侧有一个图像。我想将内容(项目和图片路径)与显示分开。假设我想将图片放在右侧而不是左侧。我希望能够更改环境定义,并将更改应用到所有相关幻灯片。
谢谢
I'd like to create a newenvironment that could contain two lists, each with an arbitrary number of items.
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
I am creating a presentation using Beamer, and I have a recurring slide structure on several slides (but not all). One that has two lists, and an image on the right. I would like to separate the content (the items and picture path) from the display. Let's say I wanted to have the picture on the right instead of left. I would like to be able to change the environment definition, and apply changes to all relevant slides.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定我是否明白你的要求。我想
\newcommand
可能就是您所需要的:如果您将上述内容放入文档的序言中,您将使用
\myenvironment{item 1}{item 2}{item 3} {item 4}{item 5}{item 6}
文本中的
。如果您的要求有所不同,请添加一些详细信息。 ;-)
I'm not sure if I understand what you require. I guess a
\newcommand
might be all you need:If you put the above into the preamble of the document, you yould use
\myenvironment{item 1}{item 2}{item 3}{item 4}{item 5}{item 6}
within the text.
Please add some detail to what you require, if it is different. ;-)