In this case, why not use just a tabularx
inside the tcolorbox
?
\documentclass[10pt,xcolor={table, usenames, dvipsnames, svgnames}]{beamer}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\definecolor{sandybrown}{rgb}{0.96,0.64,0.38}
\definecolor{linen}{HTML}{FAF0E6}
\begin{document}
\begin{frame}
\rowcolors{1}{linen}{linen!70!DarkRed}
\begin{tcolorbox}[enhanced, colback=linen, colframe=sandybrown,
title=Formulas, coltitle=white, fonttitle=\small\bfseries,
clip upper, fontupper=\sffamily,%
coltext=DarkRed,
tabularx*={\arrayrulecolor{DarkRed}}{>{\centering\arraybackslash}X|%
>{\centering\arraybackslash}X}]
Some Text \bfseries{Some text} &
Some Text \bfseries{Some text} \\\hline
$a= b+c$ & $a= b+c$\\\hline
$a= b+c$ & $a= b+c$\\\hline
$a= b+c$ & $a= b+c$
\end{tcolorbox}
\end{frame}
\end{document}
Update:
OP images show a left aligned text on first line. In my original answer I couldn't reproduce this behaviour due to a problem when a \multicolumn
command is introduced in first cell of a tabularx tcolorbox. This problem is shown in tcolorbox, tabularx: first line with a multicolumn does not work in tcolorbox environment. Now, thank you to Thomas F. Sturm (tcolorbox
author) there's a provisional solution for this problem.
\documentclass[10pt,xcolor={table, usenames, dvipsnames, svgnames}]{beamer}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\definecolor{sandybrown}{rgb}{0.96,0.64,0.38}
\definecolor{linen}{HTML}{FAF0E6}
\makeatletter
\tcbset{%
hackfortabularx/.code={%
\def\tcb@saveupperbox{%
\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}
\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper}}
}
\makeatother
\begin{document}
\begin{frame}
\begin{tcolorbox}[enhanced, colback=linen, colframe=sandybrown,
title=Formulas, coltitle=white, fonttitle=\small\bfseries,
clip upper, hackfortabularx,
fontupper=\sffamily, coltext=DarkRed,
tabularx*={\rowcolors{1}{linen}{linen!70!DarkRed}\arrayrulecolor{DarkRed}}%
{>{\centering\arraybackslash}X|>{\centering\arraybackslash}X}]
\multicolumn{1}{l|}{Some Text \bfseries{Some text}} &
\multicolumn{1}{l}{Some Text \bfseries{Some text}} \\\hline
$a= b+c$ & $a= b+c$\\\hline
$a= b+c$ & $a= b+c$\\\hline
$a= b+c$ & $a= b+c$
\end{tcolorbox}
\end{frame}
\end{document}
2nd update:
The problem with multicolumn
command on left column of top most rule has been solved in tcolorbox v4.20
. There's no need for previous pacth. Seond figure can be obtained with:
\documentclass[10pt,xcolor={table, usenames, dvipsnames, svgnames}]{beamer}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\definecolor{sandybrown}{rgb}{0.96,0.64,0.38}
\definecolor{linen}{HTML}{FAF0E6}
\begin{document}
\begin{frame}
\begin{tcolorbox}[enhanced, colback=linen, colframe=sandybrown,
title=Formulas, coltitle=white, fonttitle=\small\bfseries,
clip upper,
fontupper=\sffamily, coltext=DarkRed,
tabularx*={\rowcolors{1}{linen}{linen!70!DarkRed}\arrayrulecolor{DarkRed}}%
{>{\centering\arraybackslash}X|>{\centering\arraybackslash}X}]
\multicolumn{1}{l|}{Some Text \bfseries{Some text}} &
\multicolumn{1}{l}{Some Text \bfseries{Some text}} \\\hline
$a= b+c$ & $a= b+c$\\\hline
$a= b+c$ & $a= b+c$\\\hline
$a= b+c$ & $a= b+c$
\end{tcolorbox}
\end{frame}
\end{document}