【LaTeX】表格并排排版

标签:
latex表格并排排版杂谈 |
分类: TeX |
表格的并列排版有几种形式,包括统一标题,多标题,子标题+总标题的,这里介绍前两个的实现方式.
代码:
_________________________________________________________________________________________
\documentclass{article}
\usepackage{ctex}
\usepackage{times}
\usepackage{graphicx,floatrow}
\usepackage[labelfont=bf,labelsep=quad]{caption}
\DeclareCaptionFont{kai}{\kaishu}
\captionsetup{textfont=kai}
\begin{document}
\begin{table}[htp]
\ttabbox{\caption{各种无线与网络数据比较}}{
\centering
\begin{minipage}{0.45\textwidth}
\begin{tabular}{|c|c|c|}\hline
规范 & 频率 & 速率 \\\hline
802.11 & 2.4GHz & 2Mbps \\\hline
802.11a & 5GHz & 54Mbps \\\hline
802.11b & 2.4GHz & 11Mbps \\\hline
\end{tabular}
\end{minipage}
\hfil
\begin{minipage}{0.45\textwidth}
\begin{tabular}{|c|c|c|c|}
~ & 802.11b
& 蓝牙 & HomeRF
频率 & 2.4GHZ & 2.4GHZ & 2.4GHZ \\\hline
范围 & 100M &
10M & 50M
\end{tabular}
\end{minipage}}
\end{table}
\rule{\textwidth}{1pt}
\begin{table}[htp]
\floatsetup{floatrowsep=qquad,captionskip=5pt} \tabcolsep=9pt
\begin{floatrow}
\ttabbox{\caption{各种无线}}{%
\begin{tabular}{|c|c|c|}\hline
规范 & 频率 & 速率 \\\hline
802.11 & 2.4GHz & 2Mbps \\\hline
802.11a & 5GHz & 54Mbps \\\hline
802.11b & 2.4GHz & 11Mbps \\\hline
\end{tabular}}
\ttabbox{\caption{网络数据比较}}{%
\begin{tabular}{|c|c|c|c|}\hline
~ & 802.11b & 蓝牙 & HomeRF \\\hline
频率 & 2.4GHZ & 2.4GHZ & 2.4GHZ \\\hline
范围 & 100M & 10M & 50M \\\hline
\end{tabular}}
\end{floatrow}
\end{table}
\end{document}
_________________________________________________________________________________________
效果图如下:
http://s8/mw690/630306a5td1b94582ef97&690