# Why does ! Missing $inserted. occur when using \verb in beamer? When I use \verb+...+ within beamer I get ! Missing$ inserted.
<inserted text>
\$
l.6 \end{frame}

?


What is going wrong and how do I fix this problem?

A minimal example is

\documentclass{beamer}

\begin{document}
\begin{frame}{Title}
Some text \verb+\int+
\end{frame}
\end{document}

• Note to moderators: This question should be a reference question. Can somebody please make it community wiki? – Martin Thoma Aug 20 '14 at 17:13
• @StefanKottwitz: You've answered another beamer/fragile question. Could you please extend my community wiki answer with an explanation how fragile works? – Martin Thoma Aug 20 '14 at 17:16

## 1 Answer

You can fix the problem by adding fragile:

\documentclass{beamer}

\begin{document}
\begin{frame}[fragile]{Title}
Some text \verb+\int+
\end{frame}
\end{document}

• It's worth expanding the answer with how fragile works maybe? :-) *or a link – 1010011010 Aug 20 '14 at 17:07
• @1010011010 I don't know how it works. If you know it, please feel free to add it to the answer. That is one reason why I made my answer "Community wiki". – Martin Thoma Aug 20 '14 at 17:12