I think practically we will not use both tcolorbox and mdframed in a single input file. Correct me if I am wrong. So we have to choose either tcolorbox or mdframed. However, without knowing the strong and weak points of both, we can only choose one by gambling.

Shortly speaking, what are the weak and strong points of both packages? The answers really influence the path of my life in TeX.

  • 1
    I remember Marco Daniel saying that tcolorbox is more advanced than mdframed. My memory may bad though. Kindly excuse if I am wrong.
    – user11232
    Commented Oct 1, 2013 at 2:05
  • related: framed or mdframed? (Pros/Cons)
    – cgnieder
    Commented Oct 2, 2013 at 8:54

4 Answers 4


I have the understanding that tcolorbox capabilities are a superset of mdframed. While mdframed tries to give you tools to create colorful frames, they look pale and simpler to me comparing to tcolorbox ones.

I think with enough tikz ninja skills you can achieve pretty much what you want with both, but somehow the tcolorbox syntax and options are simpler to me.

Also, tcolorbox has this "upper part/lower part" capabilities that mdframed lacks and creating a simple colored frame with a title seems simpler with tcolorbox.

From the documentation of mdframed

apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
shade,left color=white, right color=blue!20}}},
\begin{definition}[Inhomogeneous linear]
\begin{definition*}[Inhomogeneous linear]

mdframed theorem

the equivalent in tcolorbox documentation:

\newtcbtheorem[number within=section]{mytheo}{My Theorem}%

\begin{mytheo}{This is my title}{theoexample}
This is the text of the theorem. The counter is automatically assigned and,
in this example, prefixed with the section number. This theorem is numbered with
\ref{th:theoexample} and is given on page \pageref{th:theoexample}.

tcolorbox theorem

@claudio-fiandrino mentioned that mdframe boxes can be customized with tikz. This is also the case with tcolorbox, since it relies on tikz.

\tcbset{colback=Salmon!50!white,colframe=FireBrick!75!black, width=(\linewidth-8mm)/2,before=,after=\hfill,equal height group=ske}
\begin{tcolorbox}[adjusted title=My title]
This is my content.
\begin{tcolorbox}[skin=beamer,beamer,adjusted title=My title]
This is my content.

tcolorbox customization

  • 1
    Actually, like tikz, the tcolorbox package relies on pgf, a lower level framework. But Tikz support can be loaded as a library.
    – mhelvens
    Commented Oct 22, 2013 at 0:46

For what it's worth: I've been using mdframed for quite a while… I didn't know tcolorbox existed! After browsing the tcolorbox documentation for a couple of minutes, I'm itching to convert my documents.

It seems to me like an extremely well-crafted package. It is natively based on pgf, and uses pgfkeys properly to provide its own range of options, which is to me a mark of quality. It also offers a suite of libraries to extend functionality, such as full tikz support.

In contrast, the mdframed interface has always felt a bit clumsy and frustrating to me. And support for custom TikZ options seems to be 'tacked on', rather than properly implemented. In addition, I've had it conflict with other packages on more than one occasion.


I read little doc about tcolorbox, and some doc on mdframed, i mainly use mdframed for my environments. In my opinion, one can change frameline with mdframed using tikz/pgf easily, there are many illustrations on stackexchange given by Gonzalo Medina and someone else. As for tcolorbox, it seems that there is little example code, but the tcolorbox's documentation is very beautifully made.

  • Also tcolorbox allows to easily change the so called skin with custom TikZ/PGF frames. Commented Oct 2, 2013 at 8:47
  • i have changed my mind, tcolorbox is flexible Commented Dec 9, 2013 at 12:52

Another point against mdframed: breakable boxes can make bad break sometimes.

See an example below.

(example taken from How to prevent mdframed from typesetting a widow line that contains just a bit vspace with colored background?)

Various comments suggests using tcolorbox instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .