We generate a multicol document using the scrartcl document class.
Taking the sample below data, we see when we use the \begin{table}[h] command no table is generated in the multicols section. If we use the \begin{centering} command a table is generated however he have no \caption{} etc.
Yet when we are in the single column feature (at the end of the data) we see the \begin{table}[h] behaves as expected.
Does anyone know how to integrate this into the multicol environment?
\documentclass[10pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[margin=2.5cm]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[colaction]{multicol}
\usepackage{hyperref}
\usepackage{lineno}
\usepackage{setspace}
\usepackage{lipsum}
\title{Table formatting}
\author{The geniuses at SE}
\begin{document}
\maketitle
\doublespacing
\begin{abstract}
\lipsum[1-1]
\end{abstract}
\begin{multicols}{2}
\section{Introduction}
\lipsum[1-2]
\begin{table}[h]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{lllll}
& \multicolumn{2}{l}{XYZ} & \multicolumn{2}{l}{ABC} \\
& Sex & P & Sex & P \\
AGE1 & 0.5 & 1 & 0.6 & 1 \\
& & & &
\end{tabular}
\end{table}
\lipsum[1-1]
\begin{centering}
\begin{tabular}{lllll}
& \multicolumn{2}{l}{XYZ} & \multicolumn{2}{l}{ABC} \\
& Sex & P & Sex & P \\
AGE1 & 0.5 & 1 & 0.6 & 1 \\
& & & &
\end{tabular}
\end{centering}
\lipsum[1-1]
\end{multicols}
\bigskip
\lipsum[1-1]
\begin{table}[h]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{lllll}
& \multicolumn{2}{l}{XYZ} & \multicolumn{2}{l}{ABC} \\
& Sex & P & Sex & P \\
AGE1 & 0.5 & 1 & 0.6 & 1 \\
& & & &
\end{tabular}
\end{table}
\lipsum[1-1]
\end{document}




capt-ofpackage) – David Carlisle Jan 13 '16 at 21:05