我想比较两种类型的网络。
我有4个比较点。
我应该如何创建一个包含两列表格的表格,使两个网络的 4 个点都对齐?
答案1
\documentclass[border=3pt]{standalone}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ccc}\toprule
&Network A & Network B\\\midrule
Signal &Strong & Weak\\
Noise &Low & High\\
Cost &High & Low\\
Capacity &Medium & High\\\bottomrule
\end{tabular}
\end{document}
编辑:
在输入文件中,通常执行以下操作使表格水平居中,
\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{lipsum}% for getting dummy texts
\begin{document}
\lipsum[1]
Some text goes here\ldots
\begin{table}
\centering
\begin{longtable}{lm{\dimexpr\linewidth/3\relax}c}\toprule
&Network A & Network B\\\midrule
Signal &Strong & Weak\\
Noise &Low & High\\
Cost &\lipsum[1] & Low\\
Capacity &Medium & High\\\bottomrule
\end{longtable}
\caption{Network A versus Network B}
\label{table:Comparison-A-vs-B}
\end{table}
\lipsum[2]Another text goes here\ldots
\end{document}