# “Paragraph ended before \verbatim@ was complete.” when trying to use verbatim in tabular

I have the following code in my Beamer slide code:

\begin{frame}
\frametitle{selections}

\begin{tabular}{ll}
sample 1 &
\begin{minipage}{3in}
\begin{verbatim}
sample 2
\end{verbatim}
\end{minipage}\\
\end{tabular}

\end{frame}


When I try to compile, it breaks with the following error:

Runaway argument?
sample 2 \end {verbatim} \end {minipage}\\ \end {tabular}
! Paragraph ended before \verbatim@ was complete.
\par
l.965 \end{frame}

?


I'm not sure what's wrong. Could anyone offer me guidance?

• Try \begin{frame}[fragile] (untested as you didn't provide a complete example). – Ulrike Fischer Jul 23 '15 at 12:55
• @UlrikeFischer Would you like to provide an answer? – Gonzalo Medina Jul 23 '15 at 14:06

Use \begin{frame}[fragile]. This option is needed when the content contains verbatim.