I try to use colored framed boxes inside tabular environments. Is it possible to used "mdframed" environment for it?
Unfortunately, the code below does not work (it gives:
«! LaTeX Error: Something's wrong--perhaps a missing \item.»
)
\documentclass{article}
\usepackage[english]{babel}
\usepackage{mdframed}
\begin{document}
\begin{tabular}{ | l |}
22222
\begin{mdframed}
1111
\end{mdframed}
\end{tabular}
\end{document}
Is there any magic to do it (or may be there exists another colored frame boxes package, compatible with tabular/tabulary/ environment)?
Update: Actually, I work with ReStructedText → (Sphinx) → Latex → (xelatex) → PDF generation, and have low options to customize generated latex code. I use some mdframed environment for notes/warnings/admonitions, because they frequently breaks between pages, and mdframed looks best options for it. But small notes, should be OK inside tables, so I trying to make universal environment, that works within and without tables.
Update2: I solved my problem by monkey-patching latex tables generation by sphinx, but still interested if any solution exists to put framed box inside "tabular" without specifying fixed "parbox" width for columns.
|l|
to|p{10cm}|
, if the|
are really needed – user31729 Jul 14 '16 at 16:02