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 want to create a delimiter between two regular paragraphs of text as in the end of page 6 of this pdf.

enter image description here

One way out could be the Vmatrix environment but then I dont know how to make the right delimiter disappear. Quick googling suggested only the usual way of using \right. to make a delimiter disappear but that wont work here.

How do I do this?

share|improve this question
    
p.s.- I do not have enough rep. to add an image. –  Abhishek Gupta Aug 27 '12 at 13:18
    
There are several frame environment packages, like mdframed. –  canaaerus Aug 27 '12 at 13:25

2 Answers 2

up vote 5 down vote accepted
\documentclass{article}
\usepackage{amsmath,tabularx}
\usepackage{lipsum}
\begin{document}

\begin{tabularx}{\linewidth}{@{}|| X @{}}
\lipsum*[1]
\end{tabularx}

\end{document}

enter image description here

share|improve this answer
    
+1, Can't vote up. Not enough rep. thanks! –  Abhishek Gupta Aug 27 '12 at 13:32
    
@AbhishekGupta: But you can accept the answer, can't you? –  canaaerus Aug 27 '12 at 13:35
    
@canaaerus Yes, thanks for pointing out. –  Abhishek Gupta Aug 27 '12 at 13:36
1  
The image and the code don't correspond. –  Gonzalo Medina Aug 27 '12 at 13:43
    
@GonzaloMedina: I know, but it's not important here. –  Herbert Aug 27 '12 at 13:44

I used the framed package to define a dleftbar environment to enclose the contents using a double vertical rule; then, this environment was used in conjunction with the amsmath package to define some theorem-like structures (admitting page breaks):

\documentclass{book}
\usepackage{framed}
\usepackage{amsmath}
\usepackage{lipsum}

\newenvironment{dleftbar}{%
  \def\FrameCommand{\vrule width 0.4pt\hspace{1.7pt}\vrule width 0.4pt \hspace{6pt}}%
  \MakeFramed {\advance\hsize-\width \FrameRestore}}%
 {\endMakeFramed}

\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}[theorem]{Proposition}

\newenvironment{prop}
  {\begin{proposition}\begin{dleftbar}}
  {\end{dleftbar}\end{proposition}}
\newenvironment{theo}
  {\begin{theorem}\begin{dleftbar}}
  {\end{dleftbar}\end{theorem}}

\begin{document}

\chapter{Test Chapter}
\lipsum[2]
\begin{theo}
\lipsum[2]
\end{theo}
\begin{prop}
\lipsum[2]
\end{prop}

\end{document}

enter image description here

share|improve this answer
    
Thanks, it helped. –  Abhishek Gupta Aug 27 '12 at 13:46
2  
@AbhishekGupta You're welcome! Notice that using this solution, page breaks can occur inside the environments. –  Gonzalo Medina Aug 27 '12 at 13:47
    
The solution is so simple and it works perfect. Thanks for you share. –  lazyboy Aug 27 '12 at 13:53

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.