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 find the code to get boxes like the ones we can enjoy in the mathspec or biblatex user guides. It seems to be based on the listings and framed packages. Here is a working minimal example


I'd like to be able to extract the relevant piece of code in the listings package for other purposes but, so far, in vain. I thought it was using the framed package but it is not.

share|improve this question
The source is all available, so you could go digging. For biblatex a lot of the work is done by ltxdockit.sty – Alan Munn Jan 13 '11 at 1:21
it is pretty strange because the listings guide mentions the framed package but I cannot find where in the code? I think it is the same for ltxdockit.sty. I'll go further. – pluton Jan 13 '11 at 1:30
listings is inspired by fancyvrb and it makes more sense to use it in a way you already did, define a new environment. – Herbert Jan 13 '11 at 9:25
@Herbert: I'll have a look at fancyvrb but I wanted to create a theorem-like environment (title, numbering, labeling similar to ntheorem or thmtools) based on the frame offered by listings. That is why I wanted to extract the code dedicated to the frame. Using listings as such could be possible also. – pluton Jan 13 '11 at 14:27
up vote 2 down vote accepted

You don't need framed.sty.

Use listings.sty and modify its properties.

Together with fancyvrb.sty you can create showexpl.sty-like environment that can span across multiple pages.

Let me know if you need more info how to do it.

share|improve this answer
@Herbert: OK. I will edit my answer. Thanks. – xport Jan 13 '11 at 10:10
see my comment above. Thanks. – pluton Jan 13 '11 at 14:27

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.