这是我尝试的代码:
\documentclass[letterpaper]{article}
\usepackage[english]{babel}
\usepackage{color}
\usepackage{array}
\usepackage{supertabular}
\usepackage{hhline}
\begin{document}
\begin{center}
\tablelasttail{}
\begin{supertabular}{m{26.7mm}m{50.53mm}|m{41.66mm}|m{49.01mm}|}
\hline
\multicolumn{1}{|m{26.7mm}|}{{\selectlanguage{english} Main Topic}} &
{\selectlanguage{english} Topic} &
{\selectlanguage{english} Sub Topic} &
{\selectlanguage{english} Publication}\\\hline
\multicolumn{1}{|m{26.7mm}|}{{\selectlanguage{english} A}} &
{\selectlanguage{english} A1} &
~
&
{\selectlanguage{english} 1}\\\hline
&
{\selectlanguage{english} A2} &
~
&
{\selectlanguage{english} 2}\\\hhline{~---}
&
&
&
{\selectlanguage{english} 3}\\\hhline{~~~-}
&
&
&
{\selectlanguage{english} 4}\\\hhline{~~~-}
&
{\selectlanguage{english} A3} &
{\selectlanguage{english} E1} &
{\selectlanguage{english} 5}\\\hhline{~---}
&
&
&
{\selectlanguage{english} 6}\\\hhline{~~~-}
&
&
&
{\selectlanguage{english} 7}\\\hhline{~~~-}
&
&
&
{\selectlanguage{english} 8}\\\hhline{~~~-}
&
&
{\selectlanguage{english} E2} &
{\selectlanguage{english} 9}\\\hhline{~~--}
&
&
&
{\selectlanguage{english} 10}\\\hhline{~~~-}
&
&
{\selectlanguage{english} E3} &
{\selectlanguage{english} 11}\\\hhline{~~--}
&
&
&
{\selectlanguage{english} 12}\\\hhline{~~~-}
\multicolumn{1}{|m{26.7mm}|}{{\selectlanguage{english} B}} &
{\selectlanguage{english} B1} &
~
&
{\selectlanguage{english} 13}\\\hline
&
{\selectlanguage{english} B2} &
~
&
{\selectlanguage{english} 14}\\\hhline{~---}
\end{supertabular}
\end{center}
\end{document}
答案1
一些建议:
- 使用
\multirow
应跨越 2、3、4、8 或 12 行的材料语句。 - 使用
\cline
说明,因为它们比\hhline
指令更容易解析。 - 请删除所有
\selectlanguage{english}
指令。如果确实必须删除,只需在 之前立即提供一个\selectlanguage{english}
指令即可\begin{tabularx}...
。
\documentclass[letterpaper]{article}
\usepackage[margin=1in]{geometry} % set page parameters
\usepackage[english]{babel}
\usepackage{color,array,supertabular}
\usepackage{multirow}
\begin{document}
\begin{center}
\setlength\extrarowheight{2pt}
\tablelasttail{}
\begin{supertabular}{|l|p{40mm}|p{40mm}|p{45mm}|}
\hline
Main Topic & Topic & Sub Topic & Publication\\
\hline
\multirow{12}{*}{A} & A1 & & 1 \\
\cline{2-4}
& \multirow{3}{*}{A2} & & 2 \\
\cline{4-4}
& & & 3 \\
\cline{4-4}
& & & 4 \\
\cline{2-4}
& \multirow{8}{*}{A3} & \multirow{4}{*}{E1}& 5 \\
\cline{4-4}
& & & 6 \\
\cline{4-4}
& & & 7 \\
\cline{4-4}
& & & 8 \\
\cline{3-4}
& & \multirow{2}{*}{E2}& 9 \\
\cline{4-4}
& & & 10 \\
\cline{3-4}
& & \multirow{2}{*}{E3}& 11 \\
\cline{4-4}
& & & 12\\
\hline
\multirow{2}{*}{B} & B1 & & 13\\
\cline{2-4}
& B2 & & 14 \\
\hline
\end{supertabular}
\end{center}
\end{document}