将每一项评分到表格中的正确单元格

将每一项评分到表格中的正确单元格

我有一张看起来像清单的表格。但是尽管有勾号,我还是使用分数。请帮忙完成。以下是 MWE:

\documentclass[12pt,twocolumn,twoside, a4paper]{article}  
\usepackage{booktabs}  
\usepackage{titling}    
\usepackage{titlesec}  
\usepackage{fancyhdr}  
\usepackage{hyphenat} 
\usepackage{multirow}  
\begin{document}  
\begin{table*}  
\begin{center}  
    \begin{tabular}{p{0.3cm} p{12cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} }  
        \toprule  
        \multirow{2}{*}{No.} & \multirow{2}{*}{Aspects of Study} & \multicolumn{6}{c}{Respondent}\\   
        \cmidrule{3-8}      &  & 1 & 2 & 3 & 4 & 5 & 6\\  
        \midrule  
        I   &\textbf{Introduction} & 2 & 3 & 4& 5 &6 &7 \\  
            &\begin{enumerate}  
                \item Statement 1  

                \item Statement 2   
            \end{enumerate} & 2 & 3 & 4 & 5 & 3 & 2 \\  

        II  &\textbf{Main Activities} & 4 & 3 & 4& 2 &6 &4 \\  
            &\begin{enumerate}  
                \item Statement 3  
                \item Statement 4  
                \item Statement 5  
                \item Statement 6  
                \item Statement 7  
                \item Statement 8  
            \end{enumerate} & 2 & 3 & 4& 5 &6 &7 \\  
        III &\textbf{Closing} & 2 & 3 & 4& 5 &6 &7 \\  
            &\begin{enumerate}  
                \item Statement 9  
                \item Statement 10  
            \end{enumerate}& 2 & 3 & 4& 5 &6 &7 \\  
        \bottomrule  
    \end{tabular}   
\end{center}  
\end{table*}  
\end{document}  

对每一条列举的语句进行评分

答案1

看看以下解决方案是否能满足您的要求:

\documentclass[12pt,twocolumn,twoside, a4paper]{article}
\usepackage{booktabs, multirow, tabularx}
\newcounter{rownum} % <--- for numbering of rows

\usepackage{xparse}  % <--- new
\NewExpandableDocumentCommand\mcc{O{1}m} % <--- for shortness for  
    {\multicolumn{#1}{c}{#2}}

\usepackage{lipsum}

\begin{document}
    \begin{table*}
    \centering
\begin{tabularx}{\linewidth}{X >{\stepcounter{rownum}\therownum}c % <---
                             p{10cm} *{7}{X}}
    \toprule
\multirow{2.4}{*}{No.} 
    &   \mcc{}  &   \multirow{2.4}{*}{Aspects of Study}
                        & \mcc[6]{Respondent}\\
    \cmidrule{4-10}      
    &   \mcc{}  &               & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
    \midrule
I   &   \mcc{}  &  \textbf{Introduction}
                                &   &   &   &   &   &       \\
    &&  \lipsum[11]             & 2 & 3 & 4 & 5 & 6 & 7     \\
    &&  \lipsum[12]             & 2 & 3 & 4 & 5 & 3 & 2     \\
II  &   \mcc{}  &  \textbf{Main Activities} 
                                &   &   &   &   &   &       \\
    &&  \lipsum[13]             & 2 & 3 & 4 & 5 & 6 & 7     \\
    &&  \lipsum[66]             & 2 & 3 & 4 & 5 & 6 & 7     \\
    \bottomrule
\end{tabularx}
    \end{table*}
\end{document} 

与上面的 MWE 相比,每个项目都被enumerate行替换,并自动编号

在此处输入图片描述

相关内容