Latex排版——复杂表格制作.docLatex 排版——复杂表格制作 %多行或多列合并的情况 %(1)多行合并代码如下
\documentclass{article}
\usepackage{multirow} % 使用 multirow 必须加载该 package \begin{document}
\begin{table}[tbp]
\centering \begin{tabular}{|ccccc|ccccc|}
\hline
\ Level(V)
表示由系
Case & Structural \ State & Damage\ Location & Damage\ extent & Excitation \\ \hline % \hline 在该行下面画一整条横线
& \multirow{6}{*}{Damaged States (DS3)} & 1C and 3A & DB0 & 2 \\ % * 统自动调整文字
& & 1C and 3A & DB0 & 5 \\
& & 1C and 3A & DB0 & 8 \\
& & 1C and 3A & DBB & 2 \\
& & 1C and 3A & DBB & 5 \\
& & 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-row and col}} \\
\cline{2-3} % \cline 用于画横线 \cline{i-j} 表示从第 i 列画到第 j 列 & column-1 & column-2 & \multicolumn{2}{|c|}{} \\
\hline label-1 & label-2 & label-3 & label-4 & label-5 \\
\hli ne
\en d{tabular}
\en d{table}
% (3)表格中的对齐和宽度控制
\begi n{tabular}{|c|p{\textwidth}|p{\textwidth}|}
\hli ne
& \cen teri ng{\textsf{AVANTAGES}} & \cen teri ng{\textsf{INCONVENIENTS}}
\tabular newli ne
\hli ne
\textbf{Rayleigh} & -aaaaa1aa & -aaa2aaaa \\
& -aaaa3aaa & -aaaa4aaa\\
\hli ne
\textbf{Rice} & -RRRRR1RR & -RRRRR2RR \\
& -RRR3RRRR &\\
& -RRRR4RRR &\\
\hli ne
\textbf{Okumu
Latex排版——复杂表格制作 来自淘豆网www.taodocs.com转载请标明出处.