I am writing a document with theorems and proofs. Since, some reader may not be interested by the proofs I want to highlight them so they can be skipped easily.
The best idea I came up with is to put a bar in the left margin of the proof (if you have any better ideas I am interested).
The problem is that some proofs may take more than one page and contain figures and/or tables. Currently I found a solution in a previous post which uses the package framed and the command \leftbar. It works for several pages but not for figures and tables.
\documentclass{article}
\usepackage{xcolor}
\usepackage{framed}
\renewenvironment{leftbar}[1][\hsize]
{%
\def\FrameCommand
{%
{\color{black}\vrule width 0.5pt}%
\hspace{0pt}%must no space.
\fboxsep=\FrameSep\colorbox{white}%
}%
\MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}%
}
{\endMakeFramed}
\newenvironment{proof}[1][Proof]{\leftbar\begin{trivlist}\item[\hskip\labelsep {\bfseries#1}]}{\end{trivlist}\endleftbar}
\def\fact{It is practically a big lie that LaTeX makes you focus on
the content without bothering about the layout.}
\begin{document}
\begin{proof}
\fact
\end{proof} % Works
%\begin{proof}
% \fact
% \begin{figure}
% \centering My figure
% \caption{Test figure}
% \end{figure}
%\end{proof} % Does not works
\end{document}
I don't really understand how environments work. Do you know if it's possible to make this work for proofs which include tables or figures?
(if you know why the bar starts one line before the proof and finish one line after I am also interested but it is not my main concern)
Thanks in advance.



figureis a floating environment, so may well be moved out of the area used by the proof. By the way, you want to try themdframedpackage instead, but that won't solve the floating problem. – Andrew Swann Apr 08 '14 at 09:47However, I am not sure it will help...
– Zach Apr 08 '14 at 10:15mdframedenvironment for the proofs. – Peter Grill Apr 08 '14 at 13:03