latex 複雜表格(多行多列)的製作
%多行或多列合併的情況
%(1)多行合併程式碼如下
\documentclass{article}
\usepackage{multirow} %使用multirow必須載入該package
\begin{document}
\begin{table}[tbp]
\centering
\begin{tabular}{|ccccc|ccccc|}
\hline
Case & Structural \ State & Damage\ Location & Damage \ extent & Excitation \ Level(V)
\\ \hline % \hline 在該行下面畫一整條橫線
32 & \multirow{6}{*}{DamagedStates (DS3)} & 1C and 3A & DB0 & 2 \\ % * 表示由系統自動調整文字
33 & & 1C and 3A & DB0 & 5 \\
34 & & 1C and 3A & DB0 & 8 \\
35 & & 1C and 3A & DBB & 2 \\
36 & & 1C and 3A & DBB & 5 \\
37 & & 1C and 3A & DBB & 8 \\
\hline
\end{tabular}
\caption{List of unknown states}
\end{table}
% (2)多行多列同時合併
\begin{table}
\begin{tabular}{|c|c|c|c|c|}
\hline \hline
\multirow{2}{*}{multi-rows} &
\multicolumn{2}{|c|}{multi-columns} &
\multicolumn{2}{|c|}{\multirow{2}{*}{multi-rowand col}} \\
\cline{2-3} % \cline用於畫橫線\cline{i-j}表示從第i列畫到第
& column-1 & column-2 &\multicolumn{2}{|c|}{} \\
\hline
label-1 & label-2 & label-3 &label-4 & label-5 \\
\hline
\end{tabular}
\end{table}
% (3)表格中的對齊和寬度控制
\begin{tabular}{|c|p{0.35\textwidth}|p{0.35\textwidth}|}
\hline
& \centering{\textsf{AVANTAGES}} &\centering{\textsf{INCONVENIENTS}} \tabularnewline
\hline
\textbf{Rayleigh} & -aaaaa1aa & -aaa2aaaa \\
& -aaaa3aaa & -aaaa4aaa\\
\hline
\textbf{Rice} & -RRRRR1RR & -RRRRR2RR \\
&-RRR3RRRR&\\
&-RRRR4RRR &\\
\hline
\textbf{Okumura-Hata}&-OOOOO1OOO&-OOOO2OOOO\\
&&-OOOO3OOOO\\
\hline
\textbf{Weibull}&-WWWWW1WWWWW & -WWWW2WWWWWW\\
&-WWWWWW3WWWW&-WWWWW4WWWWW\\
\hline
\end{tabular}
\end{document}
原文出處:http://blog.sina.com.cn/s/blog_57235cc70100jnqu.html