我不知道为什么我的表格单元格和轮廓之间没有线
\begin{table}[ht]
\begin{center}
\begin{tabular}{cc}
\hline
\multirow{2}{*}{Expression} & Modality\\
& Expressive Symbols\\
\hline
\multirow{3}{*}{Replication} & Overlaying\\
& Affixing\\
& Stacking\\
\hline
\multirow{4}{*}{Narration} & Storyline Foundation\\
& Block Formation\\
& Group Composition\\
& Frame Fixation\\
\hline
\multirow{4}{*}{Connection} & Transition\\
& Progression\\
& Execution\\
& Aggregation\\
\hline
\end{tabular}
\end{center}
\caption{The Design Rules Structure}
\label{table:DesignPrinciples}
\end{table}
答案1
用于\cline
添加穿过部分单元格的水平线。
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|c|c|}
\hline
\multirow{2}{*}{Expression} & Modality \\ \cline{2-2}
& Expressive Symbols\\
\hline
\multirow{3}{*}{Replication} & Overlaying\\ \cline{2-2}
& Affixing\\ \cline{2-2}
& Stacking\\ \cline{2-2}
\hline
\multirow{4}{*}{Narration} & Storyline Foundation\\
& Block Formation\\ \cline{2-2}
& Group Composition\\ \cline{2-2}
& Frame Fixation\\ \cline{2-2}
\hline
\multirow{4}{*}{Connection} & Transition\\ \cline{2-2}
& Progression\\ \cline{2-2}
& Execution\\ \cline{2-2}
& Aggregation\\ \cline{2-2}
\hline
\end{tabular}
\caption{The Design Rules Structure}
\label{table:DesignPrinciples}
\end{table}
\end{document}
答案2
使用这个tabularray
包,您可以为表格编写更简单、更简短的代码,并获得更好看的表格:
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{table}
\centering
\begin{tblr}{hlines, vlines,
colspec={cc}
}
\SetCell[r=2]{} Expression
& Modality \\
& Expressive Symbols \\
\SetCell[r=3]{} Replication
& Overlaying \\
& Affixing \\
& Stacking \\
\SetCell[r=4]{} Narration
& Storyline Foundation \\
& Block Formation \\
& Group Composition \\
& Frame Fixation \\
\SetCell[r=4]{} Connection
& Transition \\
& Progression \\
& Execution \\
& Aggregation \\
\end{tblr}
\caption{The Design Rules Structure}
\label{table:DesignPrinciples}
\end{table}
\end{document}
顺便说一句,我认为如果表格的内容左对齐的话,表格看起来会更美观:
对于此表您只需更改colspec
为colspec = {ll}
。
答案3
与。{NiceTabular}
nicematrix
\documentclass{article}
\usepackage{caption}
\usepackage{nicematrix}
\begin{document}
\begin{table}
\centering
\begin{NiceTabular}{ll}[hvlines]
\Block{2-1}{Expression}
& Modality \\
& Expressive Symbols \\
\Block{3-1}{Replication}
& Overlaying \\
& Affixing \\
& Stacking \\
\Block{4-1}{Narration}
& Storyline Foundation \\
& Block Formation \\
& Group Composition \\
& Frame Fixation \\
\Block{4-1}{Connection}
& Transition \\
& Progression \\
& Execution \\
& Aggregation \\
\end{NiceTabular}
\caption{The Design Rules Structure}
\label{table:DesignPrinciples}
\end{table}
\end{document}