I am using Inconsolata for code in paragraphs, and would like to use it for code in verbatim environments as well. I have tried using fancyvrb's Verbatim environment to do this, but cannot get any font except Courier. My document starts like this:
\documentclass{book}
\usepackage{fancyvrb}
\usepackage{inconsolata}
\DefineVerbatimEnvironment{VerbOut}{Verbatim}{fontfamily=courier}
\begin{document}
Normal paragraph with \texttt{code using texttt}.
\begin{VerbOut}
VerbOut environment.
\end{VerbOut}
\end{document}
- If I change the
fontfamilyin the definition ofVerbOuttoinconsolata, the verbatim block displays the normal (Times Roman) font. - If I change it to
\sffamily, I get an error:! Missing \endcsname inserted. - I get the same error with
{\sffamily},\protect\sffamily, and other variations.
Questions:
- What's the right way to change the font to Inconsolata?
- What's the right way to change it to whatever is being used by
\texttt(in case we change our minds about fonts again)?

\listfilesto the post so you can see the font definitions used forzi4. It seems like you may have only downloadedinconsolata.styand placed it in your working folder - you need the font definition files as well, properly installed. Are you compiling with pdfLaTeX? What operating system are you running? What TeX distribution? Is your distribution up to date? – Werner Jun 02 '14 at 15:34zi4doesn't seem to have italics, but that's a separate issue (?). Thanks for your help. – Greg Wilson Jun 03 '14 at 20:07