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.

  • 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. – user2478 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

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.

| improve this answer | |
  • @Herbert: OK. I will edit my answer. Thanks. – xport Jan 13 '11 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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