I am using a \twocolumn document, however, I want to add a table in the middle of the column. I tried using \onecolumn but it places the figure or table in the next page making the whole page \onecolumn.
I saw that using \multicols can solve the problem. The thing is that the final table caption is not centered no matter how I set it up and I still get the overful hbox error regarding the content of the table.
\documentclass[journal, a4paper, 11pt]{IEEEtran}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{url}
\usepackage{amsmath}
\usepackage[left=1.5cm,right=1.5cm,top=1.5cm,bottom=1.5cm]{geometry}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{empheq}
\usepackage{textcomp}
\usepackage{float}
\usepackage{booktabs}
\usepackage{xspace}
\usepackage{makecell}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{hhline}
\usepackage[style=numeric,sorting=none]{biblatex}
\addbibresource{references.bib}
% \renewcommand{\refname}{Referencias}
% \parindent=5mm
\setlength{\parindent}{1em}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.25}
% \renewcommand{\tablename}{Tabla}
% \renewcommand{\figurename}{Figura}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
pdftitle={Overleaf Example},
citecolor=blue,
pdfpagemode=FullScreen,
}
\usepackage{placeins} %FloatBarrier
\usepackage{fancyhdr}
\newcommand{\eg}{e.g.@\xspace}
\newcommand{\ie}{i.e.@\xspace}
\newcommand{\mac}{\overline{\overline{c}}}
\newcommand{\sm}{\mathrm{sm}}
\newcommand{\MATLAB}{\textsc{Matlab}\xspace}
\newcommand{\dd}{\mathrm{d}}
% \renewcommand{\abstract}{\textbf{\emph{Resumen}} -- }
% \renewcommand\appendixname{Anexos}
\setlength{\parskip}{1mm}%
\newcommand{\reynolds}{\mathrm{Re}}
% Matlab code
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}
\makeatletter
\long\def@makecaption#1#2{\ifx@captype%
\footnotesize{\normalfont\footnotesize #1}\
{\normalfont\footnotesize\scshape #2}%
@IEEEtablecaptionsepspace
\else
@IEEEfigurecaptionsepspace
\setbox@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ #2}%
\ifdim \wd@tempboxa >\hsize%
\setbox@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ }%
\parbox[t]{\hsize}{\normalfont\footnotesize \noindent\unhbox@tempboxa#2}%
\else
\hbox to\hsize{\normalfont\footnotesize\hfil\box@tempboxa\hfil}\fi\fi}
\makeatother
\usepackage{etoolbox}
\apptocmd{\sloppy}{\hbadness 10000\relax}{}{}
\usepackage{pdfpages}
\usepackage{multicol}
\begin{document}
% \onecolumn
\maketitle
\section{Introduction}
The following report analyzes the mission \textbf{New Horizons} mission to Pluto and its insights. This report is based on the experience from Dr. Alan Stern, principal investigator of the New Horizons mission and the Chief Scientist at Moon Express \cite{stern2018chasing}.
NASA's New Horizons spacecraft is the first spacecraft to explore Pluto up close, flying by the dwarf planet and its moons on July 14, 2015. In early 2019, New Horizons flew past its second major science target—2014 MU69, the most distant object ever explored up close \cite{nasa_new_horizons}.
\begin{center}
\begin{multicols}{2}
\begin{table}[H]
\resizebox{\textwidth}{!}{%
\centering
\begin{tabular}{|c|c|}
\hline
Nation & United States of America (USA) \ \hline
Objective(s) & Pluto Flyby, Kuiper Belt Object Flyby \ \hline
Spacecraft & New Horizons \ \hline
Spacecraft Mass & 1,054 pounds (478 kilograms) \ \hline
Mission Design and Management & NASA / Johns Hopkins University Applied Physics Laboratory (APL) \ \hline
Launch Vehicle & Atlas V 551 (AV-010) \ \hline
Launch Date and Time & Jan. 19, 2006 / 19:00:00 UT \ \hline
Launch Site & Cape Canaveral, Fla. / Launch Complex 41 \ \hline
Scientific Instruments & \begin{tabular}[c]{@{}l@{}}Ralph-Visible and Infrared Imager/Spectrometer\ Alice-Ultraviolet Imaging Spectrometer\ Radio-Science Experiment (REX)\ Long-Range Reconnaissance Imager (LORRI)\ Solar Wind and Plasma Spectrometer (SWAP)\ Pluto Energetic Particle Spectrometer Science Investigation (PEPSSI)\ Student Dust Counter (SDC)\end{tabular} \ \hline
\end{tabular}
}
\captionsetup{justification=centering}
\caption{New Horizons mission characteristics. Source: \cite{nasa_new_horizons}.}
\label{tab:my-table}
\end{table}
\end{multicols}
\end{center}




\begin{table*}...\end{table*}. Table will appear on the top of the next page from point of insertion to document. – Zarko May 24 '21 at 17:40\usepackage{stfloats}to get the table at the bottom of the page with\twocolumn. But it looks like the table is too wide, so to avoid the overfull box you should make it narrower. Restructure or use a smaller font. – Pieter van Oostrum May 24 '21 at 17:49\begin{table*}but it does not seem to be working. I have added the small document code for a clearer explatnation. – Yi Qiang Ji May 24 '21 at 18:19\usepackage{stfloats}. The document is still the same. – Yi Qiang Ji May 24 '21 at 18:20\twocolumnbutmulticols.stfloatsworks with\twocolumn. – Pieter van Oostrum May 24 '21 at 19:05\twocolumn, therefore the table will be typeset in a half-pagewidth column (giving the overfull box) and the caption is typeset cantered in that column, not centred in the full page width. – Pieter van Oostrum May 24 '21 at 19:18multicolsin a single column of a twocolumn document isn't a good idea either (you will get two quarter-columns). – Pieter van Oostrum May 24 '21 at 19:22