I'd like to create my own environment for custom source code formatting (monotype, verbatim, small font etc). The problem is: how to format text as monospace? When declaring an environment, I must tell LaTeX what to put before and after environment contents. So I wrote:
Code: Select all
\newenvironment{code} {\texttt{ } { }}
Piece of code is formatted using:
Code: Select all
\begin{code}
blah blah blah
\end{code}
Any ideas how to put texttt{} inside environment?