I'm trying to put 8 tables 4 in one line and the other 4 below them, but for some reason it doesn't result as I want.
I want the tables in the following order
J3 J2 J1 J0 K3 K2 K1 K0
and each one with its caption
but I get
J3 J3caption K3 K3caption J2 J2caption K2 K2caption ...
\begin{center}
\begin{table}[!htb]
\begin{minipage}{.24\linewidth}
\scalebox{0.5}{
\begin{tabular}{c|cccc}
%J3 table%
\end{tabular}
\selectfont\textit{Tabla J3}
\begin{tabular}{c|cccc}
%K3 table%
\end{tabular}
\selectfont\textit{Tabla K3}
\end{minipage}
\begin{minipage}{.24\linewidth}
\scalebox{0.5}{
\begin{tabular}{c|cccc}
%J2 table%
\end{tabular}
\selectfont\textit{Tabla J2}
\begin{tabular}{c|cccc}
%K2 table%
\end{tabular}
\selectfont\textit{Tabla K2}
}
\end{minipage}
\begin{minipage}{.24\linewidth}
\scalebox{0.5}{
\begin{tabular}{c|cccc}
%J1 table%
\end{tabular}
\selectfont\textit{Tabla J1}
\begin{tabular}{c|cccc}
%K1 table%
\end{tabular}
\selectfont\textit{Tabla K1}
}
\end{minipage}
\begin{minipage}{.24\linewidth}
\scalebox{0.5}{
\begin{tabular}{c|cccc}
%J0 table%
\end{tabular}
\selectfont\textit{Tabla J0}
\begin{tabular}{c|cccc}
%K0 table%
\end{tabular}
\selectfont\textit{Tabla K0}
}
\end{minipage}
\end{table}
\end{center}
There must be some little detail that I'm missing. As I'm new to LaTeX, I don't know how to fix it.