答案1
希望这可以满足你的期望:
\documentclass{book}
\usepackage{mdframed}
\usepackage{lipsum}
\newmdenv[topline=false, leftline=true, rightline=true, bottomline=false,%
linewidth=2pt, innerleftmargin=12pt, rightmargin=-4pt,%
innerrightmargin=12pt, skipabove=8pt, skipbelow=8pt]{leftrightbar}%
\begin{document}
\begin{leftrightbar}
\lipsum[1-8]
\end{leftrightbar}
\end{document}