I want to use tables ( with caption and label) inside tbox, but The SAME table that appears outside the tbox, doesn´t appear inside.
How could I do?, What´s the problem?
The code is:
\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}
\usepackage[spanish]{cleveref} %para crear referencias
% poner las dos siguientes líneas despues de begin- document % Type the next two lines after begin-document
\renewcommand{\tablename}{Tabla}
\crefname{table}{tabla}{tablas}
\begin{document}
\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}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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, using \emph{tcolorbox} package.}]
\tcblower
\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}
\textbf{Question}
\begin{itemize}
\item What's ...?
\end{itemize}
\end{tcolorbox}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

tcolorbox. If you remove thetableenvironment it will work. – jak123 Oct 22 '15 at 07:35\captionof{table}{Caption Table}\label{tab:table-out}to get captions outside the table environment (but check the numbering if you mix floats and non-floats) – Ulrike Fischer Oct 22 '15 at 07:55