I would like to a have a caption below my
mdframed box (outside the border if possible) which sometimes span across multiple pages. I managed to create a caption several ways but the pagebreaks are unfriendly. How can I do that without making the box unbreakable at pagebreaks?
listings package is not an alternative, because I already use it inside somewhere in the mdframed box, and nesting them doesn't seem like a good idea.
Associated thread: use this inside