# Customize \verb!…! output in beamer

I apologize because I am sure this has been asked elsewhere however I couldn't find it anywhere. I would like to change my verbatim throughout a beamer presentation in the preamble.

Actually I would like to have it more or less like on slide no. 9 here.

I am using verbatim usually with \verb!...! rather than the environment because for longer codes I use listings. As far as I can tell the fancyvrb only allows customization in packages.

-
Is your question about the blue part? Because the rest is, as far as I can tell, simply \verb output. –  percusse Jun 13 '12 at 23:44
No its about the black. The verbatim output is much smaller than the rest of the text. How do you for instance manage to do that? What is the command so to change the size and perhaps font of all \verb!...! elements in your document. –  MCB Jun 14 '12 at 0:52

To change the font for the standard \verb command (and verbatim environment) you can redefine \verbatim@font as I did in my example code below; however, since you are already using the listings package, you can use \lstinline for short texts and the lstlisting environment for longer verbatim texts and use \lstset to give the same appearance to both short and long texts.

\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage{listings}

\lstset{basicstyle=\ttfamily\footnotesize}

\makeatletter
\def\verbatim@font{\footnotesize\ttfamily}
\makeatother

\setbeamertemplate{itemize items}[square]
\setbeamercolor{itemize item}{fg=red!60!black}

\begin{document}

\begin{frame}[fragile]
\begin{itemize}
\item \lstinline{amsmath}, \lstinline{amssymb} and \lstinline{amsthm} for mathematics.
\item \lstinline{geometry} for easy management of document margins.
\item  \verb+graphicx+ for managing external images.
\end{itemize}
\end{frame}

\end{document}


-