Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

enter image description 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.

share|improve this question
    
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
add comment

1 Answer 1

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}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.