1

I want my quote environment

\documentclass{article}

\let\@ldquote=\quote
\let\@ldendquote=\endquote
\renewenvironment{quote}
   {\@ldquote\setlength{\baselineskip\ttfamily}{\singlebaselineskip}}
   {\@ldendquote}

\begin{document}

Some text.
\begin{quote}
A quotation.
\end{quote}

\end{document}

To appear with \tttext or \ttfamily whichever one is supposed to use in environments.

So that

\begin{quote} ... \end{quote}

appears as \tttext{...}.

How does one achieve that?

4

Judging by the code snippets you've posted, it would appear to be the case that you not only want to use a monospaced font in the quote environment, but also that you wish to use single-spacing in these environments. If that's the case, I suggest you include the following instructions in the preamble:

\usepackage{etoolbox,setspace}
\AtBeginEnvironment{quote}{\ttfamily\raggedright\frenchspacing\setstretch{1.0}}

A full MWE (mininum working example):

\documentclass{article}
\usepackage{etoolbox,setspace,lipsum}
\AtBeginEnvironment{quote}{\ttfamily\raggedright\frenchspacing\setstretch{1.0}}

\doublespacing % or "\onehalfspacing"?

\begin{document}
\lipsum[1] % filler text
\begin{quote}
\lipsum[2] % more filler text
\end{quote}
\lipsum[3] % still more filler text
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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