It's driving me nuts that using verbatim causes the \end{frame} statement to throw an error. How do I fix this?
LaTeX:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item An item
\begin{verbatim}
some code
\end{verbatim}
\end{itemize}
\end{frame}
\end{document}
Error message:
File ended while scanning use of \@xverbatim.
This is supposed to work like that but it doesn't.
[fragile]option on the frame – David Carlisle Jul 01 '15 at 08:41\end{frame}. Beside this: It is not supposed to work like this. See e.g. "12.9 Verbatim and Fragile" Text in the documentation. – Ulrike Fischer Jul 01 '15 at 08:46[fragile]and no indentation it works now. Can I have indentation still somehow? – BullyWiiPlaza Jul 01 '15 at 08:58\end{frame}must in this case be alone and at the begin of the line. – Ulrike Fischer Jul 01 '15 at 09:04