In this question I asked about changing the indentation (on the left) in the leftbar environment. I've got things nicely lined up (with the bar outside of the text field), but there is a little bit of space on the right side that I'd like to remove. Also, how does one convert a leftbar into a rightbar?
\documentclass{article}
\usepackage[centering]{geometry}
\usepackage{lipsum}
\newlength{\leftbarwidth}
\setlength{\leftbarwidth}{3pt}
\newlength{\leftbarsep}
\setlength{\leftbarsep}{10pt}
\usepackage{xcolor}
\usepackage{framed}
\renewenvironment{leftbar}[1][\hsize]
{%
\def\FrameCommand
{%
{\hspace{-7pt} \color{black} \vrule width 2pt}%
\hspace{0pt}%must no space.
\fboxsep=\FrameSep\colorbox{white}%
}%
\MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}%
}
{\endMakeFramed}
\setlength{\FrameSep}{5pt}
\begin{document}
\lipsum[3]
\begin{leftbar}
\lipsum[3]
\end{leftbar}
\lipsum[3]
\end{document}
