# containverbatim shows up in output

When I compile the following code in XeLaTeX (also works with pdflatex) under windows, [containsverbatim] shows up in the ouput:

Here is the code:

\documentclass{book}
\usepackage{showexpl}
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage[top=5cm, bottom=5cm, left=6cm, right=3cm]{geometry}

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

\begin{document}

\begin{frame}[containsverbatim] %Problem here

\begin{LTXexample}

\section{haha}
lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...
\end{LTXexample}

\end{frame}

\end{document}


When I don't add [containsverbatim] it still works, but it leaves an annoying dot:

I'm surely doing something wrong here, so I appreciate any help.

-
The frame environment is proper of beamer, not of book (where \frame does a very different thing). There's no mention of containsverbatim in the beamer manual, though. –  egreg Mar 18 '12 at 14:46
Isn't that what \usepackage{showexpl} suppose to do? –  Yiannis Lazarides Mar 18 '12 at 14:50
@egreg containsverbatim is I think an old option for beamer: it's there in the code, but fragile is the supported option name. –  Joseph Wright Mar 18 '12 at 14:55

The containsverbatim "option" to frame is something used in beamer which you are not using. Also, the frame environment is an inherited construct (actually a regular macro) within LaTeX, hence the fact that there is no error when using it.

If you wish to frame the entire LTXexample output, you should use the framed or mdframed packages that respectively provide the framed and mdframed environments.

Here's an MWE showcasing the use of the former (framed) package:

\documentclass{book}
\usepackage{showexpl}% http://ctan.org/pkg/showexpl
\usepackage[frenchb]{babel}% http://ctan.org/pkg/babel
\usepackage[T1]{fontenc}% http://ctan.org/pkg/fontenc
\usepackage[top=5cm, bottom=5cm, left=6cm, right=3cm]{geometry}% http://ctan.org/pkg/geometry
\usepackage{framed}% http://ctan.org/pkg/geometry

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

\begin{document}

\begin{framed}

\begin{LTXexample}

\section{haha}
lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...lorem ipsum dolor si amet...
\end{LTXexample}

\end{framed}

\end{document}

-
Thanks for very quick response (and for explaining), works perfectly. –  bobicool Mar 18 '12 at 15:02
I have a little side question... Is it possible with showexpl to only show the output without the code displaying? –  bobicool Mar 19 '12 at 2:45
@bobicool: You don't need showexpl to only show the output. LaTeX creates the output by default. Otherwise please explain your intent. –  Werner Mar 25 '12 at 21:23
Well, I posted another question related to what I asked you: tex.stackexchange.com/questions/49245/… maybe you can help me there? Since no has completely answered my question. –  bobicool Mar 26 '12 at 0:02