I am trying to define a type of table similar to the look-and-feel of beamer blocks. I tried the following (using the tabu
for tables), but with no luck.
\newenvironment<>{tabvarblock}[2][.9\textwidth]{%
%\setlength{\textwidth}{#1}
\begin{actionenv}#3%
\def\insertblocktitle{#2}
\begin{tabu}to#1{\insertblocktitle}%
\usebeamertemplate{block begin}}
{\end{tabu}%
\usebeamertemplate{block end}%
\end{actionenv}}
The use of the new structure would be, something like
\begin{tabvarblock}[0.5\textwidth]{X[m]X[m]}
A & B \NN
C & D \NN
\end{tabvarblock}
I also tried to use the solution in Example of fancy table using TikZ package. It worked, however the look-and-feel is not exactly the same.
Best Answer
The first approach is a
\newenvironment
that mixmdframed
andtabular
, but the same withtcolorbox
instead ofmdframed
seem easier because this package have abeamer
skin option. The first case is a fixed two columns but in the second the columns format is free (the second parameter of the new environment). You can compare both approaches in this MWE: