Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to make a good looking environment for my proofs. Some are spread on two pages so i thought of the list environment.

\documentclass{article}
\usepackage[francais]{babel}
\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{list}{\underline{Proof} :}{\leftmargin=0.6cm \setlength{\labelwidth}{10pt}}
\item \lipsum
\end{list}

\lipsum[2]

\end{document}

What i want is a vertical line starting approximatively under the 'r' of proof and that continue on the second page.

In fact It is quite similar to this question Vertical line enclosing items in itemize wich unfortunately didn't find no answer.

share|improve this question
1  
You may want to use the mdframed package. –  egreg Jul 26 '12 at 11:16
1  
Self answers are perfectly acceptable. –  egreg Jul 26 '12 at 13:31
add comment

2 Answers

up vote 3 down vote accepted

I suggest you to turn it into an environment; for large first lines one can do some manual adjustment:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{lipsum}
\usepackage{mdframed}

\newenvironment{Proof}[1][1.9ex]
  {\par\bigskip\vspace{#1}
   \begin{mdframed}[outerlinewidth=2,leftmargin=10,%
     rightmargin=-10pt,backgroundcolor=white,hidealllines=true,leftline=true,%
     innertopmargin=0pt,splittopskip=\topskip,skipbelow=\baselineskip,innerbottommargin=0pt%
     skipabove=\baselineskip]%
     \vspace{-#1}\hspace{-12.2mm}\underline{Proof} : \ignorespaces}
  {\end{mdframed}}

\begin{document}

\lipsum[1]

\begin{Proof}
\lipsum
\end{Proof}

\lipsum[2]

\begin{Proof}[2.1ex]
abc$\sum$\lipsum
\end{Proof}

\lipsum[2]

\end{document}

enter image description here

In the optional argument you put the necessary adjustment if the first line has descenders or ascenders that go beyond the underlined "Proof".

share|improve this answer
    
@azetina Thanks for the images –  egreg Jul 27 '12 at 22:26
add comment

Thanks to egreg for the indication. After some trys i got what i wanted, that is :

\documentclass{article}
\usepackage[francais]{babel}
\usepackage{lipsum}
\usepackage{mdframed}

\newcommand{\Proof}[1]{%
\bigskip\bigskip
\begin{mdframed}[outerlinewidth=2,leftmargin=10,%
rightmargin=-10pt,backgroundcolor=white,hidealllines=true,leftline=true,%
innertopmargin=0pt,splittopskip=\topskip,skipbelow=\baselineskip,innerbottommargin=0pt%
skipabove=\baselineskip]%
\vspace{-3mm}\hspace{-12.2mm}\underline{Proof} : #1
\end{mdframed}
}

\begin{document}

\lipsum[1] \Proof\lipsum \lipsum[2]

\end{document}

Unfortunately it won't work if the first line height is bigger than usual ..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.