一页上有多个表格

一页上有多个表格

我的文档中有 8 个表格。我想将它们显示在一页上。我使用的是 2 列 ACM 格式。但是,现在它们自动放置在第 3 列(左列)和第 5 列(右列)。我该如何放置第 4 列和第 4 列?

答案1

你可以尝试下面的代码:

\hbox to\hsize{%
   \vtop{\hrule height0pt
         ... table 1 ...
         ... table 2 ...
         ... table 3 ...
         ... table 4 ...        
   }\hss     
   \vtop{\hrule height0pt 
         ... table 5 ...
         ... table 6 ...
         ... table 7 ...
         ... table 8 ...
   }%  
}

我认为每个表都是一个单独的盒子(如何创建并不重要)。

答案2

我的建议是使用一个table*可以使用任意数量字幕的环境。

\documentclass{sig-alternate-2013} % or other ACM template

\usepackage{lipsum} % just for the example, provides filler nonsense text

\begin{document}

\title{A paper}
\author{A. Uthor}
\maketitle

\lipsum

\begin{table*}
\centering
\begin{minipage}[t]{\columnwidth}
\caption{First of eight} \label{tab:1}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[t]{\columnwidth}
\caption{Second of eight} \label{tab:2}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}

\bigskip

\begin{minipage}[t]{\columnwidth}
\caption{Third of eight} \label{tab:3}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[t]{\columnwidth}
\caption{Fourth of eight} \label{tab:4}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}

\bigskip

\begin{minipage}[t]{\columnwidth}
\caption{Fifth of eight} \label{tab:5}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[t]{\columnwidth}
\caption{Sixth of eight} \label{tab:6}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}

\bigskip

\begin{minipage}[t]{\columnwidth}
\caption{Seventh of eight} \label{tab:7}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[t]{\columnwidth}
\caption{Eighth of eight} \label{tab:8}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{minipage}

\end{table*}

\lipsum

\end{document}

在此处输入图片描述

答案3

我了解到您目前有八个独立的table环境,每个环境只包含一个tabular环境(加上\caption\label)。为了利用 LaTeX 不会破坏跨页面浮动的事实,您可以只创建两个table环境,每个环境包含 tabular环境(加上相关的\captions 和\labels)。

在此处输入图片描述

\documentclass[twocolumn]{article}
\usepackage[textheight=3in]{geometry} % just for this example
\usepackage[skip=3pt]{caption}
\begin{document}
\begin{table}[t!]
\caption{First of eight} \label{tab:1}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}

\bigskip
\caption{Second of eight} \label{tab:2}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}

\bigskip
\caption{Third of eight} \label{tab:3}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}

\bigskip
\caption{Fourth of eight} \label{tab:4}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{table}

\begin{table}[t!]
\caption{Fifth of eight} \label{tab:5}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}

\bigskip
\caption{Sixth of eight} \label{tab:6}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}

\bigskip
\caption{Seventh of eight} \label{tab:7}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}

\bigskip
\caption{Eighth of eight} \label{tab:8}
\centering 
\begin{tabular}{ll}
\hline a & b \\ \hline
\end{tabular}
\end{table}

\end{document}

相关内容