Last active
November 20, 2022 23:14
-
-
Save kevin-deyoungster/3e716b8eba5962a4f46d369b4d6b3036 to your computer and use it in GitHub Desktop.
Two-column wide table in LaTeX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[twocolumn]{article} | |
\usepackage{lipsum} | |
\usepackage{adjustbox} | |
\begin{document} | |
\lipsum[1-5] % To create a random first page | |
\begin{table}[ht] | |
\centering | |
\begin{tabular}{|l|l|l|l|l|l|l|l|} | |
\hline | |
\textbf{Heading 1} & \textbf{Heading 2} & \textbf{Heading 3} & \textbf{Heading 4} & \textbf{Heading 5} & \textbf{Heading 6} & \textbf{ Heading 7} & \textbf{ Heading 8} \\ | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\end{tabular} | |
\caption{Table 1: In-text Table} | |
\label{tab:1} | |
\end{table} | |
\begin{table*}[ht] | |
\centering | |
\begin{tabular}{ |l|l|l|l|l|l|l|l| } | |
\hline | |
\textbf{Heading 1} & \textbf{Heading 2} & \textbf{Heading 3} & \textbf{Heading 4} & \textbf{Heading 5} & \textbf{Heading 6} & \textbf{ Heading 7} & \textbf{ Heading 8} \\ | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\end{tabular} | |
\caption{Wide Table} | |
\label{tab:1} | |
\end{table*} | |
\begin{table*}[ht] | |
\caption{Table 3} | |
\centering | |
\resizebox{\linewidth}{!}{ | |
\begin{tabular}{ |l|l|l|l|l|l|l|l| } | |
\hline | |
\textbf{Heading 1} & \textbf{Heading 2} & \textbf{Heading 3} & \textbf{Heading 4} & \textbf{Heading 5} & \textbf{Heading 6} & \textbf{ Heading 7} & \textbf{ Heading 8} \\ | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\hline | |
This is section 1 & This is section 2 & This is section 3 & This is section 4 & This is section 5 & This is section 6 & This is section 7 & This is section 8 \\ | |
\hline | |
\end{tabular} | |
} | |
\end{table*} | |
\lipsum[1-6] | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment