如何将列表放置在多行内并修复垂直线的 cline 错误

如何将列表放置在多行内并修复垂直线的 cline 错误

我是个新手,所以请原谅我的无知。他们说 1 张图片 = 1000 个单词,所以这就是我想要实现的: 在此处输入图片描述

现在我通过乳胶的尝试导致了这一点: 在此处输入图片描述

所以我想我的问题是:1)我该如何修复垂直线?(这一定与 \cline 命令有关……)2)我该如何更好地定位列表?我的意思是,所有列表都将填满其列的整个长度(也许我也可以调整项目之间的间距)。我猜“&”符号除了分隔列之外,还会对齐文本,使事情变得有点复杂。提前致谢!!!

%
\documentclass[letterpaper]{article}
\usepackage{array}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage[T1]{fontenc}
\usepackage[sc,osf]{mathpazo}
\usepackage{enumitem}
\usepackage[sc]{mathpazo}
\usepackage{multirow}
\usepackage{sectsty}
\sectionfont{\rmfamily\mdseries\Large}
\subsectionfont{\rmfamily\mdseries\itshape\large}
\setlength\parindent{0em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
% table
\section*{Table}
\vspace{-0.7cm}
\hrulefill
\vspace{0.2cm}
%
\begin{tabular}{|>{\centering\arraybackslash}m{4.6cm}|>{\centering\arraybackslash}m{4.6cm}|>{\centering\arraybackslash}m{4.6cm}|}
\hline
Title1:  & Title2: &Title3:  \\
\hline
 \multirow{6}{*}{} \\
\begin{minipage}[t]{\hsize}
    \begin{description}[itemsep=0pt]
        \item One
        \item Two
        \item Three
        \item Four
        \item Five
        \item Six
    \end{description}
\end{minipage}%
                 &   
                 \multirow{12}{*}{
                 \begin{minipage}[c]{\hsize}
            \begin{enumerate}[itemsep=0pt]
                \item Text1
                \item Text2
                \item Text3
                \item Text4
                \item Text5
                \item Text6
                \item Text7
                \item Text8
                \item Text9
            \end{enumerate}
        \end{minipage}%  
        }          
                    &   
    \multirow{12}{*}{             
                 \begin{minipage}[c]{\hsize}
        \begin{enumerate}
            \item other1
            \item Other2
            \item Other3
            \item Other4        
            \item Other5
            \item Other6
            \item Other7
        \end{enumerate}
\end{minipage}%         
}              
\\
 \cline{1-1}
 Other:\\
  \cline{1-1}
\multirow{4}{*}{} 
\begin{minipage}[t]{\hsize}
    \begin{description}[itemsep=0pt]
        \item[1] Foo1
        \item[2]  Foo2
        \item[3] Bar1
        \item[4] Bar2
        \item[5] FooBar
    \end{description}
\end{minipage}%
            &                &                 \\ 
\hline
\end{tabular}


\end{document}

答案1

作为一个起点。

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx}
\usepackage{makecell}
\renewcommand{\theadfont}{\normalsize}
\usepackage{enumitem}
\newlist{tabenum}{enumerate}{1}
\setlist[tabenum,1]{nosep,leftmargin=*,before=\vspace{-0.5\baselineskip},after=\vspace{-1\baselineskip},label*=\arabic*.,leftmargin=*}
\usepackage{calc}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}

\begin{document}
\noindent
\begin{tabularx}{\textwidth}{|@{}L|L|L|}
\hline
\thead{Title 1:} & \thead{Title 2:} & \thead{Title 3:}\\
\hline
\begin{tabular}[t]{p{\linewidth-\tabcolsep}}
\begin{tabenum}
  \item item
  \item item
  \item item
  \item item
  \item item
  \item item
\end{tabenum}\\
\hline
Others:\\
\hline
\begin{tabenum}
  \item item
  \item item
  \item item
  \item item
  \item item
  \item item
  \item item
  \item item
  \item item
\end{tabenum}\\
\end{tabular}&
    \begin{tabenum}
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
      \item item
    \end{tabenum} & 
        \begin{tabenum}
          \item item
          \item item
          \item item
          \item item
          \item item
          \item item
          \item item
        \end{tabenum} \\
\hline
\end{tabularx}

\end{document}

相关内容