I need an environment that indents one or more paragraphs and draws a gray line at the normal indentation level that matches the paragraph in height. This is what I came up with:
\documentclass{minimal}
\usepackage{colortbl}
\newenvironment{note}{
\begin{tabular}{>{\columncolor[gray]{0.8}}p{0.1cm}p{0.2cm}p{\dimexpr \textwidth - 1.1cm - 4\tabcolsep}}
& &
}{
\end{tabular}
}
\begin{document}
Normal text
\begin{note}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.
\end{note}
More normal text
\end{document}
This renders:
While the line itself looks fine, the vertical spacing is awful. I can of course insert some \vspace
in the environment, but I think the whole approach with the tabular
does not seem the best way to do this. Is there a better solution?