tags:

views:

25

answers:

1

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 quotation environment, beacuse of its large indent on the left. Comment can be large, it can include formulaes, code listings, nested quotations, and so on.

How can I make quotation environment to draw long vertical line on the left of all its content? You can often meet this style in 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 advices. Sorry if my English wasn't understandable enough.

+2  A: 

Have you tried using a tabular environment?

Here is some code that creates a vertical line for the text you have given above,

\begin{tabular}{|p{10cm}}
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{tabular}

You need the p{10cm} to define the width of the column for the text to wrap, otherwise it goes off the page. You can change the value depending on your margins and paper format.

Here is the result,

Vertical Line Quote

And as far as I know, tabular environment accepts the code listings package.

nEm