您的位置:首页 > 其它

Latex三个表格并列排版

2017-12-03 21:30 459 查看

LaTex实现三个表格并列排版

  刚接触LaTeX排版不久,表格排版一直在摸索中前进,代码中可能还存在冗余或者其他问题,欢迎大家指正我的错误.

代码:

\begin{table*}[!htp]
\floatsetup{floatrowsep=qquad,captionskip=10pt} \tabcolsep=8pt
\begin{floatrow}
\begin{minipage}{0.3\linewidth}
\centering
\renewcommand\arraystretch{1.112}
\ttabbox{\caption{Basic feature}}{%
\begin{tabular}[t]{|c|c|c|c|}
\hline
% \begin{minipage}{1cm}\vspace{1mm} \centering Type\vspace{1mm} \end{minipage}
Type & Kenel & stride & Output
\\
\hline
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
* & * & * & * \\
\hline
\end{tabular}}
\end{minipage}

\begin{minipage}{0.33\linewidth}
\centering
\renewcommand\arraystretch{1.53}
\floatsetup{floatrowsep=qquad,captionskip=8pt}
\begin{floatrow}
\ttabbox{\caption{Rough Classifier}}{%
\begin{tabular}[t]{|c|c|c|c|}
\hline
Type & Kenel & stride & Output
\\
\hline
* & * & * & * \\
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
\hline
\end{tabular}}
\end{floatrow}
\end{minipage}

\begin{minipage}{0.33\linewidth}
\centering
\renewcommand\arraystretch{2.03}
\ttabbox{\caption{Decolorization Network}}{%
\begin{tabular}[t]{|c|c|c|c|}
\hline
Type & Kenel & stride & Output
\\
\hline
* & * & * & * \\
\hline
* & * & * & * \\
\hline
* & * & * & * \\
\hline
* & * & * & * \\
\hline
* & * & * & * \\
\hline
\end{tabular}}
\end{minipage}
\end{floatrow}
\end{table*}


效果如下:



说明:

\begin{table*}[!htp]
*代表表格要占整个版面
\floatsetup{floatrowsep=qquad,captionskip=10pt} \tabcolsep=8pt
\begin{floatrow}
设置浮动格式,captionskip:表头与表格间距 tabcolsep:整体表格列的宽度
\begin{minipage}{0.3\linewidth}
设置第一个表格,使用minipage格式,{ }内为表格宽度设置
\centering
居中
\renewcommand\arraystretch{1.112}
第一个表格中每个单元格的高度设置(需要根据三个表格的整体高度和每个表格的行数计算每行的高度)
\ttabbox{\caption{Basic feature}}{%
第一个表格的表头
\begin{tabular}[t]{|c|c|c|c|}
第一个表格表格体
\hline
显示横线
此条注释掉了,这条语句的作用是单独设置每行的高度
Type & Kenel & stride & Output \\
第一行的内容,后面的语句作用都同此条
\hline
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
* & * & * & * \\
\hline
* & * & * & * \\
* & * & * & * \\
* & * & * & * \\
\hline
\end{tabular}}
\end{minipage}
第一个表格的设置完成
第二三个表格的设置同上
\end{floatrow}
\end{table*}

scalebox{0.9}{} 设置表格的大小,但是不能实现很好的对齐
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  latex