Vertical line with every quotation

Viewed 13500

I often want to tell some comments inside of the text, which aren't so closely related to the discussed topic. Usually for this purpose I use the quotation environment, because of its large indent on the left. The comment can be large, it can include formulas, code listings, nested quotations, and so on.

How can I make quotation environment to draw a long vertical line on the left of all its content? You can often find this style on the Web with the actual quotes.

Google has found one solution:

\begin{flushleft}
\hbox{%
\vrule\hspace{.5em}\parbox{.9\textwidth}%
{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi id hendrerit 
nunc. Sed scelerisque lacus vitae erat eleifend eleifend. Donec eros mi, placerat
in porta eleifend, placerat a urna. Pellentesque venenatis neque non turpis
convallis vehicula. Aliquam aliquet ultricies tincidunt.}}
\end{flushleft}

But it cannot deal with code listings etc. inside of the text.

Thank you for your advice. Sorry if my English wasn't understandable enough.

2 Answers

I would suggest using framedbox/leftbar:

\usepackage{framed}
\newenvironment{quotationb}%
{\begin{leftbar}\begin{quotation}}%
{\end{quotation}\end{leftbar}}

Then you can use \begin{quotationb}......\end{quotationb}

Related