# Eliminating space at the end of list environments

I am attempting to eliminate the vertical space at the end of listing environments (enumerate, itemize and describe) but only when the list environment is at the end of a leftbar environment from the framed package. This particular circumstance produces an awkward overhang of the leftbar (working example below). So far I've considered three options:

1. I realize I can adjust \topsep, \itemsep, and \partopsep, but this would not condition on being at the end of a leftbar environmnet, and affect the whole document.
2. I could redefine the list environments to include some negative space at the end. However, this would not condition on being at the end of a leftbar environment.
3. Finally, I could implement both the above solutions manually on a case-by-case basis. This seems inelegant and makes for a lot of work in longer documents.

If anyone has a solution it would be very much appreciated!

\documentclass{article}

\usepackage{framed}

\begin{document}

\begin{leftbar}
\begin{enumerate}

\item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

\item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

\end{enumerate}
\end{leftbar}

\end{document}

-

You can redefine the leftbar environment to \unskip the last skip inserted by the itemize-like environments.

\let\oldendleftbar\endleftbar
\renewcommand{\endleftbar}{\unskip\oldendleftbar}


MWE:

\documentclass{article}

\usepackage{framed,lipsum}

\let\oldendleftbar\endleftbar
\renewcommand{\endleftbar}{\unskip\oldendleftbar}

\begin{document}

\begin{leftbar}
\begin{itemize}

\item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

\item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

\end{itemize}
\begin{enumerate}

\item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

\item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

\end{enumerate}
\end{leftbar}

\begin{leftbar}
\lipsum[1]
\end{leftbar}

\end{document}


Output:

-
This does the trick! Thank you so much! –  user126350 Feb 11 '14 at 7:17
@user126350 You're welcome. Happy it helped. –  karlkoeller Feb 11 '14 at 7:43