I'd like to have an environment that encloses all its content into the typewriter font as \texttt{} does. However, I do not want to use \texttt{} but an own environment, e.g. \begin{allintypewriter} because my text contains multiple paragraphs.

So instead of

My multiparagraph text

I'd like to write

My multiparagraph text

Sorry, it's a newbe question, but how do I define a \newenvironment for this? (I do not want to use something like \verbatim because the text to be set as typewriter should contain other latex commands; only the font should be changed to typewriter for this environment)


1 Answer 1


The more general version of you question is dealt with here:

How do I use a particular font for a small section of text in my document?

But since you only need to change the font family and not the font itself, your particular instance of it is much simpler:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .