0

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.

0 Answers0