i use code from topic: How to make a Table/tabular appears in a tcolorbox?
But error "Not in outer par mode" and table does not appear.
Minimal Code:
\documentclass[12pt,a4paper]{article}
\usepackage{mwe}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[x11names,table]{xcolor} % dddd%
\usepackage{eurosym}
\usepackage{datetime}
\settimeformat{ampmtime}
\usepackage{hyperref}
\hypersetup{colorlinks=true, urlcolor=blue}
\usepackage{graphicx,subcaption}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}[colback=gray!5!white,colframe=gray!75!black,title=\large{In the next lines I'm trying to insert the same in a box}]
\begin{table}[h!]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
a& b & T/F & dif\\ \hline
1 & 2 & False & -1\\
2 & 4 & False & -2\\
\hline
\end{tabular}\\
\caption{Caption Table}\label{tab:table-out}
\end{table}
\end{tcolorbox}
\end{document}




tcolorboxspirit, but your screenshot doesn't correspond to your code. Indeed, your code hascapture=hboxunconditionally in the options for\newtcolorbox[blend into=tables]{mytable}{...}, thus both boxes havecapture=hbox. Besides, I would simplify the preamble a lot: `\documentclass{article} \usepackage{tcolorbox}\newtcolorbox[blend into=tables]{mytable}[2][]{ float=htb, title={#2}, every float=\centering, #1}
– frougon Aug 05 '19 at 09:24is enough for the sample code inside thedocument` environment.before upperrather thanafter upper? – frougon Aug 05 '19 at 09:46hyperref(anda4paperand12pt)... – frougon Aug 05 '19 at 10:32