Document ClassesBeamer Class with verbatim

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Mikerada6
Posts: 42
Joined: Fri Oct 17, 2008 5:55 pm

Beamer Class with verbatim

Post by Mikerada6 »

When i try to compile the below slide i get numerous error messages such as: run away argument? \end{document} these errors messages happen whenever i try to use the verbatim environment within a slide. Any idea why?

Code: Select all

\frame{
\frametitle{Example}
\begin{verbatim}
\begin{tabular}{|c|c|c|c|c|c|}
		\hline
		Symbol & Name &Meaning&Symbol & Name & Meaning\\\hline
		$\leq$ & & & $\neq$ & & \\\hline
		$\equiv$ & & &$\approx$& & \\ \hline
		$\cong$ & & &		$\propto$ & & \\\hline
		$\pm$ & & & $\times$ & & \\\hline
		$\ast$ & & &		$\vec{x}$ & & \\\hline
		$\circ$ & & &		$\oplus$ & & \\\hline
		$\ni$ & & & 		$\exists$ & & \\\hline
		$\forall$ & & &		$\neg$ & & \\\hline
		$\dot{x}$ & & & 		$\sum_{n=0}^{\infty}f(x)$ & & \\\hline
		$\notin$ & & &		$\cup$ & & \\\hline
		$\cap$ & & &		$\subseteq$ & & \\\hline
		$\partial$ & & &		$\infty$ & & \\\hline
		$\bot$ & & &		$\sum$ & & \\\hline
		$\Phi$ & & &		$\in$ & & \\\hline
		$\int{f(x)\ dx}$ & & &		$\Delta$ & & \\\hline
		$\oint$ & & &		$\pi$ & & \\\hline
		$\phi$ & & &		$e$ & & \\\hline
		$\omega$ & & &		$\angle$ & & \\\hline
		$x$ & & & $\int{\int{f(x,y)\ dx\ dy}}$ & & \\\hline
		\end{tabular}
\end{verbatim}
}
\end{document}
Here is my preamble

Code: Select all

\documentclass{beamer}
\usepackage{beamerthemesplit}
\usepackage{amsfonts}
\usepackage{multirow}
\usepackage{latexsym}
\usepackage{enumerate}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{graphics}
\usepackage{multimedia}
\usepackage{xmpmulti}
\usepackage{grffile}
\usepackage{verbatim}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Beamer Class with verbatim

Post by gmedina »

Hi,

use the fragile frame option; i.e., something like the following

Code: Select all

\begin{frame}[fragile]
...
\end{frame}
when including verbatim environments in a frame
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply