[Tex/LaTex] framed or mdframed? (Pros/Cons)

framedmdframed

I'm currently thinking about using shaded and framed sections in my document.

But for now, I couldn't clarify the differences between framed and mdframed (or other packages). Although the documentation of framed says that it handles page breaks, mdframed states it doesn't.

Honestly, I'm confused for now and would be very happy if somebody could recommend a solution which is solid and reliable for the future, so that I don't need to switch the package in the coming time.

Best Answer

General

Your question is related to the packages framed and mdframed. But there are other useful packages for drawing frames around given material:

A small list can be found via the search mechanism of CTAN


Differences

Before I list the differences let me start with the similarities.

  • both packages allow page breaks
  • the main environments can't be nested if the nested environment needs a page break
  • both packages save the contents in a savebox and use the command \vsplit (there are some differences in the implementation, but the idea is the same)

Instead of a big list with the differences here is the relevant part:

Everything that framed can do, can be done by mdframed. But not everything that mdframed can do, can be done by framed.

The biggest difference is the frame itself. mdframed can draw the frames with three different methods:

  1. standard TeX commands like hrule and vrule
  2. TikZ
  3. PSTricks

which leads to the big pool of options.


Recommendation

You asked about the solidity and reliability of the packages.

From this point of view the package framed should be recommended. The package was developed in 1992 by Donald Arseneau. If you look at the revision history you will see that the package has had no big changes since 1992. In 2011 Donald Arseneau added some new environments. In my opinion they didn't improve the package significantly. However all these facts are leading to the point that framed is more solid and reliable.

The authors of mdframed instead are trying to constantly improve the package. So after an update some previous settings can be changed or maybe the package has a new bug. Every development can result in such problems. So the package isn't as solid and reliable as framed. (Of course I am trying to fix bugs as soon as possible).


Conclusion

Nobody can help you with the decision.

Related Question