I'm trying to center a the content of a figure that has verbatim text in it, but the verbatim text is always right-aligned:
\begin{figure}
\centering
\begin{verbatim}
some
text
here
\end{verbatim}
\caption{I wish this were centered}
\end{figure}
verbatimenvironment is always typeset on full length. You may want to look at thefancyvrbpackage and itsBVerbatimenvironment. – egreg Feb 14 at 9:49