Split table in two columns in a one-column page

tablestwo-column

I have a one-column document and I need to insert a long table, but splitting it in two columns, instead of two pages, will be ideal.

Code I have is something like this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multicol}

\title{table thing}
\author{Hello its me }
\date{August 2021}

\begin{document}

\maketitle

\section{Introduction}

En la tabla aparecen los tiempos de llegada que hemos marcado en cada uno de los sismogramas de las $46$ estaciones sísmicas. Es el tiempo en segundos que ha transcurrido desde el tiempo de referencia, las 21:00:00 TU.

\begin{table}[h]
\begin{multicols}{2}
\begin{tabular}{|c|c|}
\hline
Código & Tiempo de llegada (s) \\ \hline
AAPN   & 169.3791              \\ \hline
ASMO   & 180.0079              \\ \hline
AETJ   & 216.6242              \\ \hline
EGOR   & 227.7094              \\ \hline
ALOJ   & 228.5108              \\ \hline
ACHM   & 236.3866              \\ \hline
ACRT   & 240.2917              \\ \hline
TRAD   & 242.6380              \\ \hline
EQTA   & 260.6594              \\ \hline
AFUE   & 267.1890              \\ \hline
APHE   & 288.7700              \\ \hline
ATEJ   & 289.8782              \\ \hline
TP22   & 304.9366              \\ \hline
TP23   & 309.8231              \\ \hline
TP21   & 310.7250              \\ \hline
TP26   & 312.9834              \\ \hline
TP20   & 313.5088              \\ \hline
TP27   & 313.9672              \\ \hline
TP25   & 314.2669              \\ \hline
TP19   & 314.3993              \\ \hline
TP24   & 314.4281              \\ \hline
TP28   & 316.5177              \\ \hline
TP29   & 317.6365              \\ \hline
\end{tabular}
\end{multicols}
\end{table}

\begin{table}[h]
\begin{twocolumn}
\begin{tabular}{|c|c|}
\hline
Código & Tiempo de llegada (s) \\ \hline
TP18   & 317.9740              \\ \hline
ELGU   & 318.5889              \\ \hline
TP30   & 319.1090              \\ \hline
GORA   & 319.5163              \\ \hline
JAND   & 319.8820              \\ \hline
TP17   & 320.6615              \\ \hline
TP16   & 324.0117              \\ \hline
TP15   & 325.8222              \\ \hline
TP14   & 326.6485              \\ \hline
TP13   & 330.4646              \\ \hline
TP11   & 332.3641              \\ \hline
TP10   & 335.6681              \\ \hline
EQES   & 336.2331              \\ \hline
TP09   & 340.3243              \\ \hline
TP08   & 343.0693              \\ \hline
TP07   & 346.6949              \\ \hline
TP06   & 352.2083              \\ \hline
TP05   & 356.5254              \\ \hline
TP04   & 360.7000              \\ \hline
TP03   & 367.8986              \\ \hline
TP02   & 371.2882              \\ \hline
TP01   & 379.8459              \\ \hline
EBER   & 417.4934              \\ \hline
\end{tabular}
\end{twocolumn}
\end{table}

\end{document}

But here is what happens:

enter image description here

Best Answer

You don't need the multicols package in order to insert two tabulars side-by-side. Just place them in the same table environment as shown in the following MWE:

enter image description here

\documentclass{article}

\title{table thing}
\author{Hello its me }
\date{August 2021}

\begin{document}

\maketitle

\section{Introduction}

En la tabla aparecen los tiempos de llegada que hemos marcado en cada uno de los sismogramas de las $46$ estaciones sísmicas. Es el tiempo en segundos que ha transcurrido desde el tiempo de referencia, las 21:00:00 TU.

\begin{table}[htbp]
\begin{tabular}[t]{|c|c|}
\hline
Código & Tiempo de llegada (s) \\ \hline
AAPN   & 169.3791              \\ \hline
ASMO   & 180.0079              \\ \hline
AETJ   & 216.6242              \\ \hline
EGOR   & 227.7094              \\ \hline
ALOJ   & 228.5108              \\ \hline
ACHM   & 236.3866              \\ \hline
ACRT   & 240.2917              \\ \hline
TRAD   & 242.6380              \\ \hline
EQTA   & 260.6594              \\ \hline
AFUE   & 267.1890              \\ \hline
APHE   & 288.7700              \\ \hline
ATEJ   & 289.8782              \\ \hline
TP22   & 304.9366              \\ \hline
TP23   & 309.8231              \\ \hline
TP21   & 310.7250              \\ \hline
TP26   & 312.9834              \\ \hline
TP20   & 313.5088              \\ \hline
TP27   & 313.9672              \\ \hline
TP25   & 314.2669              \\ \hline
TP19   & 314.3993              \\ \hline
TP24   & 314.4281              \\ \hline
TP28   & 316.5177              \\ \hline
TP29   & 317.6365              \\ \hline
\end{tabular}
\hfill
\begin{tabular}[t]{|c|c|}
\hline
Código & Tiempo de llegada (s) \\ \hline
TP18   & 317.9740              \\ \hline
ELGU   & 318.5889              \\ \hline
TP30   & 319.1090              \\ \hline
GORA   & 319.5163              \\ \hline
JAND   & 319.8820              \\ \hline
TP17   & 320.6615              \\ \hline
TP16   & 324.0117              \\ \hline
TP15   & 325.8222              \\ \hline
TP14   & 326.6485              \\ \hline
TP13   & 330.4646              \\ \hline
TP11   & 332.3641              \\ \hline
TP10   & 335.6681              \\ \hline
EQES   & 336.2331              \\ \hline
TP09   & 340.3243              \\ \hline
TP08   & 343.0693              \\ \hline
TP07   & 346.6949              \\ \hline
TP06   & 352.2083              \\ \hline
TP05   & 356.5254              \\ \hline
TP04   & 360.7000              \\ \hline
TP03   & 367.8986              \\ \hline
TP02   & 371.2882              \\ \hline
TP01   & 379.8459              \\ \hline
EBER   & 417.4934              \\ \hline
\end{tabular}
\end{table}

\end{document}

Here are two more compact alternatives using no vertical and almost no horizontal lines:

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multicol}

\title{table thing}
\author{Hello its me }
\date{August 2021}


\usepackage{booktabs}
\usepackage{makecell}
\begin{document}

\maketitle

\section{Introduction}

En la tabla aparecen los tiempos de llegada que hemos marcado en cada uno de los sismogramas de las $46$ estaciones sísmicas. Es el tiempo en segundos que ha transcurrido desde el tiempo de referencia, las 21:00:00 TU.

\begin{table}[htbp]
\begin{tabular}[t]{lc}
\toprule
\thead{Código} & \thead{Tiempo de\\ llegada (s)} \\
\midrule
AAPN   & 169.3791              \\ 
ASMO   & 180.0079              \\ 
AETJ   & 216.6242              \\ 
EGOR   & 227.7094              \\ \addlinespace  
ALOJ   & 228.5108              \\
ACHM   & 236.3866              \\ 
ACRT   & 240.2917              \\ 
TRAD   & 242.6380              \\  \addlinespace  
EQTA   & 260.6594              \\ 
AFUE   & 267.1890              \\ 
APHE   & 288.7700              \\ 
ATEJ   & 289.8782              \\ \addlinespace 
TP22   & 304.9366              \\ 
TP23   & 309.8231              \\ 
TP21   & 310.7250              \\ 
TP26   & 312.9834              \\
\bottomrule
\end{tabular}
\hfill
\begin{tabular}[t]{lc}
\toprule
\thead{Código} & \thead{Tiempo de\\ llegada (s)} \\
\midrule 
TP20   & 313.5088              \\ 
TP27   & 313.9672              \\ 
TP25   & 314.2669              \\ 
TP19   & 314.3993              \\ \addlinespace  
TP24   & 314.4281              \\ 
TP28   & 316.5177              \\ 
TP29   & 317.6365              \\ 
TP18   & 317.9740              \\ \addlinespace 
ELGU   & 318.5889              \\ 
TP30   & 319.1090              \\ 
GORA   & 319.5163              \\ 
JAND   & 319.8820              \\ \addlinespace  
TP17   & 320.6615              \\ 
TP16   & 324.0117              \\ 
TP15   & 325.8222              \\ 
TP14   & 326.6485              \\
\bottomrule
\end{tabular}
\hfill
\begin{tabular}[t]{lc}
\toprule
\thead{Código} & \thead{Tiempo de\\ llegada (s)} \\
\midrule 
TP13   & 330.4646              \\ 
TP11   & 332.3641              \\ 
TP10   & 335.6681              \\ 
EQES   & 336.2331              \\ \addlinespace  
TP09   & 340.3243              \\ 
TP08   & 343.0693              \\ 
TP07   & 346.6949              \\ 
TP06   & 352.2083              \\ \addlinespace  
TP05   & 356.5254              \\ 
TP04   & 360.7000              \\ 
TP03   & 367.8986              \\ 
TP02   & 371.2882              \\ \addlinespace  
TP01   & 379.8459              \\ 
EBER   & 417.4934              \\
\bottomrule 
\end{tabular}
\end{table}


\begin{table}[htbp]
\setlength{\tabcolsep}{5pt}
\begin{tabular}[t]{@{}*{4}{lc}@{}}
\toprule
\thead{Código} & \thead{Tiempo de\\ llegada (s)} 
& \thead{Código} & \thead{Tiempo de\\ llegada (s)} 
& \thead{Código} & \thead{Tiempo de\\ llegada (s)} 
& \thead{Código} & \thead{Tiempo de\\ llegada (s)} \\
\cmidrule(lr){1-2} \cmidrule(lr){3-4} \cmidrule(lr){5-6} \cmidrule(lr){7-8}
AAPN   & 169.3791 & TP22   & 304.9366 & ELGU   & 318.5889 & TP09   & 340.3243 \\ 
ASMO   & 180.0079 & TP23   & 309.8231 & TP30   & 319.1090 & TP08   & 343.0693 \\ 
AETJ   & 216.6242 & TP21   & 310.7250 & GORA   & 319.5163 & TP07   & 346.6949 \\ 
EGOR   & 227.7094 & TP26   & 312.9834 & JAND   & 319.8820 & TP06   & 352.2083 \\ \addlinespace 
ALOJ   & 228.5108 & TP20   & 313.5088 & TP17   & 320.6615 & TP05   & 356.5254 \\ 
ACHM   & 236.3866 & TP27   & 313.9672 & TP16   & 324.0117 & TP04   & 360.7000 \\ 
ACRT   & 240.2917 & TP25   & 314.2669 & TP15   & 325.8222 & TP03   & 367.8986 \\ 
TRAD   & 242.6380 & TP19   & 314.3993 & TP14   & 326.6485 & TP02   & 371.2882 \\ \addlinespace 
EQTA   & 260.6594 & TP24   & 314.4281 & TP13   & 330.4646 & TP01   & 379.8459 \\ 
AFUE   & 267.1890 & TP28   & 316.5177 & TP11   & 332.3641 & EBER   & 417.4934 \\ 
APHE   & 288.7700 & TP29   & 317.6365 & TP10   & 335.6681 &                   \\
ATEJ   & 289.8782 & TP18   & 317.9740 & EQES   & 336.2331 &                   \\
\bottomrule 
\end{tabular}
\end{table}

\end{document}