tags:

views:

175

answers:

1

Hi,

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

+1  A: 

I'm not sure if I understand what you require. I guess a \newcommand might be all you need:

\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
}

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. ;-)

jowi