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:
Best Answer
You don't need the
multicols
package in order to insert two tabulars side-by-side. Just place them in the sametable
environment as shown in the following MWE:Here are two more compact alternatives using no vertical and almost no horizontal lines: