多行表的问题

多行表的问题

我正在尝试让它工作,但小单元格不显示其内容

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{tabularray}

\begin{document}

\begin{table}
\centering
\begin{tblr}{hlines, vlines, colspec={ll}}
\SetCell[r=6]{} Expression
    & \SetCell[r=3]{} Modality
    & P                         \\
    & O                         \\
    & A                         \\
    & \SetCell[r=3]{} Expressive Symbols
    & P                         \\
    & O                         \\
    & A                         \\
\end{tblr}
\caption{The Audit CheckList}
\label{table:DesignPrinciples}
\end{table}


\end{document}

答案1

您想要三列,但只指定两列: {ll}应该是{lll}

\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{tabularray}

\begin{document}
    
\begin{table}
\centering
\begin{tblr}{hlines, vlines, colspec={lll}}
\multirow[c]{6}{2cm}{Expression} & \multirow[c]{3}{3cm}{Modality} & P   \\
   & & O  \\
   & & A  \\
    & \multirow[c]{3}{1.5cm}{Expressive Symbols} & P \\
   & & O  \\
   & & A  \\
\end{tblr}
\caption{The Audit CheckList}
\label{table:DesignPrinciples}
\end{table}


\end{document}

您还可以使用\multirow

\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{tabularray}

\begin{document}

\begin{table}
\centering
\begin{tblr}{hlines, vlines, colspec={lll}}
\multirow[c]{6}{2cm}{Expression} & \multirow[c]{3}{3cm}{Modality} & P   \\
   & & O  \\
   & & A  \\
    & \multirow[c]{3}{1cm}{Expressive Symbols} & P \\
   & & O  \\
   & & A  \\
\end{tblr}
\caption{The Audit CheckList}
\label{table:DesignPrinciples}
\end{table}

\end{document}

这会产生略有不同的输出:

在此处输入图片描述

相关内容