I am working on the sheets of a course on LaTeX and would like to have several sheets in which you see on the left an example of a source document and on the right its output. I have this working now with listings and minipage, but I also want a frame around the page of a fixed width and height.
what I have now is:
\documentclass{beamer}
\usepackage{listings}
\begin{document}
\begin{frame}[fragile]{The \LaTeX\ language}
% Source code:
\begin{columns}[T]
\column{0.45\textwidth}
\begin{center}
\LaTeX\ code:
%\begin{lrbox}\mylistingbox
\begin{minipage}[t][0.7\textheight]{\textwidth}
\begin{lstlisting}
An equation:
\[
1 + 1 = 2
\]
\end{lstlisting}
\end{minipage}
%\end{lrbox}
%\fbox{\usebox\mylistingbox}
\end{center}
% Output
\column{0.45\textwidth}
\begin{center}
Output:
\fbox{
\begin{minipage}[t][0.7\textheight]{1\textwidth}
An equation:
\[
1 + 1 = 2
\]
\end{minipage}}
\end{center}
\end{columns}
\end{frame}
\end{document}
This works, but only puts a frame around the right side (the output). If I try the same with \fbox{}
on the left side it does not work.
How can I put a frame around the minipage with the listiting?