如何创建一个两列表格,每列有不同数量的行 - latex Overleaf

如何创建一个两列表格,每列有不同数量的行 - latex Overleaf

我正在尝试创建一个类似于我所附表格的表格。它有两列,但每列的行数不同。

我正在尝试使用多列和多行,但到目前为止,我只是造成了混乱。我想要的表格

\begin{table}[h]
\small
  \caption{Features for the creation of a microfluidic platform. Table adapted from \cite{VanDenBerg2010}.}
  \label{tbl:buffer}
  \begin{tabular*}{0.80\textwidth}{@{\extracolsep{\fill}}ll}
    \hline
    Microfluidic unit operations & Fabrication technology \\
    \hline\\
    \multirow{5}{*}{Fluid transport  Fluid metering  Fluid  valving   Fluid mixing   Separation} & \multicolumn{1}{m{6cm}}{Validated manufacturing technology for the whole set of fluidic unit operations (prototyping and mass fabrication} \\

   \hline
  \end{tabular*}
\end{table}

答案1

也许您对以下结果感兴趣(没有要点):

在此处输入图片描述

\documentclass{article}
\usepackage{multirow}
\usepackage{array}
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}

\begin{table}[h]
\small
  \caption{Features for the creation of a microfluidic platform. Table adapted from \cite{VanDenBerg2010}.}
  \label{tbl:buffer}
  \begin{tabularx}{0.80\textwidth}{p{4cm}X}
    \toprule
    Microfluidic unit operations & Fabrication technology \\
    \midrule
    Fluid transport  \newline 
    Fluid metering  \newline 
    Fluid  valving  \newline 
    Fluid mixing   \newline 
    Separation 
    & Validated manufacturing technology for the whole set of fluidic unit operations (prototyping and mass fabrication) \\ \addlinespace
    Accumulation/amplification \newline 
    Reagent storage \& release \newline
    Incubation \newline
    ...
    & Seamless integration of different elements \newline 
    ... preferable in a monolithic way \newline
    ... or by a well defined easy packaging technique\\
   \bottomrule
  \end{tabularx}
\end{table}

\end{document}

为了允许表格单元格自动换行,我使用了一个p类型和一个X类型列。后者由tabularx包引入,正好占据整个表格的宽度减去其他列的宽度。对于表格单元格中的手动换行,我使用了。我还用包中的规则\newline替换了命令,以便在它们周围留出更多空白。\hlinebooktabs

答案2

如果您想继续使用多行和多列方法:看起来您只是误解了应该在哪里\multirow应用\multicolumn:我认为您试图在它们应该在的相反位置使用它们(在这种情况下您只需要\multirow)。

\multirow用于创建跨越多个自然表行的单元格,\multicolumn用于创建跨越多个自然表列的单元格。

因此看起来你可能想要这样的东西:

\documentclass{article}
\usepackage{multirow,booktabs}
\abovetopsep=0.4ex % separate the top rule from the caption a bit

\begin{document}

\begin{table}
  \centering
  \caption{Features for the creation of a microfluidic platform. }
  \label{tbl:buffer}
  \begin{tabular}{ll}
    \toprule
    Microfluidic unit operations & Fabrication technology \\
    \midrule
    Fluid transport   & \multirow[t]{5}{6cm}{Validated manufacturing technology for the whole set of fluidic unit operations (prototyping and mass fabrication)} \\
    Fluid metering  \\
    Fluid  valving   \\
    Fluid mixing   \\
    Separation \\
   \bottomrule
  \end{tabular}
\end{table}

\end{document}

在此处输入图片描述

相关内容