# Columns with Latex code and Output in a Beamer presentation

I am new to Latex and am working on a small presentation using Latex and Beamer. In one frame, I'm trying to show some Latex code and it's output. Initially I just took a screenshot of the Gummi tex code and preview panel, but I wanted to know how I can get just the code on one column and the output on another side of the frame. I've seen this in several presentations and can't seem to find anything via google or any of the tutorials I'm using.

Can anyone help me with spliting a beamer frame with Latex code on one side and the output on the other?

For what it's worth, I'm working in Ubuntu 10.10

-

One option would be to use the showexpl package. A little example:

\documentclass{beamer}
\usepackage{showexpl}

\lstset{%
basicstyle=\ttfamily\small,
showspaces=false,
showstringspaces=false,
breaklines=true,
breakautoindent=true,
captionpos=t
}

\begin{document}

\frame[containsverbatim]{
\begin{LTXexample}
\begin{itemize}
\item First.
\item Second.
\item Third.
\end{itemize}
\end{LTXexample}

\begin{LTXexample}
$$x^2 + y^2 = z^2.$$
\end{LTXexample}
}

\end{document}

Here's the result:

-