TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create an environment able to understand when it's on a single/two columns layout and to span over multiple pages or columns having different style for the two cases. I would want to obtain something like this example:


I tried framed and mdframed package but they seem not to be quite configurable for my needs and seem to have problems with 2-columns layout. Can you advise me a quite configurable package which can do what i need (see the attachment) or if not, is there a command which i can use to understand when i reached the end of page or column?

To solve my problem I'm trying to use TikZ nodes to create the frame, and i would understand when it's time to go on the next page/column to create a new node and put there the following text, but i don't know how to create the partially dashed line on corners, and how to detect the end of page or column. Any suggestion?

share|improve this question
Mmm, see my answer to Test if a paragraph has a page break in it? which is somehow similar to what you want. It could be used to create some style like the one in your example file. – Martin Scharrer Jul 2 '11 at 15:34

It is also possible to raise the lines with package xhfill





enter image description here

share|improve this answer

Your Answer


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.