需要将所有三个表格放在一个页面中

需要将所有三个表格放在一个页面中

我被要求将所有三个表格放在一个页面中。作为初学者,我没有足够的专业知识来做到这一点。在 MS Word 中,我可以并排放置三个文本框,但在这里我不知道该怎么做。如果需要,我们可以减少行数(记录)以使它们相同。请帮忙。

\documentclass{llncs}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[backend=biber, style=numeric, sorting=none]{biblatex}
\usepackage{csquotes}
\usepackage[section]{placeins}
%Important
% Math packages
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
%Table packages
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{makecell}
\usepackage[misc]{ifsym}
% Title
\title{Problem with table settings}
\author{Some author}
\date{Drafted:\today}
% The correct dates will be entered by the editor
\begin{document}
\maketitle
\section{Design and implementation}\label{Design and implementation}
% For tables use
\begin{table}[!htb]
% table caption is above the table
\caption{Calculation of individual node stability}
\label{tab:1}       % Give a unique label
% For LaTeX tables use
\begin{center}
\begin{tabular}{c| c c c c}
\toprule
\thead{Node} &\thead{ \% of energy} & \thead{Activeness}& \thead{Mobility}& \thead{Stability}\\
\midrule\\
\textbf{A} & 95 & 0.9 &0.01 &0.429\\
\addlinespace
\textbf{B} & 58 & 0.7 &0.05 &0.317\\
\addlinespace
\textbf{C} & 66 & 0.7 &0.03 &0.323\\
\addlinespace
\textbf{D} & 72 & 0.7 &0.25 &0.257\\
\addlinespace
\textbf{E} & 65 & 0.7 &0.40 &0.212\\
\addlinespace
\textbf{F} & 86 & 0.9 &0.02 &0.426\\
\addlinespace
\textbf{G} & 55 & 0.7 &0.03 &0.323\\
\addlinespace
\textbf{H} & 62 & 0.7 &0.05 &0.317\\
\addlinespace
\textbf{I} & 73 & 0.7 &0.02 &0.326\\
\addlinespace
\textbf{J} & 90 & 0.9 &0.01 &0.429\\
\addlinespace
\noalign{\smallskip}\hline
\end{tabular}
\end{center}
\end{table}
% For tables use
\begin{table}[!htb]
% table caption is above the table
\caption{Determination of immediate neighbours}
\label{tab:2}       % Give a unique label
% For LaTeX tables use
\begin{center}
\begin{tabular}{c c c c c}
\toprule
\thead{Node} &\thead{Immediate neighbours} & \thead{ }& \thead{ }& \thead{ }\\
\midrule\\
\textbf{A} & C & D & E & H\\
\addlinespace
\textbf{B} & D &  &  & \\
\addlinespace
\textbf{C} & A & E & G & \\
\addlinespace
\textbf{D} & A & B &  & \\
\addlinespace
\textbf{E} & A & C & F & G\\
\addlinespace
\textbf{F} & E & H & I & J\\
\addlinespace
\textbf{G} & C & E & I & \\
\addlinespace
\textbf{H} & A & F & J & \\
\addlinespace
\textbf{I} & F & G & J & \\
\addlinespace
\textbf{J} & F & H & I & \\
\addlinespace
\noalign{\smallskip}\hline
\end{tabular}
\end{center}
\end{table}

%Table 3
\begin{table}[!htb]
% table caption is above the table
\caption{Determination of link stability}
\label{tab:3}       % Give a unique label
% For LaTeX tables use
\begin{center}
\begin{tabular}{c c}
\toprule
\thead{Node pair} &\thead{Calculated stability}\\
\midrule\\
\textbf{(A,H)} & 0.37 \\
\addlinespace
\textbf{(A,E)} & 0.32 \\
\addlinespace
\textbf{(A,D)} & 0.34 \\
\addlinespace
\textbf{(A,C)} & 0.38 \\
\addlinespace
\textbf{(B,D)} & 0.29 \\
\addlinespace
\textbf{(C,G)} & 0.32 \\
\addlinespace
\textbf{(C,E)} & 0.27 \\
\addlinespace
\textbf{(E,F)} & 0.32 \\
\addlinespace
\textbf{(E,G)} & 0.27 \\
\addlinespace
\textbf{(F,H)} & 0.37 \\
\addlinespace
\textbf{(F,I)} & 0.38 \\
\addlinespace
\textbf{(F,J)} & 0.43 \\
\addlinespace
\textbf{(G,I)} & 0.32 \\
\addlinespace
\textbf{(H,J)} & 0.37 \\
\addlinespace
\textbf{(I,J)} & 0.38 \\
\addlinespace
\noalign{\smallskip}\hline
\end{tabular}
\end{center}
\end{table}

\end{document} 

类文件可以从以下位置下载文档类

答案1

可能类似下面的内容可以帮助您入门:

在此处输入图片描述

\documentclass{llncs}

\usepackage{booktabs}
\usepackage{makecell}

\begin{document}
\maketitle
\section{Design and implementation}\label{Design and implementation}

\begin{table}
\centering
\begin{minipage}[t]{0.425\linewidth}
\caption{Calculation of individual node stability}
\label{tab:1}
\centering
\begin{tabular}{c c c c c}
\toprule
\thead{Node} &\thead{ \% of\\ energy} & \thead{Activeness}& \thead{Mobility}& \thead{Stability}\\
\midrule
\textbf{A} & 95 & 0.9 &0.01 &0.429\\
\textbf{B} & 58 & 0.7 &0.05 &0.317\\
\textbf{C} & 66 & 0.7 &0.03 &0.323\\
\textbf{D} & 72 & 0.7 &0.25 &0.257\\
\textbf{E} & 65 & 0.7 &0.40 &0.212\\ \addlinespace
\textbf{F} & 86 & 0.9 &0.02 &0.426\\
\textbf{G} & 55 & 0.7 &0.03 &0.323\\
\textbf{H} & 62 & 0.7 &0.05 &0.317\\
\textbf{I} & 73 & 0.7 &0.02 &0.326\\
\textbf{J} & 90 & 0.9 &0.01 &0.429\\
\bottomrule
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\linewidth}
\caption{Determination of immediate neighbours}
\label{tab:2}
\centering
\begin{tabular}{c *{4}{wc{1.25em}}}
\toprule
\thead{Node} & \multicolumn{4}{c}{\thead{Immediate\\ neighbours}}\\
\midrule
\textbf{A} & C & D & E & H\\
\textbf{B} & D &  &  & \\
\textbf{C} & A & E & G & \\
\textbf{D} & A & B &  & \\
\textbf{E} & A & C & F & G\\ \addlinespace
\textbf{F} & E & H & I & J\\
\textbf{G} & C & E & I & \\
\textbf{H} & A & F & J & \\
\textbf{I} & F & G & J & \\
\textbf{J} & F & H & I & \\
\bottomrule
\end{tabular}
\end{minipage}
\bigskip

\caption{Determination of link stability}
\label{tab:3}
\begin{tabular}{*{9}{c}}
\toprule
\thead[l]{Node\\ pair} & \textbf{(A,H)} & \textbf{(A,E)} & \textbf{(A,D)} & \textbf{(A,C)} & \textbf{(B,D)} &  \textbf{(C,G)} & \textbf{(C,E)}  &  \textbf{(E,F)}\\
\thead[l]{Calculated\\ stability} & 0.37 & 0.32 & 0.34 & 0.38 & 0.29 & 0.32 & 0.27 & 0.32 \\ \midrule
\thead[l]{Node\\ pair} & \textbf{(E,G)} & \textbf{(F,H)} & \textbf{(F,I)}  & \textbf{(F,J)} & \textbf{(G,I)} & \textbf{(H,J)} & \textbf{(I,J)}  \\
\thead[l]{Calculated\\ stability} &  0.27 & 0.37 & 0.38 & 0.43 & 0.32 & 0.37 & 0.38 \\
\bottomrule
\end{tabular}
\end{table}
\end{document} 

答案2

您的表格太宽,无法放在一行中,因此在我看来,一个可能的解决方案是将前两个表格放在第一行,将第三个表格放在第二行,但所有表格都在同一个浮点数中table

\documentclass{llncs}
\usepackage[utf8]{inputenc}
\usepackage[center]{caption}

\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[misc]{ifsym}

\usepackage{booktabs, makecell, tabularx}
 
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}

% Title
\title{Problem with table settings}
\author{Some author}
\date{Drafted:\today}

\begin{document}
%\maketitle

\section{Design and implementation}\label{Design and implementation}
% For tables use
    \begin{table}[!ht]
    \setlength\tabcolsep{3pt}
    \small
    \centering
% table caption is above the table
% For LaTeX tables use
\begin{minipage}[b]{0.5\linewidth}
\caption{Calculation of individual node stability}
\label{tab:1}       % Give a unique label
\centering
\begin{tabular}{>{\bfseries}c c c c c}
    \toprule
\thead{Node} &\thead{ \%\\ of energy} & \thead{Activeness} & \thead{Mobility}& \thead{Stability}\\
    \midrule
A & 95 & 0.9 &0.01 &0.429\\
B & 58 & 0.7 &0.05 &0.317\\
C & 66 & 0.7 &0.03 &0.323\\
D & 72 & 0.7 &0.25 &0.257\\
E & 65 & 0.7 &0.40 &0.212\\
F & 86 & 0.9 &0.02 &0.426\\
G & 55 & 0.7 &0.03 &0.323\\
H & 62 & 0.7 &0.05 &0.317\\
I & 73 & 0.7 &0.02 &0.326\\
J & 90 & 0.9 &0.01 &0.429\\
    \bottomrule
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[b]{0.4\linewidth}
\caption{Determination of immediate neighbours}
\label{tab:2}       % Give a unique label
% For LaTeX tables use
\centering
\begin{tabular}{>{\bfseries}c c c c c}
\toprule
\thead{Node} &\thead{Immediate\\ neighbours} &  & &     \\
    \midrule
A & C & D & E & H\\
B & D &  &  & \\
C & A & E & G & \\
D & A & B &  & \\
E & A & C & F & G\\
F & E & H & I & J\\
G & C & E & I & \\
H & A & F & J & \\
I & F & G & J & \\
J & F & H & I & \\
    \bottomrule
\end{tabular}
\end{minipage}


%Table 3
\begin{minipage}[b]{0.4\linewidth}
\caption{Determination of link stability}
\label{tab:3}       % Give a unique label
% For LaTeX tables use
\centering
\begin{tabular}[b]{>{\bfseries}c c}
    \toprule
\thead{Node\\ pair} &\thead{Calculated\\ stability}\\
    \midrule 
(A,H)   & 0.37 \\
(A,E)   & 0.32 \\
(A,D)   & 0.34 \\
(A,C)   & 0.38 \\
(B,D)   & 0.29 \\
(C,G)   & 0.32 \\
(C,E)   & 0.27 \\
(E,F)   & 0.32 \\
(E,G)   & 0.27 \\
(F,H)   & 0.37 \\
(F,I)   & 0.38 \\
(F,J)   & 0.43 \\
(G,I)   & 0.32 \\
(H,J)   & 0.37 \\
(I,J)   & 0.38 \\
    \bottomrule
\end{tabular}
\end{minipage}
\end{table}

\end{document} 

在此处输入图片描述

(红线表示页面布局)

注意,我稍微清理了你的表格代码。

答案3

您可以minipage在单个table环境中使用该环境。但是,由于三个表格无法并排调整而不重叠,因此我使用几何包中的命令减少了特定页面的左右边距newgeometry。此外,我还对列名称进行了一些更改以提高可读性。

\documentclass{llncs}
\usepackage{geometry}
%\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[backend=biber, style=numeric, sorting=none]{biblatex}
\usepackage{csquotes}
\usepackage[section]{placeins}
%Important
% Math packages
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
%Table packages
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{makecell}
\usepackage[misc]{ifsym}
% Title
\title{Problem with table settings}
\author{Some author}
\date{Drafted:\today}
% The correct dates will be entered by the editor
\begin{document}
\maketitle
\newgeometry{left=1.5cm, right=1.5cm} %%%%% addition - to change the margin of the specific page
\section{Design and implementation}\label{Design and implementation}
% For tables use
\begin{table}
% table caption is above the table
\begin{minipage}[t]{0.4\textwidth}
    \caption{Calculation of individual node stability}
    \label{tab:1}       % Give a unique label
    % For LaTeX tables use
    \begin{center}
    \begin{tabular}{c| c c c c}
    \toprule
    \thead{Node} &\thead{ \% of energy} & \thead{Activeness}& \thead{Mobility}& \thead{Stability}\\
    \midrule\\
    \textbf{A} & 95 & 0.9 &0.01 &0.429\\
    \addlinespace
    \textbf{B} & 58 & 0.7 &0.05 &0.317\\
    \addlinespace
    \textbf{C} & 66 & 0.7 &0.03 &0.323\\
    \addlinespace
    \textbf{D} & 72 & 0.7 &0.25 &0.257\\
    \addlinespace
    \textbf{E} & 65 & 0.7 &0.40 &0.212\\
    \addlinespace
    \textbf{F} & 86 & 0.9 &0.02 &0.426\\
    \addlinespace
    \textbf{G} & 55 & 0.7 &0.03 &0.323\\
    \addlinespace
    \textbf{H} & 62 & 0.7 &0.05 &0.317\\
    \addlinespace
    \textbf{I} & 73 & 0.7 &0.02 &0.326\\
    \addlinespace
    \textbf{J} & 90 & 0.9 &0.01 &0.429\\
    \addlinespace
    \noalign{\smallskip}\hline
    \end{tabular}
    \end{center}
\end{minipage}
\hfill %%%% addition
\begin{minipage}[t]{0.35\textwidth}
    \caption{Determination of immediate neighbours}
    \label{tab:2}       % Give a unique label
    % For LaTeX tables use
    \begin{center}
    \setlength{\tabcolsep}{5pt}
    \begin{tabular}{c c c c c}
    \toprule
    \thead{Node} &\multicolumn{4}{c}{\thead{Immediate\\ neighbours}}\\
    \midrule\\
    \textbf{A} & C & D & E & H\\
    \addlinespace
    \textbf{B} & D &  &  & \\
    \addlinespace
    \textbf{C} & A & E & G & \\
    \addlinespace
    \textbf{D} & A & B &  & \\
    \addlinespace
    \textbf{E} & A & C & F & G\\
    \addlinespace
    \textbf{F} & E & H & I & J\\
    \addlinespace
    \textbf{G} & C & E & I & \\
    \addlinespace
    \textbf{H} & A & F & J & \\
    \addlinespace
    \textbf{I} & F & G & J & \\
    \addlinespace
    \textbf{J} & F & H & I & \\
    \addlinespace
    \noalign{\smallskip}\hline
    \end{tabular}
    \end{center}
\end{minipage}
% table caption is above the table
\hfill %%%% addition
\begin{minipage}[t]{0.2\textwidth}
    %Table 3
    % table caption is above the table
    \caption{Determination of link stability}
    \label{tab:3}       % Give a unique label
    % For LaTeX tables use
    \begin{center}
    \begin{tabular}{c c}
    \toprule
    \thead{Node pair} &\thead{Calculated\\ stability}\\
    \midrule\\
    \textbf{(A,H)} & 0.37 \\
    \addlinespace
    \textbf{(A,E)} & 0.32 \\
    \addlinespace
    \textbf{(A,D)} & 0.34 \\
    \addlinespace
    \textbf{(A,C)} & 0.38 \\
    \addlinespace
    \textbf{(B,D)} & 0.29 \\
    \addlinespace
    \textbf{(C,G)} & 0.32 \\
    \addlinespace
    \textbf{(C,E)} & 0.27 \\
    \addlinespace
    \textbf{(E,F)} & 0.32 \\
    \addlinespace
    \textbf{(E,G)} & 0.27 \\
    \addlinespace
    \textbf{(F,H)} & 0.37 \\
    \addlinespace
    \textbf{(F,I)} & 0.38 \\
    \addlinespace
    \textbf{(F,J)} & 0.43 \\
    \addlinespace
    \textbf{(G,I)} & 0.32 \\
    \addlinespace
    \textbf{(H,J)} & 0.37 \\
    \addlinespace
    \textbf{(I,J)} & 0.38 \\
    \addlinespace
    \noalign{\smallskip}\hline
    \end{tabular}
    \end{center}
\end{minipage}
\end{table}
\restoregeometry %%%% addition - restore default margin
\end{document} 

输出为: 输出

希望这会有所帮助。

答案4

我建议使用包获得的略有不同的布局,以及具有 4 列的第三个表格。我还用来自的命令floatrow替换了重复使用的。\addlinespace\makegapedcellsmakecell

 \documentclass{llncs}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{floatrow}
\usepackage{float}
\usepackage[backend=biber, style=numeric, sorting=none]{biblatex}
\usepackage{csquotes}
\usepackage[section]{placeins}
%Important
% Math packages
\usepackage{amssymb}
\usepackage{mathtools}
%Table packages
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{makecell}
\usepackage[misc]{ifsym}
% Title
\title{Problem with table settings}
\author{Some author}
\date{Drafted:\today}
% The correct dates will be entered by the editor

\begin{document}

\maketitle
\section{Design and implementation}\label{Design and implementation}
% For tables use
\begin{table}[!htb]
\setlength{\tabcolsep}{2.5pt}
\setcellgapes{4pt}\makegapedcells
 \centering
 \ttabbox{\caption{Calculation of individual node stability}
 \label{tab:1}}% Give a unique label
 {\begin{tabular}{>{\bfseries}c| c c c c}
 \toprule
 \thead{Node} &\thead{ \% of \\ energy} & \thead{Activeness}& \thead{Mobility}& \thead{Stability}\\
 \midrule\\
 A & 95 & 0.9 &0.01 &0.429\\
 B & 58 & 0.7 &0.05 &0.317\\
 C & 66 & 0.7 &0.03 &0.323\\
 D & 72 & 0.7 &0.25 &0.257\\
 E & 65 & 0.7 &0.40 &0.212\\
 F & 86 & 0.9 &0.02 &0.426\\
 G & 55 & 0.7 &0.03 &0.323\\
 H & 62 & 0.7 &0.05 &0.317\\
 I & 73 & 0.7 &0.02 &0.326\\
 J & 90 & 0.9 &0.01 &0.429\\[\smallskipamount]
 \bottomrule
 \end{tabular}}
\vskip 4ex

\begin{floatrow}
\centering
\floatsetup{floatrowsep=qquad}
\ttabbox{\caption{Determination of immediate neighbours}
\label{tab:2}}% Give a unique label
% For LaTeX tables use
{\begin{tabular}{>{\bfseries}c c c c c}
\toprule
\thead{Node} &\thead{Immediate\\ neighbours} \\
\midrule\\
A & C & D & E & H\\
B & D & & & \\
C & A & E & G & \\
D & A & B & & \\
E & A & C & F & G\\
F & E & H & I & J\\
G & C & E & I & \\
H & A & F & J & \\
I & F & G & J & \\
J & F & H & I & \\[\smallskipamount]
\bottomrule

\end{tabular}}
%Table 3
\ttabbox{%
\caption{Determination of link stability}
\label{tab:3} }% Give a unique label
{\begin{tabular}{>{\bfseries}c c >{\bfseries}c c}
\toprule
\thead{Node pair} &\thead{Calculated\\ stability} & \thead{Node pair} &\thead{Calculated\\ stability} \\
\midrule\\
\textbf{(A,H)} & 0.37 & (E,G) & 0.27 \\
\textbf{(A,E)} & 0.32 & (F,H) & 0.37 \\
\textbf{(A,D)} & 0.34 & (F,I) & 0.38 \\
\textbf{(A,C)} & 0.38 & (F,J) & 0.43 \\
\textbf{(B,D)} & 0.29 & (G,I) & 0.32 \\
\textbf{(C,G)} & 0.32 & (H,J) & 0.37 \\
\textbf{(C,E)} & 0.27 & (I,J) & 0.38 \\
\textbf{(E,F)} & 0.32 \\[\smallskipamount]%
\bottomrule
\end{tabular}}
\end{floatrow}
%
\end{table}

\end{document} 

在此处输入图片描述

相关内容